@sanity/code-input 3.0.0-v3-studio.6 → 3.0.0-v3-studio-async-test.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/lib/cjs/editorSupport.bbd31eae.js +717 -0
- package/lib/cjs/editorSupport.bbd31eae.js.map +1 -0
- package/lib/cjs/index.js +50 -741
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/editorSupport.739e7d0c.js +714 -0
- package/lib/esm/editorSupport.739e7d0c.js.map +1 -0
- package/lib/esm/index.js +47 -741
- package/lib/esm/index.js.map +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/CodeInput.tsx +0 -2
- package/src/PreviewCode.tsx +31 -27
- package/src/config.ts +1 -1
- package/src/createHighlightMarkers.ts +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACA,wCAAuB,GAAR,CAAA,GAAA,yCAAQ,CAAA;;;;ACGvB,0DAA0D;AAC1D,MAAM,2BAAK,GAAG;IACZ,KAAK,EAAE;QACL;YACE,OAAO,EAAE,QAAQ;SAClB;QACD;YACE,OAAO,EAAE,QAAQ;SAClB;QACD;YACE,OAAO,EAAE,OAAO;SACjB;KACF;IACD,QAAQ,EAAE;QACR;YACE,OAAO,EAAE,0BAA0B;SACpC;QACD;YACE,OAAO,EAAE,YAAY;SACtB;QACD;YACE,OAAO,EAAE,OAAO;SACjB;QACD;YACE,OAAO,EAAE,aAAa;SACvB;QACD;YACE,OAAO,EAAE,SAAS;SACnB;KACF;IACD,WAAW,EAAE;QACX;YACE,KAAK,EAAE,qBAAqB;YAC5B,KAAK,4BAA4B;SAClC;KACF;IACD,UAAU,EAAE;QACV;YACE,KAAK,EAAE,oBAAoB;YAC3B,KAAK,6BAA6B;SACnC;KACF;IACD,aA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/ace-editor/groq.ts"],"sourcesContent":["import ReactAce from 'react-ace'\nexport default ReactAce\n\n// NOTE: MAKE SURE THESE ALIGN WITH SUPPORTED_LANGUAGES in ./config\nimport './groq'\n\nimport 'ace-builds/src-noconflict/mode-batchfile'\nimport 'ace-builds/src-noconflict/mode-csharp'\nimport 'ace-builds/src-noconflict/mode-css'\nimport 'ace-builds/src-noconflict/mode-golang'\nimport 'ace-builds/src-noconflict/mode-html'\nimport 'ace-builds/src-noconflict/mode-java'\nimport 'ace-builds/src-noconflict/mode-javascript'\nimport 'ace-builds/src-noconflict/mode-json'\nimport 'ace-builds/src-noconflict/mode-jsx'\nimport 'ace-builds/src-noconflict/mode-markdown'\nimport 'ace-builds/src-noconflict/mode-mysql'\nimport 'ace-builds/src-noconflict/mode-php'\nimport 'ace-builds/src-noconflict/mode-python'\nimport 'ace-builds/src-noconflict/mode-ruby'\nimport 'ace-builds/src-noconflict/mode-sass'\nimport 'ace-builds/src-noconflict/mode-scss'\nimport 'ace-builds/src-noconflict/mode-sh'\nimport 'ace-builds/src-noconflict/mode-text'\nimport 'ace-builds/src-noconflict/mode-tsx'\nimport 'ace-builds/src-noconflict/mode-typescript'\nimport 'ace-builds/src-noconflict/mode-xml'\nimport 'ace-builds/src-noconflict/mode-yaml'\n\n// Themes\nimport 'ace-builds/src-noconflict/theme-github'\nimport 'ace-builds/src-noconflict/theme-monokai'\nimport 'ace-builds/src-noconflict/theme-terminal'\nimport 'ace-builds/src-noconflict/theme-tomorrow'\n","/* eslint-disable no-undef */\n\nexport {}\n\n// Grammar from https://github.com/sanity-io/vscode-sanity\nconst rules = {\n start: [\n {\n include: '#query',\n },\n {\n include: '#value',\n },\n {\n include: '#pair',\n },\n ],\n '#query': [\n {\n include: '#nullary-access-operator',\n },\n {\n include: '#arraylike',\n },\n {\n include: '#pipe',\n },\n {\n include: '#sort-order',\n },\n {\n include: '#filter',\n },\n ],\n '#variable': [\n {\n token: 'variable.other.groq',\n regex: /\\$[_A-Za-z][_0-9A-Za-z]*/,\n },\n ],\n '#keyword': [\n {\n token: 'keyword.other.groq',\n regex: /\\b(?:asc|desc|in|match)\\b/,\n },\n ],\n '#comparison': [\n {\n token: 'keyword.operator.comparison.groq',\n // eslint-disable-next-line no-div-regex\n regex: /==|!=|>=|<=|<!=>|<|>/,\n },\n ],\n '#operator': [\n {\n token: 'keyword.operator.arithmetic.groq',\n regex: /\\+|-|\\*{1,2}|\\/|%/,\n },\n ],\n '#pipe': [\n {\n token: 'keyword.operator.pipe.groq',\n regex: /\\|/,\n },\n ],\n '#logical': [\n {\n token: 'keyword.operator.logical.groq',\n regex: /!|&&|\\|\\|/,\n },\n ],\n '#reference': [\n {\n token: 'keyword.operator.reference.groq',\n regex: /->/,\n },\n ],\n '#pair': [\n {\n include: '#identifier',\n },\n {\n include: '#value',\n },\n {\n include: '#filter',\n },\n {\n token: 'keyword.operator.pair.groq',\n regex: /[=]>/,\n },\n ],\n '#arraylike': [\n {\n token: 'punctuation.definition.bracket.begin.groq',\n regex: /\\[/,\n push: [\n {\n token: ['text', 'keyword.operator.descendant.groq'],\n regex: /(\\])((?:\\s*\\.)?)/,\n next: 'pop',\n },\n {\n include: '#range',\n },\n {\n include: '#filter',\n },\n {\n include: '#array-values',\n },\n ],\n },\n ],\n '#array': [\n {\n token: 'punctuation.definition.bracket.begin.groq',\n regex: /\\[/,\n push: [\n {\n token: 'punctuation.definition.bracket.end.groq',\n regex: /\\]/,\n next: 'pop',\n },\n {\n include: '#array-values',\n },\n {\n defaultToken: 'meta.structure.array.groq',\n },\n ],\n },\n ],\n '#range': [\n {\n token: [\n 'meta.structure.range.groq',\n 'constant.numeric.groq',\n 'meta.structure.range.groq',\n 'keyword.operator.range.groq',\n 'meta.structure.range.groq',\n 'constant.numeric.groq',\n 'meta.structure.range.groq',\n ],\n regex: /(\\s*)(\\d+)(\\s*)(\\.{2,3})(\\s*)(\\d+)(\\s*)/,\n },\n ],\n '#spread': [\n {\n token: 'punctuation.definition.spread.begin.groq',\n regex: /\\.\\.\\./,\n push: [\n {\n include: '#array',\n },\n {\n include: '#function-call',\n },\n {\n include: '#projection',\n },\n {\n token: 'punctuation.definition.spread.end.groq',\n regex: /(?=.)/,\n next: 'pop',\n },\n {\n defaultToken: 'meta.structure.spread.groq',\n },\n ],\n },\n ],\n '#array-values': [\n {\n include: '#value',\n },\n {\n include: '#spread',\n },\n {\n token: 'punctuation.separator.array.groq',\n regex: /,/,\n },\n {\n token: 'invalid.illegal.expected-array-separator.groq',\n regex: /[^\\s\\]]/,\n },\n ],\n '#filter': [\n {\n include: '#function-call',\n },\n {\n include: '#keyword',\n },\n {\n include: '#constant',\n },\n {\n include: '#identifier',\n },\n {\n include: '#value',\n },\n {\n include: '#comparison',\n },\n {\n include: '#operator',\n },\n {\n include: '#logical',\n },\n ],\n '#comments': [\n {\n token: ['punctuation.definition.comment.groq', 'comment.line.double-slash.js'],\n regex: /(\\/\\/)(.*$)/,\n },\n ],\n '#nullary-access-operator': [\n {\n token: 'constant.language.groq',\n regex: /[*@^]/,\n },\n ],\n '#constant': [\n {\n token: 'constant.language.groq',\n regex: /\\b(?:true|false|null)\\b/,\n },\n ],\n '#number': [\n {\n token: 'constant.numeric.groq',\n regex: /-?(?:0|[1-9]\\d*)(?:(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)?/,\n },\n ],\n '#named-projection': [\n {\n include: '#identifier',\n },\n {\n include: '#objectkey',\n },\n {\n include: '#projection',\n },\n ],\n '#projection': [\n {\n token: 'punctuation.definition.projection.begin.groq',\n regex: /\\{/,\n push: [\n {\n token: 'punctuation.definition.projection.end.groq',\n regex: /\\}/,\n next: 'pop',\n },\n {\n include: '#identifier',\n },\n {\n include: '#objectkey',\n },\n {\n include: '#named-projection',\n },\n {\n include: '#comments',\n },\n {\n include: '#spread',\n },\n {\n include: '#pair',\n },\n {\n token: 'punctuation.separator.projection.key-value.groq',\n regex: /:/,\n push: [\n {\n token: 'punctuation.separator.projection.pair.groq',\n regex: /,|(?=\\})/,\n next: 'pop',\n },\n {\n include: '#nullary-access-operator',\n },\n {\n include: '#arraylike',\n },\n {\n include: '#value',\n },\n {\n include: '#spread',\n },\n {\n include: '#identifier',\n },\n {\n include: '#operator',\n },\n {\n include: '#comparison',\n },\n {\n include: '#pair',\n },\n {\n token: 'invalid.illegal.expected-projection-separator.groq',\n regex: /[^\\s,]/,\n },\n {\n defaultToken: 'meta.structure.projection.value.groq',\n },\n ],\n },\n {\n token: 'invalid.illegal.expected-projection-separator.groq',\n regex: /[^\\s},]/,\n },\n {\n defaultToken: 'meta.structure.projection.groq',\n },\n ],\n },\n ],\n '#string': [\n {\n include: '#single-string',\n },\n {\n include: '#double-string',\n },\n ],\n '#double-string': [\n {\n token: 'punctuation.definition.string.begin.groq',\n regex: /\"/,\n push: [\n {\n token: 'punctuation.definition.string.end.groq',\n regex: /\"/,\n next: 'pop',\n },\n {\n include: '#stringcontent',\n },\n {\n defaultToken: 'string.quoted.double.groq',\n },\n ],\n },\n ],\n '#single-string': [\n {\n token: 'punctuation.definition.string.single.begin.groq',\n regex: /'/,\n push: [\n {\n token: 'punctuation.definition.string.single.end.groq',\n regex: /'/,\n next: 'pop',\n },\n {\n include: '#stringcontent',\n },\n {\n defaultToken: 'string.quoted.single.groq',\n },\n ],\n },\n ],\n '#objectkey': [\n {\n include: '#string',\n },\n ],\n '#stringcontent': [\n {\n token: 'constant.character.escape.groq',\n regex: /\\\\(?:[\"\\\\/bfnrt]|u[0-9a-fA-F]{4})/,\n },\n {\n token: 'invalid.illegal.unrecognized-string-escape.groq',\n regex: /\\\\./,\n },\n ],\n '#sort-pair': [\n {\n token: ['variable.other.readwrite.groq', 'text', 'keyword.other.groq'],\n regex: /([_A-Za-z][_0-9A-Za-z]*)(?:(\\s*)(asc|desc))?/,\n },\n {\n token: ['constant.language.groq', 'punctuation.definition.bracket.begin.groq'],\n regex: /(@)(\\[)/,\n push: [\n {\n token: ['punctuation.definition.bracket.begin.groq', 'text', 'keyword.other.groq'],\n regex: /(\\])(?:(\\s*)(asc|desc))?/,\n next: 'pop',\n },\n {\n include: '#string',\n },\n ],\n },\n ],\n '#sort-order': [\n {\n token: 'support.function.sortorder.begin.groq',\n regex: /\\border\\s*\\(/,\n push: [\n {\n token: 'support.function.sortorder.end.groq',\n regex: /\\)/,\n next: 'pop',\n },\n {\n include: '#sort-pair',\n },\n {\n token: 'punctuation.separator.array.groq',\n regex: /,/,\n },\n {\n token: 'invalid.illegal.expected-sort-separator.groq',\n regex: /[^\\s\\]]/,\n },\n {\n defaultToken: 'support.function.sortorder.groq',\n },\n ],\n },\n ],\n '#function-call': [\n {\n include: '#function-var-arg',\n },\n {\n include: '#function-single-arg',\n },\n {\n include: '#function-round',\n },\n ],\n '#function-var-arg': [\n {\n token: 'support.function.vararg.begin.groq',\n regex: /\\b(?:coalesce|select)\\s*\\(/,\n push: [\n {\n token: 'support.function.vararg.end.groq',\n regex: /\\)/,\n next: 'pop',\n },\n {\n include: '#value',\n },\n {\n include: '#identifier',\n },\n {\n include: '#filter',\n },\n {\n include: '#pair',\n },\n {\n token: 'punctuation.separator.array.groq',\n regex: /,/,\n },\n {\n defaultToken: 'support.function.vararg.groq',\n },\n ],\n },\n ],\n '#function-single-arg': [\n {\n token: 'support.function.singlearg.begin.groq',\n regex: /\\b(?:count|defined|length|path|references)\\s*\\(/,\n push: [\n {\n token: 'support.function.singlearg.end.groq',\n regex: /\\)/,\n next: 'pop',\n },\n {\n include: '#query',\n },\n {\n include: '#identifier',\n },\n {\n include: '#value',\n },\n {\n include: '#pair',\n },\n {\n defaultToken: 'support.function.singlearg.groq',\n },\n ],\n },\n ],\n '#identifier': [\n {\n token: [\n 'variable.other.readwrite.groq',\n 'text',\n 'punctuation.definition.block.js',\n 'text',\n 'keyword.operator.reference.groq',\n ],\n regex: /([_A-Za-z][_0-9A-Za-z]*)(\\s*)((?:\\[\\s*\\])?)(\\s*)(->)/,\n },\n {\n token: [\n 'variable.other.readwrite.groq',\n 'constant.language.groq',\n 'text',\n 'punctuation.definition.block.js',\n 'text',\n 'keyword.operator.descendant.groq',\n ],\n regex: /(?:([_A-Za-z][_0-9A-Za-z]*)|([@^]))(\\s*)((?:\\[\\s*\\])?)(\\s*)(\\.)/,\n },\n {\n token: 'variable.other.readwrite.groq',\n regex: /[_A-Za-z][_0-9A-Za-z]*/,\n },\n ],\n '#value': [\n {\n include: '#constant',\n },\n {\n include: '#number',\n },\n {\n include: '#string',\n },\n {\n include: '#array',\n },\n {\n include: '#variable',\n },\n {\n include: '#projection',\n },\n {\n include: '#comments',\n },\n {\n include: '#function-call',\n },\n ],\n}\n\ndeclare let ace: any\n\nace.define(\n 'ace/mode/groq_highlight_rules',\n ['require', 'exports', 'module', 'ace/lib/oop', 'ace/mode/text_highlight_rules'],\n (acequire: (id: string) => any, exports: Record<string, unknown>, _module: any) => {\n const oop = acequire('../lib/oop')\n const TextHighlightRules = acequire('./text_highlight_rules').TextHighlightRules\n\n const GroqHighlightRules = function () {\n /* eslint-disable @typescript-eslint/ban-ts-comment */\n // @ts-ignore\n this.$rules = rules\n // @ts-ignore\n this.normalizeRules()\n /* eslint-enable @typescript-eslint/ban-ts-comment */\n }\n\n oop.inherits(GroqHighlightRules, TextHighlightRules)\n\n exports.GroqHighlightRules = GroqHighlightRules\n }\n)\n\nace.define(\n 'ace/mode/groq',\n [\n 'require',\n 'exports',\n 'module',\n 'ace/lib/oop',\n 'ace/mode/text',\n 'ace/tokenizer',\n 'ace/mode/groq_highlight_rules',\n 'ace/mode/folding/cstyle',\n ],\n (acequire: (id: string) => any, exports: Record<string, unknown>, _module: any) => {\n // eslint-disable-next-line strict\n 'use strict'\n const oop = acequire('../lib/oop')\n const TextMode = acequire('./text').Mode\n const Tokenizer = acequire('../tokenizer').Tokenizer\n const GroqHighlightRules = acequire('./groq_highlight_rules').GroqHighlightRules\n const FoldMode = acequire('./folding/cstyle').FoldMode\n\n const Mode = function () {\n /* eslint-disable @typescript-eslint/ban-ts-comment */\n const highlighter = new GroqHighlightRules()\n // @ts-ignore\n this.foldingRules = new FoldMode()\n // @ts-ignore\n this.$tokenizer = new Tokenizer(highlighter.getRules())\n // @ts-ignore\n this.$keywordList = highlighter.$keywordList\n /* eslint-enable @typescript-eslint/ban-ts-comment */\n }\n oop.inherits(Mode, TextMode)\n ;(function () {\n /* eslint-disable @typescript-eslint/ban-ts-comment */\n // @ts-ignore\n this.lineCommentStart = \"'\"\n /* eslint-enable @typescript-eslint/ban-ts-comment */\n }.call(Mode.prototype))\n\n exports.Mode = Mode\n }\n)\n"],"names":[],"version":3,"file":"editorSupport.bbd31eae.js.map","sourceRoot":"../../"}
|