@cratis/screenplay-language 4.75.0 → 4.76.1

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.
@@ -1,4 +1,4 @@
1
- import{R as ne,S as re,T as ie,U as q,V as oe,ca as se,w as te}from"../../chunk-ZVFXYPUI.js";import{a as C}from"../../chunk-AYDF3IFZ.js";var E="pdl",ce=["projection","sequence","all","every","on","from","key","parent","join","automap","no","children","nested","identified","by","add","subtract","remove","via","with","default","increment","decrement","count","set","unset","clear","events","id","exclude","variant","enters"],pe=["$eventSourceId","$causedBy","$eventContext"],me=["=","+=","-=","=>","."],ae={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],indentationRules:{increaseIndentPattern:/^.*(:|\bon\b|\ball\b|\bevery\b|\bchildren\b|\bnested\b|\bparent\b|\bvariant\b)\s*$/,decreaseIndentPattern:/^.*\}.*$/},folding:{offSide:!0,markers:{start:/^\s*(projection|all|every|on|children|nested|parent|variant)/,end:/^\s*$/}},wordPattern:/@?[a-zA-Z_$][\w$-]*/},de={defaultToken:"",tokenPostfix:".pdl",keywords:ce,builtins:pe,operators:me,symbols:/[=><!~?:&|+\-*/^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},[/`/,{token:"string.template",next:"@templateString"}],[/@[a-zA-Z_$][\w$]*/,"identifier.escape"],[/[A-Z][a-zA-Z_$][\w$]*/,{cases:{"@keywords":"invalid","@default":"identifier"}}],[/[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@builtins":"variable.predefined","@default":"identifier"}}],[/[{}()[\]]/,"@brackets"],[/=>/,"operator.arrow"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d*\.\d+([eE][-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}]],whitespace:[[/[ \t\r\n]+/,""],[/#.*$/,"comment"]],templateString:[[/\$\{/,{token:"delimiter.bracket",next:"@templateExpression"}],[/[^\\`$]+/,"string.template"],[/@escapes/,"string.template.escape"],[/\\./,"string.template.escape.invalid"],[/`/,{token:"string.template",next:"@pop"}]],templateExpression:[[/\}/,{token:"delimiter.bracket",next:"@pop"}],{include:"@root"}],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]]}};var le=/\$eventContext\.((?:\w+\.)*)(\w*)$/,D=class{static{C(this,"CompletionProvider")}readModels=[];eventSchemas={};eventSequences=[];setReadModels(e){this.readModels=e||[]}setEventSequences(e){this.eventSequences=e||[]}setReadModelSchemas(e){this.readModels=e.map(t=>({identifier:this.getSchemaName(t)||"",displayName:this.getSchemaName(t)||"",schema:t}))}setEventSchemas(e){if(!e){this.eventSchemas={};return}if(Array.isArray(e)){let t={};e.forEach((n,r)=>{if(!n)return;let i=this.getSchemaName(n)||`Event${r+1}`;t[i]=n}),this.eventSchemas=t;return}this.eventSchemas=e}provideCompletionItems(e,t){let n=this.buildContext(e,t),r=[],i=this.getActiveReadModelSchema(e);return n.lineNumber===1?this.addProjectionLineCompletions(r,n):this.isAfterKeyword(n,"sequence")?this.addEventSequenceCompletions(r,n):this.isAfterKeyword(n,"from")||this.isAfterKeyword(n,"every")?this.addEventTypeCompletions(r,n):/\benters\s+on\s+\w*$/.test(n.textBeforeCursor)?this.addEventTypeCompletions(r,n):/\benters\s+\w*$/.test(n.textBeforeCursor)?r.push({label:"on",kind:14,insertText:"on ",documentation:"Declares the event that activates this variant.",detail:"enters on <EventType>",range:this.getRangeForWord(n)}):this.isAfterKeyword(n,"variant")?this.addVariantNameCompletions(r,n):this.isAfterKeyword(n,"key")?this.addKeyCompletions(r,n,i):this.isAfterKeyword(n,"parent")?this.addParentCompletions(r,n):this.isAfterKeyword(n,"children")?this.addChildrenCompletions(r,n,i):this.isAfterKeyword(n,"join")?this.addJoinCompletions(r,n,i):this.isAfterKeyword(n,"with")?this.addEventTypeCompletions(r,n):this.isAfterNumericOperationKeyword(n)?this.addNumericPropertyCompletions(r,n,i):this.isAfterAddOrSubtractBy(n)?this.addAssignmentValueCompletions(r,n,e,t):this.isInAssignment(n)?this.addAssignmentValueCompletions(r,n,e,t):this.isPropertyDotAccess(n)?this.addPropertyMemberCompletions(r,n):(this.isStartOfLine(n)||this.isAfterIndent(n))&&this.addStatementCompletions(r,n,i),{suggestions:r}}buildContext(e,t){let n=e.getLineContent(t.lineNumber),r=n.substring(0,t.column-1),i=n.substring(t.column-1),l=e.getWordAtPosition(t)?.word||"",f=this.getIndentLevel(r);return{lineContent:n,textBeforeCursor:r,textAfterCursor:i,currentWord:l,indentLevel:f,lineNumber:t.lineNumber}}getIndentLevel(e){let t=e.match(/^(\s*)/);return t?Math.floor(t[1].length/2):0}isStartOfLine(e){return e.textBeforeCursor.trim()===""}isAfterIndent(e){return/^\s+$/.test(e.textBeforeCursor)}isAfterKeyword(e,t){return new RegExp(`\\b${t}\\s+\\w*$`).test(e.textBeforeCursor)}isAfterNumericOperationKeyword(e){let t=/\b(count|increment|decrement)\s+\w*$/,n=/\b(add|subtract)\s+\w*$/;return t.test(e.textBeforeCursor)?!0:n.test(e.textBeforeCursor)?!this.isAfterAddOrSubtractBy(e):!1}isAfterAddOrSubtractBy(e){return/\b(add|subtract)\s+\w+\s+by\s+\w*$/.test(e.textBeforeCursor)}isInAssignment(e){return/\w+\s*=\s*\w*$/.test(e.textBeforeCursor)}isPropertyDotAccess(e){return/(\w+|\$\w+)\.(\w*)$/.test(e.textBeforeCursor)||le.test(e.textBeforeCursor)}addProjectionLineCompletions(e,t){let n=t.textBeforeCursor.trim();(n===""||"projection".startsWith(n))&&e.push({label:"projection",kind:14,insertText:"projection ",documentation:"Define a projection that transforms events into a read model",detail:"projection <ProjectionName>",range:this.getRangeForWord(t)});let r=n.match(/^projection\s+[\w.]+\s*=>\s*([\w.]*)$/);if(r){let i=r[1]||"";this.readModels.forEach(s=>{if(!i||s.displayName.toLowerCase().startsWith(i.toLowerCase())){let l=`${s.displayName} (${s.identifier})`;e.push({label:l,kind:6,insertText:s.displayName,filterText:`${s.displayName} ${s.identifier}`,documentation:`Read model: ${s.displayName} (${s.identifier})`,detail:s.identifier,range:this.getRangeForWord(t)})}});return}if(n.startsWith("projection ")&&!n.includes("=>")){let i=n.substring(11);this.readModels.forEach(s=>{if(!i||s.displayName.toLowerCase().startsWith(i.toLowerCase())){let l=`${s.displayName} (${s.identifier})`;e.push({label:l,kind:6,insertText:`${s.displayName} => ${s.displayName}`,filterText:`${s.displayName} ${s.identifier}`,documentation:`Read model: ${s.displayName} (${s.identifier})`,detail:s.identifier,range:this.getRangeForWord(t)})}})}}addEventTypeCompletions(e,t){Object.keys(this.eventSchemas).forEach(n=>{if(!t.currentWord||n.startsWith(t.currentWord)){let r=this.eventSchemas[n];e.push({label:n,kind:6,insertText:n,documentation:this.getSchemaDescription(r)||`Event type: ${n}`,detail:"Event Type",range:this.getRangeForWord(t)})}})}addEventSequenceCompletions(e,t){this.eventSequences.forEach(n=>{(!t.currentWord||n.startsWith(t.currentWord))&&e.push({label:n,kind:13,insertText:n,documentation:`Event sequence: ${n}`,detail:"Event Sequence",range:this.getRangeForWord(t)})})}addKeyCompletions(e,t,n){n?.definitions&&Object.keys(n.definitions).forEach(r=>{n.definitions[r].type==="object"&&e.push({label:r,kind:6,insertText:r,documentation:`Composite key type: ${r}`,detail:"Composite Key Type",range:this.getRangeForWord(t)})}),this.addExpressionCompletions(e,t)}addParentCompletions(e,t){this.addExpressionCompletions(e,t)}addNumericPropertyCompletions(e,t,n){n?.properties&&Object.entries(n.properties).forEach(([i,s])=>{(s.type==="integer"||s.type==="number")&&(!t.currentWord||i.startsWith(t.currentWord))&&e.push({label:i,kind:9,insertText:i,documentation:`Numeric property: ${i}`,detail:this.getPropertyTypeDescription(s),range:this.getRangeForWord(t)})});let r=t.textBeforeCursor.match(/\b(add|subtract)\s+(\w*)$/);if(r){let i=r[2]||"";n?.properties&&Object.entries(n.properties).forEach(([s,l])=>{(l.type==="integer"||l.type==="number")&&(!i||s.startsWith(i))&&e.push({label:s,kind:9,insertText:`${s} by `,documentation:`Numeric property: ${s}`,detail:this.getPropertyTypeDescription(l),range:this.getRangeForWord(t)})})}}addChildrenCompletions(e,t,n){n?.properties&&Object.entries(n.properties).forEach(([r,i])=>{(i.type==="array"||i.items)&&e.push({label:r,kind:9,insertText:`${r} id `,documentation:`Collection property: ${r}`,detail:this.getPropertyTypeDescription(i),range:this.getRangeForWord(t)})})}addJoinCompletions(e,t,n){let r=t.textBeforeCursor.trim();r==="join"||!r.includes(" ")?n?.properties&&Object.entries(n.properties).forEach(([i,s])=>{(s.type==="array"||s.items)&&e.push({label:i,kind:9,insertText:`${i} on `,documentation:`Join on collection: ${i}`,range:this.getRangeForWord(t)})}):r.match(/join\s+\w+\s+on\s+/)&&n?.properties&&Object.keys(n.properties).forEach(i=>{e.push({label:i,kind:9,insertText:i,documentation:`Property: ${i}`,range:this.getRangeForWord(t)})})}addVariantNameCompletions(e,t){this.readModels.forEach(n=>{(!t.currentWord||n.displayName.toLowerCase().startsWith(t.currentWord.toLowerCase()))&&e.push({label:n.displayName,kind:6,insertText:n.displayName,documentation:`Read model: ${n.displayName} (${n.identifier})`,detail:n.identifier,range:this.getRangeForWord(t)})})}addStatementCompletions(e,t,n){[{label:"sequence",insertText:"sequence ",documentation:"Specify which event sequence to use for this projection",detail:"sequence <event-sequence-id>"},{label:"variant",insertText:"variant ",documentation:"Declare one of several mutually exclusive named read models sharing this projection's identity",detail:"variant <Name>"},{label:"enters on",insertText:"enters on ",documentation:"Declare the event that activates a variant",detail:"enters on <EventType>"},{label:"from",insertText:"from ",documentation:"Handle specific event types",detail:"from <EventType>"},{label:"all",insertText:"all",documentation:"Subscribe to all event types in the system \u2014 mappings run for every event system-wide, regardless of explicit from blocks",detail:"all"},{label:"every",insertText:"every",documentation:"Handle all events for automatic mapping (only events explicitly subscribed to via from blocks)",detail:"every"},{label:"key",insertText:"key ",documentation:"Define the projection key",detail:"key <expression>"},{label:"parent",insertText:"parent ",documentation:"Define parent relationship",detail:"parent <expression>"},{label:"join",insertText:"join ",documentation:"Join with child collection",detail:"join <collection> on <property>"},{label:"children",insertText:"children ",documentation:"Define child collection operations",detail:"children <collection> identified by <expression>"},{label:"remove with",insertText:"remove with ",documentation:"Remove items based on event",detail:"remove with <EventType>"},{label:"remove via",insertText:"remove via join on ",documentation:"Remove items via join",detail:"remove via join on <EventType>"},{label:"no automap",insertText:"no automap",documentation:"Disable automatic property mapping",detail:"no automap"},{label:"clear",insertText:"clear ",documentation:"Remove the value a property holds",detail:"clear <property>"},{label:"increment",insertText:"increment ",documentation:"Increment a numeric property",detail:"increment <property>"},{label:"decrement",insertText:"decrement ",documentation:"Decrement a numeric property",detail:"decrement <property>"},{label:"count",insertText:"count ",documentation:"Count occurrences",detail:"count <property>"},{label:"add",insertText:"add ",documentation:"Add value to property",detail:"add <property> by <expression>"},{label:"subtract",insertText:"subtract ",documentation:"Subtract value from property",detail:"subtract <property> by <expression>"},{label:"exclude children",insertText:"exclude children",documentation:"Exclude child collections from automap",detail:"exclude children"}].forEach(i=>{(!t.currentWord||i.label.startsWith(t.currentWord))&&e.push({label:i.label,kind:14,insertText:i.insertText,documentation:i.documentation,detail:i.detail,range:this.getRangeForWord(t)})}),n?.properties&&Object.entries(n.properties).forEach(([i,s])=>{(!t.currentWord||i.startsWith(t.currentWord))&&e.push({label:i,kind:9,insertText:`${i} = `,documentation:`Assign value to property: ${i}`,detail:this.getPropertyTypeDescription(s),range:this.getRangeForWord(t)})})}addAssignmentValueCompletions(e,t,n,r){let i=this.getCurrentEventType(n,r.lineNumber);if(i&&this.eventSchemas[i]){let s=this.eventSchemas[i];s.properties&&Object.entries(s.properties).forEach(([l,f])=>{e.push({label:l,kind:9,insertText:l,documentation:`Event property: ${l}`,detail:this.getPropertyTypeDescription(f),range:this.getRangeForWord(t)})})}this.addExpressionCompletions(e,t)}addExpressionCompletions(e,t){[{label:"$eventSourceId",insertText:"$eventSourceId",documentation:"The identifier of the event source (aggregate/entity)",detail:"Event Source Expression"},{label:"$causedBy",insertText:"$causedBy",documentation:"The identity that caused the event. Chronicle cannot yet evaluate this short form (Cratis/Chronicle#4119) - prefer $eventContext.causedBy.<property>.",detail:"Identity Expression"},{label:"$eventContext",insertText:"$eventContext.",documentation:`Metadata about the event: ${ne.map(r=>r.name).join(", ")}`,detail:"Event Context Expression"}].forEach(r=>{(!t.currentWord||r.label.startsWith(t.currentWord)||r.label.startsWith("$"+t.currentWord))&&e.push({label:r.label,kind:14,insertText:r.insertText,documentation:r.documentation,detail:r.detail,range:this.getRangeForWord(t)})})}addPropertyMemberCompletions(e,t){let n=t.textBeforeCursor.match(le);if(n){let c=n[1].split(".").filter(u=>u.length>0);this.addEventContextMemberCompletions(e,t,c,n[2]);return}let r=t.textBeforeCursor.match(/(\w+|\$\w+)\.(\w*)$/);if(!r)return;let[,i,s]=r,l=t.textBeforeCursor.match(/\$causedBy\.((?:\w+\.)*)(\w*)$/);if(l){let c=l[1].split(".").filter(u=>u.length>0);this.addEventContextMemberCompletions(e,t,["causedBy",...c],l[2]);return}let f=this.eventSchemas[i];f?.properties&&Object.entries(f.properties).forEach(([c,u])=>{(!s||c.startsWith(s))&&e.push({label:c,kind:9,insertText:c,documentation:`Event property: ${c}`,detail:this.getPropertyTypeDescription(u),range:this.getRangeForWord(t)})})}addEventContextMemberCompletions(e,t,n,r){(re(n)??[]).filter(s=>!r||s.name.startsWith(r)).forEach(s=>{e.push({label:s.name,kind:s.kind==="function"?1:9,insertText:s.name,documentation:s.description,detail:s.type,range:this.getRangeForWord(t)})})}getCurrentEventType(e,t){for(let n=t;n>=1;n--){let r=e.getLineContent(n).trim(),i=r.match(/^from\s+([\w-]+)/);if(i)return i[1];if(r.match(/^every$/))return null}return null}getActiveReadModelSchema(e){let n=e.getLineContent(1).trim().match(/^projection\s+[\w.]+\s*=>\s*([\w.]+)/);if(!n)return;let r=n[1];return this.resolveReadModelInfo(r)?.schema}resolveReadModelInfo(e){return this.readModels.find(t=>t.identifier===e||t.displayName===e)||null}getSchemaName(e){if(e.name)return e.name;if(e.title)return e.title;if(typeof e.$id=="string"){let t=e.$id.split("/");return t[t.length-1]||e.$id}}getSchemaDescription(e){return e.description||void 0}getPropertyTypeDescription(e){return e.type==="array"&&e.items?`${e.items.type||e.items.$id?.split("/").pop()||"unknown"}[]`:e.type||e.$ref?.split("/").pop()||"unknown"}getRangeForWord(e){let t=e.textBeforeCursor.length-e.currentWord.length+1,n=t+e.currentWord.length;return{startLineNumber:e.lineNumber,startColumn:Math.max(1,t),endLineNumber:e.lineNumber,endColumn:Math.max(1,n)}}};var A=class{static{C(this,"Validator")}readModels=[];eventSchemas={};draftReadModel=null;setReadModels(e){this.readModels=e||[]}setDraftReadModel(e){this.draftReadModel=e}setReadModelSchemas(e){this.readModels=e.map(t=>({identifier:this.getSchemaName(t)||"",displayName:this.getSchemaName(t)||"",schema:t}))}setEventSchemas(e){if(!e){this.eventSchemas={};return}if(Array.isArray(e)){let t={};e.forEach((n,r)=>{if(!n)return;let i=this.getSchemaName(n)||`Event${r+1}`;t[i]=n}),this.eventSchemas=t;return}this.eventSchemas=e}validate(e){let t=[],n=e.getValue();if(!n.trim())return t;let r=n.replace(/\r\n/g,`
1
+ import{T as ne,U as re,V as ie,W as q,X as oe,ea as se,x as te}from"../../chunk-X5DNGVII.js";import{a as C}from"../../chunk-AYDF3IFZ.js";var E="pdl",ce=["projection","sequence","all","every","on","from","key","parent","join","automap","no","children","nested","identified","by","add","subtract","remove","via","with","default","increment","decrement","count","set","unset","clear","events","id","exclude","variant","enters"],pe=["$eventSourceId","$causedBy","$eventContext"],me=["=","+=","-=","=>","."],ae={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],indentationRules:{increaseIndentPattern:/^.*(:|\bon\b|\ball\b|\bevery\b|\bchildren\b|\bnested\b|\bparent\b|\bvariant\b)\s*$/,decreaseIndentPattern:/^.*\}.*$/},folding:{offSide:!0,markers:{start:/^\s*(projection|all|every|on|children|nested|parent|variant)/,end:/^\s*$/}},wordPattern:/@?[a-zA-Z_$][\w$-]*/},de={defaultToken:"",tokenPostfix:".pdl",keywords:ce,builtins:pe,operators:me,symbols:/[=><!~?:&|+\-*/^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},[/`/,{token:"string.template",next:"@templateString"}],[/@[a-zA-Z_$][\w$]*/,"identifier.escape"],[/[A-Z][a-zA-Z_$][\w$]*/,{cases:{"@keywords":"invalid","@default":"identifier"}}],[/[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@builtins":"variable.predefined","@default":"identifier"}}],[/[{}()[\]]/,"@brackets"],[/=>/,"operator.arrow"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d*\.\d+([eE][-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}]],whitespace:[[/[ \t\r\n]+/,""],[/#.*$/,"comment"]],templateString:[[/\$\{/,{token:"delimiter.bracket",next:"@templateExpression"}],[/[^\\`$]+/,"string.template"],[/@escapes/,"string.template.escape"],[/\\./,"string.template.escape.invalid"],[/`/,{token:"string.template",next:"@pop"}]],templateExpression:[[/\}/,{token:"delimiter.bracket",next:"@pop"}],{include:"@root"}],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]]}};var le=/\$eventContext\.((?:\w+\.)*)(\w*)$/,D=class{static{C(this,"CompletionProvider")}readModels=[];eventSchemas={};eventSequences=[];setReadModels(e){this.readModels=e||[]}setEventSequences(e){this.eventSequences=e||[]}setReadModelSchemas(e){this.readModels=e.map(t=>({identifier:this.getSchemaName(t)||"",displayName:this.getSchemaName(t)||"",schema:t}))}setEventSchemas(e){if(!e){this.eventSchemas={};return}if(Array.isArray(e)){let t={};e.forEach((n,r)=>{if(!n)return;let i=this.getSchemaName(n)||`Event${r+1}`;t[i]=n}),this.eventSchemas=t;return}this.eventSchemas=e}provideCompletionItems(e,t){let n=this.buildContext(e,t),r=[],i=this.getActiveReadModelSchema(e);return n.lineNumber===1?this.addProjectionLineCompletions(r,n):this.isAfterKeyword(n,"sequence")?this.addEventSequenceCompletions(r,n):this.isAfterKeyword(n,"from")||this.isAfterKeyword(n,"every")?this.addEventTypeCompletions(r,n):/\benters\s+on\s+\w*$/.test(n.textBeforeCursor)?this.addEventTypeCompletions(r,n):/\benters\s+\w*$/.test(n.textBeforeCursor)?r.push({label:"on",kind:14,insertText:"on ",documentation:"Declares the event that activates this variant.",detail:"enters on <EventType>",range:this.getRangeForWord(n)}):this.isAfterKeyword(n,"variant")?this.addVariantNameCompletions(r,n):this.isAfterKeyword(n,"key")?this.addKeyCompletions(r,n,i):this.isAfterKeyword(n,"parent")?this.addParentCompletions(r,n):this.isAfterKeyword(n,"children")?this.addChildrenCompletions(r,n,i):this.isAfterKeyword(n,"join")?this.addJoinCompletions(r,n,i):this.isAfterKeyword(n,"with")?this.addEventTypeCompletions(r,n):this.isAfterNumericOperationKeyword(n)?this.addNumericPropertyCompletions(r,n,i):this.isAfterAddOrSubtractBy(n)?this.addAssignmentValueCompletions(r,n,e,t):this.isInAssignment(n)?this.addAssignmentValueCompletions(r,n,e,t):this.isPropertyDotAccess(n)?this.addPropertyMemberCompletions(r,n):(this.isStartOfLine(n)||this.isAfterIndent(n))&&this.addStatementCompletions(r,n,i),{suggestions:r}}buildContext(e,t){let n=e.getLineContent(t.lineNumber),r=n.substring(0,t.column-1),i=n.substring(t.column-1),l=e.getWordAtPosition(t)?.word||"",f=this.getIndentLevel(r);return{lineContent:n,textBeforeCursor:r,textAfterCursor:i,currentWord:l,indentLevel:f,lineNumber:t.lineNumber}}getIndentLevel(e){let t=e.match(/^(\s*)/);return t?Math.floor(t[1].length/2):0}isStartOfLine(e){return e.textBeforeCursor.trim()===""}isAfterIndent(e){return/^\s+$/.test(e.textBeforeCursor)}isAfterKeyword(e,t){return new RegExp(`\\b${t}\\s+\\w*$`).test(e.textBeforeCursor)}isAfterNumericOperationKeyword(e){let t=/\b(count|increment|decrement)\s+\w*$/,n=/\b(add|subtract)\s+\w*$/;return t.test(e.textBeforeCursor)?!0:n.test(e.textBeforeCursor)?!this.isAfterAddOrSubtractBy(e):!1}isAfterAddOrSubtractBy(e){return/\b(add|subtract)\s+\w+\s+by\s+\w*$/.test(e.textBeforeCursor)}isInAssignment(e){return/\w+\s*=\s*\w*$/.test(e.textBeforeCursor)}isPropertyDotAccess(e){return/(\w+|\$\w+)\.(\w*)$/.test(e.textBeforeCursor)||le.test(e.textBeforeCursor)}addProjectionLineCompletions(e,t){let n=t.textBeforeCursor.trim();(n===""||"projection".startsWith(n))&&e.push({label:"projection",kind:14,insertText:"projection ",documentation:"Define a projection that transforms events into a read model",detail:"projection <ProjectionName>",range:this.getRangeForWord(t)});let r=n.match(/^projection\s+[\w.]+\s*=>\s*([\w.]*)$/);if(r){let i=r[1]||"";this.readModels.forEach(s=>{if(!i||s.displayName.toLowerCase().startsWith(i.toLowerCase())){let l=`${s.displayName} (${s.identifier})`;e.push({label:l,kind:6,insertText:s.displayName,filterText:`${s.displayName} ${s.identifier}`,documentation:`Read model: ${s.displayName} (${s.identifier})`,detail:s.identifier,range:this.getRangeForWord(t)})}});return}if(n.startsWith("projection ")&&!n.includes("=>")){let i=n.substring(11);this.readModels.forEach(s=>{if(!i||s.displayName.toLowerCase().startsWith(i.toLowerCase())){let l=`${s.displayName} (${s.identifier})`;e.push({label:l,kind:6,insertText:`${s.displayName} => ${s.displayName}`,filterText:`${s.displayName} ${s.identifier}`,documentation:`Read model: ${s.displayName} (${s.identifier})`,detail:s.identifier,range:this.getRangeForWord(t)})}})}}addEventTypeCompletions(e,t){Object.keys(this.eventSchemas).forEach(n=>{if(!t.currentWord||n.startsWith(t.currentWord)){let r=this.eventSchemas[n];e.push({label:n,kind:6,insertText:n,documentation:this.getSchemaDescription(r)||`Event type: ${n}`,detail:"Event Type",range:this.getRangeForWord(t)})}})}addEventSequenceCompletions(e,t){this.eventSequences.forEach(n=>{(!t.currentWord||n.startsWith(t.currentWord))&&e.push({label:n,kind:13,insertText:n,documentation:`Event sequence: ${n}`,detail:"Event Sequence",range:this.getRangeForWord(t)})})}addKeyCompletions(e,t,n){n?.definitions&&Object.keys(n.definitions).forEach(r=>{n.definitions[r].type==="object"&&e.push({label:r,kind:6,insertText:r,documentation:`Composite key type: ${r}`,detail:"Composite Key Type",range:this.getRangeForWord(t)})}),this.addExpressionCompletions(e,t)}addParentCompletions(e,t){this.addExpressionCompletions(e,t)}addNumericPropertyCompletions(e,t,n){n?.properties&&Object.entries(n.properties).forEach(([i,s])=>{(s.type==="integer"||s.type==="number")&&(!t.currentWord||i.startsWith(t.currentWord))&&e.push({label:i,kind:9,insertText:i,documentation:`Numeric property: ${i}`,detail:this.getPropertyTypeDescription(s),range:this.getRangeForWord(t)})});let r=t.textBeforeCursor.match(/\b(add|subtract)\s+(\w*)$/);if(r){let i=r[2]||"";n?.properties&&Object.entries(n.properties).forEach(([s,l])=>{(l.type==="integer"||l.type==="number")&&(!i||s.startsWith(i))&&e.push({label:s,kind:9,insertText:`${s} by `,documentation:`Numeric property: ${s}`,detail:this.getPropertyTypeDescription(l),range:this.getRangeForWord(t)})})}}addChildrenCompletions(e,t,n){n?.properties&&Object.entries(n.properties).forEach(([r,i])=>{(i.type==="array"||i.items)&&e.push({label:r,kind:9,insertText:`${r} id `,documentation:`Collection property: ${r}`,detail:this.getPropertyTypeDescription(i),range:this.getRangeForWord(t)})})}addJoinCompletions(e,t,n){let r=t.textBeforeCursor.trim();r==="join"||!r.includes(" ")?n?.properties&&Object.entries(n.properties).forEach(([i,s])=>{(s.type==="array"||s.items)&&e.push({label:i,kind:9,insertText:`${i} on `,documentation:`Join on collection: ${i}`,range:this.getRangeForWord(t)})}):r.match(/join\s+\w+\s+on\s+/)&&n?.properties&&Object.keys(n.properties).forEach(i=>{e.push({label:i,kind:9,insertText:i,documentation:`Property: ${i}`,range:this.getRangeForWord(t)})})}addVariantNameCompletions(e,t){this.readModels.forEach(n=>{(!t.currentWord||n.displayName.toLowerCase().startsWith(t.currentWord.toLowerCase()))&&e.push({label:n.displayName,kind:6,insertText:n.displayName,documentation:`Read model: ${n.displayName} (${n.identifier})`,detail:n.identifier,range:this.getRangeForWord(t)})})}addStatementCompletions(e,t,n){[{label:"sequence",insertText:"sequence ",documentation:"Specify which event sequence to use for this projection",detail:"sequence <event-sequence-id>"},{label:"variant",insertText:"variant ",documentation:"Declare one of several mutually exclusive named read models sharing this projection's identity",detail:"variant <Name>"},{label:"enters on",insertText:"enters on ",documentation:"Declare the event that activates a variant",detail:"enters on <EventType>"},{label:"from",insertText:"from ",documentation:"Handle specific event types",detail:"from <EventType>"},{label:"all",insertText:"all",documentation:"Subscribe to all event types in the system \u2014 mappings run for every event system-wide, regardless of explicit from blocks",detail:"all"},{label:"every",insertText:"every",documentation:"Handle all events for automatic mapping (only events explicitly subscribed to via from blocks)",detail:"every"},{label:"key",insertText:"key ",documentation:"Define the projection key",detail:"key <expression>"},{label:"parent",insertText:"parent ",documentation:"Define parent relationship",detail:"parent <expression>"},{label:"join",insertText:"join ",documentation:"Join with child collection",detail:"join <collection> on <property>"},{label:"children",insertText:"children ",documentation:"Define child collection operations",detail:"children <collection> identified by <expression>"},{label:"remove with",insertText:"remove with ",documentation:"Remove items based on event",detail:"remove with <EventType>"},{label:"remove via",insertText:"remove via join on ",documentation:"Remove items via join",detail:"remove via join on <EventType>"},{label:"no automap",insertText:"no automap",documentation:"Disable automatic property mapping",detail:"no automap"},{label:"clear",insertText:"clear ",documentation:"Remove the value a property holds",detail:"clear <property>"},{label:"increment",insertText:"increment ",documentation:"Increment a numeric property",detail:"increment <property>"},{label:"decrement",insertText:"decrement ",documentation:"Decrement a numeric property",detail:"decrement <property>"},{label:"count",insertText:"count ",documentation:"Count occurrences",detail:"count <property>"},{label:"add",insertText:"add ",documentation:"Add value to property",detail:"add <property> by <expression>"},{label:"subtract",insertText:"subtract ",documentation:"Subtract value from property",detail:"subtract <property> by <expression>"},{label:"exclude children",insertText:"exclude children",documentation:"Exclude child collections from automap",detail:"exclude children"}].forEach(i=>{(!t.currentWord||i.label.startsWith(t.currentWord))&&e.push({label:i.label,kind:14,insertText:i.insertText,documentation:i.documentation,detail:i.detail,range:this.getRangeForWord(t)})}),n?.properties&&Object.entries(n.properties).forEach(([i,s])=>{(!t.currentWord||i.startsWith(t.currentWord))&&e.push({label:i,kind:9,insertText:`${i} = `,documentation:`Assign value to property: ${i}`,detail:this.getPropertyTypeDescription(s),range:this.getRangeForWord(t)})})}addAssignmentValueCompletions(e,t,n,r){let i=this.getCurrentEventType(n,r.lineNumber);if(i&&this.eventSchemas[i]){let s=this.eventSchemas[i];s.properties&&Object.entries(s.properties).forEach(([l,f])=>{e.push({label:l,kind:9,insertText:l,documentation:`Event property: ${l}`,detail:this.getPropertyTypeDescription(f),range:this.getRangeForWord(t)})})}this.addExpressionCompletions(e,t)}addExpressionCompletions(e,t){[{label:"$eventSourceId",insertText:"$eventSourceId",documentation:"The identifier of the event source (aggregate/entity)",detail:"Event Source Expression"},{label:"$causedBy",insertText:"$causedBy",documentation:"The identity that caused the event. Chronicle cannot yet evaluate this short form (Cratis/Chronicle#4119) - prefer $eventContext.causedBy.<property>.",detail:"Identity Expression"},{label:"$eventContext",insertText:"$eventContext.",documentation:`Metadata about the event: ${ne.map(r=>r.name).join(", ")}`,detail:"Event Context Expression"}].forEach(r=>{(!t.currentWord||r.label.startsWith(t.currentWord)||r.label.startsWith("$"+t.currentWord))&&e.push({label:r.label,kind:14,insertText:r.insertText,documentation:r.documentation,detail:r.detail,range:this.getRangeForWord(t)})})}addPropertyMemberCompletions(e,t){let n=t.textBeforeCursor.match(le);if(n){let c=n[1].split(".").filter(u=>u.length>0);this.addEventContextMemberCompletions(e,t,c,n[2]);return}let r=t.textBeforeCursor.match(/(\w+|\$\w+)\.(\w*)$/);if(!r)return;let[,i,s]=r,l=t.textBeforeCursor.match(/\$causedBy\.((?:\w+\.)*)(\w*)$/);if(l){let c=l[1].split(".").filter(u=>u.length>0);this.addEventContextMemberCompletions(e,t,["causedBy",...c],l[2]);return}let f=this.eventSchemas[i];f?.properties&&Object.entries(f.properties).forEach(([c,u])=>{(!s||c.startsWith(s))&&e.push({label:c,kind:9,insertText:c,documentation:`Event property: ${c}`,detail:this.getPropertyTypeDescription(u),range:this.getRangeForWord(t)})})}addEventContextMemberCompletions(e,t,n,r){(re(n)??[]).filter(s=>!r||s.name.startsWith(r)).forEach(s=>{e.push({label:s.name,kind:s.kind==="function"?1:9,insertText:s.name,documentation:s.description,detail:s.type,range:this.getRangeForWord(t)})})}getCurrentEventType(e,t){for(let n=t;n>=1;n--){let r=e.getLineContent(n).trim(),i=r.match(/^from\s+([\w-]+)/);if(i)return i[1];if(r.match(/^every$/))return null}return null}getActiveReadModelSchema(e){let n=e.getLineContent(1).trim().match(/^projection\s+[\w.]+\s*=>\s*([\w.]+)/);if(!n)return;let r=n[1];return this.resolveReadModelInfo(r)?.schema}resolveReadModelInfo(e){return this.readModels.find(t=>t.identifier===e||t.displayName===e)||null}getSchemaName(e){if(e.name)return e.name;if(e.title)return e.title;if(typeof e.$id=="string"){let t=e.$id.split("/");return t[t.length-1]||e.$id}}getSchemaDescription(e){return e.description||void 0}getPropertyTypeDescription(e){return e.type==="array"&&e.items?`${e.items.type||e.items.$id?.split("/").pop()||"unknown"}[]`:e.type||e.$ref?.split("/").pop()||"unknown"}getRangeForWord(e){let t=e.textBeforeCursor.length-e.currentWord.length+1,n=t+e.currentWord.length;return{startLineNumber:e.lineNumber,startColumn:Math.max(1,t),endLineNumber:e.lineNumber,endColumn:Math.max(1,n)}}};var A=class{static{C(this,"Validator")}readModels=[];eventSchemas={};draftReadModel=null;setReadModels(e){this.readModels=e||[]}setDraftReadModel(e){this.draftReadModel=e}setReadModelSchemas(e){this.readModels=e.map(t=>({identifier:this.getSchemaName(t)||"",displayName:this.getSchemaName(t)||"",schema:t}))}setEventSchemas(e){if(!e){this.eventSchemas={};return}if(Array.isArray(e)){let t={};e.forEach((n,r)=>{if(!n)return;let i=this.getSchemaName(n)||`Event${r+1}`;t[i]=n}),this.eventSchemas=t;return}this.eventSchemas=e}validate(e){let t=[],n=e.getValue();if(!n.trim())return t;let r=n.replace(/\r\n/g,`
2
2
  `).replace(/\r/g,`
3
3
  `).split(`
4
4
  `),i=0,s="";for(let m=0;m<r.length;m++){let p=r[m].trim();if(p&&!p.startsWith("#")){i=m,s=p;break}}if(!s)return t;let l=s.match(/^projection\s+([\w.]+)\s*=>\s*([\w.]+)\s*$/),f=!l&&s.match(/^projection\s+([\w.]+)\s*$/);if(!l&&!f){let m=i+1;return t.push(this.createError(m,1,s.length+1,'Projection definition must start with "projection <ProjectionName>" or "projection <ProjectionName> => <ReadModelIdentifier>"')),t}let c,u=null;if(l){u=l[2];let m=this.resolveReadModelIdentifier(u)!==null,p=this.isDraftReadModel(u),v=this.getReadModelStartColumn(s,u);if(!m&&!p){let S=i+1,N=v;t.push(this.createError(S,N,N+u.length,`Read model '${u}' not found`))}else if(p){let S=i+1,N=v;t.push(this.createInfo(S,N,N+u.length,`Read model '${u}' is a draft (not yet saved)`))}let R=this.isDraftReadModel(u),w=R?null:this.resolveReadModelInfo(u);c=R?this.draftReadModel.schema:w?.schema}let g=[c],M=[0],x=0,b=[new Map];for(let m=1;m<r.length;m++){let p=m+1,v=r[m],R=v.trim();if(!R||R.startsWith("#"))continue;let w=v.search(/\S/);for(;w<x&&M.length>1;){let o=M.pop();o!==void 0&&w<o&&(g.pop(),b.pop())}x=w;let S=b[b.length-1],N=R.match(/^from\s+([\w-]+)/);if(N){let o=N[1],a=v.indexOf(o)+1;Object.keys(this.eventSchemas).length>0&&!this.eventSchemas[o]&&t.push(this.createError(p,a,a+o.length,`Event type '${o}' not found`)),S.has(o)?t.push(this.createError(p,a,a+o.length,`Duplicate event type '${o}' - event types can only be used once at each level`)):S.set(o,{lineNumber:p,col:a})}let _=R.match(/^variant\s+([\w.]+)\s*$/);if(_){let[,o]=_,a=v.indexOf(o)+1,y=this.isDraftReadModel(o);!(this.resolveReadModelIdentifier(o)!==null)&&!y?t.push(this.createError(p,a,a+o.length,`Read model '${o}' not found`)):y&&t.push(this.createInfo(p,a,a+o.length,`Read model '${o}' is a draft (not yet saved)`));let F=y?this.draftReadModel.schema:this.resolveReadModelInfo(o)?.schema;g.push(F),M.push(w),b.push(new Map)}let z=R.match(/^enters\s+on\s+([\w-]+)/);if(z){let o=z[1],a=v.indexOf(o)+1;Object.keys(this.eventSchemas).length>0&&!this.eventSchemas[o]&&t.push(this.createError(p,a,a+o.length,`Event type '${o}' not found`)),S.has(o)?t.push(this.createError(p,a,a+o.length,`Duplicate event type '${o}' - event types can only be used once at each level`)):S.set(o,{lineNumber:p,col:a})}let U=R.match(/^events\s+([\w-]+)/);if(U){let o=U[1],a=v.indexOf(o)+1;Object.keys(this.eventSchemas).length>0&&!this.eventSchemas[o]&&t.push(this.createError(p,a,a+o.length,`Event type '${o}' not found`)),S.has(o)?t.push(this.createError(p,a,a+o.length,`Duplicate event type '${o}' - event types can only be used once at each level`)):S.set(o,{lineNumber:p,col:a})}let V=R.match(/^remove\s+(?:with|via\s+join\s+on)\s+([\w-]+)/);if(V){let o=V[1],a=v.indexOf(o)+1;Object.keys(this.eventSchemas).length>0&&!this.eventSchemas[o]&&t.push(this.createError(p,a,a+o.length,`Event type '${o}' not found`)),S.has(o)?t.push(this.createError(p,a,a+o.length,`Duplicate event type '${o}' - event types can only be used once at each level`)):S.set(o,{lineNumber:p,col:a})}let Z=R.match(/^(\w+)\s*=\s*(.+)$/);if(Z){let o=g[g.length-1];if(o?.properties){let[,a]=Z;if(!o.properties[a]){let y=v.indexOf(a)+1,h=this.getSchemaName(o)||"current schema";t.push(this.createWarning(p,y,y+a.length,`Property '${a}' not found in ${h}`))}}}let X=R.match(/^(?:increment|decrement|count)\s+(\w+)$/);if(X){let o=g[g.length-1];if(o?.properties){let[,a]=X;if(!o.properties[a]){let y=v.indexOf(a)+1,h=this.getSchemaName(o)||"current schema";t.push(this.createWarning(p,y,y+a.length,`Property '${a}' not found in ${h}`))}}}let Y=R.match(/^(?:add|subtract)\s+(\w+)\s+by\s+/);if(Y){let o=g[g.length-1];if(o?.properties){let[,a]=Y;if(!o.properties[a]){let y=v.indexOf(a)+1,h=this.getSchemaName(o)||"current schema";t.push(this.createWarning(p,y,y+a.length,`Property '${a}' not found in ${h}`))}}}let G=R.match(/^children\s+(\w+)\s+identified\s+by\s+/);if(G){let o=g[g.length-1];if(o?.properties){let[,a]=G,y=o.properties[a];if(y)if(y.type!=="array"&&!y.items){let h=v.indexOf(a)+1;t.push(this.createWarning(p,h,h+a.length,`Property '${a}' is not a collection (array) type`))}else{let h=y.items;h&&(g.push(h),M.push(w),b.push(new Map))}else{let h=v.indexOf(a)+1,F=this.getSchemaName(o)||"current schema";t.push(this.createWarning(p,h,h+a.length,`Collection property '${a}' not found in ${F}`))}}}let Q=R.match(/^join\s+(\w+)\s+on\s+(\w+)/);if(Q&&c?.properties){let[,o,a]=Q,y=c.properties[o];if(y){if(y.type!=="array"&&!y.items){let h=v.indexOf(o)+1;t.push(this.createWarning(p,h,h+o.length,`Property '${o}' is not a collection (array) type`))}}else{let h=v.indexOf(o)+1;t.push(this.createWarning(p,h,h+o.length,`Collection property '${o}' not found in read model '${u}'`))}if(!c.properties[a]){let h=v.indexOf(a,v.indexOf("on"))+1;t.push(this.createWarning(p,h,h+a.length,`Property '${a}' not found in read model '${u}'`))}b.push(new Map),M.push(w)}let ee=R.match(/^key\s+(\w+)\s*$/);if(ee&&c){let[,o]=ee,a=c.definitions&&c.definitions[o],y=c.properties&&c.properties[o];if(!a&&!y&&!this.isBuiltInExpression(o)){let h=v.indexOf(o)+1;t.push(this.createWarning(p,h,h+o.length,`Composite key type '${o}' not found in read model schema`))}}}for(let m of se(r,te(r)))t.push({severity:m.severity==="error"?8:4,startLineNumber:m.line+1,endLineNumber:m.line+1,startColumn:m.startColumn,endColumn:m.endColumn,message:m.message,code:m.code});return t}resolveReadModelInfo(e){return this.readModels.find(t=>t.identifier===e||t.displayName===e)||null}getReadModelStartColumn(e,t){let n=e.match(/^\s*projection\s+[\w.]+\s*=>\s*/);if(!n){let r=e.lastIndexOf(t);return(r>=0?r:0)+1}return n[0].length+1}resolveReadModelIdentifier(e){return this.isDraftReadModel(e)?this.draftReadModel.identifier:this.resolveReadModelInfo(e)?.identifier??null}isDraftReadModel(e){return!!this.draftReadModel&&(this.draftReadModel.identifier===e||this.draftReadModel.displayName===e)}isBuiltInExpression(e){return e.startsWith("$")||["true","false","null"].includes(e)}createError(e,t,n,r){return{severity:8,startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:n,message:r}}createWarning(e,t,n,r){return{severity:4,startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:n,message:r}}createInfo(e,t,n,r){return{severity:2,startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:n,message:r}}getSchemaName(e){if(e.name)return e.name;if(e.title)return e.title;if(typeof e.$id=="string"){let t=e.$id.split("/");return t[t.length-1]||e.$id}}};var W=class{static{C(this,"HoverProvider")}readModels=[];eventSchemas={};draftReadModel=null;setReadModels(e){this.readModels=e||[]}setReadModelSchemas(e){this.readModels=e.map(t=>({identifier:this.getSchemaName(t)||"",displayName:this.getSchemaName(t)||"",schema:t}))}setEventSchemas(e){if(!e){this.eventSchemas={};return}if(Array.isArray(e)){let t={};e.forEach((n,r)=>{if(!n)return;let i=this.getSchemaName(n)||`Event${r+1}`;t[i]=n}),this.eventSchemas=t;return}this.eventSchemas=e}setDraftReadModel(e){this.draftReadModel=e}provideHover(e,t){let n=e.getWordAtPosition(t);if(!n)return null;let r=n.word,i=e.getLineContent(t.lineNumber);if(this.getProjectionNameAtPosition(i,t.column))return{contents:[{value:"The name of the projection"}],range:{startLineNumber:t.lineNumber,startColumn:n.startColumn,endLineNumber:t.lineNumber,endColumn:n.endColumn}};let l=this.getEventContextInfo(i,n.startColumn);if(l)return{contents:[{value:l}],range:{startLineNumber:t.lineNumber,startColumn:n.startColumn,endLineNumber:t.lineNumber,endColumn:n.endColumn}};let f=this.getKeywordInfo(r);if(f)return{contents:[{value:f}],range:{startLineNumber:t.lineNumber,startColumn:n.startColumn,endLineNumber:t.lineNumber,endColumn:n.endColumn}};let c=this.getExpressionInfo(r);if(c)return{contents:[{value:c}],range:{startLineNumber:t.lineNumber,startColumn:n.startColumn,endLineNumber:t.lineNumber,endColumn:n.endColumn}};if(this.eventSchemas[r]){let M=this.eventSchemas[r],x=this.getSchemaDescription(M),b=this.getSchemaProperties(M),m=`**Event Type:** \`${r}\`
@@ -10,8 +10,6 @@ export declare const operationImplementationItems: CompletionEntry[];
10
10
  export declare const operationPhaseItems: CompletionEntry[];
11
11
  export declare const conceptItems: CompletionEntry[];
12
12
  export declare const typeItems: CompletionEntry[];
13
- export declare const moduleItems: CompletionEntry[];
14
- export declare const featureItems: CompletionEntry[];
15
13
  export declare const sliceItems: CompletionEntry[];
16
14
  export declare const commandItems: CompletionEntry[];
17
15
  export declare const eventItems: CompletionEntry[];
@@ -36,4 +34,6 @@ export declare const screenItems: CompletionEntry[];
36
34
  export declare const actionItems: CompletionEntry[];
37
35
  export declare const tableItems: CompletionEntry[];
38
36
  export declare const contextVariableItems: CompletionEntry[];
37
+ export { moduleScopeItems as moduleItems, featureScopeItems as featureItems } from './scope-items';
38
+ export declare function sliceItemsFor(sliceType: string | undefined): CompletionEntry[];
39
39
  //# sourceMappingURL=completion-items.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"completion-items.d.ts","sourceRoot":"","sources":["../completion-items.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,iBAAiB,EAAE,eAAe,EAE9C,CAAC;AAEF,MAAM,WAAW,eAAe;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACzB;AAID,eAAO,MAAM,aAAa,EAAE,eAAe,EAoB1C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,eAAe,EAM3C,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,eAAe,EAIzD,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,eAAe,EAIhD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAAe,EAKzC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,eAAe,EAItC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,EAUxC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAAe,EAQzC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,eAAe,EAgBvC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAAe,EAczC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,eAAe,EAKvC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAAe,EAI7C,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zD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAAe,EAG7C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,eAAe,EAGtC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,EAKxC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,EAU1C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,EAYxC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,EAGxC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,eAAe,EAGvC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAAe,EAqBjD,CAAC;AAEF,OAAO,EAAE,gBAAgB,IAAI,WAAW,EAAE,iBAAiB,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AAUnG,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,eAAe,EAAE,CAG9E"}
@@ -1,3 +1,4 @@
1
+ import { DocumentSymbols } from './symbols';
1
2
  import { CompletionEntry } from './completion-items';
2
3
  export type CompletionPlan = {
3
4
  kind: 'none';
@@ -27,6 +28,10 @@ export type CompletionPlan = {
27
28
  } | {
28
29
  kind: 'types';
29
30
  };
30
- export declare function completionEntriesFor(chain: string[]): CompletionEntry[];
31
- export declare function planCompletions(lines: string[], lineIndex: number, textBefore: string): CompletionPlan;
31
+ export interface CompletionScope {
32
+ headers: readonly string[];
33
+ document: readonly string[];
34
+ }
35
+ export declare function completionEntriesFor(chain: string[], where?: CompletionScope): CompletionEntry[];
36
+ export declare function planCompletions(lines: string[], lineIndex: number, textBefore: string, symbols?: DocumentSymbols): CompletionPlan;
32
37
  //# sourceMappingURL=completion-planner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"completion-planner.d.ts","sourceRoot":"","sources":["../completion-planner.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AASrD,MAAM,MAAM,cAAc,GACpB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AW,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GACpB;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,GAC3B;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAKxB,MAAM,WAAW,eAAe;IAC5B,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B;AAkBD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,KAAK,GAAE,eAA+C,GAAG,eAAe,EAAE,CAiG/H;AAID,wBAAgB,eAAe,CAC3B,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,eAAqC,GAC/C,cAAc,CA8FhB"}
@@ -4,4 +4,5 @@ export declare function firstWord(line: string): string;
4
4
  export declare function fenceMap(lines: string[]): boolean[];
5
5
  export declare function enclosingChain(lines: string[], fences: boolean[], lineIndex: number, indent: number): string[];
6
6
  export declare function nearestEnclosingLine(lines: string[], fences: boolean[], lineIndex: number, indent: number): string | undefined;
7
+ export declare function enclosingHeaders(lines: string[], fences: boolean[], lineIndex: number, indent: number): string[];
7
8
  //# sourceMappingURL=document-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"document-context.d.ts","sourceRoot":"","sources":["../document-context.ts"],"names":[],"mappings":"AAKA,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAgBnD;AAED,wBAAgB,QAAQ,CAAC,IAAI,EA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M,EACjB,MAAM,EAAE,MAAM,GACf,MAAM,EAAE,CAcV"}
package/dist/index.d.ts CHANGED
@@ -29,6 +29,7 @@ export type { CompletionPlan } from './completion-planner';
29
29
  export { responseTokens, responseTokenTypes } from './response-tokens';
30
30
  export { responseCompletions } from './response-completions';
31
31
  export { structureCompletion } from './structure-completions';
32
+ export { blockHeaderPattern } from './language';
32
33
  export type { StructureCompletion } from './structure-completions';
33
34
  export { analyzeEventSources, eventSourceAvailability, eventSourceCompletions, eventSourceDetails, eventSourceHover, eventSourceIdentifier, eventSourceReferenceAt } from './event-source-authoring';
34
35
  export type { EventSourceAnalysis } from './EventSourceAnalysis';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,MAAM,EAIT,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,iBAAiB,EAA4B,MAAM,eAAe,CAAC;AA8B5E,wBAAgB,yBAAyB,IAAI,IAAI,CAGhD;AAGD,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AAEvD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,sBAA2B,GAAG,IAAI,CAqDnF;AAED,OAAO,EACH,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,UAAU,EACV,cAAc,EACd,UAAU,GACb,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC/F,YAAY,EACR,iBAAiB,EACjB,WAAW,EACX,qBAAqB,EACrB,qBAAqB,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;A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F,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC3F,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/E,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"inline-completions.d.ts","sourceRoot":"","sources":["../inline-completions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAKvD,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,iBAAiB,GAAG,SAAS,CAAC,yBAAyB,CAa9G"}
1
+ {"version":3,"file":"inline-completions.d.ts","sourceRoot":"","sources":["../inline-completions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAKvD,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,iBAAiB,GAAG,SAAS,CAAC,yBAAyB,CAe9G"}
@@ -12,5 +12,6 @@ export declare const identityProperties: string[];
12
12
  export declare const sliceTypes: string[];
13
13
  export declare const primitiveTypes: string[];
14
14
  export declare const conceptAttributes: string[];
15
+ export declare const blockHeaderPattern: RegExp;
15
16
  export declare const languageConfiguration: languages.LanguageConfiguration;
16
17
  //# sourceMappingURL=language.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../language.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,MAAM,MAAM,GAAG,cAAc,eAAe,CAAC,CAAC;AAEpD,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,eAAO,MAAM,sBAAsB,EAAE,SAAS,CAAC,uBAK9C,CAAC;AAMF,eAAO,MAAM,iBAAiB,UAkC7B,CAAC;AAGF,eAAO,MAAM,oBAAoB,UAAe,CAAC;AAEjD,eAAO,MAAM,cAAc,UAyG1B,CAAC;AAEF,eAAO,MAAM,aAAa,UAAmD,CAAC;AAG9E,eAAO,MAAM,YAAY,UAQxB,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAkC,CAAC;AAIlE,eAAO,MAAM,kBAAkB,UAAmE,CAAC;AAEnG,eAAO,MAAM,UAAU,UAA0D,CAAC;AAElF,eAAO,MAAM,cAAc,UAAmE,CAAC;AAE/F,eAAO,MAAM,iBAAiB,UAAyB,CAAC;AAExD,eAAO,MAAM,qBAAqB,EAAE,SAAS,CAAC,qBA2B7C,CAAC"}
1
+ {"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../language.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,MAAM,MAAM,GAAG,cAAc,eAAe,CAAC,CAAC;AAEpD,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,eAAO,MAAM,sBAAsB,EAAE,SAAS,CAAC,uBAK9C,CAAC;AAMF,eAAO,MAAM,iBAAiB,UAkC7B,CAAC;AAGF,eAAO,MAAM,oBAAoB,UAAe,CAAC;AAEjD,eAAO,MAAM,cAAc,UAyG1B,CAAC;AAEF,eAAO,MAAM,aAAa,UAAmD,CAAC;AAG9E,eAAO,MAAM,YAAY,UAQxB,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAkC,CAAC;AAIlE,eAAO,MAAM,kBAAkB,UAAmE,CAAC;AAEnG,eAAO,MAAM,UAAU,UAA0D,CAAC;AAElF,eAAO,MAAM,cAAc,UAAmE,CAAC;AAE/F,eAAO,MAAM,iBAAiB,UAAyB,CAAC;AAIxD,eAAO,MAAM,kBAAkB,QAA2V,CAAC;AAE3X,eAAO,MAAM,qBAAqB,EAAE,SAAS,CAAC,qBAgC7C,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { CompletionEntry } from './completion-items';
2
+ export declare const moduleScopeItems: CompletionEntry[];
3
+ export declare const featureScopeItems: CompletionEntry[];
4
+ export declare const readModelItems: CompletionEntry[];
5
+ export declare const reducerItems: CompletionEntry[];
6
+ export declare const formItems: CompletionEntry[];
7
+ export declare const contributeItems: CompletionEntry[];
8
+ export declare const behaviorItems: CompletionEntry[];
9
+ export declare const actionStepItems: CompletionEntry[];
10
+ export declare const outcomeItems: CompletionEntry[];
11
+ export declare const personaItems: CompletionEntry[];
12
+ export declare const authenticationItems: CompletionEntry[];
13
+ export declare const seedItems: CompletionEntry[];
14
+ export declare const themeItems: CompletionEntry[];
15
+ export declare const uiProfileItems: CompletionEntry[];
16
+ export declare const layoutItems: CompletionEntry[];
17
+ export declare const templateItems: CompletionEntry[];
18
+ export declare const interactionNames: string[];
19
+ //# sourceMappingURL=scope-items.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope-items.d.ts","sourceRoot":"","sources":["../scope-items.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAS1D,eAAO,MAAM,gBAAgB,EAAE,eAAe,EAW7C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,eAAe,EAW9C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,eAAe,EAI3C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAAe,EAGzC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,eAAe,EAKtC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAAe,EAI5C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,EAK1C,CAAC;AAKF,eAAO,MAAM,eAAe,EAAE,eAAe,EAU5C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAAe,EAIzC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAAe,EAGzC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,eAAe,EAGhD,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,eAAe,EAEtC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,eAAe,EAEvC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,eAAe,EAM3C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,eAAe,EAIxC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,eAAe,EAI1C,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"structure-completions.d.ts","sourceRoot":"","sources":["../structure-completions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAiB,eAAe,EAAkB,MAAM,WAAW,CAAC;AAI3E,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,MAAM,CAAC;CAChB;AAoFD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,mBAAmB,GAAG,IAAI,CAsCnK"}
1
+ {"version":3,"file":"structure-completions.d.ts","sourceRoot":"","sources":["../structure-completions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAiB,eAAe,EAAkB,MAAM,WAAW,CAAC;AAI3E,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,MAAM,CAAC;CAChB;AAuGD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,mBAAmB,GAAG,IAAI,CAuCnK"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/screenplay-language",
3
- "version": "4.75.0",
3
+ "version": "4.76.1",
4
4
  "description": "Monaco language service for the Cratis Screenplay DSL — syntax highlighting, IntelliSense, hover and diagnostics for .play files",
5
5
  "keywords": [
6
6
  "cratis",