@fallen-8/studio 0.0.32

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 (231) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +93 -0
  3. package/dist-lib/Canvas3D-C5og4ZIQ.js +62011 -0
  4. package/dist-lib/F8GraphCanvas-Db7vzDtJ.js +11085 -0
  5. package/dist-lib/abap-Bs8kvjsq.js +1398 -0
  6. package/dist-lib/apex-Dspwrl5m.js +326 -0
  7. package/dist-lib/azcli-k1BiOau1.js +68 -0
  8. package/dist-lib/bat-BIP72KWc.js +100 -0
  9. package/dist-lib/bicep-VhQeYhS3.js +102 -0
  10. package/dist-lib/cameligo-DnuAXtHg.js +174 -0
  11. package/dist-lib/canvas.js +13 -0
  12. package/dist-lib/clojure-BAuDPsal.js +761 -0
  13. package/dist-lib/coffee-BV06qSnj.js +232 -0
  14. package/dist-lib/cpp-Cz8Jeyrf.js +389 -0
  15. package/dist-lib/csharp-F6hhlXFb.js +326 -0
  16. package/dist-lib/csp-KzlEHCyI.js +53 -0
  17. package/dist-lib/css-e4FKntZ3.js +187 -0
  18. package/dist-lib/cssMode-Czf2vRA3.js +1571 -0
  19. package/dist-lib/cypher-CpvDGKRr.js +263 -0
  20. package/dist-lib/dart-DdHeFWR0.js +281 -0
  21. package/dist-lib/dockerfile-aoNXDcio.js +130 -0
  22. package/dist-lib/ecl-C4Q0DYuA.js +456 -0
  23. package/dist-lib/elixir-C9X42b0T.js +569 -0
  24. package/dist-lib/f8-studio.css +1 -0
  25. package/dist-lib/f8-studio.js +16 -0
  26. package/dist-lib/flow9-Bff42pfB.js +142 -0
  27. package/dist-lib/freemarker2-BtInkOsd.js +989 -0
  28. package/dist-lib/fsharp-C6vPAsHG.js +217 -0
  29. package/dist-lib/go-DEr8zx9f.js +218 -0
  30. package/dist-lib/graphql-BiNBBRFh.js +151 -0
  31. package/dist-lib/handlebars-UwZ7mBGA.js +419 -0
  32. package/dist-lib/hcl-2T9lKuFg.js +183 -0
  33. package/dist-lib/html-BXX93YIe.js +308 -0
  34. package/dist-lib/htmlMode-BCqQu1PO.js +1581 -0
  35. package/dist-lib/index-DFm6T7Un.js +132450 -0
  36. package/dist-lib/ini-CZGtssYM.js +71 -0
  37. package/dist-lib/java-B260NeH3.js +232 -0
  38. package/dist-lib/javascript-CK1z7Ynl.js +70 -0
  39. package/dist-lib/jsonMode-C4Q3fVvV.js +1996 -0
  40. package/dist-lib/julia-kuNLM9c5.js +511 -0
  41. package/dist-lib/kotlin-Bz6kAefA.js +253 -0
  42. package/dist-lib/less-AZUtS89I.js +162 -0
  43. package/dist-lib/lexon-BcmgnyRb.js +157 -0
  44. package/dist-lib/liquid-BnCUERBj.js +240 -0
  45. package/dist-lib/lua-Dz1RbATg.js +162 -0
  46. package/dist-lib/m3-CIMooLFn.js +210 -0
  47. package/dist-lib/markdown-C1BsCK9P.js +229 -0
  48. package/dist-lib/mdx-D2enmFMs.js +165 -0
  49. package/dist-lib/mips-BovsnfLQ.js +198 -0
  50. package/dist-lib/msdax-CiRB2ZB-.js +375 -0
  51. package/dist-lib/mysql-BwdpPE19.js +878 -0
  52. package/dist-lib/objective-c-D4nfHfso.js +183 -0
  53. package/dist-lib/pascal--j5-PYtz.js +251 -0
  54. package/dist-lib/pascaligo-C7TcJxNL.js +164 -0
  55. package/dist-lib/perl-BzEWqUb5.js +626 -0
  56. package/dist-lib/pgsql-B_KZ0mGX.js +851 -0
  57. package/dist-lib/php-A19QHzQV.js +500 -0
  58. package/dist-lib/pla-COeKY1hA.js +137 -0
  59. package/dist-lib/postiats-BfMp7zJL.js +907 -0
  60. package/dist-lib/powerquery-B0TS_5Gb.js +890 -0
  61. package/dist-lib/powershell-5jSbKdYB.js +239 -0
  62. package/dist-lib/protobuf-YgnOutn3.js +420 -0
  63. package/dist-lib/pug-DLej6kn5.js +402 -0
  64. package/dist-lib/python-DJvSF53q.js +301 -0
  65. package/dist-lib/qsharp-AhjqtSHB.js +301 -0
  66. package/dist-lib/r-D-F4P80w.js +243 -0
  67. package/dist-lib/razor-RerkagjP.js +550 -0
  68. package/dist-lib/redis-hwwIlMnV.js +302 -0
  69. package/dist-lib/redshift-Bcm_kjEG.js +809 -0
  70. package/dist-lib/restructuredtext-CrdzfPP-.js +174 -0
  71. package/dist-lib/ruby-QC2UNm1s.js +511 -0
  72. package/dist-lib/rust-5aqiQ3L5.js +343 -0
  73. package/dist-lib/sb-B1g1ZfLJ.js +115 -0
  74. package/dist-lib/scala-C2U4R5Gb.js +370 -0
  75. package/dist-lib/scheme-DeFRbslr.js +108 -0
  76. package/dist-lib/scss-RSTCiCmI.js +262 -0
  77. package/dist-lib/shell-BpF-iNu8.js +221 -0
  78. package/dist-lib/solidity-C00r2mbQ.js +1367 -0
  79. package/dist-lib/sophia-DVW5ZKDB.js +199 -0
  80. package/dist-lib/sparql-B0nmpxeX.js +201 -0
  81. package/dist-lib/sql-CJwKPERn.js +853 -0
  82. package/dist-lib/st-DPlKG5DT.js +416 -0
  83. package/dist-lib/swift-YZBAbVHV.js +309 -0
  84. package/dist-lib/systemverilog-CDQSaH63.js +576 -0
  85. package/dist-lib/tcl-Dlu8sp6Q.js +232 -0
  86. package/dist-lib/tsMode-C-6d-f_-.js +886 -0
  87. package/dist-lib/twig-C5TO7-kw.js +392 -0
  88. package/dist-lib/types/api/changefeed.d.ts +113 -0
  89. package/dist-lib/types/api/client.d.ts +81 -0
  90. package/dist-lib/types/api/endpoints.d.ts +197 -0
  91. package/dist-lib/types/api/queries.d.ts +8 -0
  92. package/dist-lib/types/api/types.d.ts +1032 -0
  93. package/dist-lib/types/app/AppShell.d.ts +10 -0
  94. package/dist-lib/types/app/NamespaceScope.d.ts +11 -0
  95. package/dist-lib/types/app/applyStudioConfig.d.ts +18 -0
  96. package/dist-lib/types/app/mount.d.ts +19 -0
  97. package/dist-lib/types/app/nav.d.ts +91 -0
  98. package/dist-lib/types/app/routes.d.ts +9 -0
  99. package/dist-lib/types/app/studioConfig.d.ts +106 -0
  100. package/dist-lib/types/canvas/Canvas2D.d.ts +18 -0
  101. package/dist-lib/types/canvas/Canvas3D.d.ts +14 -0
  102. package/dist-lib/types/canvas/ConnectPanel.d.ts +10 -0
  103. package/dist-lib/types/canvas/FindPanel.d.ts +14 -0
  104. package/dist-lib/types/canvas/GraphCanvas.d.ts +66 -0
  105. package/dist-lib/types/canvas/StylePanel.d.ts +7 -0
  106. package/dist-lib/types/canvas/eclipse.d.ts +136 -0
  107. package/dist-lib/types/canvas/imageAssets.d.ts +3 -0
  108. package/dist-lib/types/canvas/styleConfig.d.ts +48 -0
  109. package/dist-lib/types/canvas/styleEngine.d.ts +125 -0
  110. package/dist-lib/types/canvas/styling.d.ts +15 -0
  111. package/dist-lib/types/components/AdjacencyPanel.d.ts +11 -0
  112. package/dist-lib/types/components/AnalyticsRunner.d.ts +1 -0
  113. package/dist-lib/types/components/ConfigurationPanel.d.ts +1 -0
  114. package/dist-lib/types/components/ConfirmDialog.d.ts +18 -0
  115. package/dist-lib/types/components/DurabilityNotice.d.ts +18 -0
  116. package/dist-lib/types/components/ElementDetail.d.ts +11 -0
  117. package/dist-lib/types/components/ElementTable.d.ts +19 -0
  118. package/dist-lib/types/components/EmbeddingsTab.d.ts +15 -0
  119. package/dist-lib/types/components/ErrorBox.d.ts +8 -0
  120. package/dist-lib/types/components/EventFeedBell.d.ts +16 -0
  121. package/dist-lib/types/components/EventFeedPanel.d.ts +10 -0
  122. package/dist-lib/types/components/Field.d.ts +14 -0
  123. package/dist-lib/types/components/GraphShapePanel.d.ts +1 -0
  124. package/dist-lib/types/components/InspectLink.d.ts +5 -0
  125. package/dist-lib/types/components/ListCapNote.d.ts +10 -0
  126. package/dist-lib/types/components/MutationsPanel.d.ts +1 -0
  127. package/dist-lib/types/components/NamespaceSwitcher.d.ts +22 -0
  128. package/dist-lib/types/components/NamespacesPanel.d.ts +11 -0
  129. package/dist-lib/types/components/NeighborhoodPreview.d.ts +10 -0
  130. package/dist-lib/types/components/PluginsPanel.d.ts +9 -0
  131. package/dist-lib/types/components/PropertiesTab.d.ts +4 -0
  132. package/dist-lib/types/components/PropertyListEditor.d.ts +26 -0
  133. package/dist-lib/types/components/SampleGraphsPanel.d.ts +3 -0
  134. package/dist-lib/types/components/SectionHelp.d.ts +11 -0
  135. package/dist-lib/types/components/SemanticBlockEditor.d.ts +29 -0
  136. package/dist-lib/types/components/SemanticQueryEditor.d.ts +15 -0
  137. package/dist-lib/types/components/SettingRow.d.ts +15 -0
  138. package/dist-lib/types/components/Stat.d.ts +10 -0
  139. package/dist-lib/types/components/StoredQueriesPanel.d.ts +14 -0
  140. package/dist-lib/types/components/StoredQueryControls.d.ts +29 -0
  141. package/dist-lib/types/components/Truncated.d.ts +17 -0
  142. package/dist-lib/types/components/TruncationBadge.d.ts +6 -0
  143. package/dist-lib/types/components/TypedLiteralEditor.d.ts +13 -0
  144. package/dist-lib/types/components/VertexFilterSlot.d.ts +25 -0
  145. package/dist-lib/types/delegate/DelegateEditor.d.ts +10 -0
  146. package/dist-lib/types/delegate/DelegateSlot.d.ts +18 -0
  147. package/dist-lib/types/delegate/editorOptions.d.ts +25 -0
  148. package/dist-lib/types/delegate/kinds.d.ts +19 -0
  149. package/dist-lib/types/delegate/markers.d.ts +21 -0
  150. package/dist-lib/types/delegate/monacoSetup.d.ts +3 -0
  151. package/dist-lib/types/delegate/nl/NlAssistPanel.d.ts +10 -0
  152. package/dist-lib/types/delegate/nl/NlBackendConfig.d.ts +12 -0
  153. package/dist-lib/types/delegate/nl/NlDraftList.d.ts +42 -0
  154. package/dist-lib/types/delegate/nl/config.d.ts +105 -0
  155. package/dist-lib/types/delegate/nl/feedback.d.ts +30 -0
  156. package/dist-lib/types/delegate/nl/format.d.ts +6 -0
  157. package/dist-lib/types/delegate/nl/generate.d.ts +57 -0
  158. package/dist-lib/types/delegate/nl/prompt.d.ts +21 -0
  159. package/dist-lib/types/delegate/nl/useNlRun.d.ts +24 -0
  160. package/dist-lib/types/delegate/providers.d.ts +26 -0
  161. package/dist-lib/types/delegate/snippets.d.ts +25 -0
  162. package/dist-lib/types/embed/F8GraphCanvas.d.ts +37 -0
  163. package/dist-lib/types/embed/canvas.d.ts +23 -0
  164. package/dist-lib/types/embed/index.d.ts +14 -0
  165. package/dist-lib/types/firstrun/FirstRunOverlay.d.ts +10 -0
  166. package/dist-lib/types/firstrun/FirstRunShow.d.ts +22 -0
  167. package/dist-lib/types/firstrun/beats.d.ts +23 -0
  168. package/dist-lib/types/firstrun/firstRunStore.d.ts +38 -0
  169. package/dist-lib/types/firstrun/mockGraph.d.ts +56 -0
  170. package/dist-lib/types/firstrun/useBeatTimeline.d.ts +35 -0
  171. package/dist-lib/types/firstrun/useReducedMotion.d.ts +7 -0
  172. package/dist-lib/types/instances/registry.d.ts +83 -0
  173. package/dist-lib/types/instances/types.d.ts +49 -0
  174. package/dist-lib/types/lib/canvasCap.d.ts +7 -0
  175. package/dist-lib/types/lib/connectPaths.d.ts +55 -0
  176. package/dist-lib/types/lib/embeddingProperties.d.ts +6 -0
  177. package/dist-lib/types/lib/fieldHelp.d.ts +139 -0
  178. package/dist-lib/types/lib/format.d.ts +16 -0
  179. package/dist-lib/types/lib/hydrate.d.ts +37 -0
  180. package/dist-lib/types/lib/indexCapabilities.d.ts +17 -0
  181. package/dist-lib/types/lib/jsonlGraph.d.ts +42 -0
  182. package/dist-lib/types/lib/listCaps.d.ts +48 -0
  183. package/dist-lib/types/lib/literals.d.ts +36 -0
  184. package/dist-lib/types/lib/namespaceName.d.ts +10 -0
  185. package/dist-lib/types/lib/neighborhood.d.ts +37 -0
  186. package/dist-lib/types/lib/patternValidation.d.ts +12 -0
  187. package/dist-lib/types/lib/restartCopy.d.ts +11 -0
  188. package/dist-lib/types/lib/sampleLoader.d.ts +95 -0
  189. package/dist-lib/types/lib/samples.d.ts +87 -0
  190. package/dist-lib/types/lib/sbomGraph.d.ts +58 -0
  191. package/dist-lib/types/lib/sectionHelp.d.ts +39 -0
  192. package/dist-lib/types/lib/semantic.d.ts +95 -0
  193. package/dist-lib/types/lib/storedQueries.d.ts +43 -0
  194. package/dist-lib/types/lib/truncate.d.ts +34 -0
  195. package/dist-lib/types/lib/truncation.d.ts +7 -0
  196. package/dist-lib/types/lib/vector.d.ts +13 -0
  197. package/dist-lib/types/main.d.ts +1 -0
  198. package/dist-lib/types/plugin/PluginEditor.d.ts +20 -0
  199. package/dist-lib/types/plugin/nl/PluginNlAssistPanel.d.ts +13 -0
  200. package/dist-lib/types/plugin/nl/pluginPrompt.d.ts +48 -0
  201. package/dist-lib/types/plugin/scaffolds.d.ts +26 -0
  202. package/dist-lib/types/screens/AnalyticsScreen.d.ts +8 -0
  203. package/dist-lib/types/screens/BenchmarkScreen.d.ts +1 -0
  204. package/dist-lib/types/screens/BrowserScreen.d.ts +6 -0
  205. package/dist-lib/types/screens/CanvasScreen.d.ts +10 -0
  206. package/dist-lib/types/screens/ConnectScreen.d.ts +1 -0
  207. package/dist-lib/types/screens/DashboardScreen.d.ts +13 -0
  208. package/dist-lib/types/screens/IndexesScreen.d.ts +8 -0
  209. package/dist-lib/types/screens/IntegrationsScreen.d.ts +14 -0
  210. package/dist-lib/types/screens/KnowledgeScreen.d.ts +1 -0
  211. package/dist-lib/types/screens/PathScreen.d.ts +9 -0
  212. package/dist-lib/types/screens/PluginsScreen.d.ts +1 -0
  213. package/dist-lib/types/screens/QueryScreen.d.ts +1 -0
  214. package/dist-lib/types/screens/SamplesScreen.d.ts +7 -0
  215. package/dist-lib/types/screens/SaveGamesScreen.d.ts +7 -0
  216. package/dist-lib/types/screens/SubgraphScreen.d.ts +1 -0
  217. package/dist-lib/types/state/eventFeed.d.ts +63 -0
  218. package/dist-lib/types/state/feedFilter.d.ts +42 -0
  219. package/dist-lib/types/state/graphShape.d.ts +37 -0
  220. package/dist-lib/types/state/instanceStore.d.ts +280 -0
  221. package/dist-lib/types/state/integrations.d.ts +25 -0
  222. package/dist-lib/types/state/liveFeed.d.ts +37 -0
  223. package/dist-lib/types/state/scopeKey.d.ts +8 -0
  224. package/dist-lib/types/state/status.d.ts +21 -0
  225. package/dist-lib/typescript-aCo3H3H0.js +343 -0
  226. package/dist-lib/typespec-BsmjDEu7.js +117 -0
  227. package/dist-lib/vb-ChHvIDrk.js +372 -0
  228. package/dist-lib/wgsl-XEp1ju8c.js +439 -0
  229. package/dist-lib/xml-CSt-F-dl.js +95 -0
  230. package/dist-lib/yaml-kSsc3ru_.js +206 -0
  231. package/package.json +98 -0
