0.5.1 • Published 9 months ago
monaco-azure-logic-app-lang v0.5.1
An azure logic app language module for monaco editor.
This is a very early release, do not suggest using it in production till latter its stable version
A simple example explains the purpose of this module:
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
import {
default as AzLogicAppExpressionLang,
IdentifierType,
AzLgcExpDocument,
AzLogicAppExpressionLangMonacoEditor,
ValidateResult
} from 'monaco-azure-logic-app-lang';
import scannerPath from 'monaco-azure-logic-app-lang/scanner/scanner.wasm';
AzLogicAppExpressionLang.scannerOrItsPath = scannerPath;
AzLogicAppExpressionLang.monaco = monaco;
// AzLogicAppExpressionLang.emitBinaryTokens = true;
// AzLogicAppExpressionLang.inSyntaxDebugMode = true;
// AzLogicAppExpressionLang.inSemanticDebugMode = true;
const sampleCodes = "";
export const MONACO_EDITOR_ID = 'first-expression-monaco-editor';
function subscribeCodeDoc(azLgcExpDocument?: AzLgcExpDocument) {
if (azLgcExpDocument) {
(window as any).expCodeDocument = azLgcExpDocument.codeDocument;
(window as any).expCodeDocumentText = azLgcExpDocument.codeDocument.text;
}
}
function subscribeValidateResult(vr?: ValidateResult) {
(window as any).expProblems = vr?.problems || [];
}
export const mount = (root:HTMLDivElement)=> {
const theEditor = new AzLogicAppExpressionLangMonacoEditor(
root,
{
theme: 'hc-black',
contextmenu: false,
value: sampleCodes,
automaticLayout: true,
},
MONACO_EDITOR_ID
)
AzLogicAppExpressionLangMonacoEditor.init.then(()=>{
theEditor.azLgcExpDocEventEmitter?.subscribe(subscribeCodeDoc);
theEditor.validationResultEventEmitter?.subscribe(subscribeValidateResult);
})
}
const rootEle = document.getElementById('root');
if (rootEle){
const expressionEditorEle = document.createElement('div');
expressionEditorEle.id = EXPRESSION_MONACO_EDITOR_ID
expressionEditorEle.style.height = '100vh';
expressionEditorEle.style.width = '100vw';
rootEle.appendChild(expressionEditorEle);
mount(expressionEditorEle);
}
0.5.0
9 months ago
0.5.1
9 months ago
0.4.0
2 years ago
0.3.0
2 years ago
0.2.8
2 years ago
0.3.2
2 years ago
0.3.1
2 years ago
0.3.3
2 years ago
0.2.7
3 years ago
0.2.6
3 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.2.3
3 years ago
0.2.2
3 years ago
0.2.5
3 years ago
0.2.4
3 years ago
0.1.7
3 years ago
0.1.6
3 years ago
0.1.5
3 years ago
0.1.4
3 years ago
0.1.0
4 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.3
3 years ago
0.0.10
4 years ago
0.0.11
4 years ago
0.0.12
4 years ago
0.0.13
4 years ago
0.0.14
4 years ago
0.0.9
4 years ago
0.0.7
4 years ago
0.0.5
4 years ago
0.0.4
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago