@cratis/screenplay-language 5.3.0 → 5.3.2

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 (395) hide show
  1. package/dist/bundles/TypeReferenceSymbol.js.map +1 -1
  2. package/dist/bundles/action-subject-authoring.js.map +1 -1
  3. package/dist/bundles/bmp-word-characters.js.map +1 -1
  4. package/dist/bundles/case-authoring.js +1 -1
  5. package/dist/bundles/case-authoring.js.map +1 -1
  6. package/dist/bundles/code-actions.js.map +1 -1
  7. package/dist/bundles/command-read-completions.js.map +1 -1
  8. package/dist/bundles/compiler/Authoring/ActionSubjectQuickFixes.js +3 -3
  9. package/dist/bundles/compiler/Authoring/ActionSubjectQuickFixes.js.map +1 -1
  10. package/dist/bundles/compiler/Authoring/QuickFixes.js +4 -4
  11. package/dist/bundles/compiler/Authoring/QuickFixes.js.map +1 -1
  12. package/dist/bundles/compiler/Authoring/StructuredValueQuickFix.js +1 -1
  13. package/dist/bundles/compiler/Authoring/StructuredValueQuickFix.js.map +1 -1
  14. package/dist/bundles/compiler/Authoring/TimelineQuickFixContext.js +4 -4
  15. package/dist/bundles/compiler/Authoring/TimelineQuickFixContext.js.map +1 -1
  16. package/dist/bundles/compiler/Authoring/TimelineQuickFixImports.js +2 -2
  17. package/dist/bundles/compiler/Authoring/TimelineQuickFixImports.js.map +1 -1
  18. package/dist/bundles/compiler/Authoring/TimelineQuickFixes.js +1 -1
  19. package/dist/bundles/compiler/Authoring/TimelineQuickFixes.js.map +1 -1
  20. package/dist/bundles/compiler/Dependencies/DeclaredDependencies.js.map +1 -1
  21. package/dist/bundles/compiler/Dependencies/DeclaredDependencyTargets.js.map +1 -1
  22. package/dist/bundles/compiler/Dependencies/DependencyGraph.js +1 -1
  23. package/dist/bundles/compiler/Dependencies/DependencyGraph.js.map +1 -1
  24. package/dist/bundles/compiler/Dependencies/DependencyKind.js.map +1 -1
  25. package/dist/bundles/compiler/Dependencies/InvalidDependencyQuery.js.map +1 -1
  26. package/dist/bundles/compiler/Dependencies/SliceReferences.js.map +1 -1
  27. package/dist/bundles/compiler/Dependencies/StronglyConnectedGroups.js.map +1 -1
  28. package/dist/bundles/compiler/Diagnostics/DiagnosticArgument.js.map +1 -1
  29. package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js +1 -1
  30. package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js.map +1 -1
  31. package/dist/bundles/compiler/Diagnostics/ProductionDestinationDiagnostics.js +1 -1
  32. package/dist/bundles/compiler/Diagnostics/ProductionDestinationDiagnostics.js.map +1 -1
  33. package/dist/bundles/compiler/Diagnostics/SourceLocation.js.map +1 -1
  34. package/dist/bundles/compiler/Files/AuthoredOrder.js +1 -1
  35. package/dist/bundles/compiler/Files/AuthoredOrder.js.map +1 -1
  36. package/dist/bundles/compiler/Files/OrderingRoot.js +1 -1
  37. package/dist/bundles/compiler/Files/OrderingRoot.js.map +1 -1
  38. package/dist/bundles/compiler/Files/PlayApplicationAssembly.js +1 -1
  39. package/dist/bundles/compiler/Files/PlayApplicationAssembly.js.map +1 -1
  40. package/dist/bundles/compiler/Files/PlayDocumentSource.js.map +1 -1
  41. package/dist/bundles/compiler/Files/PlayFolderMerge.js +1 -1
  42. package/dist/bundles/compiler/Files/PlayFolderMerge.js.map +1 -1
  43. package/dist/bundles/compiler/Files/PlayGlob.js +2 -1
  44. package/dist/bundles/compiler/Files/PlayGlob.js.map +1 -1
  45. package/dist/bundles/compiler/Files/PlayImports.js +1 -1
  46. package/dist/bundles/compiler/Files/PlayImports.js.map +1 -1
  47. package/dist/bundles/compiler/Files/PlayPlacement.js.map +1 -1
  48. package/dist/bundles/compiler/Files/TimelineOrder.js +1 -1
  49. package/dist/bundles/compiler/Files/TimelineOrder.js.map +1 -1
  50. package/dist/bundles/compiler/Generation/FiniteGenerationRules.js +1 -1
  51. package/dist/bundles/compiler/Generation/GenerationAssessmentCache.js.map +1 -1
  52. package/dist/bundles/compiler/Generation/GenerationChecksum.js.map +1 -1
  53. package/dist/bundles/compiler/Generation/GenerationPattern.js +1 -1
  54. package/dist/bundles/compiler/Generation/GenerationPattern.js.map +1 -1
  55. package/dist/bundles/compiler/Generation/GenerationPatternAssessment.js.map +1 -1
  56. package/dist/bundles/compiler/Generation/GenerationPatternParser.js.map +1 -1
  57. package/dist/bundles/compiler/Generation/GenerationPatternToken.js.map +1 -1
  58. package/dist/bundles/compiler/Generation/GenerationRuleProof.js +1 -1
  59. package/dist/bundles/compiler/Generation/InvalidGenerationPattern.js.map +1 -1
  60. package/dist/bundles/compiler/Generation/RegexCharacters.js.map +1 -1
  61. package/dist/bundles/compiler/Generation/RegexExpression.js.map +1 -1
  62. package/dist/bundles/compiler/Generation/RuleConsistency.js +1 -1
  63. package/dist/bundles/compiler/Parsing/ActionSubjectClause.js.map +1 -1
  64. package/dist/bundles/compiler/Parsing/ActionSubjectInputs.js.map +1 -1
  65. package/dist/bundles/compiler/Parsing/ActionSubjectResolution.js.map +1 -1
  66. package/dist/bundles/compiler/Parsing/ApplicationContextParser.js +1 -1
  67. package/dist/bundles/compiler/Parsing/ApplicationContextParser.js.map +1 -1
  68. package/dist/bundles/compiler/Parsing/AuthorizeParser.js +1 -1
  69. package/dist/bundles/compiler/Parsing/AuthorizeParser.js.map +1 -1
  70. package/dist/bundles/compiler/Parsing/CanvasPlacement.js.map +1 -1
  71. package/dist/bundles/compiler/Parsing/CaptureEventFixturesValidator.js.map +1 -1
  72. package/dist/bundles/compiler/Parsing/CaptureParser.js +1 -1
  73. package/dist/bundles/compiler/Parsing/CaptureParser.js.map +1 -1
  74. package/dist/bundles/compiler/Parsing/ClockOperandParser.js.map +1 -1
  75. package/dist/bundles/compiler/Parsing/CodeBlockParser.js.map +1 -1
  76. package/dist/bundles/compiler/Parsing/CommandDestinationTypes.js.map +1 -1
  77. package/dist/bundles/compiler/Parsing/CommandHandlerValidator.js.map +1 -1
  78. package/dist/bundles/compiler/Parsing/CommandParser.js +1 -1
  79. package/dist/bundles/compiler/Parsing/CommandParser.js.map +1 -1
  80. package/dist/bundles/compiler/Parsing/CommandReadSources.js.map +1 -1
  81. package/dist/bundles/compiler/Parsing/CommandResponseParser.js +1 -1
  82. package/dist/bundles/compiler/Parsing/CommandResponseParser.js.map +1 -1
  83. package/dist/bundles/compiler/Parsing/CommandStreamCandidates.js.map +1 -1
  84. package/dist/bundles/compiler/Parsing/CompositeStreamIdValidator.js.map +1 -1
  85. package/dist/bundles/compiler/Parsing/CompositionParser.js +1 -1
  86. package/dist/bundles/compiler/Parsing/CompositionParser.js.map +1 -1
  87. package/dist/bundles/compiler/Parsing/ConceptComplianceParser.js +1 -1
  88. package/dist/bundles/compiler/Parsing/ConceptComplianceParser.js.map +1 -1
  89. package/dist/bundles/compiler/Parsing/ConditionDepthBudget.js +2 -0
  90. package/dist/bundles/compiler/Parsing/ConditionDepthBudget.js.map +1 -0
  91. package/dist/bundles/compiler/Parsing/ConditionParser.js +1 -1
  92. package/dist/bundles/compiler/Parsing/ConditionParser.js.map +1 -1
  93. package/dist/bundles/compiler/Parsing/ConstraintParser.js +1 -1
  94. package/dist/bundles/compiler/Parsing/ConstraintParser.js.map +1 -1
  95. package/dist/bundles/compiler/Parsing/ConstraintPropertyValidator.js +1 -1
  96. package/dist/bundles/compiler/Parsing/ConstraintPropertyValidator.js.map +1 -1
  97. package/dist/bundles/compiler/Parsing/ContinuationValues.js.map +1 -1
  98. package/dist/bundles/compiler/Parsing/DeclarationParsers.js +1 -1
  99. package/dist/bundles/compiler/Parsing/DeclarationParsers.js.map +1 -1
  100. package/dist/bundles/compiler/Parsing/DependencySourceParser.js +1 -1
  101. package/dist/bundles/compiler/Parsing/DependencySourceParser.js.map +1 -1
  102. package/dist/bundles/compiler/Parsing/DependsOnParser.js.map +1 -1
  103. package/dist/bundles/compiler/Parsing/DescriptionParser.js +1 -1
  104. package/dist/bundles/compiler/Parsing/DescriptionParser.js.map +1 -1
  105. package/dist/bundles/compiler/Parsing/DocumentationParser.js +1 -1
  106. package/dist/bundles/compiler/Parsing/DocumentationParser.js.map +1 -1
  107. package/dist/bundles/compiler/Parsing/EnumerationMembers.js +1 -1
  108. package/dist/bundles/compiler/Parsing/EnumerationMembers.js.map +1 -1
  109. package/dist/bundles/compiler/Parsing/EventMetadataParser.js +1 -1
  110. package/dist/bundles/compiler/Parsing/EventMetadataParser.js.map +1 -1
  111. package/dist/bundles/compiler/Parsing/EventSourceParser.js +1 -1
  112. package/dist/bundles/compiler/Parsing/EventSourceParser.js.map +1 -1
  113. package/dist/bundles/compiler/Parsing/EventSourceValidator.js +1 -1
  114. package/dist/bundles/compiler/Parsing/EventSourceValidator.js.map +1 -1
  115. package/dist/bundles/compiler/Parsing/EventSubjectValidator.js +1 -1
  116. package/dist/bundles/compiler/Parsing/EventSubjectValidator.js.map +1 -1
  117. package/dist/bundles/compiler/Parsing/ExpressionParser.js +1 -1
  118. package/dist/bundles/compiler/Parsing/ExpressionParser.js.map +1 -1
  119. package/dist/bundles/compiler/Parsing/FeatureBody.js +1 -1
  120. package/dist/bundles/compiler/Parsing/FeatureBody.js.map +1 -1
  121. package/dist/bundles/compiler/Parsing/FileImportParser.js.map +1 -1
  122. package/dist/bundles/compiler/Parsing/FileReferences.js.map +1 -1
  123. package/dist/bundles/compiler/Parsing/FoldedEventSources.js.map +1 -1
  124. package/dist/bundles/compiler/Parsing/GenerationBodyParser.js +1 -1
  125. package/dist/bundles/compiler/Parsing/GenerationBodyParser.js.map +1 -1
  126. package/dist/bundles/compiler/Parsing/GenerationParser.js +1 -1
  127. package/dist/bundles/compiler/Parsing/GenerationParser.js.map +1 -1
  128. package/dist/bundles/compiler/Parsing/GuardedActionInputs.js.map +1 -1
  129. package/dist/bundles/compiler/Parsing/GuardedActionParser.js +1 -1
  130. package/dist/bundles/compiler/Parsing/GuardedActionParser.js.map +1 -1
  131. package/dist/bundles/compiler/Parsing/GuardedActionShadowing.js.map +1 -1
  132. package/dist/bundles/compiler/Parsing/GuardedActionValidator.js +1 -1
  133. package/dist/bundles/compiler/Parsing/GuardedActionValidator.js.map +1 -1
  134. package/dist/bundles/compiler/Parsing/GuardedInteractions.js +1 -1
  135. package/dist/bundles/compiler/Parsing/GuardedInteractions.js.map +1 -1
  136. package/dist/bundles/compiler/Parsing/IdentifierComplianceValidator.js +1 -1
  137. package/dist/bundles/compiler/Parsing/IdentifierComplianceValidator.js.map +1 -1
  138. package/dist/bundles/compiler/Parsing/IdentityParser.js +1 -1
  139. package/dist/bundles/compiler/Parsing/IdentityParser.js.map +1 -1
  140. package/dist/bundles/compiler/Parsing/IdentityValidator.js.map +1 -1
  141. package/dist/bundles/compiler/Parsing/ImplementationParser.js +2 -2
  142. package/dist/bundles/compiler/Parsing/ImplementationParser.js.map +1 -1
  143. package/dist/bundles/compiler/Parsing/ImportDiscovery.js +1 -1
  144. package/dist/bundles/compiler/Parsing/ImportDiscovery.js.map +1 -1
  145. package/dist/bundles/compiler/Parsing/InlineEventValidator.js.map +1 -1
  146. package/dist/bundles/compiler/Parsing/InputUses.js +1 -1
  147. package/dist/bundles/compiler/Parsing/InputUses.js.map +1 -1
  148. package/dist/bundles/compiler/Parsing/InteractionAlternatives.js +1 -1
  149. package/dist/bundles/compiler/Parsing/InteractionAlternatives.js.map +1 -1
  150. package/dist/bundles/compiler/Parsing/InteractionExecutions.js +1 -1
  151. package/dist/bundles/compiler/Parsing/InteractionExecutions.js.map +1 -1
  152. package/dist/bundles/compiler/Parsing/LegacyTextRulePatterns.js.map +1 -1
  153. package/dist/bundles/compiler/Parsing/LineReader.js.map +1 -1
  154. package/dist/bundles/compiler/Parsing/LineText.js.map +1 -1
  155. package/dist/bundles/compiler/Parsing/MatchAmbiguity.js +1 -1
  156. package/dist/bundles/compiler/Parsing/MatchAmbiguity.js.map +1 -1
  157. package/dist/bundles/compiler/Parsing/MatchAmbiguityCharacters.js.map +1 -1
  158. package/dist/bundles/compiler/Parsing/MatchAmbiguityGraph.js.map +1 -1
  159. package/dist/bundles/compiler/Parsing/MatchAmbiguityParser.js.map +1 -1
  160. package/dist/bundles/compiler/Parsing/MatchOperandValidation.js +1 -1
  161. package/dist/bundles/compiler/Parsing/MatchOperandValidation.js.map +1 -1
  162. package/dist/bundles/compiler/Parsing/ModuleBody.js +1 -1
  163. package/dist/bundles/compiler/Parsing/ModuleBody.js.map +1 -1
  164. package/dist/bundles/compiler/Parsing/ObserverFilterParser.js +1 -1
  165. package/dist/bundles/compiler/Parsing/ObserverFilterParser.js.map +1 -1
  166. package/dist/bundles/compiler/Parsing/ObserverFilterValidator.js.map +1 -1
  167. package/dist/bundles/compiler/Parsing/OperationParser.js +1 -1
  168. package/dist/bundles/compiler/Parsing/OperationParser.js.map +1 -1
  169. package/dist/bundles/compiler/Parsing/OperationValidator.js +1 -1
  170. package/dist/bundles/compiler/Parsing/OperationValidator.js.map +1 -1
  171. package/dist/bundles/compiler/Parsing/ParserContext.js.map +1 -1
  172. package/dist/bundles/compiler/Parsing/PersonaCallerValidator.js.map +1 -1
  173. package/dist/bundles/compiler/Parsing/PolicyParser.js +1 -1
  174. package/dist/bundles/compiler/Parsing/PolicyParser.js.map +1 -1
  175. package/dist/bundles/compiler/Parsing/PortableMatchGroupName.js.map +1 -1
  176. package/dist/bundles/compiler/Parsing/PortableMatchPattern.js.map +1 -1
  177. package/dist/bundles/compiler/Parsing/PortableMatchSuggestions.js.map +1 -1
  178. package/dist/bundles/compiler/Parsing/PossibleEventsParser.js +1 -1
  179. package/dist/bundles/compiler/Parsing/PossibleEventsParser.js.map +1 -1
  180. package/dist/bundles/compiler/Parsing/ProducesParser.js +1 -1
  181. package/dist/bundles/compiler/Parsing/ProducesParser.js.map +1 -1
  182. package/dist/bundles/compiler/Parsing/ProjectionEventScopeValidator.js.map +1 -1
  183. package/dist/bundles/compiler/Parsing/ProjectionExpressionParser.js +1 -1
  184. package/dist/bundles/compiler/Parsing/ProjectionExpressionParser.js.map +1 -1
  185. package/dist/bundles/compiler/Parsing/ProjectionParser.js +1 -1
  186. package/dist/bundles/compiler/Parsing/ProjectionParser.js.map +1 -1
  187. package/dist/bundles/compiler/Parsing/ProjectionTargetValidator.js +1 -1
  188. package/dist/bundles/compiler/Parsing/ProjectionTargetValidator.js.map +1 -1
  189. package/dist/bundles/compiler/Parsing/PropertyLineParser.js +1 -1
  190. package/dist/bundles/compiler/Parsing/PropertyLineParser.js.map +1 -1
  191. package/dist/bundles/compiler/Parsing/PublicEventMetadataValidator.js +1 -1
  192. package/dist/bundles/compiler/Parsing/PublicEventMetadataValidator.js.map +1 -1
  193. package/dist/bundles/compiler/Parsing/PublicEventUsageCollector.js +1 -1
  194. package/dist/bundles/compiler/Parsing/PublicEventUsageCollector.js.map +1 -1
  195. package/dist/bundles/compiler/Parsing/PublicEventUsageValidator.js +1 -1
  196. package/dist/bundles/compiler/Parsing/PublicEventUsageValidator.js.map +1 -1
  197. package/dist/bundles/compiler/Parsing/PurposeParser.js +1 -1
  198. package/dist/bundles/compiler/Parsing/PurposeParser.js.map +1 -1
  199. package/dist/bundles/compiler/Parsing/PurposeValidator.js.map +1 -1
  200. package/dist/bundles/compiler/Parsing/QueryParser.js +1 -1
  201. package/dist/bundles/compiler/Parsing/QueryParser.js.map +1 -1
  202. package/dist/bundles/compiler/Parsing/ReactionIdentityParser.js +1 -1
  203. package/dist/bundles/compiler/Parsing/ReactionIdentityParser.js.map +1 -1
  204. package/dist/bundles/compiler/Parsing/ReactionParser.js +1 -1
  205. package/dist/bundles/compiler/Parsing/ReactionParser.js.map +1 -1
  206. package/dist/bundles/compiler/Parsing/ReactionRefusalValidator.js +1 -1
  207. package/dist/bundles/compiler/Parsing/ReactionRefusalValidator.js.map +1 -1
  208. package/dist/bundles/compiler/Parsing/ReadModelKeyValidator.js.map +1 -1
  209. package/dist/bundles/compiler/Parsing/ReadModelMemberTypeValidator.js.map +1 -1
  210. package/dist/bundles/compiler/Parsing/ReadsParser.js +1 -1
  211. package/dist/bundles/compiler/Parsing/ReadsParser.js.map +1 -1
  212. package/dist/bundles/compiler/Parsing/RedeliveryValues.js.map +1 -1
  213. package/dist/bundles/compiler/Parsing/RefusalDeclarations.js +1 -1
  214. package/dist/bundles/compiler/Parsing/RefusalDeclarations.js.map +1 -1
  215. package/dist/bundles/compiler/Parsing/RefusalValueWalker.js.map +1 -1
  216. package/dist/bundles/compiler/Parsing/ResponseCommandResolver.js.map +1 -1
  217. package/dist/bundles/compiler/Parsing/ResponseDateValues.js.map +1 -1
  218. package/dist/bundles/compiler/Parsing/ResponseValidator.js +1 -1
  219. package/dist/bundles/compiler/Parsing/ResponseValidator.js.map +1 -1
  220. package/dist/bundles/compiler/Parsing/ScreenParser.js +1 -1
  221. package/dist/bundles/compiler/Parsing/ScreenParser.js.map +1 -1
  222. package/dist/bundles/compiler/Parsing/ScreenplayParser.js +1 -1
  223. package/dist/bundles/compiler/Parsing/ScreenplayParser.js.map +1 -1
  224. package/dist/bundles/compiler/Parsing/SeedParser.js +1 -1
  225. package/dist/bundles/compiler/Parsing/SeedParser.js.map +1 -1
  226. package/dist/bundles/compiler/Parsing/SliceParser.js +1 -1
  227. package/dist/bundles/compiler/Parsing/SliceParser.js.map +1 -1
  228. package/dist/bundles/compiler/Parsing/SourceLine.js.map +1 -1
  229. package/dist/bundles/compiler/Parsing/SourceLineSplitter.js.map +1 -1
  230. package/dist/bundles/compiler/Parsing/SourceOptionsParser.js +1 -1
  231. package/dist/bundles/compiler/Parsing/SourceOptionsParser.js.map +1 -1
  232. package/dist/bundles/compiler/Parsing/SpecificationCaseParser.js +1 -1
  233. package/dist/bundles/compiler/Parsing/SpecificationCaseParser.js.map +1 -1
  234. package/dist/bundles/compiler/Parsing/SpecificationCaseValidator.js +1 -1
  235. package/dist/bundles/compiler/Parsing/SpecificationCaseValidator.js.map +1 -1
  236. package/dist/bundles/compiler/Parsing/SpecificationCommandExamples.js +1 -1
  237. package/dist/bundles/compiler/Parsing/SpecificationCommandExamples.js.map +1 -1
  238. package/dist/bundles/compiler/Parsing/SpecificationExampleParser.js +1 -1
  239. package/dist/bundles/compiler/Parsing/SpecificationExampleParser.js.map +1 -1
  240. package/dist/bundles/compiler/Parsing/SpecificationParser.js +1 -1
  241. package/dist/bundles/compiler/Parsing/SpecificationParser.js.map +1 -1
  242. package/dist/bundles/compiler/Parsing/SpecificationRedeliveryValidator.js +1 -1
  243. package/dist/bundles/compiler/Parsing/SpecificationRedeliveryValidator.js.map +1 -1
  244. package/dist/bundles/compiler/Parsing/SpecificationResponseParser.js +1 -1
  245. package/dist/bundles/compiler/Parsing/SpecificationResponseParser.js.map +1 -1
  246. package/dist/bundles/compiler/Parsing/SpecificationRouteComparison.js +1 -1
  247. package/dist/bundles/compiler/Parsing/SpecificationRouteComparison.js.map +1 -1
  248. package/dist/bundles/compiler/Parsing/SpecificationStreamValidator.js +1 -1
  249. package/dist/bundles/compiler/Parsing/SpecificationStreamValidator.js.map +1 -1
  250. package/dist/bundles/compiler/Parsing/StateMachineParser.js +1 -1
  251. package/dist/bundles/compiler/Parsing/StateMachineParser.js.map +1 -1
  252. package/dist/bundles/compiler/Parsing/StructuralInteractionSites.js.map +1 -1
  253. package/dist/bundles/compiler/Parsing/StructuredBlockParser.js +1 -1
  254. package/dist/bundles/compiler/Parsing/StructuredBlockParser.js.map +1 -1
  255. package/dist/bundles/compiler/Parsing/StructuredValueParser.js.map +1 -1
  256. package/dist/bundles/compiler/Parsing/TemplateReferenceText.js +1 -1
  257. package/dist/bundles/compiler/Parsing/TemplateReferenceText.js.map +1 -1
  258. package/dist/bundles/compiler/Parsing/TriggerDataParser.js +1 -1
  259. package/dist/bundles/compiler/Parsing/TriggerDataParser.js.map +1 -1
  260. package/dist/bundles/compiler/Parsing/UiBindingParser.js +1 -1
  261. package/dist/bundles/compiler/Parsing/UiBindingParser.js.map +1 -1
  262. package/dist/bundles/compiler/Parsing/UiProfileLegacyLayout.js +1 -1
  263. package/dist/bundles/compiler/Parsing/UiProfileLegacyLayout.js.map +1 -1
  264. package/dist/bundles/compiler/Parsing/WorkflowParser.js +1 -1
  265. package/dist/bundles/compiler/Parsing/WorkflowParser.js.map +1 -1
  266. package/dist/bundles/compiler/Parsing/checkPortableMatchPattern.js.map +1 -1
  267. package/dist/bundles/compiler/Parsing/hasExponentialMatchAmbiguity.js.map +1 -1
  268. package/dist/bundles/compiler/Parsing/trimMatchAmbiguityGraph.js.map +1 -1
  269. package/dist/bundles/compiler/ScreenActionSubjects.js.map +1 -1
  270. package/dist/bundles/compiler/ScreenplayCompiler.js +1 -1
  271. package/dist/bundles/compiler/ScreenplayCompiler.js.map +1 -1
  272. package/dist/bundles/compiler/Syntax/ActionSubjectInvariants.js.map +1 -1
  273. package/dist/bundles/compiler/Syntax/AuthoringProductionResolver.js.map +1 -1
  274. package/dist/bundles/compiler/Syntax/CaptureEventsSource.js.map +1 -1
  275. package/dist/bundles/compiler/Syntax/DependencySources.js.map +1 -1
  276. package/dist/bundles/compiler/Syntax/EventDeclarations.js.map +1 -1
  277. package/dist/bundles/compiler/Syntax/EventSourceCatalog.js.map +1 -1
  278. package/dist/bundles/compiler/Syntax/EventSourceReadConfidence.js.map +1 -1
  279. package/dist/bundles/compiler/Syntax/ExactMathFacts.js.map +1 -1
  280. package/dist/bundles/compiler/Syntax/ExactNumber.js.map +1 -1
  281. package/dist/bundles/compiler/Syntax/InvalidSyntaxJson.js.map +1 -1
  282. package/dist/bundles/compiler/Syntax/LegacyWireProjection.js.map +1 -1
  283. package/dist/bundles/compiler/Syntax/Operations.js.map +1 -1
  284. package/dist/bundles/compiler/Syntax/PersonaCallers.js.map +1 -1
  285. package/dist/bundles/compiler/Syntax/ProductionDestinations.js.map +1 -1
  286. package/dist/bundles/compiler/Syntax/PublicEventInvariants.js.map +1 -1
  287. package/dist/bundles/compiler/Syntax/ScreenplaySyntaxWalker.js.map +1 -1
  288. package/dist/bundles/compiler/Syntax/SourceOptions.js.map +1 -1
  289. package/dist/bundles/compiler/Syntax/SpecificationCaseOrigin.js.map +1 -1
  290. package/dist/bundles/compiler/Syntax/StreamIdFormatter.js.map +1 -1
  291. package/dist/bundles/compiler/Syntax/StrictSyntaxJson.js +1 -1
  292. package/dist/bundles/compiler/Syntax/Structure.js.map +1 -1
  293. package/dist/bundles/compiler/Syntax/SyntaxCollections.js.map +1 -1
  294. package/dist/bundles/compiler/Syntax/SyntaxInvariants.js +1 -1
  295. package/dist/bundles/compiler/Syntax/SyntaxInvariants.js.map +1 -1
  296. package/dist/bundles/compiler/Syntax/SyntaxJson.js +1 -1
  297. package/dist/bundles/compiler/Syntax/SyntaxJson.js.map +1 -1
  298. package/dist/bundles/compiler/Syntax/SyntaxMemberContracts.js.map +1 -1
  299. package/dist/bundles/compiler/Syntax/index.js +1 -1
  300. package/dist/bundles/compiler/Text/ImplementationHintText.js.map +1 -1
  301. package/dist/bundles/compiler/Text/ReservedWords.js.map +1 -1
  302. package/dist/bundles/compiler/Text/SourceStreamNames.js.map +1 -1
  303. package/dist/bundles/compiler/Text/StringLiteral.js.map +1 -1
  304. package/dist/bundles/compiler/Text/ordinalIgnoreCaseKey.js.map +1 -1
  305. package/dist/bundles/compiler/Text/patterns.js.map +1 -1
  306. package/dist/bundles/compiler/index.js +1 -1
  307. package/dist/bundles/completion-items.js +4 -4
  308. package/dist/bundles/completion-items.js.map +1 -1
  309. package/dist/bundles/completion-planner.js +2 -2
  310. package/dist/bundles/completion-planner.js.map +1 -1
  311. package/dist/bundles/completions.js +1 -1
  312. package/dist/bundles/completions.js.map +1 -1
  313. package/dist/bundles/continuation-responses.js +1 -1
  314. package/dist/bundles/continuation-responses.js.map +1 -1
  315. package/dist/bundles/declarations.js.map +1 -1
  316. package/dist/bundles/dependency-completions.js.map +1 -1
  317. package/dist/bundles/dependency-target-analysis.js.map +1 -1
  318. package/dist/bundles/diagnostic-codes.js +1 -1
  319. package/dist/bundles/diagnostic-codes.js.map +1 -1
  320. package/dist/bundles/diagnostics.js +1 -1
  321. package/dist/bundles/diagnostics.js.map +1 -1
  322. package/dist/bundles/document-context.js.map +1 -1
  323. package/dist/bundles/documentation-item.js.map +1 -1
  324. package/dist/bundles/event-analysis-source.js.map +1 -1
  325. package/dist/bundles/event-context-catalog.js.map +1 -1
  326. package/dist/bundles/event-context.js.map +1 -1
  327. package/dist/bundles/event-source-authoring.js +11 -11
  328. package/dist/bundles/event-source-authoring.js.map +1 -1
  329. package/dist/bundles/example-analysis.js +2 -2
  330. package/dist/bundles/example-analysis.js.map +1 -1
  331. package/dist/bundles/example-authoring.js +2 -2
  332. package/dist/bundles/example-authoring.js.map +1 -1
  333. package/dist/bundles/example-declaration-items.js.map +1 -1
  334. package/dist/bundles/example-values.js.map +1 -1
  335. package/dist/bundles/file-imports.js.map +1 -1
  336. package/dist/bundles/file-references.js.map +1 -1
  337. package/dist/bundles/generation-completions.js.map +1 -1
  338. package/dist/bundles/hover-content.js +5 -5
  339. package/dist/bundles/hover-content.js.map +1 -1
  340. package/dist/bundles/hover.js.map +1 -1
  341. package/dist/bundles/index.js +1 -1
  342. package/dist/bundles/index.js.map +1 -1
  343. package/dist/bundles/inlay-hints.js.map +1 -1
  344. package/dist/bundles/inline-completions.js +1 -1
  345. package/dist/bundles/inline-completions.js.map +1 -1
  346. package/dist/bundles/inline-event-validation.js +1 -1
  347. package/dist/bundles/inline-event-validation.js.map +1 -1
  348. package/dist/bundles/keyword-docs.js.map +1 -1
  349. package/dist/bundles/language.js.map +1 -1
  350. package/dist/bundles/named-rule-context.js.map +1 -1
  351. package/dist/bundles/operation-authoring.js +6 -6
  352. package/dist/bundles/operation-authoring.js.map +1 -1
  353. package/dist/bundles/persona-analysis.js +1 -1
  354. package/dist/bundles/persona-analysis.js.map +1 -1
  355. package/dist/bundles/production-destinations.js +1 -1
  356. package/dist/bundles/production-destinations.js.map +1 -1
  357. package/dist/bundles/purpose-items.js.map +1 -1
  358. package/dist/bundles/reaction-authoring.js +3 -3
  359. package/dist/bundles/reaction-authoring.js.map +1 -1
  360. package/dist/bundles/read-model-key-completions.js +1 -1
  361. package/dist/bundles/read-model-key-completions.js.map +1 -1
  362. package/dist/bundles/refusal-context.js.map +1 -1
  363. package/dist/bundles/response-analysis.js.map +1 -1
  364. package/dist/bundles/response-completions.js +1 -1
  365. package/dist/bundles/response-completions.js.map +1 -1
  366. package/dist/bundles/response-tokens.js +2 -2
  367. package/dist/bundles/response-tokens.js.map +1 -1
  368. package/dist/bundles/scope-items.js +3 -3
  369. package/dist/bundles/scope-items.js.map +1 -1
  370. package/dist/bundles/structure-completions.js.map +1 -1
  371. package/dist/bundles/sub-language-registry.js.map +1 -1
  372. package/dist/bundles/sub-languages/capture/CompletionProvider.js.map +1 -1
  373. package/dist/bundles/sub-languages/capture/HoverProvider.js.map +1 -1
  374. package/dist/bundles/sub-languages/capture/Validator.js.map +1 -1
  375. package/dist/bundles/sub-languages/capture/index.js.map +1 -1
  376. package/dist/bundles/sub-languages/capture/language.js.map +1 -1
  377. package/dist/bundles/sub-languages/cdl.js.map +1 -1
  378. package/dist/bundles/sub-languages/pdl.js.map +1 -1
  379. package/dist/bundles/sub-languages/projection/CodeActionProvider.js.map +1 -1
  380. package/dist/bundles/sub-languages/projection/CompletionProvider.js +1 -1
  381. package/dist/bundles/sub-languages/projection/CompletionProvider.js.map +1 -1
  382. package/dist/bundles/sub-languages/projection/HoverProvider.js.map +1 -1
  383. package/dist/bundles/sub-languages/projection/Validator.js.map +1 -1
  384. package/dist/bundles/sub-languages/projection/index.js.map +1 -1
  385. package/dist/bundles/sub-languages/projection/language.js.map +1 -1
  386. package/dist/bundles/symbols.js +2 -2
  387. package/dist/bundles/symbols.js.map +1 -1
  388. package/dist/bundles/themes/screenplay-dark.js.map +1 -1
  389. package/dist/bundles/themes/screenplay-light.js.map +1 -1
  390. package/dist/bundles/tokens.js.map +1 -1
  391. package/dist/bundles/validation.js +2 -2
  392. package/dist/bundles/validation.js.map +1 -1
  393. package/dist/diagnostic-codes.d.ts +1 -0
  394. package/dist/diagnostic-codes.d.ts.map +1 -1
  395. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"completion-planner.js","names":["items.moduleItems","items.featureItems","items.sliceItemsFor","items.typeItems","items.commandItems","items.eventItems","scope.readModelItems","scope.reducerItems","scope.formItems","scope.contributeItems","scope.behaviorItems","scope.personaItems","items.applicationContextItems","scope.profileIdentityItems","items.identityItems","scope.authenticationItems","scope.onboardingItems","scope.inviteMemberItems","scope.legalTermsItems","scope.emailItems","scope.seedItems","scope.themeItems","scope.uiProfileItems","scope.profileRootTemplateItems","scope.profileAppearanceItems","scope.profileSampleDataItems","scope.sampleDataItems","scope.sampleShapeItems","scope.outcomeItems","scope.layoutItems","scope.navigationItems","scope.toolbarItems","items.stateMachineItems","items.stateItems","items.workflowItems","items.operationItems","items.operationPhaseItems","items.producesItems","items.handlerItems","items.implementationItems","items.operationImplementationItems","items.queryItems","items.performerItems","items.constraintItems","items.reactionItems","items.invocationItems","items.triggerItems","items.reactionTriggerItems","items.specificationItems","items.policyItems","items.validateItems","items.actionItems","items.tableItems","scope.templateItems","items.screenItems","items.actionSubjectValueItems","items.actionSubjectItems","items.guardedActionItems","items.actionArgumentItems","items.interactionChoiceItems","items.interactionActionItems","items.refusalItems","items.namedRuleImplementationItems","items.commandRuleItems","items.optionalTypeItems","items.specificationStepItems","items.inlineEventItems","items.ruleItems","productionRouteItem","RULE_LINE_PATTERN","document","keyword","line","singularDeclarations","topLevelItems","item","header","relative","text","index","indent","indentOf","construct","chain","where","subLanguage","getSubLanguage","purposeItems","moduleScopeItems","featureScopeItems","sliceItemsFor","conceptItems","typeItems","commandItems","eventItems","readModelItems","reducerItems","formItems","contributeItems","behaviorItems","personaItems","applicationContextItems","profileIdentityItems","identityItems","authenticationItems","onboardingItems","inviteMemberItems","legalTermsItems","emailItems","seedItems","themeItems","uiProfileItems","profileRootTemplateItems","profileAppearanceItems","profileSampleDataItems","sampleDataItems","sampleShapeItems","outcomeItems","layoutItems","navigationItems","toolbarItems","stateMachineItems","stateItems","workflowItems","operationItems","operationPhaseItems","producesItems","handlerItems","implementationItems","operationImplementationItems","queryItems","performerItems","constraintItems","reactionItems","invocationItems","triggerItems","reactionTriggerItems","specificationItems","policyItems","validateItems","actionItems","tableItems","templateItems","screenItems","candidate","scanDocument","lines","fences","fenceMap","lineIndex","withoutComment","textBefore","marker","generationChain","enclosingChain","inConcept","nearestEnclosingLine","generationEntries","generationCompletions","scope","category","continuationEntries","continuationResponseCompletions","symbols","responseEntries","exampleCompletions","responseCompletions","readEntries","commandReadCompletions","keyEntries","readModelKeyCompletions","dependencyEntries","dependencyTargetCompletions","importPath","refusal","refusalContext","member","contextVariableMatch","currentLine","effectiveIndent","subjectHeader","suffix","actionSubjectValueItems","actionSubjectItems","parentIndent","guarded","parent","guardedActionItems","actionArgumentItems","interactionChoiceItems","interactionActionItems","refusalItems","ruleContext","namedRuleContext","namedRuleImplementationItems","commandRuleItems","propertyOwner","propertyName","reservedProperty","match","afterPropertyType","afterQueryType","subjectModifier","subjectConcept","concept","subjectType","subjectTarget","attribute","afterSubjectType","keyModifier","modifierEntries","optionalTypeItems","step","specificationStepItems","enclosingLine","inlineEventItems","ruleItems","headers","enclosingHeaders","entries","expansion","structureCompletion"],"sources":["../../completion-planner.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { enclosingChain, enclosingHeaders, fenceMap, indentOf, nearestEnclosingLine, withoutComment } from './document-context';\nimport { refusalContext } from './refusal-context';\nimport { generationCompletions } from './generation-completions';\nimport { namedRuleContext } from './named-rule-context';\nimport { continuationResponseCompletions } from './continuation-responses';\nimport { responseCompletions } from './response-completions';\nimport { dependencyTargetCompletions } from './dependency-completions';\nimport { exampleCompletions } from './example-authoring';\nimport { DocumentSymbols, scanDocument } from './symbols';\nimport { structureCompletion } from './structure-completions';\nimport { getSubLanguage } from './sub-language-registry';\nimport * as items from './completion-items';\nimport * as scope from './scope-items';\nimport { CompletionEntry } from './completion-items';\nimport { purposeItems } from './purpose-items';\nimport { readModelKeyCompletions } from './read-model-key-completions';\nimport { commandReadCompletions } from './command-read-completions';\n\n// Matches a validation rule line ending in \"rule <Name>\" (optionally followed by a\n// message clause) - both the command form (\"<property> rule <Name>\") and the\n// concept implied-subject form (\"rule <Name>\"). Its first word is the property\n// name, not \"rule\", so it can't be recognized through the chain[0] keyword switch\n// the way \"on <EventType>\" or \"handler\" are - hence the dedicated regex check.\nconst productionRouteItem = { label: 'stream', insertText: 'stream ${1:Source.Stream}', documentation: 'Replace the whole command route for this event production. ESM v10.' };\n\nconst RULE_LINE_PATTERN = /(?:^|\\s)rule\\s+[A-Za-z_]\\w*(?:\\s+severity\\s+(?:information|warning|error))?(?:\\s+message\\s+.*)?$/;\n\nexport type CompletionPlan =\n | { kind: 'none' }\n | { kind: 'entries'; entries: CompletionEntry[] }\n | { kind: 'contextVariables'; replaceLength: number }\n | { kind: 'playFiles'; replaceLength: number }\n | { kind: 'policies' }\n | { kind: 'events' }\n | { kind: 'triggers' }\n | { kind: 'commands' }\n | { kind: 'producesTargets' }\n | { kind: 'screens' }\n | { kind: 'queries' }\n | { kind: 'types' };\n\n// What the position sits inside, beyond the keyword chain: the whole header of each enclosing block, so a\n// slice's type and a template's kind are known, and the document's own lines, so a declaration that may\n// appear once is not offered again.\nexport interface CompletionScope {\n headers: readonly string[];\n document: readonly string[];\n}\n\nconst declaredIn = (document: readonly string[], keyword: string) => document.some(line => new RegExp(`^${keyword}\\\\b`).test(line));\n\nfunction topLevelEntries(document: readonly string[]): CompletionEntry[] {\n const singularDeclarations = ['domain', 'authentication', 'onboarding', 'identity', 'context'];\n return items.topLevelItems.filter(item => !singularDeclarations.includes(item.label) || !declaredIn(document, item.label));\n}\n\nconst isTemplate = (header: string | undefined) => /^(?:screen|dialog)\\s+template\\b/.test(header ?? '');\n\n// A whole block as one completion entry. Continuation lines are indented relative to the line it is inserted on,\n// which is how the editors indent a multi-line snippet.\nfunction expansionEntry(text: string, indent: number): CompletionEntry {\n const relative = text.split('\\n').map((line, index) => (index === 0 ? line : line.slice(Math.min(indent, indentOf(line))))).join('\\n');\n const label = text.split('\\n')[0].trim();\n return { label, insertText: relative.replace(/[$}\\\\]/g, '\\\\$&'), documentation: 'Expands the whole block from what the command and its events declare.' };\n}\n\nexport function completionEntriesFor(chain: string[], where: CompletionScope = { headers: [], document: [] }): CompletionEntry[] {\n const construct = chain[0];\n if (construct === undefined || construct === 'domain') return topLevelEntries(where.document);\n const subLanguage = getSubLanguage(construct);\n if (subLanguage) return subLanguage.completions ?? [];\n const header = where.headers[0];\n switch (construct) {\n case 'purpose':\n return purposeItems;\n case 'module':\n return items.moduleItems;\n case 'feature':\n return items.featureItems;\n case 'slice':\n return items.sliceItemsFor(header?.split(/\\s+/)[1]);\n case 'concept':\n return /:\\s*Enum\\b/.test(header ?? '') ? [...items.conceptItems.filter(item => item.label !== 'validate checksum'), { label: 'enum member (numbered)', insertText: '${1:value} = ${2:0}', documentation: 'Every member must declare a unique int32 number. Keep published numbers unchanged; specifications name members, not numbers.' }] : items.conceptItems.filter(item => item.label !== 'validate checksum' || /:\\s*String\\b/.test(header ?? ''));\n case 'type':\n return items.typeItems;\n case 'command':\n return items.commandItems;\n case 'public':\n case 'event':\n return items.eventItems;\n case 'readmodel':\n return scope.readModelItems;\n case 'reducer':\n return scope.reducerItems;\n case 'form':\n return scope.formItems;\n case 'contribute':\n return scope.contributeItems;\n case 'behavior':\n return scope.behaviorItems;\n case 'persona':\n return scope.personaItems;\n case 'context':\n return items.applicationContextItems;\n case 'identity':\n return chain.includes('ui') ? scope.profileIdentityItems : items.identityItems;\n case 'authentication':\n return scope.authenticationItems;\n case 'onboarding':\n return scope.onboardingItems;\n case 'invite':\n return scope.inviteMemberItems;\n case 'legal':\n return scope.legalTermsItems;\n case 'emails':\n return scope.emailItems;\n case 'seed':\n return scope.seedItems;\n case 'theme':\n return scope.themeItems;\n case 'ui':\n return scope.uiProfileItems;\n case 'root':\n return chain.includes('ui') ? scope.profileRootTemplateItems : [];\n case 'appearance':\n return chain.includes('ui') ? scope.profileAppearanceItems : [];\n case 'sample':\n return chain.includes('ui') ? scope.profileSampleDataItems : scope.sampleDataItems;\n case 'shape':\n return chain[1] === 'sample' ? scope.sampleShapeItems : [];\n case 'on':\n case 'success':\n case 'failure':\n case 'confirm':\n return scope.outcomeItems;\n case 'layout':\n return scope.layoutItems;\n case 'navigation':\n return scope.navigationItems;\n case 'toolbar':\n return scope.toolbarItems;\n case 'statemachine':\n return items.stateMachineItems;\n case 'state':\n return items.stateItems;\n case 'workflow':\n return items.workflowItems;\n case 'system':\n return items.operationItems.filter(item => item.label === 'description');\n case 'operation':\n return items.operationItems;\n case 'execute':\n case 'compensate':\n return items.operationPhaseItems;\n case 'produces':\n return chain.includes('command') ? [...items.producesItems, productionRouteItem] : items.producesItems;\n case 'handler':\n return items.handlerItems;\n case 'implementation':\n return chain[1] === 'handler' ? items.implementationItems : ['execute', 'compensate'].includes(chain[1]) ? items.operationImplementationItems : [];\n case 'reads':\n return [{ label: 'by parts', insertText: 'by\\n ${1:part} = ${2:source}\\n ${3:part} = ${4:source}', documentation: 'Supply every composite read-model key part by name.' }];\n case 'query':\n return items.queryItems;\n case 'performer':\n return items.performerItems;\n case 'constraint':\n return items.constraintItems;\n case 'reaction':\n return items.reactionItems;\n case 'invokes':\n return chain.includes('reaction') ? items.invocationItems : [];\n case 'trigger':\n return items.triggerItems;\n case 'when':\n case 'every':\n case 'at':\n return chain.includes('reaction') ? items.reactionTriggerItems : [];\n case 'specification':\n return items.specificationItems;\n case 'policy':\n return items.policyItems;\n case 'validate':\n return chain.includes('concept') && /:\\s*String\\b/.test(where.headers.find(header => /^concept\\s/.test(header)) ?? '')\n ? [...items.validateItems, { label: 'checksum', insertText: 'checksum ${1|luhn,mod11,mod97|}', documentation: 'Exact trailing check digits over preceding ASCII digits. String concepts only; also validates inputs and stored values.' }]\n : items.validateItems;\n case 'action':\n return items.actionItems;\n case 'table':\n case 'summary':\n return items.tableItems;\n case 'screen':\n return isTemplate(header) ? scope.templateItems : items.screenItems;\n case 'dialog':\n return scope.templateItems;\n default:\n if (isTemplate(where.headers.find(candidate => isTemplate(candidate)))) return scope.templateItems;\n // Sections inside a screen expose the screen vocabulary.\n if (chain.includes('screen') || construct === 'section') return items.screenItems;\n if (chain.includes('produces')) return chain.includes('command') ? [...items.producesItems, productionRouteItem] : items.producesItems;\n return [];\n }\n}\n\n// Decides what to complete at a position, without any editor dependency — the\n// Monaco service and the VSCode extension both materialize the plan into items.\nexport function planCompletions(\n lines: string[],\n lineIndex: number,\n textBefore: string,\n symbols: DocumentSymbols = scanDocument(lines),\n): CompletionPlan {\n const fences = fenceMap(lines);\n if (fences[lineIndex] || withoutComment(textBefore).length < textBefore.length) return { kind: 'none' };\n if (/^\\s*concept\\s+[\\p{L}\\p{Mn}\\p{Nd}\\p{Pc}]+\\s*:\\s*\\w+\\s+(?:(?:pii|personal|secret)\\s+)*\\w*$/u.test(textBefore)) {\n return { kind: 'entries', entries: ['pii', 'secret'].filter(marker => !new RegExp(`\\\\b${marker}\\\\b`).test(textBefore)).map(marker => ({ label: marker, insertText: marker, documentation: marker === 'pii' ? 'personal data (GDPR Art. 4(1)); renders Chronicle [PII]' : 'Operational secret; renders [Encrypted] + [NotAudited].' })) };\n }\n const generationChain = enclosingChain(lines, fences, lineIndex, indentOf(textBefore));\n const inConcept = generationChain[0] === 'concept';\n if (generationChain[0] === 'generate' && generationChain[1] === 'concept' && /^generate\\s+rule\\s+/.test((nearestEnclosingLine(lines, fences, lineIndex, indentOf(textBefore)) ?? '').trim())) {\n return { kind: 'entries', entries: [\n { label: 'file', insertText: 'file ${1:Generator.cs}', documentation: 'The sole ValueGeneration source. Receives the provider-bound GenerationContext (Now, Tenant); returns String.' },\n { label: 'csharp', insertText: '```csharp\\n${1:return value;}\\n```', documentation: 'The sole ValueGeneration body. Reference execution requires fixtures; it never invokes this code.' },\n ] };\n }\n const generationEntries = inConcept || (generationChain[0] === 'validate' && generationChain[1] === 'concept') ? generationCompletions(lines, lineIndex, textBefore) : null;\n if (generationEntries !== null) return { kind: 'entries', entries: generationEntries };\n if (inConcept && /^\\s*(?:secret|sensitive|@sensitive)\\s+scope\\s+\\w*$/.test(textBefore)) {\n return { kind: 'entries', entries: ['subject', 'namespace', 'global'].map(scope => ({ label: scope, insertText: scope, documentation: 'Explicit secret encryption scope.' })) };\n }\n if (inConcept && /^\\s*(?:pii|personal|@pii)\\s+special\\s+\\w*$/.test(textBefore)) {\n return { kind: 'entries', entries: ['racialOrEthnicOrigin', 'politicalOpinions', 'religiousOrPhilosophicalBeliefs', 'tradeUnionMembership', 'genetic', 'biometric', 'health', 'sexLifeOrSexualOrientation'].map(category => ({ label: category, insertText: category, documentation: 'GDPR Art. 9(1) special category.' })) };\n }\n const continuationEntries = continuationResponseCompletions(lines, lineIndex, textBefore, symbols);\n if (continuationEntries !== null) return { kind: 'entries', entries: continuationEntries };\n const responseEntries = exampleCompletions(lines, lineIndex, textBefore) ?? responseCompletions(lines, lineIndex, textBefore, scanDocument(lines));\n if (responseEntries !== null) return { kind: 'entries', entries: responseEntries };\n const readEntries = commandReadCompletions(lines, lineIndex, textBefore, symbols);\n if (readEntries !== null) return { kind: 'entries', entries: readEntries };\n const keyEntries = readModelKeyCompletions(lines, lineIndex, textBefore, symbols);\n if (keyEntries !== null) return { kind: 'entries', entries: keyEntries };\n const dependencyEntries = dependencyTargetCompletions(lines, lineIndex, textBefore, symbols);\n if (dependencyEntries !== null) return { kind: 'entries', entries: dependencyEntries };\n\n // Inside the quotes of a file import, what is wanted is a path - replacing what has been typed so far.\n const importPath = textBefore.match(/^\\s*import\\s+\"([^\"]*)$/);\n if (importPath) {\n return { kind: 'playFiles', replaceLength: importPath[1].length };\n }\n\n // A quote or a slash only asks for a completion inside an import path.\n if (/[\"/]$/.test(textBefore)) return { kind: 'none' };\n\n const refusal = refusalContext(lines, lineIndex, indentOf(lines[lineIndex] ?? textBefore));\n if (/\\$refusal\\.\\w*$/.test(textBefore)) {\n return { kind: 'entries', entries: refusal === undefined ? [] : ['reason', 'message', ...(/^on\\s+refused\\s+by\\s+constraint(?:\\s|$)/.test(refusal) ? ['constraint'] : [])].map(member => ({ label: member, insertText: member, documentation: 'String refusal value in branch event mappings; executable from ESM v19. Constraint is available only in a by constraint branch.' })) };\n }\n const contextVariableMatch = textBefore.match(/\\$[\\w.]*$/);\n if (contextVariableMatch) {\n return { kind: 'contextVariables', replaceLength: contextVariableMatch[0].length };\n }\n\n const currentLine = lines[lineIndex] ?? '';\n const effectiveIndent =\n textBefore.trim().length === 0 ? textBefore.length : indentOf(currentLine);\n const chain = enclosingChain(lines, fences, lineIndex, effectiveIndent);\n if (chain.includes('screen')) {\n const subjectHeader = /^\\s*(?:action\\s+(?:\"(?:[^\"\\\\]|\\\\.)*\"|\\$strings\\.[\\w.]+|[\\w.]+)|item\\s+\\w+\\s+action\\s+[\\w.]+)\\s+/;\n if (subjectHeader.test(textBefore)) {\n const suffix = textBefore.replace(subjectHeader, '');\n if (/^for\\s+\\w*$/.test(suffix)) return { kind: 'entries', entries: items.actionSubjectValueItems };\n if (/^(?:f|fo|for)?$/.test(suffix)) return { kind: 'entries', entries: items.actionSubjectItems };\n }\n let parentIndent = effectiveIndent;\n let guarded = false;\n for (let index = lineIndex - 1; index >= 0; index--) {\n if (fences[index]) continue;\n const parent = withoutComment(lines[index]);\n if (parent.trim().length === 0 || indentOf(parent) >= parentIndent) continue;\n parentIndent = indentOf(parent);\n if (/^\\s*action\\s+(?:\"|\\$strings\\.)/.test(parent)) { guarded = true; break; }\n if (/^\\s*screen\\b/.test(parent)) break;\n }\n if (guarded) {\n if (/^\\s*(?:when\\b.*|otherwise)\\s+execute\\s+[\\w.]*$/.test(textBefore)) return { kind: 'commands' };\n if (chain[0] === 'action') return { kind: 'entries', entries: items.guardedActionItems };\n if (['when', 'otherwise'].includes(chain[0])) {\n const parent = nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent) ?? '';\n return { kind: 'entries', entries: /\\bexecute\\s+[\\w.]+$/.test(parent) ? items.actionArgumentItems : [] };\n }\n }\n }\n if (['on', 'when', 'otherwise'].includes(chain[0])) {\n let parentIndent = effectiveIndent;\n for (let index = lineIndex - 1; index >= 0; index--) {\n if (fences[index]) continue;\n const parent = withoutComment(lines[index]);\n if (parent.trim().length === 0 || indentOf(parent) >= parentIndent) continue;\n parentIndent = indentOf(parent);\n if (/^\\s*on\\s+(?:click|double click|select|change)\\s*$/.test(parent)) {\n return { kind: 'entries', entries: chain[0] === 'on' ? items.interactionChoiceItems : items.interactionActionItems };\n }\n if (/^\\s*(?:screen|behavior|specification|reaction)\\b/.test(parent)) break;\n }\n }\n if (chain[0] === 'on' && refusal !== undefined) return { kind: 'entries', entries: items.refusalItems };\n const ruleContext = namedRuleContext(lines, lineIndex, effectiveIndent);\n if (ruleContext === 'implementation') return { kind: 'entries', entries: items.namedRuleImplementationItems };\n if (ruleContext === 'rule') return { kind: 'entries', entries: items.commandRuleItems };\n\n const propertyOwner = ['public', 'event', 'command', 'type', 'readmodel', 'trigger', 'when', 'every', 'at'].includes(chain[0]) ||\n (chain[0] === 'produces' && /^produces\\s+event\\b/.test(nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent) ?? ''));\n const propertyName = textBefore.trimStart().split(/\\s+/)[0];\n const reservedProperty = (chain[0] === 'command' && ['reads', 'authorize', 'produces'].includes(propertyName)) ||\n (chain[0] === 'event' && propertyName === 'tag') ||\n (['trigger', 'when', 'every', 'at'].includes(chain[0]) && ['description', 'file', 'reads', 'produces', 'invokes'].includes(propertyName));\n const optionalPrefix = (match: RegExpMatchArray | null) => match !== null && 'optional'.startsWith(match[1]);\n const afterPropertyType = propertyOwner && !reservedProperty && optionalPrefix(textBefore.match(/^\\s*@?[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?\\s+(\\w*)$/));\n const afterQueryType = (chain[0] === 'query' && optionalPrefix(textBefore.match(/^\\s*(?:by|filter)\\s+[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?\\s+(\\w*)$/))) ||\n optionalPrefix(textBefore.match(/^\\s*query\\s+[A-Za-z_]\\w*\\s*=>\\s*(?:observable\\s+)?[\\w.]+(?:\\[\\])?\\s+(\\w*)$/));\n const eventPropertyOwner = chain[0] === 'event' || (chain[0] === 'produces' && /^produces\\s+event\\b/.test(nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent) ?? ''));\n const subjectModifier = eventPropertyOwner && !reservedProperty ? textBefore.match(/^\\s*@?[a-z_]\\w*\\s+([\\w.]+)\\s+(\\w*)$/) : null;\n const subjectConcept = symbols.concepts.find(concept => concept.name === subjectModifier?.[1]);\n const subjectType = subjectConcept?.primitive ?? subjectModifier?.[1];\n const subjectTarget = (subjectType === 'String' || subjectType === 'Uuid' || (subjectType === 'Int' && subjectConcept !== undefined)) &&\n !subjectConcept?.attributes.some(attribute => ['pii', 'personal', 'secret', 'sensitive'].includes(attribute.replace(/^@/, '')));\n const afterSubjectType = subjectModifier !== null && subjectTarget && 'subject'.startsWith(subjectModifier[2]);\n const keyModifier = chain[0] === 'readmodel' ? textBefore.match(/^\\s*@?[a-z_]\\w*\\s+[\\w.]+\\s+(\\w*)$/) : null;\n const modifierEntries = [\n ...(keyModifier && 'key'.startsWith(keyModifier[1]) ? [{ label: 'key', insertText: 'key', documentation: 'Declares a required scalar read-model key part. Explicit keys replace inference. Supply every part by name when looking up one instance.' }] : []),\n ...((afterPropertyType || afterQueryType) && !/=>\\s*observable\\s+$/.test(textBefore) ? items.optionalTypeItems : []),\n ...(afterSubjectType ? [{ label: 'subject', insertText: 'subject', documentation: 'One required scalar event data-subject identity; not pii or secret. Report-only lineage metadata (PLAY0270), no ESM or provider output yet.' }] : []),\n ];\n if (modifierEntries.length > 0) return { kind: 'entries', entries: modifierEntries };\n\n if (/\\bauthorize\\s+[\\w\\s]*$/.test(textBefore) || chain[0] === 'authorize') {\n return { kind: 'policies' };\n }\n if (/\\bwhen\\s+\\w*$/.test(textBefore) && chain.includes('reaction')) {\n return { kind: 'triggers' };\n }\n if (/\\bon\\s+\\w*$/.test(textBefore) && chain.includes('constraint')) {\n return { kind: 'events' };\n }\n if (/\\binvokes\\s+\\w*$/.test(textBefore) && chain.includes('reaction')) {\n return { kind: 'commands' };\n }\n if (/\\b(?:on|unique\\s+event)\\s+\\w*$/.test(textBefore) && chain[0] === 'constraint') {\n return { kind: 'events' };\n }\n if (/\\bproduces\\s+\\w*$/.test(textBefore)) {\n return { kind: 'producesTargets' };\n }\n if (/\\bnavigate\\s+to\\s+\\w*$/.test(textBefore)) {\n return { kind: 'screens' };\n }\n if (chain[0] === 'specification') {\n if (/^\\s*when\\s+query\\s+[\\w.]*$/.test(textBefore)) return { kind: 'queries' };\n const step = textBefore.match(/^\\s*(given|when|then)\\s+\\w*$/);\n if (step) return { kind: 'entries', entries: items.specificationStepItems[step[1] as 'given' | 'when' | 'then'] };\n }\n if (/\\b(?:via|then)\\s+query\\s+[\\w.]*$/.test(textBefore)) {\n return { kind: 'queries' };\n }\n if (\n (chain[0] === 'event' || chain[0] === 'command' || chain[0] === 'type') &&\n /^\\s+[a-z_]\\w*\\s+[\\w[\\]?]*$/.test(textBefore)\n ) {\n return { kind: 'types' };\n }\n if (chain[0] === 'query' && /^\\s+(?:by|filter)\\s+[a-z_]\\w*\\s+[\\w[\\]?]*$/.test(textBefore)) {\n return { kind: 'types' };\n }\n\n const enclosingLine = nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent);\n if (enclosingLine && /^produces\\s+operation\\b/.test(enclosingLine)) return { kind: 'entries', entries: items.operationItems };\n if (enclosingLine && /^produces\\s+event\\b/.test(enclosingLine)) {\n if (/^\\s+@?[a-z_]\\w*\\s+[\\w[\\]?]*$/.test(textBefore)) return { kind: 'types' };\n return { kind: 'entries', entries: chain.includes('command') ? [...items.inlineEventItems, productionRouteItem] : items.inlineEventItems };\n }\n if (enclosingLine && RULE_LINE_PATTERN.test(enclosingLine)) {\n return { kind: 'entries', entries: items.ruleItems };\n }\n\n const headers = enclosingHeaders(lines, fences, lineIndex, effectiveIndent);\n if (chain[0] === 'for' && chain.includes('seed')) return { kind: 'events' };\n const entries = completionEntriesFor(chain, { headers, document: lines });\n const expansion = chain[0] === 'command' ? structureCompletion(lines, lineIndex, ' '.repeat(effectiveIndent), '', symbols) : null;\n return { kind: 'entries', entries: expansion ? [expansionEntry(expansion.text, effectiveIndent), ...entries] : entries };\n}\n"],"mappings":"8iFA0BA,MAAMoE,EAAsB,CAAE,MAAO,SAAU,WAAY,4BAA6B,cAAe,qEAAsE,EAEvKC,GAAoB,mGAwBpB,YAAc,EAA6B,IAAoBC,EAAS,KAAK,GAAY,OAAO,IAAIC,EAAQ,IAAI,CAAC,CAAC,KAAKC,CAAI,CAAC,EAElI,SAAS,gBAAgB,EAAgD,CACrE,IAAMC,EAAuB,CAAC,SAAU,iBAAkB,aAAc,WAAY,SAAS,EAC7F,OAAAC,GAA2B,OAAO,GAAQ,CAACD,EAAqB,SAASE,EAAK,KAAK,GAAK,CAAC,WAAWL,EAAUK,EAAK,KAAK,CAAC,CAC7H,CAEA,MAAM,WAAc,GAA+B,kCAAkC,KAAKC,GAAU,EAAE,EAItG,SAAS,eAAe,EAAc,EAAiC,CACnE,IAAMC,EAAWC,EAAK,MAAM;CAAI,CAAC,CAAC,KAAK,EAAM,IAAWC,IAAU,EAAIP,EAAOA,EAAK,MAAM,KAAK,IAAIQ,EAAQC,EAAST,CAAI,CAAC,CAAC,CAAE,CAAC,CAAC,KAAK;CAAI,EAErI,MAAO,CAAE,MADKM,EAAK,MAAM;CAAI,CAAC,CAAC,EAAE,CAAC,KACrB,EAAG,WAAYD,EAAS,QAAQ,UAAW,MAAM,EAAG,cAAe,uEAAwE,CAC5J,CAEA,SAAgB,qBAAqB,EAAiB,EAAyB,CAAE,QAAS,CAAC,EAAG,SAAU,CAAC,CAAE,EAAsB,CAC7H,IAAMK,EAAYC,EAAM,GACxB,GAAID,IAAc,IAAA,IAAaA,IAAc,SAAU,OAAO,gBAAgBE,EAAM,QAAQ,EAC5F,IAAMC,EAAcC,GAAeJ,CAAS,EAC5C,GAAIG,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E0E,EAAYzI,EAAM,KAAO,UAAY0I,GAAoB3E,EAAOG,EAAW,IAAI,OAAO8B,CAAe,EAAG,GAAIhB,CAAO,EAAI,KAC7H,MAAO,CAAE,KAAM,UAAW,QAASyD,EAAY,CAAC,eAAeA,EAAU,KAAMzC,CAAe,EAAG,GAAGwC,CAAO,EAAIA,CAAQ,CAC3H"}