@@ -0,0 +1,174 @@
1
+ var e = {
2
+ brackets: [
3
+ ["{", "}"],
4
+ ["[", "]"],
5
+ ["(", ")"]
6
+ ],
7
+ autoClosingPairs: [
8
+ { open: "{", close: "}" },
9
+ { open: "[", close: "]" },
10
+ { open: "(", close: ")" },
11
+ { open: "<", close: ">", notIn: ["string"] }
12
+ ],
13
+ surroundingPairs: [
14
+ { open: "(", close: ")" },
15
+ { open: "[", close: "]" },
16
+ { open: "`", close: "`" }
17
+ ],
18
+ folding: {
19
+ markers: {
20
+ start: new RegExp("^\\s*<!--\\s*#?region\\b.*-->"),
21
+ end: new RegExp("^\\s*<!--\\s*#?endregion\\b.*-->")
22
+ }
23
+ }
24
+ }, n = {
25
+ defaultToken: "",
26
+ tokenPostfix: ".rst",
27
+ control: /[\\`*_\[\]{}()#+\-\.!]/,
28
+ escapes: /\\(?:@control)/,
29
+ empty: [
30
+ "area",
31
+ "base",
32
+ "basefont",
33
+ "br",
34
+ "col",
35
+ "frame",
36
+ "hr",
37
+ "img",
38
+ "input",
39
+ "isindex",
40
+ "link",
41
+ "meta",
42
+ "param"
43
+ ],
44
+ alphanumerics: /[A-Za-z0-9]/,
45
+ simpleRefNameWithoutBq: /(?:@alphanumerics[-_+:.]*@alphanumerics)+|(?:@alphanumerics+)/,
46
+ simpleRefName: /(?:`@phrase`|@simpleRefNameWithoutBq)/,
47
+ phrase: /@simpleRefNameWithoutBq(?:\s@simpleRefNameWithoutBq)*/,
48
+ citationName: /[A-Za-z][A-Za-z0-9-_.]*/,
49
+ blockLiteralStart: /(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/,
50
+ precedingChars: /(?:[ -:/'"<([{])/,
51
+ followingChars: /(?:[ -.,:;!?/'")\]}>]|$)/,
52
+ punctuation: /(=|-|~|`|#|"|\^|\+|\*|:|\.|'|_|\+)/,
53
+ tokenizer: {
54
+ root: [
55
+ //sections
56
+ [/^(@punctuation{3,}$){1,1}?/, "keyword"],
57
+ //line-blocks
58
+ //No rules on it
59
+ //bullet-lists
60
+ [/^\s*([\*\-+‣•]|[a-zA-Z0-9]+\.|\([a-zA-Z0-9]+\)|[a-zA-Z0-9]+\))\s/, "keyword"],
61
+ //literal-blocks
62
+ [/([ ]::)\s*$/, "keyword", "@blankLineOfLiteralBlocks"],
63
+ [/(::)\s*$/, "keyword", "@blankLineOfLiteralBlocks"],
64
+ { include: "@tables" },
65
+ { include: "@explicitMarkupBlocks" },
66
+ { include: "@inlineMarkup" }
67
+ ],
68
+ explicitMarkupBlocks: [
69
+ //citations
70
+ { include: "@citations" },
71
+ //footnotes
72
+ { include: "@footnotes" },
73
+ //directives
74
+ [
75
+ /^(\.\.\s)(@simpleRefName)(::\s)(.*)$/,
76
+ [{ token: "", next: "subsequentLines" }, "keyword", "", ""]
77
+ ],
78
+ //hyperlink-targets
79
+ [
80
+ /^(\.\.)(\s+)(_)(@simpleRefName)(:)(\s+)(.*)/,
81
+ [{ token: "", next: "hyperlinks" }, "", "", "string.link", "", "", "string.link"]
82
+ ],
83
+ //anonymous-hyperlinks
84
+ [
85
+ /^((?:(?:\.\.)(?:\s+))?)(__)(:)(\s+)(.*)/,
86
+ [{ token: "", next: "subsequentLines" }, "", "", "", "string.link"]
87
+ ],
88
+ [/^(__\s+)(.+)/, ["", "string.link"]],
89
+ //substitution-definitions
90
+ [
91
+ /^(\.\.)( \|)([^| ]+[^|]*[^| ]*)(\| )(@simpleRefName)(:: .*)/,
92
+ [{ token: "", next: "subsequentLines" }, "", "string.link", "", "keyword", ""],
93
+ "@rawBlocks"
94
+ ],
95
+ [/(\|)([^| ]+[^|]*[^| ]*)(\|_{0,2})/, ["", "string.link", ""]],
96
+ //comments
97
+ [/^(\.\.)([ ].*)$/, [{ token: "", next: "@comments" }, "comment"]]
98
+ ],
99
+ inlineMarkup: [
100
+ { include: "@citationsReference" },
101
+ { include: "@footnotesReference" },
102
+ //hyperlink-references
103
+ [/(@simpleRefName)(_{1,2})/, ["string.link", ""]],
104
+ //embedded-uris-and-aliases
105
+ [/(`)([^<`]+\s+)(<)(.*)(>)(`)(_)/, ["", "string.link", "", "string.link", "", "", ""]],
106
+ //emphasis
107
+ [/\*\*([^\\*]|\*(?!\*))+\*\*/, "strong"],
108
+ [/\*[^*]+\*/, "emphasis"],
109
+ //inline-literals
110
+ [/(``)((?:[^`]|\`(?!`))+)(``)/, ["", "keyword", ""]],
111
+ [/(__\s+)(.+)/, ["", "keyword"]],
112
+ //interpreted-text
113
+ [/(:)((?:@simpleRefNameWithoutBq)?)(:`)([^`]+)(`)/, ["", "keyword", "", "", ""]],
114
+ [/(`)([^`]+)(`:)((?:@simpleRefNameWithoutBq)?)(:)/, ["", "", "", "keyword", ""]],
115
+ [/(`)([^`]+)(`)/, ""],
116
+ //inline-internal-targets
117
+ [/(_`)(@phrase)(`)/, ["", "string.link", ""]]
118
+ ],
119
+ citations: [
120
+ [
121
+ /^(\.\.\s+\[)((?:@citationName))(\]\s+)(.*)/,
122
+ [{ token: "", next: "@subsequentLines" }, "string.link", "", ""]
123
+ ]
124
+ ],
125
+ citationsReference: [[/(\[)(@citationName)(\]_)/, ["", "string.link", ""]]],
126
+ footnotes: [
127
+ [
128
+ /^(\.\.\s+\[)((?:[0-9]+))(\]\s+.*)/,
129
+ [{ token: "", next: "@subsequentLines" }, "string.link", ""]
130
+ ],
131
+ [
132
+ /^(\.\.\s+\[)((?:#@simpleRefName?))(\]\s+)(.*)/,
133
+ [{ token: "", next: "@subsequentLines" }, "string.link", "", ""]
134
+ ],
135
+ [
136
+ /^(\.\.\s+\[)((?:\*))(\]\s+)(.*)/,
137
+ [{ token: "", next: "@subsequentLines" }, "string.link", "", ""]
138
+ ]
139
+ ],
140
+ footnotesReference: [
141
+ [/(\[)([0-9]+)(\])(_)/, ["", "string.link", "", ""]],
142
+ [/(\[)(#@simpleRefName?)(\])(_)/, ["", "string.link", "", ""]],
143
+ [/(\[)(\*)(\])(_)/, ["", "string.link", "", ""]]
144
+ ],
145
+ blankLineOfLiteralBlocks: [
146
+ [/^$/, "", "@subsequentLinesOfLiteralBlocks"],
147
+ [/^.*$/, "", "@pop"]
148
+ ],
149
+ subsequentLinesOfLiteralBlocks: [
150
+ [/(@blockLiteralStart+)(.*)/, ["keyword", ""]],
151
+ [/^(?!blockLiteralStart)/, "", "@popall"]
152
+ ],
153
+ subsequentLines: [
154
+ [/^[\s]+.*/, ""],
155
+ [/^(?!\s)/, "", "@pop"]
156
+ ],
157
+ hyperlinks: [
158
+ [/^[\s]+.*/, "string.link"],
159
+ [/^(?!\s)/, "", "@pop"]
160
+ ],
161
+ comments: [
162
+ [/^[\s]+.*/, "comment"],
163
+ [/^(?!\s)/, "", "@pop"]
164
+ ],
165
+ tables: [
166
+ [/\+-[+-]+/, "keyword"],
167
+ [/\+=[+=]+/, "keyword"]
168
+ ]
169
+ }
170
+ };
171
+ export {
172
+ e as conf,
173
+ n as language
174
+ };
@@ -0,0 +1,511 @@
1
+ var e = {
2
+ comments: {
3
+ lineComment: "#",
4
+ blockComment: ["=begin", "=end"]
5
+ },
6
+ brackets: [
7
+ ["(", ")"],
8
+ ["{", "}"],
9
+ ["[", "]"]
10
+ ],
11
+ autoClosingPairs: [
12
+ { open: "{", close: "}" },
13
+ { open: "[", close: "]" },
14
+ { open: "(", close: ")" },
15
+ { open: '"', close: '"' },
16
+ { open: "'", close: "'" }
17
+ ],
18
+ surroundingPairs: [
19
+ { open: "{", close: "}" },
20
+ { open: "[", close: "]" },
21
+ { open: "(", close: ")" },
22
+ { open: '"', close: '"' },
23
+ { open: "'", close: "'" }
24
+ ],
25
+ indentationRules: {
26
+ increaseIndentPattern: new RegExp(
27
+ `^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|("|'|/).*\\4)*(#.*)?$`
28
+ ),
29
+ decreaseIndentPattern: new RegExp(
30
+ "^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)"
31
+ )
32
+ }
33
+ }, t = {
34
+ tokenPostfix: ".ruby",
35
+ keywords: [
36
+ "__LINE__",
37
+ "__ENCODING__",
38
+ "__FILE__",
39
+ "BEGIN",
40
+ "END",
41
+ "alias",
42
+ "and",
43
+ "begin",
44
+ "break",
45
+ "case",
46
+ "class",
47
+ "def",
48
+ "defined?",
49
+ "do",
50
+ "else",
51
+ "elsif",
52
+ "end",
53
+ "ensure",
54
+ "for",
55
+ "false",
56
+ "if",
57
+ "in",
58
+ "module",
59
+ "next",
60
+ "nil",
61
+ "not",
62
+ "or",
63
+ "redo",
64
+ "rescue",
65
+ "retry",
66
+ "return",
67
+ "self",
68
+ "super",
69
+ "then",
70
+ "true",
71
+ "undef",
72
+ "unless",
73
+ "until",
74
+ "when",
75
+ "while",
76
+ "yield"
77
+ ],
78
+ keywordops: ["::", "..", "...", "?", ":", "=>"],
79
+ builtins: [
80
+ "require",
81
+ "public",
82
+ "private",
83
+ "include",
84
+ "extend",
85
+ "attr_reader",
86
+ "protected",
87
+ "private_class_method",
88
+ "protected_class_method",
89
+ "new"
90
+ ],
91
+ // these are closed by 'end' (if, while and until are handled separately)
92
+ declarations: [
93
+ "module",
94
+ "class",
95
+ "def",
96
+ "case",
97
+ "do",
98
+ "begin",
99
+ "for",
100
+ "if",
101
+ "while",
102
+ "until",
103
+ "unless"
104
+ ],
105
+ linedecls: ["def", "case", "do", "begin", "for", "if", "while", "until", "unless"],
106
+ operators: [
107
+ "^",
108
+ "&",
109
+ "|",
110
+ "<=>",
111
+ "==",
112
+ "===",
113
+ "!~",
114
+ "=~",
115
+ ">",
116
+ ">=",
117
+ "<",
118
+ "<=",
119
+ "<<",
120
+ ">>",
121
+ "+",
122
+ "-",
123
+ "*",
124
+ "/",
125
+ "%",
126
+ "**",
127
+ "~",
128
+ "+@",
129
+ "-@",
130
+ "[]",
131
+ "[]=",
132
+ "`",
133
+ "+=",
134
+ "-=",
135
+ "*=",
136
+ "**=",
137
+ "/=",
138
+ "^=",
139
+ "%=",
140
+ "<<=",
141
+ ">>=",
142
+ "&=",
143
+ "&&=",
144
+ "||=",
145
+ "|="
146
+ ],
147
+ brackets: [
148
+ { open: "(", close: ")", token: "delimiter.parenthesis" },
149
+ { open: "{", close: "}", token: "delimiter.curly" },
150
+ { open: "[", close: "]", token: "delimiter.square" }
151
+ ],
152
+ // we include these common regular expressions
153
+ symbols: /[=><!~?:&|+\-*\/\^%\.]+/,
154
+ // escape sequences
155
+ escape: /(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,
156
+ escapes: /\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,
157
+ decpart: /\d(_?\d)*/,
158
+ decimal: /0|@decpart/,
159
+ delim: /[^a-zA-Z0-9\s\n\r]/,
160
+ heredelim: /(?:\w+|'[^']*'|"[^"]*"|`[^`]*`)/,
161
+ regexpctl: /[(){}\[\]\$\^|\-*+?\.]/,
162
+ regexpesc: /\\(?:[AzZbBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})?/,
163
+ // The main tokenizer for our languages
164
+ tokenizer: {
165
+ // Main entry.
166
+ // root.<decl> where decl is the current opening declaration (like 'class')
167
+ root: [
168
+ // identifiers and keywords
169
+ // most complexity here is due to matching 'end' correctly with declarations.
170
+ // We distinguish a declaration that comes first on a line, versus declarations further on a line (which are most likey modifiers)
171
+ [
172
+ /^(\s*)([a-z_]\w*[!?=]?)/,
173
+ [
174
+ "white",
175
+ {
176
+ cases: {
177
+ "for|until|while": {
178
+ token: "keyword.$2",
179
+ next: "@dodecl.$2"
180
+ },
181
+ "@declarations": {
182
+ token: "keyword.$2",
183
+ next: "@root.$2"
184
+ },
185
+ end: { token: "keyword.$S2", next: "@pop" },
186
+ "@keywords": "keyword",
187
+ "@builtins": "predefined",
188
+ "@default": "identifier"
189
+ }
190
+ }
191
+ ]
192
+ ],
193
+ [
194
+ /[a-z_]\w*[!?=]?/,
195
+ {
196
+ cases: {
197
+ "if|unless|while|until": {
198
+ token: "keyword.$0x",
199
+ next: "@modifier.$0x"
200
+ },
201
+ for: { token: "keyword.$2", next: "@dodecl.$2" },
202
+ "@linedecls": { token: "keyword.$0", next: "@root.$0" },
203
+ end: { token: "keyword.$S2", next: "@pop" },
204
+ "@keywords": "keyword",
205
+ "@builtins": "predefined",
206
+ "@default": "identifier"
207
+ }
208
+ }
209
+ ],
210
+ [/[A-Z][\w]*[!?=]?/, "constructor.identifier"],
211
+ // constant
212
+ [/\$[\w]*/, "global.constant"],
213
+ // global
214
+ [/@[\w]*/, "namespace.instance.identifier"],
215
+ // instance
216
+ [/@@@[\w]*/, "namespace.class.identifier"],
217
+ // class
218
+ // here document
219
+ [/<<[-~](@heredelim).*/, { token: "string.heredoc.delimiter", next: "@heredoc.$1" }],
220
+ [/[ \t\r\n]+<<(@heredelim).*/, { token: "string.heredoc.delimiter", next: "@heredoc.$1" }],
221
+ [/^<<(@heredelim).*/, { token: "string.heredoc.delimiter", next: "@heredoc.$1" }],
222
+ // whitespace
223
+ { include: "@whitespace" },
224
+ // strings
225
+ [/"/, { token: "string.d.delim", next: '@dstring.d."' }],
226
+ [/'/, { token: "string.sq.delim", next: "@sstring.sq" }],
227
+ // % literals. For efficiency, rematch in the 'pstring' state
228
+ [/%([rsqxwW]|Q?)/, { token: "@rematch", next: "pstring" }],
229
+ // commands and symbols
230
+ [/`/, { token: "string.x.delim", next: "@dstring.x.`" }],
231
+ [/:(\w|[$@])\w*[!?=]?/, "string.s"],
232
+ [/:"/, { token: "string.s.delim", next: '@dstring.s."' }],
233
+ [/:'/, { token: "string.s.delim", next: "@sstring.s" }],
234
+ // regular expressions. Lookahead for a (not escaped) closing forwardslash on the same line
235
+ [/\/(?=(\\\/|[^\/\n])+\/)/, { token: "regexp.delim", next: "@regexp" }],
236
+ // delimiters and operators
237
+ [/[{}()\[\]]/, "@brackets"],
238
+ [
239
+ /@symbols/,
240
+ {
241
+ cases: {
242
+ "@keywordops": "keyword",
243
+ "@operators": "operator",
244
+ "@default": ""
245
+ }
246
+ }
247
+ ],
248
+ [/[;,]/, "delimiter"],
249
+ // numbers
250
+ [/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/, "number.hex"],
251
+ [/0[_oO][0-7](_?[0-7])*/, "number.octal"],
252
+ [/0[bB][01](_?[01])*/, "number.binary"],
253
+ [/0[dD]@decpart/, "number"],
254
+ [
255
+ /@decimal((\.@decpart)?([eE][\-+]?@decpart)?)/,
256
+ {
257
+ cases: {
258
+ $1: "number.float",
259
+ "@default": "number"
260
+ }
261
+ }
262
+ ]
263
+ ],
264
+ // used to not treat a 'do' as a block opener if it occurs on the same
265
+ // line as a 'do' statement: 'while|until|for'
266
+ // dodecl.<decl> where decl is the declarations started, like 'while'
267
+ dodecl: [
268
+ [/^/, { token: "", switchTo: "@root.$S2" }],
269
+ // get out of do-skipping mode on a new line
270
+ [
271
+ /[a-z_]\w*[!?=]?/,
272
+ {
273
+ cases: {
274
+ end: { token: "keyword.$S2", next: "@pop" },
275
+ // end on same line
276
+ do: { token: "keyword", switchTo: "@root.$S2" },
277
+ // do on same line: not an open bracket here
278
+ "@linedecls": {
279
+ token: "@rematch",
280
+ switchTo: "@root.$S2"
281
+ },
282
+ // other declaration on same line: rematch
283
+ "@keywords": "keyword",
284
+ "@builtins": "predefined",
285
+ "@default": "identifier"
286
+ }
287
+ }
288
+ ],
289
+ { include: "@root" }
290
+ ],
291
+ // used to prevent potential modifiers ('if|until|while|unless') to match
292
+ // with 'end' keywords.
293
+ // modifier.<decl>x where decl is the declaration starter, like 'if'
294
+ modifier: [
295
+ [/^/, "", "@pop"],
296
+ // it was a modifier: get out of modifier mode on a new line
297
+ [
298
+ /[a-z_]\w*[!?=]?/,
299
+ {
300
+ cases: {
301
+ end: { token: "keyword.$S2", next: "@pop" },
302
+ // end on same line
303
+ "then|else|elsif|do": {
304
+ token: "keyword",
305
+ switchTo: "@root.$S2"
306
+ },
307
+ // real declaration and not a modifier
308
+ "@linedecls": {
309
+ token: "@rematch",
310
+ switchTo: "@root.$S2"
311
+ },
312
+ // other declaration => not a modifier
313
+ "@keywords": "keyword",
314
+ "@builtins": "predefined",
315
+ "@default": "identifier"
316
+ }
317
+ }
318
+ ],
319
+ { include: "@root" }
320
+ ],
321
+ // single quote strings (also used for symbols)
322
+ // sstring.<kind> where kind is 'sq' (single quote) or 's' (symbol)
323
+ sstring: [
324
+ [/[^\\']+/, "string.$S2"],
325
+ [/\\\\|\\'|\\$/, "string.$S2.escape"],
326
+ [/\\./, "string.$S2.invalid"],
327
+ [/'/, { token: "string.$S2.delim", next: "@pop" }]
328
+ ],
329
+ // double quoted "string".
330
+ // dstring.<kind>.<delim> where kind is 'd' (double quoted), 'x' (command), or 's' (symbol)
331
+ // and delim is the ending delimiter (" or `)
332
+ dstring: [
333
+ [/[^\\`"#]+/, "string.$S2"],
334
+ [/#/, "string.$S2.escape", "@interpolated"],
335
+ [/\\$/, "string.$S2.escape"],
336
+ [/@escapes/, "string.$S2.escape"],
337
+ [/\\./, "string.$S2.escape.invalid"],
338
+ [
339
+ /[`"]/,
340
+ {
341
+ cases: {
342
+ "$#==$S3": { token: "string.$S2.delim", next: "@pop" },
343
+ "@default": "string.$S2"
344
+ }
345
+ }
346
+ ]
347
+ ],
348
+ // literal documents
349
+ // heredoc.<close> where close is the closing delimiter
350
+ heredoc: [
351
+ [
352
+ /^(\s*)(@heredelim)$/,
353
+ {
354
+ cases: {
355
+ "$2==$S2": ["string.heredoc", { token: "string.heredoc.delimiter", next: "@pop" }],
356
+ "@default": ["string.heredoc", "string.heredoc"]
357
+ }
358
+ }
359
+ ],
360
+ [/.*/, "string.heredoc"]
361
+ ],
362
+ // interpolated sequence
363
+ interpolated: [
364
+ [/\$\w*/, "global.constant", "@pop"],
365
+ [/@\w*/, "namespace.class.identifier", "@pop"],
366
+ [/@@@\w*/, "namespace.instance.identifier", "@pop"],
367
+ [
368
+ /[{]/,
369
+ {
370
+ token: "string.escape.curly",
371
+ switchTo: "@interpolated_compound"
372
+ }
373
+ ],
374
+ ["", "", "@pop"]
375
+ // just a # is interpreted as a #
376
+ ],
377
+ // any code
378
+ interpolated_compound: [
379
+ [/[}]/, { token: "string.escape.curly", next: "@pop" }],
380
+ { include: "@root" }
381
+ ],
382
+ // %r quoted regexp
383
+ // pregexp.<open>.<close> where open/close are the open/close delimiter
384
+ pregexp: [
385
+ { include: "@whitespace" },
386
+ // turns out that you can quote using regex control characters, aargh!
387
+ // for example; %r|kgjgaj| is ok (even though | is used for alternation)
388
+ // so, we need to match those first
389
+ [
390
+ /[^\(\{\[\\]/,
391
+ {
392
+ cases: {
393
+ "$#==$S3": { token: "regexp.delim", next: "@pop" },
394
+ "$#==$S2": { token: "regexp.delim", next: "@push" },
395
+ // nested delimiters are allowed..
396
+ "~[)}\\]]": "@brackets.regexp.escape.control",
397
+ "~@regexpctl": "regexp.escape.control",
398
+ "@default": "regexp"
399
+ }
400
+ }
401
+ ],
402
+ { include: "@regexcontrol" }
403
+ ],
404
+ // We match regular expression quite precisely
405
+ regexp: [
406
+ { include: "@regexcontrol" },
407
+ [/[^\\\/]/, "regexp"],
408
+ ["/[ixmp]*", { token: "regexp.delim" }, "@pop"]
409
+ ],
410
+ regexcontrol: [
411
+ [
412
+ /(\{)(\d+(?:,\d*)?)(\})/,
413
+ [
414
+ "@brackets.regexp.escape.control",
415
+ "regexp.escape.control",
416
+ "@brackets.regexp.escape.control"
417
+ ]
418
+ ],
419
+ [
420
+ /(\[)(\^?)/,
421
+ ["@brackets.regexp.escape.control", { token: "regexp.escape.control", next: "@regexrange" }]
422
+ ],
423
+ [/(\()(\?[:=!])/, ["@brackets.regexp.escape.control", "regexp.escape.control"]],
424
+ [/\(\?#/, { token: "regexp.escape.control", next: "@regexpcomment" }],
425
+ [/[()]/, "@brackets.regexp.escape.control"],
426
+ [/@regexpctl/, "regexp.escape.control"],
427
+ [/\\$/, "regexp.escape"],
428
+ [/@regexpesc/, "regexp.escape"],
429
+ [/\\\./, "regexp.invalid"],
430
+ [/#/, "regexp.escape", "@interpolated"]
431
+ ],
432
+ regexrange: [
433
+ [/-/, "regexp.escape.control"],
434
+ [/\^/, "regexp.invalid"],
435
+ [/\\$/, "regexp.escape"],
436
+ [/@regexpesc/, "regexp.escape"],
437
+ [/[^\]]/, "regexp"],
438
+ [/\]/, "@brackets.regexp.escape.control", "@pop"]
439
+ ],
440
+ regexpcomment: [
441
+ [/[^)]+/, "comment"],
442
+ [/\)/, { token: "regexp.escape.control", next: "@pop" }]
443
+ ],
444
+ // % quoted strings
445
+ // A bit repetitive since we need to often special case the kind of ending delimiter
446
+ pstring: [
447
+ [/%([qws])\(/, { token: "string.$1.delim", switchTo: "@qstring.$1.(.)" }],
448
+ [/%([qws])\[/, { token: "string.$1.delim", switchTo: "@qstring.$1.[.]" }],
449
+ [/%([qws])\{/, { token: "string.$1.delim", switchTo: "@qstring.$1.{.}" }],
450
+ [/%([qws])</, { token: "string.$1.delim", switchTo: "@qstring.$1.<.>" }],
451
+ [/%([qws])(@delim)/, { token: "string.$1.delim", switchTo: "@qstring.$1.$2.$2" }],
452
+ [/%r\(/, { token: "regexp.delim", switchTo: "@pregexp.(.)" }],
453
+ [/%r\[/, { token: "regexp.delim", switchTo: "@pregexp.[.]" }],
454
+ [/%r\{/, { token: "regexp.delim", switchTo: "@pregexp.{.}" }],
455
+ [/%r</, { token: "regexp.delim", switchTo: "@pregexp.<.>" }],
456
+ [/%r(@delim)/, { token: "regexp.delim", switchTo: "@pregexp.$1.$1" }],
457
+ [/%(x|W|Q?)\(/, { token: "string.$1.delim", switchTo: "@qqstring.$1.(.)" }],
458
+ [/%(x|W|Q?)\[/, { token: "string.$1.delim", switchTo: "@qqstring.$1.[.]" }],
459
+ [/%(x|W|Q?)\{/, { token: "string.$1.delim", switchTo: "@qqstring.$1.{.}" }],
460
+ [/%(x|W|Q?)</, { token: "string.$1.delim", switchTo: "@qqstring.$1.<.>" }],
461
+ [/%(x|W|Q?)(@delim)/, { token: "string.$1.delim", switchTo: "@qqstring.$1.$2.$2" }],
462
+ [/%([rqwsxW]|Q?)./, { token: "invalid", next: "@pop" }],
463
+ // recover
464
+ [/./, { token: "invalid", next: "@pop" }]
465
+ // recover
466
+ ],
467
+ // non-expanded quoted string.
468
+ // qstring.<kind>.<open>.<close>
469
+ // kind = q|w|s (single quote, array, symbol)
470
+ // open = open delimiter
471
+ // close = close delimiter
472
+ qstring: [
473
+ [/\\$/, "string.$S2.escape"],
474
+ [/\\./, "string.$S2.escape"],
475
+ [
476
+ /./,
477
+ {
478
+ cases: {
479
+ "$#==$S4": { token: "string.$S2.delim", next: "@pop" },
480
+ "$#==$S3": { token: "string.$S2.delim", next: "@push" },
481
+ // nested delimiters are allowed..
482
+ "@default": "string.$S2"
483
+ }
484
+ }
485
+ ]
486
+ ],
487
+ // expanded quoted string.
488
+ // qqstring.<kind>.<open>.<close>
489
+ // kind = Q|W|x (double quote, array, command)
490
+ // open = open delimiter
491
+ // close = close delimiter
492
+ qqstring: [[/#/, "string.$S2.escape", "@interpolated"], { include: "@qstring" }],
493
+ // whitespace & comments
494
+ whitespace: [
495
+ [/[ \t\r\n]+/, ""],
496
+ [/^\s*=begin\b/, "comment", "@comment"],
497
+ [/#.*$/, "comment"]
498
+ ],
499
+ comment: [
500
+ [/[^=]+/, "comment"],
501
+ [/^\s*=begin\b/, "comment.invalid"],
502
+ // nested comment
503
+ [/^\s*=end\b.*/, "comment", "@pop"],
504
+ [/[=]/, "comment"]
505
+ ]
506
+ }
507
+ };
508
+ export {
509
+ e as conf,
510
+ t as language
511
+ };