liquid-3VSXOWUJ.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. import {
  2. editor_api_exports
  3. } from "./chunk-5Q5BEFT4.js";
  4. import "./chunk-FBUDSZGC.js";
  5. import "./chunk-2LSFTFF7.js";
  6. // node_modules/.pnpm/monaco-editor@0.38.0/node_modules/monaco-editor/esm/vs/basic-languages/liquid/liquid.js
  7. var __defProp = Object.defineProperty;
  8. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  9. var __getOwnPropNames = Object.getOwnPropertyNames;
  10. var __hasOwnProp = Object.prototype.hasOwnProperty;
  11. var __copyProps = (to, from, except, desc) => {
  12. if (from && typeof from === "object" || typeof from === "function") {
  13. for (let key of __getOwnPropNames(from))
  14. if (!__hasOwnProp.call(to, key) && key !== except)
  15. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  16. }
  17. return to;
  18. };
  19. var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
  20. var monaco_editor_core_exports = {};
  21. __reExport(monaco_editor_core_exports, editor_api_exports);
  22. var EMPTY_ELEMENTS = [
  23. "area",
  24. "base",
  25. "br",
  26. "col",
  27. "embed",
  28. "hr",
  29. "img",
  30. "input",
  31. "keygen",
  32. "link",
  33. "menuitem",
  34. "meta",
  35. "param",
  36. "source",
  37. "track",
  38. "wbr"
  39. ];
  40. var conf = {
  41. wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,
  42. brackets: [
  43. ["<!--", "-->"],
  44. ["<", ">"],
  45. ["{{", "}}"],
  46. ["{%", "%}"],
  47. ["{", "}"],
  48. ["(", ")"]
  49. ],
  50. autoClosingPairs: [
  51. { open: "{", close: "}" },
  52. { open: "%", close: "%" },
  53. { open: "[", close: "]" },
  54. { open: "(", close: ")" },
  55. { open: '"', close: '"' },
  56. { open: "'", close: "'" }
  57. ],
  58. surroundingPairs: [
  59. { open: "<", close: ">" },
  60. { open: '"', close: '"' },
  61. { open: "'", close: "'" }
  62. ],
  63. onEnterRules: [
  64. {
  65. beforeText: new RegExp(`<(?!(?:${EMPTY_ELEMENTS.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`, "i"),
  66. afterText: /^<\/(\w[\w\d]*)\s*>$/i,
  67. action: {
  68. indentAction: monaco_editor_core_exports.languages.IndentAction.IndentOutdent
  69. }
  70. },
  71. {
  72. beforeText: new RegExp(`<(?!(?:${EMPTY_ELEMENTS.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`, "i"),
  73. action: { indentAction: monaco_editor_core_exports.languages.IndentAction.Indent }
  74. }
  75. ]
  76. };
  77. var language = {
  78. defaultToken: "",
  79. tokenPostfix: "",
  80. builtinTags: [
  81. "if",
  82. "else",
  83. "elseif",
  84. "endif",
  85. "render",
  86. "assign",
  87. "capture",
  88. "endcapture",
  89. "case",
  90. "endcase",
  91. "comment",
  92. "endcomment",
  93. "cycle",
  94. "decrement",
  95. "for",
  96. "endfor",
  97. "include",
  98. "increment",
  99. "layout",
  100. "raw",
  101. "endraw",
  102. "render",
  103. "tablerow",
  104. "endtablerow",
  105. "unless",
  106. "endunless"
  107. ],
  108. builtinFilters: [
  109. "abs",
  110. "append",
  111. "at_least",
  112. "at_most",
  113. "capitalize",
  114. "ceil",
  115. "compact",
  116. "date",
  117. "default",
  118. "divided_by",
  119. "downcase",
  120. "escape",
  121. "escape_once",
  122. "first",
  123. "floor",
  124. "join",
  125. "json",
  126. "last",
  127. "lstrip",
  128. "map",
  129. "minus",
  130. "modulo",
  131. "newline_to_br",
  132. "plus",
  133. "prepend",
  134. "remove",
  135. "remove_first",
  136. "replace",
  137. "replace_first",
  138. "reverse",
  139. "round",
  140. "rstrip",
  141. "size",
  142. "slice",
  143. "sort",
  144. "sort_natural",
  145. "split",
  146. "strip",
  147. "strip_html",
  148. "strip_newlines",
  149. "times",
  150. "truncate",
  151. "truncatewords",
  152. "uniq",
  153. "upcase",
  154. "url_decode",
  155. "url_encode",
  156. "where"
  157. ],
  158. constants: ["true", "false"],
  159. operators: ["==", "!=", ">", "<", ">=", "<="],
  160. symbol: /[=><!]+/,
  161. identifier: /[a-zA-Z_][\w]*/,
  162. tokenizer: {
  163. root: [
  164. [/\{\%\s*comment\s*\%\}/, "comment.start.liquid", "@comment"],
  165. [/\{\{/, { token: "@rematch", switchTo: "@liquidState.root" }],
  166. [/\{\%/, { token: "@rematch", switchTo: "@liquidState.root" }],
  167. [/(<)([\w\-]+)(\/>)/, ["delimiter.html", "tag.html", "delimiter.html"]],
  168. [/(<)([:\w]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
  169. [/(<\/)([\w\-]+)/, ["delimiter.html", { token: "tag.html", next: "@otherTag" }]],
  170. [/</, "delimiter.html"],
  171. [/\{/, "delimiter.html"],
  172. [/[^<{]+/]
  173. ],
  174. comment: [
  175. [/\{\%\s*endcomment\s*\%\}/, "comment.end.liquid", "@pop"],
  176. [/./, "comment.content.liquid"]
  177. ],
  178. otherTag: [
  179. [
  180. /\{\{/,
  181. {
  182. token: "@rematch",
  183. switchTo: "@liquidState.otherTag"
  184. }
  185. ],
  186. [
  187. /\{\%/,
  188. {
  189. token: "@rematch",
  190. switchTo: "@liquidState.otherTag"
  191. }
  192. ],
  193. [/\/?>/, "delimiter.html", "@pop"],
  194. [/"([^"]*)"/, "attribute.value"],
  195. [/'([^']*)'/, "attribute.value"],
  196. [/[\w\-]+/, "attribute.name"],
  197. [/=/, "delimiter"],
  198. [/[ \t\r\n]+/]
  199. ],
  200. liquidState: [
  201. [/\{\{/, "delimiter.output.liquid"],
  202. [/\}\}/, { token: "delimiter.output.liquid", switchTo: "@$S2.$S3" }],
  203. [/\{\%/, "delimiter.tag.liquid"],
  204. [/raw\s*\%\}/, "delimiter.tag.liquid", "@liquidRaw"],
  205. [/\%\}/, { token: "delimiter.tag.liquid", switchTo: "@$S2.$S3" }],
  206. { include: "liquidRoot" }
  207. ],
  208. liquidRaw: [
  209. [/^(?!\{\%\s*endraw\s*\%\}).+/],
  210. [/\{\%/, "delimiter.tag.liquid"],
  211. [/@identifier/],
  212. [/\%\}/, { token: "delimiter.tag.liquid", next: "@root" }]
  213. ],
  214. liquidRoot: [
  215. [/\d+(\.\d+)?/, "number.liquid"],
  216. [/"[^"]*"/, "string.liquid"],
  217. [/'[^']*'/, "string.liquid"],
  218. [/\s+/],
  219. [
  220. /@symbol/,
  221. {
  222. cases: {
  223. "@operators": "operator.liquid",
  224. "@default": ""
  225. }
  226. }
  227. ],
  228. [/\./],
  229. [
  230. /@identifier/,
  231. {
  232. cases: {
  233. "@constants": "keyword.liquid",
  234. "@builtinFilters": "predefined.liquid",
  235. "@builtinTags": "predefined.liquid",
  236. "@default": "variable.liquid"
  237. }
  238. }
  239. ],
  240. [/[^}|%]/, "variable.liquid"]
  241. ]
  242. }
  243. };
  244. export {
  245. conf,
  246. language
  247. };
  248. /*! Bundled license information:
  249. monaco-editor/esm/vs/basic-languages/liquid/liquid.js:
  250. (*!-----------------------------------------------------------------------------
  251. * Copyright (c) Microsoft Corporation. All rights reserved.
  252. * Version: 0.38.0(0e330ae453813de4e6cf272460fb79c7117073d0)
  253. * Released under the MIT license
  254. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  255. *-----------------------------------------------------------------------------*)
  256. */
  257. //# sourceMappingURL=liquid-3VSXOWUJ.js.map