1
+ {"version":3,"file":"completion-planner.js","names":["items.moduleItems","items.featureItems","items.sliceItemsFor","items.typeItems","items.commandItems","items.eventItems","scope.readModelItems","scope.reducerItems","scope.formItems","scope.contributeItems","scope.behaviorItems","scope.personaItems","items.applicationContextItems","scope.profileIdentityItems","items.identityItems","scope.authenticationItems","scope.onboardingItems","scope.inviteMemberItems","scope.legalTermsItems","scope.emailItems","scope.seedItems","scope.themeItems","scope.uiProfileItems","scope.profileRootTemplateItems","scope.profileAppearanceItems","scope.profileSampleDataItems","scope.sampleDataItems","scope.sampleShapeItems","scope.outcomeItems","scope.layoutItems","scope.navigationItems","scope.toolbarItems","items.stateMachineItems","items.stateItems","items.workflowItems","items.operationItems","items.operationPhaseItems","items.producesItems","items.handlerItems","items.implementationItems","items.operationImplementationItems","items.queryItems","items.performerItems","items.constraintItems","items.reactionItems","items.invocationItems","items.triggerItems","items.reactionTriggerItems","items.specificationItems","items.policyItems","items.validateItems","items.actionItems","items.tableItems","scope.templateItems","items.screenItems","items.actionSubjectValueItems","items.actionSubjectItems","items.guardedActionItems","items.actionArgumentItems","items.interactionChoiceItems","items.interactionActionItems","items.refusalItems","items.namedRuleImplementationItems","items.commandRuleItems","items.optionalTypeItems","items.specificationStepItems","items.inlineEventItems","items.ruleItems","productionRouteItem","RULE_LINE_PATTERN","document","keyword","line","singularDeclarations","topLevelItems","item","header","relative","text","index","indent","indentOf","construct","chain","where","subLanguage","getSubLanguage","purposeItems","moduleScopeItems","featureScopeItems","sliceItemsFor","conceptItems","typeItems","commandItems","eventItems","readModelItems","reducerItems","formItems","contributeItems","behaviorItems","personaItems","applicationContextItems","profileIdentityItems","identityItems","authenticationItems","onboardingItems","inviteMemberItems","legalTermsItems","emailItems","seedItems","themeItems","uiProfileItems","profileRootTemplateItems","profileAppearanceItems","profileSampleDataItems","sampleDataItems","sampleShapeItems","outcomeItems","layoutItems","navigationItems","toolbarItems","stateMachineItems","stateItems","workflowItems","operationItems","operationPhaseItems","producesItems","handlerItems","implementationItems","operationImplementationItems","queryItems","performerItems","constraintItems","reactionItems","invocationItems","triggerItems","reactionTriggerItems","specificationItems","policyItems","validateItems","actionItems","tableItems","templateItems","screenItems","candidate","scanDocument","lines","fences","fenceMap","lineIndex","withoutComment","textBefore","marker","generationChain","enclosingChain","inConcept","nearestEnclosingLine","generationEntries","generationCompletions","scope","category","continuationEntries","continuationResponseCompletions","symbols","responseEntries","exampleCompletions","responseCompletions","readEntries","commandReadCompletions","keyEntries","readModelKeyCompletions","dependencyEntries","dependencyTargetCompletions","importPath","refusal","refusalContext","member","contextVariableMatch","currentLine","effectiveIndent","subjectHeader","suffix","actionSubjectValueItems","actionSubjectItems","parentIndent","guarded","parent","guardedActionItems","actionArgumentItems","interactionChoiceItems","interactionActionItems","refusalItems","ruleContext","namedRuleContext","namedRuleImplementationItems","commandRuleItems","propertyOwner","propertyName","reservedProperty","match","afterPropertyType","afterQueryType","subjectModifier","subjectConcept","concept","subjectType","subjectTarget","attribute","afterSubjectType","keyModifier","modifierEntries","optionalTypeItems","step","specificationStepItems","enclosingLine","inlineEventItems","ruleItems","headers","enclosingHeaders","entries","expansion","structureCompletion"],"sources":["../../completion-planner.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { enclosingChain, enclosingHeaders, fenceMap, indentOf, nearestEnclosingLine, withoutComment } from './document-context';\nimport { refusalContext } from './refusal-context';\nimport { generationCompletions } from './generation-completions';\nimport { namedRuleContext } from './named-rule-context';\nimport { continuationResponseCompletions } from './continuation-responses';\nimport { responseCompletions } from './response-completions';\nimport { dependencyTargetCompletions } from './dependency-completions';\nimport { exampleCompletions } from './example-authoring';\nimport { DocumentSymbols, scanDocument } from './symbols';\nimport { structureCompletion } from './structure-completions';\nimport { getSubLanguage } from './sub-language-registry';\nimport * as items from './completion-items';\nimport * as scope from './scope-items';\nimport { CompletionEntry } from './completion-items';\nimport { purposeItems } from './purpose-items';\nimport { readModelKeyCompletions } from './read-model-key-completions';\nimport { commandReadCompletions } from './command-read-completions';\n\n// Matches a validation rule line ending in \"rule <Name>\" (optionally followed by a\n// message clause) - both the command form (\"<property> rule <Name>\") and the\n// concept implied-subject form (\"rule <Name>\"). Its first word is the property\n// name, not \"rule\", so it can't be recognized through the chain[0] keyword switch\n// the way \"on <EventType>\" or \"handler\" are - hence the dedicated regex check.\nconst productionRouteItem = { label: 'stream', insertText: 'stream ${1:Source.Stream}', documentation: 'Replace the whole command route for this event production. ESM v10.' };\n\nconst RULE_LINE_PATTERN = /(?:^|\\s)rule\\s+[A-Za-z_]\\w*(?:\\s+severity\\s+(?:information|warning|error))?(?:\\s+message\\s+.*)?$/;\n\nexport type CompletionPlan =\n | { kind: 'none' }\n | { kind: 'entries'; entries: CompletionEntry[] }\n | { kind: 'contextVariables'; replaceLength: number }\n | { kind: 'playFiles'; replaceLength: number }\n | { kind: 'policies' }\n | { kind: 'events' }\n | { kind: 'triggers' }\n | { kind: 'commands' }\n | { kind: 'producesTargets' }\n | { kind: 'screens' }\n | { kind: 'queries' }\n | { kind: 'types' };\n\n// What the position sits inside, beyond the keyword chain: the whole header of each enclosing block, so a\n// slice's type and a template's kind are known, and the document's own lines, so a declaration that may\n// appear once is not offered again.\nexport interface CompletionScope {\n headers: readonly string[];\n document: readonly string[];\n}\n\nconst declaredIn = (document: readonly string[], keyword: string) => document.some(line => new RegExp(`^${keyword}\\\\b`).test(line));\n\nfunction topLevelEntries(document: readonly string[]): CompletionEntry[] {\n const singularDeclarations = ['domain', 'authentication', 'onboarding', 'identity', 'context'];\n return items.topLevelItems.filter(item => !singularDeclarations.includes(item.label) || !declaredIn(document, item.label));\n}\n\nconst isTemplate = (header: string | undefined) => /^(?:screen|dialog)\\s+template\\b/.test(header ?? '');\n\n// A whole block as one completion entry. Continuation lines are indented relative to the line it is inserted on,\n// which is how the editors indent a multi-line snippet.\nfunction expansionEntry(text: string, indent: number): CompletionEntry {\n const relative = text.split('\\n').map((line, index) => (index === 0 ? line : line.slice(Math.min(indent, indentOf(line))))).join('\\n');\n const label = text.split('\\n')[0].trim();\n return { label, insertText: relative.replace(/[$}\\\\]/g, '\\\\$&'), documentation: 'Expands the whole block from what the command and its events declare.' };\n}\n\nexport function completionEntriesFor(chain: string[], where: CompletionScope = { headers: [], document: [] }): CompletionEntry[] {\n const construct = chain[0];\n if (construct === undefined || construct === 'domain') return topLevelEntries(where.document);\n const subLanguage = getSubLanguage(construct);\n if (subLanguage) return subLanguage.completions ?? [];\n const header = where.headers[0];\n switch (construct) {\n case 'purpose':\n return purposeItems;\n case 'module':\n return items.moduleItems;\n case 'feature':\n return items.featureItems;\n case 'slice':\n return items.sliceItemsFor(header?.split(/\\s+/)[1]);\n case 'concept':\n return /:\\s*Enum\\b/.test(header ?? '') ? [...items.conceptItems.filter(item => item.label !== 'validate checksum'), { label: 'enum member (numbered)', insertText: '${1:value} = ${2:0}', documentation: 'Every member must declare a unique int32 number. Keep published numbers unchanged; specifications name members, not numbers.' }] : items.conceptItems.filter(item => item.label !== 'validate checksum' || /:\\s*String\\b/.test(header ?? ''));\n case 'type':\n return items.typeItems;\n case 'command':\n return items.commandItems;\n case 'public':\n case 'event':\n return items.eventItems;\n case 'readmodel':\n return scope.readModelItems;\n case 'reducer':\n return scope.reducerItems;\n case 'form':\n return scope.formItems;\n case 'contribute':\n return scope.contributeItems;\n case 'behavior':\n return scope.behaviorItems;\n case 'persona':\n return scope.personaItems;\n case 'context':\n return items.applicationContextItems;\n case 'identity':\n return chain.includes('ui') ? scope.profileIdentityItems : items.identityItems;\n case 'authentication':\n return scope.authenticationItems;\n case 'onboarding':\n return scope.onboardingItems;\n case 'invite':\n return scope.inviteMemberItems;\n case 'legal':\n return scope.legalTermsItems;\n case 'emails':\n return scope.emailItems;\n case 'seed':\n return scope.seedItems;\n case 'theme':\n return scope.themeItems;\n case 'ui':\n return scope.uiProfileItems;\n case 'root':\n return chain.includes('ui') ? scope.profileRootTemplateItems : [];\n case 'appearance':\n return chain.includes('ui') ? scope.profileAppearanceItems : [];\n case 'sample':\n return chain.includes('ui') ? scope.profileSampleDataItems : scope.sampleDataItems;\n case 'shape':\n return chain[1] === 'sample' ? scope.sampleShapeItems : [];\n case 'on':\n case 'success':\n case 'failure':\n case 'confirm':\n return scope.outcomeItems;\n case 'layout':\n return scope.layoutItems;\n case 'navigation':\n return scope.navigationItems;\n case 'toolbar':\n return scope.toolbarItems;\n case 'statemachine':\n return items.stateMachineItems;\n case 'state':\n return items.stateItems;\n case 'workflow':\n return items.workflowItems;\n case 'system':\n return items.operationItems.filter(item => item.label === 'description');\n case 'operation':\n return items.operationItems;\n case 'execute':\n case 'compensate':\n return items.operationPhaseItems;\n case 'produces':\n return chain.includes('command') ? [...items.producesItems, productionRouteItem] : items.producesItems;\n case 'handler':\n return items.handlerItems;\n case 'implementation':\n return chain[1] === 'handler' ? items.implementationItems : ['execute', 'compensate'].includes(chain[1]) ? items.operationImplementationItems : [];\n case 'reads':\n return [{ label: 'by parts', insertText: 'by\\n ${1:part} = ${2:source}\\n ${3:part} = ${4:source}', documentation: 'Supply every composite read-model key part by name.' }];\n case 'query':\n return items.queryItems;\n case 'performer':\n return items.performerItems;\n case 'constraint':\n return items.constraintItems;\n case 'reaction':\n return items.reactionItems;\n case 'invokes':\n return chain.includes('reaction') ? items.invocationItems : [];\n case 'trigger':\n return items.triggerItems;\n case 'when':\n case 'every':\n case 'at':\n return chain.includes('reaction') ? items.reactionTriggerItems : [];\n case 'specification':\n return items.specificationItems;\n case 'policy':\n return items.policyItems;\n case 'validate':\n return chain.includes('concept') && /:\\s*String\\b/.test(where.headers.find(header => /^concept\\s/.test(header)) ?? '')\n ? [...items.validateItems, { label: 'checksum', insertText: 'checksum ${1|luhn,mod11,mod97|}', documentation: 'Exact trailing check digits over preceding ASCII digits. String concepts only; also validates inputs and stored values.' }]\n : items.validateItems;\n case 'action':\n return items.actionItems;\n case 'table':\n case 'summary':\n return items.tableItems;\n case 'screen':\n return isTemplate(header) ? scope.templateItems : items.screenItems;\n case 'dialog':\n return scope.templateItems;\n default:\n if (isTemplate(where.headers.find(candidate => isTemplate(candidate)))) return scope.templateItems;\n // Sections inside a screen expose the screen vocabulary.\n if (chain.includes('screen') || construct === 'section') return items.screenItems;\n if (chain.includes('produces')) return chain.includes('command') ? [...items.producesItems, productionRouteItem] : items.producesItems;\n return [];\n }\n}\n\n// Decides what to complete at a position, without any editor dependency — the\n// Monaco service and the VSCode extension both materialize the plan into items.\nexport function planCompletions(\n lines: string[],\n lineIndex: number,\n textBefore: string,\n symbols: DocumentSymbols = scanDocument(lines),\n): CompletionPlan {\n const fences = fenceMap(lines);\n if (fences[lineIndex] || withoutComment(textBefore).length < textBefore.length) return { kind: 'none' };\n if (/^\\s*concept\\s+[\\p{L}\\p{Mn}\\p{Nd}\\p{Pc}]+\\s*:\\s*\\w+\\s+(?:(?:pii|personal|secret)\\s+)*\\w*$/u.test(textBefore)) {\n return { kind: 'entries', entries: ['pii', 'secret'].filter(marker => !new RegExp(`\\\\b${marker}\\\\b`).test(textBefore)).map(marker => ({ label: marker, insertText: marker, documentation: marker === 'pii' ? 'personal data (GDPR Art. 4(1)); renders Chronicle [PII]' : 'Operational secret; renders [Encrypted] + [NotAudited].' })) };\n }\n const generationChain = enclosingChain(lines, fences, lineIndex, indentOf(textBefore));\n const inConcept = generationChain[0] === 'concept';\n if (generationChain[0] === 'generate' && generationChain[1] === 'concept' && /^generate\\s+rule\\s+/.test((nearestEnclosingLine(lines, fences, lineIndex, indentOf(textBefore)) ?? '').trim())) {\n return { kind: 'entries', entries: [\n { label: 'file', insertText: 'file ${1:Generator.cs}', documentation: 'The sole ValueGeneration source. Receives the provider-bound GenerationContext (Now, Tenant); returns String.' },\n { label: 'csharp', insertText: '```csharp\\n${1:return value;}\\n```', documentation: 'The sole ValueGeneration body. Reference execution requires fixtures; it never invokes this code.' },\n ] };\n }\n const generationEntries = inConcept || (generationChain[0] === 'validate' && generationChain[1] === 'concept') ? generationCompletions(lines, lineIndex, textBefore) : null;\n if (generationEntries !== null) return { kind: 'entries', entries: generationEntries };\n if (inConcept && /^\\s*(?:secret|sensitive|@sensitive)\\s+scope\\s+\\w*$/.test(textBefore)) {\n return { kind: 'entries', entries: ['subject', 'namespace', 'global'].map(scope => ({ label: scope, insertText: scope, documentation: 'Explicit secret encryption scope.' })) };\n }\n if (inConcept && /^\\s*(?:pii|personal|@pii)\\s+special\\s+\\w*$/.test(textBefore)) {\n return { kind: 'entries', entries: ['racialOrEthnicOrigin', 'politicalOpinions', 'religiousOrPhilosophicalBeliefs', 'tradeUnionMembership', 'genetic', 'biometric', 'health', 'sexLifeOrSexualOrientation'].map(category => ({ label: category, insertText: category, documentation: 'GDPR Art. 9(1) special category.' })) };\n }\n const continuationEntries = continuationResponseCompletions(lines, lineIndex, textBefore, symbols);\n if (continuationEntries !== null) return { kind: 'entries', entries: continuationEntries };\n const responseEntries = exampleCompletions(lines, lineIndex, textBefore) ?? responseCompletions(lines, lineIndex, textBefore, scanDocument(lines));\n if (responseEntries !== null) return { kind: 'entries', entries: responseEntries };\n const readEntries = commandReadCompletions(lines, lineIndex, textBefore, symbols);\n if (readEntries !== null) return { kind: 'entries', entries: readEntries };\n const keyEntries = readModelKeyCompletions(lines, lineIndex, textBefore, symbols);\n if (keyEntries !== null) return { kind: 'entries', entries: keyEntries };\n const dependencyEntries = dependencyTargetCompletions(lines, lineIndex, textBefore, symbols);\n if (dependencyEntries !== null) return { kind: 'entries', entries: dependencyEntries };\n\n // Inside the quotes of a file import, what is wanted is a path - replacing what has been typed so far.\n const importPath = textBefore.match(/^\\s*import\\s+\"([^\"]*)$/);\n if (importPath) {\n return { kind: 'playFiles', replaceLength: importPath[1].length };\n }\n\n // A quote or a slash only asks for a completion inside an import path.\n if (/[\"/]$/.test(textBefore)) return { kind: 'none' };\n\n const refusal = refusalContext(lines, lineIndex, indentOf(lines[lineIndex] ?? textBefore));\n if (/\\$refusal\\.\\w*$/.test(textBefore)) {\n return { kind: 'entries', entries: refusal === undefined ? [] : ['reason', 'message', ...(/^on\\s+refused\\s+by\\s+constraint(?:\\s|$)/.test(refusal) ? ['constraint'] : [])].map(member => ({ label: member, insertText: member, documentation: 'String refusal value in branch event mappings; executable from ESM v19. Constraint is available only in a by constraint branch.' })) };\n }\n const contextVariableMatch = textBefore.match(/\\$[\\w.]*$/);\n if (contextVariableMatch) {\n return { kind: 'contextVariables', replaceLength: contextVariableMatch[0].length };\n }\n\n const currentLine = lines[lineIndex] ?? '';\n const effectiveIndent =\n textBefore.trim().length === 0 ? textBefore.length : indentOf(currentLine);\n const chain = enclosingChain(lines, fences, lineIndex, effectiveIndent);\n if (chain.includes('screen')) {\n const subjectHeader = /^\\s*(?:action\\s+(?:\"(?:[^\"\\\\]|\\\\.)*\"|\\$strings\\.[\\w.]+|[\\w.]+)|item\\s+\\w+\\s+action\\s+[\\w.]+)\\s+/;\n if (subjectHeader.test(textBefore)) {\n const suffix = textBefore.replace(subjectHeader, '');\n if (/^for\\s+\\w*$/.test(suffix)) return { kind: 'entries', entries: items.actionSubjectValueItems };\n if (/^(?:f|fo|for)?$/.test(suffix)) return { kind: 'entries', entries: items.actionSubjectItems };\n }\n let parentIndent = effectiveIndent;\n let guarded = false;\n for (let index = lineIndex - 1; index >= 0; index--) {\n if (fences[index]) continue;\n const parent = withoutComment(lines[index]);\n if (parent.trim().length === 0 || indentOf(parent) >= parentIndent) continue;\n parentIndent = indentOf(parent);\n if (/^\\s*action\\s+(?:\"|\\$strings\\.)/.test(parent)) { guarded = true; break; }\n if (/^\\s*screen\\b/.test(parent)) break;\n }\n if (guarded) {\n if (/^\\s*(?:when\\b.*|otherwise)\\s+execute\\s+[\\w.]*$/.test(textBefore)) return { kind: 'commands' };\n if (chain[0] === 'action') return { kind: 'entries', entries: items.guardedActionItems };\n if (['when', 'otherwise'].includes(chain[0])) {\n const parent = nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent) ?? '';\n return { kind: 'entries', entries: /\\bexecute\\s+[\\w.]+$/.test(parent) ? items.actionArgumentItems : [] };\n }\n }\n }\n if (['on', 'when', 'otherwise'].includes(chain[0])) {\n let parentIndent = effectiveIndent;\n for (let index = lineIndex - 1; index >= 0; index--) {\n if (fences[index]) continue;\n const parent = withoutComment(lines[index]);\n if (parent.trim().length === 0 || indentOf(parent) >= parentIndent) continue;\n parentIndent = indentOf(parent);\n if (/^\\s*on\\s+(?:click|double click|select|change)\\s*$/.test(parent)) {\n return { kind: 'entries', entries: chain[0] === 'on' ? items.interactionChoiceItems : items.interactionActionItems };\n }\n if (/^\\s*(?:screen|behavior|specification|reaction)\\b/.test(parent)) break;\n }\n }\n if (chain[0] === 'on' && refusal !== undefined) return { kind: 'entries', entries: items.refusalItems };\n const ruleContext = namedRuleContext(lines, lineIndex, effectiveIndent);\n if (ruleContext === 'implementation') return { kind: 'entries', entries: items.namedRuleImplementationItems };\n if (ruleContext === 'rule') return { kind: 'entries', entries: items.commandRuleItems };\n\n const propertyOwner = ['public', 'event', 'command', 'type', 'readmodel', 'trigger', 'when', 'every', 'at'].includes(chain[0]) ||\n (chain[0] === 'produces' && /^produces\\s+event\\b/.test(nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent) ?? ''));\n const propertyName = textBefore.trimStart().split(/\\s+/)[0];\n const reservedProperty = (chain[0] === 'command' && ['reads', 'authorize', 'produces'].includes(propertyName)) ||\n (chain[0] === 'event' && propertyName === 'tag') ||\n (['trigger', 'when', 'every', 'at'].includes(chain[0]) && ['description', 'file', 'reads', 'produces', 'invokes'].includes(propertyName));\n const optionalPrefix = (match: RegExpMatchArray | null) => match !== null && 'optional'.startsWith(match[1]);\n const afterPropertyType = propertyOwner && !reservedProperty && optionalPrefix(textBefore.match(/^\\s*@?[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?\\s+(\\w*)$/));\n const afterQueryType = (chain[0] === 'query' && optionalPrefix(textBefore.match(/^\\s*(?:by|filter)\\s+[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?\\s+(\\w*)$/))) ||\n optionalPrefix(textBefore.match(/^\\s*query\\s+[A-Za-z_]\\w*\\s*=>\\s*(?:observable\\s+)?[\\w.]+(?:\\[\\])?\\s+(\\w*)$/));\n const eventPropertyOwner = chain[0] === 'event' || (chain[0] === 'produces' && /^produces\\s+event\\b/.test(nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent) ?? ''));\n const subjectModifier = eventPropertyOwner && !reservedProperty ? textBefore.match(/^\\s*@?[a-z_]\\w*\\s+([\\w.]+)\\s+(\\w*)$/) : null;\n const subjectConcept = symbols.concepts.find(concept => concept.name === subjectModifier?.[1]);\n const subjectType = subjectConcept?.primitive ?? subjectModifier?.[1];\n const subjectTarget = (subjectType === 'String' || subjectType === 'Uuid' || (subjectType === 'Int' && subjectConcept !== undefined)) &&\n !subjectConcept?.attributes.some(attribute => ['pii', 'personal', 'secret', 'sensitive'].includes(attribute.replace(/^@/, '')));\n const afterSubjectType = subjectModifier !== null && subjectTarget && 'subject'.startsWith(subjectModifier[2]);\n const keyModifier = chain[0] === 'readmodel' ? textBefore.match(/^\\s*@?[a-z_]\\w*\\s+[\\w.]+\\s+(\\w*)$/) : null;\n const modifierEntries = [\n ...(keyModifier && 'key'.startsWith(keyModifier[1]) ? [{ label: 'key', insertText: 'key', documentation: 'Declares a required scalar read-model key part. Explicit keys replace inference. Supply every part by name when looking up one instance.' }] : []),\n ...((afterPropertyType || afterQueryType) && !/=>\\s*observable\\s+$/.test(textBefore) ? items.optionalTypeItems : []),\n ...(afterSubjectType ? [{ label: 'subject', insertText: 'subject', documentation: 'One required scalar event data-subject identity; not pii or secret. Report-only lineage metadata (PLAY0270), no ESM or provider output yet.' }] : []),\n ];\n if (modifierEntries.length > 0) return { kind: 'entries', entries: modifierEntries };\n\n if (/\\bauthorize\\s+[\\w\\s]*$/.test(textBefore) || chain[0] === 'authorize') {\n return { kind: 'policies' };\n }\n if (/\\bwhen\\s+\\w*$/.test(textBefore) && chain.includes('reaction')) {\n return { kind: 'triggers' };\n }\n if (/\\bon\\s+\\w*$/.test(textBefore) && chain.includes('constraint')) {\n return { kind: 'events' };\n }\n if (/\\binvokes\\s+\\w*$/.test(textBefore) && chain.includes('reaction')) {\n return { kind: 'commands' };\n }\n if (/\\b(?:on|unique\\s+event)\\s+\\w*$/.test(textBefore) && chain[0] === 'constraint') {\n return { kind: 'events' };\n }\n if (/\\bproduces\\s+\\w*$/.test(textBefore)) {\n return { kind: 'producesTargets' };\n }\n if (/\\bnavigate\\s+to\\s+\\w*$/.test(textBefore)) {\n return { kind: 'screens' };\n }\n if (chain[0] === 'specification') {\n if (/^\\s*when\\s+query\\s+[\\w.]*$/.test(textBefore)) return { kind: 'queries' };\n const step = textBefore.match(/^\\s*(given|when|then)\\s+\\w*$/);\n if (step) return { kind: 'entries', entries: items.specificationStepItems[step[1] as 'given' | 'when' | 'then'] };\n }\n if (/\\b(?:via|then)\\s+query\\s+[\\w.]*$/.test(textBefore)) {\n return { kind: 'queries' };\n }\n if (\n (chain[0] === 'event' || chain[0] === 'command' || chain[0] === 'type') &&\n /^\\s+[a-z_]\\w*\\s+[\\w[\\]?]*$/.test(textBefore)\n ) {\n return { kind: 'types' };\n }\n if (chain[0] === 'query' && /^\\s+(?:by|filter)\\s+[a-z_]\\w*\\s+[\\w[\\]?]*$/.test(textBefore)) {\n return { kind: 'types' };\n }\n\n const enclosingLine = nearestEnclosingLine(lines, fences, lineIndex, effectiveIndent);\n if (enclosingLine && /^produces\\s+operation\\b/.test(enclosingLine)) return { kind: 'entries', entries: items.operationItems };\n if (enclosingLine && /^produces\\s+event\\b/.test(enclosingLine)) {\n if (/^\\s+@?[a-z_]\\w*\\s+[\\w[\\]?]*$/.test(textBefore)) return { kind: 'types' };\n return { kind: 'entries', entries: chain.includes('command') ? [...items.inlineEventItems, productionRouteItem] : items.inlineEventItems };\n }\n if (enclosingLine && RULE_LINE_PATTERN.test(enclosingLine)) {\n return { kind: 'entries', entries: items.ruleItems };\n }\n\n const headers = enclosingHeaders(lines, fences, lineIndex, effectiveIndent);\n if (chain[0] === 'for' && chain.includes('seed')) return { kind: 'events' };\n const entries = completionEntriesFor(chain, { headers, document: lines });\n const expansion = chain[0] === 'command' ? structureCompletion(lines, lineIndex, ' '.repeat(effectiveIndent), '', symbols) : null;\n return { kind: 'entries', entries: expansion ? [expansionEntry(expansion.text, effectiveIndent), ...entries] : entries };\n}\n"],"mappings":"A,8iFA0BA,MAAMoE,EAAsB,CAAE,MAAO,SAAU,WAAY,4BAA6B,cAAe,qEAAsE,EAEvKC,GAAoB,mGAwBpB,YAAc,EAA6B,IAAoBC,EAAS,KAAK,GAAY,OAAO,IAAIC,EAAQ,IAAI,CAAC,CAAC,KAAKC,CAAI,CAAC,EAElI,SAAS,gBAAgB,EAAgD,CACrE,IAAMC,EAAuB,CAAC,SAAU,iBAAkB,aAAc,WAAY,SAAS,EAC7F,OAAAC,EAA2B,OAAO,GAAQ,CAACD,EAAqB,SAASE,EAAK,KAAK,GAAK,CAAC,WAAWL,EAAUK,EAAK,KAAK,CAAC,CAC7H,CAEA,MAAM,WAAc,GAA+B,kCAAkC,KAAKC,GAAU,EAAE,EAItG,SAAS,eAAe,EAAc,EAAiC,CACnE,IAAMC,EAAWC,EAAK,MAAM;CAAI,CAAC,CAAC,KAAK,EAAM,IAAWC,IAAU,EAAIP,EAAOA,EAAK,MAAM,KAAK,IAAIQ,EAAQC,EAAST,CAAI,CAAC,CAAC,CAAE,CAAC,CAAC,KAAK;CAAI,EAErI,MAAO,CAAE,MADKM,EAAK,MAAM;CAAI,CAAC,CAAC,EAAE,CAAC,KACrB,EAAG,WAAYD,EAAS,QAAQ,UAAW,MA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a,EACrD,MAAO,CAAE,KAAM,UAAW,QAASnJ,EAAgB,EAGvD,IAAMsJ,EAAUC,EAAiBxE,EAAOC,EAAQE,EAAW8B,CAAe,EAC1E,GAAIhG,EAAM,KAAO,OAASA,EAAM,SAAS,MAAM,EAAG,MAAO,CAAE,KAAM,QAAS,EAC1E,IAAMwI,EAAU,qBAAqBxI,EAAO,CAAE,UAAS,SAAU+D,CAAM,CAAC,EAClE0E,EAAYzI,EAAM,KAAO,UAAY0I,GAAoB3E,EAAOG,EAAW,IAAI,OAAO8B,CAAe,EAAG,GAAIhB,CAAO,EAAI,KAC7H,MAAO,CAAE,KAAM,UAAW,QAASyD,EAAY,CAAC,eAAeA,EAAU,KAAMzC,CAAe,EAAG,GAAGwC,CAAO,EAAIA,CAAQ,CAC3H,C"}
@@ -1,2 +1,2 @@
1
- import"./_virtual/_virtual/_rolldown/runtime.js";import{primitiveTypes as e}from"./language.js";import{typeReferenceSymbol as t,typeReferenceText as n}from"./TypeReferenceSymbol.js";import{contextVariableEntries as r,producesItems as i}from"./completion-items.js";import{knownEventNames as a,knownTriggerNames as o,symbolsForBuffer as s}from"./symbols.js";import{responseCompletions as c}from"./response-completions.js";import{exampleCompletions as l}from"./example-authoring.js";import{operationCompletions as u}from"./operation-authoring.js";import{eventSourceCompletions as d}from"./event-source-authoring.js";import{planCompletions as f}from"./completion-planner.js";function createCompletionProvider(p,m={}){return{triggerCharacters:[` `,`$`,`@`,`.`,`"`,`/`],provideCompletionItems(h,g){let _=h.getLinesContent(),v=g.lineNumber-1,y=(_[v]??``).substring(0,g.column-1),b=m.application?.(h),x=s(_,b),S=l(_,v,y,x)??d(_,v,y,x)??u(_,v,y,x)??c(_,v,y,x),C=S===null?f(_,v,y,x):{kind:`entries`,entries:S};if(C.kind===`none`)return{suggestions:[]};let w=h.getWordUntilPosition(g),T=new p.Range(g.lineNumber,w.startColumn,g.lineNumber,w.endColumn),E=p.languages.CompletionItemKind,D=p.languages.CompletionItemInsertTextRule.InsertAsSnippet,snippet=e=>({label:e.label,kind:e.insertText.includes(`$`)?E.Snippet:E.Keyword,insertText:e.insertText,insertTextRules:D,documentation:e.documentation,sortText:e.sortText,detail:e.detail,range:T}),symbolItem=(e,t,n)=>({label:e,kind:t,insertText:e,detail:n,range:T}),eventNames=()=>{let e=new Set(x.events.filter(e=>e.inline).map(e=>e.name));return[...new Set(a(x))].map(t=>symbolItem(t,E.Event,e.has(t)?`inline event`:`event`))};switch(C.kind){case`playFiles`:{let e=new p.Range(g.lineNumber,g.column-C.replaceLength,g.lineNumber,g.column);return{suggestions:(m.playFiles?.(h)??[]).map(t=>({label:t,kind:t.includes(`*`)?E.Folder:E.File,insertText:t,range:e}))}}case`contextVariables`:{let e=new p.Range(g.lineNumber,g.column-C.replaceLength,g.lineNumber,w.endColumn);return{suggestions:r(x).map(t=>({...snippet(t),range:e}))}}case`policies`:return{suggestions:x.policies.map(e=>symbolItem(e.name,E.Reference,`policy`))};case`events`:return{suggestions:eventNames()};case`triggers`:return{suggestions:[...new Set(o(x))].map(e=>symbolItem(e,E.Event,`trigger`))};case`commands`:return{suggestions:x.commands.map(e=>symbolItem(e.name,E.Method,`command`))};case`producesTargets`:return{suggestions:[...i.map(snippet),...eventNames()]};case`screens`:return{suggestions:x.screens.map(e=>symbolItem(e.name,E.Interface,`screen`))};case`queries`:return{suggestions:x.queries.map(e=>symbolItem(e.name,E.Function,`query => ${n(e.returnTypeReference??t(e.returnType))}`))};case`types`:return{suggestions:[...x.concepts.map(e=>symbolItem(e.name,E.Class,`concept : ${e.primitive}${e.attributes.length?` `+e.attributes.join(` `):``}`)),...x.types.map(e=>symbolItem(e.name,E.Struct,`type (${e.properties.length} properties)`)),...e.map(e=>symbolItem(e,E.Struct,`primitive`))]};case`entries`:return{suggestions:C.entries.map(snippet)}}}}}export{createCompletionProvider};
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";import{typeReferenceSymbol as e,typeReferenceText as t}from"./TypeReferenceSymbol.js";import{primitiveTypes as n}from"./language.js";import{knownEventNames as r,knownTriggerNames as i,symbolsForBuffer as a}from"./symbols.js";import{responseCompletions as o}from"./response-completions.js";import{exampleCompletions as s}from"./example-authoring.js";import{operationCompletions as c}from"./operation-authoring.js";import{eventSourceCompletions as l}from"./event-source-authoring.js";import{planCompletions as u}from"./completion-planner.js";import{contextVariableEntries as d,producesItems as f}from"./completion-items.js";function createCompletionProvider(p,m={}){return{triggerCharacters:[` `,`$`,`@`,`.`,`"`,`/`],provideCompletionItems(h,g){let _=h.getLinesContent(),v=g.lineNumber-1,y=(_[v]??``).substring(0,g.column-1),b=m.application?.(h),x=a(_,b),S=s(_,v,y,x)??l(_,v,y,x)??c(_,v,y,x)??o(_,v,y,x),C=S===null?u(_,v,y,x):{kind:`entries`,entries:S};if(C.kind===`none`)return{suggestions:[]};let w=h.getWordUntilPosition(g),T=new p.Range(g.lineNumber,w.startColumn,g.lineNumber,w.endColumn),E=p.languages.CompletionItemKind,D=p.languages.CompletionItemInsertTextRule.InsertAsSnippet,snippet=e=>({label:e.label,kind:e.insertText.includes(`$`)?E.Snippet:E.Keyword,insertText:e.insertText,insertTextRules:D,documentation:e.documentation,sortText:e.sortText,detail:e.detail,range:T}),symbolItem=(e,t,n)=>({label:e,kind:t,insertText:e,detail:n,range:T}),eventNames=()=>{let e=new Set(x.events.filter(e=>e.inline).map(e=>e.name));return[...new Set(r(x))].map(t=>symbolItem(t,E.Event,e.has(t)?`inline event`:`event`))};switch(C.kind){case`playFiles`:{let e=new p.Range(g.lineNumber,g.column-C.replaceLength,g.lineNumber,g.column);return{suggestions:(m.playFiles?.(h)??[]).map(t=>({label:t,kind:t.includes(`*`)?E.Folder:E.File,insertText:t,range:e}))}}case`contextVariables`:{let e=new p.Range(g.lineNumber,g.column-C.replaceLength,g.lineNumber,w.endColumn);return{suggestions:d(x).map(t=>({...snippet(t),range:e}))}}case`policies`:return{suggestions:x.policies.map(e=>symbolItem(e.name,E.Reference,`policy`))};case`events`:return{suggestions:eventNames()};case`triggers`:return{suggestions:[...new Set(i(x))].map(e=>symbolItem(e,E.Event,`trigger`))};case`commands`:return{suggestions:x.commands.map(e=>symbolItem(e.name,E.Method,`command`))};case`producesTargets`:return{suggestions:[...f.map(snippet),...eventNames()]};case`screens`:return{suggestions:x.screens.map(e=>symbolItem(e.name,E.Interface,`screen`))};case`queries`:return{suggestions:x.queries.map(n=>symbolItem(n.name,E.Function,`query => ${t(n.returnTypeReference??e(n.returnType))}`))};case`types`:return{suggestions:[...x.concepts.map(e=>symbolItem(e.name,E.Class,`concept : ${e.primitive}${e.attributes.length?` `+e.attributes.join(` `):``}`)),...x.types.map(e=>symbolItem(e.name,E.Struct,`type (${e.properties.length} properties)`)),...n.map(e=>symbolItem(e,E.Struct,`primitive`))]};case`entries`:return{suggestions:C.entries.map(snippet)}}}}}export{createCompletionProvider};
2
2
  //# sourceMappingURL=completions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"completions.js","names":["lines","model","lineIndex","position","textBefore","application","options","symbols","symbolsForBuffer","responseEntries","exampleCompletions","eventSourceCompletions","operationCompletions","responseCompletions","plan","planCompletions","word","range","monaco","kinds","asSnippet","entry","name","inlineNames","event","knownEventNames","pathRange","path","variableRange","contextVariableEntries","policy","knownTriggerNames","command","producesItems","screen","query","typeReferenceText","typeReferenceSymbol","concept","type","primitiveTypes","primitive"],"sources":["../../completions.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { editor, languages } from 'monaco-editor';\nimport { typeReferenceSymbol, typeReferenceText } from './TypeReferenceSymbol';\nimport { Monaco, primitiveTypes } from './language';\nimport { DocumentSymbols, knownEventNames, knownTriggerNames, symbolsForBuffer } from './symbols';\nimport { responseCompletions } from './response-completions';\nimport { exampleCompletions } from './example-authoring';\nimport { operationCompletions } from './operation-authoring';\nimport { eventSourceCompletions } from './event-source-authoring';\nimport { planCompletions } from './completion-planner';\nimport { contextVariableEntries, producesItems, CompletionEntry } from './completion-items';\n\n// What a host knows beyond the one model the editor holds.\nexport interface CompletionOptions {\n // The paths a file import written in the model can name, relative to the model's folder - typically\n // importablePaths over the host's .play files. Without it, an import path is not completed.\n playFiles?: (model: editor.ITextModel) => readonly string[];\n application?: (model: editor.ITextModel) => DocumentSymbols;\n // Notify after changing application documents or placement, even when this buffer is unchanged.\n onDidChangeApplication?: (listener: () => void) => { dispose(): void };\n}\n\nexport function createCompletionProvider(monaco: Monaco, options: CompletionOptions = {}): languages.CompletionItemProvider {\n return {\n triggerCharacters: [' ', '$', '@', '.', '\"', '/'],\n\n provideCompletionItems(model, position) {\n const lines = model.getLinesContent();\n const lineIndex = position.lineNumber - 1;\n const currentLine = lines[lineIndex] ?? '';\n const textBefore = currentLine.substring(0, position.column - 1);\n const application = options.application?.(model);\n const symbols = symbolsForBuffer(lines, application);\n const responseEntries = exampleCompletions(lines, lineIndex, textBefore, symbols) ?? eventSourceCompletions(lines, lineIndex, textBefore, symbols) ?? operationCompletions(lines, lineIndex, textBefore, symbols) ?? responseCompletions(lines, lineIndex, textBefore, symbols);\n const plan = responseEntries === null ? planCompletions(lines, lineIndex, textBefore, symbols) : { kind: 'entries' as const, entries: responseEntries };\n if (plan.kind === 'none') return { suggestions: [] };\n\n const word = model.getWordUntilPosition(position);\n const range = new monaco.Range(\n position.lineNumber,\n word.startColumn,\n position.lineNumber,\n word.endColumn,\n );\n const kinds = monaco.languages.CompletionItemKind;\n const asSnippet = monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet;\n\n const snippet = (entry: CompletionEntry): languages.CompletionItem => ({\n label: entry.label,\n kind: entry.insertText.includes('$') ? kinds.Snippet : kinds.Keyword,\n insertText: entry.insertText,\n insertTextRules: asSnippet,\n documentation: entry.documentation,\n sortText: entry.sortText,\n detail: entry.detail,\n range,\n });\n const symbolItem = (\n name: string,\n kind: languages.CompletionItemKind,\n detail: string,\n ): languages.CompletionItem => ({\n label: name,\n kind,\n insertText: name,\n detail,\n range,\n });\n const eventNames = () => {\n const inlineNames = new Set(symbols.events.filter(event => event.inline).map(event => event.name));\n return [...new Set(knownEventNames(symbols))].map((name) => symbolItem(name, kinds.Event, inlineNames.has(name) ? 'inline event' : 'event'));\n };\n\n switch (plan.kind) {\n case 'playFiles': {\n const pathRange = new monaco.Range(\n position.lineNumber,\n position.column - plan.replaceLength,\n position.lineNumber,\n position.column,\n );\n return {\n suggestions: (options.playFiles?.(model) ?? []).map((path) => ({\n label: path,\n kind: path.includes('*') ? kinds.Folder : kinds.File,\n insertText: path,\n range: pathRange,\n })),\n };\n }\n case 'contextVariables': {\n const variableRange = new monaco.Range(\n position.lineNumber,\n position.column - plan.replaceLength,\n position.lineNumber,\n word.endColumn,\n );\n return {\n suggestions: contextVariableEntries(symbols).map((entry) => ({\n ...snippet(entry),\n range: variableRange,\n })),\n };\n }\n case 'policies':\n return {\n suggestions: symbols.policies.map((policy) =>\n symbolItem(policy.name, kinds.Reference, 'policy'),\n ),\n };\n case 'events':\n return { suggestions: eventNames() };\n case 'triggers':\n return {\n suggestions: [...new Set(knownTriggerNames(symbols))].map((name) =>\n symbolItem(name, kinds.Event, 'trigger'),\n ),\n };\n case 'commands':\n return {\n suggestions: symbols.commands.map((command) =>\n symbolItem(command.name, kinds.Method, 'command'),\n ),\n };\n case 'producesTargets':\n return { suggestions: [...producesItems.map(snippet), ...eventNames()] };\n case 'screens':\n return {\n suggestions: symbols.screens.map((screen) =>\n symbolItem(screen.name, kinds.Interface, 'screen'),\n ),\n };\n case 'queries':\n return {\n suggestions: symbols.queries.map((query) =>\n symbolItem(query.name, kinds.Function, `query => ${typeReferenceText(query.returnTypeReference ?? typeReferenceSymbol(query.returnType))}`),\n ),\n };\n case 'types':\n return {\n suggestions: [\n ...symbols.concepts.map((concept) =>\n symbolItem(\n concept.name,\n kinds.Class,\n `concept : ${concept.primitive}${concept.attributes.length ? ' ' + concept.attributes.join(' ') : ''}`,\n ),\n ),\n ...symbols.types.map((type) =>\n symbolItem(\n type.name,\n kinds.Struct,\n `type (${type.properties.length} properties)`,\n ),\n ),\n ...primitiveTypes.map((primitive) =>\n symbolItem(primitive, kinds.Struct, 'primitive'),\n ),\n ],\n };\n case 'entries':\n return { suggestions: plan.entries.map(snippet) };\n }\n },\n };\n}\n"],"mappings":"+pBAwBA,SAAgB,yBAAyB,EAAgB,EAA6B,CAAC,EAAqC,CACxH,MAAO,CACH,kBAAmB,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EAEhD,uBAAuB,EAAO,EAAU,CACpC,IAAMA,EAAQC,EAAM,gBAAgB,EAC9BC,EAAYC,EAAS,WAAa,EAElCC,GADcJ,EAAME,IAAc,GAAA,CACT,UAAU,EAAGC,EAAS,OAAS,CAAC,EACzDE,EAAcC,EAAQ,cAAcL,CAAK,EACzCM,EAAUC,EAAiBR,EAAOK,CAAW,EAC7CI,EAAkBC,EAAmBV,EAAOE,EAAWE,EAAYG,CAAO,GAAKI,EAAuBX,EAAOE,EAAWE,EAAYG,CAAO,GAAKK,EAAqBZ,EAAOE,EAAWE,EAAYG,CAAO,GAAKM,EAAoBb,EAAOE,EAAWE,EAAYG,CAAO,EACxQO,EAAOL,IAAoB,KAAOM,EAAgBf,EAAOE,EAAWE,EAAYG,CAAO,EAAI,CAAE,KAAM,UAAoB,QAASE,CAAgB,EACtJ,GAAIK,EAAK,OAAS,OAAQ,MAAO,CAAE,YAAa,CAAC,CAAE,EAEnD,IAAME,EAAOf,EAAM,qBAAqBE,CAAQ,EAC1Cc,EAAQ,IAAIC,EAAO,MACrBf,EAAS,WACTa,EAAK,YACLb,EAAS,WACTa,EAAK,SACT,EACMG,EAAQD,EAAO,UAAU,mBACzBE,EAAYF,EAAO,UAAU,6BAA6B,gBAE1D,QAAW,IAAsD,CACnE,MAAOG,EAAM,MACb,KAAMA,EAAM,WAAW,SAAS,GAAG,EAAIF,EAAM,QAAUA,EAAM,QAC7D,WAAYE,EAAM,WAClB,gBAAiBD,EACjB,cAAeC,EAAM,cACrB,SAAUA,EAA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CAAC,CAAC,IAAK,GACvD,WAAWe,EAAMH,EAAM,MAAO,SAAS,CAC3C,CACJ,EACJ,IAAK,WACD,MAAO,CACH,YAAaZ,EAAQ,SAAS,IAAK,GAC/B,WAAWyB,EAAQ,KAAMb,EAAM,OAAQ,SAAS,CACpD,CACJ,EACJ,IAAK,kBACD,MAAO,CAAE,YAAa,CAAC,GAAGc,EAAc,IAAI,OAAO,EAAG,GAAG,WAAW,CAAC,CAAE,EAC3E,IAAK,UACD,MAAO,CACH,YAAa1B,EAAQ,QAAQ,IAAK,GAC9B,WAAW2B,EAAO,KAAMf,EAAM,UAAW,QAAQ,CACrD,CACJ,EACJ,IAAK,UACD,MAAO,CACH,YAAaZ,EAAQ,QAAQ,IAAK,GAC9B,WAAW4B,EAAM,KAAMhB,EAAM,SAAU,YAAYiB,EAAkBD,EAAM,qBAAuBE,EAAoBF,EAAM,UAAU,CAAC,GAAG,CAC9I,CACJ,EACJ,IAAK,QACD,MAAO,CACH,YAAa,CACT,GAAG5B,EAAQ,SAAS,IAAK,GACrB,WACI+B,EAAQ,KACRnB,EAAM,MACN,aAAamB,EAAQ,YAAYA,EAAQ,WAAW,OAAS,IAAMA,EAAQ,WAAW,KAAK,GAAG,EAAI,IACtG,CACJ,EACA,GAAG/B,EAAQ,MAAM,IAAK,GAClB,WACIgC,EAAK,KACLpB,EAAM,OACN,SAASoB,EAAK,WAAW,OAAO,aACpC,CACJ,EACA,GAAGC,EAAe,IAAK,GACnB,WAAWC,EAAWtB,EAAM,OAAQ,WAAW,CACnD,CACJ,CACJ,EACJ,IAAK,UACD,MAAO,CAAE,YAAaL,EAAK,QAAQ,IAAI,OAAO,CAAE,CACxD,CACJ,CACJ,CACJ"}
1
+ {"version":3,"file":"completions.js","names":["lines","model","lineIndex","position","textBefore","application","options","symbols","symbolsForBuffer","responseEntries","exampleCompletions","eventSourceCompletions","operationCompletions","responseCompletions","plan","planCompletions","word","range","monaco","kinds","asSnippet","entry","name","inlineNames","event","knownEventNames","pathRange","path","variableRange","contextVariableEntries","policy","knownTriggerNames","command","producesItems","screen","query","typeReferenceText","typeReferenceSymbol","concept","type","primitiveTypes","primitive"],"sources":["../../completions.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { editor, languages } from 'monaco-editor';\nimport { typeReferenceSymbol, typeReferenceText } from './TypeReferenceSymbol';\nimport { Monaco, primitiveTypes } from './language';\nimport { DocumentSymbols, knownEventNames, knownTriggerNames, symbolsForBuffer } from './symbols';\nimport { responseCompletions } from './response-completions';\nimport { exampleCompletions } from './example-authoring';\nimport { operationCompletions } from './operation-authoring';\nimport { eventSourceCompletions } from './event-source-authoring';\nimport { planCompletions } from './completion-planner';\nimport { contextVariableEntries, producesItems, CompletionEntry } from './completion-items';\n\n// What a host knows beyond the one model the editor holds.\nexport interface CompletionOptions {\n // The paths a file import written in the model can name, relative to the model's folder - typically\n // importablePaths over the host's .play files. Without it, an import path is not completed.\n playFiles?: (model: editor.ITextModel) => readonly string[];\n application?: (model: editor.ITextModel) => DocumentSymbols;\n // Notify after changing application documents or placement, even when this buffer is unchanged.\n onDidChangeApplication?: (listener: () => void) => { dispose(): void };\n}\n\nexport function createCompletionProvider(monaco: Monaco, options: CompletionOptions = {}): languages.CompletionItemProvider {\n return {\n triggerCharacters: [' ', '$', '@', '.', '\"', '/'],\n\n provideCompletionItems(model, position) {\n const lines = model.getLinesContent();\n const lineIndex = position.lineNumber - 1;\n const currentLine = lines[lineIndex] ?? '';\n const textBefore = currentLine.substring(0, position.column - 1);\n const application = options.application?.(model);\n const symbols = symbolsForBuffer(lines, application);\n const responseEntries = exampleCompletions(lines, lineIndex, textBefore, symbols) ?? eventSourceCompletions(lines, lineIndex, textBefore, symbols) ?? operationCompletions(lines, lineIndex, textBefore, symbols) ?? responseCompletions(lines, lineIndex, textBefore, symbols);\n const plan = responseEntries === null ? planCompletions(lines, lineIndex, textBefore, symbols) : { kind: 'entries' as const, entries: responseEntries };\n if (plan.kind === 'none') return { suggestions: [] };\n\n const word = model.getWordUntilPosition(position);\n const range = new monaco.Range(\n position.lineNumber,\n word.startColumn,\n position.lineNumber,\n word.endColumn,\n );\n const kinds = monaco.languages.CompletionItemKind;\n const asSnippet = monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet;\n\n const snippet = (entry: CompletionEntry): languages.CompletionItem => ({\n label: entry.label,\n kind: entry.insertText.includes('$') ? kinds.Snippet : kinds.Keyword,\n insertText: entry.insertText,\n insertTextRules: asSnippet,\n documentation: entry.documentation,\n sortText: entry.sortText,\n detail: entry.detail,\n range,\n });\n const symbolItem = (\n name: string,\n kind: languages.CompletionItemKind,\n detail: string,\n ): languages.CompletionItem => ({\n label: name,\n kind,\n insertText: name,\n detail,\n range,\n });\n const eventNames = () => {\n const inlineNames = new Set(symbols.events.filter(event => event.inline).map(event => event.name));\n return [...new Set(knownEventNames(symbols))].map((name) => symbolItem(name, kinds.Event, inlineNames.has(name) ? 'inline event' : 'event'));\n };\n\n switch (plan.kind) {\n case 'playFiles': {\n const pathRange = new monaco.Range(\n position.lineNumber,\n position.column - plan.replaceLength,\n position.lineNumber,\n position.column,\n );\n return {\n suggestions: (options.playFiles?.(model) ?? []).map((path) => ({\n label: path,\n kind: path.includes('*') ? kinds.Folder : kinds.File,\n insertText: path,\n range: pathRange,\n })),\n };\n }\n case 'contextVariables': {\n const variableRange = new monaco.Range(\n position.lineNumber,\n position.column - plan.replaceLength,\n position.lineNumber,\n word.endColumn,\n );\n return {\n suggestions: contextVariableEntries(symbols).map((entry) => ({\n ...snippet(entry),\n range: variableRange,\n })),\n };\n }\n case 'policies':\n return {\n suggestions: symbols.policies.map((policy) =>\n symbolItem(policy.name, kinds.Reference, 'policy'),\n ),\n };\n case 'events':\n return { suggestions: eventNames() };\n case 'triggers':\n return {\n suggestions: [...new Set(knownTriggerNames(symbols))].map((name) =>\n symbolItem(name, kinds.Event, 'trigger'),\n ),\n };\n case 'commands':\n return {\n suggestions: symbols.commands.map((command) =>\n symbolItem(command.name, kinds.Method, 'command'),\n ),\n };\n case 'producesTargets':\n return { suggestions: [...producesItems.map(snippet), ...eventNames()] };\n case 'screens':\n return {\n suggestions: symbols.screens.map((screen) =>\n symbolItem(screen.name, kinds.Interface, 'screen'),\n ),\n };\n case 'queries':\n return {\n suggestions: symbols.queries.map((query) =>\n symbolItem(query.name, kinds.Function, `query => ${typeReferenceText(query.returnTypeReference ?? typeReferenceSymbol(query.returnType))}`),\n ),\n };\n case 'types':\n return {\n suggestions: [\n ...symbols.concepts.map((concept) =>\n symbolItem(\n concept.name,\n kinds.Class,\n `concept : ${concept.primitive}${concept.attributes.length ? ' ' + concept.attributes.join(' ') : ''}`,\n ),\n ),\n ...symbols.types.map((type) =>\n symbolItem(\n type.name,\n kinds.Struct,\n `type (${type.properties.length} properties)`,\n ),\n ),\n ...primitiveTypes.map((primitive) =>\n symbolItem(primitive, kinds.Struct, 'primitive'),\n ),\n ],\n };\n case 'entries':\n return { suggestions: plan.entries.map(snippet) };\n }\n },\n };\n}\n"],"mappings":"A,+pBAwBA,SAAgB,yBAAyB,EAAgB,EAA6B,CAAC,EAAqC,CACxH,MAAO,CACH,kBAAmB,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,GAAG,EAEhD,uBAAuB,EAAO,EAAU,CACpC,IAAMA,EAAQC,EAAM,gBAAgB,EAC9BC,EAAYC,EAAS,WAAa,EAElCC,GADcJ,EAAME,IAAc,GAAA,CACT,UAAU,EAAGC,EAAS,OAAS,CAAC,EACzDE,EAAcC,EAAQ,cAAcL,CAAK,EACzCM,EAAUC,EAAiBR,EAAOK,CAAW,EAC7CI,EAAkBC,EAAmBV,EAAOE,EAAWE,EAAYG,CAAO,GAAKI,EAAuBX,EAAOE,EAAWE,EAAYG,CAAO,GAAKK,EAAqBZ,EAAOE,EAAWE,EAAYG,CAAO,GAAKM,EAAoBb,EAAOE,EAAWE,EAAYG,CAAO,EACxQO,EAAOL,IAAoB,KAAOM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MA,EAAQ,WAAW,KAAK,GAAG,EAAI,IACtG,CACJ,EACA,GAAG/B,EAAQ,MAAM,IAAK,GAClB,WACIgC,EAAK,KACLpB,EAAM,OACN,SAASoB,EAAK,WAAW,OAAO,aACpC,CACJ,EACA,GAAGC,EAAe,IAAK,GACnB,WAAWC,EAAWtB,EAAM,OAAQ,WAAW,CACnD,CACJ,CACJ,EACJ,IAAK,UACD,MAAO,CAAE,YAAaL,EAAK,QAAQ,IAAI,OAAO,CAAE,CACxD,CACJ,CACJ,CACJ,C"}
@@ -1,2 +1,2 @@
1
- import"./_virtual/_virtual/_rolldown/runtime.js";import{typeReferenceText as e}from"./TypeReferenceSymbol.js";import{pattern as t}from"./compiler/Text/patterns.js";import"./compiler/index.js";import{responseAnalysis as n}from"./response-analysis.js";function fieldsAt(e,t,r){return n(e,r?.authoringDocuments??r?.authoringSources,r?.authoringPlacement,r?.authoringPath,r?.authoringPlacementResolved).continuationResponses?.get(t)??[]}function continuationResponseCompletions(n,r,i,a){if(!t(`^\\s*(?:with\\s+\\w+\\s+from\\s+|on\\s+submit\\s+navigate\\s+to\\s+[\\w.]+\\s+by\\s+)\\w*$`).test(i))return null;let o=fieldsAt(n,r,a);return o.length===0?null:o.map(t=>({label:t.name,insertText:t.name,detail:e(t.type),sortText:`0_${t.name}`,documentation:`Returned by ${t.command} on success`}))}function continuationResponseHover(n,r,i,a,o,s){let c=n[r]??``,l=t(`^(\\s*(?:with\\s+\\w+\\s+from\\s+|on\\s+submit\\s+navigate\\s+to\\s+[\\w.]+\\s+by\\s+|set\\s+[\\w.$]+\\s+to\\s+|notify\\s+(?:info|warning|error)\\s+|confirm\\s+))([A-Za-z_]\\w*)\\s*(?:\\/\\/.*)?$`).exec(c);if(!l||l[2]!==i||a!==l[1].length+1||o!==a+i.length)return null;let u=fieldsAt(n,r,s).find(e=>e.name===i);return u?`**${u.name}** — ${e(u.type)}. Returned by ${u.command} on success.`:null}export{continuationResponseCompletions,continuationResponseHover};
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";import"./compiler/index.js";import{pattern as e}from"./compiler/Text/patterns.js";import{responseAnalysis as t}from"./response-analysis.js";import{typeReferenceText as n}from"./TypeReferenceSymbol.js";function fieldsAt(e,n,r){return t(e,r?.authoringDocuments??r?.authoringSources,r?.authoringPlacement,r?.authoringPath,r?.authoringPlacementResolved).continuationResponses?.get(n)??[]}function continuationResponseCompletions(t,r,i,a){if(!e(`^\\s*(?:with\\s+\\w+\\s+from\\s+|on\\s+submit\\s+navigate\\s+to\\s+[\\w.]+\\s+by\\s+)\\w*$`).test(i))return null;let o=fieldsAt(t,r,a);return o.length===0?null:o.map(e=>({label:e.name,insertText:e.name,detail:n(e.type),sortText:`0_${e.name}`,documentation:`Returned by ${e.command} on success`}))}function continuationResponseHover(t,r,i,a,o,s){let c=t[r]??``,l=e(`^(\\s*(?:with\\s+\\w+\\s+from\\s+|on\\s+submit\\s+navigate\\s+to\\s+[\\w.]+\\s+by\\s+|set\\s+[\\w.$]+\\s+to\\s+|notify\\s+(?:info|warning|error)\\s+|confirm\\s+))([A-Za-z_]\\w*)\\s*(?:\\/\\/.*)?$`).exec(c);if(!l||l[2]!==i||a!==l[1].length+1||o!==a+i.length)return null;let u=fieldsAt(t,r,s).find(e=>e.name===i);return u?`**${u.name}** — ${n(u.type)}. Returned by ${u.command} on success.`:null}export{continuationResponseCompletions,continuationResponseHover};
2
2
  //# sourceMappingURL=continuation-responses.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"continuation-responses.js","names":["responseAnalysis","lines","symbols","line","pattern","before","fields","field","typeReferenceText","content","operand","word","startColumn","endColumn"],"sources":["../../continuation-responses.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { pattern } from '@cratis/screenplay-compiler';\nimport { responseAnalysis } from './response-analysis';\nimport { DocumentSymbols } from './symbols';\nimport { CompletionEntry } from './completion-items';\nimport { typeReferenceText } from './TypeReferenceSymbol';\n\nfunction fieldsAt(lines: string[], line: number, symbols?: DocumentSymbols) {\n return responseAnalysis(lines, symbols?.authoringDocuments ?? symbols?.authoringSources, symbols?.authoringPlacement, symbols?.authoringPath, symbols?.authoringPlacementResolved).continuationResponses?.get(line) ?? [];\n}\n\nexport function continuationResponseCompletions(lines: string[], line: number, before: string, symbols: DocumentSymbols): CompletionEntry[] | null {\n if (!pattern(/^\\s*(?:with\\s+\\w+\\s+from\\s+|on\\s+submit\\s+navigate\\s+to\\s+[\\w.]+\\s+by\\s+)\\w*$/.source).test(before)) return null;\n const fields = fieldsAt(lines, line, symbols);\n return fields.length === 0 ? null : fields.map(field => ({ label: field.name, insertText: field.name, detail: typeReferenceText(field.type), sortText: `0_${field.name}`, documentation: `Returned by ${field.command} on success` }));\n}\n\nexport function continuationResponseHover(lines: string[], line: number, word: string, startColumn: number, endColumn: number, symbols?: DocumentSymbols): string | null {\n const content = lines[line] ?? '';\n const operand = pattern(/^(\\s*(?:with\\s+\\w+\\s+from\\s+|on\\s+submit\\s+navigate\\s+to\\s+[\\w.]+\\s+by\\s+|set\\s+[\\w.$]+\\s+to\\s+|notify\\s+(?:info|warning|error)\\s+|confirm\\s+))([A-Za-z_]\\w*)\\s*(?:\\/\\/.*)?$/.source).exec(content);\n if (!operand || operand[2] !== word || startColumn !== operand[1].length + 1 || endColumn !== startColumn + word.length) return null;\n const field = fieldsAt(lines, line, symbols).find(field => field.name === word);\n return field ? `**${field.name}** — ${typeReferenceText(field.type)}. Returned by ${field.command} on success.` : null;\n}\n"],"mappings":"0PASA,SAAS,SAAS,EAAiB,EAAc,EAA2B,CACxE,OAAOA,EAAiBC,EAAOC,GAAS,oBAAsBA,GAAS,iBAAkBA,GAAS,mBAAoBA,GAAS,cAAeA,GAAS,0BAA0B,CAAC,CAAC,uBAAuB,IAAIC,CAAI,GAAK,CAAC,CAC5N,CAEA,SAAgB,gCAAgC,EAAiB,EAAc,EAAgB,EAAoD,CAC/I,GAAI,CAACC,EAAQ,4FAAsF,CAAC,CAAC,KAAKC,CAAM,EAAG,OAAO,KAC1H,IAAMC,EAAS,SAASL,EAAOE,EAAMD,CAAO,EAC5C,OAAOI,EAAO,SAAW,EAAI,KAAOA,EAAO,IAAI,IAAU,CAAE,MAAOC,EAAM,KAAM,WAAYA,EAAM,KAAM,OAAQC,EAAkBD,EAAM,IAAI,EAAG,SAAU,KAAKA,EAAM,OAAQ,cAAe,eAAeA,EAAM,QAAQ,YAAa,EAAE,CACzO,CAEA,SAAgB,0BAA0B,EAAiB,EAAc,EAAc,EAAqB,EAAmB,EAA0C,CACrK,IAAME,EAAUR,EAAME,IAAS,GACzBO,EAAUN,EAAQ,qMAAqL,CAAC,CAAC,KAAKK,CAAO,EAC3N,GAAI,CAACC,GAAWA,EAAQ,KAAOC,GAAQC,IAAgBF,EAAQ,EAAE,CAAC,OAAS,GAAKG,IAAcD,EAAcD,EAAK,OAAQ,OAAO,KAChI,IAAMJ,EAAQ,SAASN,EAAOE,EAAMD,CAAO,CAAC,CAAC,KAAK,GAASK,EAAM,OAASI,CAAI,EAC9E,OAAOJ,EAAQ,KAAKA,EAAM,KAAK,OAAOC,EAAkBD,EAAM,IAAI,EAAE,gBAAgBA,EAAM,QAAQ,cAAgB,IACtH"}
1
+ {"version":3,"file":"continuation-responses.js","names":["responseAnalysis","lines","symbols","line","pattern","before","fields","field","typeReferenceText","content","operand","word","startColumn","endColumn"],"sources":["../../continuation-responses.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { pattern } from '@cratis/screenplay-compiler';\nimport { responseAnalysis } from './response-analysis';\nimport { DocumentSymbols } from './symbols';\nimport { CompletionEntry } from './completion-items';\nimport { typeReferenceText } from './TypeReferenceSymbol';\n\nfunction fieldsAt(lines: string[], line: number, symbols?: DocumentSymbols) {\n return responseAnalysis(lines, symbols?.authoringDocuments ?? symbols?.authoringSources, symbols?.authoringPlacement, symbols?.authoringPath, symbols?.authoringPlacementResolved).continuationResponses?.get(line) ?? [];\n}\n\nexport function continuationResponseCompletions(lines: string[], line: number, before: string, symbols: DocumentSymbols): CompletionEntry[] | null {\n if (!pattern(/^\\s*(?:with\\s+\\w+\\s+from\\s+|on\\s+submit\\s+navigate\\s+to\\s+[\\w.]+\\s+by\\s+)\\w*$/.source).test(before)) return null;\n const fields = fieldsAt(lines, line, symbols);\n return fields.length === 0 ? null : fields.map(field => ({ label: field.name, insertText: field.name, detail: typeReferenceText(field.type), sortText: `0_${field.name}`, documentation: `Returned by ${field.command} on success` }));\n}\n\nexport function continuationResponseHover(lines: string[], line: number, word: string, startColumn: number, endColumn: number, symbols?: DocumentSymbols): string | null {\n const content = lines[line] ?? '';\n const operand = pattern(/^(\\s*(?:with\\s+\\w+\\s+from\\s+|on\\s+submit\\s+navigate\\s+to\\s+[\\w.]+\\s+by\\s+|set\\s+[\\w.$]+\\s+to\\s+|notify\\s+(?:info|warning|error)\\s+|confirm\\s+))([A-Za-z_]\\w*)\\s*(?:\\/\\/.*)?$/.source).exec(content);\n if (!operand || operand[2] !== word || startColumn !== operand[1].length + 1 || endColumn !== startColumn + word.length) return null;\n const field = fieldsAt(lines, line, symbols).find(field => field.name === word);\n return field ? `**${field.name}** — ${typeReferenceText(field.type)}. Returned by ${field.command} on success.` : null;\n}\n"],"mappings":"A,0PASA,SAAS,SAAS,EAAiB,EAAc,EAA2B,CACxE,OAAOA,EAAiBC,EAAOC,GAAS,oBAAsBA,GAAS,iBAAkBA,GAAS,mBAAoBA,GAAS,cAAeA,GAAS,0BAA0B,CAAC,CAAC,uBAAuB,IAAIC,CAAI,GAAK,CAAC,CAC5N,CAEA,SAAgB,gCAAgC,EAAiB,EAAc,EAAgB,EAAoD,CAC/I,GAAI,CAACC,EAAQ,4FAAsF,CAAC,CAAC,KAAKC,CAAM,EAAG,OAAO,KAC1H,IAAMC,EAAS,SAASL,EAAOE,EAAMD,CAAO,EAC5C,OAAOI,EAAO,SAAW,EAAI,KAAOA,EAAO,IAAI,IAAU,CAAE,MAAOC,EAAM,KAAM,WAAYA,EAAM,KAAM,OAAQC,EAAkBD,EAAM,IAAI,EAAG,SAAU,KAAKA,EAAM,OAAQ,cAAe,eAAeA,EAAM,QAAQ,YAAa,EAAE,CACzO,CAEA,SAAgB,0BAA0B,EAAiB,EAAc,EAAc,EAAqB,EAAmB,EAA0C,CACrK,IAAME,EAAUR,EAAME,IAAS,GACzBO,EAAUN,EAAQ,qMAAqL,CAAC,CAAC,KAAKK,CAAO,EAC3N,GAAI,CAACC,GAAWA,EAAQ,KAAOC,GAAQC,IAAgBF,EAAQ,EAAE,CAAC,OAAS,GAAKG,IAAcD,EAAcD,EAAK,OAAQ,OAAO,KAChI,IAAMJ,EAAQ,SAASN,EAAOE,EAAMD,CAAO,CAAC,CAAC,KAAK,GAASK,EAAM,OAASI,CAAI,EAC9E,OAAOJ,EAAQ,KAAKA,EAAM,KAAK,OAAOC,EAAkBD,EAAM,IAAI,EAAE,gBAAgBA,EAAM,QAAQ,cAAgB,IACtH,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"declarations.js","names":["header","fences","fenceMap","lines","headers","line","text","match","keyword"],"sources":["../../declarations.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { fenceMap } from './document-context';\n\n/** Where a named construct is declared. */\nexport interface DeclarationHeader {\n /** The construct keyword, such as `concept`, `screen template` or `slice StateChange`. */\n readonly keyword: string;\n\n /** The name the construct declares. */\n readonly name: string;\n\n /** The zero-based line of the header. */\n readonly line: number;\n\n /** The zero-based column the name starts at. */\n readonly column: number;\n}\n\n// Every construct that is declared by a header line naming it: `concept TalkId : Uuid`, `screen template ReviewDesk`,\n// `slice StateChange SubmitTalk`. References to a name (`navigate to TalkList`, `template ReviewDesk`, `authorize\n// IsSpeaker`) are not headers, so a reference never reads as a second declaration.\nconst header = new RegExp(\n '^(\\\\s*(?:public\\\\s+)?(?:' + [\n 'screen\\\\s+template', 'dialog\\\\s+template', 'slice\\\\s+\\\\w+', 'ui\\\\s+profile', 'sample\\\\s+data', 'toolbar',\n 'concept', 'type', 'policy', 'purpose', 'persona', 'module', 'layout', 'theme', 'feature', 'event', 'system', 'eventsource',\n 'operation', 'command', 'query', 'projection', 'reaction', 'reducer', 'readmodel', 'trigger', 'screen', 'dialog', 'form',\n 'constraint', 'specification', 'behavior', 'exposure', 'instance',\n ].join('|') + ')\\\\s+)([A-Za-z_][\\\\w.]*)');\n\n/**\n * Finds the headers that declare constructs in a document.\n *\n * @param lines The document's lines.\n * @returns The headers, in document order.\n */\nexport function declarationHeaders(lines: readonly string[]): DeclarationHeader[] {\n const fences = fenceMap([...lines]);\n const headers: DeclarationHeader[] = [];\n lines.forEach((text, line) => {\n if (fences[line] || /^\\s*\\/\\//.test(text)) return;\n const match = header.exec(text);\n if (match === null) return;\n const keyword = match[1].trim().replace(/^public\\s+/, '').replace(/\\s+/g, ' ');\n headers.push({ keyword, name: match[2], line, column: match[1].length });\n });\n\n return headers;\n}\n"],"mappings":"kGAuBA,MAAMA,EAAa,OACf,4BAA6B,0VAK7B,EAAC,CAAC,KAAK,GAAG,EAAI,0BAA0B,EAQ5C,SAAgB,mBAAmB,EAA+C,CAC9E,IAAMC,EAASC,EAAS,CAAC,GAAGC,CAAK,CAAC,EAC5BC,EAA+B,CAAC,EAStC,OARAD,EAAM,SAAS,EAAM,IAAS,CAC1B,GAAIF,EAAOI,IAAS,WAAW,KAAKC,CAAI,EAAG,OAC3C,IAAMC,EAAQP,EAAO,KAAKM,CAAI,EAC9B,GAAIC,IAAU,KAAM,OACpB,IAAMC,EAAUD,EAAM,EAAE,CAAC,KAAK,CAAC,CAAC,QAAQ,aAAc,EAAE,CAAC,CAAC,QAAQ,OAAQ,GAAG,EAC7EH,EAAQ,KAAK,CAAE,UAAS,KAAMG,EAAM,GAAI,OAAM,OAAQA,EAAM,EAAE,CAAC,MAAO,CAAC,CAC3E,CAAC,EAEMH,CACX"}
1
+ {"version":3,"file":"declarations.js","names":["header","fences","fenceMap","lines","headers","line","text","match","keyword"],"sources":["../../declarations.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { fenceMap } from './document-context';\n\n/** Where a named construct is declared. */\nexport interface DeclarationHeader {\n /** The construct keyword, such as `concept`, `screen template` or `slice StateChange`. */\n readonly keyword: string;\n\n /** The name the construct declares. */\n readonly name: string;\n\n /** The zero-based line of the header. */\n readonly line: number;\n\n /** The zero-based column the name starts at. */\n readonly column: number;\n}\n\n// Every construct that is declared by a header line naming it: `concept TalkId : Uuid`, `screen template ReviewDesk`,\n// `slice StateChange SubmitTalk`. References to a name (`navigate to TalkList`, `template ReviewDesk`, `authorize\n// IsSpeaker`) are not headers, so a reference never reads as a second declaration.\nconst header = new RegExp(\n '^(\\\\s*(?:public\\\\s+)?(?:' + [\n 'screen\\\\s+template', 'dialog\\\\s+template', 'slice\\\\s+\\\\w+', 'ui\\\\s+profile', 'sample\\\\s+data', 'toolbar',\n 'concept', 'type', 'policy', 'purpose', 'persona', 'module', 'layout', 'theme', 'feature', 'event', 'system', 'eventsource',\n 'operation', 'command', 'query', 'projection', 'reaction', 'reducer', 'readmodel', 'trigger', 'screen', 'dialog', 'form',\n 'constraint', 'specification', 'behavior', 'exposure', 'instance',\n ].join('|') + ')\\\\s+)([A-Za-z_][\\\\w.]*)');\n\n/**\n * Finds the headers that declare constructs in a document.\n *\n * @param lines The document's lines.\n * @returns The headers, in document order.\n */\nexport function declarationHeaders(lines: readonly string[]): DeclarationHeader[] {\n const fences = fenceMap([...lines]);\n const headers: DeclarationHeader[] = [];\n lines.forEach((text, line) => {\n if (fences[line] || /^\\s*\\/\\//.test(text)) return;\n const match = header.exec(text);\n if (match === null) return;\n const keyword = match[1].trim().replace(/^public\\s+/, '').replace(/\\s+/g, ' ');\n headers.push({ keyword, name: match[2], line, column: match[1].length });\n });\n\n return headers;\n}\n"],"mappings":"A,kGAuBA,MAAMA,EAAa,OACf,4BAA6B,0VAK7B,EAAC,CAAC,KAAK,GAAG,EAAI,0BAA0B,EAQ5C,SAAgB,mBAAmB,EAA+C,CAC9E,IAAMC,EAASC,EAAS,CAAC,GAAGC,CAAK,CAAC,EAC5BC,EAA+B,CAAC,EAStC,OARAD,EAAM,SAAS,EAAM,IAAS,CAC1B,GAAIF,EAAOI,IAAS,WAAW,KAAKC,CAAI,EAAG,OAC3C,IAAMC,EAAQP,EAAO,KAAKM,CAAI,EAC9B,GAAIC,IAAU,KAAM,OACpB,IAAMC,EAAUD,EAAM,EAAE,CAAC,KAAK,CAAC,CAAC,QAAQ,aAAc,EAAE,CAAC,CAAC,QAAQ,OAAQ,GAAG,EAC7EH,EAAQ,KAAK,CAAE,UAAS,KAAMG,EAAM,GAAI,OAAM,OAAQA,EAAM,EAAE,CAAC,MAAO,CAAC,CAC3E,CAAC,EAEMH,CACX,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"dependency-completions.js","names":["fenceMap","lines","line","withoutComment","before","match","symbols","symbolsForBuffer","application","responseAnalysis","source"],"sources":["../../dependency-completions.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { fenceMap, withoutComment } from './document-context';\nimport { responseAnalysis } from './response-analysis';\nimport { DocumentSymbols, symbolsForBuffer } from './symbols';\nimport { CompletionEntry } from './completion-items';\n\nexport function dependencyTargetCompletions(lines: string[], line: number, before: string, application: DocumentSymbols): CompletionEntry[] | null {\n if (fenceMap(lines)[line] || withoutComment(before).length < before.length) return null;\n const match = before.match(/^\\s*depends\\s+on\\s+((?:[A-Za-z_]\\w*\\.)*)([A-Za-z_]\\w*)?$/);\n if (!match) return null;\n const symbols = symbolsForBuffer(lines, application);\n const analysis = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [],\n symbols.authoringPlacement, symbols.authoringPath, symbols.authoringPlacementResolved);\n return analysis.dependencies.completions(line, match[1], symbols.authoringPlacement);\n}\n"],"mappings":"gOAQA,SAAgB,4BAA4B,EAAiB,EAAc,EAAgB,EAAwD,CAC/I,GAAIA,EAASC,CAAK,CAAC,CAACC,IAASC,EAAeC,CAAM,CAAC,CAAC,OAASA,EAAO,OAAQ,OAAO,KACnF,IAAMC,EAAQD,EAAO,MAAM,0DAA0D,EACrF,GAAI,CAACC,EAAO,OAAO,KACnB,IAAMC,EAAUC,EAAiBN,EAAOO,CAAW,EAGnD,OAFiBC,EAAiBR,EAAOK,EAAQ,oBAAsBA,EAAQ,kBAAkB,OAAO,GAAUI,IAAWT,EAAM,KAAK;CAAI,CAAC,GAAK,CAAC,EAC/IK,EAAQ,mBAAoBA,EAAQ,cAAeA,EAAQ,0BACjD,CAAC,CAAC,aAAa,YAAYJ,EAAMG,EAAM,GAAIC,EAAQ,kBAAkB,CACvF"}
1
+ {"version":3,"file":"dependency-completions.js","names":["fenceMap","lines","line","withoutComment","before","match","symbols","symbolsForBuffer","application","responseAnalysis","source"],"sources":["../../dependency-completions.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { fenceMap, withoutComment } from './document-context';\nimport { responseAnalysis } from './response-analysis';\nimport { DocumentSymbols, symbolsForBuffer } from './symbols';\nimport { CompletionEntry } from './completion-items';\n\nexport function dependencyTargetCompletions(lines: string[], line: number, before: string, application: DocumentSymbols): CompletionEntry[] | null {\n if (fenceMap(lines)[line] || withoutComment(before).length < before.length) return null;\n const match = before.match(/^\\s*depends\\s+on\\s+((?:[A-Za-z_]\\w*\\.)*)([A-Za-z_]\\w*)?$/);\n if (!match) return null;\n const symbols = symbolsForBuffer(lines, application);\n const analysis = responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [],\n symbols.authoringPlacement, symbols.authoringPath, symbols.authoringPlacementResolved);\n return analysis.dependencies.completions(line, match[1], symbols.authoringPlacement);\n}\n"],"mappings":"A,gOAQA,SAAgB,4BAA4B,EAAiB,EAAc,EAAgB,EAAwD,CAC/I,GAAIA,EAASC,CAAK,CAAC,CAACC,IAASC,EAAeC,CAAM,CAAC,CAAC,OAASA,EAAO,OAAQ,OAAO,KACnF,IAAMC,EAAQD,EAAO,MAAM,0DAA0D,EACrF,GAAI,CAACC,EAAO,OAAO,KACnB,IAAMC,EAAUC,EAAiBN,EAAOO,CAAW,EAGnD,OAFiBC,EAAiBR,EAAOK,EAAQ,oBAAsBA,EAAQ,kBAAkB,OAAO,GAAUI,IAAWT,EAAM,KAAK;CAAI,CAAC,GAAK,CAAC,EAC/IK,EAAQ,mBAAoBA,EAAQ,cAAeA,EAAQ,0BACjD,CAAC,CAAC,aAAa,YAAYJ,EAAMG,EAAM,GAAIC,EAAQ,kBAAkB,CACvF,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"dependency-target-analysis.js","names":["application","syntax","local","localSyntax","containers","DeclaredDependencyTargets","container","hiddenScopes","part","contexts","declared","node","nodes","address","parent","sourceLocal","path","line","range","key","dependency","from","placement","existing","qualifier","reference","relation","tier","order"],"sources":["../../dependency-target-analysis.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ApplicationSyntax, DeclaredDependencyTargets, FeatureSyntax } from '@cratis/screenplay-compiler';\nimport { CompletionEntry } from './completion-items';\n\n// Keep compiler-owned resolution private to this cached analysis. Its public shape only contains\n// editor entries, never compiler syntax or container types.\nexport function dependencyTargetAnalysis(syntax: unknown, localSyntax: unknown, path: string, range: (line: number) => number[], hiddenScopes: ReadonlySet<string>): {\n completions(line: number, qualifier: string, placement?: readonly string[]): CompletionEntry[];\n} {\n const application = syntax as ApplicationSyntax;\n const local = localSyntax as ApplicationSyntax;\n const containers = DeclaredDependencyTargets.containersOf(application).filter(container => ![...container.scope, container.name].some(part => hiddenScopes.has(part)));\n const contexts = new Map<number, readonly string[]>();\n const declared = new Map<string, { target: string; path?: string; line: number }[]>();\n const inventory = (nodes: readonly { name: string; location: { path?: string; line: number }; dependsOn?: readonly { target: string; location: { path?: string; line: number } }[]; features: readonly FeatureSyntax[] }[], parent: readonly string[], sourceLocal: boolean): void => {\n for (const node of nodes) {\n const address = [...parent, node.name];\n if (sourceLocal) {\n if (node.location.path === path && node.location.line > 0) for (const line of range(node.location.line - 1)) contexts.set(line, address);\n } else {\n const key = address.join('.');\n declared.set(key, [...declared.get(key) ?? [], ...(node.dependsOn ?? []).map(dependency => ({ target: dependency.target, ...dependency.location }))]);\n }\n inventory(node.features, address, sourceLocal);\n }\n };\n inventory(application.modules, [], false);\n inventory(local.modules, [], true);\n return {\n completions(line, qualifier, placement) {\n const from = contexts.get(line) ?? placement;\n if (!from?.length || from.some(part => hiddenScopes.has(part)) || !containers.some(container => [...container.scope, container.name].join('.') === from.join('.'))) return [];\n const existing = new Set((declared.get(from.join('.')) ?? []).filter(dependency => dependency.path !== path || dependency.line !== line + 1)\n .map(dependency => DeclaredDependencyTargets.resolve(dependency.target, from, containers).resolved));\n return DeclaredDependencyTargets.candidates(from, containers).flatMap(({ container, reference, tier }) => {\n if (existing.has(container)) return [];\n const address = [...container.scope, container.name].join('.');\n if (qualifier) {\n // A typed qualification may be longer than the shortest candidate spelling.\n reference = qualifier + container.name;\n if (DeclaredDependencyTargets.resolve(reference, from, containers).resolved !== container) return [];\n }\n const relation = container.scope.length === 0 ? 'module'\n : tier === 0 ? 'sibling feature'\n : tier !== 'qualified' ? `feature of ${container.scope.join('.')}` : `feature in ${container.scope.join('.')}`;\n const order = containers.indexOf(container);\n return [{ label: qualifier ? container.name : reference, insertText: qualifier ? container.name : reference,\n documentation: `${address} — ${relation}.`, detail: relation,\n sortText: `${String(tier === 'qualified' ? from.length : tier).padStart(6, '0')}:${String(order).padStart(6, '0')}` }];\n });\n },\n };\n}\n"],"mappings":"8KAQA,SAAgB,yBAAyB,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AAO,CAAC,EAC5K,IAAME,EAAW,IAAI,KAAKb,EAAS,IAAIW,EAAK,KAAK,GAAG,CAAC,GAAK,CAAC,EAAA,CAAG,OAAO,GAAcD,EAAW,OAASJ,GAAQI,EAAW,OAASH,EAAO,CAAC,CAAC,CACvI,IAAI,GAAcZ,EAA0B,QAAQe,EAAW,OAAQC,EAAMjB,CAAU,CAAC,CAAC,QAAQ,CAAC,EACvG,OAAOC,EAA0B,WAAWgB,EAAMjB,CAAU,CAAC,CAAC,SAAS,CAAE,YAAW,YAAW,UAAW,CACtG,GAAImB,EAAS,IAAIjB,CAAS,EAAG,MAAO,CAAC,EACrC,IAAMO,EAAU,CAAC,GAAGP,EAAU,MAAOA,EAAU,IAAI,CAAC,CAAC,KAAK,GAAG,EAC7D,GAAIkB,IAEA,EAAYA,EAAYlB,EAAU,KAC9BD,EAA0B,QAAQoB,EAAWJ,EAAMjB,CAAU,CAAC,CAAC,WAAaE,GAAW,MAAO,CAAC,EAEvG,IAAMoB,EAAWpB,EAAU,MAAM,SAAW,EAAI,SAC1CqB,IAAS,EAAI,kBACTA,IAAS,YAA0D,cAAcrB,EAAU,MAAM,KAAK,GAAG,IAAlF,cAAcA,EAAU,MAAM,KAAK,GAAG,IACjEsB,EAAQxB,EAAW,QAAQE,CAAS,EAC1C,MAAO,CAAC,CAAE,MAAOkB,EAAYlB,EAAU,KAAOmB,EAAW,WAAYD,EAAYlB,EAAU,KAAOmB,EAC9F,cAAe,GAAGZ,EAAQ,KAAKa,EAAS,GAAI,OAAQA,EACpD,SAAU,GAAG,OAAOC,IAAS,YAAcN,EAAK,OAASM,CAAI,CAAC,CAAC,SAAS,EAAG,GAAG,EAAE,GAAG,OAAOC,CAAK,CAAC,CAAC,SAAS,EAAG,GAAG,GAAI,CAAC,CAC7H,CAAC,CACL,CACJ,CACJ"}
1
+ {"version":3,"file":"dependency-target-analysis.js","names":["application","syntax","local","localSyntax","containers","DeclaredDependencyTargets","container","hiddenScopes","part","contexts","declared","node","nodes","address","parent","sourceLocal","path","line","range","key","dependency","from","placement","existing","qualifier","reference","relation","tier","order"],"sources":["../../dependency-target-analysis.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ApplicationSyntax, DeclaredDependencyTargets, FeatureSyntax } from '@cratis/screenplay-compiler';\nimport { CompletionEntry } from './completion-items';\n\n// Keep compiler-owned resolution private to this cached analysis. Its public shape only contains\n// editor entries, never compiler syntax or container types.\nexport function dependencyTargetAnalysis(syntax: unknown, localSyntax: unknown, path: string, range: (line: number) => number[], hiddenScopes: ReadonlySet<string>): {\n completions(line: number, qualifier: string, placement?: readonly string[]): CompletionEntry[];\n} {\n const application = syntax as ApplicationSyntax;\n const local = localSyntax as ApplicationSyntax;\n const containers = DeclaredDependencyTargets.containersOf(application).filter(container => ![...container.scope, container.name].some(part => hiddenScopes.has(part)));\n const contexts = new Map<number, readonly string[]>();\n const declared = new Map<string, { target: string; path?: string; line: number }[]>();\n const inventory = (nodes: readonly { name: string; location: { path?: string; line: number }; dependsOn?: readonly { target: string; location: { path?: string; line: number } }[]; features: readonly FeatureSyntax[] }[], parent: readonly string[], sourceLocal: boolean): void => {\n for (const node of nodes) {\n const address = [...parent, node.name];\n if (sourceLocal) {\n if (node.location.path === path && node.location.line > 0) for (const line of range(node.location.line - 1)) contexts.set(line, address);\n } else {\n const key = address.join('.');\n declared.set(key, [...declared.get(key) ?? [], ...(node.dependsOn ?? []).map(dependency => ({ target: dependency.target, ...dependency.location }))]);\n }\n inventory(node.features, address, sourceLocal);\n }\n };\n inventory(application.modules, [], false);\n inventory(local.modules, [], true);\n return {\n completions(line, qualifier, placement) {\n const from = contexts.get(line) ?? placement;\n if (!from?.length || from.some(part => hiddenScopes.has(part)) || !containers.some(container => [...container.scope, container.name].join('.') === from.join('.'))) return [];\n const existing = new Set((declared.get(from.join('.')) ?? []).filter(dependency => dependency.path !== path || dependency.line !== line + 1)\n .map(dependency => DeclaredDependencyTargets.resolve(dependency.target, from, containers).resolved));\n return DeclaredDependencyTargets.candidates(from, containers).flatMap(({ container, reference, tier }) => {\n if (existing.has(container)) return [];\n const address = [...container.scope, container.name].join('.');\n if (qualifier) {\n // A typed qualification may be longer than the shortest candidate spelling.\n reference = qualifier + container.name;\n if (DeclaredDependencyTargets.resolve(reference, from, containers).resolved !== container) return [];\n }\n const relation = container.scope.length === 0 ? 'module'\n : tier === 0 ? 'sibling feature'\n : tier !== 'qualified' ? `feature of ${container.scope.join('.')}` : `feature in ${container.scope.join('.')}`;\n const order = containers.indexOf(container);\n return [{ label: qualifier ? container.name : reference, insertText: qualifier ? container.name : reference,\n documentation: `${address} — ${relation}.`, detail: relation,\n sortText: `${String(tier === 'qualified' ? from.length : tier).padStart(6, '0')}:${String(order).padStart(6, '0')}` }];\n });\n },\n };\n}\n"],"mappings":"A,8KAQA,SAAgB,yBAAyB,EAAiB,EAAsB,EAAc,EAAmC,EAE/H,CACE,IAAMA,EAAcC,EACdC,EAAQC,EACRC,EAAaC,EAA0B,aAAaL,CAAW,CAAC,CAAC,OAAO,GAAa,CAAC,CAAC,GAAGM,EAAU,MAAOA,EAAU,IAAI,CAAC,CAAC,KAAK,GAAQC,EAAa,IAAIC,CAAI,CAAC,CAAC,EAC/JC,kBAAW,IAAI,IACfC,kBAAW,IAAI,IACf,WAAa,EAAyM,EAA2B,IAA+B,CAClR,IAAK,IAAMC,KAAQC,EAAO,CACtB,IAAMC,EAAU,CAAC,GAAGC,EAAQH,EAAK,IAAI,EACrC,GAAII,EACI,IAAAJ,EAAK,SAAS,OAASK,GAAQL,EAAK,SAAS,KAAO,EAAG,IAAK,IAAMM,KAAQC,EAAMP,EAAK,SAAS,KAAO,CAAC,EAAGF,EAAS,IAAIQ,EAAMJ,CAAO,CAAA,KACpI,CACH,IAAMM,EAAMN,EAAQ,KAAK,GAAG,EAC5BH,EAAS,IAAIS,EAAK,CAAC,GAAGT,EAAS,IAAIS,CAAG,GAAK,CAAC,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AI,kBACTA,IAAS,YAA0D,cAAcrB,EAAU,MAAM,KAAK,GAAG,IAAlF,cAAcA,EAAU,MAAM,KAAK,GAAG,IACjEsB,EAAQxB,EAAW,QAAQE,CAAS,EAC1C,MAAO,CAAC,CAAE,MAAOkB,EAAYlB,EAAU,KAAOmB,EAAW,WAAYD,EAAYlB,EAAU,KAAOmB,EAC9F,cAAe,GAAGZ,EAAQ,KAAKa,EAAS,GAAI,OAAQA,EACpD,SAAU,GAAG,OAAOC,IAAS,YAAcN,EAAK,OAASM,CAAI,CAAC,CAAC,SAAS,EAAG,GAAG,EAAE,GAAG,OAAOC,CAAK,CAAC,CAAC,SAAS,EAAG,GAAG,GAAI,CAAC,CAC7H,CAAC,CACL,CACJ,CACJ,C"}
@@ -1,2 +1,2 @@
1
- const e={repeatedPassiveDirective:`PLAY0858`,invalidSemanticBinding:`PLAY0273`,unknownMatchPattern:`PLAY0366`,invalidMatchPattern:`PLAY0367`,patternOutsidePortableMatchDialect:`PLAY0699`,deprecatedStudioTextRulePattern:`PLAY0787`,repeatedSingularDeclarationAcrossFiles:`PLAY0172`,directionlessTranslationReactsToOwnCapture:`PLAY0694`,pendingIntentWithOtherHandler:`PLAY0698`,commandHandlerRequiresAttachment:`PLAY0800`,duplicateEventInProjectionScope:`PLAY0801`,reservedStoredName:`PLAY0802`,ambiguousMatchPattern:`PLAY0803`,contextSourcedPerformedQueryArgument:`PLAY0810`,describedCommandNotImplemented:`PLAY0695`,describedCommandWithoutProductions:`PLAY0696`,describedCommandCardinalityNotAdmitted:`PLAY0697`,invalidExposureDeclaration:`PLAY0621`,unknownExposureOwner:`PLAY0622`,reExposureCycle:`PLAY0623`,reExposureBroken:`PLAY0624`,invalidInstanceContribution:`PLAY0625`,unknownContributionInstance:`PLAY0626`,contributionNotExposed:`PLAY0627`,contributionTypeMismatch:`PLAY0628`,unknownTemplateContentSlot:`PLAY0629`,unknownNavigationOutlet:`PLAY0630`,templateScopeMismatch:`PLAY0631`,incompatibleComponentPackage:`PLAY0632`,unknownNavigationDestination:`PLAY0654`,unknownScreenContributionPoint:`PLAY0655`,templateNestingCycle:`PLAY0656`,templateCategoryMissing:`PLAY0720`,invalidTemplateVersionRange:`PLAY0721`,unknownTemplateBlueprint:`PLAY0722`,mixedEnumerationNumbering:`PLAY0667`,duplicateEnumerationNumber:`PLAY0668`,enumerationNumberOutsideInt32:`PLAY0669`,malformedEnumerationNumber:`PLAY0670`,unpinnedStoredEnumeration:`PLAY0671`,invalidContextDeclaration:`PLAY0854`,unknownContextMemberType:`PLAY0855`,duplicateContextMember:`PLAY0856`,reservedContextMemberName:`PLAY0857`,invalidIdentityDeclaration:`PLAY0633`,duplicateIdentity:`PLAY0634`,invalidIdentityDetail:`PLAY0635`,unknownIdentitySource:`PLAY0636`,identityDetailWithoutSource:`PLAY0637`,identitySourceWithBody:`PLAY0638`,duplicateIdentityDetail:`PLAY0639`,builtInIdentityDetail:`PLAY0640`,unknownIdentityQuery:`PLAY0641`,invalidIdentityQuery:`PLAY0642`,identityQueryWithoutKey:`PLAY0643`,invalidIdentityQueryKey:`PLAY0644`,identityQueryAuthorizationDependency:`PLAY0645`,identityQueryTypeMismatch:`PLAY0646`,invalidReactionIdentity:`PLAY0647`,gatedInvocationWithoutIdentity:`PLAY0648`,unusedReactionIdentity:`PLAY0649`,unusedReactionRole:`PLAY0650`,unsatisfiedReactionIdentity:`PLAY0651`,reactionPrivilegeEscalation:`PLAY0652`,commandProducesPublicEvent:`PLAY0607`,publicEventRequiresOutboundTranslation:`PLAY0608`,outboundPublicEventCount:`PLAY0609`,foreignPublicEventConsumer:`PLAY0610`,outboundTranslationInput:`PLAY0611`,inboundTranslationOutput:`PLAY0612`,foreignPublicEventProduced:`PLAY0613`,publicTranslationRequiresDirection:`PLAY0614`,translationConstructDirection:`PLAY0615`,inboundTranslationInput:`PLAY0616`,outboundTranslationOutput:`PLAY0617`,eventTargetOutsideOutboundTranslation:`PLAY0618`,eventsSourceOutsideInboundTranslation:`PLAY0619`,invalidCaptureEventsSource:`PLAY0620`,captureEventsFromSeveralOrigins:`PLAY0687`,captureEventsKeyNotRequired:`PLAY0700`,captureEventSourceKeyOutsideEvents:`PLAY0809`,captureEventsRecordFixture:`PLAY0701`,refutedGeneratedConceptRule:`PLAY0688`,unprovenGeneratedConceptRule:`PLAY0689`,invalidReadModelKey:`PLAY0660`,incompleteReadModelKey:`PLAY0661`,invalidReadModelKeyLookup:`PLAY0662`,productionRouteOutsideCommand:`PLAY0663`,redundantProductionRoute:`PLAY0664`,invalidObserverFilter:`PLAY0665`,observerFilterExcludesEveryProducer:`PLAY0666`,reducerIdentityMismatch:`PLAY0690`,generationSupportBudgetExceeded:`PLAY0691`,emptyGenerationSupport:`PLAY0692`,invalidReactionBatchesDeclaration:`PLAY0693`,invalidCommandReadsDeclaration:`PLAY0780`,invalidTimeZoneDeclaration:`PLAY0812`,invalidCommandCalendar:`PLAY0813`,invalidSpecificationTimeZone:`PLAY0814`,invalidSpecificationInvocation:`PLAY0815`,invalidDescription:`PLAY0145`,emptyDescription:`PLAY0146`,duplicateDescription:`PLAY0147`,unknownConceptDirective:`PLAY0010`,attributeReasonWithoutAttribute:`PLAY0012`,duplicateAttributeReason:`PLAY0013`,duplicateComplianceMarker:`PLAY0653`,legacyComplianceMarker:`PLAY0565`,unknownComplianceMarker:`PLAY0566`,invalidSecretScope:`PLAY0567`,duplicateSecretScope:`PLAY0568`,secretScopeIgnoredForPii:`PLAY0569`,invalidPersonalDataQualifier:`PLAY0570`,duplicateSpecialCategory:`PLAY0571`,invalidPurposeDeclaration:`PLAY0596`,invalidPurposeVocabulary:`PLAY0597`,duplicatePurposeField:`PLAY0598`,duplicatePurposeDeclaration:`PLAY0599`,unknownPurpose:`PLAY0600`,purposeInterestMismatch:`PLAY0601`,personalDataWithoutPurpose:`PLAY0602`,specialDataWithoutCondition:`PLAY0603`,criminalDataWithoutAuthorization:`PLAY0604`,purposeWithoutBasis:`PLAY0605`,unusedPurpose:`PLAY0606`,duplicateEventSubject:`PLAY0590`,invalidSubjectType:`PLAY0591`,protectedSubjectType:`PLAY0592`,invalidSubjectOwner:`PLAY0593`,readModelSubjectNotSupported:`PLAY0594`,invalidSubjectModifierOrder:`PLAY0595`,conflictingScreenDataBinding:`PLAY0530`,screenDataQueryMismatch:`PLAY0531`,actionWithoutInputSurface:`PLAY0532`,commandWithoutInputSurface:`PLAY0533`,readModelFieldWithoutOrigin:`PLAY0534`,queryParameterNotHeldByView:`PLAY0535`,unconsumedEvent:`PLAY0536`,unreachableScreen:`PLAY0537`,invalidSpecificationCallerPersona:`PLAY0572`,unsynthesizablePersonaCaller:`PLAY0573`,personaWithoutGate:`PLAY0574`,gateWithoutPersona:`PLAY0575`,ambiguousPersonaCaller:`PLAY0576`,invalidSpecificationParameter:`PLAY0577`,invalidSpecificationCase:`PLAY0578`,duplicateSpecificationParameter:`PLAY0579`,duplicateSpecificationCase:`PLAY0580`,incompleteSpecificationTable:`PLAY0581`,invalidSpecificationCaseAssignment:`PLAY0582`,invalidSpecificationCaseValue:`PLAY0583`,invalidSpecificationCaseReference:`PLAY0584`,optionalSpecificationParameterTarget:`PLAY0585`,specificationCaseNameCollision:`PLAY0586`,incompatibleSpecificationParameterType:`PLAY0587`,unusedSpecificationParameter:`PLAY0588`,singularSpecificationTableExpansion:`PLAY0589`,invalidActionAlternative:`PLAY0341`,guardedActionWithoutAlternatives:`PLAY0342`,misplacedActionOtherwise:`PLAY0343`,unsupportedActionConditionOperand:`PLAY0344`,unknownActionSubjectField:`PLAY0345`,unresolvedActionSubject:`PLAY0346`,invalidActionSubjectClause:`PLAY0817`,inferredActionSubject:`PLAY0818`,changedActionSubject:`PLAY0819`,ambiguousActionInputBinding:`PLAY0820`,unsupportedActionSubjectContext:`PLAY0821`,unreachableActionAlternative:`PLAY0347`,unknownActionArgumentProperty:`PLAY0348`,invalidRefusalBranch:`PLAY0538`,invalidRefusalBranchBody:`PLAY0539`,unreachableRefusalBranch:`PLAY0540`,invalidRefusalValue:`PLAY0541`,unknownRefusalConstraint:`PLAY0542`,unmatchedRedeliveredOccurrence:`PLAY0543`,unknownRedeliveryReaction:`PLAY0544`,invalidNoEventsExpectation:`PLAY0545`,indeterminateNegatedClaimTarget:`PLAY0546`,invalidAbsentReadModelStep:`PLAY0453`,unknownConstraintProperty:`PLAY0391`,invalidSpecificationExample:`PLAY0518`,duplicateSpecificationAssignment:`PLAY0519`,unknownReadModelProperty:`PLAY0514`,piiNotSupportedOnIdentifier:`PLAY0515`,invalidEventSourceDeclaration:`PLAY0503`,invalidCommandStream:`PLAY0504`,invalidSpecificationStream:`PLAY0547`,specificationStreamOnCommand:`PLAY0548`,invalidSpecificationStreamRoute:`PLAY0549`,invalidSpecificationStreamEventSource:`PLAY0550`,specificationStreamContradictsCommand:`PLAY0551`,ambiguousCommandStream:`PLAY0505`,unsupportedStreamIdType:`PLAY0506`,redundantSourceStreamId:`PLAY0507`,eventFromLaterSlice:`PLAY0516`,timelineCycleGroup:`PLAY0517`,invalidSpecificationExampleBody:`PLAY0526`,undeclaredDependency:`PLAY0552`,unusedDependencyDeclaration:`PLAY0553`,invalidDependencyTarget:`PLAY0554`,repeatedDependencyDeclaration:`PLAY0555`,mutualDependencyDeclarations:`PLAY0556`,authorizationRefusalWithoutIdentity:`PLAY0557`,invalidDocumentation:`PLAY0558`,conflictingDocumentationAcrossFiles:`PLAY0559`,unsupportedInteractionAlternatives:`PLAY0560`,mixedInteractionAlternatives:`PLAY0561`,interactionAlternativeWithoutActions:`PLAY0562`,inlineInteractionAlternative:`PLAY0563`,legacyInteractionWhere:`PLAY0564`,ambiguousReference:`PLAY0198`,invalidImplementationBlock:`PLAY0492`,invalidImplementationHint:`PLAY0493`,conflictingImplementationSources:`PLAY0494`,eventSourceIdInPayload:`PLAY0469`,explicitProducesTargetsRequired:`PLAY0470`,redundantEventId:`PLAY0471`,invalidEventId:`PLAY0472`,inlineEventCollision:`PLAY0473`,inlineEventOutsideCommand:`PLAY0474`,inlineEventGeneration:`PLAY0475`,reservedProductionMetadata:`PLAY0476`,invalidEventDocumentation:`PLAY0477`,tabIndentation:`PLAY0006`,unknownPrimitiveType:`PLAY0008`,mismatchedSpecificationQueryResult:`PLAY0465`,unknownSliceType:`PLAY0028`,duplicateCommandIdentifier:`PLAY0036`,unknownContextPath:`PLAY0153`,unknownContextCausedByProperty:`PLAY0154`,unknownContextIdentityProperty:`PLAY0155`,unclosedCodeBlock:`PLAY0164`,unknownType:`PLAY0165`,unknownEvent:`PLAY0166`,unknownPolicy:`PLAY0167`,duplicateDeclaration:`PLAY0168`,unknownEventContextMember:`PLAY0295`,unknownEventContextPath:`PLAY0296`,eventContextPathBelowCollection:`PLAY0297`,missingEventContextPath:`PLAY0298`,unresolvedDynamicKeySource:`PLAY0299`,invalidFileImport:`PLAY0454`,omittedProductionDestination:`PLAY0478`,legacyOptionalSuffix:`PLAY0479`,invalidOptionalModifierOrder:`PLAY0480`,optionalReadsNotSupported:`PLAY0481`,unavailableResponseExecution:`PLAY0268`,generatedPropertyOutsideCommand:`PLAY0482`,invalidGeneratedType:`PLAY0483`,invalidGeneratedModifierOrder:`PLAY0484`,generatedPropertyInput:`PLAY0485`,invalidCommandResponse:`PLAY0486`,invalidResponseSource:`PLAY0487`,duplicateResponseField:`PLAY0488`,invalidResponseShape:`PLAY0489`,invalidGeneratedFixture:`PLAY0490`,invalidReturnExpectation:`PLAY0491`,unknownGenerationStrategy:`PLAY0672`,invalidGenerationArgument:`PLAY0673`,invalidGenerationModifier:`PLAY0674`,duplicateGenerationModifier:`PLAY0675`,duplicateGeneration:`PLAY0676`,invalidGenerationPrimitive:`PLAY0677`,invalidGenerationPrefix:`PLAY0678`,invalidGenerationAlphabet:`PLAY0679`,invalidTypeIdPrefix:`PLAY0680`,generationSizeOutsideRange:`PLAY0681`,reservedSequenceGeneration:`PLAY0682`,lowGenerationEntropy:`PLAY0683`,lowGeneratedIdentifierEntropy:`PLAY0684`,responseNameUsedOnFailure:`PLAY0685`,eventIdPinNotCarriedToRenderers:`PLAY0686`};export{e as diagnosticCodes};
1
+ const e={repeatedPassiveDirective:`PLAY0858`,conditionDepthExceeded:`PLAY0861`,invalidSemanticBinding:`PLAY0273`,unknownMatchPattern:`PLAY0366`,invalidMatchPattern:`PLAY0367`,patternOutsidePortableMatchDialect:`PLAY0699`,deprecatedStudioTextRulePattern:`PLAY0787`,repeatedSingularDeclarationAcrossFiles:`PLAY0172`,directionlessTranslationReactsToOwnCapture:`PLAY0694`,pendingIntentWithOtherHandler:`PLAY0698`,commandHandlerRequiresAttachment:`PLAY0800`,duplicateEventInProjectionScope:`PLAY0801`,reservedStoredName:`PLAY0802`,ambiguousMatchPattern:`PLAY0803`,contextSourcedPerformedQueryArgument:`PLAY0810`,describedCommandNotImplemented:`PLAY0695`,describedCommandWithoutProductions:`PLAY0696`,describedCommandCardinalityNotAdmitted:`PLAY0697`,invalidExposureDeclaration:`PLAY0621`,unknownExposureOwner:`PLAY0622`,reExposureCycle:`PLAY0623`,reExposureBroken:`PLAY0624`,invalidInstanceContribution:`PLAY0625`,unknownContributionInstance:`PLAY0626`,contributionNotExposed:`PLAY0627`,contributionTypeMismatch:`PLAY0628`,unknownTemplateContentSlot:`PLAY0629`,unknownNavigationOutlet:`PLAY0630`,templateScopeMismatch:`PLAY0631`,incompatibleComponentPackage:`PLAY0632`,unknownNavigationDestination:`PLAY0654`,unknownScreenContributionPoint:`PLAY0655`,templateNestingCycle:`PLAY0656`,templateCategoryMissing:`PLAY0720`,invalidTemplateVersionRange:`PLAY0721`,unknownTemplateBlueprint:`PLAY0722`,mixedEnumerationNumbering:`PLAY0667`,duplicateEnumerationNumber:`PLAY0668`,enumerationNumberOutsideInt32:`PLAY0669`,malformedEnumerationNumber:`PLAY0670`,unpinnedStoredEnumeration:`PLAY0671`,invalidContextDeclaration:`PLAY0854`,unknownContextMemberType:`PLAY0855`,duplicateContextMember:`PLAY0856`,reservedContextMemberName:`PLAY0857`,invalidIdentityDeclaration:`PLAY0633`,duplicateIdentity:`PLAY0634`,invalidIdentityDetail:`PLAY0635`,unknownIdentitySource:`PLAY0636`,identityDetailWithoutSource:`PLAY0637`,identitySourceWithBody:`PLAY0638`,duplicateIdentityDetail:`PLAY0639`,builtInIdentityDetail:`PLAY0640`,unknownIdentityQuery:`PLAY0641`,invalidIdentityQuery:`PLAY0642`,identityQueryWithoutKey:`PLAY0643`,invalidIdentityQueryKey:`PLAY0644`,identityQueryAuthorizationDependency:`PLAY0645`,identityQueryTypeMismatch:`PLAY0646`,invalidReactionIdentity:`PLAY0647`,gatedInvocationWithoutIdentity:`PLAY0648`,unusedReactionIdentity:`PLAY0649`,unusedReactionRole:`PLAY0650`,unsatisfiedReactionIdentity:`PLAY0651`,reactionPrivilegeEscalation:`PLAY0652`,commandProducesPublicEvent:`PLAY0607`,publicEventRequiresOutboundTranslation:`PLAY0608`,outboundPublicEventCount:`PLAY0609`,foreignPublicEventConsumer:`PLAY0610`,outboundTranslationInput:`PLAY0611`,inboundTranslationOutput:`PLAY0612`,foreignPublicEventProduced:`PLAY0613`,publicTranslationRequiresDirection:`PLAY0614`,translationConstructDirection:`PLAY0615`,inboundTranslationInput:`PLAY0616`,outboundTranslationOutput:`PLAY0617`,eventTargetOutsideOutboundTranslation:`PLAY0618`,eventsSourceOutsideInboundTranslation:`PLAY0619`,invalidCaptureEventsSource:`PLAY0620`,captureEventsFromSeveralOrigins:`PLAY0687`,captureEventsKeyNotRequired:`PLAY0700`,captureEventSourceKeyOutsideEvents:`PLAY0809`,captureEventsRecordFixture:`PLAY0701`,refutedGeneratedConceptRule:`PLAY0688`,unprovenGeneratedConceptRule:`PLAY0689`,invalidReadModelKey:`PLAY0660`,incompleteReadModelKey:`PLAY0661`,invalidReadModelKeyLookup:`PLAY0662`,productionRouteOutsideCommand:`PLAY0663`,redundantProductionRoute:`PLAY0664`,invalidObserverFilter:`PLAY0665`,observerFilterExcludesEveryProducer:`PLAY0666`,reducerIdentityMismatch:`PLAY0690`,generationSupportBudgetExceeded:`PLAY0691`,emptyGenerationSupport:`PLAY0692`,invalidReactionBatchesDeclaration:`PLAY0693`,invalidCommandReadsDeclaration:`PLAY0780`,invalidTimeZoneDeclaration:`PLAY0812`,invalidCommandCalendar:`PLAY0813`,invalidSpecificationTimeZone:`PLAY0814`,invalidSpecificationInvocation:`PLAY0815`,invalidDescription:`PLAY0145`,emptyDescription:`PLAY0146`,duplicateDescription:`PLAY0147`,unknownConceptDirective:`PLAY0010`,attributeReasonWithoutAttribute:`PLAY0012`,duplicateAttributeReason:`PLAY0013`,duplicateComplianceMarker:`PLAY0653`,legacyComplianceMarker:`PLAY0565`,unknownComplianceMarker:`PLAY0566`,invalidSecretScope:`PLAY0567`,duplicateSecretScope:`PLAY0568`,secretScopeIgnoredForPii:`PLAY0569`,invalidPersonalDataQualifier:`PLAY0570`,duplicateSpecialCategory:`PLAY0571`,invalidPurposeDeclaration:`PLAY0596`,invalidPurposeVocabulary:`PLAY0597`,duplicatePurposeField:`PLAY0598`,duplicatePurposeDeclaration:`PLAY0599`,unknownPurpose:`PLAY0600`,purposeInterestMismatch:`PLAY0601`,personalDataWithoutPurpose:`PLAY0602`,specialDataWithoutCondition:`PLAY0603`,criminalDataWithoutAuthorization:`PLAY0604`,purposeWithoutBasis:`PLAY0605`,unusedPurpose:`PLAY0606`,duplicateEventSubject:`PLAY0590`,invalidSubjectType:`PLAY0591`,protectedSubjectType:`PLAY0592`,invalidSubjectOwner:`PLAY0593`,readModelSubjectNotSupported:`PLAY0594`,invalidSubjectModifierOrder:`PLAY0595`,conflictingScreenDataBinding:`PLAY0530`,screenDataQueryMismatch:`PLAY0531`,actionWithoutInputSurface:`PLAY0532`,commandWithoutInputSurface:`PLAY0533`,readModelFieldWithoutOrigin:`PLAY0534`,queryParameterNotHeldByView:`PLAY0535`,unconsumedEvent:`PLAY0536`,unreachableScreen:`PLAY0537`,invalidSpecificationCallerPersona:`PLAY0572`,unsynthesizablePersonaCaller:`PLAY0573`,personaWithoutGate:`PLAY0574`,gateWithoutPersona:`PLAY0575`,ambiguousPersonaCaller:`PLAY0576`,invalidSpecificationParameter:`PLAY0577`,invalidSpecificationCase:`PLAY0578`,duplicateSpecificationParameter:`PLAY0579`,duplicateSpecificationCase:`PLAY0580`,incompleteSpecificationTable:`PLAY0581`,invalidSpecificationCaseAssignment:`PLAY0582`,invalidSpecificationCaseValue:`PLAY0583`,invalidSpecificationCaseReference:`PLAY0584`,optionalSpecificationParameterTarget:`PLAY0585`,specificationCaseNameCollision:`PLAY0586`,incompatibleSpecificationParameterType:`PLAY0587`,unusedSpecificationParameter:`PLAY0588`,singularSpecificationTableExpansion:`PLAY0589`,invalidActionAlternative:`PLAY0341`,guardedActionWithoutAlternatives:`PLAY0342`,misplacedActionOtherwise:`PLAY0343`,unsupportedActionConditionOperand:`PLAY0344`,unknownActionSubjectField:`PLAY0345`,unresolvedActionSubject:`PLAY0346`,invalidActionSubjectClause:`PLAY0817`,inferredActionSubject:`PLAY0818`,changedActionSubject:`PLAY0819`,ambiguousActionInputBinding:`PLAY0820`,unsupportedActionSubjectContext:`PLAY0821`,unreachableActionAlternative:`PLAY0347`,unknownActionArgumentProperty:`PLAY0348`,invalidRefusalBranch:`PLAY0538`,invalidRefusalBranchBody:`PLAY0539`,unreachableRefusalBranch:`PLAY0540`,invalidRefusalValue:`PLAY0541`,unknownRefusalConstraint:`PLAY0542`,unmatchedRedeliveredOccurrence:`PLAY0543`,unknownRedeliveryReaction:`PLAY0544`,invalidNoEventsExpectation:`PLAY0545`,indeterminateNegatedClaimTarget:`PLAY0546`,invalidAbsentReadModelStep:`PLAY0453`,unknownConstraintProperty:`PLAY0391`,invalidSpecificationExample:`PLAY0518`,duplicateSpecificationAssignment:`PLAY0519`,unknownReadModelProperty:`PLAY0514`,piiNotSupportedOnIdentifier:`PLAY0515`,invalidEventSourceDeclaration:`PLAY0503`,invalidCommandStream:`PLAY0504`,invalidSpecificationStream:`PLAY0547`,specificationStreamOnCommand:`PLAY0548`,invalidSpecificationStreamRoute:`PLAY0549`,invalidSpecificationStreamEventSource:`PLAY0550`,specificationStreamContradictsCommand:`PLAY0551`,ambiguousCommandStream:`PLAY0505`,unsupportedStreamIdType:`PLAY0506`,redundantSourceStreamId:`PLAY0507`,eventFromLaterSlice:`PLAY0516`,timelineCycleGroup:`PLAY0517`,invalidSpecificationExampleBody:`PLAY0526`,undeclaredDependency:`PLAY0552`,unusedDependencyDeclaration:`PLAY0553`,invalidDependencyTarget:`PLAY0554`,repeatedDependencyDeclaration:`PLAY0555`,mutualDependencyDeclarations:`PLAY0556`,authorizationRefusalWithoutIdentity:`PLAY0557`,invalidDocumentation:`PLAY0558`,conflictingDocumentationAcrossFiles:`PLAY0559`,unsupportedInteractionAlternatives:`PLAY0560`,mixedInteractionAlternatives:`PLAY0561`,interactionAlternativeWithoutActions:`PLAY0562`,inlineInteractionAlternative:`PLAY0563`,legacyInteractionWhere:`PLAY0564`,ambiguousReference:`PLAY0198`,invalidImplementationBlock:`PLAY0492`,invalidImplementationHint:`PLAY0493`,conflictingImplementationSources:`PLAY0494`,eventSourceIdInPayload:`PLAY0469`,explicitProducesTargetsRequired:`PLAY0470`,redundantEventId:`PLAY0471`,invalidEventId:`PLAY0472`,inlineEventCollision:`PLAY0473`,inlineEventOutsideCommand:`PLAY0474`,inlineEventGeneration:`PLAY0475`,reservedProductionMetadata:`PLAY0476`,invalidEventDocumentation:`PLAY0477`,tabIndentation:`PLAY0006`,unknownPrimitiveType:`PLAY0008`,mismatchedSpecificationQueryResult:`PLAY0465`,unknownSliceType:`PLAY0028`,duplicateCommandIdentifier:`PLAY0036`,unknownContextPath:`PLAY0153`,unknownContextCausedByProperty:`PLAY0154`,unknownContextIdentityProperty:`PLAY0155`,unclosedCodeBlock:`PLAY0164`,unknownType:`PLAY0165`,unknownEvent:`PLAY0166`,unknownPolicy:`PLAY0167`,duplicateDeclaration:`PLAY0168`,unknownEventContextMember:`PLAY0295`,unknownEventContextPath:`PLAY0296`,eventContextPathBelowCollection:`PLAY0297`,missingEventContextPath:`PLAY0298`,unresolvedDynamicKeySource:`PLAY0299`,invalidFileImport:`PLAY0454`,omittedProductionDestination:`PLAY0478`,legacyOptionalSuffix:`PLAY0479`,invalidOptionalModifierOrder:`PLAY0480`,optionalReadsNotSupported:`PLAY0481`,unavailableResponseExecution:`PLAY0268`,generatedPropertyOutsideCommand:`PLAY0482`,invalidGeneratedType:`PLAY0483`,invalidGeneratedModifierOrder:`PLAY0484`,generatedPropertyInput:`PLAY0485`,invalidCommandResponse:`PLAY0486`,invalidResponseSource:`PLAY0487`,duplicateResponseField:`PLAY0488`,invalidResponseShape:`PLAY0489`,invalidGeneratedFixture:`PLAY0490`,invalidReturnExpectation:`PLAY0491`,unknownGenerationStrategy:`PLAY0672`,invalidGenerationArgument:`PLAY0673`,invalidGenerationModifier:`PLAY0674`,duplicateGenerationModifier:`PLAY0675`,duplicateGeneration:`PLAY0676`,invalidGenerationPrimitive:`PLAY0677`,invalidGenerationPrefix:`PLAY0678`,invalidGenerationAlphabet:`PLAY0679`,invalidTypeIdPrefix:`PLAY0680`,generationSizeOutsideRange:`PLAY0681`,reservedSequenceGeneration:`PLAY0682`,lowGenerationEntropy:`PLAY0683`,lowGeneratedIdentifierEntropy:`PLAY0684`,responseNameUsedOnFailure:`PLAY0685`,eventIdPinNotCarriedToRenderers:`PLAY0686`};export{e as diagnosticCodes};
2
2
  //# sourceMappingURL=diagnostic-codes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagnostic-codes.js","names":["diagnosticCodes"],"sources":["../../diagnostic-codes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// The PLAY codes the editor reports. Every one of them mirrors a condition the compiler checks and\n// carries the compiler's own code for it, so the same problem is called the same thing whether it was\n// found by the CLI or by a squiggle - see Documentation/screenplay/diagnostics.md for the catalogue.\n//\n// A code is only ever added here for a condition the compiler can also report. The editor makes a few\n// structural checks the compiler does not - the capture and projection validators are where they live -\n// and those stay codeless deliberately: minting a PLAY number for something no compiler run can emit\n// would make the catalogue describe two different tools.\nexport const diagnosticCodes = {\n repeatedPassiveDirective: 'PLAY0858',\n invalidSemanticBinding: 'PLAY0273',\n unknownMatchPattern: 'PLAY0366',\n invalidMatchPattern: 'PLAY0367',\n patternOutsidePortableMatchDialect: 'PLAY0699',\n deprecatedStudioTextRulePattern: 'PLAY0787',\n repeatedSingularDeclarationAcrossFiles: 'PLAY0172',\n directionlessTranslationReactsToOwnCapture: 'PLAY0694',\n pendingIntentWithOtherHandler: 'PLAY0698',\n commandHandlerRequiresAttachment: 'PLAY0800', // C# only\n duplicateEventInProjectionScope: 'PLAY0801',\n reservedStoredName: 'PLAY0802',\n ambiguousMatchPattern: 'PLAY0803',\n contextSourcedPerformedQueryArgument: 'PLAY0810', // C# only\n describedCommandNotImplemented: 'PLAY0695', // C# only\n describedCommandWithoutProductions: 'PLAY0696', // C# only\n describedCommandCardinalityNotAdmitted: 'PLAY0697', // C# only\n invalidExposureDeclaration: 'PLAY0621',\n unknownExposureOwner: 'PLAY0622',\n reExposureCycle: 'PLAY0623',\n reExposureBroken: 'PLAY0624',\n invalidInstanceContribution: 'PLAY0625',\n unknownContributionInstance: 'PLAY0626',\n contributionNotExposed: 'PLAY0627',\n contributionTypeMismatch: 'PLAY0628',\n unknownTemplateContentSlot: 'PLAY0629',\n unknownNavigationOutlet: 'PLAY0630',\n templateScopeMismatch: 'PLAY0631',\n incompatibleComponentPackage: 'PLAY0632',\n unknownNavigationDestination: 'PLAY0654',\n unknownScreenContributionPoint: 'PLAY0655',\n templateNestingCycle: 'PLAY0656',\n templateCategoryMissing: 'PLAY0720',\n invalidTemplateVersionRange: 'PLAY0721',\n unknownTemplateBlueprint: 'PLAY0722',\n mixedEnumerationNumbering: 'PLAY0667',\n duplicateEnumerationNumber: 'PLAY0668',\n enumerationNumberOutsideInt32: 'PLAY0669',\n malformedEnumerationNumber: 'PLAY0670',\n unpinnedStoredEnumeration: 'PLAY0671',\n invalidContextDeclaration: 'PLAY0854',\n unknownContextMemberType: 'PLAY0855',\n duplicateContextMember: 'PLAY0856',\n reservedContextMemberName: 'PLAY0857',\n invalidIdentityDeclaration: 'PLAY0633',\n duplicateIdentity: 'PLAY0634',\n invalidIdentityDetail: 'PLAY0635',\n unknownIdentitySource: 'PLAY0636',\n identityDetailWithoutSource: 'PLAY0637',\n identitySourceWithBody: 'PLAY0638',\n duplicateIdentityDetail: 'PLAY0639',\n builtInIdentityDetail: 'PLAY0640',\n unknownIdentityQuery: 'PLAY0641',\n invalidIdentityQuery: 'PLAY0642',\n identityQueryWithoutKey: 'PLAY0643',\n invalidIdentityQueryKey: 'PLAY0644',\n identityQueryAuthorizationDependency: 'PLAY0645',\n identityQueryTypeMismatch: 'PLAY0646',\n invalidReactionIdentity: 'PLAY0647',\n gatedInvocationWithoutIdentity: 'PLAY0648',\n unusedReactionIdentity: 'PLAY0649',\n unusedReactionRole: 'PLAY0650',\n unsatisfiedReactionIdentity: 'PLAY0651',\n reactionPrivilegeEscalation: 'PLAY0652',\n // Preserve supplied C# whole-model diagnostics; these checks are not yet run by the editor.\n commandProducesPublicEvent: 'PLAY0607',\n publicEventRequiresOutboundTranslation: 'PLAY0608',\n outboundPublicEventCount: 'PLAY0609',\n foreignPublicEventConsumer: 'PLAY0610',\n outboundTranslationInput: 'PLAY0611',\n inboundTranslationOutput: 'PLAY0612',\n foreignPublicEventProduced: 'PLAY0613',\n publicTranslationRequiresDirection: 'PLAY0614',\n translationConstructDirection: 'PLAY0615',\n inboundTranslationInput: 'PLAY0616',\n outboundTranslationOutput: 'PLAY0617',\n eventTargetOutsideOutboundTranslation: 'PLAY0618',\n eventsSourceOutsideInboundTranslation: 'PLAY0619',\n invalidCaptureEventsSource: 'PLAY0620',\n captureEventsFromSeveralOrigins: 'PLAY0687',\n captureEventsKeyNotRequired: 'PLAY0700',\n captureEventSourceKeyOutsideEvents: 'PLAY0809',\n captureEventsRecordFixture: 'PLAY0701',\n refutedGeneratedConceptRule: 'PLAY0688',\n unprovenGeneratedConceptRule: 'PLAY0689',\n invalidReadModelKey: 'PLAY0660',\n incompleteReadModelKey: 'PLAY0661',\n invalidReadModelKeyLookup: 'PLAY0662',\n productionRouteOutsideCommand: 'PLAY0663',\n redundantProductionRoute: 'PLAY0664',\n invalidObserverFilter: 'PLAY0665',\n observerFilterExcludesEveryProducer: 'PLAY0666',\n reducerIdentityMismatch: 'PLAY0690',\n generationSupportBudgetExceeded: 'PLAY0691',\n emptyGenerationSupport: 'PLAY0692',\n invalidReactionBatchesDeclaration: 'PLAY0693',\n invalidCommandReadsDeclaration: 'PLAY0780',\n invalidTimeZoneDeclaration: 'PLAY0812',\n invalidCommandCalendar: 'PLAY0813',\n invalidSpecificationTimeZone: 'PLAY0814',\n invalidSpecificationInvocation: 'PLAY0815',\n invalidDescription: 'PLAY0145',\n emptyDescription: 'PLAY0146',\n duplicateDescription: 'PLAY0147',\n unknownConceptDirective: 'PLAY0010',\n attributeReasonWithoutAttribute: 'PLAY0012',\n duplicateAttributeReason: 'PLAY0013',\n duplicateComplianceMarker: 'PLAY0653',\n legacyComplianceMarker: 'PLAY0565',\n unknownComplianceMarker: 'PLAY0566',\n invalidSecretScope: 'PLAY0567',\n duplicateSecretScope: 'PLAY0568',\n secretScopeIgnoredForPii: 'PLAY0569',\n invalidPersonalDataQualifier: 'PLAY0570',\n duplicateSpecialCategory: 'PLAY0571',\n invalidPurposeDeclaration: 'PLAY0596',\n invalidPurposeVocabulary: 'PLAY0597',\n duplicatePurposeField: 'PLAY0598',\n duplicatePurposeDeclaration: 'PLAY0599',\n unknownPurpose: 'PLAY0600',\n purposeInterestMismatch: 'PLAY0601',\n personalDataWithoutPurpose: 'PLAY0602',\n specialDataWithoutCondition: 'PLAY0603',\n criminalDataWithoutAuthorization: 'PLAY0604',\n purposeWithoutBasis: 'PLAY0605',\n unusedPurpose: 'PLAY0606',\n duplicateEventSubject: 'PLAY0590',\n invalidSubjectType: 'PLAY0591',\n protectedSubjectType: 'PLAY0592',\n invalidSubjectOwner: 'PLAY0593',\n readModelSubjectNotSupported: 'PLAY0594',\n invalidSubjectModifierOrder: 'PLAY0595',\n // Supplied compiler diagnostics are preserved, even for checks only the C# tool can run.\n // See Documentation/screenplay/editor-diagnostics.md for the validation boundary.\n conflictingScreenDataBinding: 'PLAY0530',\n screenDataQueryMismatch: 'PLAY0531',\n actionWithoutInputSurface: 'PLAY0532',\n commandWithoutInputSurface: 'PLAY0533',\n readModelFieldWithoutOrigin: 'PLAY0534',\n queryParameterNotHeldByView: 'PLAY0535',\n unconsumedEvent: 'PLAY0536',\n unreachableScreen: 'PLAY0537',\n invalidSpecificationCallerPersona: 'PLAY0572',\n unsynthesizablePersonaCaller: 'PLAY0573',\n personaWithoutGate: 'PLAY0574',\n gateWithoutPersona: 'PLAY0575',\n ambiguousPersonaCaller: 'PLAY0576',\n invalidSpecificationParameter: 'PLAY0577',\n invalidSpecificationCase: 'PLAY0578',\n duplicateSpecificationParameter: 'PLAY0579',\n duplicateSpecificationCase: 'PLAY0580',\n incompleteSpecificationTable: 'PLAY0581',\n invalidSpecificationCaseAssignment: 'PLAY0582',\n invalidSpecificationCaseValue: 'PLAY0583',\n invalidSpecificationCaseReference: 'PLAY0584',\n optionalSpecificationParameterTarget: 'PLAY0585',\n specificationCaseNameCollision: 'PLAY0586',\n incompatibleSpecificationParameterType: 'PLAY0587',\n unusedSpecificationParameter: 'PLAY0588',\n singularSpecificationTableExpansion: 'PLAY0589',\n invalidActionAlternative: 'PLAY0341',\n guardedActionWithoutAlternatives: 'PLAY0342',\n misplacedActionOtherwise: 'PLAY0343',\n unsupportedActionConditionOperand: 'PLAY0344',\n unknownActionSubjectField: 'PLAY0345',\n unresolvedActionSubject: 'PLAY0346',\n invalidActionSubjectClause: 'PLAY0817',\n inferredActionSubject: 'PLAY0818',\n changedActionSubject: 'PLAY0819',\n ambiguousActionInputBinding: 'PLAY0820',\n unsupportedActionSubjectContext: 'PLAY0821',\n unreachableActionAlternative: 'PLAY0347',\n unknownActionArgumentProperty: 'PLAY0348',\n invalidRefusalBranch: 'PLAY0538',\n invalidRefusalBranchBody: 'PLAY0539',\n unreachableRefusalBranch: 'PLAY0540',\n invalidRefusalValue: 'PLAY0541',\n unknownRefusalConstraint: 'PLAY0542',\n unmatchedRedeliveredOccurrence: 'PLAY0543',\n unknownRedeliveryReaction: 'PLAY0544',\n invalidNoEventsExpectation: 'PLAY0545',\n indeterminateNegatedClaimTarget: 'PLAY0546',\n invalidAbsentReadModelStep: 'PLAY0453',\n unknownConstraintProperty: 'PLAY0391',\n invalidSpecificationExample: 'PLAY0518',\n duplicateSpecificationAssignment: 'PLAY0519',\n unknownReadModelProperty: 'PLAY0514',\n piiNotSupportedOnIdentifier: 'PLAY0515',\n invalidEventSourceDeclaration: 'PLAY0503',\n invalidCommandStream: 'PLAY0504',\n invalidSpecificationStream: 'PLAY0547',\n specificationStreamOnCommand: 'PLAY0548',\n invalidSpecificationStreamRoute: 'PLAY0549',\n invalidSpecificationStreamEventSource: 'PLAY0550',\n specificationStreamContradictsCommand: 'PLAY0551',\n ambiguousCommandStream: 'PLAY0505',\n unsupportedStreamIdType: 'PLAY0506',\n redundantSourceStreamId: 'PLAY0507',\n eventFromLaterSlice: 'PLAY0516',\n timelineCycleGroup: 'PLAY0517',\n invalidSpecificationExampleBody: 'PLAY0526',\n undeclaredDependency: 'PLAY0552',\n unusedDependencyDeclaration: 'PLAY0553',\n invalidDependencyTarget: 'PLAY0554',\n repeatedDependencyDeclaration: 'PLAY0555',\n mutualDependencyDeclarations: 'PLAY0556',\n authorizationRefusalWithoutIdentity: 'PLAY0557',\n invalidDocumentation: 'PLAY0558',\n conflictingDocumentationAcrossFiles: 'PLAY0559',\n unsupportedInteractionAlternatives: 'PLAY0560',\n mixedInteractionAlternatives: 'PLAY0561',\n interactionAlternativeWithoutActions: 'PLAY0562',\n inlineInteractionAlternative: 'PLAY0563',\n legacyInteractionWhere: 'PLAY0564',\n ambiguousReference: 'PLAY0198',\n invalidImplementationBlock: 'PLAY0492',\n invalidImplementationHint: 'PLAY0493',\n conflictingImplementationSources: 'PLAY0494',\n eventSourceIdInPayload: 'PLAY0469',\n explicitProducesTargetsRequired: 'PLAY0470',\n redundantEventId: 'PLAY0471',\n invalidEventId: 'PLAY0472',\n inlineEventCollision: 'PLAY0473',\n inlineEventOutsideCommand: 'PLAY0474',\n inlineEventGeneration: 'PLAY0475',\n reservedProductionMetadata: 'PLAY0476',\n invalidEventDocumentation: 'PLAY0477',\n tabIndentation: 'PLAY0006',\n unknownPrimitiveType: 'PLAY0008',\n mismatchedSpecificationQueryResult: 'PLAY0465',\n unknownSliceType: 'PLAY0028',\n duplicateCommandIdentifier: 'PLAY0036',\n unknownContextPath: 'PLAY0153',\n unknownContextCausedByProperty: 'PLAY0154',\n unknownContextIdentityProperty: 'PLAY0155',\n unclosedCodeBlock: 'PLAY0164',\n unknownType: 'PLAY0165',\n unknownEvent: 'PLAY0166',\n unknownPolicy: 'PLAY0167',\n duplicateDeclaration: 'PLAY0168',\n unknownEventContextMember: 'PLAY0295',\n unknownEventContextPath: 'PLAY0296',\n eventContextPathBelowCollection: 'PLAY0297',\n missingEventContextPath: 'PLAY0298',\n unresolvedDynamicKeySource: 'PLAY0299',\n invalidFileImport: 'PLAY0454',\n omittedProductionDestination: 'PLAY0478',\n legacyOptionalSuffix: 'PLAY0479',\n invalidOptionalModifierOrder: 'PLAY0480',\n optionalReadsNotSupported: 'PLAY0481',\n unavailableResponseExecution: 'PLAY0268',\n generatedPropertyOutsideCommand: 'PLAY0482',\n invalidGeneratedType: 'PLAY0483',\n invalidGeneratedModifierOrder: 'PLAY0484',\n generatedPropertyInput: 'PLAY0485',\n invalidCommandResponse: 'PLAY0486',\n invalidResponseSource: 'PLAY0487',\n duplicateResponseField: 'PLAY0488',\n invalidResponseShape: 'PLAY0489',\n invalidGeneratedFixture: 'PLAY0490',\n invalidReturnExpectation: 'PLAY0491',\n unknownGenerationStrategy: 'PLAY0672',\n invalidGenerationArgument: 'PLAY0673',\n invalidGenerationModifier: 'PLAY0674',\n duplicateGenerationModifier: 'PLAY0675',\n duplicateGeneration: 'PLAY0676',\n invalidGenerationPrimitive: 'PLAY0677',\n invalidGenerationPrefix: 'PLAY0678',\n invalidGenerationAlphabet: 'PLAY0679',\n invalidTypeIdPrefix: 'PLAY0680',\n generationSizeOutsideRange: 'PLAY0681',\n reservedSequenceGeneration: 'PLAY0682',\n lowGenerationEntropy: 'PLAY0683',\n lowGeneratedIdentifierEntropy: 'PLAY0684',\n responseNameUsedOnFailure: 'PLAY0685',\n // Retired by ESM v16; preserve supplied warnings from earlier native compilers.\n eventIdPinNotCarriedToRenderers: 'PLAY0686',\n} as const;\n\nexport type DiagnosticCode = (typeof diagnosticCodes)[keyof typeof diagnosticCodes];\n"],"mappings":"AAWA,MAAaA,EAAkB,CAC3B,yBAA0B,WAC1B,uBAAwB,WACxB,oBAAqB,WACrB,oBAAqB,WACrB,mCAAoC,WACpC,gCAAiC,WACjC,uCAAwC,WACxC,2CAA4C,WAC5C,8BAA+B,WAC/B,iCAAkC,WAClC,gCAAiC,WACjC,mBAAoB,WACpB,sBAAuB,WACvB,qCAAsC,WACtC,+BAAgC,WAChC,mCAAoC,WACpC,uCAAwC,WACxC,2BAA4B,WAC5B,qBAAsB,WACtB,gBAAiB,WACjB,iBAAkB,WAClB,4BAA6B,WAC7B,4BAA6B,WAC7B,uBAAwB,WACxB,yBAA0B,WAC1B,2BAA4B,WAC5B,wBAAyB,WACzB,sBAAuB,WACvB,6BAA8B,WAC9B,6BAA8B,WAC9B,+BAAgC,WAChC,qBAAsB,WACtB,wBAAyB,WACzB,4BAA6B,WAC7B,yBAA0B,WAC1B,0BAA2B,WAC3B,2BAA4B,WAC5B,8BAA+B,WAC/B,2BAA4B,WAC5B,0BAA2B,WAC3B,0BAA2B,WAC3B,yBAA0B,WAC1B,uBAAwB,WACxB,0BAA2B,WAC3B,2BAA4B,WAC5B,kBAAmB,WACnB,sBAAuB,WACvB,s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AA4B,WAC5B,0BAA2B,WAC3B,iCAAkC,WAClC,uBAAwB,WACxB,gCAAiC,WACjC,iBAAkB,WAClB,eAAgB,WAChB,qBAAsB,WACtB,0BAA2B,WAC3B,sBAAuB,WACvB,2BAA4B,WAC5B,0BAA2B,WAC3B,eAAgB,WAChB,qBAAsB,WACtB,mCAAoC,WACpC,iBAAkB,WAClB,2BAA4B,WAC5B,mBAAoB,WACpB,+BAAgC,WAChC,+BAAgC,WAChC,kBAAmB,WACnB,YAAa,WACb,aAAc,WACd,cAAe,WACf,qBAAsB,WACtB,0BAA2B,WAC3B,wBAAyB,WACzB,gCAAiC,WACjC,wBAAyB,WACzB,2BAA4B,WAC5B,kBAAmB,WACnB,6BAA8B,WAC9B,qBAAsB,WACtB,6BAA8B,WAC9B,0BAA2B,WAC3B,6BAA8B,WAC9B,gCAAiC,WACjC,qBAAsB,WACtB,8BAA+B,WAC/B,uBAAwB,WACxB,uBAAwB,WACxB,sBAAuB,WACvB,uBAAwB,WACxB,qBAAsB,WACtB,wBAAyB,WACzB,yBAA0B,WAC1B,0BAA2B,WAC3B,0BAA2B,WAC3B,0BAA2B,WAC3B,4BAA6B,WAC7B,oBAAqB,WACrB,2BAA4B,WAC5B,wBAAyB,WACzB,0BAA2B,WAC3B,oBAAqB,WACrB,2BAA4B,WAC5B,2BAA4B,WAC5B,qBAAsB,WACtB,8BAA+B,WAC/B,0BAA2B,WAE3B,gCAAiC,UACrC"}
