├── .gitignore ├── LICENSE ├── README.md ├── docs ├── CNAME ├── app.ffeca56519d72facd542.css ├── app.ffeca56519d72facd542.js ├── app.ffeca56519d72facd542.js.map ├── figma.d.ts ├── icon.png ├── index.html ├── jsdom.html ├── lib.dom.d.ts ├── lib.webworker.d.ts ├── monaco-0.20.0 │ ├── editor.worker.js │ ├── monaco.css │ ├── monaco.js │ └── ts.worker.js ├── res │ ├── JetBrainsMono-Bold-Italic.woff2 │ ├── JetBrainsMono-Bold.woff2 │ ├── JetBrainsMono-Italic.woff2 │ ├── JetBrainsMono-Medium-Italic.woff2 │ ├── JetBrainsMono-Medium.woff2 │ ├── JetBrainsMono-Regular.woff2 │ ├── iaw-mono-Bold.woff │ ├── iaw-mono-Bold.woff2 │ ├── iaw-mono-BoldItalic.woff │ ├── iaw-mono-BoldItalic.woff2 │ ├── iaw-mono-Italic.woff │ ├── iaw-mono-Italic.woff2 │ ├── iaw-mono-Regular.woff │ ├── iaw-mono-Regular.woff2 │ ├── iaw-mono-vf-Italic.woff2 │ ├── iaw-mono-vf.woff2 │ ├── iaw-quattro-Bold.woff │ ├── iaw-quattro-Bold.woff2 │ ├── iaw-quattro-BoldItalic.woff │ ├── iaw-quattro-BoldItalic.woff2 │ ├── iaw-quattro-Italic.woff │ ├── iaw-quattro-Italic.woff2 │ ├── iaw-quattro-Regular.woff │ ├── iaw-quattro-Regular.woff2 │ ├── iaw-quattro-vf-Italic.woff2 │ ├── iaw-quattro-vf.woff2 │ ├── iaw.css │ └── jbmono.css ├── resources.ffeca56519d72facd542.js ├── resources.ffeca56519d72facd542.js.map ├── sample │ ├── colors.jpg │ ├── flare-2.json │ ├── old-faithful.json │ └── old-faithful.tsv ├── scripter-env.d.ts ├── source-map-0.7.3-mappings.wasm └── zip │ ├── index.html │ ├── jszip.min.js │ └── worker.js ├── misc ├── build-app.pre.sh ├── build-app.sh ├── build-deps.sh ├── build-dom.d.ts.sh ├── build-jsdom.sh ├── build-monaco.sh ├── build-plugin.sh ├── build-scriptenv.js ├── build-tslibs.js ├── build-worker-template.js ├── dev.sh ├── dist.sh ├── figma-extras.d.ts ├── file-types.txt ├── gen-datatype-btree.js ├── livereload.min.js ├── optimize-resources.sh ├── patch-monaco-editor.js ├── serve.js ├── update-figma-type-defs.sh ├── update-monaco.sh └── util.sh ├── package-lock.json ├── package.json └── src ├── app ├── app.css ├── app.ts ├── base62.ts ├── config.ts ├── data.ts ├── dom.ts ├── editor-themes.ts ├── editor.ts ├── eval.ts ├── event.ts ├── example-scripts.ts ├── figma-plugin-bridge.ts ├── figma.d.ts ├── file.ts ├── global.d.ts ├── guid.ts ├── history.ts ├── icon-add.svg ├── icon-clear.svg ├── icon-clock.svg ├── icon-delay.svg ├── icon-error.svg ├── icon-history-back.svg ├── icon-history-forward.svg ├── icon-menu.svg ├── icon-play.svg ├── icon-save.svg ├── icon-saved.svg ├── icon-stop.svg ├── icon-success.svg ├── icon-text-size.svg ├── icon-win-close.svg ├── icon-window.svg ├── index.html ├── menu.tsx ├── progress-spinner.svg ├── resources.ts ├── runqueue.ts ├── saved-scripts.ts ├── script-data.ts ├── script-export.ts ├── script.ts ├── squiggly-line.svg ├── srcpos.ts ├── toolbar.ts ├── tsconfig.json ├── tslibs.ts ├── ui-input.ts ├── ui-range.ts ├── uiresponder.ts ├── uiwindow.ts ├── utf8.ts ├── util.ts ├── viewzone.ts ├── viewzones.ts ├── warning-message.ts ├── webpack.config.js ├── worker-frame-template.js ├── worker-template.js ├── worker-template.ts ├── xdb.ts ├── xdb_test.ts └── zip.ts ├── common ├── base64.ts ├── btree.ts ├── filetype.ts ├── fmtval.ts ├── gif.ts ├── jpeg.ts ├── lazyseq.ts ├── marker-props.ts ├── messages.ts ├── path.ts ├── png.ts ├── scripter-env.d.ts ├── scripter-env.js ├── typed-array.ts └── windowsize.ts ├── figma-plugin ├── constants.ts ├── evalscript.d.ts ├── fetch.ts ├── figma.d.ts ├── figplug.d.ts ├── figutil.ts ├── manifest.json ├── plugin.ts ├── rpc.ts ├── saved-scripts.ts ├── script-lib-animate.ts ├── script-lib-dom.ts ├── script-lib-geometry.ts ├── script-lib-json.ts ├── script-lib-misc.ts ├── script-lib-runtime.ts ├── script-lib-ui.ts ├── script-lib-vars.ts ├── script-lib-vectornetwork.ts ├── script-lib-viewport.ts ├── script-lib-worker.ts ├── script-lib.ts ├── scriptenv.d.ts ├── scriptnode.ts ├── tsconfig.json ├── ui.html ├── ui.ts ├── utf8.ts ├── util.ts └── visit.ts ├── misc ├── source-map.d.ts └── source-map.js └── monaco ├── monaco-editor ├── LICENSE ├── README.md ├── ThirdPartyNotices.txt ├── esm │ └── vs │ │ ├── base │ │ ├── browser │ │ │ ├── browser.js │ │ │ ├── canIUse.js │ │ │ ├── contextmenu.js │ │ │ ├── dnd.js │ │ │ ├── dom.js │ │ │ ├── event.js │ │ │ ├── fastDomNode.js │ │ │ ├── formattedTextRenderer.js │ │ │ ├── globalMouseMoveMonitor.js │ │ │ ├── history.js │ │ │ ├── iframe.js │ │ │ ├── keyboardEvent.js │ │ │ ├── markdownRenderer.js │ │ │ ├── mouseEvent.js │ │ │ ├── touch.js │ │ │ └── ui │ │ │ │ ├── actionbar │ │ │ │ ├── actionbar.css │ │ │ │ └── actionbar.js │ │ │ │ ├── aria │ │ │ │ ├── aria.css │ │ │ │ └── aria.js │ │ │ │ ├── checkbox │ │ │ │ ├── checkbox.css │ │ │ │ └── checkbox.js │ │ │ │ ├── codiconLabel │ │ │ │ ├── codicon │ │ │ │ │ ├── codicon-animations.css │ │ │ │ │ ├── codicon.css │ │ │ │ │ └── codicon.ttf │ │ │ │ └── codiconLabel.js │ │ │ │ ├── contextview │ │ │ │ ├── contextview.css │ │ │ │ └── contextview.js │ │ │ │ ├── countBadge │ │ │ │ ├── countBadge.css │ │ │ │ └── countBadge.js │ │ │ │ ├── findinput │ │ │ │ ├── findInput.css │ │ │ │ ├── findInput.js │ │ │ │ ├── findInputCheckboxes.js │ │ │ │ └── replaceInput.js │ │ │ │ ├── highlightedlabel │ │ │ │ └── highlightedLabel.js │ │ │ │ ├── iconLabel │ │ │ │ ├── iconLabel.js │ │ │ │ └── iconlabel.css │ │ │ │ ├── inputbox │ │ │ │ ├── inputBox.css │ │ │ │ └── inputBox.js │ │ │ │ ├── keybindingLabel │ │ │ │ ├── keybindingLabel.css │ │ │ │ └── keybindingLabel.js │ │ │ │ ├── list │ │ │ │ ├── list.css │ │ │ │ ├── list.js │ │ │ │ ├── listPaging.js │ │ │ │ ├── listView.js │ │ │ │ ├── listWidget.js │ │ │ │ ├── rangeMap.js │ │ │ │ ├── rowCache.js │ │ │ │ └── splice.js │ │ │ │ ├── menu │ │ │ │ ├── menu.css │ │ │ │ └── menu.js │ │ │ │ ├── progressbar │ │ │ │ ├── progressbar.css │ │ │ │ └── progressbar.js │ │ │ │ ├── sash │ │ │ │ ├── sash.css │ │ │ │ └── sash.js │ │ │ │ ├── scrollbar │ │ │ │ ├── abstractScrollbar.js │ │ │ │ ├── horizontalScrollbar.js │ │ │ │ ├── media │ │ │ │ │ └── scrollbars.css │ │ │ │ ├── scrollableElement.js │ │ │ │ ├── scrollableElementOptions.js │ │ │ │ ├── scrollbarArrow.js │ │ │ │ ├── scrollbarState.js │ │ │ │ ├── scrollbarVisibilityController.js │ │ │ │ └── verticalScrollbar.js │ │ │ │ ├── splitview │ │ │ │ ├── splitview.css │ │ │ │ └── splitview.js │ │ │ │ ├── tree │ │ │ │ ├── abstractTree.js │ │ │ │ ├── asyncDataTree.js │ │ │ │ ├── compressedObjectTreeModel.js │ │ │ │ ├── dataTree.js │ │ │ │ ├── indexTreeModel.js │ │ │ │ ├── media │ │ │ │ │ └── tree.css │ │ │ │ ├── objectTree.js │ │ │ │ ├── objectTreeModel.js │ │ │ │ └── tree.js │ │ │ │ └── widget.js │ │ ├── common │ │ │ ├── actions.js │ │ │ ├── arrays.js │ │ │ ├── assert.js │ │ │ ├── async.js │ │ │ ├── cancellation.js │ │ │ ├── charCode.js │ │ │ ├── codicons.js │ │ │ ├── collections.js │ │ │ ├── color.js │ │ │ ├── decorators.js │ │ │ ├── diff │ │ │ │ ├── diff.js │ │ │ │ └── diffChange.js │ │ │ ├── errors.js │ │ │ ├── event.js │ │ │ ├── extpath.js │ │ │ ├── filters.js │ │ │ ├── functional.js │ │ │ ├── glob.js │ │ │ ├── hash.js │ │ │ ├── history.js │ │ │ ├── htmlContent.js │ │ │ ├── idGenerator.js │ │ │ ├── insane │ │ │ │ └── insane.js │ │ │ ├── iterator.js │ │ │ ├── jsonSchema.js │ │ │ ├── keyCodes.js │ │ │ ├── keybindingLabels.js │ │ │ ├── labels.js │ │ │ ├── lazy.js │ │ │ ├── lifecycle.js │ │ │ ├── linkedList.js │ │ │ ├── map.js │ │ │ ├── marked │ │ │ │ └── marked.js │ │ │ ├── marshalling.js │ │ │ ├── mime.js │ │ │ ├── network.js │ │ │ ├── numbers.js │ │ │ ├── objects.js │ │ │ ├── paging.js │ │ │ ├── path.js │ │ │ ├── platform.js │ │ │ ├── process.js │ │ │ ├── range.js │ │ │ ├── resources.js │ │ │ ├── scrollable.js │ │ │ ├── search.js │ │ │ ├── sequence.js │ │ │ ├── severity.js │ │ │ ├── stopwatch.js │ │ │ ├── strings.js │ │ │ ├── styler.js │ │ │ ├── types.js │ │ │ ├── uint.js │ │ │ ├── uri.js │ │ │ └── worker │ │ │ │ └── simpleWorker.js │ │ ├── parts │ │ │ ├── quickopen │ │ │ │ ├── browser │ │ │ │ │ ├── quickOpenModel.js │ │ │ │ │ ├── quickOpenViewer.js │ │ │ │ │ ├── quickOpenWidget.js │ │ │ │ │ └── quickopen.css │ │ │ │ └── common │ │ │ │ │ └── quickOpen.js │ │ │ └── tree │ │ │ │ └── browser │ │ │ │ ├── tree.css │ │ │ │ ├── tree.js │ │ │ │ ├── treeDefaults.js │ │ │ │ ├── treeDnd.js │ │ │ │ ├── treeImpl.js │ │ │ │ ├── treeModel.js │ │ │ │ ├── treeView.js │ │ │ │ └── treeViewModel.js │ │ └── worker │ │ │ └── defaultWorkerFactory.js │ │ ├── basic-languages │ │ ├── _.contribution.js │ │ ├── monaco.contribution.js │ │ └── typescript │ │ │ ├── typescript.contribution.js │ │ │ └── typescript.js │ │ ├── editor │ │ ├── browser │ │ │ ├── config │ │ │ │ ├── charWidthReader.js │ │ │ │ ├── configuration.js │ │ │ │ └── elementSizeObserver.js │ │ │ ├── controller │ │ │ │ ├── coreCommands.js │ │ │ │ ├── mouseHandler.js │ │ │ │ ├── mouseTarget.js │ │ │ │ ├── pointerHandler.js │ │ │ │ ├── textAreaHandler.css │ │ │ │ ├── textAreaHandler.js │ │ │ │ ├── textAreaInput.js │ │ │ │ └── textAreaState.js │ │ │ ├── core │ │ │ │ ├── editorState.js │ │ │ │ └── keybindingCancellation.js │ │ │ ├── editorBrowser.js │ │ │ ├── editorDom.js │ │ │ ├── editorExtensions.js │ │ │ ├── services │ │ │ │ ├── abstractCodeEditorService.js │ │ │ │ ├── bulkEditService.js │ │ │ │ ├── codeEditorService.js │ │ │ │ ├── codeEditorServiceImpl.js │ │ │ │ └── openerService.js │ │ │ ├── view │ │ │ │ ├── domLineBreaksComputer.js │ │ │ │ ├── dynamicViewOverlay.js │ │ │ │ ├── viewController.js │ │ │ │ ├── viewImpl.js │ │ │ │ ├── viewLayer.js │ │ │ │ ├── viewOutgoingEvents.js │ │ │ │ ├── viewOverlays.js │ │ │ │ └── viewPart.js │ │ │ ├── viewParts │ │ │ │ ├── contentWidgets │ │ │ │ │ └── contentWidgets.js │ │ │ │ ├── currentLineHighlight │ │ │ │ │ ├── currentLineHighlight.css │ │ │ │ │ └── currentLineHighlight.js │ │ │ │ ├── decorations │ │ │ │ │ ├── decorations.css │ │ │ │ │ └── decorations.js │ │ │ │ ├── editorScrollbar │ │ │ │ │ └── editorScrollbar.js │ │ │ │ ├── glyphMargin │ │ │ │ │ ├── glyphMargin.css │ │ │ │ │ └── glyphMargin.js │ │ │ │ ├── indentGuides │ │ │ │ │ ├── indentGuides.css │ │ │ │ │ └── indentGuides.js │ │ │ │ ├── lineNumbers │ │ │ │ │ ├── lineNumbers.css │ │ │ │ │ └── lineNumbers.js │ │ │ │ ├── lines │ │ │ │ │ ├── rangeUtil.js │ │ │ │ │ ├── viewLine.js │ │ │ │ │ ├── viewLines.css │ │ │ │ │ └── viewLines.js │ │ │ │ ├── linesDecorations │ │ │ │ │ ├── linesDecorations.css │ │ │ │ │ └── linesDecorations.js │ │ │ │ ├── margin │ │ │ │ │ └── margin.js │ │ │ │ ├── marginDecorations │ │ │ │ │ ├── marginDecorations.css │ │ │ │ │ └── marginDecorations.js │ │ │ │ ├── minimap │ │ │ │ │ ├── minimap.css │ │ │ │ │ ├── minimap.js │ │ │ │ │ ├── minimapCharRenderer.js │ │ │ │ │ ├── minimapCharRendererFactory.js │ │ │ │ │ ├── minimapCharSheet.js │ │ │ │ │ └── minimapPreBaked.js │ │ │ │ ├── overlayWidgets │ │ │ │ │ ├── overlayWidgets.css │ │ │ │ │ └── overlayWidgets.js │ │ │ │ ├── overviewRuler │ │ │ │ │ ├── decorationsOverviewRuler.js │ │ │ │ │ └── overviewRuler.js │ │ │ │ ├── rulers │ │ │ │ │ ├── rulers.css │ │ │ │ │ └── rulers.js │ │ │ │ ├── scrollDecoration │ │ │ │ │ ├── scrollDecoration.css │ │ │ │ │ └── scrollDecoration.js │ │ │ │ ├── selections │ │ │ │ │ ├── selections.css │ │ │ │ │ └── selections.js │ │ │ │ ├── viewCursors │ │ │ │ │ ├── viewCursor.js │ │ │ │ │ ├── viewCursors.css │ │ │ │ │ └── viewCursors.js │ │ │ │ └── viewZones │ │ │ │ │ └── viewZones.js │ │ │ └── widget │ │ │ │ ├── codeEditorWidget.js │ │ │ │ ├── diffEditorWidget.js │ │ │ │ ├── diffNavigator.js │ │ │ │ ├── diffReview.js │ │ │ │ ├── embeddedCodeEditorWidget.js │ │ │ │ ├── inlineDiffMargin.js │ │ │ │ └── media │ │ │ │ ├── diffEditor.css │ │ │ │ ├── diffReview.css │ │ │ │ └── editor.css │ │ ├── common │ │ │ ├── commands │ │ │ │ ├── replaceCommand.js │ │ │ │ ├── shiftCommand.js │ │ │ │ ├── surroundSelectionCommand.js │ │ │ │ └── trimTrailingWhitespaceCommand.js │ │ │ ├── config │ │ │ │ ├── commonEditorConfig.js │ │ │ │ ├── editorOptions.js │ │ │ │ ├── editorZoom.js │ │ │ │ └── fontInfo.js │ │ │ ├── controller │ │ │ │ ├── cursor.js │ │ │ │ ├── cursorCollection.js │ │ │ │ ├── cursorColumnSelection.js │ │ │ │ ├── cursorCommon.js │ │ │ │ ├── cursorDeleteOperations.js │ │ │ │ ├── cursorEvents.js │ │ │ │ ├── cursorMoveCommands.js │ │ │ │ ├── cursorMoveOperations.js │ │ │ │ ├── cursorTypeOperations.js │ │ │ │ ├── cursorWordOperations.js │ │ │ │ ├── oneCursor.js │ │ │ │ └── wordCharacterClassifier.js │ │ │ ├── core │ │ │ │ ├── characterClassifier.js │ │ │ │ ├── editOperation.js │ │ │ │ ├── lineTokens.js │ │ │ │ ├── position.js │ │ │ │ ├── range.js │ │ │ │ ├── rgba.js │ │ │ │ ├── selection.js │ │ │ │ ├── stringBuilder.js │ │ │ │ └── token.js │ │ │ ├── diff │ │ │ │ └── diffComputer.js │ │ │ ├── editorAction.js │ │ │ ├── editorCommon.js │ │ │ ├── editorContextKeys.js │ │ │ ├── model.js │ │ │ ├── model │ │ │ │ ├── editStack.js │ │ │ │ ├── indentationGuesser.js │ │ │ │ ├── intervalTree.js │ │ │ │ ├── mirrorTextModel.js │ │ │ │ ├── pieceTreeTextBuffer │ │ │ │ │ ├── pieceTreeBase.js │ │ │ │ │ ├── pieceTreeTextBuffer.js │ │ │ │ │ ├── pieceTreeTextBufferBuilder.js │ │ │ │ │ └── rbTreeBase.js │ │ │ │ ├── textModel.js │ │ │ │ ├── textModelEvents.js │ │ │ │ ├── textModelSearch.js │ │ │ │ ├── textModelTokens.js │ │ │ │ ├── tokensStore.js │ │ │ │ └── wordHelper.js │ │ │ ├── modes.js │ │ │ ├── modes │ │ │ │ ├── abstractMode.js │ │ │ │ ├── languageConfiguration.js │ │ │ │ ├── languageConfigurationRegistry.js │ │ │ │ ├── languageFeatureRegistry.js │ │ │ │ ├── languageSelector.js │ │ │ │ ├── linkComputer.js │ │ │ │ ├── modesRegistry.js │ │ │ │ ├── nullMode.js │ │ │ │ ├── supports.js │ │ │ │ ├── supports │ │ │ │ │ ├── characterPair.js │ │ │ │ │ ├── electricCharacter.js │ │ │ │ │ ├── indentRules.js │ │ │ │ │ ├── inplaceReplaceSupport.js │ │ │ │ │ ├── onEnter.js │ │ │ │ │ ├── richEditBrackets.js │ │ │ │ │ └── tokenization.js │ │ │ │ ├── textToHtmlTokenizer.js │ │ │ │ └── tokenizationRegistry.js │ │ │ ├── services │ │ │ │ ├── editorSimpleWorker.js │ │ │ │ ├── editorWorkerService.js │ │ │ │ ├── editorWorkerServiceImpl.js │ │ │ │ ├── getIconClasses.js │ │ │ │ ├── languagesRegistry.js │ │ │ │ ├── markerDecorationsServiceImpl.js │ │ │ │ ├── markersDecorationService.js │ │ │ │ ├── modeService.js │ │ │ │ ├── modeServiceImpl.js │ │ │ │ ├── modelService.js │ │ │ │ ├── modelServiceImpl.js │ │ │ │ ├── resolverService.js │ │ │ │ ├── textResourceConfigurationService.js │ │ │ │ └── webWorker.js │ │ │ ├── standalone │ │ │ │ ├── promise-polyfill │ │ │ │ │ └── polyfill.js │ │ │ │ ├── standaloneBase.js │ │ │ │ └── standaloneEnums.js │ │ │ ├── standaloneStrings.js │ │ │ ├── view │ │ │ │ ├── editorColorRegistry.js │ │ │ │ ├── overviewZoneManager.js │ │ │ │ ├── renderingContext.js │ │ │ │ ├── viewContext.js │ │ │ │ ├── viewEventDispatcher.js │ │ │ │ └── viewEvents.js │ │ │ ├── viewLayout │ │ │ │ ├── lineDecorations.js │ │ │ │ ├── linesLayout.js │ │ │ │ ├── viewLayout.js │ │ │ │ ├── viewLineRenderer.js │ │ │ │ └── viewLinesViewportData.js │ │ │ └── viewModel │ │ │ │ ├── minimapTokensColorTracker.js │ │ │ │ ├── monospaceLineBreaksComputer.js │ │ │ │ ├── prefixSumComputer.js │ │ │ │ ├── splitLinesCollection.js │ │ │ │ ├── viewEventHandler.js │ │ │ │ ├── viewModel.js │ │ │ │ ├── viewModelDecorations.js │ │ │ │ └── viewModelImpl.js │ │ ├── contrib │ │ │ ├── bracketMatching │ │ │ │ ├── bracketMatching.css │ │ │ │ └── bracketMatching.js │ │ │ ├── caretOperations │ │ │ │ ├── caretOperations.js │ │ │ │ ├── moveCaretCommand.js │ │ │ │ └── transpose.js │ │ │ ├── clipboard │ │ │ │ ├── clipboard.css │ │ │ │ └── clipboard.js │ │ │ ├── codeAction │ │ │ │ ├── codeAction.js │ │ │ │ ├── codeActionCommands.js │ │ │ │ ├── codeActionContributions.js │ │ │ │ ├── codeActionMenu.js │ │ │ │ ├── codeActionModel.js │ │ │ │ ├── codeActionUi.js │ │ │ │ ├── lightBulbWidget.css │ │ │ │ ├── lightBulbWidget.js │ │ │ │ └── types.js │ │ │ ├── codelens │ │ │ │ ├── codeLensCache.js │ │ │ │ ├── codelens.js │ │ │ │ ├── codelensController.js │ │ │ │ ├── codelensWidget.css │ │ │ │ └── codelensWidget.js │ │ │ ├── colorPicker │ │ │ │ ├── color.js │ │ │ │ ├── colorDetector.js │ │ │ │ ├── colorPicker.css │ │ │ │ ├── colorPickerModel.js │ │ │ │ └── colorPickerWidget.js │ │ │ ├── comment │ │ │ │ ├── blockCommentCommand.js │ │ │ │ ├── comment.js │ │ │ │ └── lineCommentCommand.js │ │ │ ├── contextmenu │ │ │ │ └── contextmenu.js │ │ │ ├── cursorUndo │ │ │ │ └── cursorUndo.js │ │ │ ├── dnd │ │ │ │ ├── dnd.css │ │ │ │ ├── dnd.js │ │ │ │ └── dragAndDropCommand.js │ │ │ ├── documentSymbols │ │ │ │ ├── media │ │ │ │ │ ├── outlineTree.css │ │ │ │ │ └── symbol-icons.css │ │ │ │ ├── outlineModel.js │ │ │ │ └── outlineTree.js │ │ │ ├── find │ │ │ │ ├── findController.js │ │ │ │ ├── findDecorations.js │ │ │ │ ├── findModel.js │ │ │ │ ├── findOptionsWidget.js │ │ │ │ ├── findState.js │ │ │ │ ├── findWidget.css │ │ │ │ ├── findWidget.js │ │ │ │ ├── replaceAllCommand.js │ │ │ │ └── replacePattern.js │ │ │ ├── folding │ │ │ │ ├── folding.css │ │ │ │ ├── folding.js │ │ │ │ ├── foldingDecorations.js │ │ │ │ ├── foldingModel.js │ │ │ │ ├── foldingRanges.js │ │ │ │ ├── hiddenRangeModel.js │ │ │ │ ├── indentRangeProvider.js │ │ │ │ ├── intializingRangeProvider.js │ │ │ │ └── syntaxRangeProvider.js │ │ │ ├── fontZoom │ │ │ │ └── fontZoom.js │ │ │ ├── format │ │ │ │ ├── format.js │ │ │ │ ├── formatActions.js │ │ │ │ └── formattingEdit.js │ │ │ ├── gotoError │ │ │ │ ├── gotoError.js │ │ │ │ ├── gotoErrorWidget.js │ │ │ │ └── media │ │ │ │ │ └── gotoErrorWidget.css │ │ │ ├── gotoSymbol │ │ │ │ ├── goToCommands.js │ │ │ │ ├── goToSymbol.js │ │ │ │ ├── link │ │ │ │ │ ├── clickLinkGesture.js │ │ │ │ │ ├── goToDefinitionAtPosition.css │ │ │ │ │ └── goToDefinitionAtPosition.js │ │ │ │ ├── peek │ │ │ │ │ ├── referencesController.js │ │ │ │ │ ├── referencesTree.js │ │ │ │ │ ├── referencesWidget.css │ │ │ │ │ └── referencesWidget.js │ │ │ │ ├── referencesModel.js │ │ │ │ └── symbolNavigation.js │ │ │ ├── hover │ │ │ │ ├── getHover.js │ │ │ │ ├── hover.css │ │ │ │ ├── hover.js │ │ │ │ ├── hoverOperation.js │ │ │ │ ├── hoverWidgets.js │ │ │ │ ├── modesContentHover.js │ │ │ │ └── modesGlyphHover.js │ │ │ ├── inPlaceReplace │ │ │ │ ├── inPlaceReplace.js │ │ │ │ └── inPlaceReplaceCommand.js │ │ │ ├── indentation │ │ │ │ └── indentUtils.js │ │ │ ├── linesOperations │ │ │ │ ├── copyLinesCommand.js │ │ │ │ ├── linesOperations.js │ │ │ │ ├── moveLinesCommand.js │ │ │ │ └── sortLinesCommand.js │ │ │ ├── links │ │ │ │ ├── getLinks.js │ │ │ │ ├── links.css │ │ │ │ └── links.js │ │ │ ├── markdown │ │ │ │ └── markdownRenderer.js │ │ │ ├── message │ │ │ │ ├── messageController.css │ │ │ │ └── messageController.js │ │ │ ├── multicursor │ │ │ │ └── multicursor.js │ │ │ ├── parameterHints │ │ │ │ ├── parameterHints.css │ │ │ │ ├── parameterHints.js │ │ │ │ ├── parameterHintsModel.js │ │ │ │ ├── parameterHintsWidget.js │ │ │ │ └── provideSignatureHelp.js │ │ │ ├── peekView │ │ │ │ ├── media │ │ │ │ │ └── peekViewWidget.css │ │ │ │ └── peekView.js │ │ │ ├── quickOpen │ │ │ │ └── quickOpen.js │ │ │ ├── rename │ │ │ │ ├── rename.js │ │ │ │ ├── renameInputField.css │ │ │ │ └── renameInputField.js │ │ │ ├── smartSelect │ │ │ │ ├── bracketSelections.js │ │ │ │ ├── smartSelect.js │ │ │ │ └── wordSelections.js │ │ │ ├── snippet │ │ │ │ ├── snippetController2.js │ │ │ │ ├── snippetParser.js │ │ │ │ ├── snippetSession.css │ │ │ │ ├── snippetSession.js │ │ │ │ └── snippetVariables.js │ │ │ ├── suggest │ │ │ │ ├── completionModel.js │ │ │ │ ├── media │ │ │ │ │ ├── suggest.css │ │ │ │ │ └── suggestStatusBar.css │ │ │ │ ├── suggest.js │ │ │ │ ├── suggestAlternatives.js │ │ │ │ ├── suggestCommitCharacters.js │ │ │ │ ├── suggestController.js │ │ │ │ ├── suggestMemory.js │ │ │ │ ├── suggestModel.js │ │ │ │ ├── suggestRangeHighlighter.js │ │ │ │ ├── suggestWidget.js │ │ │ │ ├── wordContextKey.js │ │ │ │ └── wordDistance.js │ │ │ ├── toggleTabFocusMode │ │ │ │ └── toggleTabFocusMode.js │ │ │ ├── tokenization │ │ │ │ └── tokenization.js │ │ │ ├── wordHighlighter │ │ │ │ └── wordHighlighter.js │ │ │ ├── wordOperations │ │ │ │ └── wordOperations.js │ │ │ ├── wordPartOperations │ │ │ │ └── wordPartOperations.js │ │ │ └── zoneWidget │ │ │ │ ├── zoneWidget.css │ │ │ │ └── zoneWidget.js │ │ ├── edcore.main.js │ │ ├── editor.all.js │ │ ├── editor.api.d.ts │ │ ├── editor.api.js │ │ ├── editor.main.js │ │ ├── editor.worker.js │ │ ├── scripter.js │ │ └── standalone │ │ │ ├── browser │ │ │ ├── accessibilityHelp │ │ │ │ ├── accessibilityHelp.css │ │ │ │ └── accessibilityHelp.js │ │ │ ├── colorizer.js │ │ │ ├── iPadShowKeyboard │ │ │ │ ├── iPadShowKeyboard.css │ │ │ │ └── iPadShowKeyboard.js │ │ │ ├── inspectTokens │ │ │ │ ├── inspectTokens.css │ │ │ │ └── inspectTokens.js │ │ │ ├── quickOpen │ │ │ │ ├── editorQuickOpen.css │ │ │ │ ├── editorQuickOpen.js │ │ │ │ ├── gotoLine.css │ │ │ │ ├── gotoLine.js │ │ │ │ ├── quickCommand.js │ │ │ │ ├── quickOpenEditorWidget.js │ │ │ │ ├── quickOutline.css │ │ │ │ └── quickOutline.js │ │ │ ├── referenceSearch │ │ │ │ └── standaloneReferenceSearch.js │ │ │ ├── simpleServices.js │ │ │ ├── standalone-tokens.css │ │ │ ├── standaloneCodeEditor.js │ │ │ ├── standaloneCodeServiceImpl.js │ │ │ ├── standaloneEditor.js │ │ │ ├── standaloneLanguages.js │ │ │ ├── standaloneServices.js │ │ │ ├── standaloneThemeServiceImpl.js │ │ │ └── toggleHighContrast │ │ │ │ └── toggleHighContrast.js │ │ │ └── common │ │ │ ├── monarch │ │ │ ├── monarchCommon.js │ │ │ ├── monarchCompile.js │ │ │ ├── monarchLexer.js │ │ │ └── monarchTypes.js │ │ │ ├── standaloneThemeService.js │ │ │ └── themes.js │ │ ├── language │ │ ├── css │ │ │ └── monaco.contribution.js │ │ ├── html │ │ │ └── monaco.contribution.js │ │ ├── json │ │ │ └── monaco.contribution.js │ │ └── typescript │ │ │ ├── languageFeatures.js │ │ │ ├── lib │ │ │ ├── lib.js │ │ │ ├── scripter.js │ │ │ ├── typescriptServices.js │ │ │ └── typescriptServicesMetadata.js │ │ │ ├── monaco.contribution.js │ │ │ ├── ts.worker.js │ │ │ ├── tsMode.js │ │ │ ├── tsWorker.js │ │ │ └── workerManager.js │ │ ├── nls.js │ │ └── platform │ │ ├── accessibility │ │ └── common │ │ │ ├── accessibility.js │ │ │ └── accessibilityService.js │ │ ├── actions │ │ └── common │ │ │ ├── actions.js │ │ │ └── menuService.js │ │ ├── browser │ │ └── contextScopedHistoryWidget.js │ │ ├── clipboard │ │ └── common │ │ │ └── clipboardService.js │ │ ├── commands │ │ └── common │ │ │ └── commands.js │ │ ├── configuration │ │ └── common │ │ │ ├── configuration.js │ │ │ ├── configurationModels.js │ │ │ └── configurationRegistry.js │ │ ├── contextkey │ │ ├── browser │ │ │ └── contextKeyService.js │ │ └── common │ │ │ ├── contextkey.js │ │ │ └── contextkeys.js │ │ ├── contextview │ │ └── browser │ │ │ ├── contextMenuHandler.css │ │ │ ├── contextMenuHandler.js │ │ │ ├── contextMenuService.js │ │ │ ├── contextView.js │ │ │ └── contextViewService.js │ │ ├── dialogs │ │ └── common │ │ │ └── dialogs.js │ │ ├── editor │ │ └── common │ │ │ └── editor.js │ │ ├── environment │ │ └── common │ │ │ └── environment.js │ │ ├── extensions │ │ └── common │ │ │ └── extensions.js │ │ ├── files │ │ └── common │ │ │ └── files.js │ │ ├── instantiation │ │ └── common │ │ │ ├── descriptors.js │ │ │ ├── extensions.js │ │ │ ├── graph.js │ │ │ ├── instantiation.js │ │ │ ├── instantiationService.js │ │ │ └── serviceCollection.js │ │ ├── jsonschemas │ │ └── common │ │ │ └── jsonContributionRegistry.js │ │ ├── keybinding │ │ └── common │ │ │ ├── abstractKeybindingService.js │ │ │ ├── baseResolvedKeybinding.js │ │ │ ├── keybinding.js │ │ │ ├── keybindingResolver.js │ │ │ ├── keybindingsRegistry.js │ │ │ ├── resolvedKeybindingItem.js │ │ │ └── usLayoutResolvedKeybinding.js │ │ ├── label │ │ └── common │ │ │ └── label.js │ │ ├── layout │ │ └── browser │ │ │ └── layoutService.js │ │ ├── list │ │ └── browser │ │ │ └── listService.js │ │ ├── log │ │ └── common │ │ │ └── log.js │ │ ├── markers │ │ └── common │ │ │ ├── markerService.js │ │ │ └── markers.js │ │ ├── notification │ │ └── common │ │ │ └── notification.js │ │ ├── opener │ │ └── common │ │ │ └── opener.js │ │ ├── progress │ │ └── common │ │ │ └── progress.js │ │ ├── registry │ │ └── common │ │ │ └── platform.js │ │ ├── severityIcon │ │ └── common │ │ │ └── severityIcon.js │ │ ├── storage │ │ └── common │ │ │ └── storage.js │ │ ├── telemetry │ │ └── common │ │ │ ├── gdprTypings.js │ │ │ └── telemetry.js │ │ ├── theme │ │ └── common │ │ │ ├── colorRegistry.js │ │ │ ├── styler.js │ │ │ └── themeService.js │ │ ├── workspace │ │ └── common │ │ │ └── workspace.js │ │ └── workspaces │ │ └── common │ │ └── workspaces.js └── package.json ├── monaco.d.ts ├── monaco.js ├── scripter.js └── webpack.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /dist 3 | /_* 4 | node_modules 5 | .DS_Store 6 | .vscode 7 | *~ 8 | *.sublime* 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 Rasmus Andersson 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /docs/CNAME: -------------------------------------------------------------------------------- 1 | scripter.rsms.me -------------------------------------------------------------------------------- /docs/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/icon.png -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 |
17 |
18 |
19 |

