@harnessio/yaml-editor 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/dist/components/BlameEditor.d.ts +17 -0
- package/dist/components/CodeEditor.d.ts +22 -0
- package/dist/components/DiffEditor.d.ts +21 -0
- package/dist/components/YamlEditor.d.ts +4 -3
- package/dist/components/YamlProvider.d.ts +4 -4
- package/dist/hooks/useCodeLens.d.ts +3 -2
- package/dist/hooks/useDecoration.d.ts +1 -0
- package/dist/hooks/useProblems.d.ts +1 -0
- package/dist/hooks/useTheme.d.ts +3 -1
- package/dist/index.d.ts +16 -7
- package/dist/index.js +660 -2
- package/dist/index.js.map +1 -0
- package/dist/monacoeditorwork/css.worker.bundle.js +52775 -0
- package/dist/monacoeditorwork/editor.worker.bundle.js +12832 -0
- package/dist/monacoeditorwork/html.worker.bundle.js +28975 -0
- package/dist/monacoeditorwork/json.worker.bundle.js +20633 -0
- package/dist/monacoeditorwork/ts.worker.bundle.js +255666 -0
- package/dist/monacoeditorwork/yaml.worker.bundle.js +45105 -0
- package/dist/types/blame.d.ts +19 -0
- package/dist/types/monaco.d.ts +1 -1
- package/dist/utils/blame-editor-utils.d.ts +13 -0
- package/dist/utils/monaco-globals.d.ts +1 -0
- package/dist/utils/outline-model-to-path.d.ts +1 -0
- package/dist/utils/schema-utils.d.ts +2 -1
- package/dist/utils/utils.d.ts +2 -0
- package/package.json +24 -13
- package/dist/index.js.LICENSE.txt +0 -9
- package/dist/{hooks/utils.d.ts → utils/codelens-utils.d.ts} +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js","../src/hooks/useTheme.tsx","../src/utils/utils.ts","../src/utils/blame-editor-utils.ts","../src/components/BlameEditor.tsx","../src/components/CodeEditor.tsx","../src/components/DiffEditor.tsx","../src/types/selectors.ts","../src/utils/codelens-utils.ts","../src/utils/monaco-globals.ts","../src/utils/outline-model-to-path.ts","../src/hooks/useCodeLens.tsx","../src/hooks/useDecoration.tsx","../src/components/YamlProvider.tsx","../src/hooks/useProblems.tsx","../src/utils/schema-utils.ts","../src/hooks/useSchema.tsx","../src/components/YamlEditor.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import { RefObject, useEffect, useState } from 'react'\n\nimport * as monaco from 'monaco-editor'\n\nimport { ThemeDefinition } from '../types/themes'\n\nexport type UseTheme = (arg: {\n monacoRef: RefObject<typeof monaco | undefined>\n themeConfig?: {\n rootElementSelector?: string\n defaultTheme?: string\n themes?: ThemeDefinition[]\n }\n theme?: string\n editor: any\n}) => { theme: string }\n\nexport const useTheme: UseTheme = (props): { theme: string } => {\n const { themeConfig, editor, theme } = props\n const { defaultTheme } = themeConfig ?? {}\n\n const [themeInternal, setThemeInternal] = useState(theme ?? defaultTheme ?? 'vs-dark')\n\n useEffect(() => {\n themeConfig?.themes?.forEach(themeItem => {\n monaco.editor.defineTheme(themeItem.themeName, themeItem.themeData)\n })\n }, [monaco])\n\n useEffect(() => {\n if (monaco.editor && theme) {\n monaco.editor.setTheme(theme)\n setThemeInternal(theme)\n }\n }, [editor, theme])\n\n return { theme: themeInternal }\n}\n","export function createRandomString(length: number) {\n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'\n let result = ''\n for (let i = 0; i < length; i++) {\n result += chars.charAt(Math.floor(Math.random() * chars.length))\n }\n return result\n}\n\nexport function escapeSingleQuote(str: string) {\n return str.replace(`'`, `'`)\n}\n","import { BlameItem } from '../types/blame'\nimport { escapeSingleQuote } from './utils'\n\nexport function getMonacoEditorCss({\n instanceId,\n lineNumbersPosition\n}: {\n instanceId: string\n lineNumbersPosition: 'left' | 'center'\n}) {\n let css = ''\n\n // we move '.margin' element and update left/width of monaco editor\n if (lineNumbersPosition === 'center') {\n css += `\n .monaco-editor-${instanceId} .monaco-scrollable-element.editor-scrollable {\n width: 100% !important;\n left: 0px !important;\n }\n\n .monaco-editor-${instanceId} .view-lines, .view-zones {\n width: 100% !important;\n }\n \n .monaco-editor-${instanceId} .margin {\n z-index: 1000;\n background: transparent !important;\n }`\n }\n\n css += `\n .monaco-editor-${instanceId} .blame-editor-separator {\n right: 14px;\n pointer-events: none;\n }\n\n .monaco-editor-${instanceId} {\n outline: none !important;\n }\n \n .monaco-editor-${instanceId} .view-line .blame-editor-commit {\n display: inline-block;\n color: white;\n }`\n\n return css\n}\n\nexport function getMonacoEditorCommitCss({\n instanceId,\n blameData,\n dateWidth,\n avatarSize\n}: {\n instanceId: string\n blameData: BlameItem[]\n dateWidth: number\n avatarSize: number\n}) {\n let css = ''\n blameData.forEach(blameItem => {\n const avatarUrl = blameItem?.commitInfo?.author?.avatarUrl\n const initials = blameItem?.commitInfo?.author?.initials\n\n const avatarBackgroundCss = avatarUrl ? `background: url('${blameItem?.commitInfo?.author?.avatarUrl}');` : ''\n\n for (let lineNo = blameItem.fromLineNumber; lineNo <= blameItem.toLineNumber; lineNo++) {\n if (lineNo === blameItem.fromLineNumber) {\n css += `\n .monaco-editor-${instanceId} .view-line .blame-editor-commit-${lineNo}:before {\n content: '${escapeSingleQuote(blameItem?.commitInfo?.author?.when || '')}';\n position: absolute;\n left: 10px;\n top: 0px;\n color: hsl(var(--canary-foreground-03));\n }\n\n .monaco-editor-${instanceId} .view-line .blame-editor-commit-${lineNo}:after {\n content: '${initials ?? ' '}';\n position: absolute;\n border-radius: 50%;\n padding: 4px;\n text-align: center;\n background: hsl(var(--canary-background-11));\n line-height: 17px;\n left: ${dateWidth + 10}px;\n top: -4px;\n color: hsl(var(--canary-foreground-03));\n width: ${avatarSize}px;\n height: ${avatarSize}px;\n ${avatarBackgroundCss}\n background-size: 100% 100%;\n }`\n } else {\n css += `\n .monaco-editor-${instanceId} .view-line .blame-editor-commit-${lineNo}:before {\n content: ' ';\n left: 10px;\n top: 0px;\n color: gray;\n }`\n }\n }\n })\n\n return css\n}\n\nexport function createCommitMessage(msg: string, commitMsgLength: number) {\n let ret = ''\n if (msg.length > commitMsgLength) {\n ret = msg.slice(0, commitMsgLength - 3) + '...'\n } else if (msg.length < commitMsgLength) {\n ret = msg + ' '.repeat(commitMsgLength - msg.length)\n } else {\n ret = msg\n }\n\n return ' '.repeat(25) + ret + ' '.repeat(10)\n}\n","import { useEffect, useMemo, useRef, useState } from 'react'\n\nimport Editor, { loader, Monaco, useMonaco } from '@monaco-editor/react'\nimport * as monaco from 'monaco-editor'\n\nimport { useTheme } from '../hooks/useTheme'\nimport { BlameItem } from '../types/blame'\nimport { ThemeDefinition } from '../types/themes'\nimport { createCommitMessage, getMonacoEditorCommitCss, getMonacoEditorCss } from '../utils/blame-editor-utils'\nimport { createRandomString } from '../utils/utils'\n\nloader.config({ monaco })\n\nconst BLAME_MESSAGE_WIDTH = 450\nconst COMMIT_MESSAGE_LENGTH = 30\nconst DATE_WIDTH = 140\nconst AVATAR_SIZE = 24\n\nconst LINE_NUMBERS_HOLDER_WIDTH = 46\n\nconst defaultOptions: monaco.editor.IStandaloneEditorConstructionOptions = {\n selectOnLineNumbers: true,\n readOnly: true,\n matchBrackets: 'never',\n renderValidationDecorations: 'off',\n guides: { indentation: false },\n folding: false,\n stickyScroll: { enabled: false },\n renderWhitespace: 'none',\n renderLineHighlight: 'none',\n minimap: { enabled: false },\n scrollBeyondLastLine: false,\n fontSize: 14,\n fontFamily: '\"JetBrains Mono\", \"monospace\"',\n lineHeight: 20\n}\n\nexport interface BlameEditorProps<_> {\n code: string\n language: string\n themeConfig?: { rootElementSelector?: string; defaultTheme?: string; themes?: ThemeDefinition[] }\n theme?: string\n lineNumbersPosition?: 'left' | 'center'\n blameData: BlameItem[]\n showSeparators?: boolean\n}\n\nexport function BlameEditor<T>(props: BlameEditorProps<T>): JSX.Element {\n const {\n code,\n language,\n themeConfig,\n lineNumbersPosition = 'left',\n blameData,\n showSeparators = true,\n theme: themeFromProps\n } = props\n const blameDataRef = useRef(blameData)\n blameDataRef.current = blameData\n\n const instanceId = useRef(createRandomString(5))\n const monaco = useMonaco()\n const [editor, setEditor] = useState<monaco.editor.IStandaloneCodeEditor | undefined>()\n\n const [lineNumbersDelta, setLineNumbersDelta] = useState(0)\n\n const monacoRef = useRef<typeof monaco | null>(null)\n const editorRef = useRef<monaco.editor.IStandaloneCodeEditor | null>(null)\n\n function setupBlameEditor() {\n const editor = editorRef.current\n const monaco = monacoRef.current\n\n if (!editor || !monaco) return\n\n // separators\n if (showSeparators) {\n editor.changeViewZones(function (changeAccessor) {\n // space before first line\n changeAccessor.addZone({\n afterLineNumber: 0,\n heightInPx: 10,\n domNode: document.createElement('div')\n })\n\n blameDataRef.current.forEach((blameItem, index) => {\n if (index !== blameDataRef.current.length - 1) {\n const domNode = document.createElement('div')\n domNode.style.borderTop = '1px solid hsl(var(--canary-border-01))'\n domNode.style.marginTop = '9px'\n domNode.className = 'blame-editor-separator'\n\n changeAccessor.addZone({\n afterLineNumber: blameItem.toLineNumber,\n heightInPx: 20,\n domNode: domNode\n })\n }\n })\n })\n }\n\n const decoratorItems: monaco.editor.IModelDeltaDecoration[] = []\n blameDataRef.current.forEach(blameItem => {\n for (let lineNo = blameItem.fromLineNumber; lineNo <= blameItem.toLineNumber; lineNo++) {\n decoratorItems.push({\n range: new monaco.Range(lineNo, 0, lineNo + 1, 0),\n options: {\n before: {\n content: createCommitMessage(\n lineNo === blameItem.fromLineNumber ? blameItem?.commitInfo?.title || '' : '',\n COMMIT_MESSAGE_LENGTH\n ),\n cursorStops: monaco.editor.InjectedTextCursorStops.None,\n inlineClassName: `blame-editor-commit blame-editor-commit-${lineNo}`\n }\n }\n })\n }\n })\n\n // TODO: on unmount clear decorators, on blameData change recreate\n editor.createDecorationsCollection(decoratorItems)\n }\n\n function handleEditorDidMount(editor: monaco.editor.IStandaloneCodeEditor, monaco: Monaco) {\n editorRef.current = editor\n monacoRef.current = monaco\n\n editor.setValue(code)\n setEditor(editor)\n\n monaco.languages.typescript?.typescriptDefaults?.setDiagnosticsOptions?.({ noSuggestionDiagnostics: true })\n monaco.languages.typescript?.javascriptDefaults?.setDiagnosticsOptions?.({ noSuggestionDiagnostics: true })\n\n setupBlameEditor()\n }\n\n useEffect(() => {\n editor?.setValue(code)\n }, [code])\n\n const { theme } = useTheme({ monacoRef, themeConfig, editor, theme: themeFromProps })\n\n const monacoEditorCss = useMemo(\n () =>\n getMonacoEditorCss({\n instanceId: instanceId.current,\n lineNumbersPosition\n }),\n [blameData]\n )\n\n const monacoEditorCommitInfoCss = useMemo(\n () =>\n getMonacoEditorCommitCss({\n instanceId: instanceId.current,\n blameData,\n avatarSize: AVATAR_SIZE,\n dateWidth: DATE_WIDTH\n }),\n [blameData]\n )\n\n // set adjustment for lines numbers position\n useEffect(() => {\n if (lineNumbersPosition === 'center') {\n const scrollableEl = document.getElementsByClassName('lines-content')[0]\n\n if (scrollableEl) {\n const config = { attributes: true }\n\n const callback: MutationCallback = mutationList => {\n for (const _ of mutationList) {\n const left = parseInt(getComputedStyle(scrollableEl).left)\n setLineNumbersDelta(left)\n }\n }\n\n const observer = new MutationObserver(callback)\n observer.observe(scrollableEl, config)\n\n return () => {\n observer.disconnect()\n }\n }\n }\n })\n\n // adjust lines numbers position\n const lineNumbersCss = useMemo(() => {\n return `\n .monaco-editor-${instanceId.current} .margin {\n left: ${BLAME_MESSAGE_WIDTH - LINE_NUMBERS_HOLDER_WIDTH + lineNumbersDelta}px !important;\n pointer-events: none;\n }`\n }, [lineNumbersDelta])\n\n const clipSelection = `\n .monaco-editor-${instanceId.current} .view-overlays {\n clip-path: polygon(${BLAME_MESSAGE_WIDTH + 16}px 0, 100% 0%, 100% 100%, ${BLAME_MESSAGE_WIDTH + 16}px 100%);\n height:100% !important;\n }`\n\n return (\n <>\n <style\n dangerouslySetInnerHTML={{\n __html: `${monacoEditorCss} ${monacoEditorCommitInfoCss} ${lineNumbersCss} ${clipSelection}`\n }}\n />\n <Editor\n height=\"75vh\"\n className={`monaco-editor-${instanceId.current} overflow-hidden rounded-b-md border-x border-b`}\n language={language}\n theme={theme}\n options={defaultOptions}\n onMount={handleEditorDidMount}\n />\n </>\n )\n}\n","import { useEffect, useMemo, useRef, useState } from 'react'\n\nimport Editor, { loader, Monaco, useMonaco } from '@monaco-editor/react'\nimport * as monaco from 'monaco-editor'\n\nimport { useTheme } from '../hooks/useTheme'\nimport { ThemeDefinition } from '../types/themes'\n\nloader.config({ monaco })\n\nexport interface CodeRevision {\n code: string\n revisionId?: number\n}\n\nconst defaultOptions: monaco.editor.IStandaloneEditorConstructionOptions = {\n selectOnLineNumbers: true,\n scrollBeyondLastLine: false,\n padding: {\n top: 10\n },\n minimap: { enabled: false },\n fontSize: 14,\n fontFamily: '\"JetBrains Mono\", \"monospace\"',\n lineHeight: 20\n}\n\nexport interface CodeEditorProps<_> {\n codeRevision: CodeRevision\n onCodeRevisionChange: (codeRevision: CodeRevision | undefined, ev: monaco.editor.IModelContentChangedEvent) => void\n language: string\n themeConfig?: { rootElementSelector?: string; defaultTheme?: string; themes?: ThemeDefinition[] }\n theme?: string\n options?: {\n readOnly?: boolean\n }\n}\n\nexport function CodeEditor<T>(props: CodeEditorProps<T>): JSX.Element {\n const { codeRevision, onCodeRevisionChange, language, themeConfig, options, theme: themeFromProps } = props\n const monaco = useMonaco()\n const [editor, setEditor] = useState<monaco.editor.IStandaloneCodeEditor | undefined>()\n\n const monacoRef = useRef<typeof monaco>()\n const currentRevisionRef = useRef<CodeRevision>({ code: '', revisionId: 0 })\n\n const editorRef = useRef<monaco.editor.IStandaloneCodeEditor | null>(null)\n\n function handleEditorDidMount(editor: monaco.editor.IStandaloneCodeEditor, monaco: Monaco) {\n editorRef.current = editor\n monacoRef.current = monaco\n\n editor.setValue(codeRevision.code)\n\n setEditor(editor)\n }\n\n useEffect(() => {\n if (editorRef.current) {\n if (!codeRevision.revisionId || codeRevision.revisionId > Number(currentRevisionRef.current?.revisionId)) {\n const model = editorRef.current.getModel()\n if (model) {\n // NOTE: if it's a readonly no need to create undo stop points\n if (options?.readOnly) {\n editorRef.current?.setValue(codeRevision.code)\n } else {\n editorRef.current.pushUndoStop()\n editorRef.current.executeEdits('edit', [\n {\n range: model.getFullModelRange(),\n text: codeRevision.code\n }\n ])\n editorRef.current.pushUndoStop()\n }\n }\n }\n }\n }, [codeRevision, editorRef.current])\n\n const { theme } = useTheme({ monacoRef, themeConfig, editor, theme: themeFromProps })\n\n const mergedOptions = useMemo(() => {\n return { ...defaultOptions, ...(options ? options : {}) }\n }, [options])\n\n return (\n <>\n <Editor\n className=\"overflow-hidden rounded-b-md border-x border-b\"\n height={'75vh'}\n onChange={(value, data) => {\n currentRevisionRef.current = { code: value ?? '', revisionId: data.versionId }\n onCodeRevisionChange({ ...currentRevisionRef.current }, data)\n }}\n language={language}\n theme={theme}\n options={mergedOptions}\n onMount={handleEditorDidMount}\n />\n </>\n )\n}\n","import { useMemo, useRef, useState } from 'react'\n\nimport { DiffEditor, loader, MonacoDiffEditor, useMonaco } from '@monaco-editor/react'\nimport * as monaco from 'monaco-editor'\n\nimport { useTheme } from '../hooks/useTheme'\nimport { ThemeDefinition } from '../types/themes'\n\nloader.config({ monaco })\n\nexport interface CodeRevision {\n code: string\n revisionId?: number\n}\n\nconst defaultOptions: monaco.editor.IStandaloneDiffEditorConstructionOptions = {\n selectOnLineNumbers: true,\n minimap: { enabled: false },\n codeLens: false,\n scrollBeyondLastLine: false,\n smartSelect: {\n selectLeadingAndTrailingWhitespace: true\n },\n originalEditable: false,\n overviewRulerBorder: false,\n padding: {\n top: 10\n },\n fontSize: 14,\n fontFamily: '\"JetBrains Mono\", \"monospace\"',\n lineHeight: 20\n}\n\nexport interface DiffEditorProps<_> {\n original: string\n modified: string\n language: string\n themeConfig?: { rootElementSelector?: string; defaultTheme?: string; themes?: ThemeDefinition[] }\n theme?: string\n options?: {\n readOnly?: boolean\n }\n}\n\nexport function CodeDiffEditor<T>(props: DiffEditorProps<T>): JSX.Element {\n const { original, modified, language, themeConfig, options, theme: themeFromProps } = props\n const monaco = useMonaco()\n const [editor, setEditor] = useState<MonacoDiffEditor | undefined>()\n\n const monacoRef = useRef<typeof monaco>()\n\n const { theme } = useTheme({ monacoRef, themeConfig, editor, theme: themeFromProps })\n\n const mergedOptions = useMemo(() => {\n return { ...defaultOptions, ...(options ? options : {}) }\n }, [options])\n\n return (\n <>\n <DiffEditor\n className=\"overflow-hidden rounded-b-md border-x border-b\"\n language={language}\n theme={theme}\n original={original}\n modified={modified}\n height=\"75vh\"\n options={mergedOptions}\n onMount={setEditor}\n />\n </>\n )\n}\n","export enum SelectorType {\n //AbsolutePath = 'AbsolutePath',\n ContainsPath = 'ContainsPath'\n}\n\nexport interface ContainsPathSelector {\n type: SelectorType.ContainsPath\n /** Path have to starts with `basePath`*/\n basePath: string\n /** Path have to contains one of provided path. Base path is not included in match.*/\n paths: RegExp[]\n}\n\n// export interface AbsolutePathSelector {\n// type: SelectorType.AbsolutePath\n// /** Path have to be equal with `absolutePaths`*/\n// absolutePaths: string[]\n// }\n\nexport type PathSelector = ContainsPathSelector // | AbsolutePathSelector\n","import * as monaco from 'monaco-editor'\n\nimport { InlineAction } from '../types/inline-actions'\nimport { PathSelector, SelectorType } from '../types/selectors'\n\nexport interface CommandArg<T> extends Pick<InlineAction<T>, 'onClick' | 'data'> {\n range: monaco.IRange\n symbols: monaco.languages.DocumentSymbol[]\n path: string\n}\n\nexport interface GetCodeLensProps<T> {\n pathSymbolMap: Map<string, monaco.languages.DocumentSymbol>\n inlineActions?: { selectors: PathSelector[]; actions: InlineAction<T>[] }[]\n commandId: string | any // TODO\n}\n\nexport function getCodeLens<T>(props: GetCodeLensProps<T>) {\n const { pathSymbolMap, inlineActions = [], commandId } = props\n\n const pathSymbolMapObj = Object.fromEntries(pathSymbolMap.entries())\n\n const lenses: monaco.languages.CodeLens[] = []\n\n inlineActions?.forEach(inlineAction => {\n const actions = inlineAction.actions\n const selectors = inlineAction.selectors\n\n selectors.forEach(selector => {\n switch (selector.type) {\n case SelectorType.ContainsPath: {\n selector.paths.forEach(partRegexp => {\n const pathSymbolArr = Object.keys(pathSymbolMapObj).map(path => ({\n fullPath: path,\n path,\n symbol: pathSymbolMapObj[path]\n }))\n\n //console.log(pathSymbolArr)\n\n let candidateRelativePaths = pathSymbolArr.filter(pathSymbol => {\n return pathSymbol.path.startsWith(selector.basePath)\n })\n\n candidateRelativePaths = candidateRelativePaths.map(pathSymbol => ({\n ...pathSymbol,\n path: pathSymbol.path.substring(selector.basePath.length)\n }))\n\n //console.log(candidateRelativePaths)\n\n const finalPaths = candidateRelativePaths.filter(pathSymbol => {\n return partRegexp.test(pathSymbol.path)\n })\n\n //console.log(finalPaths, 'finalPaths')\n\n finalPaths.forEach(pathSymbol => {\n const path = pathSymbol.fullPath\n const symbol = pathSymbol.symbol\n const range = symbol.range\n\n actions.forEach(action => {\n const commandArg = {\n range,\n symbols: [symbol],\n onClick: action.onClick,\n data: action.data,\n path: path\n }\n\n lenses.push({\n range,\n command: {\n id: commandId,\n title: action.title,\n arguments: [commandArg]\n }\n })\n })\n })\n })\n break\n }\n }\n })\n })\n\n return lenses\n}\n","import { ILanguageFeaturesService } from 'monaco-editor/esm/vs/editor/common/services/languageFeatures.js'\nimport { OutlineModel } from 'monaco-editor/esm/vs/editor/contrib/documentSymbols/browser/outlineModel.js'\nimport { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js'\n\nexport interface MonacoGlobalsData {\n ILanguageFeaturesService: typeof ILanguageFeaturesService\n OutlineModel: typeof OutlineModel\n StandaloneServices: typeof StandaloneServices\n}\n\nexport class MonacoGlobals {\n static data: MonacoGlobalsData = {} as MonacoGlobalsData\n\n static set(data: MonacoGlobalsData) {\n MonacoGlobals.data = data\n }\n\n static get(): MonacoGlobalsData {\n return MonacoGlobals.data\n }\n}\n","import { editor, languages } from 'monaco-editor'\n\nimport { OutlineModelValueInternal, RootOutlineModelInternal } from '../types/monaco'\nimport { MonacoGlobals } from './monaco-globals'\n\nexport async function getOutlineModel(model: editor.ITextModel): Promise<RootOutlineModelInternal> {\n const monacoGlobals = MonacoGlobals.get()\n const { documentSymbolProvider } = monacoGlobals.StandaloneServices.get(monacoGlobals.ILanguageFeaturesService)\n const outlineModel = await monacoGlobals.OutlineModel.create(documentSymbolProvider, model)\n return outlineModel as unknown as RootOutlineModelInternal\n}\n\nexport function processOutlineModel(outlineModel: RootOutlineModelInternal) {\n const pathSymbolMap: Map<string, languages.DocumentSymbol> = new Map()\n\n processChildrenRec({\n pathSymbolMap,\n parentPath: '',\n children: outlineModel.children,\n parentKind: languages.SymbolKind.Module\n })\n\n return pathSymbolMap\n}\n\nfunction processChildrenRec(props: {\n pathSymbolMap: Map<string, languages.DocumentSymbol>\n parentPath: string\n children: Map<string, OutlineModelValueInternal>\n parentKind: languages.SymbolKind\n}) {\n switch (props.parentKind) {\n case languages.SymbolKind.Module: {\n processObject(props)\n break\n }\n case languages.SymbolKind.Array: {\n processArray(props)\n break\n }\n default: {\n processPrimitive(props)\n }\n }\n}\n\nfunction processObject(props: {\n pathSymbolMap: Map<string, languages.DocumentSymbol>\n parentPath: string\n children: Map<string, OutlineModelValueInternal>\n parentKind: languages.SymbolKind\n}) {\n props.children.forEach(child => {\n let childPath = props.parentPath\n\n if (child.symbol) {\n childPath = props.parentPath ? `${props.parentPath}.${child.symbol.name}` : child.symbol.name\n\n props.pathSymbolMap.set(childPath, child.symbol)\n }\n\n processChildrenRec({\n pathSymbolMap: props.pathSymbolMap,\n parentPath: childPath,\n children: child.children,\n parentKind: child?.symbol?.kind ?? props.parentKind\n })\n })\n}\n\nfunction processArray(props: {\n pathSymbolMap: Map<string, languages.DocumentSymbol>\n parentPath: string\n children: Map<string, OutlineModelValueInternal>\n parentKind: languages.SymbolKind\n}) {\n let idx = 0\n props.children.forEach(child => {\n const childPath = props.parentPath ? `${props.parentPath}.${idx}` : `${idx}`\n\n props.pathSymbolMap.set(childPath, child.symbol)\n\n idx += 1\n\n processChildrenRec({\n pathSymbolMap: props.pathSymbolMap,\n parentPath: childPath,\n children: child.children,\n parentKind: child.symbol.kind\n })\n })\n}\n\nfunction processPrimitive(props: {\n pathSymbolMap: Map<string, languages.DocumentSymbol>\n parentPath: string\n children: Map<string, OutlineModelValueInternal>\n parentKind: languages.SymbolKind\n}) {\n const child = props.children.get('0')\n\n if (child) {\n const childPath = props.parentPath ? `${props.parentPath}.${child.symbol.name}` : child?.symbol.name\n\n props.pathSymbolMap.set(childPath, child.symbol)\n }\n}\n","import { RefObject, useEffect } from 'react'\n\nimport * as monaco from 'monaco-editor'\n\nimport { InlineAction } from '../types/inline-actions'\nimport { PathSelector } from '../types/selectors'\nimport { getCodeLens } from '../utils/codelens-utils'\nimport { getOutlineModel, processOutlineModel } from '../utils/outline-model-to-path'\n\nexport function useCodeLenses<T>({\n editorRef,\n inlineActions\n}: {\n editorRef: RefObject<monaco.editor.IStandaloneCodeEditor | undefined | null>\n inlineActions?: { selectors: PathSelector[]; actions: InlineAction<T>[] }[]\n}): void {\n useEffect(() => {\n const disposable = monaco.languages.registerCodeLensProvider('yaml', {\n provideCodeLenses: async model => {\n const outlineModel = await getOutlineModel(model)\n const pathSymbolMap = processOutlineModel(outlineModel)\n\n const commandId = editorRef?.current?.addCommand(0, (_, { onClick, path, range, data }) => {\n onClick({ path, range, data })\n })\n\n if (!commandId) return\n\n const lenses = getCodeLens({ pathSymbolMap, inlineActions, commandId })\n\n return {\n lenses,\n dispose: () => undefined\n }\n }\n })\n\n return disposable.dispose\n }, [inlineActions, editorRef])\n}\n","import { RefObject, useEffect, useMemo, useState } from 'react'\n\nimport * as monaco from 'monaco-editor'\n\nimport { getOutlineModel, processOutlineModel } from '../utils/outline-model-to-path'\n\ntype UseDecoration = (arg: {\n editorRef?: RefObject<monaco.editor.IStandaloneCodeEditor>\n selection?: {\n path: string\n className: string\n revealInCenter?: boolean\n }\n}) => void\n\nexport const useDecoration: UseDecoration = ({ editorRef, selection }) => {\n const [range, setRange] = useState<monaco.IRange>()\n\n const computeRange = useMemo(\n () =>\n async (_editorRef?: RefObject<monaco.editor.IStandaloneCodeEditor>, path?: string, revealInCenter?: boolean) => {\n const model = editorRef?.current?.getModel()\n\n if (!model || !path) {\n return setRange(undefined)\n }\n\n const outlineModel = await getOutlineModel(model)\n const pathSymbolMap = processOutlineModel(outlineModel)\n const range = pathSymbolMap.get(path)?.range\n\n if (range) {\n setRange(range)\n\n if (revealInCenter) {\n editorRef?.current?.revealLineInCenter(range.startLineNumber)\n }\n }\n },\n []\n )\n\n useEffect(() => {\n if ('requestIdleCallback' in window) {\n const handle = requestIdleCallback(() => {\n computeRange(editorRef, selection?.path, selection?.revealInCenter)\n })\n return () => cancelIdleCallback(handle)\n }\n // fallback for safari\n else {\n const handle = setTimeout(() => {\n computeRange(editorRef, selection?.path, selection?.revealInCenter)\n }, 100)\n return () => clearTimeout(handle)\n }\n }, [selection?.path, selection?.revealInCenter, editorRef, computeRange])\n\n useEffect(() => {\n if (!range) return\n\n const decorations = editorRef?.current?.createDecorationsCollection([\n {\n // TODO: check why startColumn is set to \"end of row\"\n range: { ...range, startColumn: 1 },\n options: {\n isWholeLine: false,\n className: selection?.className\n }\n }\n ])\n\n return () => decorations?.clear()\n }, [range, editorRef, selection?.className])\n}\n","import { createContext, useCallback, useContext, useState } from 'react'\n\nimport type { editor } from 'monaco-editor'\n\nexport interface YamlEditorContextInterface {\n markers: editor.IMarker[]\n setMarkers: (markets: editor.IMarker[]) => void\n editor: editor.IStandaloneCodeEditor | null\n setEditor: (monacoEditor: editor.IStandaloneCodeEditor) => void\n updateCursorPosition: (position: { column: number; lineNumber: number }) => void\n}\n\nexport const YamlEditorContext = createContext<YamlEditorContextInterface>({\n markers: [],\n setMarkers: () => undefined,\n editor: null,\n setEditor: (_monacoEditor: editor.IStandaloneCodeEditor) => undefined,\n updateCursorPosition: (_position: { column: number; lineNumber: number }) => undefined\n})\n\nexport function YamlEditorContextProvider({ children }: React.PropsWithChildren): React.ReactElement {\n const [markers, setMarkers] = useState<editor.IMarker[]>([])\n const [monacoEditor, setMonacoEditor] = useState<editor.IStandaloneCodeEditor | null>(null)\n\n const updateCursorPosition = useCallback(\n (position: { column: number; lineNumber: number }) => {\n monacoEditor?.setPosition(position)\n monacoEditor?.focus()\n },\n [monacoEditor]\n )\n\n return (\n <YamlEditorContext.Provider\n value={{\n markers,\n setMarkers,\n editor: monacoEditor,\n setEditor: setMonacoEditor,\n updateCursorPosition\n }}\n >\n {children}\n </YamlEditorContext.Provider>\n )\n}\n\nexport function useYamlEditorContext(): YamlEditorContextInterface {\n return useContext(YamlEditorContext)\n}\n","import { RefObject, useEffect } from 'react'\n\nimport * as monaco from 'monaco-editor'\n\nimport { useYamlEditorContext } from '../components/YamlProvider'\n\nexport type UseProblems = (arg: { monacoRef: RefObject<typeof monaco | undefined> }) => void\n\nexport const useProblems: UseProblems = ({ monacoRef }): void => {\n const { setMarkers } = useYamlEditorContext()\n\n useEffect(() => {\n let handle: monaco.IDisposable\n\n const timeoutHandle = setTimeout(() => {\n const editor = monacoRef.current?.editor\n\n if (!editor) return\n\n handle = editor.onDidChangeMarkers(([resource]) => {\n const markers = editor.getModelMarkers({ resource })\n setMarkers(markers)\n })\n }, 100)\n\n return () => {\n clearTimeout(timeoutHandle)\n handle?.dispose()\n }\n }, [monacoRef])\n}\n","import { Uri } from 'monaco-editor'\nimport * as monaco from 'monaco-editor'\nimport { configureMonacoYaml } from 'monaco-yaml'\n\nlet isYamlMonacoConfigured = false\n\nexport function configureSchema(schemaConfig: any) {\n if (isYamlMonacoConfigured) return\n\n const config = {\n hover: true,\n completion: true,\n enableSchemaRequest: false,\n validate: true,\n schemas: [schemaConfig]\n }\n\n isYamlMonacoConfigured = true\n\n return configureMonacoYaml(monaco, config)\n}\n\nexport const schemaIdToUrl = (id: string): string => {\n return Uri.parse(`file://${id}`).toString()\n}\n\nexport const schemaIdToUri = (id: string): Uri => {\n return Uri.parse(schemaIdToUrl(id))\n}\n","import { useEffect } from 'react'\n\nimport { configureSchema, schemaIdToUrl } from '../utils/schema-utils'\n\nexport type UseSchema = (arg: { schemaConfig?: { schema: any; uri: string }; instanceId: string }) => void\n\nexport const useSchema: UseSchema = (props): void => {\n const { schemaConfig, instanceId } = props\n\n useEffect(() => {\n if (schemaConfig?.schema) {\n configureSchema({\n // If YAML file is opened matching this glob\n fileMatch: [schemaIdToUrl(instanceId.toString())],\n ...schemaConfig\n })\n }\n }, [schemaConfig?.schema, instanceId])\n}\n","import { useEffect, useRef, useState } from 'react'\n\nimport Editor, { loader, Monaco, useMonaco } from '@monaco-editor/react'\nimport * as monaco from 'monaco-editor'\n\nimport { useCodeLenses } from '../hooks/useCodeLens'\nimport { useDecoration } from '../hooks/useDecoration'\nimport { useProblems } from '../hooks/useProblems'\nimport { useSchema } from '../hooks/useSchema'\nimport { useTheme } from '../hooks/useTheme'\nimport { InlineAction } from '../types/inline-actions'\nimport { PathSelector } from '../types/selectors'\nimport { ThemeDefinition } from '../types/themes'\nimport { schemaIdToUrl } from '../utils/schema-utils'\nimport { useYamlEditorContext } from './YamlProvider'\n\nloader.config({ monaco })\n\nexport interface YamlRevision {\n yaml: string\n revisionId?: number\n}\n\nconst options: monaco.editor.IStandaloneEditorConstructionOptions = {\n selectOnLineNumbers: true\n}\n\nexport interface YamlEditorProps<T> {\n yamlRevision: YamlRevision\n onYamlRevisionChange: (yamlRevision: YamlRevision | undefined, ev: monaco.editor.IModelContentChangedEvent) => void\n schemaConfig?: { schema: any; uri: string }\n inlineActions?: { selectors: PathSelector[]; actions: InlineAction<T>[] }[]\n themeConfig?: { rootElementSelector?: string; defaultTheme?: string; themes?: ThemeDefinition[] }\n theme?: string\n selection?: {\n path: string\n className: string\n revealInCenter?: boolean\n }\n}\n\nexport function YamlEditor<T>(props: YamlEditorProps<T>): JSX.Element {\n const {\n yamlRevision,\n schemaConfig,\n inlineActions,\n themeConfig,\n onYamlRevisionChange,\n selection,\n theme: themeFromProps\n } = props\n const monaco = useMonaco()\n const [instanceId] = useState('yaml')\n const { editor, setEditor } = useYamlEditorContext()\n\n const monacoRef = useRef<typeof monaco>()\n const currentRevisionRef = useRef<YamlRevision>({ yaml: '', revisionId: 0 })\n\n const editorRef = useRef<monaco.editor.IStandaloneCodeEditor | null>(null)\n\n function handleEditorDidMount(editor: monaco.editor.IStandaloneCodeEditor, monaco: Monaco) {\n editorRef.current = editor\n monacoRef.current = monaco\n\n editor.setValue(yamlRevision.yaml)\n\n setEditor(editor)\n }\n\n useEffect(() => {\n if (editorRef.current) {\n if (!yamlRevision.revisionId || yamlRevision.revisionId > Number(currentRevisionRef.current?.revisionId)) {\n // editorRef.current?.setValue(yamlRevision.yaml)\n\n const model = editorRef.current.getModel()\n if (model) {\n editorRef.current.pushUndoStop()\n editorRef.current.executeEdits('edit', [\n {\n range: model.getFullModelRange(),\n text: yamlRevision.yaml\n }\n ])\n editorRef.current.pushUndoStop()\n }\n }\n }\n }, [yamlRevision, editorRef.current])\n\n useSchema({ schemaConfig, instanceId })\n\n useCodeLenses({ editorRef, inlineActions })\n\n const { theme } = useTheme({ monacoRef, themeConfig, editor, theme: themeFromProps })\n\n useProblems({ monacoRef })\n\n useDecoration({ editorRef, selection })\n\n return (\n <>\n <Editor\n onChange={(value, data) => {\n currentRevisionRef.current = { yaml: value ?? '', revisionId: data.versionId }\n onYamlRevisionChange({ ...currentRevisionRef.current }, data)\n }}\n language=\"yaml\"\n theme={theme}\n options={options}\n path={schemaIdToUrl(instanceId)}\n onMount={handleEditorDidMount}\n />\n </>\n )\n}\n"],"names":["f","require$$0","k","l","m","n","p","q","c","a","g","b","d","e","h","reactJsxRuntime_production_min","jsxRuntimeModule","useTheme","props","themeConfig","editor","theme","defaultTheme","themeInternal","setThemeInternal","useState","useEffect","_a","themeItem","monaco","createRandomString","length","chars","result","i","escapeSingleQuote","str","getMonacoEditorCss","instanceId","lineNumbersPosition","css","getMonacoEditorCommitCss","blameData","dateWidth","avatarSize","blameItem","avatarUrl","_b","initials","_d","_c","avatarBackgroundCss","_f","_e","lineNo","_h","_g","createCommitMessage","msg","commitMsgLength","ret","loader","BLAME_MESSAGE_WIDTH","COMMIT_MESSAGE_LENGTH","DATE_WIDTH","AVATAR_SIZE","LINE_NUMBERS_HOLDER_WIDTH","defaultOptions","BlameEditor","code","language","showSeparators","themeFromProps","blameDataRef","useRef","useMonaco","setEditor","lineNumbersDelta","setLineNumbersDelta","monacoRef","editorRef","setupBlameEditor","changeAccessor","index","domNode","decoratorItems","handleEditorDidMount","monacoEditorCss","useMemo","monacoEditorCommitInfoCss","scrollableEl","config","callback","mutationList","_","left","observer","lineNumbersCss","clipSelection","jsxs","Fragment","jsx","Editor","CodeEditor","codeRevision","onCodeRevisionChange","options","currentRevisionRef","model","mergedOptions","value","data","CodeDiffEditor","original","modified","DiffEditor","SelectorType","getCodeLens","pathSymbolMap","inlineActions","commandId","pathSymbolMapObj","lenses","inlineAction","actions","selector","partRegexp","candidateRelativePaths","path","pathSymbol","symbol","range","action","commandArg","_MonacoGlobals","__publicField","MonacoGlobals","getOutlineModel","monacoGlobals","documentSymbolProvider","processOutlineModel","outlineModel","processChildrenRec","languages","processObject","processArray","processPrimitive","child","childPath","idx","useCodeLenses","onClick","useDecoration","selection","setRange","computeRange","_editorRef","revealInCenter","handle","decorations","YamlEditorContext","createContext","_monacoEditor","_position","YamlEditorContextProvider","children","markers","setMarkers","monacoEditor","setMonacoEditor","updateCursorPosition","useCallback","position","useYamlEditorContext","useContext","useProblems","timeoutHandle","resource","isYamlMonacoConfigured","configureSchema","schemaConfig","configureMonacoYaml","schemaIdToUrl","id","Uri","useSchema","YamlEditor","yamlRevision","onYamlRevisionChange"],"mappings":";;;;;;;;;;;;;;;;;;AASa,IAAIA,KAAEC,IAAiBC,KAAE,OAAO,IAAI,eAAe,GAAEC,KAAE,OAAO,IAAI,gBAAgB,GAAEC,KAAE,OAAO,UAAU,gBAAeC,KAAEL,GAAE,mDAAmD,mBAAkBM,KAAE,EAAC,KAAI,IAAG,KAAI,IAAG,QAAO,IAAG,UAAS,GAAE;AAClP,SAASC,EAAEC,GAAEC,GAAEC,GAAE;AAAC,MAAIC,GAAEC,IAAE,IAAGC,IAAE,MAAKC,IAAE;AAAK,EAASJ,MAAT,WAAaG,IAAE,KAAGH,IAAYD,EAAE,QAAX,WAAiBI,IAAE,KAAGJ,EAAE,MAAcA,EAAE,QAAX,WAAiBK,IAAEL,EAAE;AAAK,OAAIE,KAAKF;AAAE,IAAAL,GAAE,KAAKK,GAAEE,CAAC,KAAG,CAACL,GAAE,eAAeK,CAAC,MAAIC,EAAED,CAAC,IAAEF,EAAEE,CAAC;AAAG,MAAGH,KAAGA,EAAE;AAAa,SAAIG,KAAKF,IAAED,EAAE,cAAaC;AAAE,MAASG,EAAED,CAAC,MAAZ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