1
+ {"version":3,"file":"diagnostic-codes.js","names":["diagnosticCodes"],"sources":["../../diagnostic-codes.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// The PLAY codes the editor reports. Every one of them mirrors a condition the compiler checks and\n// carries the compiler's own code for it, so the same problem is called the same thing whether it was\n// found by the CLI or by a squiggle - see Documentation/screenplay/diagnostics.md for the catalogue.\n//\n// A code is only ever added here for a condition the compiler can also report. The editor makes a few\n// structural checks the compiler does not - the capture and projection validators are where they live -\n// and those stay codeless deliberately: minting a PLAY number for something no compiler run can emit\n// would make the catalogue describe two different tools.\nexport const diagnosticCodes = {\n repeatedPassiveDirective: 'PLAY0858',\n conditionDepthExceeded: 'PLAY0861',\n invalidSemanticBinding: 'PLAY0273',\n unknownMatchPattern: 'PLAY0366',\n invalidMatchPattern: 'PLAY0367',\n patternOutsidePortableMatchDialect: 'PLAY0699',\n deprecatedStudioTextRulePattern: 'PLAY0787',\n repeatedSingularDeclarationAcrossFiles: 'PLAY0172',\n directionlessTranslationReactsToOwnCapture: 'PLAY0694',\n pendingIntentWithOtherHandler: 'PLAY0698',\n commandHandlerRequiresAttachment: 'PLAY0800', // C# only\n duplicateEventInProjectionScope: 'PLAY0801',\n reservedStoredName: 'PLAY0802',\n ambiguousMatchPattern: 'PLAY0803',\n contextSourcedPerformedQueryArgument: 'PLAY0810', // C# only\n describedCommandNotImplemented: 'PLAY0695', // C# only\n describedCommandWithoutProductions: 'PLAY0696', // C# only\n describedCommandCardinalityNotAdmitted: 'PLAY0697', // C# only\n invalidExposureDeclaration: 'PLAY0621',\n unknownExposureOwner: 'PLAY0622',\n reExposureCycle: 'PLAY0623',\n reExposureBroken: 'PLAY0624',\n invalidInstanceContribution: 'PLAY0625',\n unknownContributionInstance: 'PLAY0626',\n contributionNotExposed: 'PLAY0627',\n contributionTypeMismatch: 'PLAY0628',\n unknownTemplateContentSlot: 'PLAY0629',\n unknownNavigationOutlet: 'PLAY0630',\n templateScopeMismatch: 'PLAY0631',\n incompatibleComponentPackage: 'PLAY0632',\n unknownNavigationDestination: 'PLAY0654',\n unknownScreenContributionPoint: 'PLAY0655',\n templateNestingCycle: 'PLAY0656',\n templateCategoryMissing: 'PLAY0720',\n invalidTemplateVersionRange: 'PLAY0721',\n unknownTemplateBlueprint: 'PLAY0722',\n mixedEnumerationNumbering: 'PLAY0667',\n duplicateEnumerationNumber: 'PLAY0668',\n enumerationNumberOutsideInt32: 'PLAY0669',\n malformedEnumerationNumber: 'PLAY0670',\n unpinnedStoredEnumeration: 'PLAY0671',\n invalidContextDeclaration: 'PLAY0854',\n unknownContextMemberType: 'PLAY0855',\n duplicateContextMember: 'PLAY0856',\n reservedContextMemberName: 'PLAY0857',\n invalidIdentityDeclaration: 'PLAY0633',\n duplicateIdentity: 'PLAY0634',\n invalidIdentityDetail: 'PLAY0635',\n unknownIdentitySource: 'PLAY0636',\n identityDetailWithoutSource: 'PLAY0637',\n identitySourceWithBody: 'PLAY0638',\n duplicateIdentityDetail: 'PLAY0639',\n builtInIdentityDetail: 'PLAY0640',\n unknownIdentityQuery: 'PLAY0641',\n invalidIdentityQuery: 'PLAY0642',\n identityQueryWithoutKey: 'PLAY0643',\n invalidIdentityQueryKey: 'PLAY0644',\n identityQueryAuthorizationDependency: 'PLAY0645',\n identityQueryTypeMismatch: 'PLAY0646',\n invalidReactionIdentity: 'PLAY0647',\n gatedInvocationWithoutIdentity: 'PLAY0648',\n unusedReactionIdentity: 'PLAY0649',\n unusedReactionRole: 'PLAY0650',\n unsatisfiedReactionIdentity: 'PLAY0651',\n reactionPrivilegeEscalation: 'PLAY0652',\n // Preserve supplied C# whole-model diagnostics; these checks are not yet run by the editor.\n commandProducesPublicEvent: 'PLAY0607',\n publicEventRequiresOutboundTranslation: 'PLAY0608',\n outboundPublicEventCount: 'PLAY0609',\n foreignPublicEventConsumer: 'PLAY0610',\n outboundTranslationInput: 'PLAY0611',\n inboundTranslationOutput: 'PLAY0612',\n foreignPublicEventProduced: 'PLAY0613',\n publicTranslationRequiresDirection: 'PLAY0614',\n translationConstructDirection: 'PLAY0615',\n inboundTranslationInput: 'PLAY0616',\n outboundTranslationOutput: 'PLAY0617',\n eventTargetOutsideOutboundTranslation: 'PLAY0618',\n eventsSourceOutsideInboundTranslation: 'PLAY0619',\n invalidCaptureEventsSource: 'PLAY0620',\n captureEventsFromSeveralOrigins: 'PLAY0687',\n captureEventsKeyNotRequired: 'PLAY0700',\n captureEventSourceKeyOutsideEvents: 'PLAY0809',\n captureEventsRecordFixture: 'PLAY0701',\n refutedGeneratedConceptRule: 'PLAY0688',\n unprovenGeneratedConceptRule: 'PLAY0689',\n invalidReadModelKey: 'PLAY0660',\n incompleteReadModelKey: 'PLAY0661',\n invalidReadModelKeyLookup: 'PLAY0662',\n productionRouteOutsideCommand: 'PLAY0663',\n redundantProductionRoute: 'PLAY0664',\n invalidObserverFilter: 'PLAY0665',\n observerFilterExcludesEveryProducer: 'PLAY0666',\n reducerIdentityMismatch: 'PLAY0690',\n generationSupportBudgetExceeded: 'PLAY0691',\n emptyGenerationSupport: 'PLAY0692',\n invalidReactionBatchesDeclaration: 'PLAY0693',\n invalidCommandReadsDeclaration: 'PLAY0780',\n invalidTimeZoneDeclaration: 'PLAY0812',\n invalidCommandCalendar: 'PLAY0813',\n invalidSpecificationTimeZone: 'PLAY0814',\n invalidSpecificationInvocation: 'PLAY0815',\n invalidDescription: 'PLAY0145',\n emptyDescription: 'PLAY0146',\n duplicateDescription: 'PLAY0147',\n unknownConceptDirective: 'PLAY0010',\n attributeReasonWithoutAttribute: 'PLAY0012',\n duplicateAttributeReason: 'PLAY0013',\n duplicateComplianceMarker: 'PLAY0653',\n legacyComplianceMarker: 'PLAY0565',\n unknownComplianceMarker: 'PLAY0566',\n invalidSecretScope: 'PLAY0567',\n duplicateSecretScope: 'PLAY0568',\n secretScopeIgnoredForPii: 'PLAY0569',\n invalidPersonalDataQualifier: 'PLAY0570',\n duplicateSpecialCategory: 'PLAY0571',\n invalidPurposeDeclaration: 'PLAY0596',\n invalidPurposeVocabulary: 'PLAY0597',\n duplicatePurposeField: 'PLAY0598',\n duplicatePurposeDeclaration: 'PLAY0599',\n unknownPurpose: 'PLAY0600',\n purposeInterestMismatch: 'PLAY0601',\n personalDataWithoutPurpose: 'PLAY0602',\n specialDataWithoutCondition: 'PLAY0603',\n criminalDataWithoutAuthorization: 'PLAY0604',\n purposeWithoutBasis: 'PLAY0605',\n unusedPurpose: 'PLAY0606',\n duplicateEventSubject: 'PLAY0590',\n invalidSubjectType: 'PLAY0591',\n protectedSubjectType: 'PLAY0592',\n invalidSubjectOwner: 'PLAY0593',\n readModelSubjectNotSupported: 'PLAY0594',\n invalidSubjectModifierOrder: 'PLAY0595',\n // Supplied compiler diagnostics are preserved, even for checks only the C# tool can run.\n // See Documentation/screenplay/editor-diagnostics.md for the validation boundary.\n conflictingScreenDataBinding: 'PLAY0530',\n screenDataQueryMismatch: 'PLAY0531',\n actionWithoutInputSurface: 'PLAY0532',\n commandWithoutInputSurface: 'PLAY0533',\n readModelFieldWithoutOrigin: 'PLAY0534',\n queryParameterNotHeldByView: 'PLAY0535',\n unconsumedEvent: 'PLAY0536',\n unreachableScreen: 'PLAY0537',\n invalidSpecificationCallerPersona: 'PLAY0572',\n unsynthesizablePersonaCaller: 'PLAY0573',\n personaWithoutGate: 'PLAY0574',\n gateWithoutPersona: 'PLAY0575',\n ambiguousPersonaCaller: 'PLAY0576',\n invalidSpecificationParameter: 'PLAY0577',\n invalidSpecificationCase: 'PLAY0578',\n duplicateSpecificationParameter: 'PLAY0579',\n duplicateSpecificationCase: 'PLAY0580',\n incompleteSpecificationTable: 'PLAY0581',\n invalidSpecificationCaseAssignment: 'PLAY0582',\n invalidSpecificationCaseValue: 'PLAY0583',\n invalidSpecificationCaseReference: 'PLAY0584',\n optionalSpecificationParameterTarget: 'PLAY0585',\n specificationCaseNameCollision: 'PLAY0586',\n incompatibleSpecificationParameterType: 'PLAY0587',\n unusedSpecificationParameter: 'PLAY0588',\n singularSpecificationTableExpansion: 'PLAY0589',\n invalidActionAlternative: 'PLAY0341',\n guardedActionWithoutAlternatives: 'PLAY0342',\n misplacedActionOtherwise: 'PLAY0343',\n unsupportedActionConditionOperand: 'PLAY0344',\n unknownActionSubjectField: 'PLAY0345',\n unresolvedActionSubject: 'PLAY0346',\n invalidActionSubjectClause: 'PLAY0817',\n inferredActionSubject: 'PLAY0818',\n changedActionSubject: 'PLAY0819',\n ambiguousActionInputBinding: 'PLAY0820',\n unsupportedActionSubjectContext: 'PLAY0821',\n unreachableActionAlternative: 'PLAY0347',\n unknownActionArgumentProperty: 'PLAY0348',\n invalidRefusalBranch: 'PLAY0538',\n invalidRefusalBranchBody: 'PLAY0539',\n unreachableRefusalBranch: 'PLAY0540',\n invalidRefusalValue: 'PLAY0541',\n unknownRefusalConstraint: 'PLAY0542',\n unmatchedRedeliveredOccurrence: 'PLAY0543',\n unknownRedeliveryReaction: 'PLAY0544',\n invalidNoEventsExpectation: 'PLAY0545',\n indeterminateNegatedClaimTarget: 'PLAY0546',\n invalidAbsentReadModelStep: 'PLAY0453',\n unknownConstraintProperty: 'PLAY0391',\n invalidSpecificationExample: 'PLAY0518',\n duplicateSpecificationAssignment: 'PLAY0519',\n unknownReadModelProperty: 'PLAY0514',\n piiNotSupportedOnIdentifier: 'PLAY0515',\n invalidEventSourceDeclaration: 'PLAY0503',\n invalidCommandStream: 'PLAY0504',\n invalidSpecificationStream: 'PLAY0547',\n specificationStreamOnCommand: 'PLAY0548',\n invalidSpecificationStreamRoute: 'PLAY0549',\n invalidSpecificationStreamEventSource: 'PLAY0550',\n specificationStreamContradictsCommand: 'PLAY0551',\n ambiguousCommandStream: 'PLAY0505',\n unsupportedStreamIdType: 'PLAY0506',\n redundantSourceStreamId: 'PLAY0507',\n eventFromLaterSlice: 'PLAY0516',\n timelineCycleGroup: 'PLAY0517',\n invalidSpecificationExampleBody: 'PLAY0526',\n undeclaredDependency: 'PLAY0552',\n unusedDependencyDeclaration: 'PLAY0553',\n invalidDependencyTarget: 'PLAY0554',\n repeatedDependencyDeclaration: 'PLAY0555',\n mutualDependencyDeclarations: 'PLAY0556',\n authorizationRefusalWithoutIdentity: 'PLAY0557',\n invalidDocumentation: 'PLAY0558',\n conflictingDocumentationAcrossFiles: 'PLAY0559',\n unsupportedInteractionAlternatives: 'PLAY0560',\n mixedInteractionAlternatives: 'PLAY0561',\n interactionAlternativeWithoutActions: 'PLAY0562',\n inlineInteractionAlternative: 'PLAY0563',\n legacyInteractionWhere: 'PLAY0564',\n ambiguousReference: 'PLAY0198',\n invalidImplementationBlock: 'PLAY0492',\n invalidImplementationHint: 'PLAY0493',\n conflictingImplementationSources: 'PLAY0494',\n eventSourceIdInPayload: 'PLAY0469',\n explicitProducesTargetsRequired: 'PLAY0470',\n redundantEventId: 'PLAY0471',\n invalidEventId: 'PLAY0472',\n inlineEventCollision: 'PLAY0473',\n inlineEventOutsideCommand: 'PLAY0474',\n inlineEventGeneration: 'PLAY0475',\n reservedProductionMetadata: 'PLAY0476',\n invalidEventDocumentation: 'PLAY0477',\n tabIndentation: 'PLAY0006',\n unknownPrimitiveType: 'PLAY0008',\n mismatchedSpecificationQueryResult: 'PLAY0465',\n unknownSliceType: 'PLAY0028',\n duplicateCommandIdentifier: 'PLAY0036',\n unknownContextPath: 'PLAY0153',\n unknownContextCausedByProperty: 'PLAY0154',\n unknownContextIdentityProperty: 'PLAY0155',\n unclosedCodeBlock: 'PLAY0164',\n unknownType: 'PLAY0165',\n unknownEvent: 'PLAY0166',\n unknownPolicy: 'PLAY0167',\n duplicateDeclaration: 'PLAY0168',\n unknownEventContextMember: 'PLAY0295',\n unknownEventContextPath: 'PLAY0296',\n eventContextPathBelowCollection: 'PLAY0297',\n missingEventContextPath: 'PLAY0298',\n unresolvedDynamicKeySource: 'PLAY0299',\n invalidFileImport: 'PLAY0454',\n omittedProductionDestination: 'PLAY0478',\n legacyOptionalSuffix: 'PLAY0479',\n invalidOptionalModifierOrder: 'PLAY0480',\n optionalReadsNotSupported: 'PLAY0481',\n unavailableResponseExecution: 'PLAY0268',\n generatedPropertyOutsideCommand: 'PLAY0482',\n invalidGeneratedType: 'PLAY0483',\n invalidGeneratedModifierOrder: 'PLAY0484',\n generatedPropertyInput: 'PLAY0485',\n invalidCommandResponse: 'PLAY0486',\n invalidResponseSource: 'PLAY0487',\n duplicateResponseField: 'PLAY0488',\n invalidResponseShape: 'PLAY0489',\n invalidGeneratedFixture: 'PLAY0490',\n invalidReturnExpectation: 'PLAY0491',\n unknownGenerationStrategy: 'PLAY0672',\n invalidGenerationArgument: 'PLAY0673',\n invalidGenerationModifier: 'PLAY0674',\n duplicateGenerationModifier: 'PLAY0675',\n duplicateGeneration: 'PLAY0676',\n invalidGenerationPrimitive: 'PLAY0677',\n invalidGenerationPrefix: 'PLAY0678',\n invalidGenerationAlphabet: 'PLAY0679',\n invalidTypeIdPrefix: 'PLAY0680',\n generationSizeOutsideRange: 'PLAY0681',\n reservedSequenceGeneration: 'PLAY0682',\n lowGenerationEntropy: 'PLAY0683',\n lowGeneratedIdentifierEntropy: 'PLAY0684',\n responseNameUsedOnFailure: 'PLAY0685',\n // Retired by ESM v16; preserve supplied warnings from earlier native compilers.\n eventIdPinNotCarriedToRenderers: 'PLAY0686',\n} as const;\n\nexport type DiagnosticCode = (typeof diagnosticCodes)[keyof typeof diagnosticCodes];\n"],"mappings":"AAWA,MAAaA,EAAkB,CAC3B,yBAA0B,WAC1B,uBAAwB,WACxB,uBAAwB,WACxB,oBAAqB,WACrB,oBAAqB,WACrB,mCAAoC,WACpC,gCAAiC,WACjC,uCAAwC,WACxC,2CAA4C,WAC5C,8BAA+B,WAC/B,iCAAkC,WAClC,gCAAiC,WACjC,mBAAoB,WACpB,sBAAuB,WACvB,qCAAsC,WACtC,+BAAgC,WAChC,mCAAoC,WACpC,uCAAwC,WACxC,2BAA4B,WAC5B,qBAAsB,WACtB,gBAAiB,WACjB,iBAAkB,WAClB,4BAA6B,WAC7B,4BAA6B,WAC7B,uBAAwB,WACxB,yBAA0B,WAC1B,2BAA4B,WAC5B,wBAAyB,WACzB,sBAAuB,WACvB,6BAA8B,WAC9B,6BAA8B,WAC9B,+BAAgC,WAChC,qBAAsB,WACtB,wBAAyB,WACzB,4BAA6B,WAC7B,yBAA0B,WAC1B,0BAA2B,WAC3B,2BAA4B,WAC5B,8BAA+B,WAC/B,2BAA4B,WAC5B,0BAA2B,WAC3B,0BAA2B,WAC3B,yBAA0B,WAC1B,uBAAwB,WACxB,0B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AAsC,WACtC,6BAA8B,WAC9B,uBAAwB,WACxB,mBAAoB,WACpB,2BAA4B,WAC5B,0BAA2B,WAC3B,iCAAkC,WAClC,uBAAwB,WACxB,gCAAiC,WACjC,iBAAkB,WAClB,eAAgB,WAChB,qBAAsB,WACtB,0BAA2B,WAC3B,sBAAuB,WACvB,2BAA4B,WAC5B,0BAA2B,WAC3B,eAAgB,WAChB,qBAAsB,WACtB,mCAAoC,WACpC,iBAAkB,WAClB,2BAA4B,WAC5B,mBAAoB,WACpB,+BAAgC,WAChC,+BAAgC,WAChC,kBAAmB,WACnB,YAAa,WACb,aAAc,WACd,cAAe,WACf,qBAAsB,WACtB,0BAA2B,WAC3B,wBAAyB,WACzB,gCAAiC,WACjC,wBAAyB,WACzB,2BAA4B,WAC5B,kBAAmB,WACnB,6BAA8B,WAC9B,qBAAsB,WACtB,6BAA8B,WAC9B,0BAA2B,WAC3B,6BAA8B,WAC9B,gCAAiC,WACjC,qBAAsB,WACtB,8BAA+B,WAC/B,uBAAwB,WACxB,uBAAwB,WACxB,sBAAuB,WACvB,uBAAwB,WACxB,qBAAsB,WACtB,wBAAyB,WACzB,yBAA0B,WAC1B,0BAA2B,WAC3B,0BAA2B,WAC3B,0BAA2B,WAC3B,4BAA6B,WAC7B,oBAAqB,WACrB,2BAA4B,WAC5B,wBAAyB,WACzB,0BAA2B,WAC3B,oBAAqB,WACrB,2BAA4B,WAC5B,2BAA4B,WAC5B,qBAAsB,WACtB,8BAA+B,WAC/B,0BAA2B,WAE3B,gCAAiC,UACrC,E"}
@@ -1,2 +1,2 @@
1
- import"./_virtual/_virtual/_rolldown/runtime.js";import"./language.js";import{symbolsForBuffer as e}from"./symbols.js";import{validateLines as t}from"./validation.js";const n=`screenplay`;function validate(n,r,i={}){let a=r.getLinesContent(),o=e(a,i.application?.(r));return t(a,{application:o,path:o.authoringPath,placement:o.authoringPlacement}).map(e=>({severity:e.severity===`error`?n.MarkerSeverity.Error:e.severity===`information`?n.MarkerSeverity.Info:n.MarkerSeverity.Warning,tags:e.code===`PLAY0479`||e.code===`PLAY0565`?[n.MarkerTag.Deprecated]:void 0,message:e.message,code:e.code,startLineNumber:e.line+1,startColumn:e.startColumn,endLineNumber:e.line+1,endColumn:e.endColumn}))}function watch(e,t,r){let i,run=()=>{t.isDisposed()||(t.getLanguageId()===`screenplay`?e.editor.setModelMarkers(t,n,validate(e,t,r)):e.editor.setModelMarkers(t,n,[]))},schedule=()=>{i!==void 0&&clearTimeout(i),i=setTimeout(run,300)},a=r.onDidChangeApplication?.(run);t.onDidChangeContent(schedule),t.onDidChangeLanguage(run),t.onWillDispose(()=>{a?.dispose(),i!==void 0&&clearTimeout(i)}),run()}function attachDiagnostics(e,t={}){e.editor.getModels().forEach(n=>watch(e,n,t)),e.editor.onDidCreateModel(n=>watch(e,n,t))}export{attachDiagnostics,validate};
1
+ import"./_virtual/_virtual/_rolldown/runtime.js";import"./language.js";import{validateLines as e}from"./validation.js";import{symbolsForBuffer as t}from"./symbols.js";const n=`screenplay`;function validate(n,r,i={}){let a=r.getLinesContent(),o=t(a,i.application?.(r));return e(a,{application:o,path:o.authoringPath,placement:o.authoringPlacement}).map(e=>({severity:e.severity===`error`?n.MarkerSeverity.Error:e.severity===`information`?n.MarkerSeverity.Info:n.MarkerSeverity.Warning,tags:e.code===`PLAY0479`||e.code===`PLAY0565`?[n.MarkerTag.Deprecated]:void 0,message:e.message,code:e.code,startLineNumber:e.line+1,startColumn:e.startColumn,endLineNumber:e.line+1,endColumn:e.endColumn}))}function watch(e,t,r){let i,run=()=>{t.isDisposed()||(t.getLanguageId()===`screenplay`?e.editor.setModelMarkers(t,n,validate(e,t,r)):e.editor.setModelMarkers(t,n,[]))},schedule=()=>{i!==void 0&&clearTimeout(i),i=setTimeout(run,300)},a=r.onDidChangeApplication?.(run);t.onDidChangeContent(schedule),t.onDidChangeLanguage(run),t.onWillDispose(()=>{a?.dispose(),i!==void 0&&clearTimeout(i)}),run()}function attachDiagnostics(e,t={}){e.editor.getModels().forEach(n=>watch(e,n,t)),e.editor.onDidCreateModel(n=>watch(e,n,t))}export{attachDiagnostics,validate};
2
2
  //# sourceMappingURL=diagnostics.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"diagnostics.js","names":["owner","lines","model","application","symbolsForBuffer","options","validateLines","issue","monaco","handle","contextChange"],"sources":["../../diagnostics.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { editor } from 'monaco-editor';\nimport { Monaco, languageId } from './language';\nimport { validateLines } from './validation';\nimport { CompletionOptions } from './completions';\nimport { symbolsForBuffer } from './symbols';\n\nconst owner = 'screenplay';\nconst validationDelay = 300;\n\nexport function validate(monaco: Monaco, model: editor.ITextModel, options: CompletionOptions = {}): editor.IMarkerData[] {\n const lines = model.getLinesContent();\n const application = symbolsForBuffer(lines, options.application?.(model));\n return validateLines(lines, { application, path: application.authoringPath, placement: application.authoringPlacement }).map((issue) => ({\n severity:\n issue.severity === 'error'\n ? monaco.MarkerSeverity.Error\n : issue.severity === 'information'\n ? monaco.MarkerSeverity.Info\n : monaco.MarkerSeverity.Warning,\n tags: (issue.code === 'PLAY0479' || issue.code === 'PLAY0565') ? [monaco.MarkerTag.Deprecated] : undefined,\n message: issue.message,\n code: issue.code,\n startLineNumber: issue.line + 1,\n startColumn: issue.startColumn,\n endLineNumber: issue.line + 1,\n endColumn: issue.endColumn,\n }));\n}\n\nfunction watch(monaco: Monaco, model: editor.ITextModel, options: CompletionOptions): void {\n let handle: ReturnType<typeof setTimeout> | undefined;\n\n const run = () => {\n if (model.isDisposed()) return;\n if (model.getLanguageId() !== languageId) {\n monaco.editor.setModelMarkers(model, owner, []);\n return;\n }\n monaco.editor.setModelMarkers(model, owner, validate(monaco, model, options));\n };\n const schedule = () => {\n if (handle !== undefined) clearTimeout(handle);\n handle = setTimeout(run, validationDelay);\n };\n\n const contextChange = options.onDidChangeApplication?.(run);\n model.onDidChangeContent(schedule);\n model.onDidChangeLanguage(run);\n model.onWillDispose(() => {\n contextChange?.dispose();\n if (handle !== undefined) clearTimeout(handle);\n });\n run();\n}\n\nexport function attachDiagnostics(monaco: Monaco, options: CompletionOptions = {}): void {\n monaco.editor.getModels().forEach((model) => watch(monaco, model, options));\n monaco.editor.onDidCreateModel((model) => watch(monaco, model, options));\n}\n"],"mappings":"uKASA,MAAMA,EAAQ,aAGd,SAAgB,SAAS,EAAgB,EAA0B,EAA6B,CAAC,EAAyB,CACtH,IAAMC,EAAQC,EAAM,gBAAgB,EAC9BC,EAAcC,EAAiBH,EAAOI,EAAQ,cAAcH,CAAK,CAAC,EACxE,OAAOI,EAAcL,EAAO,CAAE,cAAa,KAAME,EAAY,cAAe,UAAWA,EAAY,kBAAmB,CAAC,CAAC,CAAC,IAAK,IAAW,CACrI,SACII,EAAM,WAAa,QACbC,EAAO,eAAe,MACtBD,EAAM,WAAa,cACfC,EAAO,eAAe,KACtBA,EAAO,eAAe,QACpC,KAAOD,EAAM,OAAS,YAAcA,EAAM,OAAS,WAAc,CAACC,EAAO,UAAU,UAAU,EAAI,IAAA,GACjG,QAASD,EAAM,QACf,KAAMA,EAAM,KACZ,gBAAiBA,EAAM,KAAO,EAC9B,YAAaA,EAAM,YACnB,cAAeA,EAAM,KAAO,EAC5B,UAAWA,EAAM,SACrB,EAAE,CACN,CAEA,SAAS,MAAM,EAAgB,EAA0B,EAAkC,CACvF,IAAIE,EAEE,QAAY,CACVP,EAAM,WAAW,IACjBA,EAAM,cAAc,IAAA,aAIxBM,EAAO,OAAO,gBAAgBN,EAAOF,EAAO,SAASQ,EAAQN,EAAOG,CAAO,CAAC,EAHxEG,EAAO,OAAO,gBAAgBN,EAAOF,EAAO,CAAC,CAAC,EAItD,EACM,aAAiB,CACfS,IAAW,IAAA,IAAW,aAAaA,CAAM,EAC7C,EAAS,WAAW,IAAK,GAAe,CAC5C,EAEMC,EAAgBL,EAAQ,yBAAyB,GAAG,EAC1DH,EAAM,mBAAmB,QAAQ,EACjCA,EAAM,oBAAoB,GAAG,EAC7BA,EAAM,kBAAoB,CACtBQ,GAAe,QAAQ,EACnBD,IAAW,IAAA,IAAW,aAAaA,CAAM,CACjD,CAAC,EACD,IAAI,CACR,CAEA,SAAgB,kBAAkB,EAAgB,EAA6B,CAAC,EAAS,CACrFD,EAAO,OAAO,UAAU,CAAC,CAAC,QAAS,GAAU,MAAMA,EAAQN,EAAOG,CAAO,CAAC,EAC1EG,EAAO,OAAO,iBAAkB,GAAU,MAAMA,EAAQN,EAAOG,CAAO,CAAC,CAC3E"}