Warning message

20 |
21 |
22 |
23 | 24 |
26 |
28 |
29 |
30 |
31 | 32 | 33 | 34 |
35 |
36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /docs/jsdom.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 29 | 30 | -------------------------------------------------------------------------------- /docs/res/JetBrainsMono-Bold-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/JetBrainsMono-Bold-Italic.woff2 -------------------------------------------------------------------------------- /docs/res/JetBrainsMono-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/JetBrainsMono-Bold.woff2 -------------------------------------------------------------------------------- /docs/res/JetBrainsMono-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/JetBrainsMono-Italic.woff2 -------------------------------------------------------------------------------- /docs/res/JetBrainsMono-Medium-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/JetBrainsMono-Medium-Italic.woff2 -------------------------------------------------------------------------------- /docs/res/JetBrainsMono-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/JetBrainsMono-Medium.woff2 -------------------------------------------------------------------------------- /docs/res/JetBrainsMono-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/JetBrainsMono-Regular.woff2 -------------------------------------------------------------------------------- /docs/res/iaw-mono-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-mono-Bold.woff -------------------------------------------------------------------------------- /docs/res/iaw-mono-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-mono-Bold.woff2 -------------------------------------------------------------------------------- /docs/res/iaw-mono-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-mono-BoldItalic.woff -------------------------------------------------------------------------------- /docs/res/iaw-mono-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-mono-BoldItalic.woff2 -------------------------------------------------------------------------------- /docs/res/iaw-mono-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-mono-Italic.woff -------------------------------------------------------------------------------- /docs/res/iaw-mono-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-mono-Italic.woff2 -------------------------------------------------------------------------------- /docs/res/iaw-mono-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-mono-Regular.woff -------------------------------------------------------------------------------- /docs/res/iaw-mono-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-mono-Regular.woff2 -------------------------------------------------------------------------------- /docs/res/iaw-mono-vf-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-mono-vf-Italic.woff2 -------------------------------------------------------------------------------- /docs/res/iaw-mono-vf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-mono-vf.woff2 -------------------------------------------------------------------------------- /docs/res/iaw-quattro-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-quattro-Bold.woff -------------------------------------------------------------------------------- /docs/res/iaw-quattro-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-quattro-Bold.woff2 -------------------------------------------------------------------------------- /docs/res/iaw-quattro-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-quattro-BoldItalic.woff -------------------------------------------------------------------------------- /docs/res/iaw-quattro-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-quattro-BoldItalic.woff2 -------------------------------------------------------------------------------- /docs/res/iaw-quattro-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-quattro-Italic.woff -------------------------------------------------------------------------------- /docs/res/iaw-quattro-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-quattro-Italic.woff2 -------------------------------------------------------------------------------- /docs/res/iaw-quattro-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-quattro-Regular.woff -------------------------------------------------------------------------------- /docs/res/iaw-quattro-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-quattro-Regular.woff2 -------------------------------------------------------------------------------- /docs/res/iaw-quattro-vf-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-quattro-vf-Italic.woff2 -------------------------------------------------------------------------------- /docs/res/iaw-quattro-vf.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/res/iaw-quattro-vf.woff2 -------------------------------------------------------------------------------- /docs/res/jbmono.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'jbmono'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: url("JetBrainsMono-Regular.woff2") format("woff2"); 6 | } 7 | @font-face { 8 | font-family: 'jbmono'; 9 | font-style: italic; 10 | font-weight: 400; 11 | src: url("JetBrainsMono-Italic.woff2") format("woff2"); 12 | } 13 | 14 | @font-face { 15 | font-family: 'jbmono'; 16 | font-style: normal; 17 | font-weight: 500; 18 | src: url("JetBrainsMono-Medium.woff2") format("woff2"); 19 | } 20 | @font-face { 21 | font-family: 'jbmono'; 22 | font-style: italic; 23 | font-weight: 500; 24 | src: url("JetBrainsMono-Medium-Italic.woff2") format("woff2"); 25 | } 26 | 27 | @font-face { 28 | font-family: 'jbmono'; 29 | font-style: normal; 30 | font-weight: 700; 31 | src: url("JetBrainsMono-Bold.woff2") format("woff2"); 32 | } 33 | @font-face { 34 | font-family: 'jbmono'; 35 | font-style: italic; 36 | font-weight: 700; 37 | src: url("JetBrainsMono-Bold-Italic.woff2") format("woff2"); 38 | } 39 | -------------------------------------------------------------------------------- /docs/resources.ffeca56519d72facd542.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=12)}({12:function(e,t,r){"use strict";r.r(t),r.d(t,"Resource",(function(){return n}));class n{constructor(e,t){var r;this.name=e,this.filename=t.filename,this.version=t.version,this.body=(r=this.filename+"?v="+t.version,fetch(r).then(e=>{if(e.status>=200&&e.status<=299)return e.text();throw new Error(`HTTP GET ${r} -> ${e.status} ${e.statusText}`)}))}}t.default=window.__resources=[new n("Figma API",{filename:"figma.d.ts",version:"Eq96lrWDKyVEgmteRSgwLazRrow"}),new n("Scripter API",{filename:"scripter-env.d.ts",version:"OTv3981fJru4/uRsfKhUXweO9a0"}),new n("WebDOM API",{filename:"lib.dom.d.ts",version:"+EviNZmp2POY3vxI1MwvwLsktEk"}),new n("WebWorker API",{filename:"lib.webworker.d.ts",version:"nkpjZop6oiU0iz4a83cmigz6edo"})]}}); 2 | //# sourceMappingURL=resources.ffeca56519d72facd542.js.map -------------------------------------------------------------------------------- /docs/sample/colors.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/sample/colors.jpg -------------------------------------------------------------------------------- /docs/source-map-0.7.3-mappings.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/docs/source-map-0.7.3-mappings.wasm -------------------------------------------------------------------------------- /docs/zip/worker.js: -------------------------------------------------------------------------------- 1 | importScripts("jszip.min.js") 2 | 3 | onmessage = ev => { 4 | // console.log("onmessage", ev.data) 5 | switch (ev.data[0]) { 6 | case "create": { 7 | let requestId = ev.data[1] 8 | create(ev.data[2]).then(result => { 9 | postMessage(["result", requestId, "ok", result]) 10 | }).catch(err => { 11 | console.error("error in zip worker: " + (err.stack || err)) 12 | postMessage(["result", requestId, "error", String(err)]) 13 | }) 14 | break 15 | } 16 | } 17 | } 18 | 19 | postMessage(["ready"]) 20 | 21 | function create(props) { // Promise 22 | let zip = new JSZip() 23 | 24 | function addfile(dir, file) { 25 | if (file.contents === undefined) { 26 | throw new Error(`missing contents prop for file ${file.name}`) 27 | } 28 | let opts = {} 29 | if (file.mtime) { 30 | opts.date = file.mtime 31 | } 32 | if (file.permissions) { 33 | opts.unixPermissions = file.permissions 34 | } 35 | dir.file(file.name, file.contents, opts) 36 | } 37 | 38 | if (props.files.length == 1) { 39 | // single-file zip 40 | addfile(zip, props.files[0]) 41 | } else { 42 | // multiple files 43 | let dir = props.name ? zip.folder(props.name) : zip 44 | for (let file of props.files) { 45 | addfile(dir, file) 46 | } 47 | } 48 | return zip.generateAsync({type: "arraybuffer"}) 49 | } 50 | -------------------------------------------------------------------------------- /misc/build-app.pre.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | cd "$(dirname "$0")/.." 3 | 4 | outdir=docs 5 | if [[ "$1" != "" ]]; then outdir=$1 ; fi 6 | 7 | mkdir -p "$outdir" 8 | 9 | node misc/build-tslibs.js "$outdir" & 10 | node misc/build-worker-template.js 11 | wait 12 | -------------------------------------------------------------------------------- /misc/build-app.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # 3 | # Build release version of app 4 | # 5 | cd "$(dirname "$0")/.." 6 | source misc/util.sh 7 | rootdir=$PWD 8 | 9 | rm -rf docs/app.* docs/resources.* docs/source-map-*.wasm 10 | 11 | spawn_monaco_build "$rootdir/docs" && echo "monaco is up-to-date" || true 12 | 13 | bash misc/build-app.pre.sh "docs" 14 | 15 | echo "building ./src/app -> ./docs" 16 | pushd src/app > /dev/null 17 | webpack --mode=production --progress --display=errors-only "--output-path=$rootdir/docs" 18 | 19 | wait 20 | popd > /dev/null 21 | 22 | # for some reason, the webpack CopyPlugin fails, so we do it manually: 23 | SOURCE_MAP_VERSION=$(node -p 'require("source-map/package.json").version') 24 | cp -f node_modules/source-map/lib/mappings.wasm \ 25 | docs/source-map-${SOURCE_MAP_VERSION}-mappings.wasm 26 | 27 | echo "✓ done" 28 | -------------------------------------------------------------------------------- /misc/build-dom.d.ts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | cd "$(dirname "$0")/.." 3 | 4 | outdir=docs 5 | if [[ "$1" != "" ]]; then outdir=$1 ; fi 6 | 7 | if [[ "node_modules/typescript/lib/lib.dom.d.ts" -nt "$outdir/lib.dom.d.ts" ]] || \ 8 | [[ "node_modules/typescript/lib/lib.dom.iterable.d.ts" -nt "$outdir/lib.dom.d.ts" ]] || \ 9 | [[ "$0" -nt "$outdir/lib.dom.d.ts" ]] 10 | then 11 | 12 | node - "$outdir/lib.dom.d.ts" <<__JS 13 | const outfile = process.argv[2] 14 | const fs = require("fs") 15 | const crypto = require("crypto") 16 | const Path = require("path") 17 | 18 | let dom = "" 19 | dom = fs.readFileSync("node_modules/typescript/lib/lib.dom.d.ts", "utf8") + "\n" + 20 | fs.readFileSync("node_modules/typescript/lib/lib.dom.iterable.d.ts", "utf8") 21 | 22 | dom = 'declare namespace WebDOM {\n' + 23 | dom.replace(/declare\s+|\/\/\/\s* build/jsdom.js 9 | if (typeof BigInt == "undefined") { 10 | BigInt = function BigInt() {} 11 | } 12 | if (typeof SharedArrayBuffer == "undefined") { 13 | SharedArrayBuffer = function SharedArrayBuffer() {} 14 | SharedArrayBuffer.prototype.byteLength = 0 15 | } 16 | __PREAMBLE 17 | echo -n "var " >> build/jsdom.js 18 | cat build/jsdom1.js >> build/jsdom.js 19 | echo "; self.jsdom = require('jsdom');" >> build/jsdom.js 20 | rm build/jsdom1.js 21 | fi 22 | 23 | if [[ build/jsdom.js -nt docs/jsdom.js ]]; then 24 | ./node_modules/.bin/esbuild --bundle --outfile=docs/jsdom.js --minify build/jsdom.js 25 | fi 26 | 27 | if [[ docs/jsdom.js -nt src/app/jsdom_info.ts ]]; then 28 | node <<__JS > src/app/jsdom_info.ts 29 | const crypto = require("crypto") 30 | const fs = require("fs") 31 | const hash = crypto.createHash("sha1") 32 | const input = fs.createReadStream("docs/jsdom.js") 33 | input.on("readable", () => { 34 | const data = input.read() 35 | if (data) { 36 | hash.update(data) 37 | } else { 38 | let version = hash.digest("base64").replace(/=+/g, "") 39 | console.log("export default " + JSON.stringify({ 40 | url: "https://scripter.rsms.me/jsdom.js?v=" + version 41 | }, null, 2)) 42 | } 43 | }); 44 | __JS 45 | fi 46 | -------------------------------------------------------------------------------- /misc/build-monaco.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | cd "$(dirname "$0")/.." 3 | source misc/util.sh 4 | 5 | if [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]]; then 6 | echo "usage: $0 [-debug]" 7 | exit 1 8 | fi 9 | 10 | OPT_DEBUG=false 11 | WEBPACK_ARGS=( --display=errors-only ) 12 | if [[ "$1" == "-debug" ]]; then 13 | shift 14 | OPT_DEBUG=true 15 | WEBPACK_ARGS=( --debug ) 16 | fi 17 | 18 | outdir="$PWD/docs" 19 | if [[ "$1" != "" ]]; then 20 | outdir=$1 21 | fi 22 | 23 | echo "removing $outdir/monaco-*" 24 | rm -rf "$outdir"/monaco-* 25 | 26 | build_dir=$(print_monaco_build_dir "$outdir") 27 | echo "building $build_dir" 28 | pushd src/monaco >/dev/null 29 | set +e 30 | NODE_PATH="$PWD" webpack --mode=production "--output-path=$outdir" "${WEBPACK_ARGS[@]}" 31 | WP_STATUS=$? 32 | if [ "$WP_STATUS" != "0" ]; then 33 | if ! $OPT_DEBUG; then 34 | echo "webpack failed with status $WP_STATUS" >&2 35 | echo "Run '$0 -debug' for details" >&2 36 | fi 37 | exit $WP_STATUS 38 | fi 39 | echo "built $build_dir ok" 40 | -------------------------------------------------------------------------------- /misc/build-plugin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | cd "$(dirname "$0")/.." 3 | source misc/util.sh 4 | 5 | figplug=./node_modules/.bin/figplug 6 | # figplug=$HOME/src/figplug/bin/figplug.g 7 | 8 | node ./misc/build-scriptenv.js 9 | 10 | if [ "$1" == "-dev" ]; then 11 | echo "building figma-plugin in debug mode" 12 | $figplug build -debug -v -g src/figma-plugin:build/figma-plugin 13 | else 14 | echo "building figma-plugin in release mode" 15 | rm -rf build/figma-plugin 16 | $figplug build -v -O src/figma-plugin:build/figma-plugin 17 | fi 18 | 19 | GITREV=$(git rev-parse HEAD) 20 | 21 | # patch version of iframe src="https://scripter.rsms.me/?v=1" 22 | node <<_JS_ 23 | let fs = require("fs") 24 | let s = fs.readFileSync("build/figma-plugin/ui.html", "utf8") 25 | s = s.replace(/(src="https:\\/\\/scripter\\.rsms\\.me\\/\?v=)([^"&]+)/g, "\$1$GITREV") 26 | fs.writeFileSync("build/figma-plugin/ui.html", s, "utf8") 27 | _JS_ 28 | -------------------------------------------------------------------------------- /misc/build-scriptenv.js: -------------------------------------------------------------------------------- 1 | const fs = require("fs") 2 | const Path = require("path") 3 | 4 | const prog = Path.relative(process.cwd(), __filename) 5 | const infile = "src/common/scripter-env.d.ts" 6 | const outfile = "src/figma-plugin/scriptenv.d.ts" 7 | 8 | process.chdir(__dirname + "/..") 9 | let a = fs.readFileSync(infile, "utf8") 10 | let b = ( 11 | `// Automatically generated from ${infile} by ${prog}.\n` + 12 | `// Do not edit manually -- instead, run ${prog}\n` + 13 | "\n" + 14 | "export type ScriptEnv = typeof scriptenv\n" + 15 | "declare namespace scriptenv {\n" + 16 | 17 | // a.replace(/\n\s*declare/g, "\n") + 18 | 19 | a.replace(/declare\s*global\s*\{/, "\n") 20 | .replace(/\}\s*\/\/\s*declare\s*global[^\n\r]*/, "\n") 21 | .replace(/export\s*\{\};?/, "\n") 22 | .replace(/\/\/\/\s*<[^\r\n]+/, "\n") 23 | + 24 | 25 | "}\n" 26 | ) 27 | 28 | // let b = ( 29 | // `// Automatically generated by ${prog}.\n` + 30 | // `// Do not edit manually -- instead, run ${prog}\n` + 31 | // "\n" + 32 | // "export const __esmodule :bool\n" + 33 | // a.replace(/\n\s*declare/g, "\nexport") 34 | // ) 35 | 36 | let b1 = "" 37 | try { 38 | b1 = fs.readFileSync(outfile, "utf8") 39 | } catch (_) {} 40 | if (b1 != b) { 41 | console.log(`${prog}: write ${outfile}`) 42 | fs.writeFileSync(outfile, b, "utf8") 43 | } 44 | -------------------------------------------------------------------------------- /misc/dist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | cd "$(dirname "$0")/.." 3 | 4 | npm run build-figma-plugin 5 | npm run build-app 6 | 7 | mkdir -p dist 8 | # GITREV=$(git rev-parse --short=16 HEAD) 9 | VERSION=$(date '+%Y-%m-%d.%H%M%S') 10 | pushd build/figma-plugin >/dev/null 11 | zip -q -X -r "../../dist/scripter-figma-plugin-${VERSION}.zip" * 12 | popd >/dev/null 13 | 14 | git add docs 15 | git status 16 | echo "Ready to commit & push" 17 | -------------------------------------------------------------------------------- /misc/figma-extras.d.ts: -------------------------------------------------------------------------------- 1 | // Extra things normally found in DOM which are included in the Figma plugin environment 2 | 3 | declare var console: Console; 4 | 5 | interface Console { 6 | 7 | // Note: Commented-out properties are unavailble in Figma plugins 8 | 9 | assert(condition?: boolean, message?: string, ...data: any[]): void; 10 | clear(): void; 11 | // count(label?: string): void; 12 | // debug(message?: any, ...optionalParams: any[]): void; 13 | // dir(value?: any, ...optionalParams: any[]): void; 14 | // dirxml(value: any): void; 15 | error(message?: any, ...optionalParams: any[]): void; 16 | // exception(message?: string, ...optionalParams: any[]): void; 17 | // group(groupTitle?: string, ...optionalParams: any[]): void; 18 | // groupCollapsed(groupTitle?: string, ...optionalParams: any[]): void; 19 | // groupEnd(): void; 20 | info(message?: any, ...optionalParams: any[]): void; 21 | log(message?: any, ...optionalParams: any[]): void; 22 | // markTimeline(label?: string): void; 23 | // memory: any; 24 | // profile(reportName?: string): void; 25 | // profileEnd(reportName?: string): void; 26 | // table(...tabularData: any[]): void; 27 | // time(label?: string): void; 28 | // timeEnd(label?: string): void; 29 | // timeline(label?: string): void; 30 | // timelineEnd(label?: string): void; 31 | // timeStamp(label?: string): void; 32 | // trace(message?: any, ...optionalParams: any[]): void; 33 | warn(message?: any, ...optionalParams: any[]): void; 34 | } 35 | -------------------------------------------------------------------------------- /misc/optimize-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | cd "$(dirname "$0")/.." 4 | 5 | if ! (which pngcrush >/dev/null); then 6 | echo 'pngcrush not found in $PATH' >&2 7 | MISSING_UTILS+=( pngcrush ) 8 | fi 9 | 10 | pushd docs >/dev/null 11 | 12 | # crunch /docs/*.png 13 | for f in *.png; do 14 | TMPNAME=.$f.tmp 15 | (pngcrush -q "$f" "$TMPNAME" && mv -f "$TMPNAME" "$f") & 16 | done 17 | 18 | popd >/dev/null 19 | 20 | # wait for all background processes to exit 21 | wait 22 | -------------------------------------------------------------------------------- /misc/update-figma-type-defs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | cd "$(dirname "$0")/.." 3 | 4 | mkdir -p build 5 | 6 | URL=https://unpkg.com/@figma/plugin-typings/index.d.ts 7 | echo "fetch $URL" 8 | curl --location -# -o build/tmp-figma-index.d.ts "$URL" 9 | 10 | URL=https://unpkg.com/@figma/plugin-typings/plugin-api.d.ts 11 | echo "fetch $URL" 12 | curl --location -# -o build/tmp-figma-plugin-api.d.ts "$URL" 13 | 14 | OUT=src/figma-plugin/figma.d.ts 15 | head -n 1 build/tmp-figma-index.d.ts > $OUT 16 | echo "declare global {" >> $OUT 17 | cat build/tmp-figma-plugin-api.d.ts >> $OUT 18 | echo "}" >> $OUT 19 | tail -n +3 build/tmp-figma-index.d.ts >> $OUT 20 | 21 | rm build/tmp-figma-*.d.ts 22 | 23 | cp $OUT src/app/figma.d.ts 24 | 25 | echo "wrote src/figma-plugin/figma.d.ts" 26 | echo "wrote src/app/figma.d.ts" 27 | -------------------------------------------------------------------------------- /misc/util.sh: -------------------------------------------------------------------------------- 1 | export PATH=$PWD/node_modules/.bin:$PATH 2 | export NODE_OPTIONS=--openssl-legacy-provider 3 | 4 | has_newer() { 5 | DIR=$1 6 | REF_FILE=$2 7 | for f in $(find "$DIR" -type f -newer "$REF_FILE" -print -quit); do 8 | return 0 9 | done 10 | return 1 11 | } 12 | 13 | monaco_build_basedir="monaco-$(node -p 'require("./src/monaco/monaco-editor/package.json").version')" 14 | 15 | print_monaco_build_dir() { 16 | echo "$1/$monaco_build_basedir" 17 | } 18 | 19 | spawn_monaco_build() { 20 | outdir=$1 21 | 22 | # find monaco build dir 23 | monaco_build_dir=$(print_monaco_build_dir "$outdir") 24 | 25 | # build monaco if needed 26 | if ! [ -d "$monaco_build_dir" ] || has_newer "src/monaco" "$monaco_build_dir/monaco.js"; then 27 | bash misc/build-monaco.sh "$outdir" & 28 | return $! 29 | fi 30 | 31 | return 0 32 | } 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.1", 3 | "scripts": { 4 | "build-app": "bash misc/build-app.sh", 5 | "build-figma-plugin": "bash misc/build-plugin.sh", 6 | "build-figma-plugin-dev": "bash misc/build-plugin.sh -dev", 7 | "serve-docs": "node misc/serve.js docs 8009", 8 | "start": "bash misc/dev.sh" 9 | }, 10 | "devDependencies": { 11 | "@types/react": "^16.9.16", 12 | "@types/react-dom": "^16.9.4", 13 | "autoprefixer": "^9.7.3", 14 | "browserify": "^16.5.1", 15 | "caniuse-lite": "^1.0.30001090", 16 | "copy-webpack-plugin": "^5.1.0", 17 | "css-loader": "^3.3.0", 18 | "cssnano": "^4.1.10", 19 | "esbuild-wasm": "^0.5.16", 20 | "figplug": "0.1.18", 21 | "html-webpack-inline-source-plugin": "0.0.10", 22 | "html-webpack-plugin": "^3.2.0", 23 | "jsdom": "^16.2.2", 24 | "livereload": "^0.9.1", 25 | "mini-css-extract-plugin": "^0.8.0", 26 | "monaco-editor-webpack-plugin": "1.9.0", 27 | "optimize-css-assets-webpack-plugin": "^5.0.3", 28 | "postcss-import": "^12.0.1", 29 | "postcss-loader": "^3.0.0", 30 | "postcss-preset-env": "^6.7.0", 31 | "react": "^16.12.0", 32 | "react-dom": "^16.12.0", 33 | "serve-http": "^1.0.6", 34 | "source-map": "^0.7.3", 35 | "style-loader": "^1.0.1", 36 | "terser-webpack-plugin": "^1.4.3", 37 | "ts-loader": "^6.2.1", 38 | "typescript": "^3.9.6", 39 | "uglify-es": "^3.3.9", 40 | "url-loader": "^2.3.0", 41 | "webpack": "^4.43.0", 42 | "webpack-cli": "^3.3.12" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/app/dom.ts: -------------------------------------------------------------------------------- 1 | // simple DOM element builder 2 | export function EL( 3 | name :string, 4 | attrs? :{[k:string]:any}, 5 | ...children :any[] 6 | ) :T { 7 | let el = document.createElement(name) 8 | if (attrs) for (let k in attrs) { 9 | if (k == "style") { 10 | Object.assign(el.style, attrs[k]) 11 | } else if (k == "className") { 12 | el.className = attrs[k] 13 | } else { 14 | el.setAttribute(k, attrs[k]) 15 | } 16 | } 17 | for (let n of children) { 18 | if (n instanceof Node) { 19 | el.appendChild(n) 20 | } else if (n !== undefined && n !== null) { 21 | el.appendChild(document.createTextNode(String(n))) 22 | } 23 | } 24 | return el as T 25 | } 26 | -------------------------------------------------------------------------------- /src/app/event.ts: -------------------------------------------------------------------------------- 1 | type EventHandler = (data :T)=>void 2 | 3 | export class EventEmitter { 4 | _events = new Map>() 5 | 6 | addListener(e :K, handler :EventHandler) { 7 | let s = this._events.get(e) 8 | if (s) { 9 | s.add(handler) 10 | } else { 11 | this._events.set(e, new Set([handler])) 12 | } 13 | } 14 | 15 | on(e :K, handler :EventHandler) { 16 | return this.addListener(e, handler) 17 | } 18 | 19 | removeListener(e :K, handler :EventHandler) { 20 | let s = this._events.get(e) 21 | if (s) { 22 | s.delete(handler) 23 | if (s.size == 0) { 24 | this._events.delete(e) 25 | } 26 | } 27 | } 28 | 29 | removeListeners(e :K) { 30 | this._events.delete(e) 31 | } 32 | 33 | removeAllListeners() { 34 | this._events.clear() 35 | } 36 | 37 | triggerEvent(e :K, data? :EventMap[K]) { 38 | let s = this._events.get(e) 39 | if (s) for (let handler of s) { 40 | handler(data) 41 | } 42 | } 43 | } 44 | 45 | EventEmitter.prototype.on = EventEmitter.prototype.addListener 46 | -------------------------------------------------------------------------------- /src/app/file.ts: -------------------------------------------------------------------------------- 1 | 2 | export function createFileOrBlob( 3 | filename :string, 4 | data :File|Blob|ArrayBuffer|ArrayBufferView, 5 | mimeType :string = "application/octet-stream") :File|Blob 6 | { 7 | if (typeof File != "undefined") { 8 | if (data instanceof File) 9 | return data 10 | return new File([ data ], filename, {type: mimeType}) 11 | } 12 | if (data instanceof Blob) 13 | return data 14 | return new Blob([ data ], {type: mimeType}) 15 | } 16 | 17 | 18 | export function downloadFile( 19 | filename :string, 20 | data :File|Blob|ArrayBuffer|ArrayBufferView, 21 | mimeType? :string) :void 22 | { 23 | let fileOrBlob = createFileOrBlob(filename, data, mimeType) 24 | let objectURL = URL.createObjectURL(fileOrBlob) 25 | if (typeof window == "undefined" || typeof document == "undefined") { 26 | // fallback to redirect 27 | document.location.href = objectURL 28 | } else { 29 | // use the hyperlink trick to get proper filename 30 | let a = document.createElementNS("http://www.w3.org/1999/xhtml", "a") as HTMLAnchorElement 31 | a.href = objectURL 32 | a.download = filename 33 | let event = document.createEvent("MouseEvents") 34 | event.initMouseEvent( 35 | "click", true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null) 36 | a.dispatchEvent(event) 37 | } 38 | setTimeout(() => { URL.revokeObjectURL(objectURL) }, 10) 39 | } 40 | -------------------------------------------------------------------------------- /src/app/global.d.ts: -------------------------------------------------------------------------------- 1 | type bool = boolean 2 | 3 | interface SourcePos { 4 | line :number 5 | column :number 6 | } 7 | 8 | // defined globally in webpack config 9 | declare const SOURCE_MAP_VERSION :string 10 | declare const BUILD_VERSION :string 11 | declare const DEBUG :bool 12 | -------------------------------------------------------------------------------- /src/app/guid.ts: -------------------------------------------------------------------------------- 1 | import * as base62 from "./base62" 2 | 3 | export const genBytes :()=>Uint8Array = ( 4 | typeof crypto == "object" && typeof crypto.getRandomValues == "function" ? 5 | function genBytes() :Uint8Array { 6 | let buf = new Uint8Array(16) 7 | crypto.getRandomValues(buf) 8 | return buf 9 | } : 10 | function genBytes() :Uint8Array { 11 | let buf = new Uint8Array(16) 12 | for (let i = 0; i < buf.length; i++) { 13 | buf[i] = (Math.random() * 255) >>> 0 14 | } 15 | return buf 16 | } 17 | ) 18 | 19 | export function gen() :string { 20 | return base62.encode(genBytes()) 21 | } 22 | -------------------------------------------------------------------------------- /src/app/icon-add.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/app/icon-clear.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/app/icon-clock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/app/icon-delay.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/app/icon-error.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/app/icon-history-back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/app/icon-history-forward.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/app/icon-menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/app/icon-play.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/app/icon-save.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/app/icon-saved.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/app/icon-stop.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/app/icon-success.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/app/icon-text-size.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/app/icon-win-close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/app/icon-window.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 |
17 |
18 |
19 |

