@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.
- package/dist/bundles/TypeReferenceSymbol.js.map +1 -1
- package/dist/bundles/action-subject-authoring.js.map +1 -1
- package/dist/bundles/bmp-word-characters.js.map +1 -1
- package/dist/bundles/case-authoring.js +1 -1
- package/dist/bundles/case-authoring.js.map +1 -1
- package/dist/bundles/code-actions.js.map +1 -1
- package/dist/bundles/command-read-completions.js.map +1 -1
- package/dist/bundles/compiler/Authoring/ActionSubjectQuickFixes.js +3 -3
- package/dist/bundles/compiler/Authoring/ActionSubjectQuickFixes.js.map +1 -1
- package/dist/bundles/compiler/Authoring/QuickFixes.js +4 -4
- package/dist/bundles/compiler/Authoring/QuickFixes.js.map +1 -1
- package/dist/bundles/compiler/Authoring/StructuredValueQuickFix.js +1 -1
- package/dist/bundles/compiler/Authoring/StructuredValueQuickFix.js.map +1 -1
- package/dist/bundles/compiler/Authoring/TimelineQuickFixContext.js +4 -4
- package/dist/bundles/compiler/Authoring/TimelineQuickFixContext.js.map +1 -1
- package/dist/bundles/compiler/Authoring/TimelineQuickFixImports.js +2 -2
- package/dist/bundles/compiler/Authoring/TimelineQuickFixImports.js.map +1 -1
- package/dist/bundles/compiler/Authoring/TimelineQuickFixes.js +1 -1
- package/dist/bundles/compiler/Authoring/TimelineQuickFixes.js.map +1 -1
- package/dist/bundles/compiler/Dependencies/DeclaredDependencies.js.map +1 -1
- package/dist/bundles/compiler/Dependencies/DeclaredDependencyTargets.js.map +1 -1
- package/dist/bundles/compiler/Dependencies/DependencyGraph.js +1 -1
- package/dist/bundles/compiler/Dependencies/DependencyGraph.js.map +1 -1
- package/dist/bundles/compiler/Dependencies/DependencyKind.js.map +1 -1
- package/dist/bundles/compiler/Dependencies/InvalidDependencyQuery.js.map +1 -1
- package/dist/bundles/compiler/Dependencies/SliceReferences.js.map +1 -1
- package/dist/bundles/compiler/Dependencies/StronglyConnectedGroups.js.map +1 -1
- package/dist/bundles/compiler/Diagnostics/DiagnosticArgument.js.map +1 -1
- package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js +1 -1
- package/dist/bundles/compiler/Diagnostics/DiagnosticCodes.js.map +1 -1
- package/dist/bundles/compiler/Diagnostics/ProductionDestinationDiagnostics.js +1 -1
- package/dist/bundles/compiler/Diagnostics/ProductionDestinationDiagnostics.js.map +1 -1
- package/dist/bundles/compiler/Diagnostics/SourceLocation.js.map +1 -1
- package/dist/bundles/compiler/Files/AuthoredOrder.js +1 -1
- package/dist/bundles/compiler/Files/AuthoredOrder.js.map +1 -1
- package/dist/bundles/compiler/Files/OrderingRoot.js +1 -1
- package/dist/bundles/compiler/Files/OrderingRoot.js.map +1 -1
- package/dist/bundles/compiler/Files/PlayApplicationAssembly.js +1 -1
- package/dist/bundles/compiler/Files/PlayApplicationAssembly.js.map +1 -1
- package/dist/bundles/compiler/Files/PlayDocumentSource.js.map +1 -1
- package/dist/bundles/compiler/Files/PlayFolderMerge.js +1 -1
- package/dist/bundles/compiler/Files/PlayFolderMerge.js.map +1 -1
- package/dist/bundles/compiler/Files/PlayGlob.js +2 -1
- package/dist/bundles/compiler/Files/PlayGlob.js.map +1 -1
- package/dist/bundles/compiler/Files/PlayImports.js +1 -1
- package/dist/bundles/compiler/Files/PlayImports.js.map +1 -1
- package/dist/bundles/compiler/Files/PlayPlacement.js.map +1 -1
- package/dist/bundles/compiler/Files/TimelineOrder.js +1 -1
- package/dist/bundles/compiler/Files/TimelineOrder.js.map +1 -1
- package/dist/bundles/compiler/Generation/FiniteGenerationRules.js +1 -1
- package/dist/bundles/compiler/Generation/GenerationAssessmentCache.js.map +1 -1
- package/dist/bundles/compiler/Generation/GenerationChecksum.js.map +1 -1
- package/dist/bundles/compiler/Generation/GenerationPattern.js +1 -1
- package/dist/bundles/compiler/Generation/GenerationPattern.js.map +1 -1
- package/dist/bundles/compiler/Generation/GenerationPatternAssessment.js.map +1 -1
- package/dist/bundles/compiler/Generation/GenerationPatternParser.js.map +1 -1
- package/dist/bundles/compiler/Generation/GenerationPatternToken.js.map +1 -1
- package/dist/bundles/compiler/Generation/GenerationRuleProof.js +1 -1
- package/dist/bundles/compiler/Generation/InvalidGenerationPattern.js.map +1 -1
- package/dist/bundles/compiler/Generation/RegexCharacters.js.map +1 -1
- package/dist/bundles/compiler/Generation/RegexExpression.js.map +1 -1
- package/dist/bundles/compiler/Generation/RuleConsistency.js +1 -1
- package/dist/bundles/compiler/Parsing/ActionSubjectClause.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ActionSubjectInputs.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ActionSubjectResolution.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ApplicationContextParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ApplicationContextParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/AuthorizeParser.js +1 -1
- package/dist/bundles/compiler/Parsing/AuthorizeParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CanvasPlacement.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CaptureEventFixturesValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CaptureParser.js +1 -1
- package/dist/bundles/compiler/Parsing/CaptureParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ClockOperandParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CodeBlockParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CommandDestinationTypes.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CommandHandlerValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CommandParser.js +1 -1
- package/dist/bundles/compiler/Parsing/CommandParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CommandReadSources.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CommandResponseParser.js +1 -1
- package/dist/bundles/compiler/Parsing/CommandResponseParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CommandStreamCandidates.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CompositeStreamIdValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/CompositionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/CompositionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ConceptComplianceParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ConceptComplianceParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ConditionDepthBudget.js +2 -0
- package/dist/bundles/compiler/Parsing/ConditionDepthBudget.js.map +1 -0
- package/dist/bundles/compiler/Parsing/ConditionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ConditionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ConstraintParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ConstraintParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ConstraintPropertyValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/ConstraintPropertyValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ContinuationValues.js.map +1 -1
- package/dist/bundles/compiler/Parsing/DeclarationParsers.js +1 -1
- package/dist/bundles/compiler/Parsing/DeclarationParsers.js.map +1 -1
- package/dist/bundles/compiler/Parsing/DependencySourceParser.js +1 -1
- package/dist/bundles/compiler/Parsing/DependencySourceParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/DependsOnParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/DescriptionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/DescriptionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/DocumentationParser.js +1 -1
- package/dist/bundles/compiler/Parsing/DocumentationParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/EnumerationMembers.js +1 -1
- package/dist/bundles/compiler/Parsing/EnumerationMembers.js.map +1 -1
- package/dist/bundles/compiler/Parsing/EventMetadataParser.js +1 -1
- package/dist/bundles/compiler/Parsing/EventMetadataParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/EventSourceParser.js +1 -1
- package/dist/bundles/compiler/Parsing/EventSourceParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/EventSourceValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/EventSourceValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/EventSubjectValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/EventSubjectValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ExpressionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ExpressionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/FeatureBody.js +1 -1
- package/dist/bundles/compiler/Parsing/FeatureBody.js.map +1 -1
- package/dist/bundles/compiler/Parsing/FileImportParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/FileReferences.js.map +1 -1
- package/dist/bundles/compiler/Parsing/FoldedEventSources.js.map +1 -1
- package/dist/bundles/compiler/Parsing/GenerationBodyParser.js +1 -1
- package/dist/bundles/compiler/Parsing/GenerationBodyParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/GenerationParser.js +1 -1
- package/dist/bundles/compiler/Parsing/GenerationParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/GuardedActionInputs.js.map +1 -1
- package/dist/bundles/compiler/Parsing/GuardedActionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/GuardedActionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/GuardedActionShadowing.js.map +1 -1
- package/dist/bundles/compiler/Parsing/GuardedActionValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/GuardedActionValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/GuardedInteractions.js +1 -1
- package/dist/bundles/compiler/Parsing/GuardedInteractions.js.map +1 -1
- package/dist/bundles/compiler/Parsing/IdentifierComplianceValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/IdentifierComplianceValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/IdentityParser.js +1 -1
- package/dist/bundles/compiler/Parsing/IdentityParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/IdentityValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ImplementationParser.js +2 -2
- package/dist/bundles/compiler/Parsing/ImplementationParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ImportDiscovery.js +1 -1
- package/dist/bundles/compiler/Parsing/ImportDiscovery.js.map +1 -1
- package/dist/bundles/compiler/Parsing/InlineEventValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/InputUses.js +1 -1
- package/dist/bundles/compiler/Parsing/InputUses.js.map +1 -1
- package/dist/bundles/compiler/Parsing/InteractionAlternatives.js +1 -1
- package/dist/bundles/compiler/Parsing/InteractionAlternatives.js.map +1 -1
- package/dist/bundles/compiler/Parsing/InteractionExecutions.js +1 -1
- package/dist/bundles/compiler/Parsing/InteractionExecutions.js.map +1 -1
- package/dist/bundles/compiler/Parsing/LegacyTextRulePatterns.js.map +1 -1
- package/dist/bundles/compiler/Parsing/LineReader.js.map +1 -1
- package/dist/bundles/compiler/Parsing/LineText.js.map +1 -1
- package/dist/bundles/compiler/Parsing/MatchAmbiguity.js +1 -1
- package/dist/bundles/compiler/Parsing/MatchAmbiguity.js.map +1 -1
- package/dist/bundles/compiler/Parsing/MatchAmbiguityCharacters.js.map +1 -1
- package/dist/bundles/compiler/Parsing/MatchAmbiguityGraph.js.map +1 -1
- package/dist/bundles/compiler/Parsing/MatchAmbiguityParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/MatchOperandValidation.js +1 -1
- package/dist/bundles/compiler/Parsing/MatchOperandValidation.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ModuleBody.js +1 -1
- package/dist/bundles/compiler/Parsing/ModuleBody.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ObserverFilterParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ObserverFilterParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ObserverFilterValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/OperationParser.js +1 -1
- package/dist/bundles/compiler/Parsing/OperationParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/OperationValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/OperationValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ParserContext.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PersonaCallerValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PolicyParser.js +1 -1
- package/dist/bundles/compiler/Parsing/PolicyParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PortableMatchGroupName.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PortableMatchPattern.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PortableMatchSuggestions.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PossibleEventsParser.js +1 -1
- package/dist/bundles/compiler/Parsing/PossibleEventsParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ProducesParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ProducesParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ProjectionEventScopeValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ProjectionExpressionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ProjectionExpressionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ProjectionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ProjectionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ProjectionTargetValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/ProjectionTargetValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PropertyLineParser.js +1 -1
- package/dist/bundles/compiler/Parsing/PropertyLineParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PublicEventMetadataValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/PublicEventMetadataValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PublicEventUsageCollector.js +1 -1
- package/dist/bundles/compiler/Parsing/PublicEventUsageCollector.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PublicEventUsageValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/PublicEventUsageValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PurposeParser.js +1 -1
- package/dist/bundles/compiler/Parsing/PurposeParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/PurposeValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/QueryParser.js +1 -1
- package/dist/bundles/compiler/Parsing/QueryParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ReactionIdentityParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ReactionIdentityParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ReactionParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ReactionParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ReactionRefusalValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/ReactionRefusalValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ReadModelKeyValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ReadModelMemberTypeValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ReadsParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ReadsParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/RedeliveryValues.js.map +1 -1
- package/dist/bundles/compiler/Parsing/RefusalDeclarations.js +1 -1
- package/dist/bundles/compiler/Parsing/RefusalDeclarations.js.map +1 -1
- package/dist/bundles/compiler/Parsing/RefusalValueWalker.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ResponseCommandResolver.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ResponseDateValues.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ResponseValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/ResponseValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ScreenParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ScreenParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/ScreenplayParser.js +1 -1
- package/dist/bundles/compiler/Parsing/ScreenplayParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SeedParser.js +1 -1
- package/dist/bundles/compiler/Parsing/SeedParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SliceParser.js +1 -1
- package/dist/bundles/compiler/Parsing/SliceParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SourceLine.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SourceLineSplitter.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SourceOptionsParser.js +1 -1
- package/dist/bundles/compiler/Parsing/SourceOptionsParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationCaseParser.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationCaseParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationCaseValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationCaseValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationCommandExamples.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationCommandExamples.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationExampleParser.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationExampleParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationParser.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationRedeliveryValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationRedeliveryValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationResponseParser.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationResponseParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationRouteComparison.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationRouteComparison.js.map +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationStreamValidator.js +1 -1
- package/dist/bundles/compiler/Parsing/SpecificationStreamValidator.js.map +1 -1
- package/dist/bundles/compiler/Parsing/StateMachineParser.js +1 -1
- package/dist/bundles/compiler/Parsing/StateMachineParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/StructuralInteractionSites.js.map +1 -1
- package/dist/bundles/compiler/Parsing/StructuredBlockParser.js +1 -1
- package/dist/bundles/compiler/Parsing/StructuredBlockParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/StructuredValueParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/TemplateReferenceText.js +1 -1
- package/dist/bundles/compiler/Parsing/TemplateReferenceText.js.map +1 -1
- package/dist/bundles/compiler/Parsing/TriggerDataParser.js +1 -1
- package/dist/bundles/compiler/Parsing/TriggerDataParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/UiBindingParser.js +1 -1
- package/dist/bundles/compiler/Parsing/UiBindingParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/UiProfileLegacyLayout.js +1 -1
- package/dist/bundles/compiler/Parsing/UiProfileLegacyLayout.js.map +1 -1
- package/dist/bundles/compiler/Parsing/WorkflowParser.js +1 -1
- package/dist/bundles/compiler/Parsing/WorkflowParser.js.map +1 -1
- package/dist/bundles/compiler/Parsing/checkPortableMatchPattern.js.map +1 -1
- package/dist/bundles/compiler/Parsing/hasExponentialMatchAmbiguity.js.map +1 -1
- package/dist/bundles/compiler/Parsing/trimMatchAmbiguityGraph.js.map +1 -1
- package/dist/bundles/compiler/ScreenActionSubjects.js.map +1 -1
- package/dist/bundles/compiler/ScreenplayCompiler.js +1 -1
- package/dist/bundles/compiler/ScreenplayCompiler.js.map +1 -1
- package/dist/bundles/compiler/Syntax/ActionSubjectInvariants.js.map +1 -1
- package/dist/bundles/compiler/Syntax/AuthoringProductionResolver.js.map +1 -1
- package/dist/bundles/compiler/Syntax/CaptureEventsSource.js.map +1 -1
- package/dist/bundles/compiler/Syntax/DependencySources.js.map +1 -1
- package/dist/bundles/compiler/Syntax/EventDeclarations.js.map +1 -1
- package/dist/bundles/compiler/Syntax/EventSourceCatalog.js.map +1 -1
- package/dist/bundles/compiler/Syntax/EventSourceReadConfidence.js.map +1 -1
- package/dist/bundles/compiler/Syntax/ExactMathFacts.js.map +1 -1
- package/dist/bundles/compiler/Syntax/ExactNumber.js.map +1 -1
- package/dist/bundles/compiler/Syntax/InvalidSyntaxJson.js.map +1 -1
- package/dist/bundles/compiler/Syntax/LegacyWireProjection.js.map +1 -1
- package/dist/bundles/compiler/Syntax/Operations.js.map +1 -1
- package/dist/bundles/compiler/Syntax/PersonaCallers.js.map +1 -1
- package/dist/bundles/compiler/Syntax/ProductionDestinations.js.map +1 -1
- package/dist/bundles/compiler/Syntax/PublicEventInvariants.js.map +1 -1
- package/dist/bundles/compiler/Syntax/ScreenplaySyntaxWalker.js.map +1 -1
- package/dist/bundles/compiler/Syntax/SourceOptions.js.map +1 -1
- package/dist/bundles/compiler/Syntax/SpecificationCaseOrigin.js.map +1 -1
- package/dist/bundles/compiler/Syntax/StreamIdFormatter.js.map +1 -1
- package/dist/bundles/compiler/Syntax/StrictSyntaxJson.js +1 -1
- package/dist/bundles/compiler/Syntax/Structure.js.map +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxCollections.js.map +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxInvariants.js +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxInvariants.js.map +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxJson.js +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxJson.js.map +1 -1
- package/dist/bundles/compiler/Syntax/SyntaxMemberContracts.js.map +1 -1
- package/dist/bundles/compiler/Syntax/index.js +1 -1
- package/dist/bundles/compiler/Text/ImplementationHintText.js.map +1 -1
- package/dist/bundles/compiler/Text/ReservedWords.js.map +1 -1
- package/dist/bundles/compiler/Text/SourceStreamNames.js.map +1 -1
- package/dist/bundles/compiler/Text/StringLiteral.js.map +1 -1
- package/dist/bundles/compiler/Text/ordinalIgnoreCaseKey.js.map +1 -1
- package/dist/bundles/compiler/Text/patterns.js.map +1 -1
- package/dist/bundles/compiler/index.js +1 -1
- package/dist/bundles/completion-items.js +4 -4
- package/dist/bundles/completion-items.js.map +1 -1
- package/dist/bundles/completion-planner.js +2 -2
- package/dist/bundles/completion-planner.js.map +1 -1
- package/dist/bundles/completions.js +1 -1
- package/dist/bundles/completions.js.map +1 -1
- package/dist/bundles/continuation-responses.js +1 -1
- package/dist/bundles/continuation-responses.js.map +1 -1
- package/dist/bundles/declarations.js.map +1 -1
- package/dist/bundles/dependency-completions.js.map +1 -1
- package/dist/bundles/dependency-target-analysis.js.map +1 -1
- package/dist/bundles/diagnostic-codes.js +1 -1
- package/dist/bundles/diagnostic-codes.js.map +1 -1
- package/dist/bundles/diagnostics.js +1 -1
- package/dist/bundles/diagnostics.js.map +1 -1
- package/dist/bundles/document-context.js.map +1 -1
- package/dist/bundles/documentation-item.js.map +1 -1
- package/dist/bundles/event-analysis-source.js.map +1 -1
- package/dist/bundles/event-context-catalog.js.map +1 -1
- package/dist/bundles/event-context.js.map +1 -1
- package/dist/bundles/event-source-authoring.js +11 -11
- package/dist/bundles/event-source-authoring.js.map +1 -1
- package/dist/bundles/example-analysis.js +2 -2
- package/dist/bundles/example-analysis.js.map +1 -1
- package/dist/bundles/example-authoring.js +2 -2
- package/dist/bundles/example-authoring.js.map +1 -1
- package/dist/bundles/example-declaration-items.js.map +1 -1
- package/dist/bundles/example-values.js.map +1 -1
- package/dist/bundles/file-imports.js.map +1 -1
- package/dist/bundles/file-references.js.map +1 -1
- package/dist/bundles/generation-completions.js.map +1 -1
- package/dist/bundles/hover-content.js +5 -5
- package/dist/bundles/hover-content.js.map +1 -1
- package/dist/bundles/hover.js.map +1 -1
- package/dist/bundles/index.js +1 -1
- package/dist/bundles/index.js.map +1 -1
- package/dist/bundles/inlay-hints.js.map +1 -1
- package/dist/bundles/inline-completions.js +1 -1
- package/dist/bundles/inline-completions.js.map +1 -1
- package/dist/bundles/inline-event-validation.js +1 -1
- package/dist/bundles/inline-event-validation.js.map +1 -1
- package/dist/bundles/keyword-docs.js.map +1 -1
- package/dist/bundles/language.js.map +1 -1
- package/dist/bundles/named-rule-context.js.map +1 -1
- package/dist/bundles/operation-authoring.js +6 -6
- package/dist/bundles/operation-authoring.js.map +1 -1
- package/dist/bundles/persona-analysis.js +1 -1
- package/dist/bundles/persona-analysis.js.map +1 -1
- package/dist/bundles/production-destinations.js +1 -1
- package/dist/bundles/production-destinations.js.map +1 -1
- package/dist/bundles/purpose-items.js.map +1 -1
- package/dist/bundles/reaction-authoring.js +3 -3
- package/dist/bundles/reaction-authoring.js.map +1 -1
- package/dist/bundles/read-model-key-completions.js +1 -1
- package/dist/bundles/read-model-key-completions.js.map +1 -1
- package/dist/bundles/refusal-context.js.map +1 -1
- package/dist/bundles/response-analysis.js.map +1 -1
- package/dist/bundles/response-completions.js +1 -1
- package/dist/bundles/response-completions.js.map +1 -1
- package/dist/bundles/response-tokens.js +2 -2
- package/dist/bundles/response-tokens.js.map +1 -1
- package/dist/bundles/scope-items.js +3 -3
- package/dist/bundles/scope-items.js.map +1 -1
- package/dist/bundles/structure-completions.js.map +1 -1
- package/dist/bundles/sub-language-registry.js.map +1 -1
- package/dist/bundles/sub-languages/capture/CompletionProvider.js.map +1 -1
- package/dist/bundles/sub-languages/capture/HoverProvider.js.map +1 -1
- package/dist/bundles/sub-languages/capture/Validator.js.map +1 -1
- package/dist/bundles/sub-languages/capture/index.js.map +1 -1
- package/dist/bundles/sub-languages/capture/language.js.map +1 -1
- package/dist/bundles/sub-languages/cdl.js.map +1 -1
- package/dist/bundles/sub-languages/pdl.js.map +1 -1
- package/dist/bundles/sub-languages/projection/CodeActionProvider.js.map +1 -1
- package/dist/bundles/sub-languages/projection/CompletionProvider.js +1 -1
- package/dist/bundles/sub-languages/projection/CompletionProvider.js.map +1 -1
- package/dist/bundles/sub-languages/projection/HoverProvider.js.map +1 -1
- package/dist/bundles/sub-languages/projection/Validator.js.map +1 -1
- package/dist/bundles/sub-languages/projection/index.js.map +1 -1
- package/dist/bundles/sub-languages/projection/language.js.map +1 -1
- package/dist/bundles/symbols.js +2 -2
- package/dist/bundles/symbols.js.map +1 -1
- package/dist/bundles/themes/screenplay-dark.js.map +1 -1
- package/dist/bundles/themes/screenplay-light.js.map +1 -1
- package/dist/bundles/tokens.js.map +1 -1
- package/dist/bundles/validation.js +2 -2
- package/dist/bundles/validation.js.map +1 -1
- package/dist/diagnostic-codes.d.ts +1 -0
- package/dist/diagnostic-codes.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example-analysis.js","names":["exampleTypePrefix","bmpWordCharacters","fixtureStepPrefix","application","syntax","declarations","rejected","diagnostics","diagnostic","contexts","specifications","node","path","line","range","scope","example","nodes","feature","parent","slice","events","event","eventDeclarations","generations","latest","module","parts","reference","named","qualifiers","index","part","depth","visible","matches","hiddenScopes","fixtureKind","expected","typesOnly","full","name","prefix","base","value","overrides","result","replaced","origin","properties","values","fixtures","generated","selected","destination","priorRoute","replacementRoute","authoredRoute","route","routing","hovers","declaration","withoutComment","lines","steps","step","entry","resolved","competing","start","content","header","before","entries","specificationStepItems","hover","end","expression","item","member"],"sources":["../../example-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, eventDeclarations, ExpressionSyntax, FeatureSyntax, PropertyMappingSyntax, SpecificationExampleSyntax, SpecificationSyntax } from '@cratis/screenplay-compiler';\nimport { CompletionEntry, specificationStepItems } from './completion-items';\nimport { ExampleAnalysis } from './ExampleAnalysis';\nimport { FixtureKind } from './FixtureKind';\nimport { withoutComment } from './document-context';\nimport { bmpWordCharacters } from './bmp-word-characters';\n\nconst exampleTypePrefix = new RegExp(`^\\\\s*example\\\\s+[A-Z][${bmpWordCharacters}]*\\\\s*:\\\\s*([${bmpWordCharacters}.]*)$`);\nconst fixtureStepPrefix = new RegExp(`^\\\\s*(given|when|then)\\\\s+(?:(readmodel|append)\\\\s+)?([${bmpWordCharacters}.]*)$`);\n\n// Editor-only projection of parser-owned fixtures. It does not bind, execute, supply defaults,\n// or publish ESM. Scoped candidates use the same nearest-shared-prefix rule as the compiler.\nexport function exampleAnalysis(syntax: unknown, path: string, lines: string[], range: (line: number) => number[], hiddenScopes: ReadonlySet<string>, diagnostics: readonly { severity: string; code: string }[]): ExampleAnalysis {\n const application = syntax as ApplicationSyntax;\n const declarations: { name: string; scope: readonly string[]; fixtureKind?: FixtureKind; example?: SpecificationExampleSyntax }[] = [];\n const rejected = diagnostics.some(diagnostic => diagnostic.severity === 'error')\n ? diagnostics.some(diagnostic => diagnostic.code === 'PLAY0519') ? '**Invalid duplicate assignments; no effective values selected.**' : '**Invalid source; no effective values selected.**'\n : null;\n const contexts = new Map<number, readonly string[]>();\n const specifications: { node: SpecificationSyntax; scope: readonly string[] }[] = [];\n const own = (node: { location: { path?: string; line: number } }, scope: readonly string[]) => {\n if (node.location.path === path && node.location.line > 0) for (const line of range(node.location.line - 1)) contexts.set(line, scope);\n };\n const examples = (nodes: readonly SpecificationExampleSyntax[] | undefined, scope: readonly string[]) => {\n for (const example of nodes ?? []) { declarations.push({ name: example.name, scope, example }); own(example, scope); }\n };\n examples(application.examples, []);\n declarations.push(...[...application.concepts, ...application.types].map(node => ({ name: node.name, scope: [] })));\n const features = (nodes: readonly FeatureSyntax[], parent: readonly string[]) => {\n for (const feature of nodes) {\n const scope = [...parent, feature.name];\n own(feature, scope);\n examples(feature.examples, scope);\n for (const slice of feature.slices) {\n const scope = [...parent, feature.name, slice.name];\n own(slice, scope);\n examples(slice.examples, scope);\n const events = new Map<string, ReturnType<typeof eventDeclarations>[number][]>();\n for (const event of eventDeclarations(slice)) events.set(event.name, [...events.get(event.name) ?? [], event]);\n for (const generations of events.values()) {\n const latest = Math.max(...generations.map(event => event.generation));\n declarations.push(...generations.filter(event => event.generation === latest).map(event => ({ name: event.name, scope, fixtureKind: FixtureKind.Event })));\n }\n declarations.push(...slice.commands.map(node => ({ name: node.name, scope, fixtureKind: FixtureKind.Command })),\n ...slice.readModels.map(node => ({ name: node.name, scope, fixtureKind: FixtureKind.ReadModel })));\n for (const node of slice.specifications) { specifications.push({ node, scope }); own(node, scope); examples(node.examples, scope); }\n }\n features(feature.features, scope);\n }\n };\n for (const module of application.modules) {\n own(module, [module.name]);\n examples(module.examples, [module.name]);\n features(module.features, [module.name]);\n }\n const candidates = (reference: string, scope: readonly string[]) => {\n const parts = reference.split('.');\n const named = declarations.filter(node => node.name === parts.at(-1));\n const qualifiers = parts.slice(0, -1);\n if (qualifiers.length) return named.filter(node => qualifiers.length <= node.scope.length && qualifiers.every((part, index) => node.scope[node.scope.length - qualifiers.length + index] === part));\n for (let depth = scope.length; depth >= 0; depth--) {\n const visible = named.filter(node => depth <= node.scope.length && scope.slice(0, depth).every((part, index) => node.scope[index] === part));\n if (visible.length) return visible;\n }\n return [];\n };\n const unique = (reference: string, scope: readonly string[]) => {\n const matches = candidates(reference, scope);\n return matches.length === 1 ? matches[0] : undefined;\n };\n const kind = (node: typeof declarations[number]): FixtureKind | undefined => node.example ? unique(node.example.type, node.scope)?.fixtureKind : node.fixtureKind;\n const display = (node: typeof declarations[number]) => [...node.scope.filter(part => !hiddenScopes.has(part)), node.name].join('.');\n const targets = (scope: readonly string[], expected?: FixtureKind, typesOnly = false, prefix = ''): CompletionEntry[] => declarations.flatMap(node => {\n const fixtureKind = kind(node);\n if (!fixtureKind || (expected && fixtureKind !== expected) || (typesOnly && node.example)) return [];\n // A full scope-qualified spelling is the fallback for a shadowed declaration. Never\n // suggest a name that resolves to a competitor or an ambiguous declaration.\n const full = [...node.scope, node.name].join('.');\n const name = unique(node.name, scope) === node ? node.name : full;\n if (unique(name, scope) !== node) return [];\n const qualifiers = prefix.split('.').slice(0, -1).join('.');\n if (qualifiers && !full.endsWith(`${qualifiers}.${node.name}`)) return [];\n if (name === full && node.scope.some(part => hiddenScopes.has(part)) && unique(node.name, scope) !== node) return [];\n return [{ label: unique(node.name, scope) === node ? node.name : display(node), insertText: qualifiers ? node.name : name,\n documentation: node.example ? `Example of ${node.example.type}. Step assignments override example values; no implicit defaults.` : `Declared ${fixtureKind}.` }];\n });\n const effective = (example: SpecificationExampleSyntax | undefined, values: readonly PropertyMappingSyntax[], generated: readonly PropertyMappingSyntax[], destination: ExpressionSyntax | null, authoredRoute?: Pick<SpecificationExampleSyntax, 'stream' | 'noStream'>) => {\n if (rejected) return rejected;\n const merge = (base: readonly PropertyMappingSyntax[], overrides: readonly PropertyMappingSyntax[], prefix = '') => {\n if (new Set(base.map(value => value.property)).size !== base.length || new Set(overrides.map(value => value.property)).size !== overrides.length) return null;\n const result = new Map(base.map(value => [value.property, { value, origin: 'example', replaced: undefined as PropertyMappingSyntax | undefined }]));\n for (const value of overrides) {\n const replaced = result.get(value.property)?.value;\n result.delete(value.property);\n result.set(value.property, { value, origin: replaced ? 'override' : 'authored', replaced });\n }\n return [...result.values()].map(({ value, origin, replaced }) => `${prefix}${value.property} = ${expressionText(value.source)} — ${origin}${origin === 'example' ? ` ${example!.name}` : ''}${replaced ? ` (replaces ${expressionText(replaced.source)} from ${example!.name})` : ''}`);\n };\n const properties = merge(example?.values ?? [], values);\n const fixtures = merge(example?.generatedValues ?? [], generated, 'generated ');\n if (!properties || !fixtures) return '**Invalid duplicate assignments; no effective values selected.**';\n const selected = destination ?? example?.for;\n const priorRoute = example?.stream ?? example?.noStream;\n const replacementRoute = authoredRoute?.stream ?? authoredRoute?.noStream;\n const route = replacementRoute ?? priorRoute;\n const routeText = (value: NonNullable<typeof route>): string => value.kind === 'SpecificationNoStreamSyntax' ? 'no stream' :\n `stream ${value.eventSource}.${value.stream}${value.streamId ? ` streamId = ${expressionText(value.streamId.source)}` : value.streamIdParts.length ? ` streamId ${value.streamIdParts.map(part => `${part.property} = ${expressionText(part.source)}`).join(', ')}` : ''}`;\n const routing = route ? [`${routeText(route)} — ${replacementRoute ? priorRoute ? `override (replaces ${routeText(priorRoute)} from ${example!.name})` : 'authored' : `example ${example!.name}`}`] : [];\n return [...properties, ...fixtures, ...routing, ...(selected ? [`for ${expressionText(selected)} — ${destination ? example?.for ? `override (replaces ${expressionText(example.for)} from ${example.name})` : 'authored' : `example ${example!.name}`}`] : [])].join('\\n');\n };\n const hovers = new Map<number, { start: number; length: number; content: string }>();\n for (const declaration of declarations.filter(node => node.example?.location.path === path)) {\n const example = declaration.example!;\n const line = example.location.line - 1;\n const prefix = withoutComment(lines[line] ?? '').match(/^\\s*example\\s+/)?.[0];\n if (prefix) hovers.set(line, { start: prefix.length + 1, length: example.name.length, content: `**example ${display(declaration)} : ${example.type}**\\n\\n${kind(declaration) ? effective(example, [], [], null) : 'Unresolved or ambiguous type; no effective values selected.'}` });\n }\n for (const { node, scope } of specifications) {\n const steps = [\n ...node.given.map(step => ({ step, name: step.eventType, expected: FixtureKind.Event, values: step.values, generated: [], destination: step.for, prefix: /^\\s*given\\s+/ })),\n ...node.givenReadModels.map(step => ({ step, name: step.name, expected: FixtureKind.ReadModel, values: step.properties, generated: [], destination: null, prefix: /^\\s*given\\s+readmodel\\s+/ })),\n ...(node.when ? [{ step: node.when, name: node.when.commandType, expected: FixtureKind.Command, values: node.when.values, generated: node.when.generatedValues ?? [], destination: node.when.for, prefix: /^\\s*when\\s+/ }] : []),\n ...(node.whenAppended ? [{ step: node.whenAppended, name: node.whenAppended.eventType, expected: FixtureKind.Event, values: node.whenAppended.values, generated: [], destination: node.whenAppended.for, prefix: /^\\s*when\\s+append\\s+/ }] : []),\n ...node.thenEvents.map(step => ({ step, name: step.eventType, expected: FixtureKind.Event, values: step.values, generated: [], destination: step.for, prefix: /^\\s*then\\s+/ })),\n ...node.thenReadModels.map(step => ({ step, name: step.name, expected: FixtureKind.ReadModel, values: step.properties, generated: [], destination: null, prefix: /^\\s*then\\s+readmodel\\s+/ })),\n ];\n for (const { step, name, expected, values, generated, destination, prefix } of steps.filter(entry => entry.step.location.path === path)) {\n const resolved = unique(name, scope);\n const competing = candidates(name, scope).some(node => node.example);\n if (!resolved?.example && (resolved || !competing)) continue;\n const line = step.location.line - 1;\n const start = withoutComment(lines[line] ?? '').match(prefix)?.[0].length;\n if (start === undefined) continue;\n const content = !resolved ? '**Ambiguous example; no effective values selected.**' : kind(resolved) !== expected ? '**Example kind mismatch; no effective values selected.**'\n : `**${expected} ${resolved.example?.type ?? name}${resolved.example ? ` — example ${display(resolved)}` : ''}**\\n\\n${effective(resolved.example, values, generated, destination, 'eventType' in step ? step : undefined)}\\n\\nAuthored fixture values, not execution results. Matching is unchanged.`;\n hovers.set(line, { start: start + 1, length: name.length, content });\n }\n }\n return {\n eventExamples: declarations.filter(declaration => declaration.example?.location.path === path && kind(declaration) === FixtureKind.Event).map(declaration => declaration.example!),\n completions(line, before) {\n const scope = contexts.get(line) ?? [];\n const header = before.match(exampleTypePrefix);\n if (header) return targets(scope, undefined, true, header[1]);\n // A parser-rejected incomplete step still belongs to its specification's range.\n const inSpecification = specifications.some(({ node }) => node.location.path === path && range(node.location.line - 1).includes(line));\n if (!inSpecification) return null;\n const step = before.match(fixtureStepPrefix);\n if (!step) return null;\n if (['clock', 'caller', 'capture', 'trigger', 'query', 'result', 'error', 'denied', 'returns', 'no', 'operation', 'compensated'].includes(step[3])) return null;\n const expected = step[2] === 'readmodel' ? FixtureKind.ReadModel : step[2] === 'append' || step[1] !== 'when' ? FixtureKind.Event : FixtureKind.Command;\n const entries = targets(scope, expected, false, step[3]);\n // Keep the existing planner's keyword behavior when there are no fixture targets.\n if (!entries.length) return null;\n return step[2] ? entries : [...specificationStepItems[step[1] as 'given' | 'when' | 'then'], ...entries];\n },\n hover(line, start, end) {\n const hover = hovers.get(line);\n return hover && start >= hover.start && end <= hover.start + hover.length ? hover.content : null;\n },\n };\n}\n\nfunction expressionText(expression: ExpressionSyntax): string {\n switch (expression.kind) {\n case 'LiteralExpressionSyntax': return typeof expression.value === 'object' && expression.value !== null ? expression.value.value : JSON.stringify(expression.value);\n case 'ListExpressionSyntax': return expression.items.length === 0 ? 'none' : `(${expression.items.map(item => `item ${expressionText(item)}`).join(', ')})`;\n case 'ObjectExpressionSyntax': return expression.members.length === 0 ? 'empty' : `(${expression.members.map(member => `${memberName(member.name)} = ${expressionText(member.value)}`).join(', ')})`;\n case 'ClockOffsetExpressionSyntax': return `${expression.clock} ${expression.amount < 0 ? '-' : '+'} ${Math.abs(expression.amount)} ${expression.unit}`;\n case 'DateOfExpressionSyntax': return `date of ${expressionText(expression.operand)}`;\n case 'RawExpressionSyntax': return expression.text;\n case 'CaseValueExpressionSyntax': return `case.${expression.parameter}`;\n case 'PathExpressionSyntax': return expression.path;\n case 'ContextExpressionSyntax': return `$context.${expression.path}`;\n case 'IdentityExpressionSyntax': return `$identity.${expression.path}`;\n case 'EventContextExpressionSyntax': return `$eventContext.${expression.path}`;\n case 'RefusalExpressionSyntax': return `$refusal.${expression.member}`;\n case 'EventSourceIdExpressionSyntax': return '$eventSourceId';\n case 'CausedByExpressionSyntax': return `$causedBy${expression.property ? `.${expression.property}` : ''}`;\n case 'EnvironmentExpressionSyntax': return `$env.${expression.name}`;\n case 'StringsExpressionSyntax': return `$strings.${expression.key}`;\n case 'SourceItemExpressionSyntax': return `$.${expression.path}`;\n case 'TemplateExpressionSyntax': return '`' + expression.parts.map(part => part.kind === 'TemplateTextSyntax' ? part.text : '${' + expressionText(part.expression) + '}').join('') + '`';\n }\n}\n\n// A member name as a structured block writes it: an identifier bare, 'item' escaped, anything else quoted.\nconst memberName = (name: string): string => name === 'item' ? '@item' : /^[\\p{L}_][\\p{L}\\p{N}_]*$/u.test(name) ? name : JSON.stringify(name);\n"],"mappings":"2UAUA,MAAMA,EAAwB,OAAO,yBAAyBC,EAAkB,eAAeA,EAAkB,MAAM,EACjHC,EAAwB,OAAO,0DAA0DD,EAAkB,MAAM,EAIvH,SAAgB,gBAAgB,EAAiB,EAAc,EAAiB,EAAmC,EAAmC,EAA6E,CAC/N,IAAME,EAAcC,EACdC,EAA8H,CAAC,EAC/HC,EAAWC,EAAY,KAAK,GAAcC,EAAW,WAAa,OAAO,EACzED,EAAY,KAAK,GAAcC,EAAW,OAAS,UAAU,EAAI,mEAAq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ClM,IAAK,8BAA+B,MAAO,GAAGF,EAAW,MAAM,GAAGA,EAAW,OAAS,EAAI,IAAM,IAAI,GAAG,KAAK,IAAIA,EAAW,MAAM,EAAE,GAAGA,EAAW,OACjJ,IAAK,yBAA0B,MAAO,WAAW,eAAeA,EAAW,OAAO,IAClF,IAAK,sBAAuB,OAAOA,EAAW,KAC9C,IAAK,4BAA6B,MAAO,QAAQA,EAAW,YAC5D,IAAK,uBAAwB,OAAOA,EAAW,KAC/C,IAAK,0BAA2B,MAAO,YAAYA,EAAW,OAC9D,IAAK,2BAA4B,MAAO,aAAaA,EAAW,OAChE,IAAK,+BAAgC,MAAO,iBAAiBA,EAAW,OACxE,IAAK,0BAA2B,MAAO,YAAYA,EAAW,SAC9D,IAAK,gCAAiC,MAAO,iBAC7C,IAAK,2BAA4B,MAAO,YAAYA,EAAW,SAAW,IAAIA,EAAW,WAAa,KACtG,IAAK,8BAA+B,MAAO,QAAQA,EAAW,OAC9D,IAAK,0BAA2B,MAAO,YAAYA,EAAW,MAC9D,IAAK,6BAA8B,MAAO,KAAKA,EAAW,OAC1D,IAAK,2BAA4B,MAAO,IAAMA,EAAW,MAAM,IAAI,GAAQ7C,EAAK,OAAS,qBAAuBA,EAAK,KAAO,KAAO,eAAeA,EAAK,UAAU,EAAI,GAAG,CAAC,CAAC,KAAK,EAAE,EAAI,GACzL,CACJ,CAGA,MAAM,WAAc,GAAyBS,IAAS,OAAS,QAAU,4BAA4B,KAAKA,CAAI,EAAIA,EAAO,KAAK,UAAUA,CAAI"}
|
|
1
|
+
{"version":3,"file":"example-analysis.js","names":["exampleTypePrefix","bmpWordCharacters","fixtureStepPrefix","application","syntax","declarations","rejected","diagnostics","diagnostic","contexts","specifications","node","path","line","range","scope","example","nodes","feature","parent","slice","events","event","eventDeclarations","generations","latest","module","parts","reference","named","qualifiers","index","part","depth","visible","matches","hiddenScopes","fixtureKind","expected","typesOnly","full","name","prefix","base","value","overrides","result","replaced","origin","properties","values","fixtures","generated","selected","destination","priorRoute","replacementRoute","authoredRoute","route","routing","hovers","declaration","withoutComment","lines","steps","step","entry","resolved","competing","start","content","header","before","entries","specificationStepItems","hover","end","expression","item","member"],"sources":["../../example-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, eventDeclarations, ExpressionSyntax, FeatureSyntax, PropertyMappingSyntax, SpecificationExampleSyntax, SpecificationSyntax } from '@cratis/screenplay-compiler';\nimport { CompletionEntry, specificationStepItems } from './completion-items';\nimport { ExampleAnalysis } from './ExampleAnalysis';\nimport { FixtureKind } from './FixtureKind';\nimport { withoutComment } from './document-context';\nimport { bmpWordCharacters } from './bmp-word-characters';\n\nconst exampleTypePrefix = new RegExp(`^\\\\s*example\\\\s+[A-Z][${bmpWordCharacters}]*\\\\s*:\\\\s*([${bmpWordCharacters}.]*)$`);\nconst fixtureStepPrefix = new RegExp(`^\\\\s*(given|when|then)\\\\s+(?:(readmodel|append)\\\\s+)?([${bmpWordCharacters}.]*)$`);\n\n// Editor-only projection of parser-owned fixtures. It does not bind, execute, supply defaults,\n// or publish ESM. Scoped candidates use the same nearest-shared-prefix rule as the compiler.\nexport function exampleAnalysis(syntax: unknown, path: string, lines: string[], range: (line: number) => number[], hiddenScopes: ReadonlySet<string>, diagnostics: readonly { severity: string; code: string }[]): ExampleAnalysis {\n const application = syntax as ApplicationSyntax;\n const declarations: { name: string; scope: readonly string[]; fixtureKind?: FixtureKind; example?: SpecificationExampleSyntax }[] = [];\n const rejected = diagnostics.some(diagnostic => diagnostic.severity === 'error')\n ? diagnostics.some(diagnostic => diagnostic.code === 'PLAY0519') ? '**Invalid duplicate assignments; no effective values selected.**' : '**Invalid source; no effective values selected.**'\n : null;\n const contexts = new Map<number, readonly string[]>();\n const specifications: { node: SpecificationSyntax; scope: readonly string[] }[] = [];\n const own = (node: { location: { path?: string; line: number } }, scope: readonly string[]) => {\n if (node.location.path === path && node.location.line > 0) for (const line of range(node.location.line - 1)) contexts.set(line, scope);\n };\n const examples = (nodes: readonly SpecificationExampleSyntax[] | undefined, scope: readonly string[]) => {\n for (const example of nodes ?? []) { declarations.push({ name: example.name, scope, example }); own(example, scope); }\n };\n examples(application.examples, []);\n declarations.push(...[...application.concepts, ...application.types].map(node => ({ name: node.name, scope: [] })));\n const features = (nodes: readonly FeatureSyntax[], parent: readonly string[]) => {\n for (const feature of nodes) {\n const scope = [...parent, feature.name];\n own(feature, scope);\n examples(feature.examples, scope);\n for (const slice of feature.slices) {\n const scope = [...parent, feature.name, slice.name];\n own(slice, scope);\n examples(slice.examples, scope);\n const events = new Map<string, ReturnType<typeof eventDeclarations>[number][]>();\n for (const event of eventDeclarations(slice)) events.set(event.name, [...events.get(event.name) ?? [], event]);\n for (const generations of events.values()) {\n const latest = Math.max(...generations.map(event => event.generation));\n declarations.push(...generations.filter(event => event.generation === latest).map(event => ({ name: event.name, scope, fixtureKind: FixtureKind.Event })));\n }\n declarations.push(...slice.commands.map(node => ({ name: node.name, scope, fixtureKind: FixtureKind.Command })),\n ...slice.readModels.map(node => ({ name: node.name, scope, fixtureKind: FixtureKind.ReadModel })));\n for (const node of slice.specifications) { specifications.push({ node, scope }); own(node, scope); examples(node.examples, scope); }\n }\n features(feature.features, scope);\n }\n };\n for (const module of application.modules) {\n own(module, [module.name]);\n examples(module.examples, [module.name]);\n features(module.features, [module.name]);\n }\n const candidates = (reference: string, scope: readonly string[]) => {\n const parts = reference.split('.');\n const named = declarations.filter(node => node.name === parts.at(-1));\n const qualifiers = parts.slice(0, -1);\n if (qualifiers.length) return named.filter(node => qualifiers.length <= node.scope.length && qualifiers.every((part, index) => node.scope[node.scope.length - qualifiers.length + index] === part));\n for (let depth = scope.length; depth >= 0; depth--) {\n const visible = named.filter(node => depth <= node.scope.length && scope.slice(0, depth).every((part, index) => node.scope[index] === part));\n if (visible.length) return visible;\n }\n return [];\n };\n const unique = (reference: string, scope: readonly string[]) => {\n const matches = candidates(reference, scope);\n return matches.length === 1 ? matches[0] : undefined;\n };\n const kind = (node: typeof declarations[number]): FixtureKind | undefined => node.example ? unique(node.example.type, node.scope)?.fixtureKind : node.fixtureKind;\n const display = (node: typeof declarations[number]) => [...node.scope.filter(part => !hiddenScopes.has(part)), node.name].join('.');\n const targets = (scope: readonly string[], expected?: FixtureKind, typesOnly = false, prefix = ''): CompletionEntry[] => declarations.flatMap(node => {\n const fixtureKind = kind(node);\n if (!fixtureKind || (expected && fixtureKind !== expected) || (typesOnly && node.example)) return [];\n // A full scope-qualified spelling is the fallback for a shadowed declaration. Never\n // suggest a name that resolves to a competitor or an ambiguous declaration.\n const full = [...node.scope, node.name].join('.');\n const name = unique(node.name, scope) === node ? node.name : full;\n if (unique(name, scope) !== node) return [];\n const qualifiers = prefix.split('.').slice(0, -1).join('.');\n if (qualifiers && !full.endsWith(`${qualifiers}.${node.name}`)) return [];\n if (name === full && node.scope.some(part => hiddenScopes.has(part)) && unique(node.name, scope) !== node) return [];\n return [{ label: unique(node.name, scope) === node ? node.name : display(node), insertText: qualifiers ? node.name : name,\n documentation: node.example ? `Example of ${node.example.type}. Step assignments override example values; no implicit defaults.` : `Declared ${fixtureKind}.` }];\n });\n const effective = (example: SpecificationExampleSyntax | undefined, values: readonly PropertyMappingSyntax[], generated: readonly PropertyMappingSyntax[], destination: ExpressionSyntax | null, authoredRoute?: Pick<SpecificationExampleSyntax, 'stream' | 'noStream'>) => {\n if (rejected) return rejected;\n const merge = (base: readonly PropertyMappingSyntax[], overrides: readonly PropertyMappingSyntax[], prefix = '') => {\n if (new Set(base.map(value => value.property)).size !== base.length || new Set(overrides.map(value => value.property)).size !== overrides.length) return null;\n const result = new Map(base.map(value => [value.property, { value, origin: 'example', replaced: undefined as PropertyMappingSyntax | undefined }]));\n for (const value of overrides) {\n const replaced = result.get(value.property)?.value;\n result.delete(value.property);\n result.set(value.property, { value, origin: replaced ? 'override' : 'authored', replaced });\n }\n return [...result.values()].map(({ value, origin, replaced }) => `${prefix}${value.property} = ${expressionText(value.source)} — ${origin}${origin === 'example' ? ` ${example!.name}` : ''}${replaced ? ` (replaces ${expressionText(replaced.source)} from ${example!.name})` : ''}`);\n };\n const properties = merge(example?.values ?? [], values);\n const fixtures = merge(example?.generatedValues ?? [], generated, 'generated ');\n if (!properties || !fixtures) return '**Invalid duplicate assignments; no effective values selected.**';\n const selected = destination ?? example?.for;\n const priorRoute = example?.stream ?? example?.noStream;\n const replacementRoute = authoredRoute?.stream ?? authoredRoute?.noStream;\n const route = replacementRoute ?? priorRoute;\n const routeText = (value: NonNullable<typeof route>): string => value.kind === 'SpecificationNoStreamSyntax' ? 'no stream' :\n `stream ${value.eventSource}.${value.stream}${value.streamId ? ` streamId = ${expressionText(value.streamId.source)}` : value.streamIdParts.length ? ` streamId ${value.streamIdParts.map(part => `${part.property} = ${expressionText(part.source)}`).join(', ')}` : ''}`;\n const routing = route ? [`${routeText(route)} — ${replacementRoute ? priorRoute ? `override (replaces ${routeText(priorRoute)} from ${example!.name})` : 'authored' : `example ${example!.name}`}`] : [];\n return [...properties, ...fixtures, ...routing, ...(selected ? [`for ${expressionText(selected)} — ${destination ? example?.for ? `override (replaces ${expressionText(example.for)} from ${example.name})` : 'authored' : `example ${example!.name}`}`] : [])].join('\\n');\n };\n const hovers = new Map<number, { start: number; length: number; content: string }>();\n for (const declaration of declarations.filter(node => node.example?.location.path === path)) {\n const example = declaration.example!;\n const line = example.location.line - 1;\n const prefix = withoutComment(lines[line] ?? '').match(/^\\s*example\\s+/)?.[0];\n if (prefix) hovers.set(line, { start: prefix.length + 1, length: example.name.length, content: `**example ${display(declaration)} : ${example.type}**\\n\\n${kind(declaration) ? effective(example, [], [], null) : 'Unresolved or ambiguous type; no effective values selected.'}` });\n }\n for (const { node, scope } of specifications) {\n const steps = [\n ...node.given.map(step => ({ step, name: step.eventType, expected: FixtureKind.Event, values: step.values, generated: [], destination: step.for, prefix: /^\\s*given\\s+/ })),\n ...node.givenReadModels.map(step => ({ step, name: step.name, expected: FixtureKind.ReadModel, values: step.properties, generated: [], destination: null, prefix: /^\\s*given\\s+readmodel\\s+/ })),\n ...(node.when ? [{ step: node.when, name: node.when.commandType, expected: FixtureKind.Command, values: node.when.values, generated: node.when.generatedValues ?? [], destination: node.when.for, prefix: /^\\s*when\\s+/ }] : []),\n ...(node.whenAppended ? [{ step: node.whenAppended, name: node.whenAppended.eventType, expected: FixtureKind.Event, values: node.whenAppended.values, generated: [], destination: node.whenAppended.for, prefix: /^\\s*when\\s+append\\s+/ }] : []),\n ...node.thenEvents.map(step => ({ step, name: step.eventType, expected: FixtureKind.Event, values: step.values, generated: [], destination: step.for, prefix: /^\\s*then\\s+/ })),\n ...node.thenReadModels.map(step => ({ step, name: step.name, expected: FixtureKind.ReadModel, values: step.properties, generated: [], destination: null, prefix: /^\\s*then\\s+readmodel\\s+/ })),\n ];\n for (const { step, name, expected, values, generated, destination, prefix } of steps.filter(entry => entry.step.location.path === path)) {\n const resolved = unique(name, scope);\n const competing = candidates(name, scope).some(node => node.example);\n if (!resolved?.example && (resolved || !competing)) continue;\n const line = step.location.line - 1;\n const start = withoutComment(lines[line] ?? '').match(prefix)?.[0].length;\n if (start === undefined) continue;\n const content = !resolved ? '**Ambiguous example; no effective values selected.**' : kind(resolved) !== expected ? '**Example kind mismatch; no effective values selected.**'\n : `**${expected} ${resolved.example?.type ?? name}${resolved.example ? ` — example ${display(resolved)}` : ''}**\\n\\n${effective(resolved.example, values, generated, destination, 'eventType' in step ? step : undefined)}\\n\\nAuthored fixture values, not execution results. Matching is unchanged.`;\n hovers.set(line, { start: start + 1, length: name.length, content });\n }\n }\n return {\n eventExamples: declarations.filter(declaration => declaration.example?.location.path === path && kind(declaration) === FixtureKind.Event).map(declaration => declaration.example!),\n completions(line, before) {\n const scope = contexts.get(line) ?? [];\n const header = before.match(exampleTypePrefix);\n if (header) return targets(scope, undefined, true, header[1]);\n // A parser-rejected incomplete step still belongs to its specification's range.\n const inSpecification = specifications.some(({ node }) => node.location.path === path && range(node.location.line - 1).includes(line));\n if (!inSpecification) return null;\n const step = before.match(fixtureStepPrefix);\n if (!step) return null;\n if (['clock', 'caller', 'capture', 'trigger', 'query', 'result', 'error', 'denied', 'returns', 'no', 'operation', 'compensated'].includes(step[3])) return null;\n const expected = step[2] === 'readmodel' ? FixtureKind.ReadModel : step[2] === 'append' || step[1] !== 'when' ? FixtureKind.Event : FixtureKind.Command;\n const entries = targets(scope, expected, false, step[3]);\n // Keep the existing planner's keyword behavior when there are no fixture targets.\n if (!entries.length) return null;\n return step[2] ? entries : [...specificationStepItems[step[1] as 'given' | 'when' | 'then'], ...entries];\n },\n hover(line, start, end) {\n const hover = hovers.get(line);\n return hover && start >= hover.start && end <= hover.start + hover.length ? hover.content : null;\n },\n };\n}\n\nfunction expressionText(expression: ExpressionSyntax): string {\n switch (expression.kind) {\n case 'LiteralExpressionSyntax': return typeof expression.value === 'object' && expression.value !== null ? expression.value.value : JSON.stringify(expression.value);\n case 'ListExpressionSyntax': return expression.items.length === 0 ? 'none' : `(${expression.items.map(item => `item ${expressionText(item)}`).join(', ')})`;\n case 'ObjectExpressionSyntax': return expression.members.length === 0 ? 'empty' : `(${expression.members.map(member => `${memberName(member.name)} = ${expressionText(member.value)}`).join(', ')})`;\n case 'ClockOffsetExpressionSyntax': return `${expression.clock} ${expression.amount < 0 ? '-' : '+'} ${Math.abs(expression.amount)} ${expression.unit}`;\n case 'DateOfExpressionSyntax': return `date of ${expressionText(expression.operand)}`;\n case 'RawExpressionSyntax': return expression.text;\n case 'CaseValueExpressionSyntax': return `case.${expression.parameter}`;\n case 'PathExpressionSyntax': return expression.path;\n case 'ContextExpressionSyntax': return `$context.${expression.path}`;\n case 'IdentityExpressionSyntax': return `$identity.${expression.path}`;\n case 'EventContextExpressionSyntax': return `$eventContext.${expression.path}`;\n case 'RefusalExpressionSyntax': return `$refusal.${expression.member}`;\n case 'EventSourceIdExpressionSyntax': return '$eventSourceId';\n case 'CausedByExpressionSyntax': return `$causedBy${expression.property ? `.${expression.property}` : ''}`;\n case 'EnvironmentExpressionSyntax': return `$env.${expression.name}`;\n case 'StringsExpressionSyntax': return `$strings.${expression.key}`;\n case 'SourceItemExpressionSyntax': return `$.${expression.path}`;\n case 'TemplateExpressionSyntax': return '`' + expression.parts.map(part => part.kind === 'TemplateTextSyntax' ? part.text : '${' + expressionText(part.expression) + '}').join('') + '`';\n }\n}\n\n// A member name as a structured block writes it: an identifier bare, 'item' escaped, anything else quoted.\nconst memberName = (name: string): string => name === 'item' ? '@item' : /^[\\p{L}_][\\p{L}\\p{N}_]*$/u.test(name) ? name : JSON.stringify(name);\n"],"mappings":"A,2UAUA,MAAMA,EAAwB,OAAO,yBAAyBC,EAAkB,eAAeA,EAAkB,MAAM,EACjHC,EAAwB,OAAO,0DAA0DD,EAAkB,MAAM,EAIvH,SAAgB,gBAAgB,EAAiB,EAAc,EAAiB,EAAmC,EAAmC,EAA6E,CAC/N,IAAME,EAAcC,EACdC,EAA8H,CAAC,EAC/HC,EAAWC,EAAY,KAAK,GAAcC,EAAW,WAAa,OAAO,EACzED,EAAY,KAAK,GAAcC,EAAW,OAAS,UAAU,EAAI,mEAAqE,oDACtI,KACAC,kBAAW,IAAI,IACfC,EAA4E,CAAC,EAC7E,KAAO,EAAqD,IAA6B,CAC3F,GAAIC,EAAK,SAAS,OAASC,GAAQD,EAAK,SAAS,KAAO,EAAG,IAAK,IAAME,KAAQC,EAAMH,EAAK,SAAS,KAAO,CAAC,EAAGF,EAAS,IAAII,EAAME,CAAK,CACzI,EACM,UAAY,EAA0D,IAA6B,CACrG,IAAK,IAAMC,KAAWC,GAAS,CAAC,EAAKZ,EAAa,KAAK,CAAE,KAAMW,EAAQ,KAAM,QAAO,SAAQ,CAAC,EAAG,IAAIA,EAASD,CAAK,CACtH,EACA,SAASZ,EAAY,SAAU,CAAC,CAAC,EACjCE,EAAa,KAAK,GAAG,CAAC,GAAGF,EAAY,SAAU,GAAGA,EAAY,KAAK,CAAC,CAAC,IAAI,IA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AAYA,EAAW,SAAW,IAAIA,EAAW,WAAa,KACtG,IAAK,8BAA+B,MAAO,QAAQA,EAAW,OAC9D,IAAK,0BAA2B,MAAO,YAAYA,EAAW,MAC9D,IAAK,6BAA8B,MAAO,KAAKA,EAAW,OAC1D,IAAK,2BAA4B,MAAO,IAAMA,EAAW,MAAM,IAAI,GAAQ7C,EAAK,OAAS,qBAAuBA,EAAK,KAAO,KAAO,eAAeA,EAAK,UAAU,EAAI,GAAG,CAAC,CAAC,KAAK,EAAE,EAAI,GACzL,CACJ,CAGA,MAAM,WAAc,GAAyBS,IAAS,OAAS,QAAU,4BAA4B,KAAKA,CAAI,EAAIA,EAAO,KAAK,UAAUA,CAAI,E"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import"./_virtual/_virtual/_rolldown/runtime.js";import{fenceMap as e,withoutComment as t}from"./document-context.js";import{
|
|
2
|
-
`))??[],
|
|
1
|
+
import"./_virtual/_virtual/_rolldown/runtime.js";import{fenceMap as e,withoutComment as t}from"./document-context.js";import{caseCompletions as n,caseHover as r}from"./case-authoring.js";import{responseAnalysis as i}from"./response-analysis.js";import{symbolsForBuffer as a}from"./symbols.js";function analyze(e,t){let n=a(e,t);return i(e,n.authoringDocuments??n.authoringSources?.filter(t=>t!==e.join(`
|
|
2
|
+
`))??[],n.authoringPlacement,n.authoringPath,n.authoringPlacementResolved)}function exampleCompletions(r,i,a,o){if(e(r)[i]||t(a).length<a.length)return null;let s=analyze(r,o);return n(r,i,a)??s.personas.completions(i,a)??s.examples.completions(i,a)}function exampleHover(e,t,n,i,a){let o=analyze(e,a);return r(e,t,n,i)??o.personas.hover(t,n,i)??o.examples.hover(t,n,i)}export{exampleCompletions,exampleHover};
|
|
3
3
|
//# sourceMappingURL=example-authoring.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example-authoring.js","names":["symbols","symbolsForBuffer","lines","application","responseAnalysis","source","fenceMap","line","withoutComment","before","analysis","caseCompletions","caseHover","start","end"],"sources":["../../example-authoring.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 { caseCompletions, caseHover } from './case-authoring';\nimport { responseAnalysis } from './response-analysis';\nimport { DocumentSymbols, symbolsForBuffer } from './symbols';\n\nfunction analyze(lines: string[], application?: DocumentSymbols) {\n const symbols = symbolsForBuffer(lines, application);\n return responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [],\n symbols.authoringPlacement, symbols.authoringPath, symbols.authoringPlacementResolved);\n}\n\nexport function exampleCompletions(lines: string[], line: number, before: string, application?: DocumentSymbols) {\n if (fenceMap(lines)[line] || withoutComment(before).length < before.length) return null;\n const analysis = analyze(lines, application);\n return caseCompletions(lines, line, before) ?? analysis.personas.completions(line, before) ?? analysis.examples.completions(line, before);\n}\n\nexport function exampleHover(lines: string[], line: number, start: number, end: number, application?: DocumentSymbols) {\n const analysis = analyze(lines, application);\n return caseHover(lines, line, start, end) ?? analysis.personas.hover(line, start, end) ?? analysis.examples.hover(line, start, end);\n}\n"],"mappings":"qSAQA,SAAS,QAAQ,EAAiB,EAA+B,CAC7D,IAAMA,EAAUC,EAAiBC,EAAOC,CAAW,EACnD,OAAOC,EAAiBF,EAAOF,EAAQ,oBAAsBA,EAAQ,kBAAkB,OAAO,GAAUK,IAAWH,EAAM,KAAK;CAAI,CAAC,GAAK,CAAC,EACrIF,EAAQ,mBAAoBA,EAAQ,cAAeA,EAAQ,0BAA0B,CAC7F,CAEA,SAAgB,mBAAmB,EAAiB,EAAc,EAAgB,EAA+B,CAC7G,GAAIM,EAASJ,CAAK,CAAC,CAACK,IAASC,EAAeC,CAAM,CAAC,CAAC,OAASA,EAAO,OAAQ,OAAO,KACnF,IAAMC,EAAW,QAAQR,EAAOC,CAAW,EAC3C,OAAOQ,EAAgBT,EAAOK,EAAME,CAAM,GAAKC,EAAS,SAAS,YAAYH,EAAME,CAAM,GAAKC,EAAS,SAAS,YAAYH,EAAME,CAAM,CAC5I,CAEA,SAAgB,aAAa,EAAiB,EAAc,EAAe,EAAa,EAA+B,CACnH,IAAMC,EAAW,QAAQR,EAAOC,CAAW,EAC3C,OAAOS,EAAUV,EAAOK,EAAMM,EAAOC,CAAG,GAAKJ,EAAS,SAAS,MAAMH,EAAMM,EAAOC,CAAG,GAAKJ,EAAS,SAAS,MAAMH,EAAMM,EAAOC,CAAG,CACtI"}
|
|
1
|
+
{"version":3,"file":"example-authoring.js","names":["symbols","symbolsForBuffer","lines","application","responseAnalysis","source","fenceMap","line","withoutComment","before","analysis","caseCompletions","caseHover","start","end"],"sources":["../../example-authoring.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 { caseCompletions, caseHover } from './case-authoring';\nimport { responseAnalysis } from './response-analysis';\nimport { DocumentSymbols, symbolsForBuffer } from './symbols';\n\nfunction analyze(lines: string[], application?: DocumentSymbols) {\n const symbols = symbolsForBuffer(lines, application);\n return responseAnalysis(lines, symbols.authoringDocuments ?? symbols.authoringSources?.filter(source => source !== lines.join('\\n')) ?? [],\n symbols.authoringPlacement, symbols.authoringPath, symbols.authoringPlacementResolved);\n}\n\nexport function exampleCompletions(lines: string[], line: number, before: string, application?: DocumentSymbols) {\n if (fenceMap(lines)[line] || withoutComment(before).length < before.length) return null;\n const analysis = analyze(lines, application);\n return caseCompletions(lines, line, before) ?? analysis.personas.completions(line, before) ?? analysis.examples.completions(line, before);\n}\n\nexport function exampleHover(lines: string[], line: number, start: number, end: number, application?: DocumentSymbols) {\n const analysis = analyze(lines, application);\n return caseHover(lines, line, start, end) ?? analysis.personas.hover(line, start, end) ?? analysis.examples.hover(line, start, end);\n}\n"],"mappings":"A,qSAQA,SAAS,QAAQ,EAAiB,EAA+B,CAC7D,IAAMA,EAAUC,EAAiBC,EAAOC,CAAW,EACnD,OAAOC,EAAiBF,EAAOF,EAAQ,oBAAsBA,EAAQ,kBAAkB,OAAO,GAAUK,IAAWH,EAAM,KAAK;CAAI,CAAC,GAAK,CAAC,EACrIF,EAAQ,mBAAoBA,EAAQ,cAAeA,EAAQ,0BAA0B,CAC7F,CAEA,SAAgB,mBAAmB,EAAiB,EAAc,EAAgB,EAA+B,CAC7G,GAAIM,EAASJ,CAAK,CAAC,CAACK,IAASC,EAAeC,CAAM,CAAC,CAAC,OAASA,EAAO,OAAQ,OAAO,KACnF,IAAMC,EAAW,QAAQR,EAAOC,CAAW,EAC3C,OAAOQ,EAAgBT,EAAOK,EAAME,CAAM,GAAKC,EAAS,SAAS,YAAYH,EAAME,CAAM,GAAKC,EAAS,SAAS,YAAYH,EAAME,CAAM,CAC5I,CAEA,SAAgB,aAAa,EAAiB,EAAc,EAAe,EAAa,EAA+B,CACnH,IAAMC,EAAW,QAAQR,EAAOC,CAAW,EAC3C,OAAOS,EAAUV,EAAOK,EAAMM,EAAOC,CAAG,GAAKJ,EAAS,SAAS,MAAMH,EAAMM,EAAOC,CAAG,GAAKJ,EAAS,SAAS,MAAMH,EAAMM,EAAOC,CAAG,CACtI,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example-declaration-items.js","names":["exampleDeclarationItems"],"sources":["../../example-declaration-items.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 { CompletionEntry } from './completion-items';\n\nexport const exampleDeclarationItems: CompletionEntry[] = [\n { label: 'example', insertText: 'example ${1:Name} : ${2:Type}\\n ${3:property} = ${4:value}', documentation: 'One possibly partial event, command or read-model fixture. Step assignments override its values; no implicit defaults.' },\n];\n"],"mappings":"AAKA,MAAaA,EAA6C,CACtD,CAAE,MAAO,UAAW,WAAY,gEAAiE,cAAe,wHAAyH,CAC7O"}
|
|
1
|
+
{"version":3,"file":"example-declaration-items.js","names":["exampleDeclarationItems"],"sources":["../../example-declaration-items.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 { CompletionEntry } from './completion-items';\n\nexport const exampleDeclarationItems: CompletionEntry[] = [\n { label: 'example', insertText: 'example ${1:Name} : ${2:Type}\\n ${3:property} = ${4:value}', documentation: 'One possibly partial event, command or read-model fixture. Step assignments override its values; no implicit defaults.' },\n];\n"],"mappings":"AAKA,MAAaA,EAA6C,CACtD,CAAE,MAAO,UAAW,WAAY,gEAAiE,cAAe,wHAAyH,CAC7O,E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example-values.js","names":["primitiveExamples","bare","type","primitive","symbols","concept"],"sources":["../../example-values.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 { DocumentSymbols } from './symbols';\n\nconst exampleUuid = '\"0f8fad5b-d9cb-469f-a165-70867728950e\"';\n\nconst primitiveExamples: Record<string, string> = {\n Uuid: exampleUuid,\n String: '\"Example\"',\n Int: '1',\n Decimal: '1.5',\n Bool: 'true',\n Date: '\"2026-01-15\"',\n DateTime: '\"2026-01-15T10:00:00Z\"',\n};\n\n// An example value to write in a specification for a property of the given type, resolving concepts\n// down to the primitive they wrap. Collections and unknown types fall back to a quoted string.\nexport function exampleValueFor(type: string, symbols: DocumentSymbols): string {\n const bare = type.replace(/\\s+optional$/, '').replace(/\\?$/, '');\n if (bare.endsWith('[]')) return '\"Example\"';\n const primitive = symbols.concepts.find(concept => concept.name === bare)?.primitive ?? bare;\n return primitiveExamples[primitive] ?? '\"Example\"';\n}\n"],"mappings":"iDAOA,MAAMA,EAA4C,CAC9C,KAAM,yCACN,OAAQ,YACR,IAAK,IACL,QAAS,MACT,KAAM,OACN,KAAM,eACN,SAAU,wBACd,EAIA,SAAgB,gBAAgB,EAAc,EAAkC,CAC5E,IAAMC,EAAOC,EAAK,QAAQ,eAAgB,EAAE,CAAC,CAAC,QAAQ,MAAO,EAAE,EAC/D,GAAID,EAAK,SAAS,IAAI,EAAG,MAAO,YAChC,IAAME,EAAYC,EAAQ,SAAS,KAAK,GAAWC,EAAQ,OAASJ,CAAI,CAAC,EAAE,WAAaA,EACxF,OAAOD,EAAkBG,IAAc,WAC3C"}
|
|
1
|
+
{"version":3,"file":"example-values.js","names":["primitiveExamples","bare","type","primitive","symbols","concept"],"sources":["../../example-values.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 { DocumentSymbols } from './symbols';\n\nconst exampleUuid = '\"0f8fad5b-d9cb-469f-a165-70867728950e\"';\n\nconst primitiveExamples: Record<string, string> = {\n Uuid: exampleUuid,\n String: '\"Example\"',\n Int: '1',\n Decimal: '1.5',\n Bool: 'true',\n Date: '\"2026-01-15\"',\n DateTime: '\"2026-01-15T10:00:00Z\"',\n};\n\n// An example value to write in a specification for a property of the given type, resolving concepts\n// down to the primitive they wrap. Collections and unknown types fall back to a quoted string.\nexport function exampleValueFor(type: string, symbols: DocumentSymbols): string {\n const bare = type.replace(/\\s+optional$/, '').replace(/\\?$/, '');\n if (bare.endsWith('[]')) return '\"Example\"';\n const primitive = symbols.concepts.find(concept => concept.name === bare)?.primitive ?? bare;\n return primitiveExamples[primitive] ?? '\"Example\"';\n}\n"],"mappings":"A,iDAOA,MAAMA,EAA4C,CAC9C,KAAM,yCACN,OAAQ,YACR,IAAK,IACL,QAAS,MACT,KAAM,OACN,KAAM,eACN,SAAU,wBACd,EAIA,SAAgB,gBAAgB,EAAc,EAAkC,CAC5E,IAAMC,EAAOC,EAAK,QAAQ,eAAgB,EAAE,CAAC,CAAC,QAAQ,MAAO,EAAE,EAC/D,GAAID,EAAK,SAAS,IAAI,EAAG,MAAO,YAChC,IAAME,EAAYC,EAAQ,SAAS,KAAK,GAAWC,EAAQ,OAASJ,CAAI,CAAC,EAAE,WAAaA,EACxF,OAAOD,EAAkBG,IAAc,WAC3C,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-imports.js","names":["fileImportPattern","quotedImportPattern","line","indent","indentOf","match","startColumn","lineIndex","fences","fenceMap","lines","found","index","fileImport","path","segments","common","from","documentPath","paths","file","files","candidate","relative","folders","depth"],"sources":["../../file-imports.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, indentOf } from './document-context';\n\n// An `import \"<path or glob>\"` of other .play files, with the pattern exactly as written and the span it\n// occupies between the quotes. Columns are one-based like every other position this package reports.\nexport interface FileImport {\n pattern: string;\n line: number;\n startColumn: number;\n endColumn: number;\n}\n\n// The compiler's own shape for a file import (FileImportParser): a quoted operand without quotes or escapes.\nconst fileImportPattern = /^import(\\s+)\"([^\"\\\\]+)\"\\s*(?:\\/\\/.*)?$/;\nconst quotedImportPattern = /^import\\s+\"/;\n\n// Whether a line imports files rather than a qualified name - its operand is quoted.\nexport function isFileImportLine(line: string): boolean {\n return quotedImportPattern.test(line.trim());\n}\n\n// The file import on a single line, or undefined when the line is not a well-formed one.\nexport function fileImportOn(line: string, lineIndex: number): FileImport | undefined {\n const indent = indentOf(line);\n const match = line.slice(indent).match(fileImportPattern);\n if (!match) return undefined;\n const startColumn = indent + 'import'.length + match[1].length + 2;\n return { pattern: match[2], line: lineIndex, startColumn, endColumn: startColumn + match[2].length };\n}\n\n// Every well-formed file import in a document, in document order, skipping code fences.\nexport function fileImports(lines: string[]): FileImport[] {\n const fences = fenceMap(lines);\n const found: FileImport[] = [];\n for (let index = 0; index < lines.length; index++) {\n if (fences[index]) continue;\n const fileImport = fileImportOn(lines[index], index);\n if (fileImport) found.push(fileImport);\n }\n return found;\n}\n\nconst folderOf = (path: string): string[] => path.split('/').slice(0, -1);\n\nfunction relativeTo(from: readonly string[], path: string): string {\n const segments = path.split('/');\n let common = 0;\n while (common < from.length && common < segments.length - 1 && from[common] === segments[common]) common++;\n return [...from.slice(common).map(() => '..'), ...segments.slice(common)].join('/');\n}\n\n// What an import written in a document can name: every other .play file, relative to the document's folder;\n// a glob for the files directly in each folder holding one; and a glob for everything beneath each folder on\n// the way to them. Paths are portable ('/' separated) and relative to one root, the way the compiler resolves them.\nexport function importablePaths(documentPath: string, files: readonly string[]): string[] {\n const from = folderOf(documentPath);\n const paths = new Set<string>();\n for (const file of files.filter((candidate) => candidate !== documentPath && candidate.toLowerCase().endsWith('.play'))) {\n const relative = relativeTo(from, file);\n const folders = folderOf(relative);\n paths.add(relative);\n paths.add([...folders, '*.play'].join('/'));\n for (let depth = 0; depth <= folders.length; depth++) {\n paths.add([...folders.slice(0, depth), '**', '*.play'].join('/'));\n }\n }\n return [...paths].sort();\n}\n"],"mappings":"gHAeA,MAAMA,EAAoB,yCACpBC,EAAsB,cAG5B,SAAgB,iBAAiB,EAAuB,CACpD,OAAOA,EAAoB,KAAKC,EAAK,KAAK,CAAC,CAC/C,CAGA,SAAgB,aAAa,EAAc,EAA2C,CAClF,IAAMC,EAASC,EAASF,CAAI,EACtBG,EAAQH,EAAK,MAAMC,CAAM,CAAC,CAAC,MAAMH,CAAiB,EACxD,GAAI,CAACK,EAAO,OACZ,IAAMC,EAAcH,EAAS,EAAkBE,EAAM,EAAE,CAAC,OAAS,EACjE,MAAO,CAAE,QAASA,EAAM,GAAI,KAAME,EAAW,cAAa,UAAWD,EAAcD,EAAM,EAAE,CAAC,MAAO,CACvG,CAGA,SAAgB,YAAY,EAA+B,CACvD,IAAMG,EAASC,EAASC,CAAK,EACvBC,EAAsB,CAAC,EAC7B,IAAK,IAAIC,EAAQ,EAAGA,EAAQF,EAAM,OAAQ,IAAS,CAC/C,GAAIF,EAAOI,GAAQ,SACnB,IAAMC,EAAa,aAAaH,EAAME,GAAQA,CAAK,EAC/CC,GAAYF,EAAM,KAAKE,CAAU,CACzC,CACA,OAAOF,CACX,CAEA,MAAM,SAAY,GAA2BG,EAAK,MAAM,GAAG,CAAC,CAAC,MAAM,EAAG,EAAE,EAExE,SAAS,WAAW,EAAyB,EAAsB,CAC/D,IAAMC,EAAWD,EAAK,MAAM,GAAG,EAC3BE,EAAS,EACb,KAAOA,EAASC,EAAK,QAAUD,EAASD,EAAS,OAAS,GAAKE,EAAKD,KAAYD,EAASC,IAAS,IAClG,MAAO,CAAC,GAAGC,EAAK,MAAMD,CAAM,CAAC,CAAC,QAAU,IAAI,EAAG,GAAGD,EAAS,MAAMC,CAAM,CAAC,CAAC,CAAC,KAAK,GAAG,CACtF,CAKA,SAAgB,gBAAgB,EAAsB,EAAoC,CACtF,IAAMC,EAAO,SAASC,CAAY,EAC5BC,kBAAQ,IAAI,IAClB,IAAK,IAAMC,KAAQC,EAAM,OAAQ,GAAcC,IAAcJ,GAAgBI,EAAU,YAAY,CAAC,CAAC,SAAS,OAAO,CAAC,EAAG,CACrH,IAAMC,EAAW,WAAWN,EAAMG,CAAI,EAChCI,EAAU,SAASD,CAAQ,EACjCJ,EAAM,IAAII,CAAQ,EAClBJ,EAAM,IAAI,CAAC,GAAGK,EAAS,QAAQ,CAAC,CAAC,KAAK,GAAG,CAAC,EAC1C,IAAK,IAAIC,EAAQ,EAAGA,GAASD,EAAQ,OAAQ,IACzCL,EAAM,IAAI,CAAC,GAAGK,EAAQ,MAAM,EAAGC,CAAK,EAAG,KAAM,QAAQ,CAAC,CAAC,KAAK,GAAG,CAAC,CAExE,CACA,MAAO,CAAC,GAAGN,CAAK,CAAC,CAAC,KAAK,CAC3B"}
|
|
1
|
+
{"version":3,"file":"file-imports.js","names":["fileImportPattern","quotedImportPattern","line","indent","indentOf","match","startColumn","lineIndex","fences","fenceMap","lines","found","index","fileImport","path","segments","common","from","documentPath","paths","file","files","candidate","relative","folders","depth"],"sources":["../../file-imports.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, indentOf } from './document-context';\n\n// An `import \"<path or glob>\"` of other .play files, with the pattern exactly as written and the span it\n// occupies between the quotes. Columns are one-based like every other position this package reports.\nexport interface FileImport {\n pattern: string;\n line: number;\n startColumn: number;\n endColumn: number;\n}\n\n// The compiler's own shape for a file import (FileImportParser): a quoted operand without quotes or escapes.\nconst fileImportPattern = /^import(\\s+)\"([^\"\\\\]+)\"\\s*(?:\\/\\/.*)?$/;\nconst quotedImportPattern = /^import\\s+\"/;\n\n// Whether a line imports files rather than a qualified name - its operand is quoted.\nexport function isFileImportLine(line: string): boolean {\n return quotedImportPattern.test(line.trim());\n}\n\n// The file import on a single line, or undefined when the line is not a well-formed one.\nexport function fileImportOn(line: string, lineIndex: number): FileImport | undefined {\n const indent = indentOf(line);\n const match = line.slice(indent).match(fileImportPattern);\n if (!match) return undefined;\n const startColumn = indent + 'import'.length + match[1].length + 2;\n return { pattern: match[2], line: lineIndex, startColumn, endColumn: startColumn + match[2].length };\n}\n\n// Every well-formed file import in a document, in document order, skipping code fences.\nexport function fileImports(lines: string[]): FileImport[] {\n const fences = fenceMap(lines);\n const found: FileImport[] = [];\n for (let index = 0; index < lines.length; index++) {\n if (fences[index]) continue;\n const fileImport = fileImportOn(lines[index], index);\n if (fileImport) found.push(fileImport);\n }\n return found;\n}\n\nconst folderOf = (path: string): string[] => path.split('/').slice(0, -1);\n\nfunction relativeTo(from: readonly string[], path: string): string {\n const segments = path.split('/');\n let common = 0;\n while (common < from.length && common < segments.length - 1 && from[common] === segments[common]) common++;\n return [...from.slice(common).map(() => '..'), ...segments.slice(common)].join('/');\n}\n\n// What an import written in a document can name: every other .play file, relative to the document's folder;\n// a glob for the files directly in each folder holding one; and a glob for everything beneath each folder on\n// the way to them. Paths are portable ('/' separated) and relative to one root, the way the compiler resolves them.\nexport function importablePaths(documentPath: string, files: readonly string[]): string[] {\n const from = folderOf(documentPath);\n const paths = new Set<string>();\n for (const file of files.filter((candidate) => candidate !== documentPath && candidate.toLowerCase().endsWith('.play'))) {\n const relative = relativeTo(from, file);\n const folders = folderOf(relative);\n paths.add(relative);\n paths.add([...folders, '*.play'].join('/'));\n for (let depth = 0; depth <= folders.length; depth++) {\n paths.add([...folders.slice(0, depth), '**', '*.play'].join('/'));\n }\n }\n return [...paths].sort();\n}\n"],"mappings":"A,gHAeA,MAAMA,EAAoB,yCACpBC,EAAsB,cAG5B,SAAgB,iBAAiB,EAAuB,CACpD,OAAOA,EAAoB,KAAKC,EAAK,KAAK,CAAC,CAC/C,CAGA,SAAgB,aAAa,EAAc,EAA2C,CAClF,IAAMC,EAASC,EAASF,CAAI,EACtBG,EAAQH,EAAK,MAAMC,CAAM,CAAC,CAAC,MAAMH,CAAiB,EACxD,GAAI,CAACK,EAAO,OACZ,IAAMC,EAAcH,EAAS,EAAkBE,EAAM,EAAE,CAAC,OAAS,EACjE,MAAO,CAAE,QAASA,EAAM,GAAI,KAAME,EAAW,cAAa,UAAWD,EAAcD,EAAM,EAAE,CAAC,MAAO,CACvG,CAGA,SAAgB,YAAY,EAA+B,CACvD,IAAMG,EAASC,EAASC,CAAK,EACvBC,EAAsB,CAAC,EAC7B,IAAK,IAAIC,EAAQ,EAAGA,EAAQF,EAAM,OAAQ,IAAS,CAC/C,GAAIF,EAAOI,GAAQ,SACnB,IAAMC,EAAa,aAAaH,EAAME,GAAQA,CAAK,EAC/CC,GAAYF,EAAM,KAAKE,CAAU,CACzC,CACA,OAAOF,CACX,CAEA,MAAM,SAAY,GAA2BG,EAAK,MAAM,GAAG,CAAC,CAAC,MAAM,EAAG,EAAE,EAExE,SAAS,WAAW,EAAyB,EAAsB,CAC/D,IAAMC,EAAWD,EAAK,MAAM,GAAG,EAC3BE,EAAS,EACb,KAAOA,EAASC,EAAK,QAAUD,EAASD,EAAS,OAAS,GAAKE,EAAKD,KAAYD,EAASC,IAAS,IAClG,MAAO,CAAC,GAAGC,EAAK,MAAMD,CAAM,CAAC,CAAC,QAAU,IAAI,EAAG,GAAGD,EAAS,MAAMC,CAAM,CAAC,CAAC,CAAC,KAAK,GAAG,CACtF,CAKA,SAAgB,gBAAgB,EAAsB,EAAoC,CACtF,IAAMC,EAAO,SAASC,CAAY,EAC5BC,kBAAQ,IAAI,IAClB,IAAK,IAAMC,KAAQC,EAAM,OAAQ,GAAcC,IAAcJ,GAAgBI,EAAU,YAAY,CAAC,CAAC,SAAS,OAAO,CAAC,EAAG,CACrH,IAAMC,EAAW,WAAWN,EAAMG,CAAI,EAChCI,EAAU,SAASD,CAAQ,EACjCJ,EAAM,IAAII,CAAQ,EAClBJ,EAAM,IAAI,CAAC,GAAGK,EAAS,QAAQ,CAAC,CAAC,KAAK,GAAG,CAAC,EAC1C,IAAK,IAAIC,EAAQ,EAAGA,GAASD,EAAQ,OAAQ,IACzCL,EAAM,IAAI,CAAC,GAAGK,EAAQ,MAAM,EAAGC,CAAK,EAAG,KAAM,QAAQ,CAAC,CAAC,KAAK,GAAG,CAAC,CAExE,CACA,MAAO,CAAC,GAAGN,CAAK,CAAC,CAAC,KAAK,CAC3B,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-references.js","names":["fileReferenceKeyword","typeReferencePattern","absolutePathPattern","path","inString","inTemplate","index","text","current","indent","indentOf","line","content","firstWord","afterKeyword","separatorLength","startColumn","lineIndex","fences","fenceMap","lines","references","reference"],"sources":["../../file-references.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, firstWord, indentOf } from './document-context';\n\n// The keyword the directive opens with — the single word the language points at a file with.\nexport const fileReferenceKeyword = 'file';\n\n// A `file <path>` directive, with the path exactly as written and the span it occupies on its line.\n// The span is measured against the raw line, and its columns are one-based like every other position\n// this package reports, so an editor places a range on it the same way it does a validation issue.\nexport interface FileReference {\n path: string;\n line: number;\n startColumn: number;\n endColumn: number;\n}\n\n// `file String` is a property named `file`; `file Invoices/Register.cs` is the directive. The two are\n// told apart by shape, the way the compiler tells them apart: a type reference is a bare identifier,\n// so anything carrying a separator or an extension is a path and nothing else. The property wins the\n// tie, because a document that used the name before the directive existed keeps meaning what it meant.\nconst typeReferencePattern = /^[A-Za-z_]\\w*(?:\\[\\])?(?:\\?|\\s+optional)?$/;\n\n// A path naming a place on one machine rather than a place in the repository. The compiler warns about\n// these; nothing here rejects one, so a resolver can still probe it and come up empty on other machines.\nconst absolutePathPattern = /^(?:[/\\\\]|[A-Za-z]:[/\\\\]|~[/\\\\])/;\n\nexport function isAbsoluteFileReferencePath(path: string): boolean {\n return absolutePathPattern.test(path);\n}\n\n// Drops a trailing `//` comment without cutting into a string or a template, mirroring how the\n// compiler strips one before it reads the line.\nfunction withoutComment(text: string): string {\n let inString = false;\n let inTemplate = false;\n\n for (let index = 0; index < text.length; index++) {\n const current = text[index];\n if (current === '\\\\' && inString && index + 1 < text.length) {\n index++;\n } else if (current === '\"' && !inTemplate) {\n inString = !inString;\n } else if (current === '`' && !inString) {\n inTemplate = !inTemplate;\n } else if (!inString && !inTemplate && current === '/' && text[index + 1] === '/') {\n return text.slice(0, index);\n }\n }\n\n return text;\n}\n\n// The `file` directive on a single line, or undefined when the line is not one. Callers that scan a\n// whole document go through fileReferences instead, so code fences are accounted for.\nexport function fileReferenceOn(line: string, lineIndex: number): FileReference | undefined {\n const indent = indentOf(line);\n const content = withoutComment(line.slice(indent)).trimEnd();\n if (firstWord(content) !== fileReferenceKeyword) return undefined;\n\n const afterKeyword = content.slice(fileReferenceKeyword.length);\n const path = afterKeyword.trim();\n\n // A bare `file` leaves the word available as a name to whatever the enclosing block reads a bare\n // word as, and a bare identifier after it is a property type rather than a path.\n if (path.length === 0 || typeReferencePattern.test(path)) return undefined;\n\n const separatorLength = afterKeyword.length - afterKeyword.trimStart().length;\n const startColumn = indent + fileReferenceKeyword.length + separatorLength + 1;\n return { path, line: lineIndex, startColumn, endColumn: startColumn + path.length };\n}\n\n// Every `file` directive in a document, in document order. Lines inside a code fence are skipped, so\n// a `file` line in an inline C# or TypeScript block is never mistaken for one of ours.\nexport function fileReferences(lines: string[]): FileReference[] {\n const fences = fenceMap(lines);\n const references: FileReference[] = [];\n\n for (let index = 0; index < lines.length; index++) {\n if (fences[index]) continue;\n const reference = fileReferenceOn(lines[index], index);\n if (reference) references.push(reference);\n }\n\n return references;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"file-references.js","names":["fileReferenceKeyword","typeReferencePattern","absolutePathPattern","path","inString","inTemplate","index","text","current","indent","indentOf","line","content","firstWord","afterKeyword","separatorLength","startColumn","lineIndex","fences","fenceMap","lines","references","reference"],"sources":["../../file-references.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, firstWord, indentOf } from './document-context';\n\n// The keyword the directive opens with — the single word the language points at a file with.\nexport const fileReferenceKeyword = 'file';\n\n// A `file <path>` directive, with the path exactly as written and the span it occupies on its line.\n// The span is measured against the raw line, and its columns are one-based like every other position\n// this package reports, so an editor places a range on it the same way it does a validation issue.\nexport interface FileReference {\n path: string;\n line: number;\n startColumn: number;\n endColumn: number;\n}\n\n// `file String` is a property named `file`; `file Invoices/Register.cs` is the directive. The two are\n// told apart by shape, the way the compiler tells them apart: a type reference is a bare identifier,\n// so anything carrying a separator or an extension is a path and nothing else. The property wins the\n// tie, because a document that used the name before the directive existed keeps meaning what it meant.\nconst typeReferencePattern = /^[A-Za-z_]\\w*(?:\\[\\])?(?:\\?|\\s+optional)?$/;\n\n// A path naming a place on one machine rather than a place in the repository. The compiler warns about\n// these; nothing here rejects one, so a resolver can still probe it and come up empty on other machines.\nconst absolutePathPattern = /^(?:[/\\\\]|[A-Za-z]:[/\\\\]|~[/\\\\])/;\n\nexport function isAbsoluteFileReferencePath(path: string): boolean {\n return absolutePathPattern.test(path);\n}\n\n// Drops a trailing `//` comment without cutting into a string or a template, mirroring how the\n// compiler strips one before it reads the line.\nfunction withoutComment(text: string): string {\n let inString = false;\n let inTemplate = false;\n\n for (let index = 0; index < text.length; index++) {\n const current = text[index];\n if (current === '\\\\' && inString && index + 1 < text.length) {\n index++;\n } else if (current === '\"' && !inTemplate) {\n inString = !inString;\n } else if (current === '`' && !inString) {\n inTemplate = !inTemplate;\n } else if (!inString && !inTemplate && current === '/' && text[index + 1] === '/') {\n return text.slice(0, index);\n }\n }\n\n return text;\n}\n\n// The `file` directive on a single line, or undefined when the line is not one. Callers that scan a\n// whole document go through fileReferences instead, so code fences are accounted for.\nexport function fileReferenceOn(line: string, lineIndex: number): FileReference | undefined {\n const indent = indentOf(line);\n const content = withoutComment(line.slice(indent)).trimEnd();\n if (firstWord(content) !== fileReferenceKeyword) return undefined;\n\n const afterKeyword = content.slice(fileReferenceKeyword.length);\n const path = afterKeyword.trim();\n\n // A bare `file` leaves the word available as a name to whatever the enclosing block reads a bare\n // word as, and a bare identifier after it is a property type rather than a path.\n if (path.length === 0 || typeReferencePattern.test(path)) return undefined;\n\n const separatorLength = afterKeyword.length - afterKeyword.trimStart().length;\n const startColumn = indent + fileReferenceKeyword.length + separatorLength + 1;\n return { path, line: lineIndex, startColumn, endColumn: startColumn + path.length };\n}\n\n// Every `file` directive in a document, in document order. Lines inside a code fence are skipped, so\n// a `file` line in an inline C# or TypeScript block is never mistaken for one of ours.\nexport function fileReferences(lines: string[]): FileReference[] {\n const fences = fenceMap(lines);\n const references: FileReference[] = [];\n\n for (let index = 0; index < lines.length; index++) {\n if (fences[index]) continue;\n const reference = fileReferenceOn(lines[index], index);\n if (reference) references.push(reference);\n }\n\n return references;\n}\n"],"mappings":"A,+HAMA,MAAaA,EAAuB,OAgB9BC,EAAuB,6CAIvBC,EAAsB,mCAE5B,SAAgB,4BAA4B,EAAuB,CAC/D,OAAOA,EAAoB,KAAKC,CAAI,CACxC,CAIA,SAAS,eAAe,EAAsB,CAC1C,IAAIC,EAAW,GACXC,EAAa,GAEjB,IAAK,IAAIC,EAAQ,EAAGA,EAAQC,EAAK,OAAQ,IAAS,CAC9C,IAAMC,EAAUD,EAAKD,GACrB,GAAIE,IAAY,MAAQJ,GAAYE,EAAQ,EAAIC,EAAK,OACjD,SACG,GAAIC,IAAY,KAAO,CAACH,EAC3B,EAAW,CAACD,OACT,GAAII,IAAY,KAAO,CAACJ,EAC3B,EAAa,CAACC,OACX,GAAI,CAACD,GAAY,CAACC,GAAcG,IAAY,KAAOD,EAAKD,EAAQ,KAAO,IAC1E,OAAOC,EAAK,MAAM,EAAGD,CAAK,CAElC,CAEA,OAAOC,CACX,CAIA,SAAgB,gBAAgB,EAAc,EAA8C,CACxF,IAAME,EAASC,EAASC,CAAI,EACtBC,EAAU,eAAeD,EAAK,MAAMF,CAAM,CAAC,CAAC,CAAC,QAAQ,EAC3D,GAAII,EAAUD,CAAO,IAAA,OAA4B,OAEjD,IAAME,EAAeF,EAAQ,MAAM,CAA2B,EACxDT,EAAOW,EAAa,KAAK,EAI/B,GAAIX,EAAK,SAAW,GAAKF,EAAqB,KAAKE,CAAI,EAAG,OAE1D,IAAMY,EAAkBD,EAAa,OAASA,EAAa,UAAU,CAAC,CAAC,OACjEE,EAAcP,EAAS,EAA8BM,EAAkB,EAC7E,MAAO,CAAE,OAAM,KAAME,EAAW,cAAa,UAAWD,EAAcb,EAAK,MAAO,CACtF,CAIA,SAAgB,eAAe,EAAkC,CAC7D,IAAMe,EAASC,EAASC,CAAK,EACvBC,EAA8B,CAAC,EAErC,IAAK,IAAIf,EAAQ,EAAGA,EAAQc,EAAM,OAAQ,IAAS,CAC/C,GAAIF,EAAOZ,GAAQ,SACnB,IAAMgB,EAAY,gBAAgBF,EAAMd,GAAQA,CAAK,EACjDgB,GAAWD,EAAW,KAAKC,CAAS,CAC5C,CAEA,OAAOD,CACX,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generation-completions.js","names":["primitive","lines","lineIndex","line","textBefore","algorithm","allowed","conceptItems","item","strategy","outsideStrings","encoding","entries","entry"],"sources":["../../generation-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 { conceptItems, CompletionEntry } from './completion-items';\n\nexport function generationCompletions(lines: string[], lineIndex: number, textBefore: string): CompletionEntry[] | null {\n const header = lines.slice(0, lineIndex).reverse().find(line => /^\\s*concept\\s+[^\\s:]+\\s*:\\s*\\w+/.test(line));\n const primitive = header?.match(/:\\s*(\\w+)/)?.[1];\n if (primitive === 'String' && /^\\s*(?:validate\\s+)?checksum\\s+\\w*$/.test(textBefore)) {\n return ['luhn', 'mod11', 'mod97'].map(algorithm => ({ label: algorithm, insertText: algorithm, documentation: 'Exact trailing checksum validation over preceding ASCII digits; independent of generation.' }));\n }\n if (/^\\s*generate\\s+\\w*$/.test(textBefore)) {\n const allowed = primitive === 'Uuid' ? ['uuid', 'uuidv7'] : primitive === 'Int' ? ['random'] : primitive === 'String' ? ['uuid', 'uuidv7', 'ulid', 'typeid', 'nanoid', 'bytes', 'pattern', 'rule'] : [];\n return conceptItems.filter(item => allowed.includes(item.label.slice('generate '.length))).map(item => ({ ...item, label: item.label.slice('generate '.length), insertText: item.insertText.slice('generate '.length) }));\n }\n const strategy = textBefore.match(/^\\s*generate\\s+(\\w+)\\s+/)?.[1];\n if (!strategy) return null;\n const outsideStrings = textBefore.replace(/\"(?:[^\"\\\\]|\\\\.)*\"/g, '');\n if (outsideStrings.includes('\"')) return [];\n if (strategy === 'bytes' && !/\\b(base64url|hex|base32)\\b/.test(outsideStrings)) {\n return ['base64url', 'hex', 'base32'].map(encoding => ({ label: encoding, insertText: encoding, documentation: 'RFC 4648 without padding; exact byte count and zero unused trailing bits.' }));\n }\n const entries: CompletionEntry[] = [];\n if (primitive === 'String' && ['uuid', 'uuidv7', 'ulid', 'nanoid', 'bytes'].includes(strategy)) entries.push({ label: 'prefix', insertText: 'prefix \"${1:ref_}\"', documentation: 'At most 32 printable ASCII characters; adds no random bits.' });\n if (strategy === 'ulid' || (primitive === 'String' && ['uuid', 'uuidv7'].includes(strategy)) || (strategy === 'bytes' && /\\b(hex|base32)\\b/.test(outsideStrings))) entries.push({ label: 'case', insertText: 'case ${1|lower,upper|}', documentation: 'Changes the encoded portion only; never the prefix.' });\n if (strategy === 'nanoid') entries.push({ label: 'alphabet', insertText: 'alphabet \"${1:abcdef0123456789}\"', documentation: '2..256 distinct printable ASCII characters; bits = size × log2(alphabet size).' });\n if (strategy === 'pattern') entries.push({ label: 'checksum', insertText: 'checksum ${1|luhn,mod11,mod97|}', documentation: 'Append deterministic check digits without adding entropy. Fixtures check digit shape; author validate checksum separately to enforce arithmetic. mod11 excludes output 10 from support.' });\n return entries.filter(entry => !new RegExp(`\\\\b${entry.label}\\\\b`).test(outsideStrings));\n}\n"],"mappings":"sGAKA,SAAgB,sBAAsB,EAAiB,EAAmB,EAA8C,CAEpH,IAAMA,EADSC,EAAM,MAAM,EAAGC,CAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAQ,kCAAkC,KAAKC,CAAI,CACpF,CAAC,EAAE,MAAM,WAAW,CAAC,GAAG,GAC/C,GAAIH,IAAc,UAAY,sCAAsC,KAAKI,CAAU,EAC/E,MAAO,CAAC,OAAQ,QAAS,OAAO,CAAC,CAAC,IAAI,IAAc,CAAE,MAAOC,EAAW,WAAYA,EAAW,cAAe,4FAA6F,EAAE,EAEjN,GAAI,sBAAsB,KAAKD,CAAU,EAAG,CACxC,IAAME,EAAUN,IAAc,OAAS,CAAC,OAAQ,QAAQ,EAAIA,IAAc,MAAQ,CAAC,QAAQ,EAAIA,IAAc,SAAW,CAAC,OAAQ,SAAU,OAAQ,SAAU,SAAU,QAAS,UAAW,MAAM,EAAI,CAAC,EACtM,OAAOO,EAAa,OAAO,GAAQD,EAAQ,SAASE,EAAK,MAAM,MAAM,CAAkB,CAAC,CAAC,CAAC,CAAC,IAAI,IAAS,CAAE,GAAGA,EAAM,MAAOA,EAAK,MAAM,MAAM,CAAkB,EAAG,WAAYA,EAAK,WAAW,MAAM,CAAkB,CAAE,EAAE,CAC5N,CACA,IAAMC,EAAWL,EAAW,MAAM,yBAAyB,CAAC,GAAG,GAC/D,GAAI,CAACK,EAAU,OAAO,KACtB,IAAMC,EAAiBN,EAAW,QAAQ,qBAAsB,EAAE,EAClE,GAAIM,EAAe,SAAS,GAAG,EAAG,MAAO,CAAC,EAC1C,GAAID,IAAa,SAAW,CAAC,6BAA6B,KAAKC,CAAc,EACzE,MAAO,CAAC,YAAa,MAAO,QAAQ,CAAC,CAAC,IAAI,IAAa,CAAE,MAAOC,EAAU,WAAYA,EAAU,cAAe,2EAA4E,EAAE,EAEjM,IAAMC,EAA6B,CAAC,EAKpC,OAJIZ,IAAc,UAAY,CAAC,OAAQ,SAAU,OAAQ,SAAU,OAAO,CAAC,CAAC,SAASS,CAAQ,GAAGG,EAAQ,KAAK,CAAE,MAAO,SAAU,WAAY,qBAAsB,cAAe,6DAA8D,CAAC,GAC5OH,IAAa,QAAWT,IAAc,UAAY,CAAC,OAAQ,QAAQ,CAAC,CAAC,SAASS,CAAQ,GAAOA,IAAa,SAAW,mBAAmB,KAAKC,CAAc,IAAIE,EAAQ,KAAK,CAAE,MAAO,OAAQ,WAAY,yBAA0B,cAAe,qDAAsD,CAAC,EACzSH,IAAa,UAAUG,EAAQ,KAAK,CAAE,MAAO,WAAY,WAAY,mCAAoC,cAAe,gFAAiF,CAAC,EAC1MH,IAAa,WAAWG,EAAQ,KAAK,CAAE,MAAO,WAAY,WAAY,kCAAmC,cAAe,yLAA0L,CAAC,EAChTA,EAAQ,OAAO,GAAS,CAAK,OAAO,MAAMC,EAAM,MAAM,IAAI,CAAC,CAAC,KAAKH,CAAc,CAAC,CAC3F"}
|
|
1
|
+
{"version":3,"file":"generation-completions.js","names":["primitive","lines","lineIndex","line","textBefore","algorithm","allowed","conceptItems","item","strategy","outsideStrings","encoding","entries","entry"],"sources":["../../generation-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 { conceptItems, CompletionEntry } from './completion-items';\n\nexport function generationCompletions(lines: string[], lineIndex: number, textBefore: string): CompletionEntry[] | null {\n const header = lines.slice(0, lineIndex).reverse().find(line => /^\\s*concept\\s+[^\\s:]+\\s*:\\s*\\w+/.test(line));\n const primitive = header?.match(/:\\s*(\\w+)/)?.[1];\n if (primitive === 'String' && /^\\s*(?:validate\\s+)?checksum\\s+\\w*$/.test(textBefore)) {\n return ['luhn', 'mod11', 'mod97'].map(algorithm => ({ label: algorithm, insertText: algorithm, documentation: 'Exact trailing checksum validation over preceding ASCII digits; independent of generation.' }));\n }\n if (/^\\s*generate\\s+\\w*$/.test(textBefore)) {\n const allowed = primitive === 'Uuid' ? ['uuid', 'uuidv7'] : primitive === 'Int' ? ['random'] : primitive === 'String' ? ['uuid', 'uuidv7', 'ulid', 'typeid', 'nanoid', 'bytes', 'pattern', 'rule'] : [];\n return conceptItems.filter(item => allowed.includes(item.label.slice('generate '.length))).map(item => ({ ...item, label: item.label.slice('generate '.length), insertText: item.insertText.slice('generate '.length) }));\n }\n const strategy = textBefore.match(/^\\s*generate\\s+(\\w+)\\s+/)?.[1];\n if (!strategy) return null;\n const outsideStrings = textBefore.replace(/\"(?:[^\"\\\\]|\\\\.)*\"/g, '');\n if (outsideStrings.includes('\"')) return [];\n if (strategy === 'bytes' && !/\\b(base64url|hex|base32)\\b/.test(outsideStrings)) {\n return ['base64url', 'hex', 'base32'].map(encoding => ({ label: encoding, insertText: encoding, documentation: 'RFC 4648 without padding; exact byte count and zero unused trailing bits.' }));\n }\n const entries: CompletionEntry[] = [];\n if (primitive === 'String' && ['uuid', 'uuidv7', 'ulid', 'nanoid', 'bytes'].includes(strategy)) entries.push({ label: 'prefix', insertText: 'prefix \"${1:ref_}\"', documentation: 'At most 32 printable ASCII characters; adds no random bits.' });\n if (strategy === 'ulid' || (primitive === 'String' && ['uuid', 'uuidv7'].includes(strategy)) || (strategy === 'bytes' && /\\b(hex|base32)\\b/.test(outsideStrings))) entries.push({ label: 'case', insertText: 'case ${1|lower,upper|}', documentation: 'Changes the encoded portion only; never the prefix.' });\n if (strategy === 'nanoid') entries.push({ label: 'alphabet', insertText: 'alphabet \"${1:abcdef0123456789}\"', documentation: '2..256 distinct printable ASCII characters; bits = size × log2(alphabet size).' });\n if (strategy === 'pattern') entries.push({ label: 'checksum', insertText: 'checksum ${1|luhn,mod11,mod97|}', documentation: 'Append deterministic check digits without adding entropy. Fixtures check digit shape; author validate checksum separately to enforce arithmetic. mod11 excludes output 10 from support.' });\n return entries.filter(entry => !new RegExp(`\\\\b${entry.label}\\\\b`).test(outsideStrings));\n}\n"],"mappings":"A,sGAKA,SAAgB,sBAAsB,EAAiB,EAAmB,EAA8C,CAEpH,IAAMA,EADSC,EAAM,MAAM,EAAGC,CAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAQ,kCAAkC,KAAKC,CAAI,CACpF,CAAC,EAAE,MAAM,WAAW,CAAC,GAAG,GAC/C,GAAIH,IAAc,UAAY,sCAAsC,KAAKI,CAAU,EAC/E,MAAO,CAAC,OAAQ,QAAS,OAAO,CAAC,CAAC,IAAI,IAAc,CAAE,MAAOC,EAAW,WAAYA,EAAW,cAAe,4FAA6F,EAAE,EAEjN,GAAI,sBAAsB,KAAKD,CAAU,EAAG,CACxC,IAAME,EAAUN,IAAc,OAAS,CAAC,OAAQ,QAAQ,EAAIA,IAAc,MAAQ,CAAC,QAAQ,EAAIA,IAAc,SAAW,CAAC,OAAQ,SAAU,OAAQ,SAAU,SAAU,QAAS,UAAW,MAAM,EAAI,CAAC,EACtM,OAAOO,EAAa,OAAO,GAAQD,EAAQ,SAASE,EAAK,MAAM,MAAM,CAAkB,CAAC,CAAC,CAAC,CAAC,IAAI,IAAS,CAAE,GAAGA,EAAM,MAAOA,EAAK,MAAM,MAAM,CAAkB,EAAG,WAAYA,EAAK,WAAW,MAAM,CAAkB,CAAE,EAAE,CAC5N,CACA,IAAMC,EAAWL,EAAW,MAAM,yBAAyB,CAAC,GAAG,GAC/D,GAAI,CAACK,EAAU,OAAO,KACtB,IAAMC,EAAiBN,EAAW,QAAQ,qBAAsB,EAAE,EAClE,GAAIM,EAAe,SAAS,GAAG,EAAG,MAAO,CAAC,EAC1C,GAAID,IAAa,SAAW,CAAC,6BAA6B,KAAKC,CAAc,EACzE,MAAO,CAAC,YAAa,MAAO,QAAQ,CAAC,CAAC,IAAI,IAAa,CAAE,MAAOC,EAAU,WAAYA,EAAU,cAAe,2EAA4E,EAAE,EAEjM,IAAMC,EAA6B,CAAC,EAKpC,OAJIZ,IAAc,UAAY,CAAC,OAAQ,SAAU,OAAQ,SAAU,OAAO,CAAC,CAAC,SAASS,CAAQ,GAAGG,EAAQ,KAAK,CAAE,MAAO,SAAU,WAAY,qBAAsB,cAAe,6DAA8D,CAAC,GAC5OH,IAAa,QAAWT,IAAc,UAAY,CAAC,OAAQ,QAAQ,CAAC,CAAC,SAASS,CAAQ,GAAOA,IAAa,SAAW,mBAAmB,KAAKC,CAAc,IAAIE,EAAQ,KAAK,CAAE,MAAO,OAAQ,WAAY,yBAA0B,cAAe,qDAAsD,CAAC,EACzSH,IAAa,UAAUG,EAAQ,KAAK,CAAE,MAAO,WAAY,WAAY,mCAAoC,cAAe,gFAAiF,CAAC,EAC1MH,IAAa,WAAWG,EAAQ,KAAK,CAAE,MAAO,WAAY,WAAY,kCAAmC,cAAe,yLAA0L,CAAC,EAChTA,EAAQ,OAAO,GAAS,CAAK,OAAO,MAAMC,EAAM,MAAM,IAAI,CAAC,CAAC,KAAKH,CAAc,CAAC,CAC3F,C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import"./_virtual/_virtual/_rolldown/runtime.js";import{
|
|
2
|
-
`);return`\`\`\`screenplay\ntype ${q.name}\n${
|
|
3
|
-
`):`(custom C#)`;return`\`\`\`screenplay\npolicy ${J.name}\n${e}\n\`\`\``}let Y=H.events.find(e=>e.name===w&&e.line===C)??H.events.filter(e=>e.name===w).sort((e,t)=>(t.generation??1)-(e.generation??1))[0];if(Y){let
|
|
4
|
-
`);return`\`\`\`screenplay\n${Y.visibility===`Public`?`public `:``}event ${Y.name}${Y.generation===void 0?``:` generation ${Y.generation}`}${Y.origin===void 0?``:` from ${JSON.stringify(Y.origin)}`}\n${
|
|
5
|
-
`);return`\`\`\`screenplay\ncommand ${X.name}\n${
|
|
1
|
+
import"./_virtual/_virtual/_rolldown/runtime.js";import{actionSubjectHover as e}from"./action-subject-authoring.js";import{continuationResponseHover as t}from"./continuation-responses.js";import{reactionReferenceAt as n}from"./reaction-authoring.js";import{refusalContext as ee}from"./refusal-context.js";import{namedRuleContext as r}from"./named-rule-context.js";import{eventSourceHover as i}from"./event-source-authoring.js";import{exampleHover as te}from"./example-authoring.js";import{operationHover as a}from"./operation-authoring.js";import{directBody as ne,propertyTypeReference as o,scanDocument as s,symbolsForBuffer as c}from"./symbols.js";import{responseAnalysis as l,responseAvailability as u}from"./response-analysis.js";import{enclosingChain as d,enclosingHeaders as re,fenceMap as f,indentOf as p,withoutComment as m}from"./document-context.js";import{typeReferenceText as h}from"./TypeReferenceSymbol.js";import{eventAnalysisSource as g}from"./event-analysis-source.js";import{getSubLanguage as ie}from"./sub-language-registry.js";import{attributeDocs as ae,contextVariableDocs as _,handlerIntentDocs as v,keywordDocs as y,specialCategoryDocs as b,specificationKeywordDocs as x}from"./keyword-docs.js";function hoverContent(S,C,w,T,E,D){let O=f(S);if(O[C])return null;let k=S[C]??``;if(E-1>m(k).length)return null;let A=!1,j=!1;for(let e=0;e<T-1;e++)k[e]===`\\`&&A?e++:k[e]===`"`&&!j?A=!A:k[e]==="`"&&!A&&(j=!j);if(A||j)return null;let M=e(k,w,T);if(M)return M;let N=t(S,C,w,T,E,D);if(N)return N;let P=n(S,C,T,E,D);if(P)return P.content;let F=te(S,C,T,E,D);if(F)return F;let I=i(S,C,T,E,D);if(I)return I;let L=a(S,C,T,E,D);if(L)return L;let tokenAt=(e,t)=>{let n=e+ +(k[e-1]===`@`);return w===t&&T===n&&E===n+t.length&&k.slice(n-1,E-1)===t},R=k.charAt(T-2);if(w===`authorization`&&d(S,O,C,p(k))[0]===`purpose`)return`A quoted authorization in law for criminal-offence data (Art. 10).`;if(d(S,O,C,p(k))[0]===`concept`&&/^\s*generate\b/.test(k)){let e={generate:`The concept declares how; a command property declares generated. ESM v15 checks fixture shape and guards generated event sources against existing facts.`,uuid:`Random UUID v4, 122 random bits; about 3.27 × 10^17 values at 1% collision probability.`,uuidv7:`Time-ordered UUID v7, 74 random bits; about 1.95 × 10^10 values at 1% collision probability. Exposes time; not monotonic within a millisecond.`,ulid:`26 Crockford base32 characters (uppercase by default), 80 random bits; about 1.56 × 10^11 values at 1% collision probability.`,typeid:`TypeID 0.3: lowercase UUIDv7 base32 with a 0..63-character prefix. 74 random bits; empty prefix has no separator.`,nanoid:`Default 21 characters over 64 symbols: 126 random bits. Custom entropy = size × log2(alphabet size).`,bytes:`8 × count random bits; base64url, hex or base32 without padding. RFC 4648 unused trailing bits must be zero.`,prefix:`Printable ASCII prefix, at most 32 characters. UUID prefixes require a String concept; TypeID uses its own argument.`,alphabet:`NanoID only: 2..256 distinct printable ASCII characters.`,case:`lower or upper for String UUIDs, ULID, hex/base32 bytes. Never base64url, NanoID or TypeID.`,pattern:`ESM v21 finite ASCII pattern: # digits, ? uppercase letters, * uppercase letters and digits, classes, repeats 1..64 and UTC yyyy/yy/MM/dd segments. Final value including checksum is at most 256 characters. Counts distinct strings, not repeat decompositions; dates and check digits add no entropy.`,random:`ESM v21 inclusive signed Int64 range for an Int value. Fixtures must be integral numbers within the exact bounds. Int cannot be a generated identifier.`,rule:`ESM v21 ValueGeneration requirement with exactly one direct file or tagged fence. Returns String; the closed GenerationContext descriptor (Now, Tenant) is bound by each provider to its own type; Cratis C# binds the Fundamentals GenerationContext. Entropy is unknown. The reference runner uses a fixture and never executes the body.`,checksum:`Appends luhn/mod11/mod97 check digits, adding no entropy. mod11 excludes check digit 10. Generated fixtures check only suffix digit shape unless validate checksum is authored.`,sequence:`Reserved; binding refuses it until #619 is admitted.`};if(e[w])return e[w]}let z=/^\s*concept\s+[^\s:]+\s*:\s*\w+\s+/.exec(k),oe=d(S,O,C,p(k))[0]===`concept`&&/^\s*(?:@?pii|personal|@?sensitive|secret)\s+(?:reason|scope|special|criminal)\b/.test(k);if(z!==null&&T-1>=z[0].length-1||oe){let e=ae[w];if(e)return e;if(Object.hasOwn(b,w)&&/^\s*(?:@?pii|personal)\s+special\s+/.test(k))return`**${w}** — ${b[w]}`;if(w===`special`)return`GDPR Art. 9(1) special category; requires pii. At most one category per concept.`;if(w===`criminal`)return`Personal data relating to criminal convictions and offenses (GDPR Art. 10); requires pii.`;if(/^\s*(?:secret|sensitive|@sensitive)\s+scope\s+/.test(k)&&[`subject`,`namespace`,`global`].includes(w))return`**${w}** — Secret encryption scope${w===`subject`?` per data subject`:w===`namespace`?` per tenant namespace`:` shared globally`}. Not an event-property subject role.`;if(w===`scope`)return`Secret encryption scope: subject, namespace or global. Omitted scope keeps Chronicle’s Subject default; pii secret renders only [PII].`}if(R===`$`||R===`.`){let e=k.substring(0,E-1).match(/\$[\w.]*$/)?.[0];if(e){if(e.startsWith(`$refusal`)){let t=ee(S,C,p(k)),n=e.substring(9),r={reason:`Refusal kind as a String: validation, constraint or authorization.`,message:`Messages of the classified kind joined with a newline in result order, verbatim including unresolved $strings keys; authorization uses its denial reason.`,constraint:`First violated constraint name in result order as a String, only in a by constraint branch.`};return t!==void 0&&r[n]!==void 0?`**${e}** — ${r[n]} Executable from ESM v19 in branch event mappings.`:null}if(e.startsWith(`$identity.`)){let t=e.substring(10).split(`.`)[0],n=c(S,D).identityDetails?.find(e=>e.name===t);if(n)return`**$identity.${n.name}** — ${n.type}. Declared caller detail; authoring metadata only, not executable until admitted (#600).`}let t=_[e]??(e.startsWith(`$env`)?_.$env:void 0);if(t)return t}}let B=k.slice(0,T-1),V=/^\s*(?:by|filter)\s+/.test(B)?/^\s*(?:by|filter)\s+[a-z_]\w*\s+[\w.]+(?:\[\])?\s+$/.test(B):/^\s*@?[a-z_]\w*\s+[\w.]+(?:\[\])?\s+$/.test(B),se=/^\s*query\s+\w+\s*=>\s*(?:observable\s+)?[\w.]+(?:\[\])?\s+$/.test(B)&&!/^\s*query\s+\w+\s*=>\s*observable\s+$/.test(B);if(w===`subject`){let e=g(S),t=/^\s*@?[a-z_]\w*\s+[\w.]+(?:\[\])?(?:\?|\s+optional)?(?:\s+generated)?(?:\s+identifier)?\s+$/.test(B),n=d(e,O,C,p(k));return t&&(n[0]===`event`||/^produces\s+event\s+/.test(re(e,O,C,p(k))[0]??``))?`**subject** — This event property identifies its one data subject instead of the event source (decision 0008). Required scalar String, Uuid or their concepts, or an Int-backed concept; never pii or secret. Report-only lineage metadata (PLAY0270); no ESM bytes or provider output yet.`:/\bclaim\s+"(?:[^"\\]|\\.)*"\s+matches\s+$/.test(B)&&n.includes(`policy`)?`**subject** — ${y.subject}`:null}if(w===`optional`&&(V||se))return`**optional** — ${y.optional}`;if(w===`implementation`||w===`hint`){let e=d(S,O,C,p(k)),t=r(S,C,p(k));if(w===`implementation`&&t===`rule`&&/^\s*implementation\s*$/.test(m(k))||w===`hint`&&t===`implementation`&&/^\s*hint\s+"/.test(k))return`**${w}** — Command named-rule guidance with at most one file or tagged fence. No payload means pending and fails binding (PLAY0268). Attached predicates keep their existing pure RuleContext contract; reference execution is unsupported, never confirmation.`;if(w===`implementation`&&e[0]===`handler`&&/^\s*implementation\s*$/.test(m(k)))return`**implementation** — ${v.implementation}`;if(w===`hint`&&e[0]===`implementation`&&e[1]===`handler`&&/^\s*hint\s+"/.test(k))return`**hint** — ${v.hint}`}let H=s(S),U=H.commands.filter(e=>e.line<C).at(-1),W=U?.properties.find(e=>e.name===w&&e.line===C);if(W?.isGenerated||w===`generated`&&U?.properties.some(e=>e.isGenerated&&e.line===C)&&V)return`**${W?.name??`generated`}** — ${W?h(o(W))+`. `:``}Generated value, not a request or form input. ${u}`;let G=U?.response;if(G?.location.line===C+1&&(tokenAt(G.location.column,`returns`)||G.kind===`ScalarCommandResponseSyntax`&&tokenAt(G.source.location.column,G.source.property))){let e=G.kind===`ScalarCommandResponseSyntax`?U?.properties.find(e=>e.name===G.source.property):void 0;return`**returns**${e?` — ${h(o(e))}`:` — unnamed record response`}. ${u}`}if(G?.kind===`RecordCommandResponseSyntax`){let e=G.fields.find(e=>e.location.line===C+1&&(tokenAt(e.location.column,e.name)||tokenAt(e.source.location.column,e.source.property)));if(e){let t=U?.properties.find(t=>t.name===e.source.property),n=e.type?h(e.type):t?h(o(t)):`Unresolved type`;return`**${e.name}** — ${n}${e.type?` (explicit)`:` (inferred)`} = ${e.source.property}. ${t?.isGenerated?`Generated source, not request input. `:``}${u}`}}for(let e of l(S).specifications.values())if(w===`returns`&&e.thenReturns?.location.line===C+1||w===`generated`&&e.when?.generatedValues?.some(e=>e.location.line===C+1))return u;let K=H.concepts.find(e=>e.name===w);if(K){let e=K.attributes.length?` ${K.attributes.join(` `)}`:``,t=K.enumValues.length?`\n\nValues: ${K.enumValues.map((e,t)=>K.enumNumbers===void 0?e:`${e} = ${K.enumNumbers[t]}`).join(`, `)}`:``,n=Object.entries(K.attributeReasons).map(([e,t])=>`\n\n**@${e}** — ${t}`).join(``);return`\`\`\`screenplay\nconcept ${K.name} : ${K.primitive}${e}\n\`\`\`${n}${t}`}let q=H.types.find(e=>e.name===w);if(q){let e=q.properties.map(e=>`${e.name} ${h(o(e))}`).join(`
|
|
2
|
+
`);return`\`\`\`screenplay\ntype ${q.name}\n${e}\n\`\`\``}let J=H.policies.find(e=>e.name===w);if(J){let e=J.requires.length?J.requires.join(`
|
|
3
|
+
`):`(custom C#)`;return`\`\`\`screenplay\npolicy ${J.name}\n${e}\n\`\`\``}let Y=H.events.find(e=>e.name===w&&e.line===C)??H.events.filter(e=>e.name===w).sort((e,t)=>(t.generation??1)-(e.generation??1))[0];if(Y){let e=Y.properties.map(e=>`${e.name} ${h(o(e))}${e.isSubject?` subject`:``}`).join(`
|
|
4
|
+
`);return`\`\`\`screenplay\n${Y.visibility===`Public`?`public `:``}event ${Y.name}${Y.generation===void 0?``:` generation ${Y.generation}`}${Y.origin===void 0?``:` from ${JSON.stringify(Y.origin)}`}\n${e}\n\`\`\``}let X=H.commands.find(e=>e.name===w);if(X&&X.properties.length>0){let e=X.properties.map(e=>`${e.name} ${h(o(e))}${e.isGenerated?` generated`:``}${e.isIdentifier?` identifier`:``}`).join(`
|
|
5
|
+
`);return`\`\`\`screenplay\ncommand ${X.name}\n${e}\n\`\`\`${X.response||X.properties.some(e=>e.isGenerated)?`\n\n${u}`:``}`}let Z=d(S,O,C,p(k));for(let e of[k.trim().split(/\s+/)[0],...Z]){let t=ie(e??``)?.hovers?.[w];if(t)return t}if(w===`reads`&&(Z[0]===`every`||Z[0]===`at`)&&Z.includes(`reaction`))return"**reads** — Declares a whole view this clock trigger consults: `reads <View>`. Clock triggers take no values, so `by` is unavailable.";let Q=k.trim().match(/^(given|when|then)\s+(?:no\s+)?(\w+)/);if(Q&&Q[2]===w&&Z[0]===`specification`&&x[w])return`**${w}** — ${x[w]}`;if(w===`id`||w===`documentation`){let e=g(S),t=H.events.some(t=>ne(e,O,t.line,p(e[t.line])).includes(C)),n=w===`id`?/^\s*id\s+"/.test(e[C]):/^\s*documentation\s*$/.test(e[C]);if(!(t||w===`documentation`&&[`module`,`feature`,`slice`,`command`,`readmodel`,`reaction`].includes(Z[0]))||!n||T!==p(k)+1)return null}if(w===`optional`||w===`generated`||w===`returns`)return null;let $=y[w];return $?`**${w}** — ${$}`:null}export{hoverContent};
|
|
6
6
|
//# sourceMappingURL=hover-content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-content.js","names":["fences","fenceMap","lines","lineIndex","line","endColumn","withoutComment","inString","inTemplate","index","startColumn","actionSubject","actionSubjectHover","word","returned","continuationResponseHover","application","reaction","reactionReferenceAt","fixtureHover","exampleHover","sourceHover","eventSourceHover","operation","operationHover","start","column","name","before","enclosingChain","indentOf","generationDocs","complianceHeader","complianceBody","doc","attributeDocs","specialCategoryDocs","variable","branch","refusalContext","member","descriptions","detail","symbolsForBuffer","contextVariableDocs","\"$env\"","prefix","followsPropertyType","followsQueryType","source","eventAnalysisSource","subjectPrefix","ownerChain","enclosingHeaders","keywordDocs","chain","ruleContext","namedRuleContext","handlerIntentDocs","symbols","scanDocument","owner","command","property","typeReferenceText","propertyTypeReference","responseAvailability","response","field","type","specification","responseAnalysis","value","concept","candidate","attributes","values","reasons","attribute","reason","properties","policy","body","event","right","left","construct","getSubLanguage","step","specificationKeywordDocs","inEvent","directBody","directive","keywordDoc"],"sources":["../../hover-content.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 { actionSubjectHover } from './action-subject-authoring';\nimport { continuationResponseHover } from './continuation-responses';\nimport { reactionReferenceAt } from './reaction-authoring';\nimport { refusalContext } from './refusal-context';\nimport { namedRuleContext } from './named-rule-context';\nimport { eventSourceHover } from './event-source-authoring';\nimport { exampleHover } from './example-authoring';\nimport { operationHover } from './operation-authoring';\nimport { DocumentSymbols, symbolsForBuffer } from './symbols';\nimport { responseAnalysis, responseAvailability } from './response-analysis';\nimport { enclosingChain, enclosingHeaders, fenceMap, indentOf, withoutComment } from './document-context';\nimport { directBody, propertyTypeReference, scanDocument } from './symbols';\nimport { typeReferenceText } from './TypeReferenceSymbol';\nimport { eventAnalysisSource } from './event-analysis-source';\nimport { getSubLanguage } from './sub-language-registry';\nimport { attributeDocs, contextVariableDocs, handlerIntentDocs, keywordDocs, specialCategoryDocs, specificationKeywordDocs } from './keyword-docs';\n\n// Produces the hover markdown for a word at a position, without any editor\n// dependency — the Monaco service and the VSCode extension share this content.\n// Columns are 1-based, matching both editors' word-at-position APIs.\nexport function hoverContent(\n lines: string[],\n lineIndex: number,\n word: string,\n startColumn: number,\n endColumn: number,\n application?: DocumentSymbols,\n): string | null {\n const fences = fenceMap(lines);\n if (fences[lineIndex]) return null;\n\n const line = lines[lineIndex] ?? '';\n if (endColumn - 1 > withoutComment(line).length) return null;\n let inString = false;\n let inTemplate = false;\n for (let index = 0; index < startColumn - 1; index++) {\n if (line[index] === '\\\\' && inString) index++;\n else if (line[index] === '\"' && !inTemplate) inString = !inString;\n else if (line[index] === '`' && !inString) inTemplate = !inTemplate;\n }\n if (inString || inTemplate) return null;\n const actionSubject = actionSubjectHover(line, word, startColumn);\n if (actionSubject) return actionSubject;\n const returned = continuationResponseHover(lines, lineIndex, word, startColumn, endColumn, application);\n if (returned) return returned;\n const reaction = reactionReferenceAt(lines, lineIndex, startColumn, endColumn, application);\n if (reaction) return reaction.content;\n const fixtureHover = exampleHover(lines, lineIndex, startColumn, endColumn, application);\n if (fixtureHover) return fixtureHover;\n const sourceHover = eventSourceHover(lines, lineIndex, startColumn, endColumn, application);\n if (sourceHover) return sourceHover;\n const operation = operationHover(lines, lineIndex, startColumn, endColumn, application);\n if (operation) return operation;\n const tokenAt = (column: number, name: string): boolean => {\n const start = column + (line[column - 1] === '@' ? 1 : 0);\n return word === name && startColumn === start && endColumn === start + name.length && line.slice(start - 1, endColumn - 1) === name;\n };\n const before = line.charAt(startColumn - 2);\n if (word === 'authorization' && enclosingChain(lines, fences, lineIndex, indentOf(line))[0] === 'purpose') return 'A quoted authorization in law for criminal-offence data (Art. 10).';\n\n if (enclosingChain(lines, fences, lineIndex, indentOf(line))[0] === 'concept' && /^\\s*generate\\b/.test(line)) {\n const generationDocs: Record<string, string> = {\n generate: 'The concept declares how; a command property declares generated. ESM v15 checks fixture shape and guards generated event sources against existing facts.',\n uuid: 'Random UUID v4, 122 random bits; about 3.27 × 10^17 values at 1% collision probability.',\n uuidv7: 'Time-ordered UUID v7, 74 random bits; about 1.95 × 10^10 values at 1% collision probability. Exposes time; not monotonic within a millisecond.',\n ulid: '26 Crockford base32 characters (uppercase by default), 80 random bits; about 1.56 × 10^11 values at 1% collision probability.',\n typeid: 'TypeID 0.3: lowercase UUIDv7 base32 with a 0..63-character prefix. 74 random bits; empty prefix has no separator.',\n nanoid: 'Default 21 characters over 64 symbols: 126 random bits. Custom entropy = size × log2(alphabet size).',\n bytes: '8 × count random bits; base64url, hex or base32 without padding. RFC 4648 unused trailing bits must be zero.',\n prefix: 'Printable ASCII prefix, at most 32 characters. UUID prefixes require a String concept; TypeID uses its own argument.',\n alphabet: 'NanoID only: 2..256 distinct printable ASCII characters.',\n case: 'lower or upper for String UUIDs, ULID, hex/base32 bytes. Never base64url, NanoID or TypeID.',\n pattern: 'ESM v21 finite ASCII pattern: # digits, ? uppercase letters, * uppercase letters and digits, classes, repeats 1..64 and UTC yyyy/yy/MM/dd segments. Final value including checksum is at most 256 characters. Counts distinct strings, not repeat decompositions; dates and check digits add no entropy.',\n random: 'ESM v21 inclusive signed Int64 range for an Int value. Fixtures must be integral numbers within the exact bounds. Int cannot be a generated identifier.',\n rule: 'ESM v21 ValueGeneration requirement with exactly one direct file or tagged fence. Returns String; the closed GenerationContext descriptor (Now, Tenant) is bound by each provider to its own type; Cratis C# binds the Fundamentals GenerationContext. Entropy is unknown. The reference runner uses a fixture and never executes the body.',\n checksum: 'Appends luhn/mod11/mod97 check digits, adding no entropy. mod11 excludes check digit 10. Generated fixtures check only suffix digit shape unless validate checksum is authored.',\n sequence: 'Reserved; binding refuses it until #619 is admitted.',\n };\n if (generationDocs[word]) return generationDocs[word];\n }\n\n const complianceHeader = /^\\s*concept\\s+[^\\s:]+\\s*:\\s*\\w+\\s+/.exec(line);\n const complianceBody = enclosingChain(lines, fences, lineIndex, indentOf(line))[0] === 'concept' && /^\\s*(?:@?pii|personal|@?sensitive|secret)\\s+(?:reason|scope|special|criminal)\\b/.test(line);\n if ((complianceHeader !== null && startColumn - 1 >= complianceHeader[0].length - 1) || complianceBody) {\n const doc = attributeDocs[word];\n if (doc) return doc;\n if (Object.hasOwn(specialCategoryDocs, word) && /^\\s*(?:@?pii|personal)\\s+special\\s+/.test(line)) return `**${word}** — ${specialCategoryDocs[word]}`;\n if (word === 'special') return 'GDPR Art. 9(1) special category; requires pii. At most one category per concept.';\n if (word === 'criminal') return 'Personal data relating to criminal convictions and offenses (GDPR Art. 10); requires pii.';\n if (/^\\s*(?:secret|sensitive|@sensitive)\\s+scope\\s+/.test(line) && ['subject', 'namespace', 'global'].includes(word)) return `**${word}** — Secret encryption scope${word === 'subject' ? ' per data subject' : word === 'namespace' ? ' per tenant namespace' : ' shared globally'}. Not an event-property subject role.`;\n if (word === 'scope') return 'Secret encryption scope: subject, namespace or global. Omitted scope keeps Chronicle’s Subject default; pii secret renders only [PII].';\n }\n if (before === '$' || before === '.') {\n const variable = line.substring(0, endColumn - 1).match(/\\$[\\w.]*$/)?.[0];\n if (variable) {\n if (variable.startsWith('$refusal')) {\n const branch = refusalContext(lines, lineIndex, indentOf(line));\n const member = variable.substring('$refusal.'.length);\n const descriptions: Record<string, string> = { reason: 'Refusal kind as a String: validation, constraint or authorization.', message: 'Messages of the classified kind joined with a newline in result order, verbatim including unresolved $strings keys; authorization uses its denial reason.', constraint: 'First violated constraint name in result order as a String, only in a by constraint branch.' };\n return branch !== undefined && descriptions[member] !== undefined ? `**${variable}** — ${descriptions[member]} Executable from ESM v19 in branch event mappings.` : null;\n }\n if (variable.startsWith('$identity.')) {\n const name = variable.substring('$identity.'.length).split('.')[0];\n const detail = symbolsForBuffer(lines, application).identityDetails?.find(detail => detail.name === name);\n if (detail) return `**$identity.${detail.name}** — ${detail.type}. Declared caller detail; authoring metadata only, not executable until admitted (#600).`;\n }\n const doc =\n contextVariableDocs[variable] ??\n (variable.startsWith('$env') ? contextVariableDocs['$env'] : undefined);\n if (doc) return doc;\n }\n }\n\n // Do not mistake a property/type named optional for the contextual modifier.\n const prefix = line.slice(0, startColumn - 1);\n // Commit to query-parameter context before matching the name and type.\n const followsPropertyType = /^\\s*(?:by|filter)\\s+/.test(prefix)\n ? /^\\s*(?:by|filter)\\s+[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?\\s+$/.test(prefix)\n : /^\\s*@?[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?\\s+$/.test(prefix);\n const followsQueryType = /^\\s*query\\s+\\w+\\s*=>\\s*(?:observable\\s+)?[\\w.]+(?:\\[\\])?\\s+$/.test(prefix) &&\n !/^\\s*query\\s+\\w+\\s*=>\\s*observable\\s+$/.test(prefix);\n if (word === 'subject') {\n const source = eventAnalysisSource(lines);\n const subjectPrefix = /^\\s*@?[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?(?:\\?|\\s+optional)?(?:\\s+generated)?(?:\\s+identifier)?\\s+$/.test(prefix);\n const ownerChain = enclosingChain(source, fences, lineIndex, indentOf(line));\n if (subjectPrefix && (ownerChain[0] === 'event' || /^produces\\s+event\\s+/.test(enclosingHeaders(source, fences, lineIndex, indentOf(line))[0] ?? ''))) {\n return '**subject** — This event property identifies its one data subject instead of the event source (decision 0008). Required scalar String, Uuid or their concepts, or an Int-backed concept; never pii or secret. Report-only lineage metadata (PLAY0270); no ESM bytes or provider output yet.';\n }\n if (/\\bclaim\\s+\"(?:[^\"\\\\]|\\\\.)*\"\\s+matches\\s+$/.test(prefix) && ownerChain.includes('policy')) return `**subject** — ${keywordDocs.subject}`;\n return null;\n }\n if (word === 'optional' && (followsPropertyType || followsQueryType)) {\n return `**optional** — ${keywordDocs.optional}`;\n }\n\n if (word === 'implementation' || word === 'hint') {\n const chain = enclosingChain(lines, fences, lineIndex, indentOf(line));\n const ruleContext = namedRuleContext(lines, lineIndex, indentOf(line));\n if ((word === 'implementation' && ruleContext === 'rule' && /^\\s*implementation\\s*$/.test(withoutComment(line))) ||\n (word === 'hint' && ruleContext === 'implementation' && /^\\s*hint\\s+\"/.test(line))) {\n return `**${word}** — Command named-rule guidance with at most one file or tagged fence. No payload means pending and fails binding (PLAY0268). Attached predicates keep their existing pure RuleContext contract; reference execution is unsupported, never confirmation.`;\n }\n if (word === 'implementation' && chain[0] === 'handler' && /^\\s*implementation\\s*$/.test(withoutComment(line))) {\n return `**implementation** — ${handlerIntentDocs.implementation}`;\n }\n if (word === 'hint' && chain[0] === 'implementation' && chain[1] === 'handler' && /^\\s*hint\\s+\"/.test(line)) {\n return `**hint** — ${handlerIntentDocs.hint}`;\n }\n }\n\n const symbols = scanDocument(lines);\n const owner = symbols.commands.filter(command => command.line < lineIndex).at(-1);\n const property = owner?.properties.find(property => property.name === word && property.line === lineIndex);\n if (property?.isGenerated || (word === 'generated' && owner?.properties.some(property => property.isGenerated && property.line === lineIndex) && followsPropertyType)) {\n return `**${property?.name ?? 'generated'}** — ${property ? typeReferenceText(propertyTypeReference(property)) + '. ' : ''}Generated value, not a request or form input. ${responseAvailability}`;\n }\n const response = owner?.response;\n if (response?.location.line === lineIndex + 1 && (tokenAt(response.location.column, 'returns') || (response.kind === 'ScalarCommandResponseSyntax' && tokenAt(response.source.location.column, response.source.property)))) {\n const source = response.kind === 'ScalarCommandResponseSyntax' ? owner?.properties.find(property => property.name === response.source.property) : undefined;\n return `**returns**${source ? ` — ${typeReferenceText(propertyTypeReference(source))}` : ' — unnamed record response'}. ${responseAvailability}`;\n }\n if (response?.kind === 'RecordCommandResponseSyntax') {\n const field = response.fields.find(field => field.location.line === lineIndex + 1 && (tokenAt(field.location.column, field.name) || tokenAt(field.source.location.column, field.source.property)));\n if (field) {\n const source = owner?.properties.find(property => property.name === field.source.property);\n const type = field.type ? typeReferenceText(field.type) : source ? typeReferenceText(propertyTypeReference(source)) : 'Unresolved type';\n return `**${field.name}** — ${type}${field.type ? ' (explicit)' : ' (inferred)'} = ${field.source.property}. ${source?.isGenerated ? 'Generated source, not request input. ' : ''}${responseAvailability}`;\n }\n }\n for (const specification of responseAnalysis(lines).specifications.values()) {\n if ((word === 'returns' && specification.thenReturns?.location.line === lineIndex + 1) || (word === 'generated' && specification.when?.generatedValues?.some(value => value.location.line === lineIndex + 1))) return responseAvailability;\n }\n\n const concept = symbols.concepts.find((candidate) => candidate.name === word);\n if (concept) {\n const attributes = concept.attributes.length ? ` ${concept.attributes.join(' ')}` : '';\n const values = concept.enumValues.length\n ? `\\n\\nValues: ${concept.enumValues.map((value, index) => concept.enumNumbers === undefined ? value : `${value} = ${concept.enumNumbers[index]}`).join(', ')}`\n : '';\n const reasons = Object.entries(concept.attributeReasons)\n .map(([attribute, reason]) => `\\n\\n**@${attribute}** — ${reason}`)\n .join('');\n return `\\`\\`\\`screenplay\\nconcept ${concept.name} : ${concept.primitive}${attributes}\\n\\`\\`\\`${reasons}${values}`;\n }\n\n const type = symbols.types.find((candidate) => candidate.name === word);\n if (type) {\n const properties = type.properties\n .map((property) => `${property.name} ${typeReferenceText(propertyTypeReference(property))}`)\n .join('\\n');\n return `\\`\\`\\`screenplay\\ntype ${type.name}\\n${properties}\\n\\`\\`\\``;\n }\n\n const policy = symbols.policies.find((candidate) => candidate.name === word);\n if (policy) {\n const body = policy.requires.length ? policy.requires.join('\\n') : '(custom C#)';\n return `\\`\\`\\`screenplay\\npolicy ${policy.name}\\n${body}\\n\\`\\`\\``;\n }\n\n const event = symbols.events.find((candidate) => candidate.name === word && candidate.line === lineIndex) ??\n symbols.events.filter((candidate) => candidate.name === word)\n .sort((left, right) => (right.generation ?? 1) - (left.generation ?? 1))[0];\n if (event) {\n const properties = event.properties\n .map((property) => `${property.name} ${typeReferenceText(propertyTypeReference(property))}${property.isSubject ? ' subject' : ''}`)\n .join('\\n');\n return `\\`\\`\\`screenplay\\n${event.visibility === 'Public' ? 'public ' : ''}event ${event.name}${event.generation !== undefined ? ` generation ${event.generation}` : ''}${event.origin !== undefined ? ` from ${JSON.stringify(event.origin)}` : ''}\\n${properties}\\n\\`\\`\\``;\n }\n\n const command = symbols.commands.find((candidate) => candidate.name === word);\n if (command && command.properties.length > 0) {\n const properties = command.properties\n .map(\n (property) =>\n `${property.name} ${typeReferenceText(propertyTypeReference(property))}${property.isGenerated ? ' generated' : ''}${property.isIdentifier ? ' identifier' : ''}`,\n )\n .join('\\n');\n return `\\`\\`\\`screenplay\\ncommand ${command.name}\\n${properties}\\n\\`\\`\\`${command.response || command.properties.some(property => property.isGenerated) ? `\\n\\n${responseAvailability}` : ''}`;\n }\n\n // Sub-language keywords take precedence inside their construct.\n const chain = enclosingChain(lines, fences, lineIndex, indentOf(line));\n for (const construct of [line.trim().split(/\\s+/)[0], ...chain]) {\n const subLanguage = getSubLanguage(construct ?? '');\n const doc = subLanguage?.hovers?.[word];\n if (doc) return doc;\n }\n\n if (word === 'reads' && (chain[0] === 'every' || chain[0] === 'at') && chain.includes('reaction')) {\n return '**reads** — Declares a whole view this clock trigger consults: `reads <View>`. Clock triggers take no values, so `by` is unavailable.';\n }\n\n const step = line.trim().match(/^(given|when|then)\\s+(?:no\\s+)?(\\w+)/);\n if (step && step[2] === word && chain[0] === 'specification' && specificationKeywordDocs[word]) {\n return `**${word}** — ${specificationKeywordDocs[word]}`;\n }\n\n if (word === 'id' || word === 'documentation') {\n const source = eventAnalysisSource(lines);\n const inEvent = symbols.events.some(event => directBody(source, fences, event.line, indentOf(source[event.line])).includes(lineIndex));\n const directive = word === 'id' ? /^\\s*id\\s+\"/.test(source[lineIndex]) : /^\\s*documentation\\s*$/.test(source[lineIndex]);\n const supportedOwner = inEvent || (word === 'documentation' && ['module', 'feature', 'slice', 'command', 'readmodel', 'reaction'].includes(chain[0]));\n if (!supportedOwner || !directive || startColumn !== indentOf(line) + 1) return null;\n }\n\n if (word === 'optional' || word === 'generated' || word === 'returns') return null;\n const keywordDoc = keywordDocs[word];\n if (keywordDoc) return `**${word}** — ${keywordDoc}`;\n\n return null;\n}\n"],"mappings":"ksCAuBA,SAAgB,aACZ,EACA,EACA,EACA,EACA,EACA,EACa,CACb,IAAMA,EAASC,EAASC,CAAK,EAC7B,GAAIF,EAAOG,GAAY,OAAO,KAE9B,IAAMC,EAAOF,EAAMC,IAAc,GACjC,GAAIE,EAAY,EAAIC,EAAeF,CAAI,CAAC,CAAC,OAAQ,OAAO,KACxD,IAAIG,EAAW,GACXC,EAAa,GACjB,IAAK,IAAIC,EAAQ,EAAGA,EAAQC,EAAc,E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EAAU/B,EAAQ,OAAO,KAAK,GAASgC,GAAW1C,EAAQjD,EAAQmF,EAAM,KAAMrD,EAASmB,EAAOkC,EAAM,KAAK,CAAC,CAAC,CAAC,SAAShF,CAAS,CAAC,EAC/HyF,EAAY/E,IAAS,KAAO,aAAa,KAAKoC,EAAO9C,EAAU,EAAI,wBAAwB,KAAK8C,EAAO9C,EAAU,EAEvH,GAAI,EADmBuF,GAAY7E,IAAS,iBAAmB,CAAC,SAAU,UAAW,QAAS,UAAW,YAAa,UAAU,CAAC,CAAC,SAAS0C,EAAM,EAAE,IAC5H,CAACqC,GAAalF,IAAgBoB,EAAS1B,CAAI,EAAI,EAAG,OAAO,IACpF,CAEA,GAAIS,IAAS,YAAcA,IAAS,aAAeA,IAAS,UAAW,OAAO,KAC9E,IAAMgF,EAAavC,EAAYzC,GAG/B,OAFIgF,EAAmB,KAAKhF,EAAK,OAAOgF,IAEjC,IACX"}
|
|
1
|
+
{"version":3,"file":"hover-content.js","names":["fences","fenceMap","lines","lineIndex","line","endColumn","withoutComment","inString","inTemplate","index","startColumn","actionSubject","actionSubjectHover","word","returned","continuationResponseHover","application","reaction","reactionReferenceAt","fixtureHover","exampleHover","sourceHover","eventSourceHover","operation","operationHover","start","column","name","before","enclosingChain","indentOf","generationDocs","complianceHeader","complianceBody","doc","attributeDocs","specialCategoryDocs","variable","branch","refusalContext","member","descriptions","detail","symbolsForBuffer","contextVariableDocs","\"$env\"","prefix","followsPropertyType","followsQueryType","source","eventAnalysisSource","subjectPrefix","ownerChain","enclosingHeaders","keywordDocs","chain","ruleContext","namedRuleContext","handlerIntentDocs","symbols","scanDocument","owner","command","property","typeReferenceText","propertyTypeReference","responseAvailability","response","field","type","specification","responseAnalysis","value","concept","candidate","attributes","values","reasons","attribute","reason","properties","policy","body","event","right","left","construct","getSubLanguage","step","specificationKeywordDocs","inEvent","directBody","directive","keywordDoc"],"sources":["../../hover-content.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 { actionSubjectHover } from './action-subject-authoring';\nimport { continuationResponseHover } from './continuation-responses';\nimport { reactionReferenceAt } from './reaction-authoring';\nimport { refusalContext } from './refusal-context';\nimport { namedRuleContext } from './named-rule-context';\nimport { eventSourceHover } from './event-source-authoring';\nimport { exampleHover } from './example-authoring';\nimport { operationHover } from './operation-authoring';\nimport { DocumentSymbols, symbolsForBuffer } from './symbols';\nimport { responseAnalysis, responseAvailability } from './response-analysis';\nimport { enclosingChain, enclosingHeaders, fenceMap, indentOf, withoutComment } from './document-context';\nimport { directBody, propertyTypeReference, scanDocument } from './symbols';\nimport { typeReferenceText } from './TypeReferenceSymbol';\nimport { eventAnalysisSource } from './event-analysis-source';\nimport { getSubLanguage } from './sub-language-registry';\nimport { attributeDocs, contextVariableDocs, handlerIntentDocs, keywordDocs, specialCategoryDocs, specificationKeywordDocs } from './keyword-docs';\n\n// Produces the hover markdown for a word at a position, without any editor\n// dependency — the Monaco service and the VSCode extension share this content.\n// Columns are 1-based, matching both editors' word-at-position APIs.\nexport function hoverContent(\n lines: string[],\n lineIndex: number,\n word: string,\n startColumn: number,\n endColumn: number,\n application?: DocumentSymbols,\n): string | null {\n const fences = fenceMap(lines);\n if (fences[lineIndex]) return null;\n\n const line = lines[lineIndex] ?? '';\n if (endColumn - 1 > withoutComment(line).length) return null;\n let inString = false;\n let inTemplate = false;\n for (let index = 0; index < startColumn - 1; index++) {\n if (line[index] === '\\\\' && inString) index++;\n else if (line[index] === '\"' && !inTemplate) inString = !inString;\n else if (line[index] === '`' && !inString) inTemplate = !inTemplate;\n }\n if (inString || inTemplate) return null;\n const actionSubject = actionSubjectHover(line, word, startColumn);\n if (actionSubject) return actionSubject;\n const returned = continuationResponseHover(lines, lineIndex, word, startColumn, endColumn, application);\n if (returned) return returned;\n const reaction = reactionReferenceAt(lines, lineIndex, startColumn, endColumn, application);\n if (reaction) return reaction.content;\n const fixtureHover = exampleHover(lines, lineIndex, startColumn, endColumn, application);\n if (fixtureHover) return fixtureHover;\n const sourceHover = eventSourceHover(lines, lineIndex, startColumn, endColumn, application);\n if (sourceHover) return sourceHover;\n const operation = operationHover(lines, lineIndex, startColumn, endColumn, application);\n if (operation) return operation;\n const tokenAt = (column: number, name: string): boolean => {\n const start = column + (line[column - 1] === '@' ? 1 : 0);\n return word === name && startColumn === start && endColumn === start + name.length && line.slice(start - 1, endColumn - 1) === name;\n };\n const before = line.charAt(startColumn - 2);\n if (word === 'authorization' && enclosingChain(lines, fences, lineIndex, indentOf(line))[0] === 'purpose') return 'A quoted authorization in law for criminal-offence data (Art. 10).';\n\n if (enclosingChain(lines, fences, lineIndex, indentOf(line))[0] === 'concept' && /^\\s*generate\\b/.test(line)) {\n const generationDocs: Record<string, string> = {\n generate: 'The concept declares how; a command property declares generated. ESM v15 checks fixture shape and guards generated event sources against existing facts.',\n uuid: 'Random UUID v4, 122 random bits; about 3.27 × 10^17 values at 1% collision probability.',\n uuidv7: 'Time-ordered UUID v7, 74 random bits; about 1.95 × 10^10 values at 1% collision probability. Exposes time; not monotonic within a millisecond.',\n ulid: '26 Crockford base32 characters (uppercase by default), 80 random bits; about 1.56 × 10^11 values at 1% collision probability.',\n typeid: 'TypeID 0.3: lowercase UUIDv7 base32 with a 0..63-character prefix. 74 random bits; empty prefix has no separator.',\n nanoid: 'Default 21 characters over 64 symbols: 126 random bits. Custom entropy = size × log2(alphabet size).',\n bytes: '8 × count random bits; base64url, hex or base32 without padding. RFC 4648 unused trailing bits must be zero.',\n prefix: 'Printable ASCII prefix, at most 32 characters. UUID prefixes require a String concept; TypeID uses its own argument.',\n alphabet: 'NanoID only: 2..256 distinct printable ASCII characters.',\n case: 'lower or upper for String UUIDs, ULID, hex/base32 bytes. Never base64url, NanoID or TypeID.',\n pattern: 'ESM v21 finite ASCII pattern: # digits, ? uppercase letters, * uppercase letters and digits, classes, repeats 1..64 and UTC yyyy/yy/MM/dd segments. Final value including checksum is at most 256 characters. Counts distinct strings, not repeat decompositions; dates and check digits add no entropy.',\n random: 'ESM v21 inclusive signed Int64 range for an Int value. Fixtures must be integral numbers within the exact bounds. Int cannot be a generated identifier.',\n rule: 'ESM v21 ValueGeneration requirement with exactly one direct file or tagged fence. Returns String; the closed GenerationContext descriptor (Now, Tenant) is bound by each provider to its own type; Cratis C# binds the Fundamentals GenerationContext. Entropy is unknown. The reference runner uses a fixture and never executes the body.',\n checksum: 'Appends luhn/mod11/mod97 check digits, adding no entropy. mod11 excludes check digit 10. Generated fixtures check only suffix digit shape unless validate checksum is authored.',\n sequence: 'Reserved; binding refuses it until #619 is admitted.',\n };\n if (generationDocs[word]) return generationDocs[word];\n }\n\n const complianceHeader = /^\\s*concept\\s+[^\\s:]+\\s*:\\s*\\w+\\s+/.exec(line);\n const complianceBody = enclosingChain(lines, fences, lineIndex, indentOf(line))[0] === 'concept' && /^\\s*(?:@?pii|personal|@?sensitive|secret)\\s+(?:reason|scope|special|criminal)\\b/.test(line);\n if ((complianceHeader !== null && startColumn - 1 >= complianceHeader[0].length - 1) || complianceBody) {\n const doc = attributeDocs[word];\n if (doc) return doc;\n if (Object.hasOwn(specialCategoryDocs, word) && /^\\s*(?:@?pii|personal)\\s+special\\s+/.test(line)) return `**${word}** — ${specialCategoryDocs[word]}`;\n if (word === 'special') return 'GDPR Art. 9(1) special category; requires pii. At most one category per concept.';\n if (word === 'criminal') return 'Personal data relating to criminal convictions and offenses (GDPR Art. 10); requires pii.';\n if (/^\\s*(?:secret|sensitive|@sensitive)\\s+scope\\s+/.test(line) && ['subject', 'namespace', 'global'].includes(word)) return `**${word}** — Secret encryption scope${word === 'subject' ? ' per data subject' : word === 'namespace' ? ' per tenant namespace' : ' shared globally'}. Not an event-property subject role.`;\n if (word === 'scope') return 'Secret encryption scope: subject, namespace or global. Omitted scope keeps Chronicle’s Subject default; pii secret renders only [PII].';\n }\n if (before === '$' || before === '.') {\n const variable = line.substring(0, endColumn - 1).match(/\\$[\\w.]*$/)?.[0];\n if (variable) {\n if (variable.startsWith('$refusal')) {\n const branch = refusalContext(lines, lineIndex, indentOf(line));\n const member = variable.substring('$refusal.'.length);\n const descriptions: Record<string, string> = { reason: 'Refusal kind as a String: validation, constraint or authorization.', message: 'Messages of the classified kind joined with a newline in result order, verbatim including unresolved $strings keys; authorization uses its denial reason.', constraint: 'First violated constraint name in result order as a String, only in a by constraint branch.' };\n return branch !== undefined && descriptions[member] !== undefined ? `**${variable}** — ${descriptions[member]} Executable from ESM v19 in branch event mappings.` : null;\n }\n if (variable.startsWith('$identity.')) {\n const name = variable.substring('$identity.'.length).split('.')[0];\n const detail = symbolsForBuffer(lines, application).identityDetails?.find(detail => detail.name === name);\n if (detail) return `**$identity.${detail.name}** — ${detail.type}. Declared caller detail; authoring metadata only, not executable until admitted (#600).`;\n }\n const doc =\n contextVariableDocs[variable] ??\n (variable.startsWith('$env') ? contextVariableDocs['$env'] : undefined);\n if (doc) return doc;\n }\n }\n\n // Do not mistake a property/type named optional for the contextual modifier.\n const prefix = line.slice(0, startColumn - 1);\n // Commit to query-parameter context before matching the name and type.\n const followsPropertyType = /^\\s*(?:by|filter)\\s+/.test(prefix)\n ? /^\\s*(?:by|filter)\\s+[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?\\s+$/.test(prefix)\n : /^\\s*@?[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?\\s+$/.test(prefix);\n const followsQueryType = /^\\s*query\\s+\\w+\\s*=>\\s*(?:observable\\s+)?[\\w.]+(?:\\[\\])?\\s+$/.test(prefix) &&\n !/^\\s*query\\s+\\w+\\s*=>\\s*observable\\s+$/.test(prefix);\n if (word === 'subject') {\n const source = eventAnalysisSource(lines);\n const subjectPrefix = /^\\s*@?[a-z_]\\w*\\s+[\\w.]+(?:\\[\\])?(?:\\?|\\s+optional)?(?:\\s+generated)?(?:\\s+identifier)?\\s+$/.test(prefix);\n const ownerChain = enclosingChain(source, fences, lineIndex, indentOf(line));\n if (subjectPrefix && (ownerChain[0] === 'event' || /^produces\\s+event\\s+/.test(enclosingHeaders(source, fences, lineIndex, indentOf(line))[0] ?? ''))) {\n return '**subject** — This event property identifies its one data subject instead of the event source (decision 0008). Required scalar String, Uuid or their concepts, or an Int-backed concept; never pii or secret. Report-only lineage metadata (PLAY0270); no ESM bytes or provider output yet.';\n }\n if (/\\bclaim\\s+\"(?:[^\"\\\\]|\\\\.)*\"\\s+matches\\s+$/.test(prefix) && ownerChain.includes('policy')) return `**subject** — ${keywordDocs.subject}`;\n return null;\n }\n if (word === 'optional' && (followsPropertyType || followsQueryType)) {\n return `**optional** — ${keywordDocs.optional}`;\n }\n\n if (word === 'implementation' || word === 'hint') {\n const chain = enclosingChain(lines, fences, lineIndex, indentOf(line));\n const ruleContext = namedRuleContext(lines, lineIndex, indentOf(line));\n if ((word === 'implementation' && ruleContext === 'rule' && /^\\s*implementation\\s*$/.test(withoutComment(line))) ||\n (word === 'hint' && ruleContext === 'implementation' && /^\\s*hint\\s+\"/.test(line))) {\n return `**${word}** — Command named-rule guidance with at most one file or tagged fence. No payload means pending and fails binding (PLAY0268). Attached predicates keep their existing pure RuleContext contract; reference execution is unsupported, never confirmation.`;\n }\n if (word === 'implementation' && chain[0] === 'handler' && /^\\s*implementation\\s*$/.test(withoutComment(line))) {\n return `**implementation** — ${handlerIntentDocs.implementation}`;\n }\n if (word === 'hint' && chain[0] === 'implementation' && chain[1] === 'handler' && /^\\s*hint\\s+\"/.test(line)) {\n return `**hint** — ${handlerIntentDocs.hint}`;\n }\n }\n\n const symbols = scanDocument(lines);\n const owner = symbols.commands.filter(command => command.line < lineIndex).at(-1);\n const property = owner?.properties.find(property => property.name === word && property.line === lineIndex);\n if (property?.isGenerated || (word === 'generated' && owner?.properties.some(property => property.isGenerated && property.line === lineIndex) && followsPropertyType)) {\n return `**${property?.name ?? 'generated'}** — ${property ? typeReferenceText(propertyTypeReference(property)) + '. ' : ''}Generated value, not a request or form input. ${responseAvailability}`;\n }\n const response = owner?.response;\n if (response?.location.line === lineIndex + 1 && (tokenAt(response.location.column, 'returns') || (response.kind === 'ScalarCommandResponseSyntax' && tokenAt(response.source.location.column, response.source.property)))) {\n const source = response.kind === 'ScalarCommandResponseSyntax' ? owner?.properties.find(property => property.name === response.source.property) : undefined;\n return `**returns**${source ? ` — ${typeReferenceText(propertyTypeReference(source))}` : ' — unnamed record response'}. ${responseAvailability}`;\n }\n if (response?.kind === 'RecordCommandResponseSyntax') {\n const field = response.fields.find(field => field.location.line === lineIndex + 1 && (tokenAt(field.location.column, field.name) || tokenAt(field.source.location.column, field.source.property)));\n if (field) {\n const source = owner?.properties.find(property => property.name === field.source.property);\n const type = field.type ? typeReferenceText(field.type) : source ? typeReferenceText(propertyTypeReference(source)) : 'Unresolved type';\n return `**${field.name}** — ${type}${field.type ? ' (explicit)' : ' (inferred)'} = ${field.source.property}. ${source?.isGenerated ? 'Generated source, not request input. ' : ''}${responseAvailability}`;\n }\n }\n for (const specification of responseAnalysis(lines).specifications.values()) {\n if ((word === 'returns' && specification.thenReturns?.location.line === lineIndex + 1) || (word === 'generated' && specification.when?.generatedValues?.some(value => value.location.line === lineIndex + 1))) return responseAvailability;\n }\n\n const concept = symbols.concepts.find((candidate) => candidate.name === word);\n if (concept) {\n const attributes = concept.attributes.length ? ` ${concept.attributes.join(' ')}` : '';\n const values = concept.enumValues.length\n ? `\\n\\nValues: ${concept.enumValues.map((value, index) => concept.enumNumbers === undefined ? value : `${value} = ${concept.enumNumbers[index]}`).join(', ')}`\n : '';\n const reasons = Object.entries(concept.attributeReasons)\n .map(([attribute, reason]) => `\\n\\n**@${attribute}** — ${reason}`)\n .join('');\n return `\\`\\`\\`screenplay\\nconcept ${concept.name} : ${concept.primitive}${attributes}\\n\\`\\`\\`${reasons}${values}`;\n }\n\n const type = symbols.types.find((candidate) => candidate.name === word);\n if (type) {\n const properties = type.properties\n .map((property) => `${property.name} ${typeReferenceText(propertyTypeReference(property))}`)\n .join('\\n');\n return `\\`\\`\\`screenplay\\ntype ${type.name}\\n${properties}\\n\\`\\`\\``;\n }\n\n const policy = symbols.policies.find((candidate) => candidate.name === word);\n if (policy) {\n const body = policy.requires.length ? policy.requires.join('\\n') : '(custom C#)';\n return `\\`\\`\\`screenplay\\npolicy ${policy.name}\\n${body}\\n\\`\\`\\``;\n }\n\n const event = symbols.events.find((candidate) => candidate.name === word && candidate.line === lineIndex) ??\n symbols.events.filter((candidate) => candidate.name === word)\n .sort((left, right) => (right.generation ?? 1) - (left.generation ?? 1))[0];\n if (event) {\n const properties = event.properties\n .map((property) => `${property.name} ${typeReferenceText(propertyTypeReference(property))}${property.isSubject ? ' subject' : ''}`)\n .join('\\n');\n return `\\`\\`\\`screenplay\\n${event.visibility === 'Public' ? 'public ' : ''}event ${event.name}${event.generation !== undefined ? ` generation ${event.generation}` : ''}${event.origin !== undefined ? ` from ${JSON.stringify(event.origin)}` : ''}\\n${properties}\\n\\`\\`\\``;\n }\n\n const command = symbols.commands.find((candidate) => candidate.name === word);\n if (command && command.properties.length > 0) {\n const properties = command.properties\n .map(\n (property) =>\n `${property.name} ${typeReferenceText(propertyTypeReference(property))}${property.isGenerated ? ' generated' : ''}${property.isIdentifier ? ' identifier' : ''}`,\n )\n .join('\\n');\n return `\\`\\`\\`screenplay\\ncommand ${command.name}\\n${properties}\\n\\`\\`\\`${command.response || command.properties.some(property => property.isGenerated) ? `\\n\\n${responseAvailability}` : ''}`;\n }\n\n // Sub-language keywords take precedence inside their construct.\n const chain = enclosingChain(lines, fences, lineIndex, indentOf(line));\n for (const construct of [line.trim().split(/\\s+/)[0], ...chain]) {\n const subLanguage = getSubLanguage(construct ?? '');\n const doc = subLanguage?.hovers?.[word];\n if (doc) return doc;\n }\n\n if (word === 'reads' && (chain[0] === 'every' || chain[0] === 'at') && chain.includes('reaction')) {\n return '**reads** — Declares a whole view this clock trigger consults: `reads <View>`. Clock triggers take no values, so `by` is unavailable.';\n }\n\n const step = line.trim().match(/^(given|when|then)\\s+(?:no\\s+)?(\\w+)/);\n if (step && step[2] === word && chain[0] === 'specification' && specificationKeywordDocs[word]) {\n return `**${word}** — ${specificationKeywordDocs[word]}`;\n }\n\n if (word === 'id' || word === 'documentation') {\n const source = eventAnalysisSource(lines);\n const inEvent = symbols.events.some(event => directBody(source, fences, event.line, indentOf(source[event.line])).includes(lineIndex));\n const directive = word === 'id' ? /^\\s*id\\s+\"/.test(source[lineIndex]) : /^\\s*documentation\\s*$/.test(source[lineIndex]);\n const supportedOwner = inEvent || (word === 'documentation' && ['module', 'feature', 'slice', 'command', 'readmodel', 'reaction'].includes(chain[0]));\n if (!supportedOwner || !directive || startColumn !== indentOf(line) + 1) return null;\n }\n\n if (word === 'optional' || word === 'generated' || word === 'returns') return null;\n const keywordDoc = keywordDocs[word];\n if (keywordDoc) return `**${word}** — ${keywordDoc}`;\n\n return null;\n}\n"],"mappings":"A,ksCAuBA,SAAgB,aACZ,EACA,EACA,EACA,EACA,EACA,EACa,CACb,IAAMA,EAASC,EAASC,CAAK,EAC7B,GAAIF,EAAOG,GAAY,OAAO,KAE9B,IAAMC,EAAOF,EAAMC,IAAc,GACjC,GAAIE,EAAY,EAAIC,EAAeF,CAAI,CAAC,CAAC,OAAQ,OAAO,KACxD,IAAIG,EAAW,GACXC,EAAa,GACjB,IAAK,IAAIC,EAAQ,EAAGA,EAAQC,EAAc,EAAG,IACrCN,EAAKK,KAAW,MAAQF,EAAU,IAC7BH,EAAKK,KAAW,KAAO,CAACD,EAAY,EAAW,CAACD,EAChDH,EAAKK,KAAW,KAAO,CAACF,IAAU,EAAa,CAACC,GAE7D,GAAID,GAAYC,EAAY,OAAO,KACnC,IAAMG,EAAgBC,EAAmBR,EAAMS,EAAMH,CAAW,EAChE,GAAIC,EAAe,OAAOA,EAC1B,IAAMG,EAAWC,EAA0Bb,EAAOC,EAAWU,EAAMH,EAAaL,EAAWW,CAAW,EACtG,GAAIF,EAAU,OAAOA,EACrB,IAAMG,EAAWC,EAAoBhB,EAAOC,EAAWO,EAAaL,EAAWW,CAAW,EAC1F,GAAIC,EA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AAIS,IAAS,YAAcA,IAAS,aAAeA,IAAS,UAAW,OAAO,KAC9E,IAAMgF,EAAavC,EAAYzC,GAG/B,OAFIgF,EAAmB,KAAKhF,EAAK,OAAOgF,IAEjC,IACX,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover.js","names":["word","model","position","content","hoverContent","options"],"sources":["../../hover.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 { languages } from 'monaco-editor';\nimport { hoverContent } from './hover-content';\nimport { CompletionOptions } from './completions';\n\nexport function createHoverProvider(options: CompletionOptions = {}): languages.HoverProvider {\n return {\n provideHover(model, position) {\n const word = model.getWordAtPosition(position);\n if (!word) return null;\n\n const content = hoverContent(\n model.getLinesContent(),\n position.lineNumber - 1,\n word.word,\n word.startColumn,\n word.endColumn,\n options.application?.(model),\n );\n return content ? { contents: [{ value: content }] } : null;\n },\n };\n}\n"],"mappings":"mGAOA,SAAgB,oBAAoB,EAA6B,CAAC,EAA4B,CAC1F,MAAO,CACH,aAAa,EAAO,EAAU,CAC1B,IAAMA,EAAOC,EAAM,kBAAkBC,CAAQ,EAC7C,GAAI,CAACF,EAAM,OAAO,KAElB,IAAMG,EAAUC,EACZH,EAAM,gBAAgB,EACtBC,EAAS,WAAa,EACtBF,EAAK,KACLA,EAAK,YACLA,EAAK,UACLK,EAAQ,cAAcJ,CAAK,CAC/B,EACA,OAAOE,EAAU,CAAE,SAAU,CAAC,CAAE,MAAOA,CAAQ,CAAC,CAAE,EAAI,IAC1D,CACJ,CACJ"}
|
|
1
|
+
{"version":3,"file":"hover.js","names":["word","model","position","content","hoverContent","options"],"sources":["../../hover.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 { languages } from 'monaco-editor';\nimport { hoverContent } from './hover-content';\nimport { CompletionOptions } from './completions';\n\nexport function createHoverProvider(options: CompletionOptions = {}): languages.HoverProvider {\n return {\n provideHover(model, position) {\n const word = model.getWordAtPosition(position);\n if (!word) return null;\n\n const content = hoverContent(\n model.getLinesContent(),\n position.lineNumber - 1,\n word.word,\n word.startColumn,\n word.endColumn,\n options.application?.(model),\n );\n return content ? { contents: [{ value: content }] } : null;\n },\n };\n}\n"],"mappings":"A,mGAOA,SAAgB,oBAAoB,EAA6B,CAAC,EAA4B,CAC1F,MAAO,CACH,aAAa,EAAO,EAAU,CAC1B,IAAMA,EAAOC,EAAM,kBAAkBC,CAAQ,EAC7C,GAAI,CAACF,EAAM,OAAO,KAElB,IAAMG,EAAUC,EACZH,EAAM,gBAAgB,EACtBC,EAAS,WAAa,EACtBF,EAAK,KACLA,EAAK,YACLA,EAAK,UACLK,EAAQ,cAAcJ,CAAK,CAC/B,EACA,OAAOE,EAAU,CAAE,SAAU,CAAC,CAAE,MAAOA,CAAQ,CAAC,CAAE,EAAI,IAC1D,CACJ,CACJ,C"}
|
package/dist/bundles/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./_virtual/_virtual/_rolldown/runtime.js";import{blockHeaderPattern as e,causedByProperties as t,clauseKeywords as n,codeBlockTags as r,conceptAttributes as i,constructKeywords as a,contextRoots as o,languageConfiguration as s,languageExtensionPoint as c,languageId as l,primitiveTypes as u,sliceTypes as d}from"./language.js";import{createTokensProvider as f}from"./tokens.js";import{
|
|
1
|
+
import"./_virtual/_virtual/_rolldown/runtime.js";import{blockHeaderPattern as e,causedByProperties as t,clauseKeywords as n,codeBlockTags as r,conceptAttributes as i,constructKeywords as a,contextRoots as o,languageConfiguration as s,languageExtensionPoint as c,languageId as l,primitiveTypes as u,sliceTypes as d}from"./language.js";import{createTokensProvider as f}from"./tokens.js";import{createCompletionProvider as p}from"./completions.js";import{createInlineCompletionProvider as m}from"./inline-completions.js";import{eventContextPaths as h}from"./event-context-catalog.js";import{responseTokenTypes as g,responseTokens as _}from"./response-tokens.js";import{reactionReferenceAt as v}from"./reaction-authoring.js";import{createHoverProvider as y}from"./hover.js";import{createInlayHintsProvider as ee}from"./inlay-hints.js";import{analyzeEventSources as te,eventSourceAvailability as b,eventSourceCompletions as x,eventSourceDetails as S,eventSourceHover as C,eventSourceIdentifier as w,eventSourceReferenceAt as T}from"./event-source-authoring.js";import{createCodeActionProvider as E}from"./code-actions.js";import{attachDiagnostics as ne}from"./diagnostics.js";import{getSubLanguage as D,getSubLanguages as O,onSubLanguagesChanged as k,registerSubLanguage as A}from"./sub-language-registry.js";import{pdl as j}from"./sub-languages/pdl.js";import{cdl as M}from"./sub-languages/cdl.js";import{screenplayDark as N,screenplayDarkThemeName as P}from"./themes/screenplay-dark.js";import{screenplayLight as F,screenplayLightThemeName as I}from"./themes/screenplay-light.js";import{enclosingChain as L,fenceMap as R,firstWord as z,indentOf as B,withoutComment as V}from"./document-context.js";import{exampleCompletions as H,exampleHover as U}from"./example-authoring.js";import{fileReferenceKeyword as W,fileReferenceOn as G,fileReferences as K,isAbsoluteFileReferencePath as q}from"./file-references.js";import{fileImportOn as J,fileImports as Y,importablePaths as X,isFileImportLine as Z}from"./file-imports.js";import{declarationHeaders as re}from"./declarations.js";import{builtInTriggerNames as ie,knownEventNames as ae,knownTriggerNames as oe,knownTypeNames as se,mergeSymbols as ce,scanDocument as le,symbolsForBuffer as ue}from"./symbols.js";import{attributeDocs as de,contextVariableDocs as fe,keywordDocs as pe,specificationKeywordDocs as me}from"./keyword-docs.js";import{eventContextMemberAt as he,eventContextMembers as ge,eventContextMembersAfter as _e,namesEventContextMember as ve}from"./event-context.js";import{contextVariableEntries as ye,contextVariableItems as be,producesItems as xe,specificationStepItems as Se}from"./completion-items.js";import{completionEntriesFor as Ce,planCompletions as we}from"./completion-planner.js";import{responseCompletions as Te}from"./response-completions.js";import{structureCompletion as Ee}from"./structure-completions.js";import{analyzeOperations as De,operationAvailability as Oe,operationCompletions as ke,operationDetails as Ae,operationHover as je,operationReferenceAt as Me,phaseState as Ne}from"./operation-authoring.js";import{responseAnalysis as Pe,responseAvailability as Fe}from"./response-analysis.js";import{hoverContent as Q}from"./hover-content.js";import{validateLines as Ie}from"./validation.js";import{destinationHints as Le,productionDestinations as Re}from"./production-destinations.js";import{typeReferenceSymbol as ze,typeReferenceText as Be}from"./TypeReferenceSymbol.js";import{diagnosticCodes as Ve}from"./diagnostic-codes.js";const $=/* @__PURE__ */ new Set;function applyTokensProvider(e){e.languages.setMonarchTokensProvider(l,f(O()))}k(()=>$.forEach(applyTokensProvider));function ensureBuiltInSubLanguages(){D(`projection`)||A(`projection`,j),D(`capture`)||A(`capture`,M)}function register(e,t={}){$.has(e)||(ensureBuiltInSubLanguages(),$.add(e),e.languages.register(c),e.languages.setLanguageConfiguration(l,s),applyTokensProvider(e),e.languages.registerCompletionItemProvider(l,p(e,t)),e.languages.registerInlineCompletionsProvider(l,m(t)),e.languages.registerHoverProvider(l,y(t)),e.languages.registerDefinitionProvider(l,{provideDefinition(n,r){let i=n.getWordAtPosition(r);if(!i)return[];let a=t.application?.(n),o=T(n.getLinesContent(),r.lineNumber-1,i.startColumn,i.endColumn,a),s=v(n.getLinesContent(),r.lineNumber-1,i.startColumn,i.endColumn,a),c=s?s.target:o?.target;if(!c)return[];let l=a?.authoringPath??`current.play`,u=c.location.path===l?n.getValue():a?.authoringDocuments?.find(e=>e.path===c.location.path)?.source,d=s?s.target?.location:u&&w(c.location,c.name,u);if(!d)return[];let f=c.location.path&&n.uri.path.endsWith(`/${l}`)?n.uri.with({path:n.uri.path.slice(0,-l.length)+c.location.path}):void 0,p=f?e.editor.getModels().filter(e=>e.uri.toString()===f.toString()):[],m=c.location.path===l?n:p.length===1?p[0]:void 0;return m?[{uri:m.uri,range:new e.Range(d.line,d.column,d.line,d.column+c.name.length)}]:[]}}),e.languages.registerDocumentSemanticTokensProvider(l,{getLegend:()=>({tokenTypes:[...g],tokenModifiers:[]}),provideDocumentSemanticTokens(e){let n=[],r=0,i=0;for(let a of _(e.getLinesContent(),t.application?.(e)))n.push(a.line-r,a.line===r?a.column-i:a.column,a.length,a.type,0),r=a.line,i=a.column;return{data:new Uint32Array(n)}},releaseDocumentSemanticTokens(){}}),e.languages.registerInlayHintsProvider(l,ee(t)),e.languages.registerCodeActionProvider(l,E()),e.editor.defineTheme(P,N),e.editor.defineTheme(I,F),ne(e,t))}export{te as analyzeEventSources,De as analyzeOperations,de as attributeDocs,e as blockHeaderPattern,ie as builtInTriggerNames,t as causedByProperties,M as cdl,n as clauseKeywords,r as codeBlockTags,Ce as completionEntriesFor,i as conceptAttributes,a as constructKeywords,o as contextRoots,fe as contextVariableDocs,ye as contextVariableEntries,be as contextVariableItems,E as createCodeActionProvider,re as declarationHeaders,Le as destinationHints,Ve as diagnosticCodes,L as enclosingChain,ensureBuiltInSubLanguages,he as eventContextMemberAt,ge as eventContextMembers,_e as eventContextMembersAfter,h as eventContextPaths,b as eventSourceAvailability,x as eventSourceCompletions,S as eventSourceDetails,C as eventSourceHover,w as eventSourceIdentifier,T as eventSourceReferenceAt,H as exampleCompletions,U as exampleHover,R as fenceMap,J as fileImportOn,Y as fileImports,W as fileReferenceKeyword,G as fileReferenceOn,K as fileReferences,z as firstWord,D as getSubLanguage,O as getSubLanguages,Q as hoverContent,X as importablePaths,B as indentOf,q as isAbsoluteFileReferencePath,Z as isFileImportLine,pe as keywordDocs,ae as knownEventNames,oe as knownTriggerNames,se as knownTypeNames,l as languageId,ce as mergeSymbols,ve as namesEventContextMember,Oe as operationAvailability,ke as operationCompletions,Ae as operationDetails,je as operationHover,Me as operationReferenceAt,j as pdl,Ne as phaseState,we as planCompletions,u as primitiveTypes,xe as producesItems,Re as productionDestinations,v as reactionReferenceAt,register,A as registerSubLanguage,Pe as responseAnalysis,Fe as responseAvailability,Te as responseCompletions,g as responseTokenTypes,_ as responseTokens,le as scanDocument,P as screenplayDarkThemeName,I as screenplayLightThemeName,d as sliceTypes,me as specificationKeywordDocs,Se as specificationStepItems,Ee as structureCompletion,ue as symbolsForBuffer,ze as typeReferenceSymbol,Be as typeReferenceText,Ie as validateLines,V as withoutComment};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|