1
+ {"version":3,"file":"diagnostics.js","names":["owner","lines","model","application","symbolsForBuffer","options","validateLines","issue","monaco","handle","contextChange"],"sources":["../../diagnostics.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport type { editor } from 'monaco-editor';\nimport { Monaco, languageId } from './language';\nimport { validateLines } from './validation';\nimport { CompletionOptions } from './completions';\nimport { symbolsForBuffer } from './symbols';\n\nconst owner = 'screenplay';\nconst validationDelay = 300;\n\nexport function validate(monaco: Monaco, model: editor.ITextModel, options: CompletionOptions = {}): editor.IMarkerData[] {\n const lines = model.getLinesContent();\n const application = symbolsForBuffer(lines, options.application?.(model));\n return validateLines(lines, { application, path: application.authoringPath, placement: application.authoringPlacement }).map((issue) => ({\n severity:\n issue.severity === 'error'\n ? monaco.MarkerSeverity.Error\n : issue.severity === 'information'\n ? monaco.MarkerSeverity.Info\n : monaco.MarkerSeverity.Warning,\n tags: (issue.code === 'PLAY0479' || issue.code === 'PLAY0565') ? [monaco.MarkerTag.Deprecated] : undefined,\n message: issue.message,\n code: issue.code,\n startLineNumber: issue.line + 1,\n startColumn: issue.startColumn,\n endLineNumber: issue.line + 1,\n endColumn: issue.endColumn,\n }));\n}\n\nfunction watch(monaco: Monaco, model: editor.ITextModel, options: CompletionOptions): void {\n let handle: ReturnType<typeof setTimeout> | undefined;\n\n const run = () => {\n if (model.isDisposed()) return;\n if (model.getLanguageId() !== languageId) {\n monaco.editor.setModelMarkers(model, owner, []);\n return;\n }\n monaco.editor.setModelMarkers(model, owner, validate(monaco, model, options));\n };\n const schedule = () => {\n if (handle !== undefined) clearTimeout(handle);\n handle = setTimeout(run, validationDelay);\n };\n\n const contextChange = options.onDidChangeApplication?.(run);\n model.onDidChangeContent(schedule);\n model.onDidChangeLanguage(run);\n model.onWillDispose(() => {\n contextChange?.dispose();\n if (handle !== undefined) clearTimeout(handle);\n });\n run();\n}\n\nexport function attachDiagnostics(monaco: Monaco, options: CompletionOptions = {}): void {\n monaco.editor.getModels().forEach((model) => watch(monaco, model, options));\n monaco.editor.onDidCreateModel((model) => watch(monaco, model, options));\n}\n"],"mappings":"A,uKASA,MAAMA,EAAQ,aAGd,SAAgB,SAAS,EAAgB,EAA0B,EAA6B,CAAC,EAAyB,CACtH,IAAMC,EAAQC,EAAM,gBAAgB,EAC9BC,EAAcC,EAAiBH,EAAOI,EAAQ,cAAcH,CAAK,CAAC,EACxE,OAAOI,EAAcL,EAAO,CAAE,cAAa,KAAME,EAAY,cAAe,UAAWA,EAAY,kBAAmB,CAAC,CAAC,CAAC,IAAK,IAAW,CACrI,SACII,EAAM,WAAa,QACbC,EAAO,eAAe,MACtBD,EAAM,WAAa,cACfC,EAAO,eAAe,KACtBA,EAAO,eAAe,QACpC,KAAOD,EAAM,OAAS,YAAcA,EAAM,OAAS,WAAc,CAACC,EAAO,UAAU,UAAU,EAAI,IAAA,GACjG,QAASD,EAAM,QACf,KAAMA,EAAM,KACZ,gBAAiBA,EAAM,KAAO,EAC9B,YAAaA,EAAM,YACnB,cAAeA,EAAM,KAAO,EAC5B,UAAWA,EAAM,SACrB,EAAE,CACN,CAEA,SAAS,MAAM,EAAgB,EAA0B,EAAkC,CACvF,IAAIE,EAEE,QAAY,CACVP,EAAM,WAAW,IACjBA,EAAM,cAAc,IAAA,aAIxBM,EAAO,OAAO,gBAAgBN,EAAOF,EAAO,SAASQ,EAAQN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