@verbb/plugin-kit-react 1.0.10 → 2.0.1
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.
- package/CHANGELOG.md +13 -0
- package/README.md +91 -16
- package/dist/app/PluginKitProvider.d.ts +28 -0
- package/dist/app/PluginKitProvider.d.ts.map +1 -0
- package/dist/app/PluginKitProvider.js +39 -0
- package/dist/app/PluginKitProvider.js.map +1 -0
- package/dist/app/configure.d.ts +29 -0
- package/dist/app/configure.d.ts.map +1 -0
- package/dist/app/configure.js +35 -0
- package/dist/app/configure.js.map +1 -0
- package/dist/app/index.d.ts +5 -0
- package/dist/app/index.d.ts.map +1 -0
- package/dist/app/index.js +5 -0
- package/dist/app/mountShadowApp.d.ts +6 -0
- package/dist/app/mountShadowApp.d.ts.map +1 -0
- package/dist/app/mountShadowApp.js +2 -0
- package/dist/components/Button.d.ts +26 -25
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Button.js +34 -141
- package/dist/components/Button.js.map +1 -1
- package/dist/components/ButtonGroup.d.ts +15 -10
- package/dist/components/ButtonGroup.d.ts.map +1 -1
- package/dist/components/ButtonGroup.js +24 -54
- package/dist/components/ButtonGroup.js.map +1 -1
- package/dist/components/Calendar.d.ts +17 -10
- package/dist/components/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar.js +17 -129
- package/dist/components/Calendar.js.map +1 -1
- package/dist/components/Checkbox.d.ts +27 -4
- package/dist/components/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox.js +37 -34
- package/dist/components/Checkbox.js.map +1 -1
- package/dist/components/CheckboxInput.d.ts +10 -10
- package/dist/components/CheckboxInput.d.ts.map +1 -1
- package/dist/components/CheckboxInput.js +30 -10
- package/dist/components/CheckboxInput.js.map +1 -1
- package/dist/components/CheckboxSelect.d.ts +18 -17
- package/dist/components/CheckboxSelect.d.ts.map +1 -1
- package/dist/components/CheckboxSelect.js +30 -58
- package/dist/components/CheckboxSelect.js.map +1 -1
- package/dist/components/CodeEditor.d.ts +16 -10
- package/dist/components/CodeEditor.d.ts.map +1 -1
- package/dist/components/CodeEditor.js +32 -71
- package/dist/components/CodeEditor.js.map +1 -1
- package/dist/components/ColorInput.d.ts +25 -12
- package/dist/components/ColorInput.d.ts.map +1 -1
- package/dist/components/ColorInput.js +42 -142
- package/dist/components/ColorInput.js.map +1 -1
- package/dist/components/Combobox.d.ts +31 -39
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.js +47 -385
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/ComboboxInput.d.ts +34 -17
- package/dist/components/ComboboxInput.d.ts.map +1 -1
- package/dist/components/ComboboxInput.js +81 -161
- package/dist/components/ComboboxInput.js.map +1 -1
- package/dist/components/CopyButton.d.ts +12 -8
- package/dist/components/CopyButton.d.ts.map +1 -1
- package/dist/components/CopyButton.js +15 -36
- package/dist/components/CopyButton.js.map +1 -1
- package/dist/components/DatePicker.d.ts +28 -7
- package/dist/components/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker.js +82 -53
- package/dist/components/DatePicker.js.map +1 -1
- package/dist/components/Dialog.d.ts +20 -20
- package/dist/components/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog.js +50 -175
- package/dist/components/Dialog.js.map +1 -1
- package/dist/components/DropdownMenu.d.ts +39 -46
- package/dist/components/DropdownMenu.d.ts.map +1 -1
- package/dist/components/DropdownMenu.js +40 -232
- package/dist/components/DropdownMenu.js.map +1 -1
- package/dist/components/EditableTable.d.ts +82 -27
- package/dist/components/EditableTable.d.ts.map +1 -1
- package/dist/components/EditableTable.js +183 -133
- package/dist/components/EditableTable.js.map +1 -1
- package/dist/components/Field.d.ts +13 -0
- package/dist/components/Field.d.ts.map +1 -0
- package/dist/components/Field.js +32 -0
- package/dist/components/Field.js.map +1 -0
- package/dist/components/Icon.d.ts +7 -0
- package/dist/components/Icon.d.ts.map +1 -0
- package/dist/components/Icon.js +15 -0
- package/dist/components/Icon.js.map +1 -0
- package/dist/components/Input.d.ts +20 -8
- package/dist/components/Input.d.ts.map +1 -1
- package/dist/components/Input.js +37 -34
- package/dist/components/Input.js.map +1 -1
- package/dist/components/InputGroup.d.ts +39 -19
- package/dist/components/InputGroup.d.ts.map +1 -1
- package/dist/components/InputGroup.js +83 -102
- package/dist/components/InputGroup.js.map +1 -1
- package/dist/components/Lightswitch.d.ts +15 -8
- package/dist/components/Lightswitch.d.ts.map +1 -1
- package/dist/components/Lightswitch.js +22 -47
- package/dist/components/Lightswitch.js.map +1 -1
- package/dist/components/Popover.d.ts +23 -11
- package/dist/components/Popover.d.ts.map +1 -1
- package/dist/components/Popover.js +46 -65
- package/dist/components/Popover.js.map +1 -1
- package/dist/components/Popup.d.ts +14 -0
- package/dist/components/Popup.d.ts.map +1 -0
- package/dist/components/Popup.js +19 -0
- package/dist/components/Popup.js.map +1 -0
- package/dist/components/RadioGroup.d.ts +26 -5
- package/dist/components/RadioGroup.d.ts.map +1 -1
- package/dist/components/RadioGroup.js +56 -26
- package/dist/components/RadioGroup.js.map +1 -1
- package/dist/components/RadioGroupInput.d.ts +19 -0
- package/dist/components/RadioGroupInput.d.ts.map +1 -0
- package/dist/components/RadioGroupInput.js +35 -0
- package/dist/components/RadioGroupInput.js.map +1 -0
- package/dist/components/ScrollArea.d.ts +11 -15
- package/dist/components/ScrollArea.d.ts.map +1 -1
- package/dist/components/ScrollArea.js +11 -42
- package/dist/components/ScrollArea.js.map +1 -1
- package/dist/components/Select.d.ts +46 -22
- package/dist/components/Select.d.ts.map +1 -1
- package/dist/components/Select.js +74 -196
- package/dist/components/Select.js.map +1 -1
- package/dist/components/SelectInput.d.ts +28 -21
- package/dist/components/SelectInput.d.ts.map +1 -1
- package/dist/components/SelectInput.js +62 -76
- package/dist/components/SelectInput.js.map +1 -1
- package/dist/components/Separator.d.ts +7 -3
- package/dist/components/Separator.d.ts.map +1 -1
- package/dist/components/Separator.js +11 -13
- package/dist/components/Separator.js.map +1 -1
- package/dist/components/Spinner.d.ts +12 -8
- package/dist/components/Spinner.d.ts.map +1 -1
- package/dist/components/Spinner.js +15 -34
- package/dist/components/Spinner.js.map +1 -1
- package/dist/components/Status.d.ts +7 -7
- package/dist/components/Status.d.ts.map +1 -1
- package/dist/components/Status.js +11 -51
- package/dist/components/Status.js.map +1 -1
- package/dist/components/Tabs.d.ts +31 -7
- package/dist/components/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs.js +57 -30
- package/dist/components/Tabs.js.map +1 -1
- package/dist/components/Textarea.d.ts +18 -7
- package/dist/components/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea.js +33 -18
- package/dist/components/Textarea.js.map +1 -1
- package/dist/components/TimePicker.d.ts +18 -8
- package/dist/components/TimePicker.d.ts.map +1 -1
- package/dist/components/TimePicker.js +38 -36
- package/dist/components/TimePicker.js.map +1 -1
- package/dist/components/Tiptap.d.ts +43 -0
- package/dist/components/Tiptap.d.ts.map +1 -0
- package/dist/components/Tiptap.js +96 -0
- package/dist/components/Tiptap.js.map +1 -0
- package/dist/components/Toggle.d.ts +13 -8
- package/dist/components/Toggle.d.ts.map +1 -1
- package/dist/components/Toggle.js +13 -42
- package/dist/components/Toggle.js.map +1 -1
- package/dist/components/ToggleGroup.d.ts +11 -10
- package/dist/components/ToggleGroup.d.ts.map +1 -1
- package/dist/components/ToggleGroup.js +11 -65
- package/dist/components/ToggleGroup.js.map +1 -1
- package/dist/components/Tooltip.d.ts +18 -8
- package/dist/components/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip.js +18 -47
- package/dist/components/Tooltip.js.map +1 -1
- package/dist/components/index.d.ts +37 -45
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +35 -43
- package/dist/fault/AppFaultBoundary.d.ts +18 -0
- package/dist/fault/AppFaultBoundary.d.ts.map +1 -0
- package/dist/fault/AppFaultBoundary.js +24 -0
- package/dist/fault/AppFaultBoundary.js.map +1 -0
- package/dist/fault/AppFaultProvider.d.ts +43 -0
- package/dist/fault/AppFaultProvider.d.ts.map +1 -0
- package/dist/fault/AppFaultProvider.js +192 -0
- package/dist/fault/AppFaultProvider.js.map +1 -0
- package/dist/fault/FaultFallback.d.ts +16 -0
- package/dist/fault/FaultFallback.d.ts.map +1 -0
- package/dist/fault/FaultFallback.js +67 -0
- package/dist/fault/FaultFallback.js.map +1 -0
- package/dist/fault/buildSupportBundle.d.ts +3 -0
- package/dist/fault/buildSupportBundle.d.ts.map +1 -0
- package/dist/fault/buildSupportBundle.js +22 -0
- package/dist/fault/buildSupportBundle.js.map +1 -0
- package/dist/fault/index.d.ts +8 -0
- package/dist/fault/index.d.ts.map +1 -0
- package/dist/fault/index.js +7 -0
- package/dist/fault/isIgnorableGlobalError.d.ts +3 -0
- package/dist/fault/isIgnorableGlobalError.d.ts.map +1 -0
- package/dist/fault/isIgnorableGlobalError.js +14 -0
- package/dist/fault/isIgnorableGlobalError.js.map +1 -0
- package/dist/fault/types.d.ts +18 -0
- package/dist/fault/types.d.ts.map +1 -0
- package/dist/fault/useUiWatchdog.d.ts +13 -0
- package/dist/fault/useUiWatchdog.d.ts.map +1 -0
- package/dist/fault/useUiWatchdog.js +38 -0
- package/dist/fault/useUiWatchdog.js.map +1 -0
- package/dist/forms/Field.d.ts +19 -31
- package/dist/forms/Field.d.ts.map +1 -1
- package/dist/forms/Field.js +28 -164
- package/dist/forms/Field.js.map +1 -1
- package/dist/forms/SchemaFormEngine.d.ts +5 -4
- package/dist/forms/SchemaFormEngine.d.ts.map +1 -1
- package/dist/forms/SchemaFormEngine.js +36 -16
- package/dist/forms/SchemaFormEngine.js.map +1 -1
- package/dist/forms/SchemaFormFieldNode.d.ts +13 -0
- package/dist/forms/SchemaFormFieldNode.d.ts.map +1 -0
- package/dist/forms/SchemaFormFieldNode.js +48 -0
- package/dist/forms/SchemaFormFieldNode.js.map +1 -0
- package/dist/forms/assertSchemaRegistry.d.ts +18 -0
- package/dist/forms/assertSchemaRegistry.d.ts.map +1 -0
- package/dist/forms/assertSchemaRegistry.js +71 -0
- package/dist/forms/assertSchemaRegistry.js.map +1 -0
- package/dist/forms/builtin-field-loaders.d.ts +11 -0
- package/dist/forms/builtin-field-loaders.d.ts.map +1 -0
- package/dist/forms/builtin-field-loaders.js +31 -0
- package/dist/forms/builtin-field-loaders.js.map +1 -0
- package/dist/forms/components/FieldWrap.d.ts +7 -1
- package/dist/forms/components/FieldWrap.d.ts.map +1 -1
- package/dist/forms/components/FieldWrap.js +17 -23
- package/dist/forms/components/FieldWrap.js.map +1 -1
- package/dist/forms/components/ModalTabs.d.ts +28 -13
- package/dist/forms/components/ModalTabs.d.ts.map +1 -1
- package/dist/forms/components/ModalTabs.js +99 -30
- package/dist/forms/components/ModalTabs.js.map +1 -1
- package/dist/forms/components/index.d.ts +3 -2
- package/dist/forms/components/index.d.ts.map +1 -1
- package/dist/forms/components/schemaErrors.d.ts +5 -0
- package/dist/forms/components/schemaErrors.d.ts.map +1 -0
- package/dist/forms/components/schemaErrors.js +34 -0
- package/dist/forms/components/schemaErrors.js.map +1 -0
- package/dist/forms/datetime.d.ts +12 -0
- package/dist/forms/datetime.d.ts.map +1 -0
- package/dist/forms/datetime.js +34 -0
- package/dist/forms/datetime.js.map +1 -0
- package/dist/forms/engine/context.d.ts +4 -19
- package/dist/forms/engine/context.d.ts.map +1 -1
- package/dist/forms/engine/context.js.map +1 -1
- package/dist/forms/fields/CheckboxSelectField.d.ts +3 -3
- package/dist/forms/fields/CheckboxSelectField.d.ts.map +1 -1
- package/dist/forms/fields/CheckboxSelectField.js +1 -3
- package/dist/forms/fields/CheckboxSelectField.js.map +1 -1
- package/dist/forms/fields/CodeEditorField.d.ts +3 -3
- package/dist/forms/fields/CodeEditorField.d.ts.map +1 -1
- package/dist/forms/fields/CodeEditorField.js +7 -7
- package/dist/forms/fields/CodeEditorField.js.map +1 -1
- package/dist/forms/fields/ColorField.d.ts +1 -1
- package/dist/forms/fields/ColorField.d.ts.map +1 -1
- package/dist/forms/fields/ColorField.js +4 -5
- package/dist/forms/fields/ColorField.js.map +1 -1
- package/dist/forms/fields/ComboboxField.d.ts +4 -5
- package/dist/forms/fields/ComboboxField.d.ts.map +1 -1
- package/dist/forms/fields/ComboboxField.js +2 -5
- package/dist/forms/fields/ComboboxField.js.map +1 -1
- package/dist/forms/fields/DateTimeField.d.ts +1 -1
- package/dist/forms/fields/DateTimeField.d.ts.map +1 -1
- package/dist/forms/fields/DateTimeField.js +22 -18
- package/dist/forms/fields/DateTimeField.js.map +1 -1
- package/dist/forms/fields/GroupField.d.ts +2 -2
- package/dist/forms/fields/GroupField.d.ts.map +1 -1
- package/dist/forms/fields/GroupField.js +0 -1
- package/dist/forms/fields/GroupField.js.map +1 -1
- package/dist/forms/fields/LightswitchField.d.ts +1 -1
- package/dist/forms/fields/LightswitchField.d.ts.map +1 -1
- package/dist/forms/fields/LightswitchField.js +2 -6
- package/dist/forms/fields/LightswitchField.js.map +1 -1
- package/dist/forms/fields/NumberField.d.ts +1 -1
- package/dist/forms/fields/NumberField.d.ts.map +1 -1
- package/dist/forms/fields/NumberField.js +4 -5
- package/dist/forms/fields/NumberField.js.map +1 -1
- package/dist/forms/fields/RadioGroupField.d.ts +2 -2
- package/dist/forms/fields/RadioGroupField.d.ts.map +1 -1
- package/dist/forms/fields/RadioGroupField.js +14 -39
- package/dist/forms/fields/RadioGroupField.js.map +1 -1
- package/dist/forms/fields/SelectField.d.ts +2 -2
- package/dist/forms/fields/SelectField.d.ts.map +1 -1
- package/dist/forms/fields/SelectField.js +1 -2
- package/dist/forms/fields/SelectField.js.map +1 -1
- package/dist/forms/fields/TextField.d.ts +1 -1
- package/dist/forms/fields/TextField.d.ts.map +1 -1
- package/dist/forms/fields/TextField.js +3 -4
- package/dist/forms/fields/TextField.js.map +1 -1
- package/dist/forms/fields/TextareaField.d.ts +1 -1
- package/dist/forms/fields/TextareaField.d.ts.map +1 -1
- package/dist/forms/fields/TextareaField.js +3 -5
- package/dist/forms/fields/TextareaField.js.map +1 -1
- package/dist/forms/index.d.ts +12 -7
- package/dist/forms/index.d.ts.map +1 -1
- package/dist/forms/index.js +9 -7
- package/dist/forms/registry.d.ts +4 -1
- package/dist/forms/registry.d.ts.map +1 -1
- package/dist/forms/registry.js +18 -50
- package/dist/forms/registry.js.map +1 -1
- package/dist/forms/useEngineField.d.ts +1 -1
- package/dist/forms/useEngineField.d.ts.map +1 -1
- package/dist/forms/useEngineField.js.map +1 -1
- package/dist/forms/utils.d.ts +6 -0
- package/dist/forms/utils.d.ts.map +1 -0
- package/dist/forms/utils.js +14 -0
- package/dist/forms/utils.js.map +1 -0
- package/dist/hooks/index.d.ts +1 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -2
- package/dist/hooks/useTranslation.d.ts +2 -1
- package/dist/hooks/useTranslation.d.ts.map +1 -1
- package/dist/hooks/useTranslation.js +3 -5
- package/dist/hooks/useTranslation.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -2
- package/dist/utils/cn.d.ts +4 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +11 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/craftHostBridge.d.ts +3 -2
- package/dist/utils/craftHostBridge.d.ts.map +1 -1
- package/dist/utils/craftHostBridge.js +1 -0
- package/dist/utils/craftHostBridge.js.map +1 -1
- package/dist/utils/create-plugin-kit-component.d.ts +16 -0
- package/dist/utils/create-plugin-kit-component.d.ts.map +1 -0
- package/dist/utils/create-plugin-kit-component.js +97 -0
- package/dist/utils/create-plugin-kit-component.js.map +1 -0
- package/dist/utils/index.d.ts +8 -19
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +7 -74
- package/dist/utils/isHostEvent.d.ts +7 -0
- package/dist/utils/isHostEvent.d.ts.map +1 -0
- package/dist/utils/isHostEvent.js +13 -0
- package/dist/utils/isHostEvent.js.map +1 -0
- package/dist/utils/lit-react-booleans.d.ts +9 -0
- package/dist/utils/lit-react-booleans.d.ts.map +1 -0
- package/dist/utils/lit-react-booleans.js +17 -0
- package/dist/utils/lit-react-booleans.js.map +1 -0
- package/dist/utils/pk-change.d.ts +5 -0
- package/dist/utils/pk-change.d.ts.map +1 -0
- package/dist/utils/pk-change.js +13 -0
- package/dist/utils/pk-change.js.map +1 -0
- package/package.json +34 -80
- package/style.css +16 -0
- package/tailwind-preflight-scope.css +28 -0
- package/tailwind-theme.css +245 -0
- package/vite-dev.mjs +22 -2
- package/dist/_virtual/_rolldown/runtime.js +0 -34
- package/dist/components/Command.d.ts +0 -26
- package/dist/components/Command.d.ts.map +0 -1
- package/dist/components/Command.js +0 -94
- package/dist/components/Command.js.map +0 -1
- package/dist/components/FadeIn.d.ts +0 -12
- package/dist/components/FadeIn.d.ts.map +0 -1
- package/dist/components/FadeIn.js +0 -24
- package/dist/components/FadeIn.js.map +0 -1
- package/dist/components/Label.d.ts +0 -4
- package/dist/components/Label.d.ts.map +0 -1
- package/dist/components/Label.js +0 -15
- package/dist/components/Label.js.map +0 -1
- package/dist/components/Markdown.d.ts +0 -11
- package/dist/components/Markdown.d.ts.map +0 -1
- package/dist/components/Markdown.js +0 -46
- package/dist/components/Markdown.js.map +0 -1
- package/dist/components/MenuButton.d.ts +0 -40
- package/dist/components/MenuButton.d.ts.map +0 -1
- package/dist/components/MenuButton.js +0 -122
- package/dist/components/MenuButton.js.map +0 -1
- package/dist/components/ModalTabs.d.ts +0 -8
- package/dist/components/ModalTabs.d.ts.map +0 -1
- package/dist/components/ModalTabs.js +0 -37
- package/dist/components/ModalTabs.js.map +0 -1
- package/dist/components/PaneTabs.d.ts +0 -8
- package/dist/components/PaneTabs.d.ts.map +0 -1
- package/dist/components/PaneTabs.js +0 -37
- package/dist/components/PaneTabs.js.map +0 -1
- package/dist/components/SlideUp.d.ts +0 -12
- package/dist/components/SlideUp.d.ts.map +0 -1
- package/dist/components/SlideUp.js +0 -36
- package/dist/components/SlideUp.js.map +0 -1
- package/dist/components/Slot.d.ts +0 -6
- package/dist/components/Slot.d.ts.map +0 -1
- package/dist/components/Slot.js +0 -52
- package/dist/components/Slot.js.map +0 -1
- package/dist/components/Table.d.ts +0 -10
- package/dist/components/Table.d.ts.map +0 -1
- package/dist/components/Table.js +0 -64
- package/dist/components/Table.js.map +0 -1
- package/dist/components/TiptapContent.d.ts +0 -9
- package/dist/components/TiptapContent.d.ts.map +0 -1
- package/dist/components/TiptapContent.js +0 -43
- package/dist/components/TiptapContent.js.map +0 -1
- package/dist/components/TiptapEditor.d.ts +0 -43
- package/dist/components/TiptapEditor.d.ts.map +0 -1
- package/dist/components/TiptapEditor.js +0 -573
- package/dist/components/TiptapEditor.js.map +0 -1
- package/dist/components/TiptapInput.d.ts +0 -20
- package/dist/components/TiptapInput.d.ts.map +0 -1
- package/dist/components/TiptapInput.js +0 -140
- package/dist/components/TiptapInput.js.map +0 -1
- package/dist/components/VirtualizedScrollArea.d.ts +0 -25
- package/dist/components/VirtualizedScrollArea.d.ts.map +0 -1
- package/dist/components/VirtualizedScrollArea.js +0 -80
- package/dist/components/VirtualizedScrollArea.js.map +0 -1
- package/dist/components/editable-table/RowDataCells.d.ts +0 -3
- package/dist/components/editable-table/RowDataCells.d.ts.map +0 -1
- package/dist/components/editable-table/RowDataCells.js +0 -33
- package/dist/components/editable-table/RowDataCells.js.map +0 -1
- package/dist/components/editable-table/TableCell.d.ts +0 -13
- package/dist/components/editable-table/TableCell.d.ts.map +0 -1
- package/dist/components/editable-table/TableCell.js +0 -415
- package/dist/components/editable-table/TableCell.js.map +0 -1
- package/dist/components/editable-table/TableRow.d.ts +0 -3
- package/dist/components/editable-table/TableRow.d.ts.map +0 -1
- package/dist/components/editable-table/TableRow.js +0 -166
- package/dist/components/editable-table/TableRow.js.map +0 -1
- package/dist/components/editable-table/helpers.d.ts +0 -12
- package/dist/components/editable-table/helpers.d.ts.map +0 -1
- package/dist/components/editable-table/helpers.js +0 -23
- package/dist/components/editable-table/helpers.js.map +0 -1
- package/dist/components/editable-table/index.d.ts +0 -4
- package/dist/components/editable-table/index.d.ts.map +0 -1
- package/dist/components/editable-table/index.js +0 -4
- package/dist/components/editable-table/types.d.ts +0 -55
- package/dist/components/editable-table/types.d.ts.map +0 -1
- package/dist/components/editable-table/types.js +0 -0
- package/dist/components/editable-table/useEditableTableCellChange.d.ts +0 -17
- package/dist/components/editable-table/useEditableTableCellChange.d.ts.map +0 -1
- package/dist/components/editable-table/useEditableTableCellChange.js +0 -152
- package/dist/components/editable-table/useEditableTableCellChange.js.map +0 -1
- package/dist/components/editable-table/useEditableTableDnd.d.ts +0 -18
- package/dist/components/editable-table/useEditableTableDnd.d.ts.map +0 -1
- package/dist/components/editable-table/useEditableTableDnd.js +0 -55
- package/dist/components/editable-table/useEditableTableDnd.js.map +0 -1
- package/dist/components/editable-table/useEditableTableRows.d.ts +0 -17
- package/dist/components/editable-table/useEditableTableRows.d.ts.map +0 -1
- package/dist/components/editable-table/useEditableTableRows.js +0 -108
- package/dist/components/editable-table/useEditableTableRows.js.map +0 -1
- package/dist/components/tiptap/InlineVariablePickerPopover.d.ts +0 -24
- package/dist/components/tiptap/InlineVariablePickerPopover.d.ts.map +0 -1
- package/dist/components/tiptap/InlineVariablePickerPopover.js +0 -63
- package/dist/components/tiptap/InlineVariablePickerPopover.js.map +0 -1
- package/dist/components/tiptap/InsertLinkDialog.d.ts +0 -14
- package/dist/components/tiptap/InsertLinkDialog.d.ts.map +0 -1
- package/dist/components/tiptap/InsertLinkDialog.js +0 -145
- package/dist/components/tiptap/InsertLinkDialog.js.map +0 -1
- package/dist/components/tiptap/LinkBubbleMenu.d.ts +0 -10
- package/dist/components/tiptap/LinkBubbleMenu.d.ts.map +0 -1
- package/dist/components/tiptap/LinkBubbleMenu.js +0 -106
- package/dist/components/tiptap/LinkBubbleMenu.js.map +0 -1
- package/dist/components/tiptap/LinkDropdown.d.ts +0 -53
- package/dist/components/tiptap/LinkDropdown.d.ts.map +0 -1
- package/dist/components/tiptap/LinkDropdown.js +0 -155
- package/dist/components/tiptap/LinkDropdown.js.map +0 -1
- package/dist/components/tiptap/VariableCommandList.d.ts +0 -37
- package/dist/components/tiptap/VariableCommandList.d.ts.map +0 -1
- package/dist/components/tiptap/VariableCommandList.js +0 -166
- package/dist/components/tiptap/VariableCommandList.js.map +0 -1
- package/dist/components/tiptap/VariableDropdown.d.ts +0 -40
- package/dist/components/tiptap/VariableDropdown.d.ts.map +0 -1
- package/dist/components/tiptap/VariableDropdown.js +0 -121
- package/dist/components/tiptap/VariableDropdown.js.map +0 -1
- package/dist/components/tiptap/VariablePickerContext.d.ts +0 -58
- package/dist/components/tiptap/VariablePickerContext.d.ts.map +0 -1
- package/dist/components/tiptap/VariablePickerContext.js +0 -34
- package/dist/components/tiptap/VariablePickerContext.js.map +0 -1
- package/dist/components/tiptap/VariableTag.d.ts +0 -6
- package/dist/components/tiptap/VariableTag.d.ts.map +0 -1
- package/dist/components/tiptap/VariableTag.js +0 -153
- package/dist/components/tiptap/VariableTag.js.map +0 -1
- package/dist/components/tiptap/VariableTagView.d.ts +0 -3
- package/dist/components/tiptap/VariableTagView.d.ts.map +0 -1
- package/dist/components/tiptap/VariableTagView.js +0 -584
- package/dist/components/tiptap/VariableTagView.js.map +0 -1
- package/dist/components/tiptap/VariableTransformControls.d.ts +0 -37
- package/dist/components/tiptap/VariableTransformControls.d.ts.map +0 -1
- package/dist/components/tiptap/VariableTransformControls.js +0 -157
- package/dist/components/tiptap/VariableTransformControls.js.map +0 -1
- package/dist/components/tiptap/editorConfig.d.ts +0 -15
- package/dist/components/tiptap/editorConfig.d.ts.map +0 -1
- package/dist/components/tiptap/editorConfig.js +0 -191
- package/dist/components/tiptap/editorConfig.js.map +0 -1
- package/dist/components/tiptap/useInlineVariablePicker.d.ts +0 -34
- package/dist/components/tiptap/useInlineVariablePicker.d.ts.map +0 -1
- package/dist/components/tiptap/useInlineVariablePicker.js +0 -240
- package/dist/components/tiptap/useInlineVariablePicker.js.map +0 -1
- package/dist/components/tiptap/useVariablePicker.d.ts +0 -28
- package/dist/components/tiptap/useVariablePicker.d.ts.map +0 -1
- package/dist/components/tiptap/useVariablePicker.js +0 -122
- package/dist/components/tiptap/useVariablePicker.js.map +0 -1
- package/dist/components/tiptap/variablePickerUtils.d.ts +0 -11
- package/dist/components/tiptap/variablePickerUtils.d.ts.map +0 -1
- package/dist/components/tiptap/variablePickerUtils.js +0 -63
- package/dist/components/tiptap/variablePickerUtils.js.map +0 -1
- package/dist/components/tiptap/variableSerialization.d.ts +0 -53
- package/dist/components/tiptap/variableSerialization.d.ts.map +0 -1
- package/dist/components/tiptap/variableSerialization.js +0 -291
- package/dist/components/tiptap/variableSerialization.js.map +0 -1
- package/dist/css/core.css +0 -288
- package/dist/css/style.css +0 -295
- package/dist/forms/TranslationIcon.d.ts +0 -5
- package/dist/forms/TranslationIcon.d.ts.map +0 -1
- package/dist/forms/TranslationIcon.js +0 -18
- package/dist/forms/TranslationIcon.js.map +0 -1
- package/dist/forms/components/index.js +0 -3
- package/dist/forms/contexts/VariableCategoriesContext.d.ts +0 -19
- package/dist/forms/contexts/VariableCategoriesContext.d.ts.map +0 -1
- package/dist/forms/contexts/VariableCategoriesContext.js +0 -20
- package/dist/forms/contexts/VariableCategoriesContext.js.map +0 -1
- package/dist/forms/engine/FormStateStore.d.ts +0 -24
- package/dist/forms/engine/FormStateStore.d.ts.map +0 -1
- package/dist/forms/engine/FormStateStore.js +0 -97
- package/dist/forms/engine/FormStateStore.js.map +0 -1
- package/dist/forms/engine/SchemaIndex.d.ts +0 -33
- package/dist/forms/engine/SchemaIndex.d.ts.map +0 -1
- package/dist/forms/engine/SchemaIndex.js +0 -21
- package/dist/forms/engine/SchemaIndex.js.map +0 -1
- package/dist/forms/engine/ValidationEngine.d.ts +0 -13
- package/dist/forms/engine/ValidationEngine.d.ts.map +0 -1
- package/dist/forms/engine/ValidationEngine.js +0 -156
- package/dist/forms/engine/ValidationEngine.js.map +0 -1
- package/dist/forms/engine/buildGroupedMessage.d.ts +0 -2
- package/dist/forms/engine/buildGroupedMessage.d.ts.map +0 -1
- package/dist/forms/engine/buildGroupedMessage.js +0 -20
- package/dist/forms/engine/buildGroupedMessage.js.map +0 -1
- package/dist/forms/engine/rules/email.d.ts +0 -2
- package/dist/forms/engine/rules/email.d.ts.map +0 -1
- package/dist/forms/engine/rules/email.js +0 -11
- package/dist/forms/engine/rules/email.js.map +0 -1
- package/dist/forms/engine/rules/emailOrVariable.d.ts +0 -2
- package/dist/forms/engine/rules/emailOrVariable.d.ts.map +0 -1
- package/dist/forms/engine/rules/emailOrVariable.js +0 -13
- package/dist/forms/engine/rules/emailOrVariable.js.map +0 -1
- package/dist/forms/engine/rules/handle.d.ts +0 -2
- package/dist/forms/engine/rules/handle.d.ts.map +0 -1
- package/dist/forms/engine/rules/handle.js +0 -12
- package/dist/forms/engine/rules/handle.js.map +0 -1
- package/dist/forms/engine/rules/index.d.ts +0 -9
- package/dist/forms/engine/rules/index.d.ts.map +0 -1
- package/dist/forms/engine/rules/index.js +0 -39
- package/dist/forms/engine/rules/index.js.map +0 -1
- package/dist/forms/engine/rules/max.d.ts +0 -2
- package/dist/forms/engine/rules/max.d.ts.map +0 -1
- package/dist/forms/engine/rules/max.js +0 -16
- package/dist/forms/engine/rules/max.js.map +0 -1
- package/dist/forms/engine/rules/min.d.ts +0 -2
- package/dist/forms/engine/rules/min.d.ts.map +0 -1
- package/dist/forms/engine/rules/min.js +0 -16
- package/dist/forms/engine/rules/min.js.map +0 -1
- package/dist/forms/engine/rules/required.d.ts +0 -2
- package/dist/forms/engine/rules/required.d.ts.map +0 -1
- package/dist/forms/engine/rules/required.js +0 -11
- package/dist/forms/engine/rules/required.js.map +0 -1
- package/dist/forms/engine/rules/requiredRichText.d.ts +0 -2
- package/dist/forms/engine/rules/requiredRichText.d.ts.map +0 -1
- package/dist/forms/engine/rules/requiredRichText.js +0 -11
- package/dist/forms/engine/rules/requiredRichText.js.map +0 -1
- package/dist/forms/engine/rules/requiredRules.d.ts +0 -3
- package/dist/forms/engine/rules/requiredRules.d.ts.map +0 -1
- package/dist/forms/engine/rules/requiredRules.js +0 -9
- package/dist/forms/engine/rules/requiredRules.js.map +0 -1
- package/dist/forms/engine/rules/uniqueHandle.d.ts +0 -9
- package/dist/forms/engine/rules/uniqueHandle.d.ts.map +0 -1
- package/dist/forms/engine/rules/uniqueHandle.js +0 -95
- package/dist/forms/engine/rules/uniqueHandle.js.map +0 -1
- package/dist/forms/engine/rules/utils.d.ts +0 -3
- package/dist/forms/engine/rules/utils.d.ts.map +0 -1
- package/dist/forms/engine/rules/utils.js +0 -21
- package/dist/forms/engine/rules/utils.js.map +0 -1
- package/dist/forms/fields/CalculationsField.d.ts +0 -24
- package/dist/forms/fields/CalculationsField.d.ts.map +0 -1
- package/dist/forms/fields/CalculationsField.js +0 -215
- package/dist/forms/fields/CalculationsField.js.map +0 -1
- package/dist/forms/fields/CalculationsToolbar.d.ts +0 -17
- package/dist/forms/fields/CalculationsToolbar.d.ts.map +0 -1
- package/dist/forms/fields/CalculationsToolbar.js +0 -130
- package/dist/forms/fields/CalculationsToolbar.js.map +0 -1
- package/dist/forms/fields/EditableTableField.d.ts +0 -22
- package/dist/forms/fields/EditableTableField.d.ts.map +0 -1
- package/dist/forms/fields/EditableTableField.js +0 -37
- package/dist/forms/fields/EditableTableField.js.map +0 -1
- package/dist/forms/fields/ElementSelectField.d.ts +0 -20
- package/dist/forms/fields/ElementSelectField.d.ts.map +0 -1
- package/dist/forms/fields/ElementSelectField.js +0 -215
- package/dist/forms/fields/ElementSelectField.js.map +0 -1
- package/dist/forms/fields/HandleField.d.ts +0 -20
- package/dist/forms/fields/HandleField.d.ts.map +0 -1
- package/dist/forms/fields/HandleField.js +0 -70
- package/dist/forms/fields/HandleField.js.map +0 -1
- package/dist/forms/fields/ListField.d.ts +0 -18
- package/dist/forms/fields/ListField.d.ts.map +0 -1
- package/dist/forms/fields/ListField.js +0 -52
- package/dist/forms/fields/ListField.js.map +0 -1
- package/dist/forms/fields/RichTextField.d.ts +0 -24
- package/dist/forms/fields/RichTextField.d.ts.map +0 -1
- package/dist/forms/fields/RichTextField.js +0 -53
- package/dist/forms/fields/RichTextField.js.map +0 -1
- package/dist/forms/fields/StaticTableField.d.ts +0 -34
- package/dist/forms/fields/StaticTableField.d.ts.map +0 -1
- package/dist/forms/fields/StaticTableField.js +0 -128
- package/dist/forms/fields/StaticTableField.js.map +0 -1
- package/dist/forms/fields/VariablePickerField.d.ts +0 -21
- package/dist/forms/fields/VariablePickerField.d.ts.map +0 -1
- package/dist/forms/fields/VariablePickerField.js +0 -51
- package/dist/forms/fields/VariablePickerField.js.map +0 -1
- package/dist/forms/store/element-store.d.ts +0 -11
- package/dist/forms/store/element-store.d.ts.map +0 -1
- package/dist/forms/store/element-store.js +0 -41
- package/dist/forms/store/element-store.js.map +0 -1
- package/dist/forms/useEditableTableFieldBinding.d.ts +0 -13
- package/dist/forms/useEditableTableFieldBinding.d.ts.map +0 -1
- package/dist/forms/useEditableTableFieldBinding.js +0 -91
- package/dist/forms/useEditableTableFieldBinding.js.map +0 -1
- package/dist/hooks/useKeyboardShortcuts.d.ts +0 -14
- package/dist/hooks/useKeyboardShortcuts.d.ts.map +0 -1
- package/dist/hooks/useKeyboardShortcuts.js +0 -67
- package/dist/hooks/useKeyboardShortcuts.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -15
- package/dist/node_modules/@babel/runtime/helpers/arrayLikeToArray.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +0 -15
- package/dist/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -13
- package/dist/node_modules/@babel/runtime/helpers/classCallCheck.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/createClass.js +0 -21
- package/dist/node_modules/@babel/runtime/helpers/createClass.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/defineProperty.js +0 -20
- package/dist/node_modules/@babel/runtime/helpers/defineProperty.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/interopRequireDefault.js +0 -13
- package/dist/node_modules/@babel/runtime/helpers/interopRequireDefault.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/iterableToArray.js +0 -13
- package/dist/node_modules/@babel/runtime/helpers/iterableToArray.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/nonIterableSpread.js +0 -13
- package/dist/node_modules/@babel/runtime/helpers/nonIterableSpread.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/toConsumableArray.js +0 -21
- package/dist/node_modules/@babel/runtime/helpers/toConsumableArray.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -22
- package/dist/node_modules/@babel/runtime/helpers/toPrimitive.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -18
- package/dist/node_modules/@babel/runtime/helpers/toPropertyKey.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/typeof.js +0 -18
- package/dist/node_modules/@babel/runtime/helpers/typeof.js.map +0 -1
- package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -19
- package/dist/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js.map +0 -1
- package/dist/node_modules/jexl/dist/Expression.js +0 -84
- package/dist/node_modules/jexl/dist/Expression.js.map +0 -1
- package/dist/node_modules/jexl/dist/Jexl.js +0 -165
- package/dist/node_modules/jexl/dist/Jexl.js.map +0 -1
- package/dist/node_modules/jexl/dist/Lexer.js +0 -152
- package/dist/node_modules/jexl/dist/Lexer.js.map +0 -1
- package/dist/node_modules/jexl/dist/PromiseSync.js +0 -87
- package/dist/node_modules/jexl/dist/PromiseSync.js.map +0 -1
- package/dist/node_modules/jexl/dist/evaluator/Evaluator.js +0 -98
- package/dist/node_modules/jexl/dist/evaluator/Evaluator.js.map +0 -1
- package/dist/node_modules/jexl/dist/evaluator/handlers.js +0 -162
- package/dist/node_modules/jexl/dist/evaluator/handlers.js.map +0 -1
- package/dist/node_modules/jexl/dist/grammar.js +0 -195
- package/dist/node_modules/jexl/dist/grammar.js.map +0 -1
- package/dist/node_modules/jexl/dist/parser/Parser.js +0 -135
- package/dist/node_modules/jexl/dist/parser/Parser.js.map +0 -1
- package/dist/node_modules/jexl/dist/parser/handlers.js +0 -205
- package/dist/node_modules/jexl/dist/parser/handlers.js.map +0 -1
- package/dist/node_modules/jexl/dist/parser/states.js +0 -158
- package/dist/node_modules/jexl/dist/parser/states.js.map +0 -1
- package/dist/types/global.d.d.ts +0 -1
- package/dist/types/global.d.js +0 -0
- package/dist/utils/classes.d.ts +0 -18
- package/dist/utils/classes.d.ts.map +0 -1
- package/dist/utils/classes.js +0 -25
- package/dist/utils/classes.js.map +0 -1
- package/dist/utils/config.d.ts +0 -14
- package/dist/utils/config.d.ts.map +0 -1
- package/dist/utils/config.js +0 -20
- package/dist/utils/config.js.map +0 -1
- package/dist/utils/datetime.d.ts +0 -10
- package/dist/utils/datetime.d.ts.map +0 -1
- package/dist/utils/datetime.js +0 -60
- package/dist/utils/datetime.js.map +0 -1
- package/dist/utils/documentScrollStability.d.ts +0 -7
- package/dist/utils/documentScrollStability.d.ts.map +0 -1
- package/dist/utils/documentScrollStability.js +0 -19
- package/dist/utils/documentScrollStability.js.map +0 -1
- package/dist/utils/handle.d.ts +0 -10
- package/dist/utils/handle.d.ts.map +0 -1
- package/dist/utils/handle.js +0 -51
- package/dist/utils/handle.js.map +0 -1
- package/dist/utils/hostBridge.d.ts +0 -40
- package/dist/utils/hostBridge.d.ts.map +0 -1
- package/dist/utils/hostBridge.js +0 -35
- package/dist/utils/hostBridge.js.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/portal.d.ts +0 -17
- package/dist/utils/portal.d.ts.map +0 -1
- package/dist/utils/portal.js +0 -51
- package/dist/utils/portal.js.map +0 -1
- package/dist/utils/schema.d.ts +0 -17
- package/dist/utils/schema.d.ts.map +0 -1
- package/dist/utils/schema.js +0 -56
- package/dist/utils/schema.js.map +0 -1
- package/dist/utils/schemaFieldNames.d.ts +0 -2
- package/dist/utils/schemaFieldNames.d.ts.map +0 -1
- package/dist/utils/schemaFieldNames.js +0 -16
- package/dist/utils/schemaFieldNames.js.map +0 -1
- package/dist/utils/schemaIndex.d.ts +0 -6
- package/dist/utils/schemaIndex.d.ts.map +0 -1
- package/dist/utils/schemaIndex.js +0 -31
- package/dist/utils/schemaIndex.js.map +0 -1
- package/dist/utils/schemaIndexCache.d.ts +0 -6
- package/dist/utils/schemaIndexCache.d.ts.map +0 -1
- package/dist/utils/schemaIndexCache.js +0 -32
- package/dist/utils/schemaIndexCache.js.map +0 -1
- package/dist/utils/schemaNormalize.d.ts +0 -13
- package/dist/utils/schemaNormalize.d.ts.map +0 -1
- package/dist/utils/schemaNormalize.js +0 -17
- package/dist/utils/schemaNormalize.js.map +0 -1
- package/dist/utils/store.d.ts +0 -7
- package/dist/utils/store.d.ts.map +0 -1
- package/dist/utils/store.js +0 -6
- package/dist/utils/store.js.map +0 -1
- package/dist/utils/timeOptions.d.ts +0 -6
- package/dist/utils/timeOptions.d.ts.map +0 -1
- package/dist/utils/timeOptions.js +0 -42
- package/dist/utils/timeOptions.js.map +0 -1
- package/dist/utils/tiptap.d.ts +0 -19
- package/dist/utils/tiptap.d.ts.map +0 -1
- package/dist/utils/tiptap.js +0 -92
- package/dist/utils/tiptap.js.map +0 -1
- package/dist/utils/translation.d.ts +0 -5
- package/dist/utils/translation.d.ts.map +0 -1
- package/dist/utils/translation.js +0 -25
- package/dist/utils/translation.js.map +0 -1
- package/dist/utils/validation.d.ts +0 -4
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/validation.js +0 -260
- package/dist/utils/validation.js.map +0 -1
|
@@ -1,195 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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":"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"}
|
|
@@ -1,135 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Parser.js","names":[],"sources":["../../../../../../node_modules/jexl/dist/parser/Parser.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\nvar states = require('./states').states;\n/**\n * The Parser is a state machine that converts tokens from the {@link Lexer}\n * into an Abstract Syntax Tree (AST), capable of being evaluated in any\n * context by the {@link Evaluator}. The Parser expects that all tokens\n * provided to it are legal and typed properly according to the grammar, but\n * accepts that the tokens may still be in an invalid order or in some other\n * unparsable configuration that requires it to throw an Error.\n * @param {{}} grammar The grammar object to use to parse Jexl strings\n * @param {string} [prefix] A string prefix to prepend to the expression string\n * for error messaging purposes. This is useful for when a new Parser is\n * instantiated to parse an subexpression, as the parent Parser's\n * expression string thus far can be passed for a more user-friendly\n * error message.\n * @param {{}} [stopMap] A mapping of token types to any truthy value. When the\n * token type is encountered, the parser will return the mapped value\n * instead of boolean false.\n */\n\n\nvar Parser = /*#__PURE__*/function () {\n function Parser(grammar, prefix, stopMap) {\n (0, _classCallCheck2.default)(this, Parser);\n this._grammar = grammar;\n this._state = 'expectOperand';\n this._tree = null;\n this._exprStr = prefix || '';\n this._relative = false;\n this._stopMap = stopMap || {};\n }\n /**\n * Processes a new token into the AST and manages the transitions of the state\n * machine.\n * @param {{type: <string>}} token A token object, as provided by the\n * {@link Lexer#tokenize} function.\n * @throws {Error} if a token is added when the Parser has been marked as\n * complete by {@link #complete}, or if an unexpected token type is added.\n * @returns {boolean|*} the stopState value if this parser encountered a token\n * in the stopState mapb false if tokens can continue.\n */\n\n\n (0, _createClass2.default)(Parser, [{\n key: \"addToken\",\n value: function addToken(token) {\n if (this._state === 'complete') {\n throw new Error('Cannot add a new token to a completed Parser');\n }\n\n var state = states[this._state];\n var startExpr = this._exprStr;\n this._exprStr += token.raw;\n\n if (state.subHandler) {\n if (!this._subParser) {\n this._startSubExpression(startExpr);\n }\n\n var stopState = this._subParser.addToken(token);\n\n if (stopState) {\n this._endSubExpression();\n\n if (this._parentStop) return stopState;\n this._state = stopState;\n }\n } else if (state.tokenTypes[token.type]) {\n var typeOpts = state.tokenTypes[token.type];\n var handleFunc = handlers[token.type];\n\n if (typeOpts.handler) {\n handleFunc = typeOpts.handler;\n }\n\n if (handleFunc) {\n handleFunc.call(this, token);\n }\n\n if (typeOpts.toState) {\n this._state = typeOpts.toState;\n }\n } else if (this._stopMap[token.type]) {\n return this._stopMap[token.type];\n } else {\n throw new Error(\"Token \".concat(token.raw, \" (\").concat(token.type, \") unexpected in expression: \").concat(this._exprStr));\n }\n\n return false;\n }\n /**\n * Processes an array of tokens iteratively through the {@link #addToken}\n * function.\n * @param {Array<{type: <string>}>} tokens An array of tokens, as provided by\n * the {@link Lexer#tokenize} function.\n */\n\n }, {\n key: \"addTokens\",\n value: function addTokens(tokens) {\n tokens.forEach(this.addToken, this);\n }\n /**\n * Marks this Parser instance as completed and retrieves the full AST.\n * @returns {{}|null} a full expression tree, ready for evaluation by the\n * {@link Evaluator#eval} function, or null if no tokens were passed to\n * the parser before complete was called\n * @throws {Error} if the parser is not in a state where it's legal to end\n * the expression, indicating that the expression is incomplete\n */\n\n }, {\n key: \"complete\",\n value: function complete() {\n if (this._cursor && !states[this._state].completable) {\n throw new Error(\"Unexpected end of expression: \".concat(this._exprStr));\n }\n\n if (this._subParser) {\n this._endSubExpression();\n }\n\n this._state = 'complete';\n return this._cursor ? this._tree : null;\n }\n /**\n * Indicates whether the expression tree contains a relative path identifier.\n * @returns {boolean} true if a relative identifier exists false otherwise.\n */\n\n }, {\n key: \"isRelative\",\n value: function isRelative() {\n return this._relative;\n }\n /**\n * Ends a subexpression by completing the subParser and passing its result\n * to the subHandler configured in the current state.\n * @private\n */\n\n }, {\n key: \"_endSubExpression\",\n value: function _endSubExpression() {\n states[this._state].subHandler.call(this, this._subParser.complete());\n\n this._subParser = null;\n }\n /**\n * Places a new tree node at the current position of the cursor (to the 'right'\n * property) and then advances the cursor to the new node. This function also\n * handles setting the parent of the new node.\n * @param {{type: <string>}} node A node to be added to the AST\n * @private\n */\n\n }, {\n key: \"_placeAtCursor\",\n value: function _placeAtCursor(node) {\n if (!this._cursor) {\n this._tree = node;\n } else {\n this._cursor.right = node;\n\n this._setParent(node, this._cursor);\n }\n\n this._cursor = node;\n }\n /**\n * Places a tree node before the current position of the cursor, replacing\n * the node that the cursor currently points to. This should only be called in\n * cases where the cursor is known to exist, and the provided node already\n * contains a pointer to what's at the cursor currently.\n * @param {{type: <string>}} node A node to be added to the AST\n * @private\n */\n\n }, {\n key: \"_placeBeforeCursor\",\n value: function _placeBeforeCursor(node) {\n this._cursor = this._cursor._parent;\n\n this._placeAtCursor(node);\n }\n /**\n * Sets the parent of a node by creating a non-enumerable _parent property\n * that points to the supplied parent argument.\n * @param {{type: <string>}} node A node of the AST on which to set a new\n * parent\n * @param {{type: <string>}} parent An existing node of the AST to serve as the\n * parent of the new node\n * @private\n */\n\n }, {\n key: \"_setParent\",\n value: function _setParent(node, parent) {\n Object.defineProperty(node, '_parent', {\n value: parent,\n writable: true\n });\n }\n /**\n * Prepares the Parser to accept a subexpression by (re)instantiating the\n * subParser.\n * @param {string} [exprStr] The expression string to prefix to the new Parser\n * @private\n */\n\n }, {\n key: \"_startSubExpression\",\n value: function _startSubExpression(exprStr) {\n var endStates = states[this._state].endStates;\n\n if (!endStates) {\n this._parentStop = true;\n endStates = this._stopMap;\n }\n\n this._subParser = new Parser(this._grammar, exprStr, endStates);\n }\n }]);\n return Parser;\n}();\n\nmodule.exports = Parser;"],"x_google_ignoreList":[0],"mappings":"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"}
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { __commonJSMin } from "../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
//#region ../node_modules/jexl/dist/parser/handlers.js
|
|
3
|
-
var require_handlers = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4
|
-
/**
|
|
5
|
-
* Handles a subexpression that's used to define a transform argument's value.
|
|
6
|
-
* @param {{type: <string>}} ast The subexpression tree
|
|
7
|
-
*/
|
|
8
|
-
exports.argVal = function(ast) {
|
|
9
|
-
if (ast) this._cursor.args.push(ast);
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Handles new array literals by adding them as a new node in the AST,
|
|
13
|
-
* initialized with an empty array.
|
|
14
|
-
*/
|
|
15
|
-
exports.arrayStart = function() {
|
|
16
|
-
this._placeAtCursor({
|
|
17
|
-
type: "ArrayLiteral",
|
|
18
|
-
value: []
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Handles a subexpression representing an element of an array literal.
|
|
23
|
-
* @param {{type: <string>}} ast The subexpression tree
|
|
24
|
-
*/
|
|
25
|
-
exports.arrayVal = function(ast) {
|
|
26
|
-
if (ast) this._cursor.value.push(ast);
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Handles tokens of type 'binaryOp', indicating an operation that has two
|
|
30
|
-
* inputs: a left side and a right side.
|
|
31
|
-
* @param {{type: <string>}} token A token object
|
|
32
|
-
*/
|
|
33
|
-
exports.binaryOp = function(token) {
|
|
34
|
-
var precedence = this._grammar.elements[token.value].precedence || 0;
|
|
35
|
-
var parent = this._cursor._parent;
|
|
36
|
-
while (parent && parent.operator && this._grammar.elements[parent.operator].precedence >= precedence) {
|
|
37
|
-
this._cursor = parent;
|
|
38
|
-
parent = parent._parent;
|
|
39
|
-
}
|
|
40
|
-
var node = {
|
|
41
|
-
type: "BinaryExpression",
|
|
42
|
-
operator: token.value,
|
|
43
|
-
left: this._cursor
|
|
44
|
-
};
|
|
45
|
-
this._setParent(this._cursor, node);
|
|
46
|
-
this._cursor = parent;
|
|
47
|
-
this._placeAtCursor(node);
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Handles successive nodes in an identifier chain. More specifically, it
|
|
51
|
-
* sets values that determine how the following identifier gets placed in the
|
|
52
|
-
* AST.
|
|
53
|
-
*/
|
|
54
|
-
exports.dot = function() {
|
|
55
|
-
this._nextIdentEncapsulate = this._cursor && this._cursor.type !== "UnaryExpression" && (this._cursor.type !== "BinaryExpression" || this._cursor.type === "BinaryExpression" && this._cursor.right);
|
|
56
|
-
this._nextIdentRelative = !this._cursor || this._cursor && !this._nextIdentEncapsulate;
|
|
57
|
-
if (this._nextIdentRelative) this._relative = true;
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* Handles a subexpression used for filtering an array returned by an
|
|
61
|
-
* identifier chain.
|
|
62
|
-
* @param {{type: <string>}} ast The subexpression tree
|
|
63
|
-
*/
|
|
64
|
-
exports.filter = function(ast) {
|
|
65
|
-
this._placeBeforeCursor({
|
|
66
|
-
type: "FilterExpression",
|
|
67
|
-
expr: ast,
|
|
68
|
-
relative: this._subParser.isRelative(),
|
|
69
|
-
subject: this._cursor
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Handles identifier tokens when used to indicate the name of a function to
|
|
74
|
-
* be called.
|
|
75
|
-
* @param {{type: <string>}} token A token object
|
|
76
|
-
*/
|
|
77
|
-
exports.functionCall = function() {
|
|
78
|
-
this._placeBeforeCursor({
|
|
79
|
-
type: "FunctionCall",
|
|
80
|
-
name: this._cursor.value,
|
|
81
|
-
args: [],
|
|
82
|
-
pool: "functions"
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Handles identifier tokens by adding them as a new node in the AST.
|
|
87
|
-
* @param {{type: <string>}} token A token object
|
|
88
|
-
*/
|
|
89
|
-
exports.identifier = function(token) {
|
|
90
|
-
var node = {
|
|
91
|
-
type: "Identifier",
|
|
92
|
-
value: token.value
|
|
93
|
-
};
|
|
94
|
-
if (this._nextIdentEncapsulate) {
|
|
95
|
-
node.from = this._cursor;
|
|
96
|
-
this._placeBeforeCursor(node);
|
|
97
|
-
this._nextIdentEncapsulate = false;
|
|
98
|
-
} else {
|
|
99
|
-
if (this._nextIdentRelative) {
|
|
100
|
-
node.relative = true;
|
|
101
|
-
this._nextIdentRelative = false;
|
|
102
|
-
}
|
|
103
|
-
this._placeAtCursor(node);
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* Handles literal values, such as strings, booleans, and numerics, by adding
|
|
108
|
-
* them as a new node in the AST.
|
|
109
|
-
* @param {{type: <string>}} token A token object
|
|
110
|
-
*/
|
|
111
|
-
exports.literal = function(token) {
|
|
112
|
-
this._placeAtCursor({
|
|
113
|
-
type: "Literal",
|
|
114
|
-
value: token.value
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
/**
|
|
118
|
-
* Queues a new object literal key to be written once a value is collected.
|
|
119
|
-
* @param {{type: <string>}} token A token object
|
|
120
|
-
*/
|
|
121
|
-
exports.objKey = function(token) {
|
|
122
|
-
this._curObjKey = token.value;
|
|
123
|
-
};
|
|
124
|
-
/**
|
|
125
|
-
* Handles new object literals by adding them as a new node in the AST,
|
|
126
|
-
* initialized with an empty object.
|
|
127
|
-
*/
|
|
128
|
-
exports.objStart = function() {
|
|
129
|
-
this._placeAtCursor({
|
|
130
|
-
type: "ObjectLiteral",
|
|
131
|
-
value: {}
|
|
132
|
-
});
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* Handles an object value by adding its AST to the queued key on the object
|
|
136
|
-
* literal node currently at the cursor.
|
|
137
|
-
* @param {{type: <string>}} ast The subexpression tree
|
|
138
|
-
*/
|
|
139
|
-
exports.objVal = function(ast) {
|
|
140
|
-
this._cursor.value[this._curObjKey] = ast;
|
|
141
|
-
};
|
|
142
|
-
/**
|
|
143
|
-
* Handles traditional subexpressions, delineated with the groupStart and
|
|
144
|
-
* groupEnd elements.
|
|
145
|
-
* @param {{type: <string>}} ast The subexpression tree
|
|
146
|
-
*/
|
|
147
|
-
exports.subExpression = function(ast) {
|
|
148
|
-
this._placeAtCursor(ast);
|
|
149
|
-
};
|
|
150
|
-
/**
|
|
151
|
-
* Handles a completed alternate subexpression of a ternary operator.
|
|
152
|
-
* @param {{type: <string>}} ast The subexpression tree
|
|
153
|
-
*/
|
|
154
|
-
exports.ternaryEnd = function(ast) {
|
|
155
|
-
this._cursor.alternate = ast;
|
|
156
|
-
};
|
|
157
|
-
/**
|
|
158
|
-
* Handles a completed consequent subexpression of a ternary operator.
|
|
159
|
-
* @param {{type: <string>}} ast The subexpression tree
|
|
160
|
-
*/
|
|
161
|
-
exports.ternaryMid = function(ast) {
|
|
162
|
-
this._cursor.consequent = ast;
|
|
163
|
-
};
|
|
164
|
-
/**
|
|
165
|
-
* Handles the start of a new ternary expression by encapsulating the entire
|
|
166
|
-
* AST in a ConditionalExpression node, and using the existing tree as the
|
|
167
|
-
* test element.
|
|
168
|
-
*/
|
|
169
|
-
exports.ternaryStart = function() {
|
|
170
|
-
this._tree = {
|
|
171
|
-
type: "ConditionalExpression",
|
|
172
|
-
test: this._tree
|
|
173
|
-
};
|
|
174
|
-
this._cursor = this._tree;
|
|
175
|
-
};
|
|
176
|
-
/**
|
|
177
|
-
* Handles identifier tokens when used to indicate the name of a transform to
|
|
178
|
-
* be applied.
|
|
179
|
-
* @param {{type: <string>}} token A token object
|
|
180
|
-
*/
|
|
181
|
-
exports.transform = function(token) {
|
|
182
|
-
this._placeBeforeCursor({
|
|
183
|
-
type: "FunctionCall",
|
|
184
|
-
name: token.value,
|
|
185
|
-
args: [this._cursor],
|
|
186
|
-
pool: "transforms"
|
|
187
|
-
});
|
|
188
|
-
};
|
|
189
|
-
/**
|
|
190
|
-
* Handles token of type 'unaryOp', indicating that the operation has only
|
|
191
|
-
* one input: a right side.
|
|
192
|
-
* @param {{type: <string>}} token A token object
|
|
193
|
-
*/
|
|
194
|
-
exports.unaryOp = function(token) {
|
|
195
|
-
this._placeAtCursor({
|
|
196
|
-
type: "UnaryExpression",
|
|
197
|
-
operator: token.value
|
|
198
|
-
});
|
|
199
|
-
};
|
|
200
|
-
}));
|
|
201
|
-
//#endregion
|
|
202
|
-
export default require_handlers();
|
|
203
|
-
export { require_handlers };
|
|
204
|
-
|
|
205
|
-
//# sourceMappingURL=handlers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.js","names":[],"sources":["../../../../../../node_modules/jexl/dist/parser/handlers.js"],"sourcesContent":["\"use strict\";\n\n/*\n * Jexl\n * Copyright 2020 Tom Shawver\n */\n\n/**\n * Handles a subexpression that's used to define a transform argument's value.\n * @param {{type: <string>}} ast The subexpression tree\n */\nexports.argVal = function (ast) {\n if (ast) this._cursor.args.push(ast);\n};\n/**\n * Handles new array literals by adding them as a new node in the AST,\n * initialized with an empty array.\n */\n\n\nexports.arrayStart = function () {\n this._placeAtCursor({\n type: 'ArrayLiteral',\n value: []\n });\n};\n/**\n * Handles a subexpression representing an element of an array literal.\n * @param {{type: <string>}} ast The subexpression tree\n */\n\n\nexports.arrayVal = function (ast) {\n if (ast) {\n this._cursor.value.push(ast);\n }\n};\n/**\n * Handles tokens of type 'binaryOp', indicating an operation that has two\n * inputs: a left side and a right side.\n * @param {{type: <string>}} token A token object\n */\n\n\nexports.binaryOp = function (token) {\n var precedence = this._grammar.elements[token.value].precedence || 0;\n var parent = this._cursor._parent;\n\n while (parent && parent.operator && this._grammar.elements[parent.operator].precedence >= precedence) {\n this._cursor = parent;\n parent = parent._parent;\n }\n\n var node = {\n type: 'BinaryExpression',\n operator: token.value,\n left: this._cursor\n };\n\n this._setParent(this._cursor, node);\n\n this._cursor = parent;\n\n this._placeAtCursor(node);\n};\n/**\n * Handles successive nodes in an identifier chain. More specifically, it\n * sets values that determine how the following identifier gets placed in the\n * AST.\n */\n\n\nexports.dot = function () {\n this._nextIdentEncapsulate = this._cursor && this._cursor.type !== 'UnaryExpression' && (this._cursor.type !== 'BinaryExpression' || this._cursor.type === 'BinaryExpression' && this._cursor.right);\n this._nextIdentRelative = !this._cursor || this._cursor && !this._nextIdentEncapsulate;\n\n if (this._nextIdentRelative) {\n this._relative = true;\n }\n};\n/**\n * Handles a subexpression used for filtering an array returned by an\n * identifier chain.\n * @param {{type: <string>}} ast The subexpression tree\n */\n\n\nexports.filter = function (ast) {\n this._placeBeforeCursor({\n type: 'FilterExpression',\n expr: ast,\n relative: this._subParser.isRelative(),\n subject: this._cursor\n });\n};\n/**\n * Handles identifier tokens when used to indicate the name of a function to\n * be called.\n * @param {{type: <string>}} token A token object\n */\n\n\nexports.functionCall = function () {\n this._placeBeforeCursor({\n type: 'FunctionCall',\n name: this._cursor.value,\n args: [],\n pool: 'functions'\n });\n};\n/**\n * Handles identifier tokens by adding them as a new node in the AST.\n * @param {{type: <string>}} token A token object\n */\n\n\nexports.identifier = function (token) {\n var node = {\n type: 'Identifier',\n value: token.value\n };\n\n if (this._nextIdentEncapsulate) {\n node.from = this._cursor;\n\n this._placeBeforeCursor(node);\n\n this._nextIdentEncapsulate = false;\n } else {\n if (this._nextIdentRelative) {\n node.relative = true;\n this._nextIdentRelative = false;\n }\n\n this._placeAtCursor(node);\n }\n};\n/**\n * Handles literal values, such as strings, booleans, and numerics, by adding\n * them as a new node in the AST.\n * @param {{type: <string>}} token A token object\n */\n\n\nexports.literal = function (token) {\n this._placeAtCursor({\n type: 'Literal',\n value: token.value\n });\n};\n/**\n * Queues a new object literal key to be written once a value is collected.\n * @param {{type: <string>}} token A token object\n */\n\n\nexports.objKey = function (token) {\n this._curObjKey = token.value;\n};\n/**\n * Handles new object literals by adding them as a new node in the AST,\n * initialized with an empty object.\n */\n\n\nexports.objStart = function () {\n this._placeAtCursor({\n type: 'ObjectLiteral',\n value: {}\n });\n};\n/**\n * Handles an object value by adding its AST to the queued key on the object\n * literal node currently at the cursor.\n * @param {{type: <string>}} ast The subexpression tree\n */\n\n\nexports.objVal = function (ast) {\n this._cursor.value[this._curObjKey] = ast;\n};\n/**\n * Handles traditional subexpressions, delineated with the groupStart and\n * groupEnd elements.\n * @param {{type: <string>}} ast The subexpression tree\n */\n\n\nexports.subExpression = function (ast) {\n this._placeAtCursor(ast);\n};\n/**\n * Handles a completed alternate subexpression of a ternary operator.\n * @param {{type: <string>}} ast The subexpression tree\n */\n\n\nexports.ternaryEnd = function (ast) {\n this._cursor.alternate = ast;\n};\n/**\n * Handles a completed consequent subexpression of a ternary operator.\n * @param {{type: <string>}} ast The subexpression tree\n */\n\n\nexports.ternaryMid = function (ast) {\n this._cursor.consequent = ast;\n};\n/**\n * Handles the start of a new ternary expression by encapsulating the entire\n * AST in a ConditionalExpression node, and using the existing tree as the\n * test element.\n */\n\n\nexports.ternaryStart = function () {\n this._tree = {\n type: 'ConditionalExpression',\n test: this._tree\n };\n this._cursor = this._tree;\n};\n/**\n * Handles identifier tokens when used to indicate the name of a transform to\n * be applied.\n * @param {{type: <string>}} token A token object\n */\n\n\nexports.transform = function (token) {\n this._placeBeforeCursor({\n type: 'FunctionCall',\n name: token.value,\n args: [this._cursor],\n pool: 'transforms'\n });\n};\n/**\n * Handles token of type 'unaryOp', indicating that the operation has only\n * one input: a right side.\n * @param {{type: <string>}} token A token object\n */\n\n\nexports.unaryOp = function (token) {\n this._placeAtCursor({\n type: 'UnaryExpression',\n operator: token.value\n });\n};"],"x_google_ignoreList":[0],"mappings":";;;;;;;AAWA,SAAQ,SAAS,SAAU,KAAK;AAC9B,MAAI,IAAK,MAAK,QAAQ,KAAK,KAAK,IAAI;;;;;;AAQtC,SAAQ,aAAa,WAAY;AAC/B,OAAK,eAAe;GAClB,MAAM;GACN,OAAO,EAAE;GACV,CAAC;;;;;;AAQJ,SAAQ,WAAW,SAAU,KAAK;AAChC,MAAI,IACF,MAAK,QAAQ,MAAM,KAAK,IAAI;;;;;;;AAUhC,SAAQ,WAAW,SAAU,OAAO;EAClC,IAAI,aAAa,KAAK,SAAS,SAAS,MAAM,OAAO,cAAc;EACnE,IAAI,SAAS,KAAK,QAAQ;AAE1B,SAAO,UAAU,OAAO,YAAY,KAAK,SAAS,SAAS,OAAO,UAAU,cAAc,YAAY;AACpG,QAAK,UAAU;AACf,YAAS,OAAO;;EAGlB,IAAI,OAAO;GACT,MAAM;GACN,UAAU,MAAM;GAChB,MAAM,KAAK;GACZ;AAED,OAAK,WAAW,KAAK,SAAS,KAAK;AAEnC,OAAK,UAAU;AAEf,OAAK,eAAe,KAAK;;;;;;;AAS3B,SAAQ,MAAM,WAAY;AACxB,OAAK,wBAAwB,KAAK,WAAW,KAAK,QAAQ,SAAS,sBAAsB,KAAK,QAAQ,SAAS,sBAAsB,KAAK,QAAQ,SAAS,sBAAsB,KAAK,QAAQ;AAC9L,OAAK,qBAAqB,CAAC,KAAK,WAAW,KAAK,WAAW,CAAC,KAAK;AAEjE,MAAI,KAAK,mBACP,MAAK,YAAY;;;;;;;AAUrB,SAAQ,SAAS,SAAU,KAAK;AAC9B,OAAK,mBAAmB;GACtB,MAAM;GACN,MAAM;GACN,UAAU,KAAK,WAAW,YAAY;GACtC,SAAS,KAAK;GACf,CAAC;;;;;;;AASJ,SAAQ,eAAe,WAAY;AACjC,OAAK,mBAAmB;GACtB,MAAM;GACN,MAAM,KAAK,QAAQ;GACnB,MAAM,EAAE;GACR,MAAM;GACP,CAAC;;;;;;AAQJ,SAAQ,aAAa,SAAU,OAAO;EACpC,IAAI,OAAO;GACT,MAAM;GACN,OAAO,MAAM;GACd;AAED,MAAI,KAAK,uBAAuB;AAC9B,QAAK,OAAO,KAAK;AAEjB,QAAK,mBAAmB,KAAK;AAE7B,QAAK,wBAAwB;SACxB;AACL,OAAI,KAAK,oBAAoB;AAC3B,SAAK,WAAW;AAChB,SAAK,qBAAqB;;AAG5B,QAAK,eAAe,KAAK;;;;;;;;AAU7B,SAAQ,UAAU,SAAU,OAAO;AACjC,OAAK,eAAe;GAClB,MAAM;GACN,OAAO,MAAM;GACd,CAAC;;;;;;AAQJ,SAAQ,SAAS,SAAU,OAAO;AAChC,OAAK,aAAa,MAAM;;;;;;AAQ1B,SAAQ,WAAW,WAAY;AAC7B,OAAK,eAAe;GAClB,MAAM;GACN,OAAO,EAAE;GACV,CAAC;;;;;;;AASJ,SAAQ,SAAS,SAAU,KAAK;AAC9B,OAAK,QAAQ,MAAM,KAAK,cAAc;;;;;;;AASxC,SAAQ,gBAAgB,SAAU,KAAK;AACrC,OAAK,eAAe,IAAI;;;;;;AAQ1B,SAAQ,aAAa,SAAU,KAAK;AAClC,OAAK,QAAQ,YAAY;;;;;;AAQ3B,SAAQ,aAAa,SAAU,KAAK;AAClC,OAAK,QAAQ,aAAa;;;;;;;AAS5B,SAAQ,eAAe,WAAY;AACjC,OAAK,QAAQ;GACX,MAAM;GACN,MAAM,KAAK;GACZ;AACD,OAAK,UAAU,KAAK;;;;;;;AAStB,SAAQ,YAAY,SAAU,OAAO;AACnC,OAAK,mBAAmB;GACtB,MAAM;GACN,MAAM,MAAM;GACZ,MAAM,CAAC,KAAK,QAAQ;GACpB,MAAM;GACP,CAAC;;;;;;;AASJ,SAAQ,UAAU,SAAU,OAAO;AACjC,OAAK,eAAe;GAClB,MAAM;GACN,UAAU,MAAM;GACjB,CAAC"}
|