@verbb/plugin-kit-react 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (593) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +31 -0
  4. package/dist/_virtual/_rolldown/runtime.js +34 -0
  5. package/dist/components/Button.d.ts +26 -0
  6. package/dist/components/Button.d.ts.map +1 -0
  7. package/dist/components/Button.js +148 -0
  8. package/dist/components/Button.js.map +1 -0
  9. package/dist/components/ButtonGroup.d.ts +11 -0
  10. package/dist/components/ButtonGroup.d.ts.map +1 -0
  11. package/dist/components/ButtonGroup.js +59 -0
  12. package/dist/components/ButtonGroup.js.map +1 -0
  13. package/dist/components/Calendar.d.ts +11 -0
  14. package/dist/components/Calendar.d.ts.map +1 -0
  15. package/dist/components/Calendar.js +133 -0
  16. package/dist/components/Calendar.js.map +1 -0
  17. package/dist/components/Checkbox.d.ts +5 -0
  18. package/dist/components/Checkbox.d.ts.map +1 -0
  19. package/dist/components/Checkbox.js +41 -0
  20. package/dist/components/Checkbox.js.map +1 -0
  21. package/dist/components/CheckboxInput.d.ts +14 -0
  22. package/dist/components/CheckboxInput.d.ts.map +1 -0
  23. package/dist/components/CheckboxInput.js +31 -0
  24. package/dist/components/CheckboxInput.js.map +1 -0
  25. package/dist/components/CheckboxSelect.d.ts +19 -0
  26. package/dist/components/CheckboxSelect.d.ts.map +1 -0
  27. package/dist/components/CheckboxSelect.js +63 -0
  28. package/dist/components/CheckboxSelect.js.map +1 -0
  29. package/dist/components/ColorInput.d.ts +14 -0
  30. package/dist/components/ColorInput.d.ts.map +1 -0
  31. package/dist/components/ColorInput.js +148 -0
  32. package/dist/components/ColorInput.js.map +1 -0
  33. package/dist/components/Combobox.d.ts +40 -0
  34. package/dist/components/Combobox.d.ts.map +1 -0
  35. package/dist/components/Combobox.js +393 -0
  36. package/dist/components/Combobox.js.map +1 -0
  37. package/dist/components/ComboboxInput.d.ts +28 -0
  38. package/dist/components/ComboboxInput.d.ts.map +1 -0
  39. package/dist/components/ComboboxInput.js +165 -0
  40. package/dist/components/ComboboxInput.js.map +1 -0
  41. package/dist/components/Command.d.ts +26 -0
  42. package/dist/components/Command.d.ts.map +1 -0
  43. package/dist/components/Command.js +94 -0
  44. package/dist/components/Command.js.map +1 -0
  45. package/dist/components/CopyButton.d.ts +9 -0
  46. package/dist/components/CopyButton.d.ts.map +1 -0
  47. package/dist/components/CopyButton.js +40 -0
  48. package/dist/components/CopyButton.js.map +1 -0
  49. package/dist/components/DatePicker.d.ts +9 -0
  50. package/dist/components/DatePicker.d.ts.map +1 -0
  51. package/dist/components/DatePicker.js +46 -0
  52. package/dist/components/DatePicker.js.map +1 -0
  53. package/dist/components/Dialog.d.ts +21 -0
  54. package/dist/components/Dialog.d.ts.map +1 -0
  55. package/dist/components/Dialog.js +179 -0
  56. package/dist/components/Dialog.js.map +1 -0
  57. package/dist/components/DropdownMenu.d.ts +47 -0
  58. package/dist/components/DropdownMenu.d.ts.map +1 -0
  59. package/dist/components/DropdownMenu.js +240 -0
  60. package/dist/components/DropdownMenu.js.map +1 -0
  61. package/dist/components/EditableTable.d.ts +28 -0
  62. package/dist/components/EditableTable.d.ts.map +1 -0
  63. package/dist/components/EditableTable.js +145 -0
  64. package/dist/components/EditableTable.js.map +1 -0
  65. package/dist/components/FadeIn.d.ts +12 -0
  66. package/dist/components/FadeIn.d.ts.map +1 -0
  67. package/dist/components/FadeIn.js +24 -0
  68. package/dist/components/FadeIn.js.map +1 -0
  69. package/dist/components/Input.d.ts +9 -0
  70. package/dist/components/Input.d.ts.map +1 -0
  71. package/dist/components/Input.js +43 -0
  72. package/dist/components/Input.js.map +1 -0
  73. package/dist/components/InputGroup.d.ts +20 -0
  74. package/dist/components/InputGroup.d.ts.map +1 -0
  75. package/dist/components/InputGroup.js +111 -0
  76. package/dist/components/InputGroup.js.map +1 -0
  77. package/dist/components/Label.d.ts +4 -0
  78. package/dist/components/Label.d.ts.map +1 -0
  79. package/dist/components/Label.js +15 -0
  80. package/dist/components/Label.js.map +1 -0
  81. package/dist/components/Lightswitch.d.ts +9 -0
  82. package/dist/components/Lightswitch.d.ts.map +1 -0
  83. package/dist/components/Lightswitch.js +56 -0
  84. package/dist/components/Lightswitch.js.map +1 -0
  85. package/dist/components/Markdown.d.ts +11 -0
  86. package/dist/components/Markdown.d.ts.map +1 -0
  87. package/dist/components/Markdown.js +46 -0
  88. package/dist/components/Markdown.js.map +1 -0
  89. package/dist/components/MenuButton.d.ts +40 -0
  90. package/dist/components/MenuButton.d.ts.map +1 -0
  91. package/dist/components/MenuButton.js +122 -0
  92. package/dist/components/MenuButton.js.map +1 -0
  93. package/dist/components/ModalTabs.d.ts +8 -0
  94. package/dist/components/ModalTabs.d.ts.map +1 -0
  95. package/dist/components/ModalTabs.js +37 -0
  96. package/dist/components/ModalTabs.js.map +1 -0
  97. package/dist/components/PaneTabs.d.ts +8 -0
  98. package/dist/components/PaneTabs.d.ts.map +1 -0
  99. package/dist/components/PaneTabs.js +37 -0
  100. package/dist/components/PaneTabs.js.map +1 -0
  101. package/dist/components/Popover.d.ts +12 -0
  102. package/dist/components/Popover.d.ts.map +1 -0
  103. package/dist/components/Popover.js +70 -0
  104. package/dist/components/Popover.js.map +1 -0
  105. package/dist/components/RadioGroup.d.ts +6 -0
  106. package/dist/components/RadioGroup.d.ts.map +1 -0
  107. package/dist/components/RadioGroup.js +34 -0
  108. package/dist/components/RadioGroup.js.map +1 -0
  109. package/dist/components/ScrollArea.d.ts +16 -0
  110. package/dist/components/ScrollArea.d.ts.map +1 -0
  111. package/dist/components/ScrollArea.js +47 -0
  112. package/dist/components/ScrollArea.js.map +1 -0
  113. package/dist/components/Select.d.ts +23 -0
  114. package/dist/components/Select.d.ts.map +1 -0
  115. package/dist/components/Select.js +205 -0
  116. package/dist/components/Select.js.map +1 -0
  117. package/dist/components/SelectInput.d.ts +33 -0
  118. package/dist/components/SelectInput.d.ts.map +1 -0
  119. package/dist/components/SelectInput.js +85 -0
  120. package/dist/components/SelectInput.js.map +1 -0
  121. package/dist/components/Separator.d.ts +4 -0
  122. package/dist/components/Separator.d.ts.map +1 -0
  123. package/dist/components/Separator.js +17 -0
  124. package/dist/components/Separator.js.map +1 -0
  125. package/dist/components/SlideUp.d.ts +12 -0
  126. package/dist/components/SlideUp.d.ts.map +1 -0
  127. package/dist/components/SlideUp.js +36 -0
  128. package/dist/components/SlideUp.js.map +1 -0
  129. package/dist/components/Slot.d.ts +6 -0
  130. package/dist/components/Slot.d.ts.map +1 -0
  131. package/dist/components/Slot.js +52 -0
  132. package/dist/components/Slot.js.map +1 -0
  133. package/dist/components/Spinner.d.ts +9 -0
  134. package/dist/components/Spinner.d.ts.map +1 -0
  135. package/dist/components/Spinner.js +43 -0
  136. package/dist/components/Spinner.js.map +1 -0
  137. package/dist/components/Status.d.ts +8 -0
  138. package/dist/components/Status.d.ts.map +1 -0
  139. package/dist/components/Status.js +55 -0
  140. package/dist/components/Status.js.map +1 -0
  141. package/dist/components/Table.d.ts +10 -0
  142. package/dist/components/Table.d.ts.map +1 -0
  143. package/dist/components/Table.js +64 -0
  144. package/dist/components/Table.js.map +1 -0
  145. package/dist/components/Tabs.d.ts +8 -0
  146. package/dist/components/Tabs.d.ts.map +1 -0
  147. package/dist/components/Tabs.js +37 -0
  148. package/dist/components/Tabs.js.map +1 -0
  149. package/dist/components/Textarea.d.ts +8 -0
  150. package/dist/components/Textarea.d.ts.map +1 -0
  151. package/dist/components/Textarea.js +26 -0
  152. package/dist/components/Textarea.js.map +1 -0
  153. package/dist/components/TimePicker.d.ts +9 -0
  154. package/dist/components/TimePicker.d.ts.map +1 -0
  155. package/dist/components/TimePicker.js +40 -0
  156. package/dist/components/TimePicker.js.map +1 -0
  157. package/dist/components/TiptapContent.d.ts +9 -0
  158. package/dist/components/TiptapContent.d.ts.map +1 -0
  159. package/dist/components/TiptapContent.js +24 -0
  160. package/dist/components/TiptapContent.js.map +1 -0
  161. package/dist/components/TiptapEditor.d.ts +41 -0
  162. package/dist/components/TiptapEditor.d.ts.map +1 -0
  163. package/dist/components/TiptapEditor.js +555 -0
  164. package/dist/components/TiptapEditor.js.map +1 -0
  165. package/dist/components/TiptapInput.d.ts +15 -0
  166. package/dist/components/TiptapInput.d.ts.map +1 -0
  167. package/dist/components/TiptapInput.js +138 -0
  168. package/dist/components/TiptapInput.js.map +1 -0
  169. package/dist/components/Toggle.d.ts +9 -0
  170. package/dist/components/Toggle.d.ts.map +1 -0
  171. package/dist/components/Toggle.js +48 -0
  172. package/dist/components/Toggle.js.map +1 -0
  173. package/dist/components/ToggleGroup.d.ts +11 -0
  174. package/dist/components/ToggleGroup.d.ts.map +1 -0
  175. package/dist/components/ToggleGroup.js +70 -0
  176. package/dist/components/ToggleGroup.js.map +1 -0
  177. package/dist/components/Tooltip.d.ts +9 -0
  178. package/dist/components/Tooltip.d.ts.map +1 -0
  179. package/dist/components/Tooltip.js +51 -0
  180. package/dist/components/Tooltip.js.map +1 -0
  181. package/dist/components/VirtualizedScrollArea.d.ts +25 -0
  182. package/dist/components/VirtualizedScrollArea.d.ts.map +1 -0
  183. package/dist/components/VirtualizedScrollArea.js +80 -0
  184. package/dist/components/VirtualizedScrollArea.js.map +1 -0
  185. package/dist/components/editable-table/RowDataCells.d.ts +3 -0
  186. package/dist/components/editable-table/RowDataCells.d.ts.map +1 -0
  187. package/dist/components/editable-table/RowDataCells.js +33 -0
  188. package/dist/components/editable-table/RowDataCells.js.map +1 -0
  189. package/dist/components/editable-table/TableCell.d.ts +13 -0
  190. package/dist/components/editable-table/TableCell.d.ts.map +1 -0
  191. package/dist/components/editable-table/TableCell.js +415 -0
  192. package/dist/components/editable-table/TableCell.js.map +1 -0
  193. package/dist/components/editable-table/TableRow.d.ts +3 -0
  194. package/dist/components/editable-table/TableRow.d.ts.map +1 -0
  195. package/dist/components/editable-table/TableRow.js +163 -0
  196. package/dist/components/editable-table/TableRow.js.map +1 -0
  197. package/dist/components/editable-table/helpers.d.ts +12 -0
  198. package/dist/components/editable-table/helpers.d.ts.map +1 -0
  199. package/dist/components/editable-table/helpers.js +23 -0
  200. package/dist/components/editable-table/helpers.js.map +1 -0
  201. package/dist/components/editable-table/index.d.ts +4 -0
  202. package/dist/components/editable-table/index.d.ts.map +1 -0
  203. package/dist/components/editable-table/index.js +4 -0
  204. package/dist/components/editable-table/types.d.ts +43 -0
  205. package/dist/components/editable-table/types.d.ts.map +1 -0
  206. package/dist/components/editable-table/types.js +0 -0
  207. package/dist/components/editable-table/useEditableTableCellChange.d.ts +17 -0
  208. package/dist/components/editable-table/useEditableTableCellChange.d.ts.map +1 -0
  209. package/dist/components/editable-table/useEditableTableCellChange.js +152 -0
  210. package/dist/components/editable-table/useEditableTableCellChange.js.map +1 -0
  211. package/dist/components/editable-table/useEditableTableDnd.d.ts +18 -0
  212. package/dist/components/editable-table/useEditableTableDnd.d.ts.map +1 -0
  213. package/dist/components/editable-table/useEditableTableDnd.js +55 -0
  214. package/dist/components/editable-table/useEditableTableDnd.js.map +1 -0
  215. package/dist/components/editable-table/useEditableTableRows.d.ts +17 -0
  216. package/dist/components/editable-table/useEditableTableRows.d.ts.map +1 -0
  217. package/dist/components/editable-table/useEditableTableRows.js +108 -0
  218. package/dist/components/editable-table/useEditableTableRows.js.map +1 -0
  219. package/dist/components/index.d.ts +45 -0
  220. package/dist/components/index.d.ts.map +1 -0
  221. package/dist/components/index.js +45 -0
  222. package/dist/components/tiptap/InlineVariablePickerPopover.d.ts +24 -0
  223. package/dist/components/tiptap/InlineVariablePickerPopover.d.ts.map +1 -0
  224. package/dist/components/tiptap/InlineVariablePickerPopover.js +63 -0
  225. package/dist/components/tiptap/InlineVariablePickerPopover.js.map +1 -0
  226. package/dist/components/tiptap/InsertLinkDialog.d.ts +14 -0
  227. package/dist/components/tiptap/InsertLinkDialog.d.ts.map +1 -0
  228. package/dist/components/tiptap/InsertLinkDialog.js +145 -0
  229. package/dist/components/tiptap/InsertLinkDialog.js.map +1 -0
  230. package/dist/components/tiptap/LinkBubbleMenu.d.ts +10 -0
  231. package/dist/components/tiptap/LinkBubbleMenu.d.ts.map +1 -0
  232. package/dist/components/tiptap/LinkBubbleMenu.js +106 -0
  233. package/dist/components/tiptap/LinkBubbleMenu.js.map +1 -0
  234. package/dist/components/tiptap/LinkDropdown.d.ts +53 -0
  235. package/dist/components/tiptap/LinkDropdown.d.ts.map +1 -0
  236. package/dist/components/tiptap/LinkDropdown.js +155 -0
  237. package/dist/components/tiptap/LinkDropdown.js.map +1 -0
  238. package/dist/components/tiptap/VariableCommandList.d.ts +37 -0
  239. package/dist/components/tiptap/VariableCommandList.d.ts.map +1 -0
  240. package/dist/components/tiptap/VariableCommandList.js +166 -0
  241. package/dist/components/tiptap/VariableCommandList.js.map +1 -0
  242. package/dist/components/tiptap/VariableDropdown.d.ts +33 -0
  243. package/dist/components/tiptap/VariableDropdown.d.ts.map +1 -0
  244. package/dist/components/tiptap/VariableDropdown.js +121 -0
  245. package/dist/components/tiptap/VariableDropdown.js.map +1 -0
  246. package/dist/components/tiptap/VariablePickerContext.d.ts +38 -0
  247. package/dist/components/tiptap/VariablePickerContext.d.ts.map +1 -0
  248. package/dist/components/tiptap/VariablePickerContext.js +30 -0
  249. package/dist/components/tiptap/VariablePickerContext.js.map +1 -0
  250. package/dist/components/tiptap/VariableTag.d.ts +6 -0
  251. package/dist/components/tiptap/VariableTag.d.ts.map +1 -0
  252. package/dist/components/tiptap/VariableTag.js +153 -0
  253. package/dist/components/tiptap/VariableTag.js.map +1 -0
  254. package/dist/components/tiptap/VariableTagView.d.ts +3 -0
  255. package/dist/components/tiptap/VariableTagView.d.ts.map +1 -0
  256. package/dist/components/tiptap/VariableTagView.js +445 -0
  257. package/dist/components/tiptap/VariableTagView.js.map +1 -0
  258. package/dist/components/tiptap/VariableTransformControls.d.ts +37 -0
  259. package/dist/components/tiptap/VariableTransformControls.d.ts.map +1 -0
  260. package/dist/components/tiptap/VariableTransformControls.js +157 -0
  261. package/dist/components/tiptap/VariableTransformControls.js.map +1 -0
  262. package/dist/components/tiptap/editorConfig.d.ts +15 -0
  263. package/dist/components/tiptap/editorConfig.d.ts.map +1 -0
  264. package/dist/components/tiptap/editorConfig.js +191 -0
  265. package/dist/components/tiptap/editorConfig.js.map +1 -0
  266. package/dist/components/tiptap/useInlineVariablePicker.d.ts +34 -0
  267. package/dist/components/tiptap/useInlineVariablePicker.d.ts.map +1 -0
  268. package/dist/components/tiptap/useInlineVariablePicker.js +240 -0
  269. package/dist/components/tiptap/useInlineVariablePicker.js.map +1 -0
  270. package/dist/components/tiptap/useVariablePicker.d.ts +28 -0
  271. package/dist/components/tiptap/useVariablePicker.d.ts.map +1 -0
  272. package/dist/components/tiptap/useVariablePicker.js +122 -0
  273. package/dist/components/tiptap/useVariablePicker.js.map +1 -0
  274. package/dist/components/tiptap/variablePickerUtils.d.ts +11 -0
  275. package/dist/components/tiptap/variablePickerUtils.d.ts.map +1 -0
  276. package/dist/components/tiptap/variablePickerUtils.js +63 -0
  277. package/dist/components/tiptap/variablePickerUtils.js.map +1 -0
  278. package/dist/components/tiptap/variableSerialization.d.ts +49 -0
  279. package/dist/components/tiptap/variableSerialization.d.ts.map +1 -0
  280. package/dist/components/tiptap/variableSerialization.js +250 -0
  281. package/dist/components/tiptap/variableSerialization.js.map +1 -0
  282. package/dist/css/core.css +288 -0
  283. package/dist/css/style.css +295 -0
  284. package/dist/forms/Field.d.ts +37 -0
  285. package/dist/forms/Field.d.ts.map +1 -0
  286. package/dist/forms/Field.js +159 -0
  287. package/dist/forms/Field.js.map +1 -0
  288. package/dist/forms/SchemaFormEngine.d.ts +23 -0
  289. package/dist/forms/SchemaFormEngine.d.ts.map +1 -0
  290. package/dist/forms/SchemaFormEngine.js +444 -0
  291. package/dist/forms/SchemaFormEngine.js.map +1 -0
  292. package/dist/forms/components/FieldWrap.d.ts +11 -0
  293. package/dist/forms/components/FieldWrap.d.ts.map +1 -0
  294. package/dist/forms/components/FieldWrap.js +84 -0
  295. package/dist/forms/components/FieldWrap.js.map +1 -0
  296. package/dist/forms/components/ModalTabs.d.ts +21 -0
  297. package/dist/forms/components/ModalTabs.d.ts.map +1 -0
  298. package/dist/forms/components/ModalTabs.js +84 -0
  299. package/dist/forms/components/ModalTabs.js.map +1 -0
  300. package/dist/forms/components/index.d.ts +3 -0
  301. package/dist/forms/components/index.d.ts.map +1 -0
  302. package/dist/forms/components/index.js +3 -0
  303. package/dist/forms/contexts/VariableCategoriesContext.d.ts +17 -0
  304. package/dist/forms/contexts/VariableCategoriesContext.d.ts.map +1 -0
  305. package/dist/forms/contexts/VariableCategoriesContext.js +18 -0
  306. package/dist/forms/contexts/VariableCategoriesContext.js.map +1 -0
  307. package/dist/forms/engine/FormStateStore.d.ts +24 -0
  308. package/dist/forms/engine/FormStateStore.d.ts.map +1 -0
  309. package/dist/forms/engine/FormStateStore.js +97 -0
  310. package/dist/forms/engine/FormStateStore.js.map +1 -0
  311. package/dist/forms/engine/SchemaIndex.d.ts +33 -0
  312. package/dist/forms/engine/SchemaIndex.d.ts.map +1 -0
  313. package/dist/forms/engine/SchemaIndex.js +21 -0
  314. package/dist/forms/engine/SchemaIndex.js.map +1 -0
  315. package/dist/forms/engine/ValidationEngine.d.ts +13 -0
  316. package/dist/forms/engine/ValidationEngine.d.ts.map +1 -0
  317. package/dist/forms/engine/ValidationEngine.js +155 -0
  318. package/dist/forms/engine/ValidationEngine.js.map +1 -0
  319. package/dist/forms/engine/buildGroupedMessage.d.ts +2 -0
  320. package/dist/forms/engine/buildGroupedMessage.d.ts.map +1 -0
  321. package/dist/forms/engine/buildGroupedMessage.js +20 -0
  322. package/dist/forms/engine/buildGroupedMessage.js.map +1 -0
  323. package/dist/forms/engine/context.d.ts +60 -0
  324. package/dist/forms/engine/context.d.ts.map +1 -0
  325. package/dist/forms/engine/context.js +12 -0
  326. package/dist/forms/engine/context.js.map +1 -0
  327. package/dist/forms/engine/rules/email.d.ts +2 -0
  328. package/dist/forms/engine/rules/email.d.ts.map +1 -0
  329. package/dist/forms/engine/rules/email.js +11 -0
  330. package/dist/forms/engine/rules/email.js.map +1 -0
  331. package/dist/forms/engine/rules/emailOrVariable.d.ts +2 -0
  332. package/dist/forms/engine/rules/emailOrVariable.d.ts.map +1 -0
  333. package/dist/forms/engine/rules/emailOrVariable.js +13 -0
  334. package/dist/forms/engine/rules/emailOrVariable.js.map +1 -0
  335. package/dist/forms/engine/rules/handle.d.ts +2 -0
  336. package/dist/forms/engine/rules/handle.d.ts.map +1 -0
  337. package/dist/forms/engine/rules/handle.js +12 -0
  338. package/dist/forms/engine/rules/handle.js.map +1 -0
  339. package/dist/forms/engine/rules/index.d.ts +9 -0
  340. package/dist/forms/engine/rules/index.d.ts.map +1 -0
  341. package/dist/forms/engine/rules/index.js +35 -0
  342. package/dist/forms/engine/rules/index.js.map +1 -0
  343. package/dist/forms/engine/rules/max.d.ts +2 -0
  344. package/dist/forms/engine/rules/max.d.ts.map +1 -0
  345. package/dist/forms/engine/rules/max.js +16 -0
  346. package/dist/forms/engine/rules/max.js.map +1 -0
  347. package/dist/forms/engine/rules/min.d.ts +2 -0
  348. package/dist/forms/engine/rules/min.d.ts.map +1 -0
  349. package/dist/forms/engine/rules/min.js +16 -0
  350. package/dist/forms/engine/rules/min.js.map +1 -0
  351. package/dist/forms/engine/rules/required.d.ts +2 -0
  352. package/dist/forms/engine/rules/required.d.ts.map +1 -0
  353. package/dist/forms/engine/rules/required.js +11 -0
  354. package/dist/forms/engine/rules/required.js.map +1 -0
  355. package/dist/forms/engine/rules/uniqueHandle.d.ts +9 -0
  356. package/dist/forms/engine/rules/uniqueHandle.d.ts.map +1 -0
  357. package/dist/forms/engine/rules/uniqueHandle.js +95 -0
  358. package/dist/forms/engine/rules/uniqueHandle.js.map +1 -0
  359. package/dist/forms/engine/rules/utils.d.ts +3 -0
  360. package/dist/forms/engine/rules/utils.d.ts.map +1 -0
  361. package/dist/forms/engine/rules/utils.js +21 -0
  362. package/dist/forms/engine/rules/utils.js.map +1 -0
  363. package/dist/forms/fields/CalculationsField.d.ts +24 -0
  364. package/dist/forms/fields/CalculationsField.d.ts.map +1 -0
  365. package/dist/forms/fields/CalculationsField.js +215 -0
  366. package/dist/forms/fields/CalculationsField.js.map +1 -0
  367. package/dist/forms/fields/CalculationsToolbar.d.ts +17 -0
  368. package/dist/forms/fields/CalculationsToolbar.d.ts.map +1 -0
  369. package/dist/forms/fields/CalculationsToolbar.js +130 -0
  370. package/dist/forms/fields/CalculationsToolbar.js.map +1 -0
  371. package/dist/forms/fields/CheckboxSelectField.d.ts +19 -0
  372. package/dist/forms/fields/CheckboxSelectField.d.ts.map +1 -0
  373. package/dist/forms/fields/CheckboxSelectField.js +30 -0
  374. package/dist/forms/fields/CheckboxSelectField.js.map +1 -0
  375. package/dist/forms/fields/ColorField.d.ts +15 -0
  376. package/dist/forms/fields/ColorField.d.ts.map +1 -0
  377. package/dist/forms/fields/ColorField.js +30 -0
  378. package/dist/forms/fields/ColorField.js.map +1 -0
  379. package/dist/forms/fields/ComboboxField.d.ts +23 -0
  380. package/dist/forms/fields/ComboboxField.d.ts.map +1 -0
  381. package/dist/forms/fields/ComboboxField.js +38 -0
  382. package/dist/forms/fields/ComboboxField.js.map +1 -0
  383. package/dist/forms/fields/DateTimeField.d.ts +14 -0
  384. package/dist/forms/fields/DateTimeField.d.ts.map +1 -0
  385. package/dist/forms/fields/DateTimeField.js +53 -0
  386. package/dist/forms/fields/DateTimeField.js.map +1 -0
  387. package/dist/forms/fields/EditableTableField.d.ts +22 -0
  388. package/dist/forms/fields/EditableTableField.d.ts.map +1 -0
  389. package/dist/forms/fields/EditableTableField.js +37 -0
  390. package/dist/forms/fields/EditableTableField.js.map +1 -0
  391. package/dist/forms/fields/ElementSelectField.d.ts +20 -0
  392. package/dist/forms/fields/ElementSelectField.d.ts.map +1 -0
  393. package/dist/forms/fields/ElementSelectField.js +215 -0
  394. package/dist/forms/fields/ElementSelectField.js.map +1 -0
  395. package/dist/forms/fields/GroupField.d.ts +19 -0
  396. package/dist/forms/fields/GroupField.d.ts.map +1 -0
  397. package/dist/forms/fields/GroupField.js +50 -0
  398. package/dist/forms/fields/GroupField.js.map +1 -0
  399. package/dist/forms/fields/HandleField.d.ts +20 -0
  400. package/dist/forms/fields/HandleField.d.ts.map +1 -0
  401. package/dist/forms/fields/HandleField.js +70 -0
  402. package/dist/forms/fields/HandleField.js.map +1 -0
  403. package/dist/forms/fields/LightswitchField.d.ts +14 -0
  404. package/dist/forms/fields/LightswitchField.d.ts.map +1 -0
  405. package/dist/forms/fields/LightswitchField.js +29 -0
  406. package/dist/forms/fields/LightswitchField.js.map +1 -0
  407. package/dist/forms/fields/ListField.d.ts +17 -0
  408. package/dist/forms/fields/ListField.d.ts.map +1 -0
  409. package/dist/forms/fields/ListField.js +51 -0
  410. package/dist/forms/fields/ListField.js.map +1 -0
  411. package/dist/forms/fields/NumberField.d.ts +17 -0
  412. package/dist/forms/fields/NumberField.d.ts.map +1 -0
  413. package/dist/forms/fields/NumberField.js +33 -0
  414. package/dist/forms/fields/NumberField.js.map +1 -0
  415. package/dist/forms/fields/RadioGroupField.d.ts +25 -0
  416. package/dist/forms/fields/RadioGroupField.d.ts.map +1 -0
  417. package/dist/forms/fields/RadioGroupField.js +102 -0
  418. package/dist/forms/fields/RadioGroupField.js.map +1 -0
  419. package/dist/forms/fields/RichTextField.d.ts +23 -0
  420. package/dist/forms/fields/RichTextField.d.ts.map +1 -0
  421. package/dist/forms/fields/RichTextField.js +50 -0
  422. package/dist/forms/fields/RichTextField.js.map +1 -0
  423. package/dist/forms/fields/SelectField.d.ts +25 -0
  424. package/dist/forms/fields/SelectField.d.ts.map +1 -0
  425. package/dist/forms/fields/SelectField.js +73 -0
  426. package/dist/forms/fields/SelectField.js.map +1 -0
  427. package/dist/forms/fields/StaticTableField.d.ts +34 -0
  428. package/dist/forms/fields/StaticTableField.d.ts.map +1 -0
  429. package/dist/forms/fields/StaticTableField.js +128 -0
  430. package/dist/forms/fields/StaticTableField.js.map +1 -0
  431. package/dist/forms/fields/TextField.d.ts +16 -0
  432. package/dist/forms/fields/TextField.d.ts.map +1 -0
  433. package/dist/forms/fields/TextField.js +31 -0
  434. package/dist/forms/fields/TextField.js.map +1 -0
  435. package/dist/forms/fields/TextareaField.d.ts +17 -0
  436. package/dist/forms/fields/TextareaField.d.ts.map +1 -0
  437. package/dist/forms/fields/TextareaField.js +32 -0
  438. package/dist/forms/fields/TextareaField.js.map +1 -0
  439. package/dist/forms/fields/VariablePickerField.d.ts +21 -0
  440. package/dist/forms/fields/VariablePickerField.d.ts.map +1 -0
  441. package/dist/forms/fields/VariablePickerField.js +49 -0
  442. package/dist/forms/fields/VariablePickerField.js.map +1 -0
  443. package/dist/forms/index.d.ts +8 -0
  444. package/dist/forms/index.d.ts.map +1 -0
  445. package/dist/forms/index.js +10 -0
  446. package/dist/forms/registry.d.ts +8 -0
  447. package/dist/forms/registry.d.ts.map +1 -0
  448. package/dist/forms/registry.js +76 -0
  449. package/dist/forms/registry.js.map +1 -0
  450. package/dist/forms/store/element-store.d.ts +11 -0
  451. package/dist/forms/store/element-store.d.ts.map +1 -0
  452. package/dist/forms/store/element-store.js +41 -0
  453. package/dist/forms/store/element-store.js.map +1 -0
  454. package/dist/forms/useEditableTableFieldBinding.d.ts +13 -0
  455. package/dist/forms/useEditableTableFieldBinding.d.ts.map +1 -0
  456. package/dist/forms/useEditableTableFieldBinding.js +91 -0
  457. package/dist/forms/useEditableTableFieldBinding.js.map +1 -0
  458. package/dist/forms/useEngineField.d.ts +9 -0
  459. package/dist/forms/useEngineField.d.ts.map +1 -0
  460. package/dist/forms/useEngineField.js +32 -0
  461. package/dist/forms/useEngineField.js.map +1 -0
  462. package/dist/hooks/index.d.ts +3 -0
  463. package/dist/hooks/index.d.ts.map +1 -0
  464. package/dist/hooks/index.js +3 -0
  465. package/dist/hooks/useKeyboardShortcuts.d.ts +14 -0
  466. package/dist/hooks/useKeyboardShortcuts.d.ts.map +1 -0
  467. package/dist/hooks/useKeyboardShortcuts.js +67 -0
  468. package/dist/hooks/useKeyboardShortcuts.js.map +1 -0
  469. package/dist/hooks/useTranslation.d.ts +3 -0
  470. package/dist/hooks/useTranslation.d.ts.map +1 -0
  471. package/dist/hooks/useTranslation.js +12 -0
  472. package/dist/hooks/useTranslation.js.map +1 -0
  473. package/dist/index.d.ts +2 -0
  474. package/dist/index.d.ts.map +1 -0
  475. package/dist/index.js +2 -0
  476. package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +15 -0
  477. package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js.map +1 -0
  478. package/dist/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +15 -0
  479. package/dist/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js.map +1 -0
  480. package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js +13 -0
  481. package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js.map +1 -0
  482. package/dist/node_modules/@babel/runtime/helpers/createClass.js +21 -0
  483. package/dist/node_modules/@babel/runtime/helpers/createClass.js.map +1 -0
  484. package/dist/node_modules/@babel/runtime/helpers/defineProperty.js +20 -0
  485. package/dist/node_modules/@babel/runtime/helpers/defineProperty.js.map +1 -0
  486. package/dist/node_modules/@babel/runtime/helpers/interopRequireDefault.js +13 -0
  487. package/dist/node_modules/@babel/runtime/helpers/interopRequireDefault.js.map +1 -0
  488. package/dist/node_modules/@babel/runtime/helpers/iterableToArray.js +13 -0
  489. package/dist/node_modules/@babel/runtime/helpers/iterableToArray.js.map +1 -0
  490. package/dist/node_modules/@babel/runtime/helpers/nonIterableSpread.js +13 -0
  491. package/dist/node_modules/@babel/runtime/helpers/nonIterableSpread.js.map +1 -0
  492. package/dist/node_modules/@babel/runtime/helpers/toConsumableArray.js +21 -0
  493. package/dist/node_modules/@babel/runtime/helpers/toConsumableArray.js.map +1 -0
  494. package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js +22 -0
  495. package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js.map +1 -0
  496. package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js +18 -0
  497. package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js.map +1 -0
  498. package/dist/node_modules/@babel/runtime/helpers/typeof.js +18 -0
  499. package/dist/node_modules/@babel/runtime/helpers/typeof.js.map +1 -0
  500. package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +19 -0
  501. package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js.map +1 -0
  502. package/dist/node_modules/jexl/dist/Expression.js +84 -0
  503. package/dist/node_modules/jexl/dist/Expression.js.map +1 -0
  504. package/dist/node_modules/jexl/dist/Jexl.js +165 -0
  505. package/dist/node_modules/jexl/dist/Jexl.js.map +1 -0
  506. package/dist/node_modules/jexl/dist/Lexer.js +152 -0
  507. package/dist/node_modules/jexl/dist/Lexer.js.map +1 -0
  508. package/dist/node_modules/jexl/dist/PromiseSync.js +87 -0
  509. package/dist/node_modules/jexl/dist/PromiseSync.js.map +1 -0
  510. package/dist/node_modules/jexl/dist/evaluator/Evaluator.js +98 -0
  511. package/dist/node_modules/jexl/dist/evaluator/Evaluator.js.map +1 -0
  512. package/dist/node_modules/jexl/dist/evaluator/handlers.js +162 -0
  513. package/dist/node_modules/jexl/dist/evaluator/handlers.js.map +1 -0
  514. package/dist/node_modules/jexl/dist/grammar.js +195 -0
  515. package/dist/node_modules/jexl/dist/grammar.js.map +1 -0
  516. package/dist/node_modules/jexl/dist/parser/Parser.js +135 -0
  517. package/dist/node_modules/jexl/dist/parser/Parser.js.map +1 -0
  518. package/dist/node_modules/jexl/dist/parser/handlers.js +205 -0
  519. package/dist/node_modules/jexl/dist/parser/handlers.js.map +1 -0
  520. package/dist/node_modules/jexl/dist/parser/states.js +158 -0
  521. package/dist/node_modules/jexl/dist/parser/states.js.map +1 -0
  522. package/dist/types/global.d.d.ts +1 -0
  523. package/dist/types/global.d.js +0 -0
  524. package/dist/utils/classes.d.ts +18 -0
  525. package/dist/utils/classes.d.ts.map +1 -0
  526. package/dist/utils/classes.js +25 -0
  527. package/dist/utils/classes.js.map +1 -0
  528. package/dist/utils/config.d.ts +14 -0
  529. package/dist/utils/config.d.ts.map +1 -0
  530. package/dist/utils/config.js +16 -0
  531. package/dist/utils/config.js.map +1 -0
  532. package/dist/utils/craftHostBridge.d.ts +16 -0
  533. package/dist/utils/craftHostBridge.d.ts.map +1 -0
  534. package/dist/utils/craftHostBridge.js +28 -0
  535. package/dist/utils/craftHostBridge.js.map +1 -0
  536. package/dist/utils/handle.d.ts +10 -0
  537. package/dist/utils/handle.d.ts.map +1 -0
  538. package/dist/utils/handle.js +51 -0
  539. package/dist/utils/handle.js.map +1 -0
  540. package/dist/utils/hostBridge.d.ts +40 -0
  541. package/dist/utils/hostBridge.d.ts.map +1 -0
  542. package/dist/utils/hostBridge.js +35 -0
  543. package/dist/utils/hostBridge.js.map +1 -0
  544. package/dist/utils/index.d.ts +18 -0
  545. package/dist/utils/index.d.ts.map +1 -0
  546. package/dist/utils/index.js +66 -0
  547. package/dist/utils/index.js.map +1 -0
  548. package/dist/utils/portal.d.ts +17 -0
  549. package/dist/utils/portal.d.ts.map +1 -0
  550. package/dist/utils/portal.js +51 -0
  551. package/dist/utils/portal.js.map +1 -0
  552. package/dist/utils/schema.d.ts +17 -0
  553. package/dist/utils/schema.d.ts.map +1 -0
  554. package/dist/utils/schema.js +56 -0
  555. package/dist/utils/schema.js.map +1 -0
  556. package/dist/utils/schemaFieldNames.d.ts +2 -0
  557. package/dist/utils/schemaFieldNames.d.ts.map +1 -0
  558. package/dist/utils/schemaFieldNames.js +16 -0
  559. package/dist/utils/schemaFieldNames.js.map +1 -0
  560. package/dist/utils/schemaIndex.d.ts +6 -0
  561. package/dist/utils/schemaIndex.d.ts.map +1 -0
  562. package/dist/utils/schemaIndex.js +31 -0
  563. package/dist/utils/schemaIndex.js.map +1 -0
  564. package/dist/utils/schemaIndexCache.d.ts +6 -0
  565. package/dist/utils/schemaIndexCache.d.ts.map +1 -0
  566. package/dist/utils/schemaIndexCache.js +32 -0
  567. package/dist/utils/schemaIndexCache.js.map +1 -0
  568. package/dist/utils/schemaNormalize.d.ts +13 -0
  569. package/dist/utils/schemaNormalize.d.ts.map +1 -0
  570. package/dist/utils/schemaNormalize.js +17 -0
  571. package/dist/utils/schemaNormalize.js.map +1 -0
  572. package/dist/utils/store.d.ts +7 -0
  573. package/dist/utils/store.d.ts.map +1 -0
  574. package/dist/utils/store.js +6 -0
  575. package/dist/utils/store.js.map +1 -0
  576. package/dist/utils/timeOptions.d.ts +6 -0
  577. package/dist/utils/timeOptions.d.ts.map +1 -0
  578. package/dist/utils/timeOptions.js +42 -0
  579. package/dist/utils/timeOptions.js.map +1 -0
  580. package/dist/utils/tiptap.d.ts +13 -0
  581. package/dist/utils/tiptap.d.ts.map +1 -0
  582. package/dist/utils/tiptap.js +39 -0
  583. package/dist/utils/tiptap.js.map +1 -0
  584. package/dist/utils/translation.d.ts +5 -0
  585. package/dist/utils/translation.d.ts.map +1 -0
  586. package/dist/utils/translation.js +21 -0
  587. package/dist/utils/translation.js.map +1 -0
  588. package/dist/utils/validation.d.ts +4 -0
  589. package/dist/utils/validation.d.ts.map +1 -0
  590. package/dist/utils/validation.js +253 -0
  591. package/dist/utils/validation.js.map +1 -0
  592. package/package.json +167 -0
  593. package/vite-dev.mjs +56 -0
