@nuraly/runtime 0.1.7 → 0.1.9

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 (349) hide show
  1. package/README.md +83 -765
  2. package/components/ui/components/Event/EventValue/EventValue.ts +13 -8
  3. package/components/ui/components/ToastContainer/ToastContainer.ts +1 -1
  4. package/components/ui/components/advanced/AIChat/AIChat.ts +1 -2
  5. package/components/ui/components/advanced/Collapse/Collapse.ts +5 -2
  6. package/components/ui/components/advanced/Collections/Collections.ts +2 -2
  7. package/components/ui/components/advanced/MicroApp/MicroApp.ts +3 -11
  8. package/components/ui/components/advanced/RefComponent/RefComponent.ts +2 -2
  9. package/components/ui/components/advanced/RichText/RichText.ts +5 -4
  10. package/components/ui/components/advanced/RichText/RichTextEditor.ts +0 -167
  11. package/components/ui/components/base/BaseElement/base-change-detection.ts +1 -5
  12. package/components/ui/components/base/BaseElement.ts +229 -610
  13. package/components/ui/components/base/FormRegisterable.ts +83 -0
  14. package/components/ui/components/base/controllers/DragDropController.ts +175 -0
  15. package/components/ui/components/base/controllers/ErrorController.ts +180 -0
  16. package/components/ui/components/base/controllers/EventController.ts +112 -0
  17. package/components/ui/components/base/controllers/InputHandlerController.ts +298 -0
  18. package/components/ui/components/base/controllers/SelectionController.ts +323 -0
  19. package/components/ui/components/base/controllers/StyleHandlerController.ts +286 -0
  20. package/components/ui/components/base/controllers/index.ts +11 -0
  21. package/components/ui/components/base/mixins/EditorModeMixin.ts +185 -0
  22. package/components/ui/components/base/mixins/index.ts +6 -0
  23. package/components/ui/components/base/types/base-element.types.ts +138 -0
  24. package/components/ui/components/base/types/index.ts +21 -0
  25. package/components/ui/components/base/utils/event-debouncer.ts +209 -0
  26. package/components/ui/components/base/utils/index.ts +11 -0
  27. package/components/ui/components/base/utils/style-cache.ts +94 -0
  28. package/components/ui/components/display/BoxModel/BoxModel.ts +177 -116
  29. package/components/ui/components/display/Code/Code.ts +40 -26
  30. package/components/ui/components/display/Divider/Divider.ts +2 -2
  31. package/components/ui/components/display/Icon/Icon.ts +2 -3
  32. package/components/ui/components/display/Image/Image.ts +72 -46
  33. package/components/ui/components/display/Tag/Tag.ts +2 -3
  34. package/components/ui/components/display/Video/Video.ts +91 -31
  35. package/components/ui/components/inputs/Button/Button.ts +2 -2
  36. package/components/ui/components/inputs/Checkbox/Checkbox.ts +14 -40
  37. package/components/ui/components/inputs/ColorPicker/colorpicker.ts +9 -4
  38. package/components/ui/components/inputs/DatePicker/DatePicker.ts +47 -25
  39. package/components/ui/components/inputs/Dropdown/Dropdown.ts +2 -2
  40. package/components/ui/components/inputs/Form/Form.style.ts +26 -0
  41. package/components/ui/components/inputs/Form/Form.ts +360 -0
  42. package/components/ui/components/inputs/IconPicker/IconPicker.ts +22 -18
  43. package/components/ui/components/inputs/InsertDropdown/InsertDropdown.ts +0 -20
  44. package/components/ui/components/inputs/NumberInput/NumberInput.ts +0 -4
  45. package/components/ui/components/inputs/RadioButton/Radio-button.ts +17 -13
  46. package/components/ui/components/inputs/Select/Select.ts +44 -24
  47. package/components/ui/components/inputs/TextInput/TextInput.ts +15 -9
  48. package/components/ui/components/inputs/Textarea/Textarea.ts +30 -30
  49. package/components/ui/components/inputs/UsersDropdown/UsersDropdown.ts +1 -1
  50. package/components/ui/components/layout/Card/Card.ts +112 -10
  51. package/components/ui/components/layout/Containers/Container.style.ts +18 -0
  52. package/components/ui/components/layout/Containers/Container.ts +11 -5
  53. package/components/ui/components/layout/Grid/Col.style.ts +27 -0
  54. package/components/ui/components/layout/Grid/Col.ts +213 -0
  55. package/components/ui/components/layout/Grid/Row.style.ts +73 -0
  56. package/components/ui/components/layout/Grid/Row.ts +170 -0
  57. package/components/ui/components/layout/Grid/index.ts +7 -0
  58. package/components/ui/components/layout/Panel/Panel.ts +2 -2
  59. package/components/ui/components/layout/Tabs/Tabs.ts +0 -1
  60. package/components/ui/components/navigation/EmbedURL/EmbedURL.ts +62 -26
  61. package/components/ui/components/navigation/Link/Link.ts +27 -16
  62. package/components/ui/components/navigation/Menu/Menu.ts +26 -48
  63. package/components/ui/components/runtime/MicroApp/MicroApp.ts +7 -147
  64. package/components/ui/components/runtime/MicroApp/MicroAppDataLoader.ts +6 -2
  65. package/components/ui/components/studio/FunctionsPanel/FunctionsPanel.ts +484 -0
  66. package/components/ui/components/studio/FunctionsPanel/index.ts +1 -0
  67. package/components/ui/components/utility/AccessRoles/AccessRoles.style.ts +242 -0
  68. package/components/ui/components/utility/AccessRoles/AccessRoles.ts +476 -0
  69. package/components/ui/components/utility/Border/Border.ts +0 -14
  70. package/components/ui/components/utility/BorderManager/BorderManager.style.ts +237 -0
  71. package/components/ui/components/utility/BorderManager/BorderManager.ts +503 -0
  72. package/components/ui/components/utility/BoxShadow/BoxShadow.ts +0 -16
  73. package/components/ui/components/utility/Document/Document.ts +54 -25
  74. package/components/ui/components/utility/Export-Import/Export-Import.ts +8 -7
  75. package/components/ui/components/utility/Handlers/Handlers.ts +14 -17
  76. package/components/ui/components/utility/ValidationRules/ValidationRules.ts +440 -0
  77. package/components/ui/components/wrappers/GenerikWrapper/DragWrapper/DragWrapper.ts +1 -0
  78. package/components/ui/components/wrappers/GenerikWrapper/GenerikWrapper.ts +1 -24
  79. package/components/ui/nuraly-ui/src/components/badge/badge.style.ts +4 -3
  80. package/components/ui/nuraly-ui/src/components/datepicker/datepicker.component.ts +2 -0
  81. package/components/ui/nuraly-ui/src/components/radio-group/radio-group.component.ts +12 -6
  82. package/components/ui/nuraly-ui/src/components/radio-group/radio-group.style.ts +23 -0
  83. package/dist/{index-B4yIOSMd.js → BaseElement-BNBn_IJk.js} +2920 -267
  84. package/dist/{CodeEditor-YsOapSut.js → CodeEditor-B1gNuvPb.js} +84127 -76319
  85. package/dist/{CodeEditor-BiNku87K.js → CodeEditor-Cpph-xRc.js} +7 -7
  86. package/dist/{abap-B2diVmjb.js → abap-D0Neqhq6.js} +91 -1
  87. package/dist/{apex-3NuJ-nsI.js → apex-B5LhxkeG.js} +18 -1
  88. package/dist/assets/editor.worker-DcwbJ0PV.js +12 -0
  89. package/dist/assets/html.worker-BTMxskjR.js +461 -0
  90. package/dist/assets/json.worker-D3vTGdf_.js +49 -0
  91. package/dist/assets/ts.worker-BsM1BXac.js +51334 -0
  92. package/dist/{azcli-XGXuUsMB.js → azcli-BrBH0QTU.js} +1 -1
  93. package/dist/{bat-B8Vhm634.js → bat-BfzAov64.js} +12 -1
  94. package/dist/{bicep-Cc8X5S_k.js → bicep-C3bCSWel.js} +1 -1
  95. package/dist/{cameligo-Bo3wBh9T.js → cameligo-sFL5plcd.js} +13 -1
  96. package/dist/{clojure-CPoQlpIK.js → clojure-CfeExRz0.js} +14 -1
  97. package/dist/{coffee-BxvTGz39.js → coffee-Xws5K0WL.js} +11 -1
  98. package/dist/{cpp-5RpEV7vC.js → cpp-CqOUEpxN.js} +28 -23
  99. package/dist/{csharp-slXXP3fo.js → csharp-DVLiBOZb.js} +13 -1
  100. package/dist/{csp-B98p6-gH.js → csp-DVFp9bw5.js} +3 -1
  101. package/dist/{css-BDsDSAin.js → css-DwARn2R6.js} +8 -1
  102. package/dist/cssMode-D82-gS78.js +1577 -0
  103. package/dist/{cypher-Dc4IMouD.js → cypher-uY0Mffat.js} +8 -1
  104. package/dist/{dart-LhvE3yD2.js → dart-D27H-mX_.js} +18 -1
  105. package/dist/{dockerfile-CwzplJeZ.js → dockerfile-CmV85WZK.js} +5 -1
  106. package/dist/{ecl-DxW3FiJi.js → ecl--fKn7yzB.js} +9 -1
  107. package/dist/{elixir-BI40g7TU.js → elixir-DUhH17ON.js} +87 -1
  108. package/dist/{flow9-tR2v0bGz.js → flow9-B3Dx2LLe.js} +8 -1
  109. package/dist/{freemarker2-Bfqhwyij.js → freemarker2-CYRLpyjt.js} +359 -7
  110. package/dist/{fsharp-BLAma0OT.js → fsharp-SyqBfUAR.js} +14 -1
  111. package/dist/{go-nYcD3y4Z.js → go-BbMR2tdT.js} +17 -1
  112. package/dist/{graphql-Dp1cHWmP.js → graphql-DDJE6tIl.js} +17 -1
  113. package/dist/{handlebars-DCgKNBmn.js → handlebars-R8Efxi60.js} +38 -4
  114. package/dist/{hcl-6NT8Kbna.js → hcl-YBvpaUqf.js} +13 -1
  115. package/dist/{html-C6wR7sMB.js → html-czhjovcp.js} +37 -4
  116. package/dist/htmlMode-DpyKDYYs.js +1587 -0
  117. package/dist/{ini-BZCOLrEc.js → ini-Ct73dBtM.js} +10 -1
  118. package/dist/{java-DAMcfJbX.js → java-C_jlkwoG.js} +18 -1
  119. package/dist/{javascript-D1L5MTmg.js → javascript-DwqkMEdb.js} +3 -2
  120. package/dist/jsonMode-Cmxxe0W9.js +2002 -0
  121. package/dist/{julia-CQ46G71H.js → julia-D8WE5U1e.js} +22 -1
  122. package/dist/{kotlin-CEjVo_6E.js → kotlin-Zy9aq5yB.js} +15 -1
  123. package/dist/{less-DreV99nP.js → less-sZ0iHtE8.js} +1 -1
  124. package/dist/{lexon-DBVJhqLb.js → lexon-CsdNL29A.js} +13 -1
  125. package/dist/{liquid-D_pDYIs1.js → liquid-2spuEcBh.js} +12 -4
  126. package/dist/{lua-Dcc_j6L-.js → lua-C2YJo0zw.js} +12 -1
  127. package/dist/{m3-B9SlZL4n.js → m3-CPLP40SG.js} +7 -1
  128. package/dist/{markdown-CuGw9_MP.js → markdown-B1mf5e0R.js} +34 -1
  129. package/dist/{mdx-CKsJ3cF4.js → mdx-BjBXyEeR.js} +2 -2
  130. package/dist/{micro-app-entry-xdTX5-ut.js → micro-app-entry-DYAnCRDo.js} +8132 -9649
  131. package/dist/micro-app.bundle.js +3 -3
  132. package/dist/micro-app.js +3565 -6710
  133. package/dist/{mips-BUWqP-OH.js → mips-DA33BZX1.js} +11 -1
  134. package/dist/{msdax-DtkouYCg.js → msdax-CCYFIQsP.js} +5 -1
  135. package/dist/{mysql-IkAsWSmF.js → mysql-hjmIjL-D.js} +11 -3
  136. package/dist/{objective-c-B2-ronfg.js → objective-c-RRCpEmqC.js} +2 -1
  137. package/dist/{pascal-Bsnz2eJA.js → pascal-CeV8XfxB.js} +13 -1
  138. package/dist/{pascaligo-D_sMUn0Q.js → pascaligo-IEEGVJAJ.js} +13 -1
  139. package/dist/{perl-BPzHt9SS.js → perl-B5-QbHq_.js} +34 -1
  140. package/dist/{pgsql-DlTJB0PD.js → pgsql-s6kqEJmi.js} +14 -4
  141. package/dist/{php-Dmq5OjwK.js → php-CWWqzOo8.js} +36 -1
  142. package/dist/{pla-HJcccrBy.js → pla-FSvb_YP_.js} +13 -1
  143. package/dist/{postiats-OQn6DKv-.js → postiats-DQdscQXO.js} +370 -1
  144. package/dist/{powerquery-DKaMYC8w.js → powerquery-CtA5JA1I.js} +7 -1
  145. package/dist/{powershell-DWeJHik1.js → powershell-DglEq96N.js} +13 -1
  146. package/dist/{protobuf-CBn_IseU.js → protobuf-BSepub3e.js} +5 -1
  147. package/dist/{pug-BoRpCINl.js → pug-B1847F4G.js} +16 -1
  148. package/dist/{python-zPpZYwLF.js → python-DLI1ji08.js} +59 -11
  149. package/dist/{qsharp-4rGyVZOw.js → qsharp-D4i0Nqg9.js} +28 -3
  150. package/dist/{r-DsgLhBOb.js → r-cdRigKxa.js} +5 -1
  151. package/dist/{razor-B_fCUeGX.js → razor-oAnIJsrL.js} +48 -4
  152. package/dist/{redis-B2fdL4Bg.js → redis-D9MFxvE8.js} +16 -6
  153. package/dist/{redshift-DoaeyCkH.js → redshift-CmCnsvL-.js} +13 -4
  154. package/dist/{restructuredtext-D-6OFBY9.js → restructuredtext-CWy8J51t.js} +19 -1
  155. package/dist/{ruby-D1DD6baV.js → ruby-WP-c36m5.js} +76 -3
  156. package/dist/runtime.js +34 -45
  157. package/dist/{rust-DssUV39M.js → rust-Q9FLdYpu.js} +13 -1
  158. package/dist/{sb-Dmb6tAdv.js → sb-C54-JBGT.js} +12 -1
  159. package/dist/{scala-Co3ETaym.js → scala-CzbFImc5.js} +24 -1
  160. package/dist/{scheme-CMrqXTty.js → scheme-BhfDmYN3.js} +1 -1
  161. package/dist/{scss-DkGudv8Q.js → scss-CEmiBXpS.js} +25 -1
  162. package/dist/{shell-BHN2BI4L.js → shell-Bmc1VhG0.js} +4 -1
  163. package/dist/{solidity-b-R-raGB.js → solidity-C9Q2I8Hh.js} +23 -1
  164. package/dist/{sophia-Y4GjyxNB.js → sophia-jWa1UyKz.js} +16 -1
  165. package/dist/{sparql-CDAPZb88.js → sparql-CM7jctbc.js} +15 -1
  166. package/dist/{sql-DkkpPiUq.js → sql-WzihTkbg.js} +42 -1
  167. package/dist/{st-CSPV91Ej.js → st-6y7_3aup.js} +8 -1
  168. package/dist/style.css +1 -1
  169. package/dist/{swift-DdSC5O48.js → swift-k-0zxG_D.js} +4 -1
  170. package/dist/{systemverilog-CI03XpAv.js → systemverilog-Pnr5_rIP.js} +29 -3
  171. package/dist/{tcl-B8DayMSI.js → tcl-fNPXval8.js} +7 -1
  172. package/dist/tsMode-D_PMsbjK.js +976 -0
  173. package/dist/{twig-B1AUPVB_.js → twig-L2MkztkV.js} +76 -1
  174. package/dist/{typescript-DrlYcCUn.js → typescript-Bu3ZbtQI.js} +23 -2
  175. package/dist/typespec-Cqqo-3Pt.js +123 -0
  176. package/dist/{vb-BIC7ccdG.js → vb-B5YC2xN9.js} +15 -1
  177. package/dist/{wgsl-C9yjop46.js → wgsl-D9BRtftY.js} +26 -1
  178. package/dist/{xml-BzP9D0eZ.js → xml-CNSSkPqy.js} +8 -2
  179. package/dist/{yaml-CT7GOvXu.js → yaml-5RF_PGNe.js} +30 -2
  180. package/handlers/compiler.ts +196 -16
  181. package/handlers/context-setup.ts +10 -5
  182. package/handlers/handler-api-factory.ts +358 -0
  183. package/handlers/handler-api.ts +379 -0
  184. package/handlers/handler-executor.ts +25 -5
  185. package/handlers/handler-scope.ts +398 -0
  186. package/handlers/index.ts +34 -2
  187. package/handlers/runtime-api/component-properties.ts +0 -8
  188. package/handlers/runtime-api/index.ts +1 -1
  189. package/handlers/runtime-api/toast.ts +1 -1
  190. package/index.ts +14 -115
  191. package/micro-app/README.md +10 -10
  192. package/micro-app/state/MicroAppRuntimeContext.ts +1 -28
  193. package/micro-app-entry.ts +0 -5
  194. package/package.json +22 -1
  195. package/redux/actions/application/index.ts +0 -1
  196. package/redux/actions/component/addComponentAction.ts +15 -4
  197. package/redux/actions/component/moveDraggedComponent.ts +1 -2
  198. package/redux/actions/component/update-component-name.ts +1 -1
  199. package/redux/actions/component/updateComponentAttributes.ts +7 -2
  200. package/redux/handlers/functions/build-function-handler.ts +11 -3
  201. package/redux/handlers/functions/deploy-function-handler.ts +11 -3
  202. package/redux/handlers/functions/invoke-function-handler.ts +11 -3
  203. package/redux/handlers/functions/load-functions-handler.ts +2 -1
  204. package/redux/handlers/functions/update-function-handler.ts +2 -1
  205. package/redux/store/component/component.interface.ts +8 -2
  206. package/redux/store/component/store.ts +1 -4
  207. package/state/runtime-context.ts +1 -23
  208. package/utils/RuntimeContextHelpers.ts +221 -90
  209. package/utils/change-detection.ts +125 -1
  210. package/utils/clipboard-utils.ts +18 -8
  211. package/utils/component-registry.ts +118 -0
  212. package/utils/index.ts +14 -1
  213. package/utils/naming-generator.ts +3 -1
  214. package/utils/randomness.ts +3 -1
  215. package/utils/register-components.ts +21 -29
  216. package/utils/render-util.ts +27 -48
  217. package/utils/toast.ts +97 -0
  218. package/vite.config.ts +29 -12
  219. package/components/ui/components/Event/EventAttribute/EventAttribute.style.ts +0 -11
  220. package/components/ui/components/Event/EventAttribute/EventAttribute.ts +0 -28
  221. package/components/ui/components/base/BaseElement/calculateStyles.ts +0 -31
  222. package/components/ui/components/base/BaseElement/drag-events.helpers.ts +0 -71
  223. package/components/ui/components/base/BaseElement/execute-event.helpers.ts +0 -45
  224. package/components/ui/components/base/BaseElement/interactions.helpers.ts +0 -14
  225. package/components/ui/components/wrappers/ComponentTitle/ComponentTitle.ts +0 -95
  226. package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.style.ts +0 -102
  227. package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.ts +0 -258
  228. package/components/ui/components/wrappers/PreviewWrapper.ts +0 -28
  229. package/components/ui/components/wrappers/RectangleSelection/RectangleSelection.ts +0 -154
  230. package/components/ui/nuraly-ui/packages/common/dist/constants/index.d.ts +0 -2
  231. package/components/ui/nuraly-ui/packages/common/dist/constants/index.js +0 -2
  232. package/components/ui/nuraly-ui/packages/common/dist/constants.d.ts +0 -17
  233. package/components/ui/nuraly-ui/packages/common/dist/constants.js +0 -7
  234. package/components/ui/nuraly-ui/packages/common/dist/controllers/index.d.ts +0 -2
  235. package/components/ui/nuraly-ui/packages/common/dist/controllers/index.js +0 -2
  236. package/components/ui/nuraly-ui/packages/common/dist/controllers.d.ts +0 -21
  237. package/components/ui/nuraly-ui/packages/common/dist/controllers.js +0 -22
  238. package/components/ui/nuraly-ui/packages/common/dist/index.d.ts +0 -25
  239. package/components/ui/nuraly-ui/packages/common/dist/index.js +0 -27
  240. package/components/ui/nuraly-ui/packages/common/dist/mixins/index.d.ts +0 -2
  241. package/components/ui/nuraly-ui/packages/common/dist/mixins/index.js +0 -3
  242. package/components/ui/nuraly-ui/packages/common/dist/mixins.d.ts +0 -26
  243. package/components/ui/nuraly-ui/packages/common/dist/mixins.js +0 -29
  244. package/components/ui/nuraly-ui/packages/common/dist/shared/base-mixin.d.ts +0 -42
  245. package/components/ui/nuraly-ui/packages/common/dist/shared/base-mixin.js +0 -38
  246. package/components/ui/nuraly-ui/packages/common/dist/shared/constants.d.ts +0 -1
  247. package/components/ui/nuraly-ui/packages/common/dist/shared/constants.js +0 -2
  248. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.d.ts +0 -77
  249. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.js +0 -341
  250. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.d.ts +0 -37
  251. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.js +0 -2
  252. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/index.d.ts +0 -4
  253. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/index.js +0 -4
  254. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.d.ts +0 -48
  255. package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.js +0 -133
  256. package/components/ui/nuraly-ui/packages/common/dist/shared/dependency-mixin.d.ts +0 -37
  257. package/components/ui/nuraly-ui/packages/common/dist/shared/dependency-mixin.js +0 -141
  258. package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.d.ts +0 -64
  259. package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.js +0 -95
  260. package/components/ui/nuraly-ui/packages/common/dist/shared/index.d.ts +0 -13
  261. package/components/ui/nuraly-ui/packages/common/dist/shared/index.js +0 -17
  262. package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.d.ts +0 -78
  263. package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.js +0 -194
  264. package/components/ui/nuraly-ui/packages/common/dist/shared/themes.d.ts +0 -44
  265. package/components/ui/nuraly-ui/packages/common/dist/shared/themes.js +0 -85
  266. package/components/ui/nuraly-ui/packages/common/dist/shared/utils.d.ts +0 -60
  267. package/components/ui/nuraly-ui/packages/common/dist/shared/utils.js +0 -85
  268. package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.d.ts +0 -108
  269. package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.js +0 -17
  270. package/components/ui/nuraly-ui/packages/common/dist/themes/index.d.ts +0 -2
  271. package/components/ui/nuraly-ui/packages/common/dist/themes/index.js +0 -2
  272. package/components/ui/nuraly-ui/packages/common/dist/themes.d.ts +0 -22
  273. package/components/ui/nuraly-ui/packages/common/dist/themes.js +0 -23
  274. package/components/ui/nuraly-ui/packages/common/dist/utils/index.d.ts +0 -2
  275. package/components/ui/nuraly-ui/packages/common/dist/utils/index.js +0 -2
  276. package/components/ui/nuraly-ui/packages/common/dist/utils.d.ts +0 -21
  277. package/components/ui/nuraly-ui/packages/common/dist/utils.js +0 -22
  278. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/LICENSE +0 -15
  279. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/README.md +0 -294
  280. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy-sync.js +0 -171
  281. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy.js +0 -175
  282. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/index.js +0 -7
  283. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/empty/index.js +0 -39
  284. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/file.js +0 -66
  285. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/index.js +0 -23
  286. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/link.js +0 -64
  287. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -101
  288. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -34
  289. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink.js +0 -67
  290. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/fs/index.js +0 -146
  291. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/index.js +0 -16
  292. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/index.js +0 -16
  293. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/jsonfile.js +0 -11
  294. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json-sync.js +0 -12
  295. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json.js +0 -12
  296. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
  297. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -27
  298. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/utils.js +0 -21
  299. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/index.js +0 -7
  300. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move-sync.js +0 -55
  301. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move.js +0 -59
  302. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/output-file/index.js +0 -31
  303. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/path-exists/index.js +0 -12
  304. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/remove/index.js +0 -17
  305. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/async.js +0 -29
  306. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/stat.js +0 -159
  307. package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/utimes.js +0 -36
  308. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/LICENSE +0 -15
  309. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/README.md +0 -294
  310. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy-sync.js +0 -171
  311. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy.js +0 -175
  312. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/index.js +0 -7
  313. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/empty/index.js +0 -39
  314. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/file.js +0 -66
  315. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/index.js +0 -23
  316. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/link.js +0 -64
  317. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -101
  318. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -34
  319. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink.js +0 -67
  320. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/fs/index.js +0 -146
  321. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/index.js +0 -16
  322. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/index.js +0 -16
  323. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/jsonfile.js +0 -11
  324. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json-sync.js +0 -12
  325. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json.js +0 -12
  326. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
  327. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -27
  328. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/utils.js +0 -21
  329. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/index.js +0 -7
  330. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move-sync.js +0 -55
  331. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move.js +0 -59
  332. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/output-file/index.js +0 -31
  333. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/path-exists/index.js +0 -12
  334. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/remove/index.js +0 -17
  335. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/async.js +0 -29
  336. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/stat.js +0 -159
  337. package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/utimes.js +0 -36
  338. package/dist/SmartAttributeHandler-C4EliaG0.js +0 -153
  339. package/dist/SmartAttributeHandler-u-ZHGueR.js +0 -193
  340. package/dist/assets/editor.worker-C_S4Avdt.js +0 -11
  341. package/dist/assets/html.worker-DfuQASUV.js +0 -458
  342. package/dist/assets/json.worker-Cucz4wxY.js +0 -42
  343. package/dist/assets/ts.worker-Dme6S0YK.js +0 -37021
  344. package/dist/cssMode-CqMQ6Xsa.js +0 -1443
  345. package/dist/htmlMode-KglxyZXm.js +0 -1453
  346. package/dist/jsonMode-B3rqxD-b.js +0 -1863
  347. package/dist/tsMode-DEiq8fQ0.js +0 -800
  348. package/redux/actions/application/loadApplicationPermissionAction.ts +0 -10
  349. package/utils/styleUtil.ts +0 -7