Warning message

20 |
21 |
22 |
23 | 24 |
26 |
28 |
29 |
30 |
31 | 32 | 33 | 34 |
35 |
36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/app/progress-spinner.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/app/resources.ts: -------------------------------------------------------------------------------- 1 | // Note: This file is special. It is build separately, loaded very early and 2 | // linked at runtime via window["__resources"]. 3 | // Because of this, only the one default export is valid. Any other export will fail. 4 | import * as tslibs from "./tslibs" 5 | 6 | declare const BUILD_VERSION :string 7 | 8 | export class Resource { 9 | readonly name :string 10 | readonly filename :string 11 | readonly version :string 12 | readonly body :Promise 13 | 14 | constructor(name :string, info :{ filename :string, version :string }) { 15 | this.name = name 16 | this.filename = info.filename 17 | this.version = info.version 18 | this.body = loadText(this.filename + "?v=" + info.version) 19 | } 20 | } 21 | 22 | export default window["__resources"] = [ 23 | new Resource("Figma API", tslibs.figma), 24 | new Resource("Scripter API", tslibs.scripter), 25 | new Resource("WebDOM API", tslibs.dom), 26 | new Resource("WebWorker API", tslibs.webworker), 27 | ] 28 | 29 | 30 | function loadText(url :string) :Promise { 31 | return fetch(url).then(r => { 32 | if (r.status >= 200 && r.status <= 299) { 33 | return r.text() 34 | } else { 35 | throw new Error(`HTTP GET ${url} -> ${r.status} ${r.statusText}`) 36 | } 37 | }) 38 | } 39 | -------------------------------------------------------------------------------- /src/app/runqueue.ts: -------------------------------------------------------------------------------- 1 | // interface RunQItem { 2 | // clearWithStatus(state :"ok"|"error") 3 | // } 4 | 5 | // export function push() :RunQItem { 6 | // let runqEl = document.querySelector("#toolbar .runqueue") as HTMLElement 7 | // let e = document.createElement("div") 8 | // e.className = "pending" 9 | // runqEl.appendChild(e) 10 | // let makeVisible = () => { e.classList.add("visible") } 11 | // // only show the [clock] icon when the run takes longer than 60ms 12 | // let visibleTimer = setTimeout(makeVisible, 60) 13 | // return { 14 | // clearWithStatus: (state :"ok"|"error") => { 15 | // clearTimeout(visibleTimer) 16 | // if (state == "ok") { 17 | // e.className = "ok" 18 | // } else { 19 | // e.className = "err" 20 | // } 21 | // makeVisible() 22 | // setTimeout(() => { 23 | // e.classList.add("hide") 24 | // setTimeout(() => { runqEl.removeChild(e) }, 250) 25 | // }, 500) 26 | // } 27 | // } 28 | // } 29 | -------------------------------------------------------------------------------- /src/app/saved-scripts.ts: -------------------------------------------------------------------------------- 1 | // 2 | // index of saved scripts in the current Figma file. 3 | // This index is maintained by the Figma plugin. 4 | // 5 | import { EventEmitter } from "./event" 6 | import { SavedScriptIndexData } from "../common/messages" 7 | 8 | interface Events { 9 | "change": undefined 10 | } 11 | 12 | export default new class extends EventEmitter { 13 | // This is the index data; scripts which exist in the document. 14 | index :SavedScriptIndexData = {} // keyed by GUID 15 | 16 | updateFromPlugin(index: SavedScriptIndexData) { 17 | this.index = index 18 | this.triggerEvent("change") 19 | } 20 | 21 | hasGUID(guid :string) :boolean { 22 | return guid in this.index 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/app/script-export.ts: -------------------------------------------------------------------------------- 1 | import { Script, ScriptMeta } from "./script" 2 | import { scriptsData } from "./script-data" 3 | import { saveZipArchive, ZipInputFile } from "./zip" 4 | import { dlog } from "./util" 5 | 6 | 7 | export async function exportAllScripts() { 8 | const scripts = scriptsData.scripts.filter(s => s.isUserScript) 9 | 10 | let files :ZipInputFile[] = await Promise.all(scripts.map(async (script) => { 11 | await script.loadIfEmpty() 12 | return { 13 | name: script.name + ".ts", 14 | contents: script.body, 15 | mtime: script.modifiedAt, 16 | } as ZipInputFile 17 | })) 18 | 19 | let datetime = (new Date).toLocaleString().replace(/\//g, "-").replace(/:/g, ".") 20 | let name = `Scripter Scripts ${datetime}` 21 | await saveZipArchive(`${name}.zip`, { 22 | name, 23 | files 24 | }) 25 | } 26 | -------------------------------------------------------------------------------- /src/app/squiggly-line.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "moduleResolution": "node", 5 | "resolveJsonModule": true, 6 | "target": "es2017", 7 | "jsx": "react", 8 | "lib": [ 9 | "es2017", 10 | "dom" 11 | ] 12 | }, 13 | // "exclude": [ 14 | // "monaco-editor" 15 | // ], 16 | "include": [ 17 | "global.d.ts", 18 | "../monaco-editor/monaco.d.ts" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /src/app/tslibs.ts: -------------------------------------------------------------------------------- 1 | // Do not edit. Generated by misc/build-tslibs.js 2 | export const dom = { 3 | filename: "lib.dom.d.ts", 4 | version: "+EviNZmp2POY3vxI1MwvwLsktEk" 5 | }; 6 | export const webworker = { 7 | filename: "lib.webworker.d.ts", 8 | version: "nkpjZop6oiU0iz4a83cmigz6edo" 9 | }; 10 | export const scripter = { 11 | filename: "scripter-env.d.ts", 12 | version: "OTv3981fJru4/uRsfKhUXweO9a0" 13 | }; 14 | export const figma = { 15 | filename: "figma.d.ts", 16 | version: "Eq96lrWDKyVEgmteRSgwLazRrow" 17 | }; 18 | -------------------------------------------------------------------------------- /src/app/ui-input.ts: -------------------------------------------------------------------------------- 1 | export interface UIInput { 2 | readonly el :HTMLElement 3 | readonly value :ValueT 4 | 5 | onMountDOM() :void 6 | onUnmountDOM() :void 7 | 8 | on(event:"input", f:(value:ValueT)=>void) 9 | on(event:"change", f:(value:ValueT)=>void) 10 | 11 | removeListener(event:"input", f:(value:ValueT)=>void) 12 | removeListener(event:"change", f:(value:ValueT)=>void) 13 | } 14 | -------------------------------------------------------------------------------- /src/app/utf8.ts: -------------------------------------------------------------------------------- 1 | interface TextEncodeOptions { stream?: boolean; } 2 | interface TextDecoderOptions { fatal?: boolean; ignoreBOM?: boolean; } 3 | interface TextDecodeOptions { stream?: boolean; } 4 | declare class TextEncoder { 5 | encoding :string // always "utf-8" since Firefox >=48 and Chrome >=53 (always utf-8) 6 | constructor(label?: string) // label ignored since Firefox >=48 and Chrome >=53 (always utf-8) 7 | encode(input? :string, options? :TextEncodeOptions) :Uint8Array 8 | } 9 | declare class TextDecoder { 10 | encoding: string 11 | fatal: boolean 12 | ignoreBOM: boolean 13 | constructor(label?: string, options?: TextDecoderOptions) 14 | decode(input?: ArrayBufferView|ArrayBuffer, options?: TextDecodeOptions): string 15 | } 16 | 17 | 18 | const utf8Decoder = new TextDecoder("utf-8") 19 | const utf8Encoder = new TextEncoder("utf-8") 20 | 21 | export function encode(text :string) :Uint8Array { 22 | return utf8Encoder.encode(text) 23 | } 24 | 25 | export function decode(data :ArrayBufferView|ArrayBuffer) :string { 26 | return utf8Decoder.decode(data) 27 | } 28 | -------------------------------------------------------------------------------- /src/app/util.ts: -------------------------------------------------------------------------------- 1 | export const print = console.log.bind(console) 2 | 3 | export const isMac = navigator.platform.indexOf("Mac") != -1 4 | 5 | export const hostEnv = { 6 | isMac, 7 | 8 | hasPointerEvents: typeof PointerEvent != "undefined", 9 | 10 | // get hasPointerEvents() { 11 | // let value = typeof PointerEvent != "undefined" 12 | // return Object.defineProperty(this, "hasPointerEvents", { value }), value 13 | // }, 14 | } 15 | 16 | export const dlog :(...v:any[])=>void = (DEBUG ? 17 | function dlog(...v:any[]) { 18 | v.unshift("[dlog]") 19 | console.log.apply(console, v) 20 | } : 21 | function(){} 22 | ) as (...v:any[])=>void 23 | -------------------------------------------------------------------------------- /src/app/warning-message.ts: -------------------------------------------------------------------------------- 1 | import { editor } from "./editor" 2 | 3 | export function show(message :string) { 4 | let messageEl = document.querySelector("#message") as HTMLElement 5 | ;(messageEl.querySelector(".close-button") as HTMLElement).onclick = hide 6 | let el = messageEl.querySelector(".message > p") as HTMLElement 7 | el.innerText = message.trim() 8 | document.body.classList.add("showMessage") 9 | editor.editor.layout() 10 | } 11 | 12 | 13 | export function hide() { 14 | document.body.classList.remove("showMessage") 15 | editor.editor.layout() 16 | editor.focus() 17 | } 18 | -------------------------------------------------------------------------------- /src/common/gif.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface GifInfo { 3 | version :string 4 | width :int 5 | height :int 6 | } 7 | 8 | export function gifInfoBuf(buf :ArrayLike) :GifInfo { 9 | // header is 6 bytes and should be either "GIF87a" or "GIF89a" 10 | if (buf.length < 10 || 11 | buf[0] != 71 || buf[1] != 73 || buf[2] != 70 || buf[3] != 56 || 12 | (buf[5] != 97 && buf[5] != 98)) { // GIF8_[a|b] 13 | throw new Error("not a gif") 14 | } 15 | 16 | let v = buf[4] - 48 // e.g. 7 or 9 17 | let version = `8${v}${String.fromCharCode(buf[5])}` 18 | if (v != 7 && v != 9) { 19 | throw new Error(`unsupported gif version GIF${version}`) 20 | } 21 | 22 | // header is followed by width and height as uint16 23 | return { 24 | version, 25 | width: (buf[7] << 8) + buf[6], 26 | height: (buf[9] << 8) + buf[8], 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/common/marker-props.ts: -------------------------------------------------------------------------------- 1 | // special properties used to communicate object type over IPC 2 | export default { 3 | __scripter_image_marker__: 1, 4 | __scripter_lazy_seq__: 1, 5 | __scripter_error__: 1, 6 | } 7 | -------------------------------------------------------------------------------- /src/common/typed-array.ts: -------------------------------------------------------------------------------- 1 | export type TypedArray = Int8Array 2 | | Uint8Array 3 | | Uint8ClampedArray 4 | | Int16Array 5 | | Uint16Array 6 | | Int32Array 7 | | Uint32Array 8 | | Float32Array 9 | | Float64Array 10 | 11 | // Note: BigInt64Array and BigUint64Array are intentionally left out of the TypedArray 12 | // definition since their index signatures are different, making the TypedArray union 13 | // less useful. 14 | 15 | // isTypedArray is a type guard for TypedArray 16 | export const isTypedArray :(v:any) => v is TypedArray = (() => { 17 | let v = new Uint8Array(0) 18 | if ((v as any).__proto__ !== Object.prototype && 19 | typeof (v as any).__proto__.constructor == "function" 20 | ) { 21 | // for runtimes with an underlying TypedArray constructor, use that instead of 22 | // property testing. It's both more reliable and faster. 23 | let typedArrayProto :Function = (v as any).__proto__.constructor 24 | return (v:any) :v is TypedArray => { 25 | return v instanceof typedArrayProto 26 | } 27 | } 28 | // fallback implementation that makes a best-guess by looking for properties 29 | return (v:any) :v is TypedArray => { 30 | return v.buffer instanceof ArrayBuffer && "BYTES_PER_ELEMENT" in v 31 | } 32 | })() 33 | -------------------------------------------------------------------------------- /src/common/windowsize.ts: -------------------------------------------------------------------------------- 1 | import { WindowSize } from "./messages" 2 | 3 | export function width(ws :WindowSize) :number { 4 | switch (ws) { 5 | case WindowSize.SMALL: return 300 6 | case WindowSize.MEDIUM: return 500 7 | case WindowSize.LARGE: return 700 8 | case WindowSize.XLARGE: return 800 9 | default: 10 | console.error(`[plugin] unexpected windowWidth ${ws}`) 11 | return 500 12 | } 13 | } 14 | 15 | export function height(ws :WindowSize) :number { 16 | switch (ws) { 17 | case WindowSize.SMALL: return 300 18 | case WindowSize.MEDIUM: return 500 19 | case WindowSize.LARGE: return 700 20 | case WindowSize.XLARGE: return 2000 // Figma will limit to available window height 21 | default: 22 | console.error(`[plugin] unexpected windowHeight ${ws}`) 23 | return 500 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/figma-plugin/constants.ts: -------------------------------------------------------------------------------- 1 | 2 | // Keys used to store shared data in figma files using setSharedPluginData. 3 | // If you change these, you either need to write migration code or people will lose data. 4 | export const dataNamespace = "scripter" 5 | export const dataScriptGUID = "scriptGUID" 6 | export const dataScriptName = "scriptName" 7 | export const dataScriptBody = "scriptBody" 8 | 9 | // Key used to store cached index 10 | export const dataPrivateIndexKey = "savedScriptIndex" 11 | -------------------------------------------------------------------------------- /src/figma-plugin/evalscript.d.ts: -------------------------------------------------------------------------------- 1 | // defined by library ../common/scripter-env.js 2 | type EvalCancelFun = (reason?:Error)=>void 3 | interface EvalScriptFun { 4 | (reqid :string, js :string) :[Promise,EvalCancelFun] 5 | readonly lineOffset :number 6 | } 7 | declare const evalScript :EvalScriptFun 8 | -------------------------------------------------------------------------------- /src/figma-plugin/figplug.d.ts: -------------------------------------------------------------------------------- 1 | // Helpers provided automatically, as needed, by figplug. 2 | 3 | // symbolic type aliases 4 | type int = number 5 | type float = number 6 | type byte = number 7 | type bool = boolean 8 | 9 | // compile-time constants 10 | declare const DEBUG :boolean 11 | declare const VERSION :string 12 | 13 | // global namespace. Same as `window` in a regular web context. 14 | declare const global :{[k:string]:any} 15 | 16 | // panic prints a message, stack trace and exits the process 17 | // 18 | declare function panic(msg :any, ...v :any[]) :void 19 | 20 | // repr returns a detailed string representation of the input 21 | // 22 | declare function repr(obj :any) :string 23 | 24 | // print works just like console.log 25 | declare function print(msg :any, ...v :any[]) :void 26 | 27 | // dlog works just like console.log but is stripped out from non-debug builds 28 | declare function dlog(msg :any, ...v :any[]) :void 29 | 30 | // assert checks the condition for truth, and if false, prints an optional 31 | // message, stack trace and exits the process. 32 | // assert is removed in release builds 33 | declare var assert :AssertFun 34 | declare var AssertionError :ErrorConstructor 35 | declare interface AssertFun { 36 | (cond :any, msg? :string, cons? :Function) :void 37 | 38 | // throws can be set to true to cause assertions to be thrown as exceptions, 39 | // or set to false to cause the process to exit. 40 | // Only has an effect in Nodejs-like environments. 41 | // false by default. 42 | throws :bool 43 | } 44 | -------------------------------------------------------------------------------- /src/figma-plugin/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "757836922707087381", 3 | "api": "1.0.0", 4 | "name": "Scripter", 5 | "main": "plugin.ts", 6 | "ui": "ui.ts", 7 | "editorType": ["figma"], 8 | "figplug": { 9 | "libs": ["../common/scripter-env"] 10 | }, 11 | "relaunchButtons": [ 12 | {"command": "loadScript", "name": "Open Script"} 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /src/figma-plugin/script-lib-json.ts: -------------------------------------------------------------------------------- 1 | import { ScriptEnv, scriptenv } from "./scriptenv" 2 | 3 | export function initJSONAPI(env :ScriptEnv) { 4 | env.jsonfmt = function jsonfmt(value :any, pretty :number|boolean = true) :string { 5 | let indent = typeof pretty == "number" ? pretty : pretty ? 2 : 0 6 | return JSON.stringify(value, null, indent) 7 | } 8 | 9 | env.jsonparse = function jsonparse(json :string) :T { 10 | try { 11 | return JSON.parse(json) as T 12 | } catch (_) { 13 | return (0,eval)(`0,${json}`) as T 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/figma-plugin/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "moduleResolution": "node", 4 | "target": "es2017", 5 | "lib": [ 6 | "es2017", 7 | "dom" 8 | ] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/figma-plugin/ui.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 17 | 18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/figma-plugin/util.ts: -------------------------------------------------------------------------------- 1 | export function delayed(delay :number, f :()=>Promise) :Promise { 2 | return new Promise((resolve, reject) => { 3 | setTimeout(() => f().then(resolve).catch(reject), delay) 4 | }) 5 | } 6 | 7 | export function sortedObject(obj :T) :T { 8 | let b :T = {} as T 9 | for (let k of Object.keys(obj).sort()) { 10 | b[k] = obj[k] 11 | } 12 | return b 13 | } 14 | -------------------------------------------------------------------------------- /src/figma-plugin/visit.ts: -------------------------------------------------------------------------------- 1 | // visit calls f on every node in container up until maxdepth level of nesting. 2 | export function visit( 3 | container :ChildrenMixin, 4 | maxdepth :number, 5 | maxtime :number, 6 | f :(n :SceneNode)=>any 7 | ) { 8 | let containers :{c:ChildrenMixin,depth:number}[] = [] 9 | 10 | function visitContainer(c :ChildrenMixin, depth :number, f :(n :SceneNode)=>any) { 11 | try { 12 | c.findChildren(n => { 13 | let res = f(n) 14 | if (depth < maxdepth && 15 | (res === undefined || !!res) && 16 | "children" in n && n.children.length > 0 17 | ) { 18 | containers.push({c: n as ChildrenMixin, depth: depth + 1}) 19 | } 20 | return false // don't add to accumulation array (unused) 21 | }) 22 | } catch (err) { 23 | if (DEBUG) { 24 | console.error("[plugin] error in visit()/visitContainer(): " + (err.stack || err)) 25 | } 26 | } 27 | } 28 | 29 | return new Promise(resolve => { 30 | let lastYieldTime = Date.now() 31 | visitContainer(container, 0, f) 32 | function next() { 33 | if (containers.length == 0) { 34 | // done 35 | resolve() 36 | } else if (Date.now() - lastYieldTime >= maxtime) { 37 | // Yield to Figma. 38 | // note: setting lastYieldTime here makes us effectively lower priority than Figma, 39 | // which is the right thing. I.e. if Figma spends a lot of time in the next runloop 40 | // cycle, we yield immediately again or very soon thereafter. 41 | lastYieldTime = Date.now() 42 | setTimeout(next, 0) 43 | } else { 44 | let { c, depth } = containers.pop()! 45 | visitContainer(c, depth, f) 46 | next() 47 | } 48 | } 49 | next() 50 | }) 51 | } 52 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 - present Microsoft Corporation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/contextmenu.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | var __extends = (this && this.__extends) || (function () { 6 | var extendStatics = function (d, b) { 7 | extendStatics = Object.setPrototypeOf || 8 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 9 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; 10 | return extendStatics(d, b); 11 | }; 12 | return function (d, b) { 13 | extendStatics(d, b); 14 | function __() { this.constructor = d; } 15 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 16 | }; 17 | })(); 18 | import { SubmenuAction } from './ui/menu/menu.js'; 19 | var ContextSubMenu = /** @class */ (function (_super) { 20 | __extends(ContextSubMenu, _super); 21 | function ContextSubMenu(label, entries) { 22 | var _this = _super.call(this, label, entries, 'contextsubmenu') || this; 23 | _this.entries = entries; 24 | return _this; 25 | } 26 | return ContextSubMenu; 27 | }(SubmenuAction)); 28 | export { ContextSubMenu }; 29 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/dnd.js: -------------------------------------------------------------------------------- 1 | // Common data transfers 2 | export var DataTransfers = { 3 | /** 4 | * Application specific resource transfer type 5 | */ 6 | RESOURCES: 'ResourceURLs', 7 | /** 8 | * Browser specific transfer type to download 9 | */ 10 | DOWNLOAD_URL: 'DownloadURL', 11 | /** 12 | * Browser specific transfer type for files 13 | */ 14 | FILES: 'Files', 15 | /** 16 | * Typically transfer type for copy/paste transfers. 17 | */ 18 | TEXT: 'text/plain' 19 | }; 20 | var DragAndDropData = /** @class */ (function () { 21 | function DragAndDropData(data) { 22 | this.data = data; 23 | } 24 | DragAndDropData.prototype.update = function () { 25 | // noop 26 | }; 27 | DragAndDropData.prototype.getData = function () { 28 | return this.data; 29 | }; 30 | return DragAndDropData; 31 | }()); 32 | export { DragAndDropData }; 33 | export var StaticDND = { 34 | CurrentDragAndDropData: undefined 35 | }; 36 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/event.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { Event as BaseEvent, Emitter } from '../common/event.js'; 6 | export var domEvent = function (element, type, useCapture) { 7 | var fn = function (e) { return emitter.fire(e); }; 8 | var emitter = new Emitter({ 9 | onFirstListenerAdd: function () { 10 | element.addEventListener(type, fn, useCapture); 11 | }, 12 | onLastListenerRemove: function () { 13 | element.removeEventListener(type, fn, useCapture); 14 | } 15 | }); 16 | return emitter.event; 17 | }; 18 | export function stop(event) { 19 | return BaseEvent.map(event, function (e) { 20 | e.preventDefault(); 21 | e.stopPropagation(); 22 | return e; 23 | }); 24 | } 25 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/history.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/aria/aria.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-aria-container { 7 | position: absolute; /* try to hide from window but not from screen readers */ 8 | left:-999em; 9 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/checkbox/checkbox.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-custom-checkbox { 7 | margin-left: 2px; 8 | float: left; 9 | cursor: pointer; 10 | overflow: hidden; 11 | opacity: 0.7; 12 | width: 20px; 13 | height: 20px; 14 | border: 1px solid transparent; 15 | padding: 1px; 16 | box-sizing: border-box; 17 | user-select: none; 18 | -webkit-user-select: none; 19 | -ms-user-select: none; 20 | } 21 | 22 | .monaco-custom-checkbox:hover, 23 | .monaco-custom-checkbox.checked { 24 | opacity: 1; 25 | } 26 | 27 | .hc-black .monaco-custom-checkbox { 28 | background: none; 29 | } 30 | 31 | .hc-black .monaco-custom-checkbox:hover { 32 | background: none; 33 | } 34 | 35 | .monaco-custom-checkbox.monaco-simple-checkbox { 36 | height: 18px; 37 | width: 18px; 38 | border: 1px solid transparent; 39 | border-radius: 3px; 40 | margin-right: 9px; 41 | margin-left: 0px; 42 | padding: 0px; 43 | opacity: 1; 44 | background-size: 16px !important; 45 | } 46 | 47 | /* hide check when unchecked */ 48 | .monaco-custom-checkbox.monaco-simple-checkbox.unchecked:not(.checked)::before { 49 | visibility: hidden;; 50 | } 51 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/codiconLabel/codicon/codicon-animations.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | @keyframes codicon-spin { 7 | 100% { 8 | transform:rotate(360deg); 9 | } 10 | } 11 | 12 | .codicon-animation-spin { 13 | animation: codicon-spin 1.5s linear infinite; 14 | } 15 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/codiconLabel/codicon/codicon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/src/monaco/monaco-editor/esm/vs/base/browser/ui/codiconLabel/codicon/codicon.ttf -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/codiconLabel/codiconLabel.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import './codicon/codicon.css'; 6 | import './codicon/codicon-animations.css'; 7 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/contextview/contextview.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .context-view { 7 | position: absolute; 8 | z-index: 2500; 9 | } 10 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/countBadge/countBadge.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-count-badge { 7 | padding: 3px 5px; 8 | border-radius: 11px; 9 | font-size: 11px; 10 | min-width: 18px; 11 | min-height: 18px; 12 | line-height: 11px; 13 | font-weight: normal; 14 | text-align: center; 15 | display: inline-block; 16 | box-sizing: border-box; 17 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-keybinding { 7 | display: flex; 8 | align-items: center; 9 | line-height: 10px; 10 | } 11 | 12 | .monaco-keybinding > .monaco-keybinding-key { 13 | display: inline-block; 14 | border: solid 1px rgba(204, 204, 204, 0.4); 15 | border-bottom-color: rgba(187, 187, 187, 0.4); 16 | border-radius: 3px; 17 | box-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4); 18 | background-color: rgba(221, 221, 221, 0.4); 19 | vertical-align: middle; 20 | color: #555; 21 | font-size: 11px; 22 | padding: 3px 5px; 23 | margin: 0 2px; 24 | } 25 | 26 | .monaco-keybinding > .monaco-keybinding-key:first-child { 27 | margin-left: 0; 28 | } 29 | 30 | .monaco-keybinding > .monaco-keybinding-key:last-child { 31 | margin-right: 0; 32 | } 33 | 34 | .hc-black .monaco-keybinding > .monaco-keybinding-key, 35 | .vs-dark .monaco-keybinding > .monaco-keybinding-key { 36 | background-color: rgba(128, 128, 128, 0.17); 37 | color: #ccc; 38 | border: solid 1px rgba(51, 51, 51, 0.6); 39 | border-bottom-color: rgba(68, 68, 68, 0.6); 40 | box-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6); 41 | } 42 | 43 | .monaco-keybinding > .monaco-keybinding-key-separator { 44 | display: inline-block; 45 | } 46 | 47 | .monaco-keybinding > .monaco-keybinding-key-chord-separator { 48 | width: 6px; 49 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/list/list.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | var __extends = (this && this.__extends) || (function () { 6 | var extendStatics = function (d, b) { 7 | extendStatics = Object.setPrototypeOf || 8 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 9 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; 10 | return extendStatics(d, b); 11 | }; 12 | return function (d, b) { 13 | extendStatics(d, b); 14 | function __() { this.constructor = d; } 15 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 16 | }; 17 | })(); 18 | export var ListAriaRootRole; 19 | (function (ListAriaRootRole) { 20 | /** default tree structure role */ 21 | ListAriaRootRole["TREE"] = "tree"; 22 | /** role='tree' can interfere with screenreaders reading nested elements inside the tree row. Use FORM in that case. */ 23 | ListAriaRootRole["FORM"] = "form"; 24 | })(ListAriaRootRole || (ListAriaRootRole = {})); 25 | var ListError = /** @class */ (function (_super) { 26 | __extends(ListError, _super); 27 | function ListError(user, message) { 28 | return _super.call(this, "ListError [" + user + "] " + message) || this; 29 | } 30 | return ListError; 31 | }(Error)); 32 | export { ListError }; 33 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/list/splice.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | var CombinedSpliceable = /** @class */ (function () { 6 | function CombinedSpliceable(spliceables) { 7 | this.spliceables = spliceables; 8 | } 9 | CombinedSpliceable.prototype.splice = function (start, deleteCount, elements) { 10 | this.spliceables.forEach(function (s) { return s.splice(start, deleteCount, elements); }); 11 | }; 12 | return CombinedSpliceable; 13 | }()); 14 | export { CombinedSpliceable }; 15 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/progressbar/progressbar.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-progress-container { 7 | width: 100%; 8 | height: 5px; 9 | overflow: hidden; /* keep progress bit in bounds */ 10 | } 11 | 12 | .monaco-progress-container .progress-bit { 13 | width: 2%; 14 | height: 5px; 15 | position: absolute; 16 | left: 0; 17 | display: none; 18 | } 19 | 20 | .monaco-progress-container.active .progress-bit { 21 | display: inherit; 22 | } 23 | 24 | .monaco-progress-container.discrete .progress-bit { 25 | left: 0; 26 | transition: width 100ms linear; 27 | } 28 | 29 | .monaco-progress-container.discrete.done .progress-bit { 30 | width: 100%; 31 | } 32 | 33 | .monaco-progress-container.infinite .progress-bit { 34 | animation-name: progress; 35 | animation-duration: 4s; 36 | animation-iteration-count: infinite; 37 | animation-timing-function: linear; 38 | transform: translate3d(0px, 0px, 0px); 39 | } 40 | 41 | /** 42 | * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of 43 | * that container. Since translateX is relative to the progress bit size, we have to multiple it with 44 | * its relative size to the parent container: 45 | * 50%: 50 * 50 = 2500% 46 | * 100%: 50 * 100 - 50 (do not overflow): 4950% 47 | */ 48 | @keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } } 49 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/scrollbar/scrollableElementOptions.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/splitview/splitview.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-split-view2 { 7 | position: relative; 8 | width: 100%; 9 | height: 100%; 10 | } 11 | 12 | .monaco-split-view2 > .sash-container { 13 | position: absolute; 14 | width: 100%; 15 | height: 100%; 16 | pointer-events: none; 17 | } 18 | 19 | .monaco-split-view2 > .sash-container > .monaco-sash { 20 | pointer-events: initial; 21 | } 22 | 23 | .monaco-split-view2 > .split-view-container { 24 | width: 100%; 25 | height: 100%; 26 | white-space: nowrap; 27 | position: relative; 28 | } 29 | 30 | .monaco-split-view2 > .split-view-container > .split-view-view { 31 | white-space: initial; 32 | position: absolute; 33 | } 34 | 35 | .monaco-split-view2 > .split-view-container > .split-view-view:not(.visible) { 36 | display: none; 37 | } 38 | 39 | .monaco-split-view2.vertical > .split-view-container > .split-view-view { 40 | width: 100%; 41 | } 42 | 43 | .monaco-split-view2.horizontal > .split-view-container > .split-view-view { 44 | height: 100%; 45 | } 46 | 47 | .monaco-split-view2.separator-border > .split-view-container > .split-view-view:not(:first-child)::before { 48 | content: ' '; 49 | position: absolute; 50 | top: 0; 51 | left: 0; 52 | z-index: 5; 53 | pointer-events: none; 54 | background-color: var(--separator-border); 55 | } 56 | 57 | .monaco-split-view2.separator-border.horizontal > .split-view-container > .split-view-view:not(:first-child)::before { 58 | height: 100%; 59 | width: 1px; 60 | } 61 | 62 | .monaco-split-view2.separator-border.vertical > .split-view-container > .split-view-view:not(:first-child)::before { 63 | height: 1px; 64 | width: 100%; 65 | } 66 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/tree/dataTree.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | var __extends = (this && this.__extends) || (function () { 6 | var extendStatics = function (d, b) { 7 | extendStatics = Object.setPrototypeOf || 8 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 9 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; 10 | return extendStatics(d, b); 11 | }; 12 | return function (d, b) { 13 | extendStatics(d, b); 14 | function __() { this.constructor = d; } 15 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 16 | }; 17 | })(); 18 | import { AbstractTree } from './abstractTree.js'; 19 | import { ObjectTreeModel } from './objectTreeModel.js'; 20 | var DataTree = /** @class */ (function (_super) { 21 | __extends(DataTree, _super); 22 | function DataTree(user, container, delegate, renderers, dataSource, options) { 23 | if (options === void 0) { options = {}; } 24 | var _this = _super.call(this, user, container, delegate, renderers, options) || this; 25 | _this.user = user; 26 | _this.dataSource = dataSource; 27 | _this.identityProvider = options.identityProvider; 28 | return _this; 29 | } 30 | DataTree.prototype.createModel = function (user, view, options) { 31 | return new ObjectTreeModel(user, view, options); 32 | }; 33 | return DataTree; 34 | }(AbstractTree)); 35 | export { DataTree }; 36 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/tree/media/tree.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-tl-row { 7 | display: flex; 8 | height: 100%; 9 | align-items: center; 10 | position: relative; 11 | } 12 | 13 | .monaco-tl-indent { 14 | height: 100%; 15 | position: absolute; 16 | top: 0; 17 | left: 16px; 18 | pointer-events: none; 19 | } 20 | 21 | .hide-arrows .monaco-tl-indent { 22 | left: 12px; 23 | } 24 | 25 | .monaco-tl-indent > .indent-guide { 26 | display: inline-block; 27 | box-sizing: border-box; 28 | height: 100%; 29 | border-left: 1px solid transparent; 30 | } 31 | 32 | .monaco-tl-indent > .indent-guide { 33 | transition: border-color 0.1s linear; 34 | } 35 | 36 | .monaco-tl-twistie, 37 | .monaco-tl-contents { 38 | height: 100%; 39 | } 40 | 41 | .monaco-tl-twistie { 42 | font-size: 10px; 43 | text-align: right; 44 | padding-right: 6px; 45 | flex-shrink: 0; 46 | width: 16px; 47 | display: flex !important; 48 | align-items: center; 49 | justify-content: center; 50 | color: inherit !important; 51 | transform: translateX(3px); 52 | } 53 | 54 | .monaco-tl-contents { 55 | flex: 1; 56 | overflow: hidden; 57 | } 58 | 59 | .monaco-tl-twistie.collapsed::before { 60 | transform: rotate(-90deg); 61 | } 62 | 63 | .monaco-tl-twistie.codicon-loading::before { 64 | animation: codicon-spin 1.25s linear infinite; 65 | } 66 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/browser/ui/tree/tree.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | var __extends = (this && this.__extends) || (function () { 6 | var extendStatics = function (d, b) { 7 | extendStatics = Object.setPrototypeOf || 8 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 9 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; 10 | return extendStatics(d, b); 11 | }; 12 | return function (d, b) { 13 | extendStatics(d, b); 14 | function __() { this.constructor = d; } 15 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 16 | }; 17 | })(); 18 | var TreeError = /** @class */ (function (_super) { 19 | __extends(TreeError, _super); 20 | function TreeError(user, message) { 21 | return _super.call(this, "TreeError [" + user + "] " + message) || this; 22 | } 23 | return TreeError; 24 | }(Error)); 25 | export { TreeError }; 26 | var WeakMapper = /** @class */ (function () { 27 | function WeakMapper(fn) { 28 | this.fn = fn; 29 | this._map = new WeakMap(); 30 | } 31 | WeakMapper.prototype.map = function (key) { 32 | var result = this._map.get(key); 33 | if (!result) { 34 | result = this.fn(key); 35 | this._map.set(key, result); 36 | } 37 | return result; 38 | }; 39 | return WeakMapper; 40 | }()); 41 | export { WeakMapper }; 42 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/assert.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | /** 6 | * Throws an error with the provided message if the provided value does not evaluate to a true Javascript value. 7 | */ 8 | export function ok(value, message) { 9 | if (!value) { 10 | throw new Error(message ? 'Assertion failed (' + message + ')' : 'Assertion Failed'); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/charCode.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/codicons.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | var escapeCodiconsRegex = /(\\)?\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)/gi; 6 | export function escapeCodicons(text) { 7 | return text.replace(escapeCodiconsRegex, function (match, escaped) { return escaped ? match : "\\" + match; }); 8 | } 9 | var markdownEscapedCodiconsRegex = /\\\$\([a-z0-9\-]+?(?:~[a-z0-9\-]*?)?\)/gi; 10 | export function markdownEscapeEscapedCodicons(text) { 11 | // Need to add an extra \ for escaping in markdown 12 | return text.replace(markdownEscapedCodiconsRegex, function (match) { return "\\" + match; }); 13 | } 14 | var renderCodiconsRegex = /(\\)?\$\((([a-z0-9\-]+?)(?:~([a-z0-9\-]*?))?)\)/gi; 15 | export function renderCodicons(text) { 16 | return text.replace(renderCodiconsRegex, function (_, escaped, codicon, name, animation) { 17 | return escaped 18 | ? "$(" + codicon + ")" 19 | : ""; 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/diff/diffChange.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | /** 6 | * Represents information about a specific difference between two sequences. 7 | */ 8 | var DiffChange = /** @class */ (function () { 9 | /** 10 | * Constructs a new DiffChange with the given sequence information 11 | * and content. 12 | */ 13 | function DiffChange(originalStart, originalLength, modifiedStart, modifiedLength) { 14 | //Debug.Assert(originalLength > 0 || modifiedLength > 0, "originalLength and modifiedLength cannot both be <= 0"); 15 | this.originalStart = originalStart; 16 | this.originalLength = originalLength; 17 | this.modifiedStart = modifiedStart; 18 | this.modifiedLength = modifiedLength; 19 | } 20 | /** 21 | * The end point (exclusive) of the change in the original sequence. 22 | */ 23 | DiffChange.prototype.getOriginalEnd = function () { 24 | return this.originalStart + this.originalLength; 25 | }; 26 | /** 27 | * The end point (exclusive) of the change in the modified sequence. 28 | */ 29 | DiffChange.prototype.getModifiedEnd = function () { 30 | return this.modifiedStart + this.modifiedLength; 31 | }; 32 | return DiffChange; 33 | }()); 34 | export { DiffChange }; 35 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/extpath.js: -------------------------------------------------------------------------------- 1 | import { startsWithIgnoreCase } from './strings.js'; 2 | import { sep, posix } from './path.js'; 3 | /** 4 | * Takes a Windows OS path and changes backward slashes to forward slashes. 5 | * This should only be done for OS paths from Windows (or user provided paths potentially from Windows). 6 | * Using it on a Linux or MaxOS path might change it. 7 | */ 8 | export function toSlashes(osPath) { 9 | return osPath.replace(/[\\/]/g, posix.sep); 10 | } 11 | export function isEqualOrParent(path, candidate, ignoreCase, separator) { 12 | if (separator === void 0) { separator = sep; } 13 | if (path === candidate) { 14 | return true; 15 | } 16 | if (!path || !candidate) { 17 | return false; 18 | } 19 | if (candidate.length > path.length) { 20 | return false; 21 | } 22 | if (ignoreCase) { 23 | var beginsWith = startsWithIgnoreCase(path, candidate); 24 | if (!beginsWith) { 25 | return false; 26 | } 27 | if (candidate.length === path.length) { 28 | return true; // same path, different casing 29 | } 30 | var sepOffset = candidate.length; 31 | if (candidate.charAt(candidate.length - 1) === separator) { 32 | sepOffset--; // adjust the expected sep offset in case our candidate already ends in separator character 33 | } 34 | return path.charAt(sepOffset) === separator; 35 | } 36 | if (candidate.charAt(candidate.length - 1) !== separator) { 37 | candidate += separator; 38 | } 39 | return path.indexOf(candidate) === 0; 40 | } 41 | export function isWindowsDriveLetter(char0) { 42 | return char0 >= 65 /* A */ && char0 <= 90 /* Z */ || char0 >= 97 /* a */ && char0 <= 122 /* z */; 43 | } 44 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/functional.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | export function once(fn) { 6 | var _this = this; 7 | var didCall = false; 8 | var result; 9 | return function () { 10 | if (didCall) { 11 | return result; 12 | } 13 | didCall = true; 14 | result = fn.apply(_this, arguments); 15 | return result; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/idGenerator.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | var IdGenerator = /** @class */ (function () { 6 | function IdGenerator(prefix) { 7 | this._prefix = prefix; 8 | this._lastId = 0; 9 | } 10 | IdGenerator.prototype.nextId = function () { 11 | return this._prefix + (++this._lastId); 12 | }; 13 | return IdGenerator; 14 | }()); 15 | export { IdGenerator }; 16 | export var defaultGenerator = new IdGenerator('id#'); 17 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/jsonSchema.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/lazy.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | var Lazy = /** @class */ (function () { 6 | function Lazy(executor) { 7 | this.executor = executor; 8 | this._didRun = false; 9 | } 10 | /** 11 | * Get the wrapped value. 12 | * 13 | * This will force evaluation of the lazy value if it has not been resolved yet. Lazy values are only 14 | * resolved once. `getValue` will re-throw exceptions that are hit while resolving the value 15 | */ 16 | Lazy.prototype.getValue = function () { 17 | if (!this._didRun) { 18 | try { 19 | this._value = this.executor(); 20 | } 21 | catch (err) { 22 | this._error = err; 23 | } 24 | finally { 25 | this._didRun = true; 26 | } 27 | } 28 | if (this._error) { 29 | throw this._error; 30 | } 31 | return this._value; 32 | }; 33 | Object.defineProperty(Lazy.prototype, "rawValue", { 34 | /** 35 | * Get the wrapped value without forcing evaluation. 36 | */ 37 | get: function () { return this._value; }, 38 | enumerable: true, 39 | configurable: true 40 | }); 41 | return Lazy; 42 | }()); 43 | export { Lazy }; 44 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/marshalling.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { URI } from './uri.js'; 6 | export function parse(text) { 7 | var data = JSON.parse(text); 8 | data = revive(data); 9 | return data; 10 | } 11 | export function revive(obj, depth) { 12 | if (depth === void 0) { depth = 0; } 13 | if (!obj || depth > 200) { 14 | return obj; 15 | } 16 | if (typeof obj === 'object') { 17 | switch (obj.$mid) { 18 | case 1: return URI.revive(obj); 19 | case 2: return new RegExp(obj.source, obj.flags); 20 | } 21 | // walk object (or array) 22 | for (var key in obj) { 23 | if (Object.hasOwnProperty.call(obj, key)) { 24 | obj[key] = revive(obj[key], depth + 1); 25 | } 26 | } 27 | } 28 | return obj; 29 | } 30 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/numbers.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | export function clamp(value, min, max) { 6 | return Math.min(Math.max(value, min), max); 7 | } 8 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/paging.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/src/monaco/monaco-editor/esm/vs/base/common/paging.js -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/process.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { isWindows, isMacintosh, setImmediate } from './platform.js'; 6 | var safeProcess = (typeof process === 'undefined') ? { 7 | cwd: function () { return '/'; }, 8 | env: Object.create(null), 9 | get platform() { return isWindows ? 'win32' : isMacintosh ? 'darwin' : 'linux'; }, 10 | nextTick: function (callback) { return setImmediate(callback); } 11 | } : process; 12 | export var cwd = safeProcess.cwd; 13 | export var env = safeProcess.env; 14 | export var platform = safeProcess.platform; 15 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/range.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | export var Range; 6 | (function (Range) { 7 | /** 8 | * Returns the intersection between two ranges as a range itself. 9 | * Returns `{ start: 0, end: 0 }` if the intersection is empty. 10 | */ 11 | function intersect(one, other) { 12 | if (one.start >= other.end || other.start >= one.end) { 13 | return { start: 0, end: 0 }; 14 | } 15 | var start = Math.max(one.start, other.start); 16 | var end = Math.min(one.end, other.end); 17 | if (end - start <= 0) { 18 | return { start: 0, end: 0 }; 19 | } 20 | return { start: start, end: end }; 21 | } 22 | Range.intersect = intersect; 23 | function isEmpty(range) { 24 | return range.end - range.start <= 0; 25 | } 26 | Range.isEmpty = isEmpty; 27 | function intersects(one, other) { 28 | return !isEmpty(intersect(one, other)); 29 | } 30 | Range.intersects = intersects; 31 | function relativeComplement(one, other) { 32 | var result = []; 33 | var first = { start: one.start, end: Math.min(other.start, one.end) }; 34 | var second = { start: Math.max(other.end, one.start), end: one.end }; 35 | if (!isEmpty(first)) { 36 | result.push(first); 37 | } 38 | if (!isEmpty(second)) { 39 | result.push(second); 40 | } 41 | return result; 42 | } 43 | Range.relativeComplement = relativeComplement; 44 | })(Range || (Range = {})); 45 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/sequence.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/src/monaco/monaco-editor/esm/vs/base/common/sequence.js -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/severity.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import * as nls from '../../nls.js'; 6 | import * as strings from './strings.js'; 7 | var Severity; 8 | (function (Severity) { 9 | Severity[Severity["Ignore"] = 0] = "Ignore"; 10 | Severity[Severity["Info"] = 1] = "Info"; 11 | Severity[Severity["Warning"] = 2] = "Warning"; 12 | Severity[Severity["Error"] = 3] = "Error"; 13 | })(Severity || (Severity = {})); 14 | (function (Severity) { 15 | var _error = 'error'; 16 | var _warning = 'warning'; 17 | var _warn = 'warn'; 18 | var _info = 'info'; 19 | var _displayStrings = Object.create(null); 20 | _displayStrings[Severity.Error] = nls.localize('sev.error', "Error"); 21 | _displayStrings[Severity.Warning] = nls.localize('sev.warning', "Warning"); 22 | _displayStrings[Severity.Info] = nls.localize('sev.info', "Info"); 23 | /** 24 | * Parses 'error', 'warning', 'warn', 'info' in call casings 25 | * and falls back to ignore. 26 | */ 27 | function fromValue(value) { 28 | if (!value) { 29 | return Severity.Ignore; 30 | } 31 | if (strings.equalsIgnoreCase(_error, value)) { 32 | return Severity.Error; 33 | } 34 | if (strings.equalsIgnoreCase(_warning, value) || strings.equalsIgnoreCase(_warn, value)) { 35 | return Severity.Warning; 36 | } 37 | if (strings.equalsIgnoreCase(_info, value)) { 38 | return Severity.Info; 39 | } 40 | return Severity.Ignore; 41 | } 42 | Severity.fromValue = fromValue; 43 | })(Severity || (Severity = {})); 44 | export default Severity; 45 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/stopwatch.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { globals } from './platform.js'; 6 | var hasPerformanceNow = (globals.performance && typeof globals.performance.now === 'function'); 7 | var StopWatch = /** @class */ (function () { 8 | function StopWatch(highResolution) { 9 | this._highResolution = hasPerformanceNow && highResolution; 10 | this._startTime = this._now(); 11 | this._stopTime = -1; 12 | } 13 | StopWatch.create = function (highResolution) { 14 | if (highResolution === void 0) { highResolution = true; } 15 | return new StopWatch(highResolution); 16 | }; 17 | StopWatch.prototype.stop = function () { 18 | this._stopTime = this._now(); 19 | }; 20 | StopWatch.prototype.elapsed = function () { 21 | if (this._stopTime !== -1) { 22 | return this._stopTime - this._startTime; 23 | } 24 | return this._now() - this._startTime; 25 | }; 26 | StopWatch.prototype._now = function () { 27 | return this._highResolution ? globals.performance.now() : new Date().getTime(); 28 | }; 29 | return StopWatch; 30 | }()); 31 | export { StopWatch }; 32 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/styler.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/common/uint.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | export function toUint8(v) { 6 | if (v < 0) { 7 | return 0; 8 | } 9 | if (v > 255 /* MAX_UINT_8 */) { 10 | return 255 /* MAX_UINT_8 */; 11 | } 12 | return v | 0; 13 | } 14 | export function toUint32(v) { 15 | if (v < 0) { 16 | return 0; 17 | } 18 | if (v > 4294967295 /* MAX_UINT_32 */) { 19 | return 4294967295 /* MAX_UINT_32 */; 20 | } 21 | return v | 0; 22 | } 23 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/parts/quickopen/common/quickOpen.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/parts/tree/browser/tree.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | .monaco-tree { 6 | height: 100%; 7 | width: 100%; 8 | white-space: nowrap; 9 | user-select: none; 10 | -webkit-user-select: none; 11 | -ms-user-select: none; 12 | position: relative; 13 | } 14 | 15 | .monaco-tree > .monaco-scrollable-element { 16 | height: 100%; 17 | } 18 | 19 | .monaco-tree > .monaco-scrollable-element > .monaco-tree-wrapper { 20 | height: 100%; 21 | width: 100%; 22 | position: relative; 23 | } 24 | 25 | .monaco-tree .monaco-tree-rows { 26 | position: absolute; 27 | width: 100%; 28 | height: 100%; 29 | } 30 | 31 | .monaco-tree .monaco-tree-rows > .monaco-tree-row { 32 | box-sizing: border-box; 33 | cursor: pointer; 34 | overflow: hidden; 35 | width: 100%; 36 | touch-action: none; 37 | } 38 | 39 | .monaco-tree .monaco-tree-rows > .monaco-tree-row > .content { 40 | position: relative; 41 | height: 100%; 42 | } 43 | 44 | .monaco-tree-drag-image { 45 | display: inline-block; 46 | padding: 1px 7px; 47 | border-radius: 10px; 48 | font-size: 12px; 49 | position: absolute; 50 | } 51 | 52 | /* for OS X ballistic scrolling */ 53 | .monaco-tree .monaco-tree-rows > .monaco-tree-row.scrolling { 54 | display: none; 55 | } 56 | 57 | /* Highlighted */ 58 | 59 | .monaco-tree.highlighted .monaco-tree-rows > .monaco-tree-row:not(.highlighted) { 60 | opacity: 0.3; 61 | } 62 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/base/parts/tree/browser/treeDnd.js: -------------------------------------------------------------------------------- 1 | var ElementsDragAndDropData = /** @class */ (function () { 2 | function ElementsDragAndDropData(elements) { 3 | this.elements = elements; 4 | } 5 | ElementsDragAndDropData.prototype.update = function (dataTransfer) { 6 | // no-op 7 | }; 8 | ElementsDragAndDropData.prototype.getData = function () { 9 | return this.elements; 10 | }; 11 | return ElementsDragAndDropData; 12 | }()); 13 | export { ElementsDragAndDropData }; 14 | var ExternalElementsDragAndDropData = /** @class */ (function () { 15 | function ExternalElementsDragAndDropData(elements) { 16 | this.elements = elements; 17 | } 18 | ExternalElementsDragAndDropData.prototype.update = function (dataTransfer) { 19 | // no-op 20 | }; 21 | ExternalElementsDragAndDropData.prototype.getData = function () { 22 | return this.elements; 23 | }; 24 | return ExternalElementsDragAndDropData; 25 | }()); 26 | export { ExternalElementsDragAndDropData }; 27 | var DesktopDragAndDropData = /** @class */ (function () { 28 | function DesktopDragAndDropData() { 29 | this.types = []; 30 | this.files = []; 31 | } 32 | DesktopDragAndDropData.prototype.update = function (dataTransfer) { 33 | if (dataTransfer.types) { 34 | this.types = []; 35 | Array.prototype.push.apply(this.types, dataTransfer.types); 36 | } 37 | if (dataTransfer.files) { 38 | this.files = []; 39 | Array.prototype.push.apply(this.files, dataTransfer.files); 40 | this.files = this.files.filter(function (f) { return f.size || f.type; }); 41 | } 42 | }; 43 | DesktopDragAndDropData.prototype.getData = function () { 44 | return { 45 | types: this.types, 46 | files: this.files 47 | }; 48 | }; 49 | return DesktopDragAndDropData; 50 | }()); 51 | export { DesktopDragAndDropData }; 52 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/basic-languages/monaco.contribution.js: -------------------------------------------------------------------------------- 1 | import '../editor/editor.api.js'; 2 | import './typescript/typescript.contribution.js'; 3 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/basic-languages/typescript/typescript.contribution.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 'use strict'; 6 | import { registerLanguage } from '../_.contribution.js'; 7 | registerLanguage({ 8 | id: 'typescript', 9 | extensions: ['.ts', '.tsx'], 10 | aliases: ['TypeScript', 'ts', 'typescript'], 11 | mimetypes: ['text/typescript'], 12 | loader: function () { return import('./typescript.js'); } 13 | }); 14 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/controller/textAreaHandler.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .inputarea { 7 | min-width: 0; 8 | min-height: 0; 9 | margin: 0; 10 | padding: 0; 11 | position: absolute; 12 | outline: none !important; 13 | resize: none; 14 | border: none; 15 | overflow: hidden; 16 | color: transparent; 17 | background-color: transparent; 18 | } 19 | /*.monaco-editor .inputarea { 20 | position: fixed !important; 21 | width: 800px !important; 22 | height: 500px !important; 23 | top: initial !important; 24 | left: initial !important; 25 | bottom: 0 !important; 26 | right: 0 !important; 27 | color: black !important; 28 | background: white !important; 29 | line-height: 15px !important; 30 | font-size: 14px !important; 31 | }*/ 32 | .monaco-editor .inputarea.ime-input { 33 | z-index: 10; 34 | } 35 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/editorBrowser.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import * as editorCommon from '../common/editorCommon.js'; 6 | /** 7 | *@internal 8 | */ 9 | export function isCodeEditor(thing) { 10 | if (thing && typeof thing.getEditorType === 'function') { 11 | return thing.getEditorType() === editorCommon.EditorType.ICodeEditor; 12 | } 13 | else { 14 | return false; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../../platform/instantiation/common/instantiation.js'; 6 | export var IBulkEditService = createDecorator('IWorkspaceEditService'); 7 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../../platform/instantiation/common/instantiation.js'; 6 | export var ICodeEditorService = createDecorator('codeEditorService'); 7 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/view/dynamicViewOverlay.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | var __extends = (this && this.__extends) || (function () { 6 | var extendStatics = function (d, b) { 7 | extendStatics = Object.setPrototypeOf || 8 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 9 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; 10 | return extendStatics(d, b); 11 | }; 12 | return function (d, b) { 13 | extendStatics(d, b); 14 | function __() { this.constructor = d; } 15 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 16 | }; 17 | })(); 18 | import { ViewEventHandler } from '../../common/viewModel/viewEventHandler.js'; 19 | var DynamicViewOverlay = /** @class */ (function (_super) { 20 | __extends(DynamicViewOverlay, _super); 21 | function DynamicViewOverlay() { 22 | return _super !== null && _super.apply(this, arguments) || this; 23 | } 24 | return DynamicViewOverlay; 25 | }(ViewEventHandler)); 26 | export { DynamicViewOverlay }; 27 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .view-overlays .current-line { 7 | display: block; 8 | position: absolute; 9 | left: 0; 10 | top: 0; 11 | box-sizing: border-box; 12 | } 13 | 14 | .monaco-editor .margin-view-overlays .current-line { 15 | display: block; 16 | position: absolute; 17 | left: 0; 18 | top: 0; 19 | box-sizing: border-box; 20 | } 21 | 22 | .monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both { 23 | border-right: 0; 24 | } 25 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/viewParts/decorations/decorations.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | /* 7 | Keeping name short for faster parsing. 8 | cdr = core decorations rendering (div) 9 | */ 10 | .monaco-editor .lines-content .cdr { 11 | position: absolute; 12 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .glyph-margin { 7 | position: absolute; 8 | top: 0; 9 | } 10 | 11 | /* 12 | Keeping name short for faster parsing. 13 | cgmr = core glyph margin rendering (div) 14 | */ 15 | .monaco-editor .margin-view-overlays .cgmr { 16 | position: absolute; 17 | display: flex; 18 | align-items: center; 19 | justify-content: center; 20 | } 21 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | /* 7 | Keeping name short for faster parsing. 8 | cigr = core ident guides rendering (div) 9 | */ 10 | .monaco-editor .lines-content .cigr { 11 | position: absolute; 12 | } 13 | .monaco-editor .lines-content .cigra { 14 | position: absolute; 15 | } 16 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .margin-view-overlays .line-numbers { 7 | position: absolute; 8 | text-align: right; 9 | display: inline-block; 10 | vertical-align: middle; 11 | box-sizing: border-box; 12 | cursor: default; 13 | height: 100%; 14 | } 15 | 16 | .monaco-editor .relative-current-line-number { 17 | text-align: left; 18 | display: inline-block; 19 | width: 100%; 20 | } 21 | 22 | .monaco-editor .margin-view-overlays .line-numbers.lh-odd { 23 | margin-top: 1px; 24 | } 25 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | .monaco-editor .lines-decorations { 6 | position: absolute; 7 | top: 0; 8 | background: white; 9 | } 10 | 11 | /* 12 | Keeping name short for faster parsing. 13 | cldr = core lines decorations rendering (div) 14 | */ 15 | .monaco-editor .margin-view-overlays .cldr { 16 | position: absolute; 17 | height: 100%; 18 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | /* 7 | Keeping name short for faster parsing. 8 | cmdr = core margin decorations rendering (div) 9 | */ 10 | .monaco-editor .margin-view-overlays .cmdr { 11 | position: absolute; 12 | left: 0; 13 | width: 100%; 14 | height: 100%; 15 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimap.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | /* START cover the case that slider is visible on mouseover */ 7 | .monaco-editor .minimap.slider-mouseover .minimap-slider { 8 | opacity: 0; 9 | transition: opacity 100ms linear; 10 | } 11 | .monaco-editor .minimap.slider-mouseover:hover .minimap-slider { 12 | opacity: 1; 13 | } 14 | .monaco-editor .minimap.slider-mouseover .minimap-slider.active { 15 | opacity: 1; 16 | } 17 | /* END cover the case that slider is visible on mouseover */ 18 | 19 | .monaco-editor .minimap-shadow-hidden { 20 | position: absolute; 21 | width: 0; 22 | } 23 | .monaco-editor .minimap-shadow-visible { 24 | position: absolute; 25 | left: -6px; 26 | width: 6px; 27 | } 28 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/viewParts/minimap/minimapCharSheet.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | export var allCharCodes = (function () { 6 | var v = []; 7 | for (var i = 32 /* START_CH_CODE */; i <= 126 /* END_CH_CODE */; i++) { 8 | v.push(i); 9 | } 10 | v.push(65533 /* UNKNOWN_CODE */); 11 | return v; 12 | })(); 13 | export var getCharIndex = function (chCode, fontScale) { 14 | chCode -= 32 /* START_CH_CODE */; 15 | if (chCode < 0 || chCode > 96 /* CHAR_COUNT */) { 16 | if (fontScale <= 2) { 17 | // for smaller scales, we can get away with using any ASCII character... 18 | return (chCode + 96 /* CHAR_COUNT */) % 96 /* CHAR_COUNT */; 19 | } 20 | return 96 /* CHAR_COUNT */ - 1; // unknown symbol 21 | } 22 | return chCode; 23 | }; 24 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | .monaco-editor .overlayWidgets { 6 | position: absolute; 7 | top: 0; 8 | left:0; 9 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/viewParts/rulers/rulers.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .view-ruler { 7 | position: absolute; 8 | top: 0; 9 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .scroll-decoration { 7 | position: absolute; 8 | top: 0; 9 | left: 0; 10 | height: 6px; 11 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/viewParts/selections/selections.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | /* 7 | Keeping name short for faster parsing. 8 | cslr = core selections layer rendering (div) 9 | */ 10 | .monaco-editor .lines-content .cslr { 11 | position: absolute; 12 | } 13 | 14 | .monaco-editor .top-left-radius { border-top-left-radius: 3px; } 15 | .monaco-editor .bottom-left-radius { border-bottom-left-radius: 3px; } 16 | .monaco-editor .top-right-radius { border-top-right-radius: 3px; } 17 | .monaco-editor .bottom-right-radius { border-bottom-right-radius: 3px; } 18 | 19 | .monaco-editor.hc-black .top-left-radius { border-top-left-radius: 0; } 20 | .monaco-editor.hc-black .bottom-left-radius { border-bottom-left-radius: 0; } 21 | .monaco-editor.hc-black .top-right-radius { border-top-right-radius: 0; } 22 | .monaco-editor.hc-black .bottom-right-radius { border-bottom-right-radius: 0; } 23 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/widget/media/diffReview.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-diff-editor .diff-review-line-number { 7 | text-align: right; 8 | display: inline-block; 9 | } 10 | 11 | .monaco-diff-editor .diff-review { 12 | position: absolute; 13 | user-select: none; 14 | -webkit-user-select: none; 15 | -ms-user-select: none; 16 | } 17 | 18 | .monaco-diff-editor .diff-review-summary { 19 | padding-left: 10px; 20 | } 21 | 22 | .monaco-diff-editor .diff-review-shadow { 23 | position: absolute; 24 | } 25 | 26 | .monaco-diff-editor .diff-review-row { 27 | white-space: pre; 28 | } 29 | 30 | .monaco-diff-editor .diff-review-table { 31 | display: table; 32 | min-width: 100%; 33 | } 34 | 35 | .monaco-diff-editor .diff-review-row { 36 | display: table-row; 37 | width: 100%; 38 | } 39 | 40 | .monaco-diff-editor .diff-review-cell { 41 | display: table-cell; 42 | } 43 | 44 | .monaco-diff-editor .diff-review-spacer { 45 | display: inline-block; 46 | width: 10px; 47 | } 48 | 49 | .monaco-diff-editor .diff-review-actions { 50 | display: inline-block; 51 | position: absolute; 52 | right: 10px; 53 | top: 2px; 54 | } 55 | 56 | .monaco-diff-editor .diff-review-actions .action-label { 57 | width: 16px; 58 | height: 16px; 59 | margin: 2px 0; 60 | } 61 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/browser/widget/media/editor.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | /* -------------------- IE10 remove auto clear button -------------------- */ 7 | 8 | ::-ms-clear { 9 | display: none; 10 | } 11 | 12 | /* All widgets */ 13 | /* I am not a big fan of this rule */ 14 | .monaco-editor .editor-widget input { 15 | color: inherit; 16 | } 17 | 18 | /* -------------------- Editor -------------------- */ 19 | 20 | .monaco-editor { 21 | position: relative; 22 | overflow: visible; 23 | -webkit-text-size-adjust: 100%; 24 | } 25 | 26 | /* -------------------- Misc -------------------- */ 27 | 28 | .monaco-editor .overflow-guard { 29 | position: relative; 30 | overflow: hidden; 31 | } 32 | 33 | .monaco-editor .view-overlays { 34 | position: absolute; 35 | top: 0; 36 | } 37 | 38 | /* 39 | .monaco-editor .auto-closed-character { 40 | opacity: 0.3; 41 | } 42 | */ 43 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/commands/surroundSelectionCommand.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { Range } from '../core/range.js'; 6 | import { Selection } from '../core/selection.js'; 7 | var SurroundSelectionCommand = /** @class */ (function () { 8 | function SurroundSelectionCommand(range, charBeforeSelection, charAfterSelection) { 9 | this._range = range; 10 | this._charBeforeSelection = charBeforeSelection; 11 | this._charAfterSelection = charAfterSelection; 12 | } 13 | SurroundSelectionCommand.prototype.getEditOperations = function (model, builder) { 14 | builder.addTrackedEditOperation(new Range(this._range.startLineNumber, this._range.startColumn, this._range.startLineNumber, this._range.startColumn), this._charBeforeSelection); 15 | builder.addTrackedEditOperation(new Range(this._range.endLineNumber, this._range.endColumn, this._range.endLineNumber, this._range.endColumn), this._charAfterSelection); 16 | }; 17 | SurroundSelectionCommand.prototype.computeCursorState = function (model, helper) { 18 | var inverseEditOperations = helper.getInverseEditOperations(); 19 | var firstOperationRange = inverseEditOperations[0].range; 20 | var secondOperationRange = inverseEditOperations[1].range; 21 | return new Selection(firstOperationRange.endLineNumber, firstOperationRange.endColumn, secondOperationRange.endLineNumber, secondOperationRange.endColumn - this._charAfterSelection.length); 22 | }; 23 | return SurroundSelectionCommand; 24 | }()); 25 | export { SurroundSelectionCommand }; 26 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/config/editorZoom.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { Emitter } from '../../../base/common/event.js'; 6 | export var EditorZoom = new /** @class */ (function () { 7 | function class_1() { 8 | this._zoomLevel = 0; 9 | this._onDidChangeZoomLevel = new Emitter(); 10 | this.onDidChangeZoomLevel = this._onDidChangeZoomLevel.event; 11 | } 12 | class_1.prototype.getZoomLevel = function () { 13 | return this._zoomLevel; 14 | }; 15 | class_1.prototype.setZoomLevel = function (zoomLevel) { 16 | zoomLevel = Math.min(Math.max(-5, zoomLevel), 20); 17 | if (this._zoomLevel === zoomLevel) { 18 | return; 19 | } 20 | this._zoomLevel = zoomLevel; 21 | this._onDidChangeZoomLevel.fire(this._zoomLevel); 22 | }; 23 | return class_1; 24 | }()); 25 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/controller/cursorEvents.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/core/editOperation.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { Range } from './range.js'; 6 | var EditOperation = /** @class */ (function () { 7 | function EditOperation() { 8 | } 9 | EditOperation.insert = function (position, text) { 10 | return { 11 | range: new Range(position.lineNumber, position.column, position.lineNumber, position.column), 12 | text: text, 13 | forceMoveMarkers: true 14 | }; 15 | }; 16 | EditOperation.delete = function (range) { 17 | return { 18 | range: range, 19 | text: null 20 | }; 21 | }; 22 | EditOperation.replace = function (range, text) { 23 | return { 24 | range: range, 25 | text: text 26 | }; 27 | }; 28 | EditOperation.replaceMove = function (range, text) { 29 | return { 30 | range: range, 31 | text: text, 32 | forceMoveMarkers: true 33 | }; 34 | }; 35 | return EditOperation; 36 | }()); 37 | export { EditOperation }; 38 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/core/rgba.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | /** 6 | * A very VM friendly rgba datastructure. 7 | * Please don't touch unless you take a look at the IR. 8 | */ 9 | var RGBA8 = /** @class */ (function () { 10 | function RGBA8(r, g, b, a) { 11 | this.r = RGBA8._clamp(r); 12 | this.g = RGBA8._clamp(g); 13 | this.b = RGBA8._clamp(b); 14 | this.a = RGBA8._clamp(a); 15 | } 16 | RGBA8._clamp = function (c) { 17 | if (c < 0) { 18 | return 0; 19 | } 20 | if (c > 255) { 21 | return 255; 22 | } 23 | return c | 0; 24 | }; 25 | RGBA8.Empty = new RGBA8(0, 0, 0, 0); 26 | return RGBA8; 27 | }()); 28 | export { RGBA8 }; 29 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/core/token.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | var Token = /** @class */ (function () { 6 | function Token(offset, type, language) { 7 | this.offset = offset | 0; // @perf 8 | this.type = type; 9 | this.language = language; 10 | } 11 | Token.prototype.toString = function () { 12 | return '(' + this.offset + ', ' + this.type + ')'; 13 | }; 14 | return Token; 15 | }()); 16 | export { Token }; 17 | var TokenizationResult = /** @class */ (function () { 18 | function TokenizationResult(tokens, endState) { 19 | this.tokens = tokens; 20 | this.endState = endState; 21 | } 22 | return TokenizationResult; 23 | }()); 24 | export { TokenizationResult }; 25 | var TokenizationResult2 = /** @class */ (function () { 26 | function TokenizationResult2(tokens, endState) { 27 | this.tokens = tokens; 28 | this.endState = endState; 29 | } 30 | return TokenizationResult2; 31 | }()); 32 | export { TokenizationResult2 }; 33 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/editorAction.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | var InternalEditorAction = /** @class */ (function () { 6 | function InternalEditorAction(id, label, alias, precondition, run, contextKeyService) { 7 | this.id = id; 8 | this.label = label; 9 | this.alias = alias; 10 | this._precondition = precondition; 11 | this._run = run; 12 | this._contextKeyService = contextKeyService; 13 | } 14 | InternalEditorAction.prototype.isSupported = function () { 15 | return this._contextKeyService.contextMatchesRules(this._precondition); 16 | }; 17 | InternalEditorAction.prototype.run = function () { 18 | if (!this.isSupported()) { 19 | return Promise.resolve(undefined); 20 | } 21 | var r = this._run(); 22 | return r ? r : Promise.resolve(undefined); 23 | }; 24 | return InternalEditorAction; 25 | }()); 26 | export { InternalEditorAction }; 27 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/editorCommon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @internal 3 | */ 4 | export function isThemeColor(o) { 5 | return o && typeof o.id === 'string'; 6 | } 7 | /** 8 | * The type of the `IEditor`. 9 | */ 10 | export var EditorType = { 11 | ICodeEditor: 'vs.editor.ICodeEditor', 12 | IDiffEditor: 'vs.editor.IDiffEditor' 13 | }; 14 | /** 15 | * Built-in commands. 16 | * @internal 17 | */ 18 | export var Handler = { 19 | ExecuteCommand: 'executeCommand', 20 | ExecuteCommands: 'executeCommands', 21 | Type: 'type', 22 | ReplacePreviousChar: 'replacePreviousChar', 23 | CompositionStart: 'compositionStart', 24 | CompositionEnd: 'compositionEnd', 25 | Paste: 'paste', 26 | Cut: 'cut', 27 | Undo: 'undo', 28 | Redo: 'redo', 29 | }; 30 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/modes/abstractMode.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | var FrankensteinMode = /** @class */ (function () { 6 | function FrankensteinMode(languageIdentifier) { 7 | this._languageIdentifier = languageIdentifier; 8 | } 9 | FrankensteinMode.prototype.getId = function () { 10 | return this._languageIdentifier.language; 11 | }; 12 | return FrankensteinMode; 13 | }()); 14 | export { FrankensteinMode }; 15 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/modes/nullMode.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { Token, TokenizationResult, TokenizationResult2 } from '../core/token.js'; 6 | import { LanguageIdentifier } from '../modes.js'; 7 | var NullStateImpl = /** @class */ (function () { 8 | function NullStateImpl() { 9 | } 10 | NullStateImpl.prototype.clone = function () { 11 | return this; 12 | }; 13 | NullStateImpl.prototype.equals = function (other) { 14 | return (this === other); 15 | }; 16 | return NullStateImpl; 17 | }()); 18 | export var NULL_STATE = new NullStateImpl(); 19 | export var NULL_MODE_ID = 'vs.editor.nullMode'; 20 | export var NULL_LANGUAGE_IDENTIFIER = new LanguageIdentifier(NULL_MODE_ID, 0 /* Null */); 21 | export function nullTokenize(modeId, buffer, state, deltaOffset) { 22 | return new TokenizationResult([new Token(deltaOffset, '', modeId)], state); 23 | } 24 | export function nullTokenize2(languageId, buffer, state, deltaOffset) { 25 | var tokens = new Uint32Array(2); 26 | tokens[0] = deltaOffset; 27 | tokens[1] = ((languageId << 0 /* LANGUAGEID_OFFSET */) 28 | | (0 /* Other */ << 8 /* TOKEN_TYPE_OFFSET */) 29 | | (0 /* None */ << 11 /* FONT_STYLE_OFFSET */) 30 | | (1 /* DefaultForeground */ << 14 /* FOREGROUND_OFFSET */) 31 | | (2 /* DefaultBackground */ << 23 /* BACKGROUND_OFFSET */)) >>> 0; 32 | return new TokenizationResult2(tokens, state === null ? NULL_STATE : state); 33 | } 34 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/services/editorWorkerService.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../../platform/instantiation/common/instantiation.js'; 6 | export var ID_EDITOR_WORKER_SERVICE = 'editorWorkerService'; 7 | export var IEditorWorkerService = createDecorator(ID_EDITOR_WORKER_SERVICE); 8 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/services/markersDecorationService.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../../platform/instantiation/common/instantiation.js'; 6 | export var IMarkerDecorationsService = createDecorator('markerDecorationsService'); 7 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/services/modeService.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../../platform/instantiation/common/instantiation.js'; 6 | export var IModeService = createDecorator('modeService'); 7 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/services/modelService.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../../platform/instantiation/common/instantiation.js'; 6 | export var IModelService = createDecorator('modelService'); 7 | export function shouldSynchronizeModel(model) { 8 | return (!model.isTooLargeForSyncing() && !model.isForSimpleWidget); 9 | } 10 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/services/resolverService.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../../platform/instantiation/common/instantiation.js'; 6 | export var ITextModelService = createDecorator('textModelService'); 7 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/services/textResourceConfigurationService.js: -------------------------------------------------------------------------------- 1 | import { createDecorator } from '../../../platform/instantiation/common/instantiation.js'; 2 | export var ITextResourceConfigurationService = createDecorator('textResourceConfigurationService'); 3 | export var ITextResourcePropertiesService = createDecorator('textResourcePropertiesService'); 4 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/view/viewContext.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | var ViewContext = /** @class */ (function () { 6 | function ViewContext(configuration, theme, model, privateViewEventBus) { 7 | this.configuration = configuration; 8 | this.theme = theme; 9 | this.model = model; 10 | this.viewLayout = model.viewLayout; 11 | this.privateViewEventBus = privateViewEventBus; 12 | } 13 | ViewContext.prototype.addEventHandler = function (eventHandler) { 14 | this.privateViewEventBus.addEventHandler(eventHandler); 15 | }; 16 | ViewContext.prototype.removeEventHandler = function (eventHandler) { 17 | this.privateViewEventBus.removeEventHandler(eventHandler); 18 | }; 19 | return ViewContext; 20 | }()); 21 | export { ViewContext }; 22 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/common/viewLayout/viewLinesViewportData.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { Range } from '../core/range.js'; 6 | /** 7 | * Contains all data needed to render at a specific viewport. 8 | */ 9 | var ViewportData = /** @class */ (function () { 10 | function ViewportData(selections, partialData, whitespaceViewportData, model) { 11 | this.selections = selections; 12 | this.startLineNumber = partialData.startLineNumber | 0; 13 | this.endLineNumber = partialData.endLineNumber | 0; 14 | this.relativeVerticalOffset = partialData.relativeVerticalOffset; 15 | this.bigNumbersDelta = partialData.bigNumbersDelta | 0; 16 | this.whitespaceViewportData = whitespaceViewportData; 17 | this._model = model; 18 | this.visibleRange = new Range(partialData.startLineNumber, this._model.getLineMinColumn(partialData.startLineNumber), partialData.endLineNumber, this._model.getLineMaxColumn(partialData.endLineNumber)); 19 | } 20 | ViewportData.prototype.getViewLineRenderingData = function (lineNumber) { 21 | return this._model.getViewLineRenderingData(this.visibleRange, lineNumber); 22 | }; 23 | ViewportData.prototype.getDecorationsInViewport = function () { 24 | return this._model.getDecorationsInViewport(this.visibleRange); 25 | }; 26 | return ViewportData; 27 | }()); 28 | export { ViewportData }; 29 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/bracketMatching/bracketMatching.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .bracket-match { 7 | box-sizing: border-box; 8 | } 9 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/clipboard/clipboard.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-menu .monaco-action-bar.vertical .action-label.hover { 7 | background-color: #EEE; 8 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/codeAction/codeActionContributions.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { registerEditorAction, registerEditorCommand, registerEditorContribution } from '../../browser/editorExtensions.js'; 6 | import { CodeActionCommand, OrganizeImportsAction, QuickFixAction, QuickFixController, RefactorAction, SourceAction, AutoFixAction, FixAllAction } from './codeActionCommands.js'; 7 | registerEditorContribution(QuickFixController.ID, QuickFixController); 8 | registerEditorAction(QuickFixAction); 9 | registerEditorAction(RefactorAction); 10 | registerEditorAction(SourceAction); 11 | registerEditorAction(OrganizeImportsAction); 12 | registerEditorAction(AutoFixAction); 13 | registerEditorAction(FixAllAction); 14 | registerEditorCommand(new CodeActionCommand()); 15 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/codeAction/lightBulbWidget.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .lightbulb-glyph, 7 | .monaco-editor .codicon-lightbulb { 8 | display: flex; 9 | align-items: center; 10 | justify-content: center; 11 | height: 16px; 12 | width: 20px; 13 | padding-left: 2px; 14 | } 15 | 16 | .monaco-editor .lightbulb-glyph:hover, 17 | .monaco-editor .codicon-lightbulb:hover { 18 | cursor: pointer; 19 | /* transform: scale(1.3, 1.3); */ 20 | } 21 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/codelens/codelensWidget.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .codelens-decoration { 7 | overflow: hidden; 8 | display: inline-block; 9 | text-overflow: ellipsis; 10 | } 11 | 12 | .monaco-editor .codelens-decoration > span, 13 | .monaco-editor .codelens-decoration > a { 14 | user-select: none; 15 | -webkit-user-select: none; 16 | -ms-user-select: none; 17 | white-space: nowrap; 18 | vertical-align: sub; 19 | } 20 | 21 | .monaco-editor .codelens-decoration > a { 22 | text-decoration: none; 23 | } 24 | 25 | .monaco-editor .codelens-decoration > a:hover { 26 | cursor: pointer; 27 | } 28 | 29 | .monaco-editor .codelens-decoration .codicon { 30 | vertical-align: middle; 31 | color: currentColor !important; 32 | } 33 | 34 | .monaco-editor .codelens-decoration > a:hover .codicon::before { 35 | cursor: pointer; 36 | } 37 | 38 | @keyframes fadein { 39 | 0% { opacity: 0; visibility: visible;} 40 | 100% { opacity: 1; } 41 | } 42 | 43 | .monaco-editor .codelens-decoration.fadein { 44 | animation: fadein 0.1s linear; 45 | } 46 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/dnd/dnd.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor.vs .dnd-target { 7 | border-right: 2px dotted black; 8 | color: white; /* opposite of black */ 9 | } 10 | .monaco-editor.vs-dark .dnd-target { 11 | border-right: 2px dotted #AEAFAD; 12 | color: #51504f; /* opposite of #AEAFAD */ 13 | } 14 | .monaco-editor.hc-black .dnd-target { 15 | border-right: 2px dotted #fff; 16 | color: #000; /* opposite of #fff */ 17 | } 18 | 19 | .monaco-editor.mouse-default .view-lines, 20 | .monaco-editor.vs-dark.mac.mouse-default .view-lines, 21 | .monaco-editor.hc-black.mac.mouse-default .view-lines { 22 | cursor: default; 23 | } 24 | .monaco-editor.mouse-copy .view-lines, 25 | .monaco-editor.vs-dark.mac.mouse-copy .view-lines, 26 | .monaco-editor.hc-black.mac.mouse-copy .view-lines { 27 | cursor: copy; 28 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/outlineTree.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-list .monaco-list-row.focused.selected .outline-element .monaco-highlighted-label, 7 | .monaco-list .monaco-list-row.focused.selected .outline-element-decoration { 8 | /* make sure selection color wins when a label is being selected */ 9 | color: inherit !important; 10 | } 11 | 12 | .monaco-list .outline-element { 13 | display: flex; 14 | flex: 1; 15 | flex-flow: row nowrap; 16 | align-items: center; 17 | } 18 | 19 | .monaco-list .outline-element .monaco-highlighted-label { 20 | color: var(--outline-element-color); 21 | } 22 | 23 | .monaco-tree .monaco-tree-row.focused .outline-element .outline-element-detail { 24 | visibility: inherit; 25 | } 26 | 27 | .monaco-list .outline-element .outline-element-decoration { 28 | opacity: 0.75; 29 | font-size: 90%; 30 | font-weight: 600; 31 | padding: 0 12px 0 5px; 32 | margin-left: auto; 33 | text-align: center; 34 | color: var(--outline-element-color); 35 | } 36 | 37 | .monaco-list .outline-element .outline-element-decoration.bubble { 38 | font-family: codicon; 39 | font-size: 14px; 40 | opacity: 0.4; 41 | } 42 | 43 | .monaco-list .outline-element .outline-element-icon { 44 | margin-right: 4px; 45 | } 46 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/documentSymbols/media/symbol-icons.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-icon-label.deprecated { 7 | text-decoration: line-through; 8 | opacity: 0.66; 9 | } 10 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/folding/folding.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .margin-view-overlays .codicon-chevron-right, 7 | .monaco-editor .margin-view-overlays .codicon-chevron-down { 8 | cursor: pointer; 9 | opacity: 0; 10 | transition: opacity 0.5s; 11 | display: flex; 12 | align-items: center; 13 | justify-content: center; 14 | font-size: 140%; 15 | margin-left: 2px; 16 | } 17 | 18 | .monaco-editor .margin-view-overlays:hover .codicon, 19 | .monaco-editor .margin-view-overlays .codicon.codicon-chevron-right, 20 | .monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons { 21 | opacity: 1; 22 | } 23 | 24 | .monaco-editor .inline-folded:after { 25 | color: grey; 26 | margin: 0.1em 0.2em 0 0.2em; 27 | content: "⋯"; 28 | display: inline; 29 | line-height: 1em; 30 | cursor: pointer; 31 | } 32 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .goto-definition-link { 7 | text-decoration: underline; 8 | cursor: pointer; 9 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/gotoSymbol/peek/referencesWidget.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | /* -- zone widget */ 7 | .monaco-editor .zone-widget .zone-widget-container.reference-zone-widget { 8 | border-top-width: 1px; 9 | border-bottom-width: 1px; 10 | } 11 | 12 | .monaco-editor .reference-zone-widget .inline { 13 | display: inline-block; 14 | vertical-align: top; 15 | } 16 | 17 | .monaco-editor .reference-zone-widget .messages { 18 | height: 100%; 19 | width: 100%; 20 | text-align: center; 21 | padding: 3em 0; 22 | } 23 | 24 | .monaco-editor .reference-zone-widget .ref-tree { 25 | line-height: 23px; 26 | } 27 | 28 | .monaco-editor .reference-zone-widget .ref-tree .reference { 29 | text-overflow: ellipsis; 30 | overflow: hidden; 31 | } 32 | 33 | .monaco-editor .reference-zone-widget .ref-tree .reference-file { 34 | display: inline-flex; 35 | width: 100%; 36 | height: 100%; 37 | } 38 | 39 | .monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file { 40 | color: inherit !important; 41 | } 42 | 43 | .monaco-editor .reference-zone-widget .ref-tree .reference-file .count { 44 | margin-right: 12px; 45 | margin-left: auto; 46 | } 47 | 48 | /* High Contrast Theming */ 49 | 50 | .monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file { 51 | font-weight: bold; 52 | } 53 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/hover/getHover.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { coalesce } from '../../../base/common/arrays.js'; 6 | import { CancellationToken } from '../../../base/common/cancellation.js'; 7 | import { onUnexpectedExternalError } from '../../../base/common/errors.js'; 8 | import { registerModelAndPositionCommand } from '../../browser/editorExtensions.js'; 9 | import { HoverProviderRegistry } from '../../common/modes.js'; 10 | export function getHover(model, position, token) { 11 | var supports = HoverProviderRegistry.ordered(model); 12 | var promises = supports.map(function (support) { 13 | return Promise.resolve(support.provideHover(model, position, token)).then(function (hover) { 14 | return hover && isValid(hover) ? hover : undefined; 15 | }, function (err) { 16 | onUnexpectedExternalError(err); 17 | return undefined; 18 | }); 19 | }); 20 | return Promise.all(promises).then(coalesce); 21 | } 22 | registerModelAndPositionCommand('_executeHoverProvider', function (model, position) { return getHover(model, position, CancellationToken.None); }); 23 | function isValid(result) { 24 | var hasRange = (typeof result.range !== 'undefined'); 25 | var hasHtmlContent = typeof result.contents !== 'undefined' && result.contents && result.contents.length > 0; 26 | return hasRange && hasHtmlContent; 27 | } 28 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/inPlaceReplace/inPlaceReplaceCommand.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { Selection } from '../../common/core/selection.js'; 6 | var InPlaceReplaceCommand = /** @class */ (function () { 7 | function InPlaceReplaceCommand(editRange, originalSelection, text) { 8 | this._editRange = editRange; 9 | this._originalSelection = originalSelection; 10 | this._text = text; 11 | } 12 | InPlaceReplaceCommand.prototype.getEditOperations = function (model, builder) { 13 | builder.addTrackedEditOperation(this._editRange, this._text); 14 | }; 15 | InPlaceReplaceCommand.prototype.computeCursorState = function (model, helper) { 16 | var inverseEditOperations = helper.getInverseEditOperations(); 17 | var srcRange = inverseEditOperations[0].range; 18 | if (!this._originalSelection.isEmpty()) { 19 | // Preserve selection and extends to typed text 20 | return new Selection(srcRange.endLineNumber, srcRange.endColumn - this._text.length, srcRange.endLineNumber, srcRange.endColumn); 21 | } 22 | return new Selection(srcRange.endLineNumber, Math.min(this._originalSelection.positionColumn, srcRange.endColumn), srcRange.endLineNumber, Math.min(this._originalSelection.positionColumn, srcRange.endColumn)); 23 | }; 24 | return InPlaceReplaceCommand; 25 | }()); 26 | export { InPlaceReplaceCommand }; 27 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/indentation/indentUtils.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | export function getSpaceCnt(str, tabSize) { 6 | var spacesCnt = 0; 7 | for (var i = 0; i < str.length; i++) { 8 | if (str.charAt(i) === '\t') { 9 | spacesCnt += tabSize; 10 | } 11 | else { 12 | spacesCnt++; 13 | } 14 | } 15 | return spacesCnt; 16 | } 17 | export function generateIndent(spacesCnt, tabSize, insertSpaces) { 18 | spacesCnt = spacesCnt < 0 ? 0 : spacesCnt; 19 | var result = ''; 20 | if (!insertSpaces) { 21 | var tabsCnt = Math.floor(spacesCnt / tabSize); 22 | spacesCnt = spacesCnt % tabSize; 23 | for (var i = 0; i < tabsCnt; i++) { 24 | result += '\t'; 25 | } 26 | } 27 | for (var i = 0; i < spacesCnt; i++) { 28 | result += ' '; 29 | } 30 | return result; 31 | } 32 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/links/links.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | .monaco-editor .detected-link, 6 | .monaco-editor .detected-link-active { 7 | text-decoration: underline; 8 | text-underline-position: under; 9 | } 10 | 11 | .monaco-editor .detected-link-active { 12 | cursor: pointer; 13 | } 14 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/message/messageController.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .monaco-editor-overlaymessage { 7 | padding-bottom: 8px; 8 | } 9 | 10 | @keyframes fadeIn { 11 | from { opacity: 0; } 12 | to { opacity: 1; } 13 | } 14 | .monaco-editor .monaco-editor-overlaymessage.fadeIn { 15 | animation: fadeIn 150ms ease-out; 16 | } 17 | 18 | @keyframes fadeOut { 19 | from { opacity: 1; } 20 | to { opacity: 0; } 21 | } 22 | .monaco-editor .monaco-editor-overlaymessage.fadeOut { 23 | animation: fadeOut 100ms ease-out; 24 | } 25 | 26 | .monaco-editor .monaco-editor-overlaymessage .message { 27 | padding: 1px 4px; 28 | } 29 | 30 | .monaco-editor .monaco-editor-overlaymessage .anchor { 31 | width: 0 !important; 32 | height: 0 !important; 33 | border-color: transparent; 34 | border-style: solid; 35 | z-index: 1000; 36 | border-width: 8px; 37 | position: absolute; 38 | } 39 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/rename/renameInputField.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .rename-box { 7 | z-index: 100; 8 | color: inherit; 9 | } 10 | 11 | .monaco-editor .rename-box.preview { 12 | padding: 3px 3px 0 3px; 13 | } 14 | 15 | .monaco-editor .rename-box .rename-input { 16 | padding: 3px; 17 | width: calc(100% - 6px); 18 | } 19 | 20 | .monaco-editor .rename-box .rename-label { 21 | display: none; 22 | opacity: .8; 23 | } 24 | 25 | .monaco-editor .rename-box.preview .rename-label { 26 | display: inherit; 27 | } 28 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/snippet/snippetSession.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .snippet-placeholder { 7 | min-width: 2px; 8 | outline-style: solid; 9 | outline-width: 1px; 10 | } 11 | 12 | .monaco-editor .finish-snippet-placeholder { 13 | outline-style: solid; 14 | outline-width: 1px; 15 | } 16 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/suggest/media/suggestStatusBar.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .suggest-widget.with-status-bar .suggest-status-bar { 7 | visibility: visible; 8 | } 9 | .monaco-editor .suggest-widget.with-status-bar > .tree { 10 | margin-bottom: 18px; 11 | } 12 | 13 | .monaco-editor .suggest-widget.with-status-bar .suggest-status-bar span { 14 | min-height: 18px; 15 | } 16 | 17 | .monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row > .contents > .main > .right > .readMore, 18 | .monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused > .contents > .main > .right:not(.always-show-details) > .readMore { 19 | display: none; 20 | } 21 | 22 | .monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover > .contents > .main > .right.can-expand-details > .details-label { 23 | width: 100%; 24 | } 25 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/contrib/zoneWidget/zoneWidget.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | .monaco-editor .zone-widget { 6 | position: absolute; 7 | z-index: 10; 8 | } 9 | 10 | 11 | .monaco-editor .zone-widget .zone-widget-container { 12 | border-top-style: solid; 13 | border-bottom-style: solid; 14 | border-top-width: 0; 15 | border-bottom-width: 0; 16 | position: relative; 17 | } 18 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/edcore.main.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import './editor.all.js'; 6 | import './standalone/browser/accessibilityHelp/accessibilityHelp.js'; 7 | import './standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js'; 8 | import './standalone/browser/inspectTokens/inspectTokens.js'; 9 | import './standalone/browser/quickOpen/gotoLine.js'; 10 | import './standalone/browser/quickOpen/quickCommand.js'; 11 | import './standalone/browser/quickOpen/quickOutline.js'; 12 | import './standalone/browser/referenceSearch/standaloneReferenceSearch.js'; 13 | import './standalone/browser/toggleHighContrast/toggleHighContrast.js'; 14 | export * from './editor.api.js'; 15 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/editor.main.js: -------------------------------------------------------------------------------- 1 | import '../language/typescript/monaco.contribution'; 2 | import '../language/css/monaco.contribution'; 3 | import '../language/json/monaco.contribution'; 4 | import '../language/html/monaco.contribution'; 5 | import '../basic-languages/monaco.contribution'; 6 | 7 | export * from './edcore.main'; -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/editor.worker.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { SimpleWorkerServer } from '../base/common/worker/simpleWorker.js'; 6 | import { EditorSimpleWorker } from './common/services/editorSimpleWorker.js'; 7 | var initialized = false; 8 | export function initialize(foreignModule) { 9 | if (initialized) { 10 | return; 11 | } 12 | initialized = true; 13 | var simpleWorker = new SimpleWorkerServer(function (msg) { 14 | self.postMessage(msg); 15 | }, function (host) { return new EditorSimpleWorker(host, foreignModule); }); 16 | self.onmessage = function (e) { 17 | simpleWorker.onmessage(e.data); 18 | }; 19 | } 20 | self.onmessage = function (e) { 21 | // Ignore first message in this case and initialize if not yet initialized 22 | if (!initialized) { 23 | initialize(null); 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/scripter.js: -------------------------------------------------------------------------------- 1 | // copied to ./monaco-editor/esm/vs/editor/scripter.js by misc/update-monaco.sh 2 | import { StaticServices } from './standalone/browser/standaloneServices' 3 | import { 4 | SimpleEditorModelResolverService, 5 | SimpleUriLabelService, 6 | } from './standalone/browser/simpleServices' 7 | 8 | 9 | function patchEditorService(openCodeEditor) { 10 | const codeEditorService = StaticServices.codeEditorService.get(); 11 | codeEditorService.openCodeEditor = openCodeEditor 12 | } 13 | 14 | 15 | function patchEditorModelResolverService(findModel) { 16 | // https://github.com/Microsoft/monaco-editor/issues/779#issuecomment-374258435 17 | SimpleEditorModelResolverService.prototype.findModel = findModel 18 | } 19 | 20 | 21 | let _basenameOrAuthority = null 22 | function patchBasenameOrAuthority(basenameOrAuthority) { 23 | _basenameOrAuthority = basenameOrAuthority 24 | } 25 | export function basenameOrAuthority(resource) { 26 | if (_basenameOrAuthority) { 27 | return _basenameOrAuthority(resource) 28 | } 29 | } 30 | export function getBaseLabel(resource) { 31 | return basenameOrAuthority(resource) 32 | } 33 | 34 | 35 | function patchUriLabelService(getUriLabel) { 36 | // returns a label for a resource. 37 | // Shows up as a tool tip and small text next to the filename 38 | SimpleUriLabelService.prototype.getUriLabel = getUriLabel 39 | } 40 | 41 | 42 | window.__scripterMonaco = { 43 | patchEditorService, 44 | patchEditorModelResolverService, 45 | patchUriLabelService, 46 | patchBasenameOrAuthority, 47 | } 48 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .accessibilityHelpWidget { 7 | padding: 10px; 8 | vertical-align: middle; 9 | overflow: scroll; 10 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/standalone/browser/inspectTokens/inspectTokens.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-editor .tokens-inspect-widget { 7 | z-index: 50; 8 | user-select: text; 9 | -webkit-user-select: text; 10 | -ms-user-select: text; 11 | padding: 10px; 12 | } 13 | 14 | .tokens-inspect-separator { 15 | height: 1px; 16 | border: 0; 17 | } 18 | 19 | .monaco-editor .tokens-inspect-widget .tm-token { 20 | font-family: monospace; 21 | } 22 | 23 | .monaco-editor .tokens-inspect-widget .tm-token-length { 24 | font-weight: normal; 25 | font-size: 60%; 26 | float: right; 27 | } 28 | 29 | .monaco-editor .tokens-inspect-widget .tm-metadata-table { 30 | width: 100%; 31 | } 32 | 33 | .monaco-editor .tokens-inspect-widget .tm-metadata-value { 34 | font-family: monospace; 35 | text-align: right; 36 | } 37 | 38 | .monaco-editor .tokens-inspect-widget .tm-token-type { 39 | font-family: monospace; 40 | } 41 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/editorQuickOpen.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-quick-open-widget .monaco-tree .monaco-tree-row .monaco-highlighted-label .highlight, 7 | .monaco-quick-open-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { 8 | color: #0066BF; 9 | } 10 | 11 | .vs-dark .monaco-quick-open-widget .monaco-tree .monaco-tree-row .monaco-highlighted-label .highlight, 12 | .vs-dark .monaco-quick-open-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { 13 | color: #0097fb; 14 | } 15 | 16 | .hc-black .monaco-quick-open-widget .monaco-tree .monaco-tree-row .monaco-highlighted-label .highlight, 17 | .hc-black .monaco-quick-open-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { 18 | color: #F38518; 19 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/gotoLine.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-quick-open-widget { 7 | font-size: 13px; 8 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/standalone/browser/quickOpen/quickOutline.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .monaco-quick-open-widget { 7 | font-size: 13px; 8 | } 9 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/standalone/common/monarch/monarchTypes.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/editor/standalone/common/standaloneThemeService.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../../platform/instantiation/common/instantiation.js'; 6 | export var IStandaloneThemeService = createDecorator('themeService'); 7 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/language/css/monaco.contribution.js: -------------------------------------------------------------------------------- 1 | function LanguageServiceDefaultsImpl(){} 2 | export { LanguageServiceDefaultsImpl } 3 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/language/html/monaco.contribution.js: -------------------------------------------------------------------------------- 1 | function LanguageServiceDefaultsImpl(){} 2 | export { LanguageServiceDefaultsImpl } 3 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/language/json/monaco.contribution.js: -------------------------------------------------------------------------------- 1 | function LanguageServiceDefaultsImpl(){} 2 | export { LanguageServiceDefaultsImpl } 3 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/language/typescript/lib/typescriptServicesMetadata.js: -------------------------------------------------------------------------------- 1 | export var typescriptVersion = "3.7.5"; 2 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/language/typescript/ts.worker.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 'use strict'; 6 | import * as worker from '../../editor/editor.worker.js'; 7 | import { TypeScriptWorker } from './tsWorker.js'; 8 | self.onmessage = function () { 9 | // ignore the first message 10 | worker.initialize(function (ctx, createData) { 11 | return new TypeScriptWorker(ctx, createData); 12 | }); 13 | }; 14 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/nls.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | function _format(message, args) { 6 | var result; 7 | if (args.length === 0) { 8 | result = message; 9 | } 10 | else { 11 | result = message.replace(/\{(\d+)\}/g, function (match, rest) { 12 | var index = rest[0]; 13 | return typeof args[index] !== 'undefined' ? args[index] : match; 14 | }); 15 | } 16 | return result; 17 | } 18 | export function localize(data, message) { 19 | var args = []; 20 | for (var _i = 2; _i < arguments.length; _i++) { 21 | args[_i - 2] = arguments[_i]; 22 | } 23 | return _format(message, args); 24 | } 25 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/accessibility/common/accessibility.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../instantiation/common/instantiation.js'; 6 | import { RawContextKey } from '../../contextkey/common/contextkey.js'; 7 | export var IAccessibilityService = createDecorator('accessibilityService'); 8 | export var CONTEXT_ACCESSIBILITY_MODE_ENABLED = new RawContextKey('accessibilityModeEnabled', false); 9 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../instantiation/common/instantiation.js'; 6 | export var IClipboardService = createDecorator('clipboardService'); 7 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js: -------------------------------------------------------------------------------- 1 | export var InputFocusedContextKey = 'inputFocus'; 2 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.css: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | 6 | .context-view .monaco-menu { 7 | min-width: 130px; 8 | } 9 | 10 | .context-view-block { 11 | position: fixed; 12 | left:0; 13 | top:0; 14 | z-index: -1; 15 | width: 100%; 16 | height: 100%; 17 | } -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/contextview/browser/contextView.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../instantiation/common/instantiation.js'; 6 | export var IContextViewService = createDecorator('contextViewService'); 7 | export var IContextMenuService = createDecorator('contextMenuService'); 8 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/dialogs/common/dialogs.js: -------------------------------------------------------------------------------- 1 | import { createDecorator } from '../../instantiation/common/instantiation.js'; 2 | export var IDialogService = createDecorator('dialogService'); 3 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/editor/common/editor.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | export var EditorOpenContext; 6 | (function (EditorOpenContext) { 7 | /** 8 | * Default: the editor is opening via a programmatic call 9 | * to the editor service API. 10 | */ 11 | EditorOpenContext[EditorOpenContext["API"] = 0] = "API"; 12 | /** 13 | * Indicates that a user action triggered the opening, e.g. 14 | * via mouse or keyboard use. 15 | */ 16 | EditorOpenContext[EditorOpenContext["USER"] = 1] = "USER"; 17 | })(EditorOpenContext || (EditorOpenContext = {})); 18 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/environment/common/environment.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../instantiation/common/instantiation.js'; 6 | export var IEnvironmentService = createDecorator('environmentService'); 7 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/extensions/common/extensions.js: -------------------------------------------------------------------------------- 1 | /** 2 | * **!Do not construct directly!** 3 | * 4 | * **!Only static methods because it gets serialized!** 5 | * 6 | * This represents the "canonical" version for an extension identifier. Extension ids 7 | * have to be case-insensitive (due to the marketplace), but we must ensure case 8 | * preservation because the extension API is already public at this time. 9 | * 10 | * For example, given an extension with the publisher `"Hello"` and the name `"World"`, 11 | * its canonical extension identifier is `"Hello.World"`. This extension could be 12 | * referenced in some other extension's dependencies using the string `"hello.world"`. 13 | * 14 | * To make matters more complicated, an extension can optionally have an UUID. When two 15 | * extensions have the same UUID, they are considered equal even if their identifier is different. 16 | */ 17 | var ExtensionIdentifier = /** @class */ (function () { 18 | function ExtensionIdentifier(value) { 19 | this.value = value; 20 | this._lower = value.toLowerCase(); 21 | } 22 | /** 23 | * Gives the value by which to index (for equality). 24 | */ 25 | ExtensionIdentifier.toKey = function (id) { 26 | if (typeof id === 'string') { 27 | return id.toLowerCase(); 28 | } 29 | return id._lower; 30 | }; 31 | return ExtensionIdentifier; 32 | }()); 33 | export { ExtensionIdentifier }; 34 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/files/common/files.js: -------------------------------------------------------------------------------- 1 | export var FileKind; 2 | (function (FileKind) { 3 | FileKind[FileKind["FILE"] = 0] = "FILE"; 4 | FileKind[FileKind["FOLDER"] = 1] = "FOLDER"; 5 | FileKind[FileKind["ROOT_FOLDER"] = 2] = "ROOT_FOLDER"; 6 | })(FileKind || (FileKind = {})); 7 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/instantiation/common/descriptors.js: -------------------------------------------------------------------------------- 1 | var SyncDescriptor = /** @class */ (function () { 2 | function SyncDescriptor(ctor, staticArguments, supportsDelayedInstantiation) { 3 | if (staticArguments === void 0) { staticArguments = []; } 4 | if (supportsDelayedInstantiation === void 0) { supportsDelayedInstantiation = false; } 5 | this.ctor = ctor; 6 | this.staticArguments = staticArguments; 7 | this.supportsDelayedInstantiation = supportsDelayedInstantiation; 8 | } 9 | return SyncDescriptor; 10 | }()); 11 | export { SyncDescriptor }; 12 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/instantiation/common/extensions.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { SyncDescriptor } from './descriptors.js'; 6 | var _registry = []; 7 | export function registerSingleton(id, ctor, supportsDelayedInstantiation) { 8 | _registry.push([id, new SyncDescriptor(ctor, [], supportsDelayedInstantiation)]); 9 | } 10 | export function getSingletonServiceDescriptors() { 11 | return _registry; 12 | } 13 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/instantiation/common/serviceCollection.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | var ServiceCollection = /** @class */ (function () { 6 | function ServiceCollection() { 7 | var entries = []; 8 | for (var _i = 0; _i < arguments.length; _i++) { 9 | entries[_i] = arguments[_i]; 10 | } 11 | this._entries = new Map(); 12 | for (var _a = 0, entries_1 = entries; _a < entries_1.length; _a++) { 13 | var _b = entries_1[_a], id = _b[0], service = _b[1]; 14 | this.set(id, service); 15 | } 16 | } 17 | ServiceCollection.prototype.set = function (id, instanceOrDescriptor) { 18 | var result = this._entries.get(id); 19 | this._entries.set(id, instanceOrDescriptor); 20 | return result; 21 | }; 22 | ServiceCollection.prototype.has = function (id) { 23 | return this._entries.has(id); 24 | }; 25 | ServiceCollection.prototype.get = function (id) { 26 | return this._entries.get(id); 27 | }; 28 | return ServiceCollection; 29 | }()); 30 | export { ServiceCollection }; 31 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import * as platform from '../../registry/common/platform.js'; 6 | import { Emitter } from '../../../base/common/event.js'; 7 | export var Extensions = { 8 | JSONContribution: 'base.contributions.json' 9 | }; 10 | function normalizeId(id) { 11 | if (id.length > 0 && id.charAt(id.length - 1) === '#') { 12 | return id.substring(0, id.length - 1); 13 | } 14 | return id; 15 | } 16 | var JSONContributionRegistry = /** @class */ (function () { 17 | function JSONContributionRegistry() { 18 | this._onDidChangeSchema = new Emitter(); 19 | this.schemasById = {}; 20 | } 21 | JSONContributionRegistry.prototype.registerSchema = function (uri, unresolvedSchemaContent) { 22 | this.schemasById[normalizeId(uri)] = unresolvedSchemaContent; 23 | this._onDidChangeSchema.fire(uri); 24 | }; 25 | JSONContributionRegistry.prototype.notifySchemaChanged = function (uri) { 26 | this._onDidChangeSchema.fire(uri); 27 | }; 28 | return JSONContributionRegistry; 29 | }()); 30 | var jsonContributionRegistry = new JSONContributionRegistry(); 31 | platform.Registry.add(Extensions.JSONContribution, jsonContributionRegistry); 32 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/keybinding/common/keybinding.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../instantiation/common/instantiation.js'; 6 | export var IKeybindingService = createDecorator('keybindingService'); 7 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/keybinding/common/resolvedKeybindingItem.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | var ResolvedKeybindingItem = /** @class */ (function () { 6 | function ResolvedKeybindingItem(resolvedKeybinding, command, commandArgs, when, isDefault) { 7 | this.resolvedKeybinding = resolvedKeybinding; 8 | this.keypressParts = resolvedKeybinding ? removeElementsAfterNulls(resolvedKeybinding.getDispatchParts()) : []; 9 | this.bubble = (command ? command.charCodeAt(0) === 94 /* Caret */ : false); 10 | this.command = this.bubble ? command.substr(1) : command; 11 | this.commandArgs = commandArgs; 12 | this.when = when; 13 | this.isDefault = isDefault; 14 | } 15 | return ResolvedKeybindingItem; 16 | }()); 17 | export { ResolvedKeybindingItem }; 18 | export function removeElementsAfterNulls(arr) { 19 | var result = []; 20 | for (var i = 0, len = arr.length; i < len; i++) { 21 | var element = arr[i]; 22 | if (!element) { 23 | // stop processing at first encountered null 24 | return result; 25 | } 26 | result.push(element); 27 | } 28 | return result; 29 | } 30 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/label/common/label.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../instantiation/common/instantiation.js'; 6 | var LABEL_SERVICE_ID = 'label'; 7 | export var ILabelService = createDecorator(LABEL_SERVICE_ID); 8 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/layout/browser/layoutService.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../instantiation/common/instantiation.js'; 6 | export var ILayoutService = createDecorator('layoutService'); 7 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/log/common/log.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator as createServiceDecorator } from '../../instantiation/common/instantiation.js'; 6 | export var ILogService = createServiceDecorator('logService'); 7 | export var LogLevel; 8 | (function (LogLevel) { 9 | LogLevel[LogLevel["Trace"] = 0] = "Trace"; 10 | LogLevel[LogLevel["Debug"] = 1] = "Debug"; 11 | LogLevel[LogLevel["Info"] = 2] = "Info"; 12 | LogLevel[LogLevel["Warning"] = 3] = "Warning"; 13 | LogLevel[LogLevel["Error"] = 4] = "Error"; 14 | LogLevel[LogLevel["Critical"] = 5] = "Critical"; 15 | LogLevel[LogLevel["Off"] = 6] = "Off"; 16 | })(LogLevel || (LogLevel = {})); 17 | var NullLogService = /** @class */ (function () { 18 | function NullLogService() { 19 | } 20 | NullLogService.prototype.getLevel = function () { return LogLevel.Info; }; 21 | NullLogService.prototype.trace = function (message) { 22 | var args = []; 23 | for (var _i = 1; _i < arguments.length; _i++) { 24 | args[_i - 1] = arguments[_i]; 25 | } 26 | }; 27 | NullLogService.prototype.error = function (message) { 28 | var args = []; 29 | for (var _i = 1; _i < arguments.length; _i++) { 30 | args[_i - 1] = arguments[_i]; 31 | } 32 | }; 33 | NullLogService.prototype.dispose = function () { }; 34 | return NullLogService; 35 | }()); 36 | export { NullLogService }; 37 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/notification/common/notification.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import BaseSeverity from '../../../base/common/severity.js'; 6 | import { createDecorator } from '../../instantiation/common/instantiation.js'; 7 | export var Severity = BaseSeverity; 8 | export var INotificationService = createDecorator('notificationService'); 9 | var NoOpNotification = /** @class */ (function () { 10 | function NoOpNotification() { 11 | } 12 | return NoOpNotification; 13 | }()); 14 | export { NoOpNotification }; 15 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/progress/common/progress.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../instantiation/common/instantiation.js'; 6 | export var IEditorProgressService = createDecorator('editorProgressService'); 7 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/registry/common/platform.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import * as Types from '../../../base/common/types.js'; 6 | import * as Assert from '../../../base/common/assert.js'; 7 | var RegistryImpl = /** @class */ (function () { 8 | function RegistryImpl() { 9 | this.data = new Map(); 10 | } 11 | RegistryImpl.prototype.add = function (id, data) { 12 | Assert.ok(Types.isString(id)); 13 | Assert.ok(Types.isObject(data)); 14 | Assert.ok(!this.data.has(id), 'There is already an extension with this id'); 15 | this.data.set(id, data); 16 | }; 17 | RegistryImpl.prototype.as = function (id) { 18 | return this.data.get(id) || null; 19 | }; 20 | return RegistryImpl; 21 | }()); 22 | export var Registry = new RegistryImpl(); 23 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/telemetry/common/gdprTypings.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsms/scripter/2e0444a5976c28fee0f112356f144cfe4113bcb6/src/monaco/monaco-editor/esm/vs/platform/telemetry/common/gdprTypings.js -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/telemetry/common/telemetry.js: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------------------------- 2 | * Copyright (c) Microsoft Corporation. All rights reserved. 3 | * Licensed under the MIT License. See License.txt in the project root for license information. 4 | *--------------------------------------------------------------------------------------------*/ 5 | import { createDecorator } from '../../instantiation/common/instantiation.js'; 6 | export var ITelemetryService = createDecorator('telemetryService'); 7 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/esm/vs/platform/workspaces/common/workspaces.js: -------------------------------------------------------------------------------- 1 | import { URI } from '../../../base/common/uri.js'; 2 | export var WORKSPACE_EXTENSION = 'code-workspace'; 3 | export function isSingleFolderWorkspaceIdentifier(obj) { 4 | return obj instanceof URI; 5 | } 6 | export function toWorkspaceIdentifier(workspace) { 7 | if (workspace.configuration) { 8 | return { 9 | configPath: workspace.configuration, 10 | id: workspace.id 11 | }; 12 | } 13 | if (workspace.folders.length === 1) { 14 | return workspace.folders[0].uri; 15 | } 16 | // Empty workspace 17 | return undefined; 18 | } 19 | //#endregion 20 | -------------------------------------------------------------------------------- /src/monaco/monaco-editor/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "monaco-editor", 3 | "private": false, 4 | "version": "0.20.0", 5 | "description": "A browser based code editor", 6 | "author": "Microsoft Corporation", 7 | "license": "MIT", 8 | "scripts": { 9 | "simpleserver": "gulp simpleserver", 10 | "release": "gulp release", 11 | "website": "gulp website", 12 | "build-website": "gulp build-website", 13 | "build-test": "tsc -b ./ci/tsconfig.json --preserveWatchOutput", 14 | "bundle": "webpack --config ci/webpack.config.js --display-error-details --bail", 15 | "test": "mocha \"out-ci/*.test.js\" --headless", 16 | "ciserver": "gulp ciserver" 17 | }, 18 | "typings": "./esm/vs/editor/editor.api.d.ts", 19 | "module": "./esm/vs/editor/editor.main.js", 20 | "repository": { 21 | "type": "git", 22 | "url": "https://github.com/Microsoft/monaco-editor" 23 | }, 24 | "devDependencies": { 25 | "@types/chai": "^3.4.34", 26 | "@types/mocha": "^2.2.33", 27 | "@types/puppeteer": "^1.12.4", 28 | "chai": "^4.2.0", 29 | "clean-css": "^4.2.3", 30 | "css-loader": "^3.2.0", 31 | "event-stream": "4.0.1", 32 | "file-loader": "^4.2.0", 33 | "gulp": "^4.0.0", 34 | "gulp-typedoc": "^2.2.2", 35 | "mocha": "^6.2.2", 36 | "monaco-css": "2.7.0", 37 | "monaco-editor-core": "0.20.0", 38 | "monaco-html": "2.7.0", 39 | "monaco-json": "2.9.0", 40 | "monaco-languages": "1.10.0", 41 | "monaco-typescript": "3.7.0", 42 | "puppeteer": "^1.15.0", 43 | "rimraf": "^3.0.2", 44 | "style-loader": "^1.0.1", 45 | "typedoc": "^0.16.9", 46 | "typescript": "^3.7.5", 47 | "uncss": "^0.17.2", 48 | "vinyl": "^2.2.0", 49 | "webpack": "^4.41.2", 50 | "webpack-cli": "^3.3.10", 51 | "yaserver": "^0.2.0" 52 | } 53 | } -------------------------------------------------------------------------------- /src/monaco/monaco.js: -------------------------------------------------------------------------------- 1 | export * from './monaco-editor' 2 | -------------------------------------------------------------------------------- /src/monaco/scripter.js: -------------------------------------------------------------------------------- 1 | // copied to ./monaco-editor/esm/vs/editor/scripter.js by misc/update-monaco.sh 2 | import { StaticServices } from './standalone/browser/standaloneServices' 3 | import { 4 | SimpleEditorModelResolverService, 5 | SimpleUriLabelService, 6 | } from './standalone/browser/simpleServices' 7 | 8 | 9 | function patchEditorService(openCodeEditor) { 10 | const codeEditorService = StaticServices.codeEditorService.get(); 11 | codeEditorService.openCodeEditor = openCodeEditor 12 | } 13 | 14 | 15 | function patchEditorModelResolverService(findModel) { 16 | // https://github.com/Microsoft/monaco-editor/issues/779#issuecomment-374258435 17 | SimpleEditorModelResolverService.prototype.findModel = findModel 18 | } 19 | 20 | 21 | let _basenameOrAuthority = null 22 | function patchBasenameOrAuthority(basenameOrAuthority) { 23 | _basenameOrAuthority = basenameOrAuthority 24 | } 25 | export function basenameOrAuthority(resource) { 26 | if (_basenameOrAuthority) { 27 | return _basenameOrAuthority(resource) 28 | } 29 | } 30 | export function getBaseLabel(resource) { 31 | return basenameOrAuthority(resource) 32 | } 33 | 34 | 35 | function patchUriLabelService(getUriLabel) { 36 | // returns a label for a resource. 37 | // Shows up as a tool tip and small text next to the filename 38 | SimpleUriLabelService.prototype.getUriLabel = getUriLabel 39 | } 40 | 41 | 42 | window.__scripterMonaco = { 43 | patchEditorService, 44 | patchEditorModelResolverService, 45 | patchUriLabelService, 46 | patchBasenameOrAuthority, 47 | } 48 | --------------------------------------------------------------------------------