form-imagining 0.0.6 → 0.0.8

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.
Files changed (148) hide show
  1. package/README.md +13 -16
  2. package/dist/abap-5361cc9f.js +1314 -0
  3. package/dist/apex-f9413e6f.js +315 -0
  4. package/dist/assets/css.worker-c3850ceb.js +88 -0
  5. package/dist/assets/editor.worker-94ffd778.js +12 -0
  6. package/dist/assets/html.worker-88b237e1.js +460 -0
  7. package/dist/assets/json.worker-8dd963f3.js +43 -0
  8. package/dist/assets/ts.worker-184cdfdf.js +37022 -0
  9. package/dist/azcli-36f2cb5e.js +74 -0
  10. package/dist/bat-6b05202d.js +95 -0
  11. package/dist/bicep-788415e3.js +108 -0
  12. package/dist/cameligo-4e85ec93.js +168 -0
  13. package/dist/clojure-40fa5799.js +754 -0
  14. package/dist/coffee-f557f5e0.js +228 -0
  15. package/dist/cpp-ebbf7759.js +390 -0
  16. package/dist/csharp-1616f566.js +320 -0
  17. package/dist/csp-5f0bc3c4.js +57 -0
  18. package/dist/css-2b1aec9b.js +186 -0
  19. package/dist/cssMode-0bcb1554.js +1447 -0
  20. package/dist/cypher-b12b4ba8.js +262 -0
  21. package/dist/dart-e0d70030.js +270 -0
  22. package/dist/dockerfile-f9d4b2b0.js +132 -0
  23. package/dist/ecl-5b91fdec.js +454 -0
  24. package/dist/elixir-deffd5a6.js +489 -0
  25. package/dist/flow9-84cd00d7.js +141 -0
  26. package/dist/form-imagining.js +3 -16340
  27. package/dist/form-imagining.umd.cjs +1978 -102
  28. package/dist/freemarker2-4d8e8e55.js +644 -0
  29. package/dist/fsharp-d296151f.js +210 -0
  30. package/dist/go-7e72ff3b.js +208 -0
  31. package/dist/graphql-a93568a1.js +141 -0
  32. package/dist/handlebars-c43672f7.js +392 -0
  33. package/dist/hcl-b3994d8f.js +177 -0
  34. package/dist/html-c6099a2e.js +282 -0
  35. package/dist/htmlMode-31c10440.js +1457 -0
  36. package/dist/index-a3197e12.js +122055 -0
  37. package/dist/ini-df84509a.js +68 -0
  38. package/dist/java-fba3d046.js +221 -0
  39. package/dist/javascript-ac2b4ae2.js +77 -0
  40. package/dist/jsonMode-36333022.js +1868 -0
  41. package/dist/julia-cefd45f6.js +496 -0
  42. package/dist/kotlin-b87b6942.js +245 -0
  43. package/dist/less-8a7f37bc.js +168 -0
  44. package/dist/lexon-cb95cd13.js +151 -0
  45. package/dist/liquid-b5021331.js +239 -0
  46. package/dist/lua-6d5b3ea4.js +157 -0
  47. package/dist/m3-d0daf5d0.js +210 -0
  48. package/dist/markdown-48bb0c6f.js +202 -0
  49. package/dist/mdx-bbae5f86.js +172 -0
  50. package/dist/mips-20dcf886.js +194 -0
  51. package/dist/msdax-e9759e23.js +377 -0
  52. package/dist/mysql-95f335b2.js +876 -0
  53. package/dist/objective-c-ad0cfb47.js +188 -0
  54. package/dist/pascal-eda19dc3.js +245 -0
  55. package/dist/pascaligo-b7e0c89b.js +158 -0
  56. package/dist/perl-bbe5d32a.js +599 -0
  57. package/dist/pgsql-7ebaee1c.js +847 -0
  58. package/dist/php-2526756d.js +471 -0
  59. package/dist/pla-9ebd6f68.js +131 -0
  60. package/dist/postiats-9ac05cf6.js +544 -0
  61. package/dist/powerquery-1cae399d.js +890 -0
  62. package/dist/powershell-093b5b87.js +233 -0
  63. package/dist/protobuf-37993cbc.js +422 -0
  64. package/dist/pug-c2a5db5f.js +393 -0
  65. package/dist/python-fc373d9f.js +260 -0
  66. package/dist/qsharp-1450aac5.js +282 -0
  67. package/dist/r-a0642b90.js +245 -0
  68. package/dist/razor-1e9d135a.js +513 -0
  69. package/dist/redis-405cb63d.js +298 -0
  70. package/dist/redshift-830f82de.js +806 -0
  71. package/dist/restructuredtext-d81f5ef4.js +162 -0
  72. package/dist/ruby-d607b87e.js +444 -0
  73. package/dist/rust-86e74dbb.js +337 -0
  74. package/dist/sb-b7e5010d.js +110 -0
  75. package/dist/scala-a4d4a3c6.js +353 -0
  76. package/dist/scheme-81927e94.js +114 -0
  77. package/dist/scss-3f112fcd.js +244 -0
  78. package/dist/shell-d795bcaa.js +224 -0
  79. package/dist/solidity-5b556d3e.js +1351 -0
  80. package/dist/sophia-1da55998.js +190 -0
  81. package/dist/sparql-ac34318e.js +193 -0
  82. package/dist/sql-eef6393b.js +818 -0
  83. package/dist/st-758b1972.js +415 -0
  84. package/dist/style.css +1 -1
  85. package/dist/swift-63cb1847.js +315 -0
  86. package/dist/systemverilog-2538c608.js +556 -0
  87. package/dist/tcl-53e6282a.js +232 -0
  88. package/dist/tsMode-ea3b05db.js +815 -0
  89. package/dist/twig-80c3dc23.js +323 -0
  90. package/dist/typescript-b2ef5e0f.js +329 -0
  91. package/dist/vb-32089525.js +364 -0
  92. package/dist/wgsl-e681d5a0.js +420 -0
  93. package/dist/xml-579a5775.js +96 -0
  94. package/dist/yaml-c31c56b7.js +185 -0
  95. package/package.json +11 -18
  96. package/dist/components/generate/GenerateForm.vue.d.ts +0 -2
  97. package/dist/components/index.d.ts +0 -9
  98. package/dist/components/model/baseModel.d.ts +0 -8
  99. package/dist/components/model/dataSourceModel.d.ts +0 -19
  100. package/dist/components/model/gridModel.d.ts +0 -55
  101. package/dist/components/model/inputModel.d.ts +0 -14
  102. package/dist/components/model/reportModel.d.ts +0 -43
  103. package/dist/components/model/scriptModel.d.ts +0 -6
  104. package/dist/components/model/sqlModel.d.ts +0 -7
  105. package/dist/components/model/tableModel.d.ts +0 -16
  106. package/dist/components/model/textModel.d.ts +0 -14
  107. package/dist/components/monaco/monacoEditorType.d.ts +0 -56
  108. package/dist/components/registerGlobComp.d.ts +0 -3
  109. package/dist/components/wonderform/HelloWord.vue.d.ts +0 -2
  110. package/dist/components/wonderform/config/index.vue.d.ts +0 -14
  111. package/dist/components/wonderform/config/modules/Col.vue.d.ts +0 -14
  112. package/dist/components/wonderform/config/modules/DataSource.vue.d.ts +0 -2
  113. package/dist/components/wonderform/config/modules/Form.vue.d.ts +0 -2
  114. package/dist/components/wonderform/config/modules/Grid.vue.d.ts +0 -14
  115. package/dist/components/wonderform/config/modules/Properties.vue.d.ts +0 -14
  116. package/dist/components/wonderform/config/modules/Table.vue.d.ts +0 -14
  117. package/dist/components/wonderform/config/modules/TypeScript.vue.d.ts +0 -2
  118. package/dist/components/wonderform/design/index.vue.d.ts +0 -6
  119. package/dist/components/wonderform/design/modules/FormGrid.vue.d.ts +0 -38
  120. package/dist/components/wonderform/design/modules/FormInput.vue.d.ts +0 -26
  121. package/dist/components/wonderform/design/modules/FormReport.vue.d.ts +0 -32
  122. package/dist/components/wonderform/design/modules/FormTable.vue.d.ts +0 -32
  123. package/dist/components/wonderform/dsource/index.vue.d.ts +0 -14
  124. package/dist/components/wonderform/dsource/modules/SqlModule.vue.d.ts +0 -40
  125. package/dist/components/wonderform/header/Header.vue.d.ts +0 -2
  126. package/dist/components/wonderform/header/modules/Code.vue.d.ts +0 -23
  127. package/dist/components/wonderform/header/modules/events.d.ts +0 -1
  128. package/dist/components/wonderform/index.vue.d.ts +0 -2
  129. package/dist/components/wonderform/tool/index.vue.d.ts +0 -2
  130. package/dist/enums/httpEnum.d.ts +0 -37
  131. package/dist/main.d.ts +0 -1
  132. package/dist/mock/dict.d.ts +0 -8
  133. package/dist/router/guard/index.d.ts +0 -2
  134. package/dist/router/guard/permissionGuard.d.ts +0 -2
  135. package/dist/router/index.d.ts +0 -3
  136. package/dist/router/routes/basicRoutes.d.ts +0 -8
  137. package/dist/stores/index.d.ts +0 -4
  138. package/dist/stores/modules/data.d.ts +0 -7177
  139. package/dist/stores/modules/form.d.ts +0 -2060
  140. package/dist/utils/form/commonUtils.d.ts +0 -8
  141. package/dist/utils/form/config.d.ts +0 -107
  142. package/dist/utils/form/generatecode.d.ts +0 -23
  143. package/dist/utils/form/validateUtil.d.ts +0 -13
  144. package/dist/utils/form/wonder1.0.1.d.ts +0 -29
  145. package/dist/utils/http/axios/axios.d.ts +0 -48
  146. package/dist/utils/http/axios/axiosModel.d.ts +0 -8
  147. package/dist/utils/http/axios/index.d.ts +0 -2
  148. package/dist/utils/utils.d.ts +0 -1