@@ -1,7 +1,7 @@
1
- import { m as f } from "./CodeEditor-YsOapSut.js";
1
+ import { m as f } from "./CodeEditor-B1gNuvPb.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
- * Version: 0.45.0(5e5af013f8d295555a7210df0d5f2cea0bf5dd56)
4
+ * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
5
5
  * Released under the MIT license
6
6
  * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
7
7
  *-----------------------------------------------------------------------------*/
@@ -106,20 +106,26 @@ function l(t) {
106
106
  ],
107
107
  folding: {
108
108
  markers: {
109
- start: new RegExp(`${t.open}#(?:${s.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),
109
+ start: new RegExp(
110
+ `${t.open}#(?:${s.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`
111
+ ),
110
112
  end: new RegExp(`${t.open}/#(?:${s.join("|")})[\\r\\n\\t ]*>`)
111
113
  }
112
114
  },
113
115
  onEnterRules: [
114
116
  {
115
- beforeText: new RegExp(`${t.open}#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),
117
+ beforeText: new RegExp(
118
+ `${t.open}#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`
119
+ ),
116
120
  afterText: new RegExp(`^${t.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${t.close}$`),
117
121
  action: {
118
122
  indentAction: r.languages.IndentAction.IndentOutdent
119
123
  }
120
124
  },
121
125
  {
122
- beforeText: new RegExp(`${t.open}#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),
126
+ beforeText: new RegExp(
127
+ `${t.open}#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`
128
+ ),
123
129
  action: { indentAction: r.languages.IndentAction.Indent }
124
130
  }
125
131
  ]