@@ -0,0 +1,98 @@
1
+ import { __commonJSMin } from "../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_interopRequireDefault } from "../../../@babel/runtime/helpers/interopRequireDefault.js";
3
+ import { require_classCallCheck } from "../../../@babel/runtime/helpers/classCallCheck.js";
4
+ import { require_createClass } from "../../../@babel/runtime/helpers/createClass.js";
5
+ import { require_handlers } from "./handlers.js";
6
+ //#region ../node_modules/jexl/dist/evaluator/Evaluator.js
7
+ var require_Evaluator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8
+ var _interopRequireDefault = require_interopRequireDefault();
9
+ var _classCallCheck2 = _interopRequireDefault(require_classCallCheck());
10
+ var _createClass2 = _interopRequireDefault(require_createClass());
11
+ var handlers = require_handlers();
12
+ module.exports = /* @__PURE__ */ function() {
13
+ function Evaluator(grammar, context, relativeContext) {
14
+ var promise = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : Promise;
15
+ (0, _classCallCheck2.default)(this, Evaluator);
16
+ this._grammar = grammar;
17
+ this._context = context || {};
18
+ this._relContext = relativeContext || this._context;
19
+ this.Promise = promise;
20
+ }
21
+ /**
22
+ * Evaluates an expression tree within the configured context.
23
+ * @param {{}} ast An expression tree object
24
+ * @returns {Promise<*>} resolves with the resulting value of the expression.
25
+ */
26
+ (0, _createClass2.default)(Evaluator, [
27
+ {
28
+ key: "eval",
29
+ value: function _eval(ast) {
30
+ var _this = this;
31
+ return this.Promise.resolve().then(function() {
32
+ return handlers[ast.type].call(_this, ast);
33
+ });
34
+ }
35
+ },
36
+ {
37
+ key: "evalArray",
38
+ value: function evalArray(arr) {
39
+ var _this2 = this;
40
+ return this.Promise.all(arr.map(function(elem) {
41
+ return _this2.eval(elem);
42
+ }));
43
+ }
44
+ },
45
+ {
46
+ key: "evalMap",
47
+ value: function evalMap(map) {
48
+ var _this3 = this;
49
+ var keys = Object.keys(map);
50
+ var result = {};
51
+ var asts = keys.map(function(key) {
52
+ return _this3.eval(map[key]);
53
+ });
54
+ return this.Promise.all(asts).then(function(vals) {
55
+ vals.forEach(function(val, idx) {
56
+ result[keys[idx]] = val;
57
+ });
58
+ return result;
59
+ });
60
+ }
61
+ },
62
+ {
63
+ key: "_filterRelative",
64
+ value: function _filterRelative(subject, expr) {
65
+ var _this4 = this;
66
+ var promises = [];
67
+ if (!Array.isArray(subject)) subject = subject === void 0 ? [] : [subject];
68
+ subject.forEach(function(elem) {
69
+ var evalInst = new Evaluator(_this4._grammar, _this4._context, elem, _this4.Promise);
70
+ promises.push(evalInst.eval(expr));
71
+ });
72
+ return this.Promise.all(promises).then(function(values) {
73
+ var results = [];
74
+ values.forEach(function(value, idx) {
75
+ if (value) results.push(subject[idx]);
76
+ });
77
+ return results;
78
+ });
79
+ }
80
+ },
81
+ {
82
+ key: "_filterStatic",
83
+ value: function _filterStatic(subject, expr) {
84
+ return this.eval(expr).then(function(res) {
85
+ if (typeof res === "boolean") return res ? subject : void 0;
86
+ return subject[res];
87
+ });
88
+ }
89
+ }
90
+ ]);
91
+ return Evaluator;
92
+ }();
93
+ }));
94
+ //#endregion
95
+ export default require_Evaluator();
96
+ export { require_Evaluator };
97
+
98
+ //# sourceMappingURL=Evaluator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Evaluator.js","names":[],"sources":["../../../../../../node_modules/jexl/dist/evaluator/Evaluator.js"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\n/*\n * Jexl\n * Copyright 2020 Tom Shawver\n */\nvar handlers = require('./handlers');\n/**\n * The Evaluator takes a Jexl expression tree as generated by the\n * {@link Parser} and calculates its value within a given context. The\n * collection of transforms, context, and a relative context to be used as the\n * root for relative identifiers, are all specific to an Evaluator instance.\n * When any of these things change, a new instance is required. However, a\n * single instance can be used to simultaneously evaluate many different\n * expressions, and does not have to be reinstantiated for each.\n * @param {{}} grammar A grammar object against which to evaluate the expression\n * tree\n * @param {{}} [context] A map of variable keys to their values. This will be\n * accessed to resolve the value of each non-relative identifier. Any\n * Promise values will be passed to the expression as their resolved\n * value.\n * @param {{}|Array<{}|Array>} [relativeContext] A map or array to be accessed\n * to resolve the value of a relative identifier.\n * @param {function} promise A constructor for the Promise class to be used;\n * probably either Promise or PromiseSync.\n */\n\n\nvar Evaluator = /*#__PURE__*/function () {\n function Evaluator(grammar, context, relativeContext) {\n var promise = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Promise;\n (0, _classCallCheck2.default)(this, Evaluator);\n this._grammar = grammar;\n this._context = context || {};\n this._relContext = relativeContext || this._context;\n this.Promise = promise;\n }\n /**\n * Evaluates an expression tree within the configured context.\n * @param {{}} ast An expression tree object\n * @returns {Promise<*>} resolves with the resulting value of the expression.\n */\n\n\n (0, _createClass2.default)(Evaluator, [{\n key: \"eval\",\n value: function _eval(ast) {\n var _this = this;\n\n return this.Promise.resolve().then(function () {\n return handlers[ast.type].call(_this, ast);\n });\n }\n /**\n * Simultaneously evaluates each expression within an array, and delivers the\n * response as an array with the resulting values at the same indexes as their\n * originating expressions.\n * @param {Array<string>} arr An array of expression strings to be evaluated\n * @returns {Promise<Array<{}>>} resolves with the result array\n */\n\n }, {\n key: \"evalArray\",\n value: function evalArray(arr) {\n var _this2 = this;\n\n return this.Promise.all(arr.map(function (elem) {\n return _this2.eval(elem);\n }));\n }\n /**\n * Simultaneously evaluates each expression within a map, and delivers the\n * response as a map with the same keys, but with the evaluated result for each\n * as their value.\n * @param {{}} map A map of expression names to expression trees to be\n * evaluated\n * @returns {Promise<{}>} resolves with the result map.\n */\n\n }, {\n key: \"evalMap\",\n value: function evalMap(map) {\n var _this3 = this;\n\n var keys = Object.keys(map);\n var result = {};\n var asts = keys.map(function (key) {\n return _this3.eval(map[key]);\n });\n return this.Promise.all(asts).then(function (vals) {\n vals.forEach(function (val, idx) {\n result[keys[idx]] = val;\n });\n return result;\n });\n }\n /**\n * Applies a filter expression with relative identifier elements to a subject.\n * The intent is for the subject to be an array of subjects that will be\n * individually used as the relative context against the provided expression\n * tree. Only the elements whose expressions result in a truthy value will be\n * included in the resulting array.\n *\n * If the subject is not an array of values, it will be converted to a single-\n * element array before running the filter.\n * @param {*} subject The value to be filtered usually an array. If this value is\n * not an array, it will be converted to an array with this value as the\n * only element.\n * @param {{}} expr The expression tree to run against each subject. If the\n * tree evaluates to a truthy result, then the value will be included in\n * the returned array otherwise, it will be eliminated.\n * @returns {Promise<Array>} resolves with an array of values that passed the\n * expression filter.\n * @private\n */\n\n }, {\n key: \"_filterRelative\",\n value: function _filterRelative(subject, expr) {\n var _this4 = this;\n\n var promises = [];\n\n if (!Array.isArray(subject)) {\n subject = subject === undefined ? [] : [subject];\n }\n\n subject.forEach(function (elem) {\n var evalInst = new Evaluator(_this4._grammar, _this4._context, elem, _this4.Promise);\n promises.push(evalInst.eval(expr));\n });\n return this.Promise.all(promises).then(function (values) {\n var results = [];\n values.forEach(function (value, idx) {\n if (value) {\n results.push(subject[idx]);\n }\n });\n return results;\n });\n }\n /**\n * Applies a static filter expression to a subject value. If the filter\n * expression evaluates to boolean true, the subject is returned if false,\n * undefined.\n *\n * For any other resulting value of the expression, this function will attempt\n * to respond with the property at that name or index of the subject.\n * @param {*} subject The value to be filtered. Usually an Array (for which\n * the expression would generally resolve to a numeric index) or an\n * Object (for which the expression would generally resolve to a string\n * indicating a property name)\n * @param {{}} expr The expression tree to run against the subject\n * @returns {Promise<*>} resolves with the value of the drill-down.\n * @private\n */\n\n }, {\n key: \"_filterStatic\",\n value: function _filterStatic(subject, expr) {\n return this.eval(expr).then(function (res) {\n if (typeof res === 'boolean') {\n return res ? subject : undefined;\n }\n\n return subject[res];\n });\n }\n }]);\n return Evaluator;\n}();\n\nmodule.exports = Evaluator;"],"x_google_ignoreList":[0],"mappings":";;;;;;;CAEA,IAAI,yBAAA,+BAAA;CAEJ,IAAI,mBAAmB,uBAAA,wBAAA,CAAwE;CAE/F,IAAI,gBAAgB,uBAAA,qBAAA,CAAqE;CAMzF,IAAI,WAAA,kBAAA;AAsKJ,QAAO,UAAU,gBAhJY,WAAY;EACvC,SAAS,UAAU,SAAS,SAAS,iBAAiB;GACpD,IAAI,UAAU,UAAU,SAAS,KAAK,UAAU,OAAO,KAAA,IAAY,UAAU,KAAK;AAClF,IAAC,GAAG,iBAAiB,SAAS,MAAM,UAAU;AAC9C,QAAK,WAAW;AAChB,QAAK,WAAW,WAAW,EAAE;AAC7B,QAAK,cAAc,mBAAmB,KAAK;AAC3C,QAAK,UAAU;;;;;;;AASjB,GAAC,GAAG,cAAc,SAAS,WAAW;GAAC;IACrC,KAAK;IACL,OAAO,SAAS,MAAM,KAAK;KACzB,IAAI,QAAQ;AAEZ,YAAO,KAAK,QAAQ,SAAS,CAAC,KAAK,WAAY;AAC7C,aAAO,SAAS,IAAI,MAAM,KAAK,OAAO,IAAI;OAC1C;;IAUL;GAAE;IACD,KAAK;IACL,OAAO,SAAS,UAAU,KAAK;KAC7B,IAAI,SAAS;AAEb,YAAO,KAAK,QAAQ,IAAI,IAAI,IAAI,SAAU,MAAM;AAC9C,aAAO,OAAO,KAAK,KAAK;OACxB,CAAC;;IAWN;GAAE;IACD,KAAK;IACL,OAAO,SAAS,QAAQ,KAAK;KAC3B,IAAI,SAAS;KAEb,IAAI,OAAO,OAAO,KAAK,IAAI;KAC3B,IAAI,SAAS,EAAE;KACf,IAAI,OAAO,KAAK,IAAI,SAAU,KAAK;AACjC,aAAO,OAAO,KAAK,IAAI,KAAK;OAC5B;AACF,YAAO,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,SAAU,MAAM;AACjD,WAAK,QAAQ,SAAU,KAAK,KAAK;AAC/B,cAAO,KAAK,QAAQ;QACpB;AACF,aAAO;OACP;;IAsBL;GAAE;IACD,KAAK;IACL,OAAO,SAAS,gBAAgB,SAAS,MAAM;KAC7C,IAAI,SAAS;KAEb,IAAI,WAAW,EAAE;AAEjB,SAAI,CAAC,MAAM,QAAQ,QAAQ,CACzB,WAAU,YAAY,KAAA,IAAY,EAAE,GAAG,CAAC,QAAQ;AAGlD,aAAQ,QAAQ,SAAU,MAAM;MAC9B,IAAI,WAAW,IAAI,UAAU,OAAO,UAAU,OAAO,UAAU,MAAM,OAAO,QAAQ;AACpF,eAAS,KAAK,SAAS,KAAK,KAAK,CAAC;OAClC;AACF,YAAO,KAAK,QAAQ,IAAI,SAAS,CAAC,KAAK,SAAU,QAAQ;MACvD,IAAI,UAAU,EAAE;AAChB,aAAO,QAAQ,SAAU,OAAO,KAAK;AACnC,WAAI,MACF,SAAQ,KAAK,QAAQ,KAAK;QAE5B;AACF,aAAO;OACP;;IAkBL;GAAE;IACD,KAAK;IACL,OAAO,SAAS,cAAc,SAAS,MAAM;AAC3C,YAAO,KAAK,KAAK,KAAK,CAAC,KAAK,SAAU,KAAK;AACzC,UAAI,OAAO,QAAQ,UACjB,QAAO,MAAM,UAAU,KAAA;AAGzB,aAAO,QAAQ;OACf;;IAEL;GAAC,CAAC;AACH,SAAO;IAGQ"}
@@ -0,0 +1,162 @@
1
+ import { __commonJSMin } from "../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_interopRequireDefault } from "../../../@babel/runtime/helpers/interopRequireDefault.js";
3
+ import { require_toConsumableArray } from "../../../@babel/runtime/helpers/toConsumableArray.js";
4
+ //#region ../node_modules/jexl/dist/evaluator/handlers.js
5
+ var require_handlers = /* @__PURE__ */ __commonJSMin(((exports) => {
6
+ var _toConsumableArray2 = require_interopRequireDefault()(require_toConsumableArray());
7
+ var poolNames = {
8
+ functions: "Jexl Function",
9
+ transforms: "Transform"
10
+ };
11
+ /**
12
+ * Evaluates an ArrayLiteral by returning its value, with each element
13
+ * independently run through the evaluator.
14
+ * @param {{type: 'ObjectLiteral', value: <{}>}} ast An expression tree with an
15
+ * ObjectLiteral as the top node
16
+ * @returns {Promise.<[]>} resolves to a map contained evaluated values.
17
+ * @private
18
+ */
19
+ exports.ArrayLiteral = function(ast) {
20
+ return this.evalArray(ast.value);
21
+ };
22
+ /**
23
+ * Evaluates a BinaryExpression node by running the Grammar's evaluator for
24
+ * the given operator. Note that binary expressions support two types of
25
+ * evaluators: `eval` is called with the left and right operands pre-evaluated.
26
+ * `evalOnDemand`, if it exists, will be called with the left and right operands
27
+ * each individually wrapped in an object with an "eval" function that returns
28
+ * a promise with the resulting value. This allows the binary expression to
29
+ * evaluate the operands conditionally.
30
+ * @param {{type: 'BinaryExpression', operator: <string>, left: {},
31
+ * right: {}}} ast An expression tree with a BinaryExpression as the top
32
+ * node
33
+ * @returns {Promise<*>} resolves with the value of the BinaryExpression.
34
+ * @private
35
+ */
36
+ exports.BinaryExpression = function(ast) {
37
+ var _this = this;
38
+ var grammarOp = this._grammar.elements[ast.operator];
39
+ if (grammarOp.evalOnDemand) {
40
+ var wrap = function wrap(subAst) {
41
+ return { eval: function _eval() {
42
+ return _this.eval(subAst);
43
+ } };
44
+ };
45
+ return grammarOp.evalOnDemand(wrap(ast.left), wrap(ast.right));
46
+ }
47
+ return this.Promise.all([this.eval(ast.left), this.eval(ast.right)]).then(function(arr) {
48
+ return grammarOp.eval(arr[0], arr[1]);
49
+ });
50
+ };
51
+ /**
52
+ * Evaluates a ConditionalExpression node by first evaluating its test branch,
53
+ * and resolving with the consequent branch if the test is truthy, or the
54
+ * alternate branch if it is not. If there is no consequent branch, the test
55
+ * result will be used instead.
56
+ * @param {{type: 'ConditionalExpression', test: {}, consequent: {},
57
+ * alternate: {}}} ast An expression tree with a ConditionalExpression as
58
+ * the top node
59
+ * @private
60
+ */
61
+ exports.ConditionalExpression = function(ast) {
62
+ var _this2 = this;
63
+ return this.eval(ast.test).then(function(res) {
64
+ if (res) {
65
+ if (ast.consequent) return _this2.eval(ast.consequent);
66
+ return res;
67
+ }
68
+ return _this2.eval(ast.alternate);
69
+ });
70
+ };
71
+ /**
72
+ * Evaluates a FilterExpression by applying it to the subject value.
73
+ * @param {{type: 'FilterExpression', relative: <boolean>, expr: {},
74
+ * subject: {}}} ast An expression tree with a FilterExpression as the top
75
+ * node
76
+ * @returns {Promise<*>} resolves with the value of the FilterExpression.
77
+ * @private
78
+ */
79
+ exports.FilterExpression = function(ast) {
80
+ var _this3 = this;
81
+ return this.eval(ast.subject).then(function(subject) {
82
+ if (ast.relative) return _this3._filterRelative(subject, ast.expr);
83
+ return _this3._filterStatic(subject, ast.expr);
84
+ });
85
+ };
86
+ /**
87
+ * Evaluates an Identifier by either stemming from the evaluated 'from'
88
+ * expression tree or accessing the context provided when this Evaluator was
89
+ * constructed.
90
+ * @param {{type: 'Identifier', value: <string>, [from]: {}}} ast An expression
91
+ * tree with an Identifier as the top node
92
+ * @returns {Promise<*>|*} either the identifier's value, or a Promise that
93
+ * will resolve with the identifier's value.
94
+ * @private
95
+ */
96
+ exports.Identifier = function(ast) {
97
+ if (!ast.from) return ast.relative ? this._relContext[ast.value] : this._context[ast.value];
98
+ return this.eval(ast.from).then(function(context) {
99
+ if (context === void 0 || context === null) return;
100
+ if (Array.isArray(context)) context = context[0];
101
+ return context[ast.value];
102
+ });
103
+ };
104
+ /**
105
+ * Evaluates a Literal by returning its value property.
106
+ * @param {{type: 'Literal', value: <string|number|boolean>}} ast An expression
107
+ * tree with a Literal as its only node
108
+ * @returns {string|number|boolean} The value of the Literal node
109
+ * @private
110
+ */
111
+ exports.Literal = function(ast) {
112
+ return ast.value;
113
+ };
114
+ /**
115
+ * Evaluates an ObjectLiteral by returning its value, with each key
116
+ * independently run through the evaluator.
117
+ * @param {{type: 'ObjectLiteral', value: <{}>}} ast An expression tree with an
118
+ * ObjectLiteral as the top node
119
+ * @returns {Promise<{}>} resolves to a map contained evaluated values.
120
+ * @private
121
+ */
122
+ exports.ObjectLiteral = function(ast) {
123
+ return this.evalMap(ast.value);
124
+ };
125
+ /**
126
+ * Evaluates a FunctionCall node by applying the supplied arguments to a
127
+ * function defined in one of the grammar's function pools.
128
+ * @param {{type: 'FunctionCall', name: <string>}} ast An
129
+ * expression tree with a FunctionCall as the top node
130
+ * @returns {Promise<*>|*} the value of the function call, or a Promise that
131
+ * will resolve with the resulting value.
132
+ * @private
133
+ */
134
+ exports.FunctionCall = function(ast) {
135
+ var poolName = poolNames[ast.pool];
136
+ if (!poolName) throw new Error("Corrupt AST: Pool '".concat(ast.pool, "' not found"));
137
+ var func = this._grammar[ast.pool][ast.name];
138
+ if (!func) throw new Error("".concat(poolName, " ").concat(ast.name, " is not defined."));
139
+ return this.evalArray(ast.args || []).then(function(args) {
140
+ return func.apply(void 0, (0, _toConsumableArray2.default)(args));
141
+ });
142
+ };
143
+ /**
144
+ * Evaluates a Unary expression by passing the right side through the
145
+ * operator's eval function.
146
+ * @param {{type: 'UnaryExpression', operator: <string>, right: {}}} ast An
147
+ * expression tree with a UnaryExpression as the top node
148
+ * @returns {Promise<*>} resolves with the value of the UnaryExpression.
149
+ * @constructor
150
+ */
151
+ exports.UnaryExpression = function(ast) {
152
+ var _this4 = this;
153
+ return this.eval(ast.right).then(function(right) {
154
+ return _this4._grammar.elements[ast.operator].eval(right);
155
+ });
156
+ };
157
+ }));
158
+ //#endregion
159
+ export default require_handlers();
160
+ export { require_handlers };
161
+
162
+ //# sourceMappingURL=handlers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handlers.js","names":[],"sources":["../../../../../../node_modules/jexl/dist/evaluator/handlers.js"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\n\n/*\n * Jexl\n * Copyright 2020 Tom Shawver\n */\nvar poolNames = {\n functions: 'Jexl Function',\n transforms: 'Transform'\n};\n/**\n * Evaluates an ArrayLiteral by returning its value, with each element\n * independently run through the evaluator.\n * @param {{type: 'ObjectLiteral', value: <{}>}} ast An expression tree with an\n * ObjectLiteral as the top node\n * @returns {Promise.<[]>} resolves to a map contained evaluated values.\n * @private\n */\n\nexports.ArrayLiteral = function (ast) {\n return this.evalArray(ast.value);\n};\n/**\n * Evaluates a BinaryExpression node by running the Grammar's evaluator for\n * the given operator. Note that binary expressions support two types of\n * evaluators: `eval` is called with the left and right operands pre-evaluated.\n * `evalOnDemand`, if it exists, will be called with the left and right operands\n * each individually wrapped in an object with an \"eval\" function that returns\n * a promise with the resulting value. This allows the binary expression to\n * evaluate the operands conditionally.\n * @param {{type: 'BinaryExpression', operator: <string>, left: {},\n * right: {}}} ast An expression tree with a BinaryExpression as the top\n * node\n * @returns {Promise<*>} resolves with the value of the BinaryExpression.\n * @private\n */\n\n\nexports.BinaryExpression = function (ast) {\n var _this = this;\n\n var grammarOp = this._grammar.elements[ast.operator];\n\n if (grammarOp.evalOnDemand) {\n var wrap = function wrap(subAst) {\n return {\n eval: function _eval() {\n return _this.eval(subAst);\n }\n };\n };\n\n return grammarOp.evalOnDemand(wrap(ast.left), wrap(ast.right));\n }\n\n return this.Promise.all([this.eval(ast.left), this.eval(ast.right)]).then(function (arr) {\n return grammarOp.eval(arr[0], arr[1]);\n });\n};\n/**\n * Evaluates a ConditionalExpression node by first evaluating its test branch,\n * and resolving with the consequent branch if the test is truthy, or the\n * alternate branch if it is not. If there is no consequent branch, the test\n * result will be used instead.\n * @param {{type: 'ConditionalExpression', test: {}, consequent: {},\n * alternate: {}}} ast An expression tree with a ConditionalExpression as\n * the top node\n * @private\n */\n\n\nexports.ConditionalExpression = function (ast) {\n var _this2 = this;\n\n return this.eval(ast.test).then(function (res) {\n if (res) {\n if (ast.consequent) {\n return _this2.eval(ast.consequent);\n }\n\n return res;\n }\n\n return _this2.eval(ast.alternate);\n });\n};\n/**\n * Evaluates a FilterExpression by applying it to the subject value.\n * @param {{type: 'FilterExpression', relative: <boolean>, expr: {},\n * subject: {}}} ast An expression tree with a FilterExpression as the top\n * node\n * @returns {Promise<*>} resolves with the value of the FilterExpression.\n * @private\n */\n\n\nexports.FilterExpression = function (ast) {\n var _this3 = this;\n\n return this.eval(ast.subject).then(function (subject) {\n if (ast.relative) {\n return _this3._filterRelative(subject, ast.expr);\n }\n\n return _this3._filterStatic(subject, ast.expr);\n });\n};\n/**\n * Evaluates an Identifier by either stemming from the evaluated 'from'\n * expression tree or accessing the context provided when this Evaluator was\n * constructed.\n * @param {{type: 'Identifier', value: <string>, [from]: {}}} ast An expression\n * tree with an Identifier as the top node\n * @returns {Promise<*>|*} either the identifier's value, or a Promise that\n * will resolve with the identifier's value.\n * @private\n */\n\n\nexports.Identifier = function (ast) {\n if (!ast.from) {\n return ast.relative ? this._relContext[ast.value] : this._context[ast.value];\n }\n\n return this.eval(ast.from).then(function (context) {\n if (context === undefined || context === null) {\n return undefined;\n }\n\n if (Array.isArray(context)) {\n context = context[0];\n }\n\n return context[ast.value];\n });\n};\n/**\n * Evaluates a Literal by returning its value property.\n * @param {{type: 'Literal', value: <string|number|boolean>}} ast An expression\n * tree with a Literal as its only node\n * @returns {string|number|boolean} The value of the Literal node\n * @private\n */\n\n\nexports.Literal = function (ast) {\n return ast.value;\n};\n/**\n * Evaluates an ObjectLiteral by returning its value, with each key\n * independently run through the evaluator.\n * @param {{type: 'ObjectLiteral', value: <{}>}} ast An expression tree with an\n * ObjectLiteral as the top node\n * @returns {Promise<{}>} resolves to a map contained evaluated values.\n * @private\n */\n\n\nexports.ObjectLiteral = function (ast) {\n return this.evalMap(ast.value);\n};\n/**\n * Evaluates a FunctionCall node by applying the supplied arguments to a\n * function defined in one of the grammar's function pools.\n * @param {{type: 'FunctionCall', name: <string>}} ast An\n * expression tree with a FunctionCall as the top node\n * @returns {Promise<*>|*} the value of the function call, or a Promise that\n * will resolve with the resulting value.\n * @private\n */\n\n\nexports.FunctionCall = function (ast) {\n var poolName = poolNames[ast.pool];\n\n if (!poolName) {\n throw new Error(\"Corrupt AST: Pool '\".concat(ast.pool, \"' not found\"));\n }\n\n var pool = this._grammar[ast.pool];\n var func = pool[ast.name];\n\n if (!func) {\n throw new Error(\"\".concat(poolName, \" \").concat(ast.name, \" is not defined.\"));\n }\n\n return this.evalArray(ast.args || []).then(function (args) {\n return func.apply(void 0, (0, _toConsumableArray2.default)(args));\n });\n};\n/**\n * Evaluates a Unary expression by passing the right side through the\n * operator's eval function.\n * @param {{type: 'UnaryExpression', operator: <string>, right: {}}} ast An\n * expression tree with a UnaryExpression as the top node\n * @returns {Promise<*>} resolves with the value of the UnaryExpression.\n * @constructor\n */\n\n\nexports.UnaryExpression = function (ast) {\n var _this4 = this;\n\n return this.eval(ast.right).then(function (right) {\n return _this4._grammar.elements[ast.operator].eval(right);\n });\n};"],"x_google_ignoreList":[0],"mappings":";;;;;CAIA,IAAI,sBAAA,+BAAA,CAAA,2BAAA,CAAiG;CAMrG,IAAI,YAAY;EACd,WAAW;EACX,YAAY;EACb;;;;;;;;;AAUD,SAAQ,eAAe,SAAU,KAAK;AACpC,SAAO,KAAK,UAAU,IAAI,MAAM;;;;;;;;;;;;;;;;AAkBlC,SAAQ,mBAAmB,SAAU,KAAK;EACxC,IAAI,QAAQ;EAEZ,IAAI,YAAY,KAAK,SAAS,SAAS,IAAI;AAE3C,MAAI,UAAU,cAAc;GAC1B,IAAI,OAAO,SAAS,KAAK,QAAQ;AAC/B,WAAO,EACL,MAAM,SAAS,QAAQ;AACrB,YAAO,MAAM,KAAK,OAAO;OAE5B;;AAGH,UAAO,UAAU,aAAa,KAAK,IAAI,KAAK,EAAE,KAAK,IAAI,MAAM,CAAC;;AAGhE,SAAO,KAAK,QAAQ,IAAI,CAAC,KAAK,KAAK,IAAI,KAAK,EAAE,KAAK,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,SAAU,KAAK;AACvF,UAAO,UAAU,KAAK,IAAI,IAAI,IAAI,GAAG;IACrC;;;;;;;;;;;;AAcJ,SAAQ,wBAAwB,SAAU,KAAK;EAC7C,IAAI,SAAS;AAEb,SAAO,KAAK,KAAK,IAAI,KAAK,CAAC,KAAK,SAAU,KAAK;AAC7C,OAAI,KAAK;AACP,QAAI,IAAI,WACN,QAAO,OAAO,KAAK,IAAI,WAAW;AAGpC,WAAO;;AAGT,UAAO,OAAO,KAAK,IAAI,UAAU;IACjC;;;;;;;;;;AAYJ,SAAQ,mBAAmB,SAAU,KAAK;EACxC,IAAI,SAAS;AAEb,SAAO,KAAK,KAAK,IAAI,QAAQ,CAAC,KAAK,SAAU,SAAS;AACpD,OAAI,IAAI,SACN,QAAO,OAAO,gBAAgB,SAAS,IAAI,KAAK;AAGlD,UAAO,OAAO,cAAc,SAAS,IAAI,KAAK;IAC9C;;;;;;;;;;;;AAcJ,SAAQ,aAAa,SAAU,KAAK;AAClC,MAAI,CAAC,IAAI,KACP,QAAO,IAAI,WAAW,KAAK,YAAY,IAAI,SAAS,KAAK,SAAS,IAAI;AAGxE,SAAO,KAAK,KAAK,IAAI,KAAK,CAAC,KAAK,SAAU,SAAS;AACjD,OAAI,YAAY,KAAA,KAAa,YAAY,KACvC;AAGF,OAAI,MAAM,QAAQ,QAAQ,CACxB,WAAU,QAAQ;AAGpB,UAAO,QAAQ,IAAI;IACnB;;;;;;;;;AAWJ,SAAQ,UAAU,SAAU,KAAK;AAC/B,SAAO,IAAI;;;;;;;;;;AAYb,SAAQ,gBAAgB,SAAU,KAAK;AACrC,SAAO,KAAK,QAAQ,IAAI,MAAM;;;;;;;;;;;AAahC,SAAQ,eAAe,SAAU,KAAK;EACpC,IAAI,WAAW,UAAU,IAAI;AAE7B,MAAI,CAAC,SACH,OAAM,IAAI,MAAM,sBAAsB,OAAO,IAAI,MAAM,cAAc,CAAC;EAIxE,IAAI,OADO,KAAK,SAAS,IAAI,MACb,IAAI;AAEpB,MAAI,CAAC,KACH,OAAM,IAAI,MAAM,GAAG,OAAO,UAAU,IAAI,CAAC,OAAO,IAAI,MAAM,mBAAmB,CAAC;AAGhF,SAAO,KAAK,UAAU,IAAI,QAAQ,EAAE,CAAC,CAAC,KAAK,SAAU,MAAM;AACzD,UAAO,KAAK,MAAM,KAAK,IAAI,GAAG,oBAAoB,SAAS,KAAK,CAAC;IACjE;;;;;;;;;;AAYJ,SAAQ,kBAAkB,SAAU,KAAK;EACvC,IAAI,SAAS;AAEb,SAAO,KAAK,KAAK,IAAI,MAAM,CAAC,KAAK,SAAU,OAAO;AAChD,UAAO,OAAO,SAAS,SAAS,IAAI,UAAU,KAAK,MAAM;IACzD"}
@@ -0,0 +1,195 @@
1
+ import { __commonJSMin } from "../../../_virtual/_rolldown/runtime.js";
2
+ //#region ../node_modules/jexl/dist/grammar.js
3
+ var require_grammar = /* @__PURE__ */ __commonJSMin(((exports) => {
4
+ exports.getGrammar = function() {
5
+ return {
6
+ /**
7
+ * A map of all expression elements to their properties. Note that changes
8
+ * here may require changes in the Lexer or Parser.
9
+ * @type {{}}
10
+ */
11
+ elements: {
12
+ ".": { type: "dot" },
13
+ "[": { type: "openBracket" },
14
+ "]": { type: "closeBracket" },
15
+ "|": { type: "pipe" },
16
+ "{": { type: "openCurl" },
17
+ "}": { type: "closeCurl" },
18
+ ":": { type: "colon" },
19
+ ",": { type: "comma" },
20
+ "(": { type: "openParen" },
21
+ ")": { type: "closeParen" },
22
+ "?": { type: "question" },
23
+ "+": {
24
+ type: "binaryOp",
25
+ precedence: 30,
26
+ eval: function _eval(left, right) {
27
+ return left + right;
28
+ }
29
+ },
30
+ "-": {
31
+ type: "binaryOp",
32
+ precedence: 30,
33
+ eval: function _eval(left, right) {
34
+ return left - right;
35
+ }
36
+ },
37
+ "*": {
38
+ type: "binaryOp",
39
+ precedence: 40,
40
+ eval: function _eval(left, right) {
41
+ return left * right;
42
+ }
43
+ },
44
+ "/": {
45
+ type: "binaryOp",
46
+ precedence: 40,
47
+ eval: function _eval(left, right) {
48
+ return left / right;
49
+ }
50
+ },
51
+ "//": {
52
+ type: "binaryOp",
53
+ precedence: 40,
54
+ eval: function _eval(left, right) {
55
+ return Math.floor(left / right);
56
+ }
57
+ },
58
+ "%": {
59
+ type: "binaryOp",
60
+ precedence: 50,
61
+ eval: function _eval(left, right) {
62
+ return left % right;
63
+ }
64
+ },
65
+ "^": {
66
+ type: "binaryOp",
67
+ precedence: 50,
68
+ eval: function _eval(left, right) {
69
+ return Math.pow(left, right);
70
+ }
71
+ },
72
+ "==": {
73
+ type: "binaryOp",
74
+ precedence: 20,
75
+ eval: function _eval(left, right) {
76
+ return left == right;
77
+ }
78
+ },
79
+ "!=": {
80
+ type: "binaryOp",
81
+ precedence: 20,
82
+ eval: function _eval(left, right) {
83
+ return left != right;
84
+ }
85
+ },
86
+ ">": {
87
+ type: "binaryOp",
88
+ precedence: 20,
89
+ eval: function _eval(left, right) {
90
+ return left > right;
91
+ }
92
+ },
93
+ ">=": {
94
+ type: "binaryOp",
95
+ precedence: 20,
96
+ eval: function _eval(left, right) {
97
+ return left >= right;
98
+ }
99
+ },
100
+ "<": {
101
+ type: "binaryOp",
102
+ precedence: 20,
103
+ eval: function _eval(left, right) {
104
+ return left < right;
105
+ }
106
+ },
107
+ "<=": {
108
+ type: "binaryOp",
109
+ precedence: 20,
110
+ eval: function _eval(left, right) {
111
+ return left <= right;
112
+ }
113
+ },
114
+ "&&": {
115
+ type: "binaryOp",
116
+ precedence: 10,
117
+ evalOnDemand: function evalOnDemand(left, right) {
118
+ return left.eval().then(function(leftVal) {
119
+ if (!leftVal) return leftVal;
120
+ return right.eval();
121
+ });
122
+ }
123
+ },
124
+ "||": {
125
+ type: "binaryOp",
126
+ precedence: 10,
127
+ evalOnDemand: function evalOnDemand(left, right) {
128
+ return left.eval().then(function(leftVal) {
129
+ if (leftVal) return leftVal;
130
+ return right.eval();
131
+ });
132
+ }
133
+ },
134
+ in: {
135
+ type: "binaryOp",
136
+ precedence: 20,
137
+ eval: function _eval(left, right) {
138
+ if (typeof right === "string") return right.indexOf(left) !== -1;
139
+ if (Array.isArray(right)) return right.some(function(elem) {
140
+ return elem === left;
141
+ });
142
+ return false;
143
+ }
144
+ },
145
+ "!": {
146
+ type: "unaryOp",
147
+ precedence: Infinity,
148
+ eval: function _eval(right) {
149
+ return !right;
150
+ }
151
+ }
152
+ },
153
+ /**
154
+ * A map of function names to javascript functions. A Jexl function
155
+ * takes zero ore more arguemnts:
156
+ *
157
+ * - {*} ...args: A variable number of arguments passed to this function.
158
+ * All of these are pre-evaluated to their actual values before calling
159
+ * the function.
160
+ *
161
+ * The Jexl function should return either the transformed value, or
162
+ * a Promises/A+ Promise object that resolves with the value and rejects
163
+ * or throws only when an unrecoverable error occurs. Functions should
164
+ * generally return undefined when they don't make sense to be used on the
165
+ * given value type, rather than throw/reject. An error is only
166
+ * appropriate when the function would normally return a value, but
167
+ * cannot due to some other failure.
168
+ */
169
+ functions: {},
170
+ /**
171
+ * A map of transform names to transform functions. A transform function
172
+ * takes one ore more arguemnts:
173
+ *
174
+ * - {*} val: A value to be transformed
175
+ * - {*} ...args: A variable number of arguments passed to this transform.
176
+ * All of these are pre-evaluated to their actual values before calling
177
+ * the function.
178
+ *
179
+ * The transform function should return either the transformed value, or
180
+ * a Promises/A+ Promise object that resolves with the value and rejects
181
+ * or throws only when an unrecoverable error occurs. Transforms should
182
+ * generally return undefined when they don't make sense to be used on the
183
+ * given value type, rather than throw/reject. An error is only
184
+ * appropriate when the transform would normally return a value, but
185
+ * cannot due to some other failure.
186
+ */
187
+ transforms: {}
188
+ };
189
+ };
190
+ }));
191
+ //#endregion
192
+ export default require_grammar();
193
+ export { require_grammar };
194
+
195
+ //# sourceMappingURL=grammar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grammar.js","names":[],"sources":["../../../../../node_modules/jexl/dist/grammar.js"],"sourcesContent":["\"use strict\";\n\n/*\n * Jexl\n * Copyright 2020 Tom Shawver\n */\n\n/* eslint eqeqeq:0 */\nexports.getGrammar = function () {\n return {\n /**\n * A map of all expression elements to their properties. Note that changes\n * here may require changes in the Lexer or Parser.\n * @type {{}}\n */\n elements: {\n '.': {\n type: 'dot'\n },\n '[': {\n type: 'openBracket'\n },\n ']': {\n type: 'closeBracket'\n },\n '|': {\n type: 'pipe'\n },\n '{': {\n type: 'openCurl'\n },\n '}': {\n type: 'closeCurl'\n },\n ':': {\n type: 'colon'\n },\n ',': {\n type: 'comma'\n },\n '(': {\n type: 'openParen'\n },\n ')': {\n type: 'closeParen'\n },\n '?': {\n type: 'question'\n },\n '+': {\n type: 'binaryOp',\n precedence: 30,\n eval: function _eval(left, right) {\n return left + right;\n }\n },\n '-': {\n type: 'binaryOp',\n precedence: 30,\n eval: function _eval(left, right) {\n return left - right;\n }\n },\n '*': {\n type: 'binaryOp',\n precedence: 40,\n eval: function _eval(left, right) {\n return left * right;\n }\n },\n '/': {\n type: 'binaryOp',\n precedence: 40,\n eval: function _eval(left, right) {\n return left / right;\n }\n },\n '//': {\n type: 'binaryOp',\n precedence: 40,\n eval: function _eval(left, right) {\n return Math.floor(left / right);\n }\n },\n '%': {\n type: 'binaryOp',\n precedence: 50,\n eval: function _eval(left, right) {\n return left % right;\n }\n },\n '^': {\n type: 'binaryOp',\n precedence: 50,\n eval: function _eval(left, right) {\n return Math.pow(left, right);\n }\n },\n '==': {\n type: 'binaryOp',\n precedence: 20,\n eval: function _eval(left, right) {\n return left == right;\n }\n },\n '!=': {\n type: 'binaryOp',\n precedence: 20,\n eval: function _eval(left, right) {\n return left != right;\n }\n },\n '>': {\n type: 'binaryOp',\n precedence: 20,\n eval: function _eval(left, right) {\n return left > right;\n }\n },\n '>=': {\n type: 'binaryOp',\n precedence: 20,\n eval: function _eval(left, right) {\n return left >= right;\n }\n },\n '<': {\n type: 'binaryOp',\n precedence: 20,\n eval: function _eval(left, right) {\n return left < right;\n }\n },\n '<=': {\n type: 'binaryOp',\n precedence: 20,\n eval: function _eval(left, right) {\n return left <= right;\n }\n },\n '&&': {\n type: 'binaryOp',\n precedence: 10,\n evalOnDemand: function evalOnDemand(left, right) {\n return left.eval().then(function (leftVal) {\n if (!leftVal) return leftVal;\n return right.eval();\n });\n }\n },\n '||': {\n type: 'binaryOp',\n precedence: 10,\n evalOnDemand: function evalOnDemand(left, right) {\n return left.eval().then(function (leftVal) {\n if (leftVal) return leftVal;\n return right.eval();\n });\n }\n },\n in: {\n type: 'binaryOp',\n precedence: 20,\n eval: function _eval(left, right) {\n if (typeof right === 'string') {\n return right.indexOf(left) !== -1;\n }\n\n if (Array.isArray(right)) {\n return right.some(function (elem) {\n return elem === left;\n });\n }\n\n return false;\n }\n },\n '!': {\n type: 'unaryOp',\n precedence: Infinity,\n eval: function _eval(right) {\n return !right;\n }\n }\n },\n\n /**\n * A map of function names to javascript functions. A Jexl function\n * takes zero ore more arguemnts:\n *\n * - {*} ...args: A variable number of arguments passed to this function.\n * All of these are pre-evaluated to their actual values before calling\n * the function.\n *\n * The Jexl function should return either the transformed value, or\n * a Promises/A+ Promise object that resolves with the value and rejects\n * or throws only when an unrecoverable error occurs. Functions should\n * generally return undefined when they don't make sense to be used on the\n * given value type, rather than throw/reject. An error is only\n * appropriate when the function would normally return a value, but\n * cannot due to some other failure.\n */\n functions: {},\n\n /**\n * A map of transform names to transform functions. A transform function\n * takes one ore more arguemnts:\n *\n * - {*} val: A value to be transformed\n * - {*} ...args: A variable number of arguments passed to this transform.\n * All of these are pre-evaluated to their actual values before calling\n * the function.\n *\n * The transform function should return either the transformed value, or\n * a Promises/A+ Promise object that resolves with the value and rejects\n * or throws only when an unrecoverable error occurs. Transforms should\n * generally return undefined when they don't make sense to be used on the\n * given value type, rather than throw/reject. An error is only\n * appropriate when the transform would normally return a value, but\n * cannot due to some other failure.\n */\n transforms: {}\n };\n};"],"x_google_ignoreList":[0],"mappings":";;;AAQA,SAAQ,aAAa,WAAY;AAC/B,SAAO;;;;;;GAML,UAAU;IACR,KAAK,EACH,MAAM,OACP;IACD,KAAK,EACH,MAAM,eACP;IACD,KAAK,EACH,MAAM,gBACP;IACD,KAAK,EACH,MAAM,QACP;IACD,KAAK,EACH,MAAM,YACP;IACD,KAAK,EACH,MAAM,aACP;IACD,KAAK,EACH,MAAM,SACP;IACD,KAAK,EACH,MAAM,SACP;IACD,KAAK,EACH,MAAM,aACP;IACD,KAAK,EACH,MAAM,cACP;IACD,KAAK,EACH,MAAM,YACP;IACD,KAAK;KACH,MAAM;KACN,YAAY;KACZ,MAAM,SAAS,MAAM,MAAM,OAAO;AAChC,aAAO,OAAO;;KAEjB;IACD,KAAK;KACH,MAAM;KACN,YAAY;KACZ,MAAM,SAAS,MAAM,MAAM,OAAO;AAChC,aAAO,OAAO;;KAEjB;IACD,KAAK;KACH,MAAM;KACN,YAAY;KACZ,MAAM,SAAS,MAAM,MAAM,OAAO;AAChC,aAAO,OAAO;;KAEjB;IACD,KAAK;KACH,MAAM;KACN,YAAY;KACZ,MAAM,SAAS,MAAM,MAAM,OAAO;AAChC,aAAO,OAAO;;KAEjB;IACD,MAAM;KACJ,MAAM;KACN,YAAY;KACZ,MAAM,SAAS,MAAM,MAAM,OAAO;AAChC,aAAO,KAAK,MAAM,OAAO,MAAM;;KAElC;IACD,KAAK;KACH,MAAM;KACN,YAAY;KACZ,MAAM,SAAS,MAAM,MAAM,OAAO;AAChC,aAAO,OAAO;;KAEjB;IACD,KAAK;KACH,MAAM;KACN,YAAY;KACZ,MAAM,SAAS,MAAM,MAAM,OAAO;AAChC,aAAO,KAAK,IAAI,MAAM,MAAM;;KAE/B;IACD,MAAM;KACJ,MAAM;KACN,YAAY;KACZ,MAAM,SAAS,MAAM,MAAM,OAAO;AAChC,aAAO,QAAQ;;KAElB;IACD,MAAM;KACJ,MAAM;KACN,YAAY;KACZ,MAAM,SAAS,MAAM,MAAM,OAAO;AAChC,aAAO,QAAQ;;KAElB;IACD,KAAK;KACH,MAAM;KACN,YAAY;KACZ,MAAM,SAAS,MAAM,MAAM,OAAO;AAChC,aAAO,OAAO;;KAEjB;IACD,MAAM;KACJ,MAAM;KACN,YAAY;KACZ,MAAM,SAAS,MAAM,MAAM,OAAO;AAChC,aAAO,QAAQ;;KAElB;IACD,KAAK;KACH,MAAM;KACN,YAAY;KACZ,MAAM,SAAS,MAAM,MAAM,OAAO;AAChC,aAAO,OAAO;;KAEjB;IACD,MAAM;KACJ,MAAM;KACN,YAAY;KACZ,MAAM,SAAS,MAAM,MAAM,OAAO;AAChC,aAAO,QAAQ;;KAElB;IACD,MAAM;KACJ,MAAM;KACN,YAAY;KACZ,cAAc,SAAS,aAAa,MAAM,OAAO;AAC/C,aAAO,KAAK,MAAM,CAAC,KAAK,SAAU,SAAS;AACzC,WAAI,CAAC,QAAS,QAAO;AACrB,cAAO,MAAM,MAAM;QACnB;;KAEL;IACD,MAAM;KACJ,MAAM;KACN,YAAY;KACZ,cAAc,SAAS,aAAa,MAAM,OAAO;AAC/C,aAAO,KAAK,MAAM,CAAC,KAAK,SAAU,SAAS;AACzC,WAAI,QAAS,QAAO;AACpB,cAAO,MAAM,MAAM;QACnB;;KAEL;IACD,IAAI;KACF,MAAM;KACN,YAAY;KACZ,MAAM,SAAS,MAAM,MAAM,OAAO;AAChC,UAAI,OAAO,UAAU,SACnB,QAAO,MAAM,QAAQ,KAAK,KAAK;AAGjC,UAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,MAAM,KAAK,SAAU,MAAM;AAChC,cAAO,SAAS;QAChB;AAGJ,aAAO;;KAEV;IACD,KAAK;KACH,MAAM;KACN,YAAY;KACZ,MAAM,SAAS,MAAM,OAAO;AAC1B,aAAO,CAAC;;KAEX;IACF;;;;;;;;;;;;;;;;;GAkBD,WAAW,EAAE;;;;;;;;;;;;;;;;;;GAmBb,YAAY,EAAE;GACf"}
@@ -0,0 +1,135 @@
1
+ import { __commonJSMin } from "../../../../_virtual/_rolldown/runtime.js";
2
+ import { require_interopRequireDefault } from "../../../@babel/runtime/helpers/interopRequireDefault.js";
3
+ import { require_classCallCheck } from "../../../@babel/runtime/helpers/classCallCheck.js";
4
+ import { require_createClass } from "../../../@babel/runtime/helpers/createClass.js";
5
+ import { require_handlers } from "./handlers.js";
6
+ import { require_states } from "./states.js";
7
+ //#region ../node_modules/jexl/dist/parser/Parser.js
8
+ var require_Parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9
+ var _interopRequireDefault = require_interopRequireDefault();
10
+ var _classCallCheck2 = _interopRequireDefault(require_classCallCheck());
11
+ var _createClass2 = _interopRequireDefault(require_createClass());
12
+ var handlers = require_handlers();
13
+ var states = require_states().states;
14
+ module.exports = /* @__PURE__ */ function() {
15
+ function Parser(grammar, prefix, stopMap) {
16
+ (0, _classCallCheck2.default)(this, Parser);
17
+ this._grammar = grammar;
18
+ this._state = "expectOperand";
19
+ this._tree = null;
20
+ this._exprStr = prefix || "";
21
+ this._relative = false;
22
+ this._stopMap = stopMap || {};
23
+ }
24
+ /**
25
+ * Processes a new token into the AST and manages the transitions of the state
26
+ * machine.
27
+ * @param {{type: <string>}} token A token object, as provided by the
28
+ * {@link Lexer#tokenize} function.
29
+ * @throws {Error} if a token is added when the Parser has been marked as
30
+ * complete by {@link #complete}, or if an unexpected token type is added.
31
+ * @returns {boolean|*} the stopState value if this parser encountered a token
32
+ * in the stopState mapb false if tokens can continue.
33
+ */
34
+ (0, _createClass2.default)(Parser, [
35
+ {
36
+ key: "addToken",
37
+ value: function addToken(token) {
38
+ if (this._state === "complete") throw new Error("Cannot add a new token to a completed Parser");
39
+ var state = states[this._state];
40
+ var startExpr = this._exprStr;
41
+ this._exprStr += token.raw;
42
+ if (state.subHandler) {
43
+ if (!this._subParser) this._startSubExpression(startExpr);
44
+ var stopState = this._subParser.addToken(token);
45
+ if (stopState) {
46
+ this._endSubExpression();
47
+ if (this._parentStop) return stopState;
48
+ this._state = stopState;
49
+ }
50
+ } else if (state.tokenTypes[token.type]) {
51
+ var typeOpts = state.tokenTypes[token.type];
52
+ var handleFunc = handlers[token.type];
53
+ if (typeOpts.handler) handleFunc = typeOpts.handler;
54
+ if (handleFunc) handleFunc.call(this, token);
55
+ if (typeOpts.toState) this._state = typeOpts.toState;
56
+ } else if (this._stopMap[token.type]) return this._stopMap[token.type];
57
+ else throw new Error("Token ".concat(token.raw, " (").concat(token.type, ") unexpected in expression: ").concat(this._exprStr));
58
+ return false;
59
+ }
60
+ },
61
+ {
62
+ key: "addTokens",
63
+ value: function addTokens(tokens) {
64
+ tokens.forEach(this.addToken, this);
65
+ }
66
+ },
67
+ {
68
+ key: "complete",
69
+ value: function complete() {
70
+ if (this._cursor && !states[this._state].completable) throw new Error("Unexpected end of expression: ".concat(this._exprStr));
71
+ if (this._subParser) this._endSubExpression();
72
+ this._state = "complete";
73
+ return this._cursor ? this._tree : null;
74
+ }
75
+ },
76
+ {
77
+ key: "isRelative",
78
+ value: function isRelative() {
79
+ return this._relative;
80
+ }
81
+ },
82
+ {
83
+ key: "_endSubExpression",
84
+ value: function _endSubExpression() {
85
+ states[this._state].subHandler.call(this, this._subParser.complete());
86
+ this._subParser = null;
87
+ }
88
+ },
89
+ {
90
+ key: "_placeAtCursor",
91
+ value: function _placeAtCursor(node) {
92
+ if (!this._cursor) this._tree = node;
93
+ else {
94
+ this._cursor.right = node;
95
+ this._setParent(node, this._cursor);
96
+ }
97
+ this._cursor = node;
98
+ }
99
+ },
100
+ {
101
+ key: "_placeBeforeCursor",
102
+ value: function _placeBeforeCursor(node) {
103
+ this._cursor = this._cursor._parent;
104
+ this._placeAtCursor(node);
105
+ }
106
+ },
107
+ {
108
+ key: "_setParent",
109
+ value: function _setParent(node, parent) {
110
+ Object.defineProperty(node, "_parent", {
111
+ value: parent,
112
+ writable: true
113
+ });
114
+ }
115
+ },
116
+ {
117
+ key: "_startSubExpression",
118
+ value: function _startSubExpression(exprStr) {
119
+ var endStates = states[this._state].endStates;
120
+ if (!endStates) {
121
+ this._parentStop = true;
122
+ endStates = this._stopMap;
123
+ }
124
+ this._subParser = new Parser(this._grammar, exprStr, endStates);
125
+ }
126
+ }
127
+ ]);
128
+ return Parser;
129
+ }();
130
+ }));
131
+ //#endregion
132
+ export default require_Parser();
133
+ export { require_Parser };
134
+
135
+ //# sourceMappingURL=Parser.js.map