@@ -0,0 +1,233 @@
1
+ /*!-----------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
4
+ * Released under the MIT license
5
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
6
+ *-----------------------------------------------------------------------------*/
7
+ var e = {
8
+ wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
9
+ comments: {
10
+ lineComment: "#",
11
+ blockComment: ["<#", "#>"]
12
+ },
13
+ brackets: [
14
+ ["{", "}"],
15
+ ["[", "]"],
16
+ ["(", ")"]
17
+ ],
18
+ autoClosingPairs: [
19
+ { open: "{", close: "}" },
20
+ { open: "[", close: "]" },
21
+ { open: "(", close: ")" },
22
+ { open: '"', close: '"', notIn: ["string"] },
23
+ { open: "'", close: "'", notIn: ["string", "comment"] }
24
+ ],
25
+ surroundingPairs: [
26
+ { open: "{", close: "}" },
27
+ { open: "[", close: "]" },
28
+ { open: "(", close: ")" },
29
+ { open: '"', close: '"' },
30
+ { open: "'", close: "'" }
31
+ ],
32
+ folding: {
33
+ markers: {
34
+ start: new RegExp("^\\s*#region\\b"),
35
+ end: new RegExp("^\\s*#endregion\\b")
36
+ }
37
+ }
38
+ }, n = {
39
+ defaultToken: "",
40
+ ignoreCase: !0,
41
+ tokenPostfix: ".ps1",
42
+ brackets: [
43
+ { token: "delimiter.curly", open: "{", close: "}" },
44
+ { token: "delimiter.square", open: "[", close: "]" },
45
+ { token: "delimiter.parenthesis", open: "(", close: ")" }
46
+ ],
47
+ keywords: [
48
+ "begin",
49
+ "break",
50
+ "catch",
51
+ "class",
52
+ "continue",
53
+ "data",
54
+ "define",
55
+ "do",
56
+ "dynamicparam",
57
+ "else",
58
+ "elseif",
59
+ "end",
60
+ "exit",
61
+ "filter",
62
+ "finally",
63
+ "for",
64
+ "foreach",
65
+ "from",
66
+ "function",
67
+ "if",
68
+ "in",
69
+ "param",
70
+ "process",
71
+ "return",
72
+ "switch",
73
+ "throw",
74
+ "trap",
75
+ "try",
76
+ "until",
77
+ "using",
78
+ "var",
79
+ "while",
80
+ "workflow",
81
+ "parallel",
82
+ "sequence",
83
+ "inlinescript",
84
+ "configuration"
85
+ ],
86
+ helpKeywords: /SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/,
87
+ symbols: /[=><!~?&%|+\-*\/\^;\.,]+/,
88
+ escapes: /`(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
89
+ tokenizer: {
90
+ root: [
91
+ [
92
+ /[a-zA-Z_][\w-]*/,
93
+ {
94
+ cases: {
95
+ "@keywords": { token: "keyword.$0" },
96
+ "@default": ""
97
+ }
98
+ }
99
+ ],
100
+ [/[ \t\r\n]+/, ""],
101
+ [/^:\w*/, "metatag"],
102
+ [
103
+ /\$(\{((global|local|private|script|using):)?[\w]+\}|((global|local|private|script|using):)?[\w]+)/,
104
+ "variable"
105
+ ],
106
+ [/<#/, "comment", "@comment"],
107
+ [/#.*$/, "comment"],
108
+ [/[{}()\[\]]/, "@brackets"],
109
+ [/@symbols/, "delimiter"],
110
+ [/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
111
+ [/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, "number.hex"],
112
+ [/\d+?/, "number"],
113
+ [/[;,.]/, "delimiter"],
114
+ [/\@"/, "string", '@herestring."'],
115
+ [/\@'/, "string", "@herestring.'"],
116
+ [
117
+ /"/,
118
+ {
119
+ cases: {
120
+ "@eos": "string",
121
+ "@default": { token: "string", next: '@string."' }
122
+ }
123
+ }
124
+ ],
125
+ [
126
+ /'/,
127
+ {
128
+ cases: {
129
+ "@eos": "string",
130
+ "@default": { token: "string", next: "@string.'" }
131
+ }
132
+ }
133
+ ]
134
+ ],
135
+ string: [
136
+ [
137
+ /[^"'\$`]+/,
138
+ {
139
+ cases: {
140
+ "@eos": { token: "string", next: "@popall" },
141
+ "@default": "string"
142
+ }
143
+ }
144
+ ],
145
+ [
146
+ /@escapes/,
147
+ {
148
+ cases: {
149
+ "@eos": { token: "string.escape", next: "@popall" },
150
+ "@default": "string.escape"
151
+ }
152
+ }
153
+ ],
154
+ [
155
+ /`./,
156
+ {
157
+ cases: {
158
+ "@eos": {
159
+ token: "string.escape.invalid",
160
+ next: "@popall"
161
+ },
162
+ "@default": "string.escape.invalid"
163
+ }
164
+ }
165
+ ],
166
+ [
167
+ /\$[\w]+$/,
168
+ {
169
+ cases: {
170
+ '$S2=="': { token: "variable", next: "@popall" },
171
+ "@default": { token: "string", next: "@popall" }
172
+ }
173
+ }
174
+ ],
175
+ [
176
+ /\$[\w]+/,
177
+ {
178
+ cases: {
179
+ '$S2=="': "variable",
180
+ "@default": "string"
181
+ }
182
+ }
183
+ ],
184
+ [
185
+ /["']/,
186
+ {
187
+ cases: {
188
+ "$#==$S2": { token: "string", next: "@pop" },
189
+ "@default": {
190
+ cases: {
191
+ "@eos": { token: "string", next: "@popall" },
192
+ "@default": "string"
193
+ }
194
+ }
195
+ }
196
+ }
197
+ ]
198
+ ],
199
+ herestring: [
200
+ [
201
+ /^\s*(["'])@/,
202
+ {
203
+ cases: {
204
+ "$1==$S2": { token: "string", next: "@pop" },
205
+ "@default": "string"
206
+ }
207
+ }
208
+ ],
209
+ [/[^\$`]+/, "string"],
210
+ [/@escapes/, "string.escape"],
211
+ [/`./, "string.escape.invalid"],
212
+ [
213
+ /\$[\w]+/,
214
+ {
215
+ cases: {
216
+ '$S2=="': "variable",
217
+ "@default": "string"
218
+ }
219
+ }
220
+ ]
221
+ ],
222
+ comment: [
223
+ [/[^#\.]+/, "comment"],
224
+ [/#>/, "comment", "@pop"],
225
+ [/(\.)(@helpKeywords)(?!\w)/, { token: "comment.keyword.$2" }],
226
+ [/[\.#]/, "comment"]
227
+ ]
228
+ }
229
+ };
230
+ export {
231
+ e as conf,
232
+ n as language
233
+ };
@@ -0,0 +1,422 @@
1
+ /*!-----------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166)
4
+ * Released under the MIT license
5
+ * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
6
+ *-----------------------------------------------------------------------------*/
7
+ var e = ["true", "false"], t = {
8
+ comments: {
9
+ lineComment: "//",
10
+ blockComment: ["/*", "*/"]
11
+ },
12
+ brackets: [
13
+ ["{", "}"],
14
+ ["[", "]"],
15
+ ["(", ")"],
16
+ ["<", ">"]
17
+ ],
18
+ surroundingPairs: [
19
+ { open: "{", close: "}" },
20
+ { open: "[", close: "]" },
21
+ { open: "(", close: ")" },
22
+ { open: "<", close: ">" },
23
+ { open: '"', close: '"' },
24
+ { open: "'", close: "'" }
25
+ ],
26
+ autoClosingPairs: [
27
+ { open: "{", close: "}" },
28
+ { open: "[", close: "]" },
29
+ { open: "(", close: ")" },
30
+ { open: "<", close: ">" },
31
+ { open: '"', close: '"', notIn: ["string"] },
32
+ { open: "'", close: "'", notIn: ["string"] }
33
+ ],
34
+ autoCloseBefore: `.,=}])>'
35
+ `,
36
+ indentationRules: {
37
+ increaseIndentPattern: new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),
38
+ decreaseIndentPattern: new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")
39
+ }
40
+ }, n = {
41
+ defaultToken: "",
42
+ tokenPostfix: ".proto",
43
+ brackets: [
44
+ { open: "{", close: "}", token: "delimiter.curly" },
45
+ { open: "[", close: "]", token: "delimiter.square" },
46
+ { open: "(", close: ")", token: "delimiter.parenthesis" },
47
+ { open: "<", close: ">", token: "delimiter.angle" }
48
+ ],
49
+ symbols: /[=><!~?:&|+\-*/^%]+/,
50
+ keywords: [
51
+ "syntax",
52
+ "import",
53
+ "weak",
54
+ "public",
55
+ "package",
56
+ "option",
57
+ "repeated",
58
+ "oneof",
59
+ "map",
60
+ "reserved",
61
+ "to",
62
+ "max",
63
+ "enum",
64
+ "message",
65
+ "service",
66
+ "rpc",
67
+ "stream",
68
+ "returns",
69
+ "package",
70
+ "optional",
71
+ "true",
72
+ "false"
73
+ ],
74
+ builtinTypes: [
75
+ "double",
76
+ "float",
77
+ "int32",
78
+ "int64",
79
+ "uint32",
80
+ "uint64",
81
+ "sint32",
82
+ "sint64",
83
+ "fixed32",
84
+ "fixed64",
85
+ "sfixed32",
86
+ "sfixed64",
87
+ "bool",
88
+ "string",
89
+ "bytes"
90
+ ],
91
+ operators: ["=", "+", "-"],
92
+ namedLiterals: e,
93
+ escapes: "\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\${)",
94
+ identifier: /[a-zA-Z]\w*/,
95
+ fullIdentifier: /@identifier(?:\s*\.\s*@identifier)*/,
96
+ optionName: /(?:@identifier|\(\s*@fullIdentifier\s*\))(?:\s*\.\s*@identifier)*/,
97
+ messageName: /@identifier/,
98
+ enumName: /@identifier/,
99
+ messageType: /\.?\s*(?:@identifier\s*\.\s*)*@messageName/,
100
+ enumType: /\.?\s*(?:@identifier\s*\.\s*)*@enumName/,
101
+ floatLit: /[0-9]+\s*\.\s*[0-9]*(?:@exponent)?|[0-9]+@exponent|\.[0-9]+(?:@exponent)?/,
102
+ exponent: /[eE]\s*[+-]?\s*[0-9]+/,
103
+ boolLit: /true\b|false\b/,
104
+ decimalLit: /[1-9][0-9]*/,
105
+ octalLit: /0[0-7]*/,
106
+ hexLit: /0[xX][0-9a-fA-F]+/,
107
+ type: /double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes|@messageType|@enumType/,
108
+ keyType: /int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string/,
109
+ tokenizer: {
110
+ root: [
111
+ { include: "@whitespace" },
112
+ [/syntax/, "keyword"],
113
+ [/=/, "operators"],
114
+ [/;/, "delimiter"],
115
+ [
116
+ /(")(proto3)(")/,
117
+ ["string.quote", "string", { token: "string.quote", switchTo: "@topLevel.proto3" }]
118
+ ],
119
+ [
120
+ /(")(proto2)(")/,
121
+ ["string.quote", "string", { token: "string.quote", switchTo: "@topLevel.proto2" }]
122
+ ],
123
+ [
124
+ /.*?/,
125
+ { token: "", switchTo: "@topLevel.proto2" }
126
+ ]
127
+ ],
128
+ topLevel: [
129
+ { include: "@whitespace" },
130
+ { include: "@constant" },
131
+ [/=/, "operators"],
132
+ [/[;.]/, "delimiter"],
133
+ [
134
+ /@fullIdentifier/,
135
+ {
136
+ cases: {
137
+ option: { token: "keyword", next: "@option.$S2" },
138
+ enum: { token: "keyword", next: "@enumDecl.$S2" },
139
+ message: { token: "keyword", next: "@messageDecl.$S2" },
140
+ service: { token: "keyword", next: "@serviceDecl.$S2" },
141
+ extend: {
142
+ cases: {
143
+ "$S2==proto2": { token: "keyword", next: "@extendDecl.$S2" }
144
+ }
145
+ },
146
+ "@keywords": "keyword",
147
+ "@default": "identifier"
148
+ }
149
+ }
150
+ ]
151
+ ],
152
+ enumDecl: [
153
+ { include: "@whitespace" },
154
+ [/@identifier/, "type.identifier"],
155
+ [/{/, { token: "@brackets", bracket: "@open", switchTo: "@enumBody.$S2" }]
156
+ ],
157
+ enumBody: [
158
+ { include: "@whitespace" },
159
+ { include: "@constant" },
160
+ [/=/, "operators"],
161
+ [/;/, "delimiter"],
162
+ [/option\b/, "keyword", "@option.$S2"],
163
+ [/@identifier/, "identifier"],
164
+ [/\[/, { token: "@brackets", bracket: "@open", next: "@options.$S2" }],
165
+ [/}/, { token: "@brackets", bracket: "@close", next: "@pop" }]
166
+ ],
167
+ messageDecl: [
168
+ { include: "@whitespace" },
169
+ [/@identifier/, "type.identifier"],
170
+ [/{/, { token: "@brackets", bracket: "@open", switchTo: "@messageBody.$S2" }]
171
+ ],
172
+ messageBody: [
173
+ { include: "@whitespace" },
174
+ { include: "@constant" },
175
+ [/=/, "operators"],
176
+ [/;/, "delimiter"],
177
+ [
178
+ "(map)(s*)(<)",
179
+ ["keyword", "white", { token: "@brackets", bracket: "@open", next: "@map.$S2" }]
180
+ ],
181
+ [
182
+ /@identifier/,
183
+ {
184
+ cases: {
185
+ option: { token: "keyword", next: "@option.$S2" },
186
+ enum: { token: "keyword", next: "@enumDecl.$S2" },
187
+ message: { token: "keyword", next: "@messageDecl.$S2" },
188
+ oneof: { token: "keyword", next: "@oneofDecl.$S2" },
189
+ extensions: {
190
+ cases: {
191
+ "$S2==proto2": { token: "keyword", next: "@reserved.$S2" }
192
+ }
193
+ },
194
+ reserved: { token: "keyword", next: "@reserved.$S2" },
195
+ "(?:repeated|optional)": { token: "keyword", next: "@field.$S2" },
196
+ required: {
197
+ cases: {
198
+ "$S2==proto2": { token: "keyword", next: "@field.$S2" }
199
+ }
200
+ },
201
+ "$S2==proto3": { token: "@rematch", next: "@field.$S2" }
202
+ }
203
+ }
204
+ ],
205
+ [/\[/, { token: "@brackets", bracket: "@open", next: "@options.$S2" }],
206
+ [/}/, { token: "@brackets", bracket: "@close", next: "@pop" }]
207
+ ],
208
+ extendDecl: [
209
+ { include: "@whitespace" },
210
+ [/@identifier/, "type.identifier"],
211
+ [/{/, { token: "@brackets", bracket: "@open", switchTo: "@extendBody.$S2" }]
212
+ ],
213
+ extendBody: [
214
+ { include: "@whitespace" },
215
+ { include: "@constant" },
216
+ [/;/, "delimiter"],
217
+ [/(?:repeated|optional|required)/, "keyword", "@field.$S2"],
218
+ [/\[/, { token: "@brackets", bracket: "@open", next: "@options.$S2" }],
219
+ [/}/, { token: "@brackets", bracket: "@close", next: "@pop" }]
220
+ ],
221
+ options: [
222
+ { include: "@whitespace" },
223
+ { include: "@constant" },
224
+ [/;/, "delimiter"],
225
+ [/@optionName/, "annotation"],
226
+ [/[()]/, "annotation.brackets"],
227
+ [/=/, "operator"],
228
+ [/\]/, { token: "@brackets", bracket: "@close", next: "@pop" }]
229
+ ],
230
+ option: [
231
+ { include: "@whitespace" },
232
+ [/@optionName/, "annotation"],
233
+ [/[()]/, "annotation.brackets"],
234
+ [/=/, "operator", "@pop"]
235
+ ],
236
+ oneofDecl: [
237
+ { include: "@whitespace" },
238
+ [/@identifier/, "identifier"],
239
+ [/{/, { token: "@brackets", bracket: "@open", switchTo: "@oneofBody.$S2" }]
240
+ ],
241
+ oneofBody: [
242
+ { include: "@whitespace" },
243
+ { include: "@constant" },
244
+ [/;/, "delimiter"],
245
+ [/(@identifier)(\s*)(=)/, ["identifier", "white", "delimiter"]],
246
+ [
247
+ /@fullIdentifier|\./,
248
+ {
249
+ cases: {
250
+ "@builtinTypes": "keyword",
251
+ "@default": "type.identifier"
252
+ }
253
+ }
254
+ ],
255
+ [/\[/, { token: "@brackets", bracket: "@open", next: "@options.$S2" }],
256
+ [/}/, { token: "@brackets", bracket: "@close", next: "@pop" }]
257
+ ],
258
+ reserved: [
259
+ { include: "@whitespace" },
260
+ [/,/, "delimiter"],
261
+ [/;/, "delimiter", "@pop"],
262
+ { include: "@constant" },
263
+ [/to\b|max\b/, "keyword"]
264
+ ],
265
+ map: [
266
+ { include: "@whitespace" },
267
+ [
268
+ /@fullIdentifier|\./,
269
+ {
270
+ cases: {
271
+ "@builtinTypes": "keyword",
272
+ "@default": "type.identifier"
273
+ }
274
+ }
275
+ ],
276
+ [/,/, "delimiter"],
277
+ [/>/, { token: "@brackets", bracket: "@close", switchTo: "identifier" }]
278
+ ],
279
+ field: [
280
+ { include: "@whitespace" },
281
+ [
282
+ "group",
283
+ {
284
+ cases: {
285
+ "$S2==proto2": { token: "keyword", switchTo: "@groupDecl.$S2" }
286
+ }
287
+ }
288
+ ],
289
+ [/(@identifier)(\s*)(=)/, ["identifier", "white", { token: "delimiter", next: "@pop" }]],
290
+ [
291
+ /@fullIdentifier|\./,
292
+ {
293
+ cases: {
294
+ "@builtinTypes": "keyword",
295
+ "@default": "type.identifier"
296
+ }
297
+ }
298
+ ]
299
+ ],
300
+ groupDecl: [
301
+ { include: "@whitespace" },
302
+ [/@identifier/, "identifier"],
303
+ ["=", "operator"],
304
+ [/{/, { token: "@brackets", bracket: "@open", switchTo: "@messageBody.$S2" }],
305
+ { include: "@constant" }
306
+ ],
307
+ type: [
308
+ { include: "@whitespace" },
309
+ [/@identifier/, "type.identifier", "@pop"],
310
+ [/./, "delimiter"]
311
+ ],
312
+ identifier: [{ include: "@whitespace" }, [/@identifier/, "identifier", "@pop"]],
313
+ serviceDecl: [
314
+ { include: "@whitespace" },
315
+ [/@identifier/, "identifier"],
316
+ [/{/, { token: "@brackets", bracket: "@open", switchTo: "@serviceBody.$S2" }]
317
+ ],
318
+ serviceBody: [
319
+ { include: "@whitespace" },
320
+ { include: "@constant" },
321
+ [/;/, "delimiter"],
322
+ [/option\b/, "keyword", "@option.$S2"],
323
+ [/rpc\b/, "keyword", "@rpc.$S2"],
324
+ [/\[/, { token: "@brackets", bracket: "@open", next: "@options.$S2" }],
325
+ [/}/, { token: "@brackets", bracket: "@close", next: "@pop" }]
326
+ ],
327
+ rpc: [
328
+ { include: "@whitespace" },
329
+ [/@identifier/, "identifier"],
330
+ [/\(/, { token: "@brackets", bracket: "@open", switchTo: "@request.$S2" }],
331
+ [/{/, { token: "@brackets", bracket: "@open", next: "@methodOptions.$S2" }],
332
+ [/;/, "delimiter", "@pop"]
333
+ ],
334
+ request: [
335
+ { include: "@whitespace" },
336
+ [
337
+ /@messageType/,
338
+ {
339
+ cases: {
340
+ stream: { token: "keyword", next: "@type.$S2" },
341
+ "@default": "type.identifier"
342
+ }
343
+ }
344
+ ],
345
+ [/\)/, { token: "@brackets", bracket: "@close", switchTo: "@returns.$S2" }]
346
+ ],
347
+ returns: [
348
+ { include: "@whitespace" },
349
+ [/returns\b/, "keyword"],
350
+ [/\(/, { token: "@brackets", bracket: "@open", switchTo: "@response.$S2" }]
351
+ ],
352
+ response: [
353
+ { include: "@whitespace" },
354
+ [
355
+ /@messageType/,
356
+ {
357
+ cases: {
358
+ stream: { token: "keyword", next: "@type.$S2" },
359
+ "@default": "type.identifier"
360
+ }
361
+ }
362
+ ],
363
+ [/\)/, { token: "@brackets", bracket: "@close", switchTo: "@rpc.$S2" }]
364
+ ],
365
+ methodOptions: [
366
+ { include: "@whitespace" },
367
+ { include: "@constant" },
368
+ [/;/, "delimiter"],
369
+ ["option", "keyword"],
370
+ [/@optionName/, "annotation"],
371
+ [/[()]/, "annotation.brackets"],
372
+ [/=/, "operator"],
373
+ [/}/, { token: "@brackets", bracket: "@close", next: "@pop" }]
374
+ ],
375
+ comment: [
376
+ [/[^\/*]+/, "comment"],
377
+ [/\/\*/, "comment", "@push"],
378
+ ["\\*/", "comment", "@pop"],
379
+ [/[\/*]/, "comment"]
380
+ ],
381
+ string: [
382
+ [/[^\\"]+/, "string"],
383
+ [/@escapes/, "string.escape"],
384
+ [/\\./, "string.escape.invalid"],
385
+ [/"/, { token: "string.quote", bracket: "@close", next: "@pop" }]
386
+ ],
387
+ stringSingle: [
388
+ [/[^\\']+/, "string"],
389
+ [/@escapes/, "string.escape"],
390
+ [/\\./, "string.escape.invalid"],
391
+ [/'/, { token: "string.quote", bracket: "@close", next: "@pop" }]
392
+ ],
393
+ constant: [
394
+ ["@boolLit", "keyword.constant"],
395
+ ["@hexLit", "number.hex"],
396
+ ["@octalLit", "number.octal"],
397
+ ["@decimalLit", "number"],
398
+ ["@floatLit", "number.float"],
399
+ [/("([^"\\]|\\.)*|'([^'\\]|\\.)*)$/, "string.invalid"],
400
+ [/"/, { token: "string.quote", bracket: "@open", next: "@string" }],
401
+ [/'/, { token: "string.quote", bracket: "@open", next: "@stringSingle" }],
402
+ [/{/, { token: "@brackets", bracket: "@open", next: "@prototext" }],
403
+ [/identifier/, "identifier"]
404
+ ],
405
+ whitespace: [
406
+ [/[ \t\r\n]+/, "white"],
407
+ [/\/\*/, "comment", "@comment"],
408
+ [/\/\/.*$/, "comment"]
409
+ ],
410
+ prototext: [
411
+ { include: "@whitespace" },
412
+ { include: "@constant" },
413
+ [/@identifier/, "identifier"],
414
+ [/[:;]/, "delimiter"],
415
+ [/}/, { token: "@brackets", bracket: "@close", next: "@pop" }]
416
+ ]
417
+ }
418
+ };
419
+ export {
420
+ t as conf,
421
+ n as language
422
+ };