@@ -127,6 +133,8 @@ function l(t) {
127
133
  }
128
134
  function g() {
129
135
  return {
136
+ // Cannot set block comment delimiter in auto mode...
137
+ // It depends on the content and the cursor position of the file...
130
138
  brackets: [
131
139
  ["<", ">"],
132
140
  ["[", "]"],
@@ -158,14 +166,18 @@ function g() {
158
166
  },
159
167
  onEnterRules: [
160
168
  {
161
- beforeText: new RegExp(`[<\\[]#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),
169
+ beforeText: new RegExp(
170
+ `[<\\[]#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`
171
+ ),
162
172
  afterText: new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),
163
173
  action: {
164
174
  indentAction: r.languages.IndentAction.IndentOutdent
165
175
  }
166
176
  },
167
177
  {
168
- beforeText: new RegExp(`[<\\[]#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),
178
+ beforeText: new RegExp(
179
+ `[<\\[]#(?!(?:${d.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`
180
+ ),
169
181
  action: { indentAction: r.languages.IndentAction.Indent }
170
182
  }
171
183
  ]
@@ -177,6 +189,7 @@ function i(t, n) {
177
189
  return new RegExp(m, c.flags);
178
190
  };
179
191
  return {
192
+ // Settings
180
193
  unicode: !0,
181
194
  includeLF: !1,
182
195
  start: e("default__id__"),
@@ -189,50 +202,173 @@ function i(t, n) {
189
202
  { open: "(", close: ")", token: "delimiter.parenthesis" },
190
203
  { open: "<", close: ">", token: "delimiter.angle" }
191
204
  ],
205
+ // Dynamic RegExp
192
206
  [e("open__id__")]: new RegExp(t.open),
193
207
  [e("close__id__")]: new RegExp(t.close),
194
208
  [e("iOpen1__id__")]: new RegExp(n.open1),
195
209
  [e("iOpen2__id__")]: new RegExp(n.open2),
196
210
  [e("iClose__id__")]: new RegExp(n.close),
211
+ // <#START_TAG : "<" | "<#" | "[#">
212
+ // <#END_TAG : "</" | "</#" | "[/#">
197
213
  [e("startTag__id__")]: o(/(@open__id__)(#)/),
198
214
  [e("endTag__id__")]: o(/(@open__id__)(\/#)/),
199
215
  [e("startOrEndTag__id__")]: o(/(@open__id__)(\/?#)/),
216
+ // <#CLOSE_TAG1 : (<BLANK>)* (">" | "]")>
200
217
  [e("closeTag1__id__")]: o(/((?:@blank)*)(@close__id__)/),
218
+ // <#CLOSE_TAG2 : (<BLANK>)* ("/")? (">" | "]")>
201
219
  [e("closeTag2__id__")]: o(/((?:@blank)*\/?)(@close__id__)/),
220
+ // Static RegExp
221
+ // <#BLANK : " " | "\t" | "\n" | "\r">
202
222
  blank: /[ \t\n\r]/,
223
+ // <FALSE : "false">
224
+ // <TRUE : "true">
225
+ // <IN : "in">
226
+ // <AS : "as">
227
+ // <USING : "using">
203
228
  keywords: ["false", "true", "in", "as", "using"],
229
+ // Directive names that cannot have an expression parameters and cannot be self-closing
230
+ // E.g. <#if id==2> ... </#if>
204
231
  directiveStartCloseTag1: /attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,
232
+ // Directive names that cannot have an expression parameter and can be self-closing
233
+ // E.g. <#if> ... <#else> ... </#if>
234
+ // E.g. <#if> ... <#else /></#if>
205
235
  directiveStartCloseTag2: /else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,
236
+ // Directive names that can have an expression parameter and cannot be self-closing
237
+ // E.g. <#if id==2> ... </#if>
206
238
  directiveStartBlank: /if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,
239
+ // Directive names that can have an end tag
240
+ // E.g. </#if>
207
241
  directiveEndCloseTag1: /if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,
242
+ // <#ESCAPED_CHAR :
243
+ // "\\"
244
+ // (
245
+ // ("n" | "t" | "r" | "f" | "b" | "g" | "l" | "a" | "\\" | "'" | "\"" | "{" | "=")
246
+ // |
247
+ // ("x" ["0"-"9", "A"-"F", "a"-"f"])
248
+ // )
249
+ // >
250
+ // Note: While the JavaCC tokenizer rule only specifies one hex digit,
251
+ // FreeMarker actually interprets up to 4 hex digits.
208
252
  escapedChar: /\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,
253
+ // <#ASCII_DIGIT: ["0" - "9"]>
209
254
  asciiDigit: /[0-9]/,
255
+ // <INTEGER : (["0"-"9"])+>
210
256
  integer: /[0-9]+/,
257
+ // <#NON_ESCAPED_ID_START_CHAR:
258
+ // [
259
+ // // This was generated on JDK 1.8.0_20 Win64 with src/main/misc/identifierChars/IdentifierCharGenerator.java
260
+ // ...
261
+ // ]
211
262
  nonEscapedIdStartChar: /[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
263
+ // <#ESCAPED_ID_CHAR: "\\" ("-" | "." | ":" | "#")>
212
264
  escapedIdChar: /\\[\-\.:#]/,
265
+ // <#ID_START_CHAR: <NON_ESCAPED_ID_START_CHAR>|<ESCAPED_ID_CHAR>>
213
266
  idStartChar: /(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,
267
+ // <ID: <ID_START_CHAR> (<ID_START_CHAR>|<ASCII_DIGIT>)*>
214
268
  id: /(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,
269
+ // Certain keywords / operators are allowed to index hashes
270
+ //
271
+ // Expression DotVariable(Expression exp) :
272
+ // {
273
+ // Token t;
274
+ // }
275
+ // {
276
+ // <DOT>
277
+ // (
278
+ // t = <ID> | t = <TIMES> | t = <DOUBLE_STAR>
279
+ // |
280
+ // (
281
+ // t = <LESS_THAN>
282
+ // |
283
+ // t = <LESS_THAN_EQUALS>
284
+ // |
285
+ // t = <ESCAPED_GT>
286
+ // |
287
+ // t = <ESCAPED_GTE>
288
+ // |
289
+ // t = <FALSE>
290
+ // |
291
+ // t = <TRUE>
292
+ // |
293
+ // t = <IN>
294
+ // |
295
+ // t = <AS>
296
+ // |
297
+ // t = <USING>
298
+ // )
299
+ // {
300
+ // if (!Character.isLetter(t.image.charAt(0))) {
301
+ // throw new ParseException(t.image + " is not a valid identifier.", template, t);
302
+ // }
303
+ // }
304
+ // )
305
+ // {
306
+ // notListLiteral(exp, "hash");
307
+ // notStringLiteral(exp, "hash");
308
+ // notBooleanLiteral(exp, "hash");
309
+ // Dot dot = new Dot(exp, t.image);
310
+ // dot.setLocation(template, exp, t);
311
+ // return dot;
312
+ // }
313
+ // }
215
314
  specialHashKeys: /\*\*|\*|false|true|in|as|using/,
315
+ // <DOUBLE_EQUALS : "==">
316
+ // <EQUALS : "=">
317
+ // <NOT_EQUALS : "!=">
318
+ // <PLUS_EQUALS : "+=">
319
+ // <MINUS_EQUALS : "-=">
320
+ // <TIMES_EQUALS : "*=">
321
+ // <DIV_EQUALS : "/=">
322
+ // <MOD_EQUALS : "%=">
323
+ // <PLUS_PLUS : "++">
324
+ // <MINUS_MINUS : "--">
325
+ // <LESS_THAN_EQUALS : "lte" | "\\lte" | "<=" | "&lt;=">
326
+ // <LESS_THAN : "lt" | "\\lt" | "<" | "&lt;">
327
+ // <ESCAPED_GTE : "gte" | "\\gte" | "&gt;=">
328
+ // <ESCAPED_GT: "gt" | "\\gt" | "&gt;">
329
+ // <DOUBLE_STAR : "**">
330
+ // <PLUS : "+">
331
+ // <MINUS : "-">
332
+ // <TIMES : "*">
333
+ // <PERCENT : "%">
334
+ // <AND : "&" | "&&" | "&amp;&amp;" | "\\and" >
335
+ // <OR : "|" | "||">
336
+ // <EXCLAM : "!">
337
+ // <COMMA : ",">
338
+ // <SEMICOLON : ";">
339
+ // <COLON : ":">
340
+ // <ELLIPSIS : "...">
341
+ // <DOT_DOT_ASTERISK : "..*" >
342
+ // <DOT_DOT_LESS : "..<" | "..!" >
343
+ // <DOT_DOT : "..">
344
+ // <EXISTS : "??">
345
+ // <BUILT_IN : "?">
346
+ // <LAMBDA_ARROW : "->" | "-&gt;">
216
347
  namedSymbols: /&lt;=|&gt;=|\\lte|\\lt|&lt;|\\gte|\\gt|&gt;|&amp;&amp;|\\and|-&gt;|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,
217
348
  arrows: ["->", "-&gt;"],
218
349
  delimiters: [";", ":", ",", "."],
219
350
  stringOperators: ["lte", "lt", "gte", "gt"],
220
351
  noParseTags: ["noparse", "noParse", "comment"],
221
352
  tokenizer: {
353
+ // Parser states
354
+ // Plain text
222
355
  [e("default__id__")]: [
223
356
  { include: e("@directive_token__id__") },
224
357
  { include: e("@interpolation_and_text_token__id__") }
225
358
  ],
359
+ // A FreeMarker expression inside a directive, e.g. <#if 2<3>
226
360
  [e("fmExpression__id__.directive")]: [
227
361
  { include: e("@blank_and_expression_comment_token__id__") },
228
362
  { include: e("@directive_end_token__id__") },
229
363
  { include: e("@expression_token__id__") }
230
364
  ],
365
+ // A FreeMarker expression inside an interpolation, e.g. ${2+3}
231
366
  [e("fmExpression__id__.interpolation")]: [
232
367
  { include: e("@blank_and_expression_comment_token__id__") },
233
368
  { include: e("@expression_token__id__") },
234
369
  { include: e("@greater_operators_token__id__") }
235
370
  ],
371
+ // In an expression and inside a not-yet closed parenthesis / bracket
236
372
  [e("inParen__id__.plain")]: [
237
373
  { include: e("@blank_and_expression_comment_token__id__") },
238
374
  { include: e("@directive_end_token__id__") },
@@ -243,20 +379,57 @@ function i(t, n) {
243
379
  { include: e("@expression_token__id__") },
244
380
  { include: e("@greater_operators_token__id__") }
245
381
  ],
382
+ // Expression for the unified call, e.g. <@createMacro() ... >
246
383
  [e("noSpaceExpression__id__")]: [
247
384
  { include: e("@no_space_expression_end_token__id__") },
248
385
  { include: e("@directive_end_token__id__") },
249
386
  { include: e("@expression_token__id__") }
250
387
  ],
388
+ // For the function of a unified call. Special case for when the
389
+ // expression is a simple identifier.
390
+ // <@join [1,2] ",">
391
+ // <@null!join [1,2] ",">
251
392
  [e("unifiedCall__id__")]: [{ include: e("@unified_call_token__id__") }],
393
+ // For singly and doubly quoted string (that may contain interpolations)
252
394
  [e("singleString__id__")]: [{ include: e("@string_single_token__id__") }],
253
395
  [e("doubleString__id__")]: [{ include: e("@string_double_token__id__") }],
396
+ // For singly and doubly quoted string (that may not contain interpolations)
254
397
  [e("rawSingleString__id__")]: [{ include: e("@string_single_raw_token__id__") }],
255
398
  [e("rawDoubleString__id__")]: [{ include: e("@string_double_raw_token__id__") }],
399
+ // For a comment in an expression
400
+ // ${ 1 + <#-- comment --> 2}
256
401
  [e("expressionComment__id__")]: [{ include: e("@expression_comment_token__id__") }],
402
+ // For <#noparse> ... </#noparse>
403
+ // For <#noParse> ... </#noParse>
404
+ // For <#comment> ... </#comment>
257
405
  [e("noParse__id__")]: [{ include: e("@no_parse_token__id__") }],
406
+ // For <#-- ... -->
258
407
  [e("terseComment__id__")]: [{ include: e("@terse_comment_token__id__") }],
408
+ // Common rules
259
409
  [e("directive_token__id__")]: [
410
+ // <ATTEMPT : <START_TAG> "attempt" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
411
+ // <RECOVER : <START_TAG> "recover" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
412
+ // <SEP : <START_TAG> "sep" <CLOSE_TAG1>>
413
+ // <AUTOESC : <START_TAG> "auto" ("e"|"E") "sc" <CLOSE_TAG1>> {
414
+ // handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 4), DEFAULT);
415
+ // }
416
+ // <NOAUTOESC : <START_TAG> "no" ("autoe"|"AutoE") "sc" <CLOSE_TAG1>> {
417
+ // handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 2), DEFAULT);
418
+ // }
419
+ // <COMPRESS : <START_TAG> "compress" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
420
+ // <DEFAUL : <START_TAG> "default" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
421
+ // <NOESCAPE : <START_TAG> "no" ("e" | "E") "scape" <CLOSE_TAG1>> {
422
+ // handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 2), DEFAULT);
423
+ // }
424
+ //
425
+ // <COMMENT : <START_TAG> "comment" <CLOSE_TAG1>> {
426
+ // handleTagSyntaxAndSwitch(matchedToken, NO_PARSE); noparseTag = "comment";
427
+ // }
428
+ // <NOPARSE: <START_TAG> "no" ("p" | "P") "arse" <CLOSE_TAG1>> {
429
+ // int tagNamingConvention = getTagNamingConvention(matchedToken, 2);
430
+ // handleTagSyntaxAndSwitch(matchedToken, tagNamingConvention, NO_PARSE);
431
+ // noparseTag = tagNamingConvention == Configuration.CAMEL_CASE_NAMING_CONVENTION ? "noParse" : "noparse";
432
+ // }
260
433
  [
261
434
  o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),
262
435
  t.id === "auto" ? {
@@ -277,6 +450,20 @@ function i(t, n) {
277
450
  { token: "@brackets.directive" }
278
451
  ]
279
452
  ],
453
+ // <ELSE : <START_TAG> "else" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
454
+ // <BREAK : <START_TAG> "break" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
455
+ // <CONTINUE : <START_TAG> "continue" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
456
+ // <SIMPLE_RETURN : <START_TAG> "return" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
457
+ // <HALT : <START_TAG> "stop" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
458
+ // <FLUSH : <START_TAG> "flush" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
459
+ // <TRIM : <START_TAG> "t" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
460
+ // <LTRIM : <START_TAG> "lt" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
461
+ // <RTRIM : <START_TAG> "rt" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
462
+ // <NOTRIM : <START_TAG> "nt" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
463
+ // <SIMPLE_NESTED : <START_TAG> "nested" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
464
+ // <SIMPLE_RECURSE : <START_TAG> "recurse" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
465
+ // <FALLBACK : <START_TAG> "fallback" <CLOSE_TAG2>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
466
+ // <TRIVIAL_FTL_HEADER : ("<#ftl" | "[#ftl") ("/")? (">" | "]")> { ftlHeader(matchedToken); }
280
467
  [
281
468
  o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),
282
469
  t.id === "auto" ? {
@@ -292,6 +479,45 @@ function i(t, n) {
292
479
  { token: "@brackets.directive" }
293
480
  ]
294
481
  ],
482
+ // <IF : <START_TAG> "if" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
483
+ // <ELSE_IF : <START_TAG> "else" ("i" | "I") "f" <BLANK>> {
484
+ // handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 4), FM_EXPRESSION);
485
+ // }
486
+ // <LIST : <START_TAG> "list" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
487
+ // <FOREACH : <START_TAG> "for" ("e" | "E") "ach" <BLANK>> {
488
+ // handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 3), FM_EXPRESSION);
489
+ // }
490
+ // <SWITCH : <START_TAG> "switch" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
491
+ // <CASE : <START_TAG> "case" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
492
+ // <ASSIGN : <START_TAG> "assign" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
493
+ // <GLOBALASSIGN : <START_TAG> "global" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
494
+ // <LOCALASSIGN : <START_TAG> "local" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
495
+ // <_INCLUDE : <START_TAG> "include" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
496
+ // <IMPORT : <START_TAG> "import" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
497
+ // <FUNCTION : <START_TAG> "function" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
498
+ // <MACRO : <START_TAG> "macro" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
499
+ // <TRANSFORM : <START_TAG> "transform" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
500
+ // <VISIT : <START_TAG> "visit" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
501
+ // <STOP : <START_TAG> "stop" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
502
+ // <RETURN : <START_TAG> "return" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
503
+ // <CALL : <START_TAG> "call" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
504
+ // <SETTING : <START_TAG> "setting" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
505
+ // <OUTPUTFORMAT : <START_TAG> "output" ("f"|"F") "ormat" <BLANK>> {
506
+ // handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 6), FM_EXPRESSION);
507
+ // }
508
+ // <NESTED : <START_TAG> "nested" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
509
+ // <RECURSE : <START_TAG> "recurse" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
510
+ // <ESCAPE : <START_TAG> "escape" <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
511
+ //
512
+ // Note: FreeMarker grammar appears to treat the FTL header as a special case,
513
+ // in order to remove new lines after the header (?), but since we only need
514
+ // to tokenize for highlighting, we can include this directive here.
515
+ // <FTL_HEADER : ("<#ftl" | "[#ftl") <BLANK>> { ftlHeader(matchedToken); }
516
+ //
517
+ // Note: FreeMarker grammar appears to treat the items directive as a special case for
518
+ // the AST parsing process, but since we only need to tokenize, we can include this
519
+ // directive here.
520
+ // <ITEMS : <START_TAG> "items" (<BLANK>)+ <AS> <BLANK>> { handleTagSyntaxAndSwitch(matchedToken, FM_EXPRESSION); }
295
521
  [
296
522
  o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),
297
523
  t.id === "auto" ? {
@@ -306,6 +532,35 @@ function i(t, n) {
306
532
  { token: "", next: e("@fmExpression__id__.directive") }
307
533
  ]
308
534
  ],
535
+ // <END_IF : <END_TAG> "if" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
536
+ // <END_LIST : <END_TAG> "list" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
537
+ // <END_SEP : <END_TAG> "sep" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
538
+ // <END_RECOVER : <END_TAG> "recover" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
539
+ // <END_ATTEMPT : <END_TAG> "attempt" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
540
+ // <END_FOREACH : <END_TAG> "for" ("e" | "E") "ach" <CLOSE_TAG1>> {
541
+ // handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 3), DEFAULT);
542
+ // }
543
+ // <END_LOCAL : <END_TAG> "local" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
544
+ // <END_GLOBAL : <END_TAG> "global" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
545
+ // <END_ASSIGN : <END_TAG> "assign" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
546
+ // <END_FUNCTION : <END_TAG> "function" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
547
+ // <END_MACRO : <END_TAG> "macro" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
548
+ // <END_OUTPUTFORMAT : <END_TAG> "output" ("f" | "F") "ormat" <CLOSE_TAG1>> {
549
+ // handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 6), DEFAULT);
550
+ // }
551
+ // <END_AUTOESC : <END_TAG> "auto" ("e" | "E") "sc" <CLOSE_TAG1>> {
552
+ // handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 4), DEFAULT);
553
+ // }
554
+ // <END_NOAUTOESC : <END_TAG> "no" ("autoe"|"AutoE") "sc" <CLOSE_TAG1>> {
555
+ // handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 2), DEFAULT);
556
+ // }
557
+ // <END_COMPRESS : <END_TAG> "compress" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
558
+ // <END_TRANSFORM : <END_TAG> "transform" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
559
+ // <END_SWITCH : <END_TAG> "switch" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
560
+ // <END_ESCAPE : <END_TAG> "escape" <CLOSE_TAG1>> { handleTagSyntaxAndSwitch(matchedToken, DEFAULT); }
561
+ // <END_NOESCAPE : <END_TAG> "no" ("e" | "E") "scape" <CLOSE_TAG1>> {
562
+ // handleTagSyntaxAndSwitch(matchedToken, getTagNamingConvention(matchedToken, 2), DEFAULT);
563
+ // }
309
564
  [
310
565
  o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),
311
566
  t.id === "auto" ? {
@@ -321,6 +576,7 @@ function i(t, n) {
321
576
  { token: "@brackets.directive" }
322
577
  ]
323
578
  ],
579
+ // <UNIFIED_CALL : "<@" | "[@" > { unifiedCall(matchedToken); }
324
580
  [
325
581
  o(/(@open__id__)(@)/),
326
582
  t.id === "auto" ? {
@@ -333,6 +589,7 @@ function i(t, n) {
333
589
  { token: "delimiter.directive", next: e("@unifiedCall__id__") }
334
590
  ]
335
591
  ],
592
+ // <UNIFIED_CALL_END : ("<" | "[") "/@" ((<ID>) ("."<ID>)*)? <CLOSE_TAG1>> { unifiedCallEnd(matchedToken); }
336
593
  [
337
594
  o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),
338
595
  [
@@ -343,6 +600,7 @@ function i(t, n) {
343
600
  { token: "@brackets.directive" }
344
601
  ]
345
602
  ],
603
+ // <TERSE_COMMENT : ("<" | "[") "#--" > { noparseTag = "-->"; handleTagSyntaxAndSwitch(matchedToken, NO_PARSE); }
346
604
  [
347
605
  o(/(@open__id__)#--/),
348
606
  t.id === "auto" ? {
@@ -352,6 +610,7 @@ function i(t, n) {
352
610
  }
353
611
  } : { token: "comment", next: e("@terseComment__id__") }
354
612
  ],
613
+ // <UNKNOWN_DIRECTIVE : ("[#" | "[/#" | "<#" | "</#") (["a"-"z", "A"-"Z", "_"])+>
355
614
  [
356
615
  o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),
357
616
  t.id === "auto" ? {
@@ -366,7 +625,10 @@ function i(t, n) {
366
625
  ]
367
626
  ]
368
627
  ],
628
+ // <DEFAULT, NO_DIRECTIVE> TOKEN :
369
629
  [e("interpolation_and_text_token__id__")]: [
630
+ // <DOLLAR_INTERPOLATION_OPENING : "${"> { startInterpolation(matchedToken); }
631
+ // <SQUARE_BRACKET_INTERPOLATION_OPENING : "[="> { startInterpolation(matchedToken); }
370
632
  [
371
633
  o(/(@iOpen1__id__)(@iOpen2__id__)/),
372
634
  [
@@ -377,8 +639,24 @@ function i(t, n) {
377
639
  }
378
640
  ]
379
641
  ],
642
+ // <STATIC_TEXT_FALSE_ALARM : "$" | "#" | "<" | "[" | "{"> // to handle a lone dollar sign or "<" or "# or <@ with whitespace after"
643
+ // <STATIC_TEXT_WS : ("\n" | "\r" | "\t" | " ")+>
644
+ // <STATIC_TEXT_NON_WS : (~["$", "<", "#", "[", "{", "\n", "\r", "\t", " "])+>
380
645
  [/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/, { token: "source" }]
381
646
  ],
647
+ // <STRING_LITERAL :
648
+ // (
649
+ // "\""
650
+ // ((~["\"", "\\"]) | <ESCAPED_CHAR>)*
651
+ // "\""
652
+ // )
653
+ // |
654
+ // (
655
+ // "'"
656
+ // ((~["'", "\\"]) | <ESCAPED_CHAR>)*
657
+ // "'"
658
+ // )
659
+ // >
382
660
  [e("string_single_token__id__")]: [
383
661
  [/[^'\\]/, { token: "string" }],
384
662
  [/@escapedChar/, { token: "string.escape" }],
@@ -389,6 +667,7 @@ function i(t, n) {
389
667
  [/@escapedChar/, { token: "string.escape" }],
390
668
  [/"/, { token: "string", next: "@pop" }]
391
669
  ],
670
+ // <RAW_STRING : "r" (("\"" (~["\""])* "\"") | ("'" (~["'"])* "'"))>
392
671
  [e("string_single_raw_token__id__")]: [
393
672
  [/[^']+/, { token: "string.raw" }],
394
673
  [/'/, { token: "string.raw", next: "@pop" }]
@@ -397,7 +676,9 @@ function i(t, n) {
397
676
  [/[^"]+/, { token: "string.raw" }],
398
677
  [/"/, { token: "string.raw", next: "@pop" }]
399
678
  ],
679
+ // <FM_EXPRESSION, IN_PAREN, NO_SPACE_EXPRESSION, NAMED_PARAMETER_EXPRESSION> TOKEN :
400
680
  [e("expression_token__id__")]: [
681
+ // Strings
401
682
  [
402
683
  /(r?)(['"])/,
403
684
  {
@@ -415,6 +696,9 @@ function i(t, n) {
415
696
  }
416
697
  }
417
698
  ],
699
+ // Numbers
700
+ // <INTEGER : (["0"-"9"])+>
701
+ // <DECIMAL : <INTEGER> "." <INTEGER>>
418
702
  [
419
703
  /(?:@integer)(?:\.(?:@integer))?/,
420
704
  {
@@ -424,10 +708,13 @@ function i(t, n) {
424
708
  }
425
709
  }
426
710
  ],
711
+ // Special hash keys that must not be treated as identifiers
712
+ // after a period, e.g. a.** is accessing the key "**" of a
427
713
  [
428
714
  /(\.)(@blank*)(@specialHashKeys)/,
429
715
  [{ token: "delimiter" }, { token: "" }, { token: "identifier" }]
430
716
  ],
717
+ // Symbols / operators
431
718
  [
432
719
  /(?:@namedSymbols)/,
433
720
  {
@@ -438,6 +725,7 @@ function i(t, n) {
438
725
  }
439
726
  }
440
727
  ],
728
+ // Identifiers
441
729
  [
442
730
  /@id/,
443
731
  {
@@ -448,6 +736,12 @@ function i(t, n) {
448
736
  }
449
737
  }
450
738
  ],
739
+ // <OPEN_BRACKET : "[">
740
+ // <CLOSE_BRACKET : "]">
741
+ // <OPEN_PAREN : "(">
742
+ // <CLOSE_PAREN : ")">
743
+ // <OPENING_CURLY_BRACKET : "{">
744
+ // <CLOSING_CURLY_BRACKET : "}">
451
745
  [
452
746
  /[\[\]\(\)\{\}]/,
453
747
  {
@@ -463,9 +757,13 @@ function i(t, n) {
463
757
  ...n.id === "bracket" ? {
464
758
  "$S2==interpolation": { token: "@brackets.interpolation", next: "@popall" }
465
759
  } : {},
760
+ // This cannot happen while in auto mode, since this applies only to an
761
+ // fmExpression inside a directive. But once we encounter the start of a
762
+ // directive, we can establish the tag syntax mode.
466
763
  ...t.id === "bracket" ? {
467
764
  "$S2==directive": { token: "@brackets.directive", next: "@popall" }
468
765
  } : {},
766
+ // Ignore mismatched paren
469
767
  [e("$S1==inParen__id__")]: { token: "@brackets", next: "@pop" },
470
768
  "@default": { token: "@brackets" }
471
769
  }
@@ -488,6 +786,7 @@ function i(t, n) {
488
786
  ...n.id === "bracket" ? {} : {
489
787
  "$S2==interpolation": { token: "@brackets.interpolation", next: "@popall" }
490
788
  },
789
+ // Ignore mismatched paren
491
790
  [e("$S1==inParen__id__")]: { token: "@brackets", next: "@pop" },
492
791
  "@default": { token: "@brackets" }
493
792
  }
@@ -495,30 +794,60 @@ function i(t, n) {
495
794
  }
496
795
  }
497
796
  ],
797
+ // <OPEN_MISPLACED_INTERPOLATION : "${" | "#{" | "[=">
498
798
  [/\$\{/, { token: "delimiter.invalid" }]
499
799
  ],
800
+ // <FM_EXPRESSION, IN_PAREN, NAMED_PARAMETER_EXPRESSION> SKIP :
500
801
  [e("blank_and_expression_comment_token__id__")]: [
802
+ // < ( " " | "\t" | "\n" | "\r" )+ >
501
803
  [/(?:@blank)+/, { token: "" }],
804
+ // < ("<" | "[") ("#" | "!") "--"> : EXPRESSION_COMMENT
502
805
  [/[<\[][#!]--/, { token: "comment", next: e("@expressionComment__id__") }]
503
806
  ],
807
+ // <FM_EXPRESSION, NO_SPACE_EXPRESSION, NAMED_PARAMETER_EXPRESSION> TOKEN :
504
808
  [e("directive_end_token__id__")]: [
809
+ // <DIRECTIVE_END : ">">
810
+ // {
811
+ // if (inFTLHeader) {
812
+ // eatNewline();
813
+ // inFTLHeader = false;
814
+ // }
815
+ // if (squBracTagSyntax || postInterpolationLexState != -1 /* We are in an interpolation */) {
816
+ // matchedToken.kind = NATURAL_GT;
817
+ // } else {
818
+ // SwitchTo(DEFAULT);
819
+ // }
820
+ // }
821
+ // This cannot happen while in auto mode, since this applies only to an
822
+ // fmExpression inside a directive. But once we encounter the start of a
823
+ // directive, we can establish the tag syntax mode.
505
824
  [
506
825
  />/,
507
826
  t.id === "bracket" ? { token: "operators" } : { token: "@brackets.directive", next: "@popall" }
508
827
  ],
828
+ // <EMPTY_DIRECTIVE_END : "/>" | "/]">
829
+ // It is a syntax error to end a tag with the wrong close token
830
+ // Let's indicate that to the user by not closing the tag
509
831
  [
510
832
  o(/(\/)(@close__id__)/),
511
833
  [{ token: "delimiter.directive" }, { token: "@brackets.directive", next: "@popall" }]
512
834
  ]
513
835
  ],
836
+ // <IN_PAREN> TOKEN :
514
837
  [e("greater_operators_token__id__")]: [
838
+ // <NATURAL_GT : ">">
515
839
  [/>/, { token: "operators" }],
840
+ // <NATURAL_GTE : ">=">
516
841
  [/>=/, { token: "operators" }]
517
842
  ],
843
+ // <NO_SPACE_EXPRESSION> TOKEN :
518
844
  [e("no_space_expression_end_token__id__")]: [
845
+ // <TERMINATING_WHITESPACE : (["\n", "\r", "\t", " "])+> : FM_EXPRESSION
519
846
  [/(?:@blank)+/, { token: "", switchTo: e("@fmExpression__id__.directive") }]
520
847
  ],
521
848
  [e("unified_call_token__id__")]: [
849
+ // Special case for a call where the expression is just an ID
850
+ // <UNIFIED_CALL> <ID> <BLANK>+
522
851
  [
523
852
  /(@id)((?:@blank)+)/,
524
853
  [{ token: "tag" }, { token: "", next: e("@fmExpression__id__.directive") }]
@@ -533,7 +862,16 @@ function i(t, n) {
533
862
  ],
534
863
  [/./, { token: "@rematch", next: e("@noSpaceExpression__id__") }]
535
864
  ],
865
+ // <NO_PARSE> TOKEN :
536
866
  [e("no_parse_token__id__")]: [
867
+ // <MAYBE_END :
868
+ // ("<" | "[")
869
+ // "/"
870
+ // ("#")?
871
+ // (["a"-"z", "A"-"Z"])+
872
+ // ( " " | "\t" | "\n" | "\r" )*
873
+ // (">" | "]")
874
+ // >
537
875
  [
538
876
  o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),
539
877
  {
@@ -562,6 +900,8 @@ function i(t, n) {
562
900
  }
563
901
  }
564
902
  ],
903
+ // <KEEP_GOING : (~["<", "[", "-"])+>
904
+ // <LONE_LESS_THAN_OR_DASH : ["<", "[", "-"]>
565
905
  [
566
906
  /[^<\[\-]+|[<\[\-]/,
567
907
  {
@@ -572,7 +912,9 @@ function i(t, n) {
572
912
  }
573
913
  ]
574
914
  ],
915
+ // <EXPRESSION_COMMENT> SKIP:
575
916
  [e("expression_comment_token__id__")]: [
917
+ // < "-->" | "--]">
576
918
  [
577
919
  /--[>\]]/,
578
920
  {
@@ -580,10 +922,17 @@ function i(t, n) {
580
922
  next: "@pop"
581
923
  }
582
924
  ],
925
+ // < (~["-", ">", "]"])+ >
926
+ // < ">">
927
+ // < "]">
928
+ // < "-">
583
929
  [/[^\->\]]+|[>\]\-]/, { token: "comment" }]
584
930
  ],
585
931
  [e("terse_comment_token__id__")]: [
932
+ // <TERSE_COMMENT_END : "-->" | "--]">
586
933
  [o(/--(?:@close__id__)/), { token: "comment", next: "@popall" }],
934
+ // <KEEP_GOING : (~["<", "[", "-"])+>
935
+ // <LONE_LESS_THAN_OR_DASH : ["<", "[", "-"]>
587
936
  [/[^<\[\-]+|[<\[\-]/, { token: "comment" }]
588
937
  ]
589
938
  }
@@ -592,9 +941,12 @@ function i(t, n) {
592
941
  function A(t) {
593
942
  const n = i(a, t), _ = i(u, t), e = i(D, t);
594
943
  return {
944
+ // Angle and bracket syntax mode
945
+ // We switch to one of these once we have determined the mode
595
946
  ...n,
596
947
  ..._,
597
948
  ...e,
949
+ // Settings
598
950
  unicode: !0,
599
951
  includeLF: !1,
600
952
  start: `default_auto_${t.id}`,