@nuraly/runtime 0.1.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.
- package/README.md +778 -0
- package/components/index.ts +13 -0
- package/components/ui/components/Event/EventAttribute/EventAttribute.style.ts +11 -0
- package/components/ui/components/Event/EventAttribute/EventAttribute.ts +28 -0
- package/components/ui/components/Event/EventLabel/EventLabel.ts +19 -0
- package/components/ui/components/Event/EventValue/EventValue.ts +79 -0
- package/components/ui/components/ToastContainer/ToastContainer.ts +126 -0
- package/components/ui/components/advanced/AIChat/AIChat.helper.ts +22 -0
- package/components/ui/components/advanced/AIChat/AIChat.style.ts +52 -0
- package/components/ui/components/advanced/AIChat/AIChat.ts +143 -0
- package/components/ui/components/advanced/CodeEditor/CodeEditor.ts +489 -0
- package/components/ui/components/advanced/Collapse/Collapse.ts +86 -0
- package/components/ui/components/advanced/Collections/Collections.style.ts +21 -0
- package/components/ui/components/advanced/Collections/Collections.ts +125 -0
- package/components/ui/components/advanced/MicroApp/MicroApp.ts +98 -0
- package/components/ui/components/advanced/RefComponent/RefComponent.ts +86 -0
- package/components/ui/components/advanced/RichText/RichText.ts +98 -0
- package/components/ui/components/advanced/RichText/RichTextEditor.ts +536 -0
- package/components/ui/components/base/BaseElement/base-change-detection.ts +18 -0
- package/components/ui/components/base/BaseElement/calculateStyles.ts +31 -0
- package/components/ui/components/base/BaseElement/drag-events.helpers.ts +71 -0
- package/components/ui/components/base/BaseElement/execute-event.helpers.ts +45 -0
- package/components/ui/components/base/BaseElement/handler-component-error.ts +28 -0
- package/components/ui/components/base/BaseElement/input-handler.helpers.ts +358 -0
- package/components/ui/components/base/BaseElement/interactions.helpers.ts +14 -0
- package/components/ui/components/base/BaseElement.ts +711 -0
- package/components/ui/components/display/Badge/Badge.ts +61 -0
- package/components/ui/components/display/BoxModel/BoxModel.ts +372 -0
- package/components/ui/components/display/Code/Code.ts +103 -0
- package/components/ui/components/display/Divider/Divider.ts +98 -0
- package/components/ui/components/display/Icon/Icon.ts +60 -0
- package/components/ui/components/display/Image/Image.ts +75 -0
- package/components/ui/components/display/Table/Table.style.ts +0 -0
- package/components/ui/components/display/Table/Table.ts +178 -0
- package/components/ui/components/display/Tag/Tag.ts +49 -0
- package/components/ui/components/display/TextLabel/TextLabel.style.ts +21 -0
- package/components/ui/components/display/TextLabel/TextLabel.ts +72 -0
- package/components/ui/components/display/Video/Video.ts +46 -0
- package/components/ui/components/inputs/Button/Button.style.ts +0 -0
- package/components/ui/components/inputs/Button/Button.ts +79 -0
- package/components/ui/components/inputs/Checkbox/Checkbox.ts +76 -0
- package/components/ui/components/inputs/ColorPicker/colorpicker.ts +65 -0
- package/components/ui/components/inputs/DatePicker/DatePicker.ts +60 -0
- package/components/ui/components/inputs/Dropdown/Dropdown.ts +128 -0
- package/components/ui/components/inputs/FileUpload/FileUpload.ts +43 -0
- package/components/ui/components/inputs/IconButton/iconbutton.ts +54 -0
- package/components/ui/components/inputs/IconPicker/IconPicker.style.ts +109 -0
- package/components/ui/components/inputs/IconPicker/IconPicker.ts +61 -0
- package/components/ui/components/inputs/InsertDropdown/InsertDropdown.ts +75 -0
- package/components/ui/components/inputs/NumberInput/NumberInput.ts +84 -0
- package/components/ui/components/inputs/RadioButton/Radio-button.ts +69 -0
- package/components/ui/components/inputs/Select/Select.ts +65 -0
- package/components/ui/components/inputs/Slider/Slider.ts +63 -0
- package/components/ui/components/inputs/TextInput/TextInput.style.ts +0 -0
- package/components/ui/components/inputs/TextInput/TextInput.ts +153 -0
- package/components/ui/components/inputs/Textarea/Textarea.ts +110 -0
- package/components/ui/components/inputs/UsersDropdown/UsersDropdown.ts +30 -0
- package/components/ui/components/layout/Card/Card.ts +46 -0
- package/components/ui/components/layout/Containers/Container.style.ts +34 -0
- package/components/ui/components/layout/Containers/Container.ts +127 -0
- package/components/ui/components/layout/Panel/Panel.ts +156 -0
- package/components/ui/components/layout/Panel/index.ts +1 -0
- package/components/ui/components/layout/Tabs/Tabs.style.ts +5 -0
- package/components/ui/components/layout/Tabs/Tabs.ts +120 -0
- package/components/ui/components/navigation/EmbedURL/EmbedURL.ts +108 -0
- package/components/ui/components/navigation/Link/Link.ts +83 -0
- package/components/ui/components/navigation/Menu/Menu.ts +92 -0
- package/components/ui/components/runtime/MicroApp/MicroApp.ts +485 -0
- package/components/ui/components/runtime/MicroApp/MicroAppDataLoader.ts +240 -0
- package/components/ui/components/utility/Border/Border.ts +643 -0
- package/components/ui/components/utility/BoxShadow/BoxShadow.ts +253 -0
- package/components/ui/components/utility/Document/Document.ts +47 -0
- package/components/ui/components/utility/Export-Import/Export-Import.ts +122 -0
- package/components/ui/components/utility/Function/InvokeFunction.ts +63 -0
- package/components/ui/components/utility/Handlers/Handlers.style.ts +0 -0
- package/components/ui/components/utility/Handlers/Handlers.ts +200 -0
- package/components/ui/components/wrappers/ComponentTitle/ComponentTitle.ts +95 -0
- package/components/ui/components/wrappers/GenerikWrapper/DragWrapper/DragWrapper.style.ts +17 -0
- package/components/ui/components/wrappers/GenerikWrapper/DragWrapper/DragWrapper.ts +230 -0
- package/components/ui/components/wrappers/GenerikWrapper/GenerikWrapper.style.ts +135 -0
- package/components/ui/components/wrappers/GenerikWrapper/GenerikWrapper.ts +230 -0
- package/components/ui/components/wrappers/GenerikWrapper/QuickActionWrapper/QuickActionWrapper.style.ts +99 -0
- package/components/ui/components/wrappers/GenerikWrapper/QuickActionWrapper/QuickActionWrapper.ts +94 -0
- package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.style.ts +102 -0
- package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.ts +258 -0
- package/components/ui/components/wrappers/PreviewWrapper.ts +28 -0
- package/components/ui/components/wrappers/RectangleSelection/RectangleSelection.ts +154 -0
- package/components/ui/nuraly-ui/.storybook/main.ts +31 -0
- package/components/ui/nuraly-ui/.storybook/manager.ts +17 -0
- package/components/ui/nuraly-ui/.storybook/preview.ts +94 -0
- package/components/ui/nuraly-ui/LICENSE +28 -0
- package/components/ui/nuraly-ui/README.md +248 -0
- package/components/ui/nuraly-ui/examples/README.md +413 -0
- package/components/ui/nuraly-ui/packages/common/README.md +137 -0
- package/components/ui/nuraly-ui/packages/common/dist/constants/index.js +2 -0
- package/components/ui/nuraly-ui/packages/common/dist/constants.js +7 -0
- package/components/ui/nuraly-ui/packages/common/dist/controllers/index.js +2 -0
- package/components/ui/nuraly-ui/packages/common/dist/controllers.js +22 -0
- package/components/ui/nuraly-ui/packages/common/dist/index.js +27 -0
- package/components/ui/nuraly-ui/packages/common/dist/mixins/index.js +3 -0
- package/components/ui/nuraly-ui/packages/common/dist/mixins.js +29 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/base-mixin.js +38 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/constants.js +2 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.js +341 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.js +2 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/index.js +4 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.js +133 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/dependency-mixin.js +141 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.js +95 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/index.js +17 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.js +194 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/themes.js +85 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/utils.js +85 -0
- package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.js +17 -0
- package/components/ui/nuraly-ui/packages/common/dist/themes/index.js +2 -0
- package/components/ui/nuraly-ui/packages/common/dist/themes.js +23 -0
- package/components/ui/nuraly-ui/packages/common/dist/utils/index.js +2 -0
- package/components/ui/nuraly-ui/packages/common/dist/utils.js +22 -0
- package/components/ui/nuraly-ui/packages/forms/README.md +84 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/LICENSE +15 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/README.md +294 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy-sync.js +171 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy.js +175 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/index.js +7 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/empty/index.js +39 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/file.js +66 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/index.js +23 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/link.js +64 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-paths.js +101 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-type.js +34 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink.js +67 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/fs/index.js +146 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/index.js +16 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/index.js +16 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json.js +12 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/make-dir.js +27 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/index.js +7 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move-sync.js +55 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move.js +59 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/output-file/index.js +31 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/path-exists/index.js +12 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/remove/index.js +17 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/async.js +29 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/stat.js +159 -0
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/utimes.js +36 -0
- package/components/ui/nuraly-ui/packages/layout/README.md +77 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/LICENSE +15 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/README.md +294 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy-sync.js +171 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy.js +175 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/index.js +7 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/empty/index.js +39 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/file.js +66 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/index.js +23 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/link.js +64 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-paths.js +101 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-type.js +34 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink.js +67 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/fs/index.js +146 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/index.js +16 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/index.js +16 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json.js +12 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/make-dir.js +27 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/index.js +7 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move-sync.js +55 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move.js +59 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/output-file/index.js +31 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/path-exists/index.js +12 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/remove/index.js +17 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/async.js +29 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/stat.js +159 -0
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/utimes.js +36 -0
- package/components/ui/nuraly-ui/packages/themes/README.md +146 -0
- package/components/ui/nuraly-ui/packages/themes/scripts/build.js +444 -0
- package/components/ui/nuraly-ui/rollup.config.js +144 -0
- package/components/ui/nuraly-ui/src/components/alert/README.md +236 -0
- package/components/ui/nuraly-ui/src/components/alert/alert.component.ts +225 -0
- package/components/ui/nuraly-ui/src/components/alert/alert.stories.ts +466 -0
- package/components/ui/nuraly-ui/src/components/alert/alert.style.ts +192 -0
- package/components/ui/nuraly-ui/src/components/alert/alert.types.ts +57 -0
- package/components/ui/nuraly-ui/src/components/alert/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/alert/react.ts +17 -0
- package/components/ui/nuraly-ui/src/components/badge/README.md +319 -0
- package/components/ui/nuraly-ui/src/components/badge/badge.component.ts +314 -0
- package/components/ui/nuraly-ui/src/components/badge/badge.stories.ts +582 -0
- package/components/ui/nuraly-ui/src/components/badge/badge.style.ts +250 -0
- package/components/ui/nuraly-ui/src/components/badge/badge.types.ts +100 -0
- package/components/ui/nuraly-ui/src/components/badge/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/badge/react.ts +9 -0
- package/components/ui/nuraly-ui/src/components/breadcrumb/README.md +243 -0
- package/components/ui/nuraly-ui/src/components/breadcrumb/breadcrumb.component.ts +280 -0
- package/components/ui/nuraly-ui/src/components/breadcrumb/breadcrumb.stories.ts +389 -0
- package/components/ui/nuraly-ui/src/components/breadcrumb/breadcrumb.style.ts +154 -0
- package/components/ui/nuraly-ui/src/components/breadcrumb/breadcrumb.types.ts +66 -0
- package/components/ui/nuraly-ui/src/components/breadcrumb/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/breadcrumb/react.ts +11 -0
- package/components/ui/nuraly-ui/src/components/button/README.md +331 -0
- package/components/ui/nuraly-ui/src/components/button/button.component.ts +317 -0
- package/components/ui/nuraly-ui/src/components/button/button.stories.ts +861 -0
- package/components/ui/nuraly-ui/src/components/button/button.style.ts +520 -0
- package/components/ui/nuraly-ui/src/components/button/button.types.ts +68 -0
- package/components/ui/nuraly-ui/src/components/button/controllers/base.controller.ts +99 -0
- package/components/ui/nuraly-ui/src/components/button/controllers/index.ts +10 -0
- package/components/ui/nuraly-ui/src/components/button/controllers/keyboard.controller.ts +89 -0
- package/components/ui/nuraly-ui/src/components/button/controllers/link.controller.ts +86 -0
- package/components/ui/nuraly-ui/src/components/button/controllers/ripple.controller.ts +79 -0
- package/components/ui/nuraly-ui/src/components/button/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/button/interfaces/base-controller.interface.ts +67 -0
- package/components/ui/nuraly-ui/src/components/button/interfaces/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/button/react.ts +11 -0
- package/components/ui/nuraly-ui/src/components/button/test/nr-button_test.ts +90 -0
- package/components/ui/nuraly-ui/src/components/canvas/canvas.component.ts +306 -0
- package/components/ui/nuraly-ui/src/components/canvas/demo/canvas-demo.ts +18 -0
- package/components/ui/nuraly-ui/src/components/canvas/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/canvas/react.ts +13 -0
- package/components/ui/nuraly-ui/src/components/card/card.component.ts +50 -0
- package/components/ui/nuraly-ui/src/components/card/card.stories.ts +360 -0
- package/components/ui/nuraly-ui/src/components/card/card.style.ts +62 -0
- package/components/ui/nuraly-ui/src/components/card/card.types.ts +17 -0
- package/components/ui/nuraly-ui/src/components/card/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/card/react.ts +12 -0
- package/components/ui/nuraly-ui/src/components/carousel/carousel.component.ts +116 -0
- package/components/ui/nuraly-ui/src/components/carousel/carousel.style.ts +69 -0
- package/components/ui/nuraly-ui/src/components/carousel/demo/carousel-demo.ts +59 -0
- package/components/ui/nuraly-ui/src/components/carousel/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/carousel/react.ts +12 -0
- package/components/ui/nuraly-ui/src/components/chatbot/README.md +527 -0
- package/components/ui/nuraly-ui/src/components/chatbot/chatbot.component.ts +730 -0
- package/components/ui/nuraly-ui/src/components/chatbot/chatbot.stories.ts +2549 -0
- package/components/ui/nuraly-ui/src/components/chatbot/chatbot.style.ts +1272 -0
- package/components/ui/nuraly-ui/src/components/chatbot/chatbot.types.ts +269 -0
- package/components/ui/nuraly-ui/src/components/chatbot/controllers/index.ts +9 -0
- package/components/ui/nuraly-ui/src/components/chatbot/controllers/scroll.controller.ts +59 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/README.md +550 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/chatbot-core.controller.ts +918 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/event-bus.ts +104 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/handlers/file-handler.ts +79 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/handlers/index.ts +12 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/handlers/message-handler.ts +117 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/handlers/module-handler.ts +49 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/handlers/state-handler.ts +152 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/handlers/suggestion-handler.ts +38 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/handlers/thread-handler.ts +153 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/index.ts +47 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/services/index.ts +11 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/services/localization.service.ts +20 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/services/plugin.service.ts +103 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/services/provider.service.ts +342 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/services/storage.service.ts +122 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/services/validation.service.ts +107 -0
- package/components/ui/nuraly-ui/src/components/chatbot/core/types.ts +456 -0
- package/components/ui/nuraly-ui/src/components/chatbot/file-upload-validation.stories.ts +278 -0
- package/components/ui/nuraly-ui/src/components/chatbot/index.ts +27 -0
- package/components/ui/nuraly-ui/src/components/chatbot/locales/generated/ar.ts +19 -0
- package/components/ui/nuraly-ui/src/components/chatbot/locales/generated/fr.ts +19 -0
- package/components/ui/nuraly-ui/src/components/chatbot/locales/locale-codes.ts +25 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/analytics-plugin.ts +63 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/chat-plugin.ts +76 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/flight-card-plugin.ts +636 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/flight-card.stories.ts +929 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/index.ts +14 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/markdown-plugin.stories.ts +155 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/markdown-plugin.ts +103 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/persistence-plugin.ts +97 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/print-job-card-plugin.ts +537 -0
- package/components/ui/nuraly-ui/src/components/chatbot/plugins/print-job-card.stories.ts +649 -0
- package/components/ui/nuraly-ui/src/components/chatbot/providers/custom-api-provider.ts +239 -0
- package/components/ui/nuraly-ui/src/components/chatbot/providers/index.ts +11 -0
- package/components/ui/nuraly-ui/src/components/chatbot/providers/mock-provider.ts +433 -0
- package/components/ui/nuraly-ui/src/components/chatbot/providers/openai-provider.ts +239 -0
- package/components/ui/nuraly-ui/src/components/chatbot/react.ts +57 -0
- package/components/ui/nuraly-ui/src/components/chatbot/storage/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/chatbot/storage/storage-implementations.ts +167 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/chatbot-main.template.ts +157 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/file-preview-modal.template.ts +90 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/file-upload-area.template.ts +43 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/index.ts +14 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/input-box.template.ts +267 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/message.template.ts +240 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/suggestion.template.ts +57 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/thread-sidebar.template.ts +67 -0
- package/components/ui/nuraly-ui/src/components/chatbot/templates/url-modal.template.ts +121 -0
- package/components/ui/nuraly-ui/src/components/checkbox/checkbox.component.ts +173 -0
- package/components/ui/nuraly-ui/src/components/checkbox/checkbox.stories.ts +521 -0
- package/components/ui/nuraly-ui/src/components/checkbox/checkbox.style.ts +324 -0
- package/components/ui/nuraly-ui/src/components/checkbox/checkbox.types.ts +5 -0
- package/components/ui/nuraly-ui/src/components/checkbox/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/checkbox/mixins/checkbox-event-mixin.ts +180 -0
- package/components/ui/nuraly-ui/src/components/checkbox/mixins/checkbox-focus-mixin.ts +99 -0
- package/components/ui/nuraly-ui/src/components/checkbox/mixins/index.ts +27 -0
- package/components/ui/nuraly-ui/src/components/checkbox/react.ts +12 -0
- package/components/ui/nuraly-ui/src/components/checkbox/test/checkbox_test.ts +97 -0
- package/components/ui/nuraly-ui/src/components/collapse/collapse.component.ts +315 -0
- package/components/ui/nuraly-ui/src/components/collapse/collapse.stories.ts +738 -0
- package/components/ui/nuraly-ui/src/components/collapse/collapse.style.ts +236 -0
- package/components/ui/nuraly-ui/src/components/collapse/collapse.type.ts +95 -0
- package/components/ui/nuraly-ui/src/components/collapse/controllers/accordion.controller.ts +169 -0
- package/components/ui/nuraly-ui/src/components/collapse/controllers/animation.controller.ts +129 -0
- package/components/ui/nuraly-ui/src/components/collapse/controllers/base.controller.ts +114 -0
- package/components/ui/nuraly-ui/src/components/collapse/controllers/index.ts +15 -0
- package/components/ui/nuraly-ui/src/components/collapse/controllers/keyboard.controller.ts +212 -0
- package/components/ui/nuraly-ui/src/components/collapse/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/collapse/react.ts +13 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/color-holder.component.ts +104 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/color-holder.style.ts +46 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/color-picker.component.ts +398 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/color-picker.stories.ts +888 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/color-picker.style.ts +86 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/color-picker.types.ts +64 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/controllers/base.controller.ts +64 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/controllers/dropdown.controller.ts +268 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/controllers/event.controller.ts +147 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/controllers/index.ts +3 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/default-color-sets.component.ts +119 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/default-color-sets.style.ts +35 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/interfaces/index.ts +67 -0
- package/components/ui/nuraly-ui/src/components/colorpicker/react.ts +13 -0
- package/components/ui/nuraly-ui/src/components/console/react.ts +12 -0
- package/components/ui/nuraly-ui/src/components/datepicker/README.md +60 -0
- package/components/ui/nuraly-ui/src/components/datepicker/controllers/calendar.controller.ts +252 -0
- package/components/ui/nuraly-ui/src/components/datepicker/controllers/index.ts +11 -0
- package/components/ui/nuraly-ui/src/components/datepicker/controllers/keyboard.controller.ts +290 -0
- package/components/ui/nuraly-ui/src/components/datepicker/controllers/month-year-dropdown.controller.ts +108 -0
- package/components/ui/nuraly-ui/src/components/datepicker/controllers/positioning.controller.ts +278 -0
- package/components/ui/nuraly-ui/src/components/datepicker/controllers/selection.controller.ts +303 -0
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.component.ts +659 -0
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.constant.ts +81 -0
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.stories.ts +461 -0
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.style.ts +456 -0
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.style.variables.ts +119 -0
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.types.ts +154 -0
- package/components/ui/nuraly-ui/src/components/datepicker/index.ts +3 -0
- package/components/ui/nuraly-ui/src/components/datepicker/interfaces/base-controller.interface.ts +42 -0
- package/components/ui/nuraly-ui/src/components/datepicker/interfaces/datepicker-controllers.interface.ts +128 -0
- package/components/ui/nuraly-ui/src/components/datepicker/interfaces/index.ts +15 -0
- package/components/ui/nuraly-ui/src/components/datepicker/react.ts +24 -0
- package/components/ui/nuraly-ui/src/components/datepicker/templates/days.template.ts +57 -0
- package/components/ui/nuraly-ui/src/components/datepicker/templates/dropdown.template.ts +61 -0
- package/components/ui/nuraly-ui/src/components/datepicker/templates/headers.template.ts +7 -0
- package/components/ui/nuraly-ui/src/components/datepicker/templates/months.template.ts +16 -0
- package/components/ui/nuraly-ui/src/components/datepicker/templates/years.template.ts +18 -0
- package/components/ui/nuraly-ui/src/components/datepicker/test/datepicker_test.ts +124 -0
- package/components/ui/nuraly-ui/src/components/datepicker/utils/day.helper.ts +56 -0
- package/components/ui/nuraly-ui/src/components/datepicker/utils/formatter.ts +8 -0
- package/components/ui/nuraly-ui/src/components/datepicker/utils/index.ts +11 -0
- package/components/ui/nuraly-ui/src/components/datepicker/utils/locale.helper.ts +152 -0
- package/components/ui/nuraly-ui/src/components/datepicker/utils/month.helper.ts +26 -0
- package/components/ui/nuraly-ui/src/components/datepicker/utils/string.helper.ts +3 -0
- package/components/ui/nuraly-ui/src/components/divider/divider.component.ts +172 -0
- package/components/ui/nuraly-ui/src/components/divider/divider.stories.ts +271 -0
- package/components/ui/nuraly-ui/src/components/divider/divider.style.ts +139 -0
- package/components/ui/nuraly-ui/src/components/divider/divider.types.ts +59 -0
- package/components/ui/nuraly-ui/src/components/divider/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/divider/react.ts +9 -0
- package/components/ui/nuraly-ui/src/components/document/demo/document-demo.ts +28 -0
- package/components/ui/nuraly-ui/src/components/document/document.component.ts +133 -0
- package/components/ui/nuraly-ui/src/components/document/document.stories.ts +266 -0
- package/components/ui/nuraly-ui/src/components/document/document.style.ts +210 -0
- package/components/ui/nuraly-ui/src/components/document/document.types.ts +83 -0
- package/components/ui/nuraly-ui/src/components/document/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/document/react.ts +15 -0
- package/components/ui/nuraly-ui/src/components/dropdown/controllers/base.controller.ts +85 -0
- package/components/ui/nuraly-ui/src/components/dropdown/controllers/dropdown.controller.ts +476 -0
- package/components/ui/nuraly-ui/src/components/dropdown/controllers/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/dropdown/dropdown.component.ts +348 -0
- package/components/ui/nuraly-ui/src/components/dropdown/dropdown.stories.ts +1271 -0
- package/components/ui/nuraly-ui/src/components/dropdown/dropdown.style.ts +462 -0
- package/components/ui/nuraly-ui/src/components/dropdown/dropdown.types.ts +109 -0
- package/components/ui/nuraly-ui/src/components/dropdown/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/dropdown/interfaces/controller-interfaces.ts +98 -0
- package/components/ui/nuraly-ui/src/components/dropdown/interfaces/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/dropdown/react.ts +14 -0
- package/components/ui/nuraly-ui/src/components/dropdown/templates/nr-dropdown-item.style.ts +35 -0
- package/components/ui/nuraly-ui/src/components/dropdown/templates/nr-dropdown-item.ts +47 -0
- package/components/ui/nuraly-ui/src/components/dropdown/templates/nr-dropdown-menu.style.ts +50 -0
- package/components/ui/nuraly-ui/src/components/dropdown/templates/nr-dropdown-menu.ts +52 -0
- package/components/ui/nuraly-ui/src/components/file-upload/demo/file-upload-demo.ts +151 -0
- package/components/ui/nuraly-ui/src/components/file-upload/file-upload.component.ts +371 -0
- package/components/ui/nuraly-ui/src/components/file-upload/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/file-upload/react.ts +14 -0
- package/components/ui/nuraly-ui/src/components/file-upload/readme.md +98 -0
- package/components/ui/nuraly-ui/src/components/file-upload/styles.ts +284 -0
- package/components/ui/nuraly-ui/src/components/file-upload/types.ts +10 -0
- package/components/ui/nuraly-ui/src/components/file-upload/utils.ts +23 -0
- package/components/ui/nuraly-ui/src/components/flex/README.md +235 -0
- package/components/ui/nuraly-ui/src/components/flex/flex.component.ts +186 -0
- package/components/ui/nuraly-ui/src/components/flex/flex.stories.ts +486 -0
- package/components/ui/nuraly-ui/src/components/flex/flex.style.ts +101 -0
- package/components/ui/nuraly-ui/src/components/flex/flex.types.ts +70 -0
- package/components/ui/nuraly-ui/src/components/flex/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/flex/react.ts +9 -0
- package/components/ui/nuraly-ui/src/components/form/README.md +152 -0
- package/components/ui/nuraly-ui/src/components/form/controllers/submission.controller.ts +243 -0
- package/components/ui/nuraly-ui/src/components/form/controllers/validation.controller.ts +268 -0
- package/components/ui/nuraly-ui/src/components/form/form.component.ts +699 -0
- package/components/ui/nuraly-ui/src/components/form/form.stories.ts +794 -0
- package/components/ui/nuraly-ui/src/components/form/form.style.ts +69 -0
- package/components/ui/nuraly-ui/src/components/form/form.types.ts +104 -0
- package/components/ui/nuraly-ui/src/components/form/index.ts +15 -0
- package/components/ui/nuraly-ui/src/components/form/interfaces/validation.interface.ts +139 -0
- package/components/ui/nuraly-ui/src/components/grid/README.md +196 -0
- package/components/ui/nuraly-ui/src/components/grid/col.component.ts +262 -0
- package/components/ui/nuraly-ui/src/components/grid/col.style.ts +117 -0
- package/components/ui/nuraly-ui/src/components/grid/grid.stories.ts +442 -0
- package/components/ui/nuraly-ui/src/components/grid/grid.types.ts +89 -0
- package/components/ui/nuraly-ui/src/components/grid/index.ts +3 -0
- package/components/ui/nuraly-ui/src/components/grid/react.ts +16 -0
- package/components/ui/nuraly-ui/src/components/grid/row.component.ts +203 -0
- package/components/ui/nuraly-ui/src/components/grid/row.style.ts +68 -0
- package/components/ui/nuraly-ui/src/components/icon/icon.component.ts +219 -0
- package/components/ui/nuraly-ui/src/components/icon/icon.stories.ts +160 -0
- package/components/ui/nuraly-ui/src/components/icon/icon.style.ts +214 -0
- package/components/ui/nuraly-ui/src/components/icon/icon.types.ts +4 -0
- package/components/ui/nuraly-ui/src/components/icon/icon.variables.ts +132 -0
- package/components/ui/nuraly-ui/src/components/icon/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/icon/mixins/clickable-mixin.ts +154 -0
- package/components/ui/nuraly-ui/src/components/icon/mixins/index.ts +7 -0
- package/components/ui/nuraly-ui/src/components/icon/react.ts +8 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/README.md +106 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/controllers/event.controller.ts +94 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/controllers/index.ts +9 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/controllers/search.controller.ts +76 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/controllers/selection.controller.ts +50 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/icon-picker.component.ts +324 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/icon-picker.constant.ts +33 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/icon-picker.stories.ts +255 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/icon-picker.style.ts +217 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/icon-picker.types.ts +56 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/index.ts +9 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/interfaces/icon-picker.interface.ts +14 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/interfaces/index.ts +7 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/react.ts +22 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/utils/icon-filter.utils.ts +119 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/utils/icon-loader.utils.ts +129 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/utils/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/iconpicker/utils/lucide-icons.ts +1624 -0
- package/components/ui/nuraly-ui/src/components/image/image.component.ts +136 -0
- package/components/ui/nuraly-ui/src/components/image/image.stories.ts +236 -0
- package/components/ui/nuraly-ui/src/components/image/image.style.ts +83 -0
- package/components/ui/nuraly-ui/src/components/image/image.types.ts +83 -0
- package/components/ui/nuraly-ui/src/components/image/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/image/react.ts +15 -0
- package/components/ui/nuraly-ui/src/components/input/README.md +432 -0
- package/components/ui/nuraly-ui/src/components/input/controllers/base.controller.ts +114 -0
- package/components/ui/nuraly-ui/src/components/input/controllers/event.controller.ts +421 -0
- package/components/ui/nuraly-ui/src/components/input/controllers/index.ts +32 -0
- package/components/ui/nuraly-ui/src/components/input/controllers/state.controller.ts +313 -0
- package/components/ui/nuraly-ui/src/components/input/controllers/validation.controller.ts +806 -0
- package/components/ui/nuraly-ui/src/components/input/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/input/input.component.ts +557 -0
- package/components/ui/nuraly-ui/src/components/input/input.stories.ts +1759 -0
- package/components/ui/nuraly-ui/src/components/input/input.style.ts +812 -0
- package/components/ui/nuraly-ui/src/components/input/input.types.ts +195 -0
- package/components/ui/nuraly-ui/src/components/input/mixins/focus-mixin.ts +112 -0
- package/components/ui/nuraly-ui/src/components/input/mixins/index.ts +14 -0
- package/components/ui/nuraly-ui/src/components/input/mixins/number-mixin.ts +167 -0
- package/components/ui/nuraly-ui/src/components/input/mixins/selection-mixin.ts +125 -0
- package/components/ui/nuraly-ui/src/components/input/react.ts +15 -0
- package/components/ui/nuraly-ui/src/components/input/test/nr-input_test.ts +163 -0
- package/components/ui/nuraly-ui/src/components/input/utils/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/input/utils/input-renderers.ts +217 -0
- package/components/ui/nuraly-ui/src/components/input/utils/input-validation.utils.ts +133 -0
- package/components/ui/nuraly-ui/src/components/input/validation.ts +3 -0
- package/components/ui/nuraly-ui/src/components/label/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/label/label.component.ts +52 -0
- package/components/ui/nuraly-ui/src/components/label/label.stories.ts +311 -0
- package/components/ui/nuraly-ui/src/components/label/label.style.ts +70 -0
- package/components/ui/nuraly-ui/src/components/label/label.style.variables.ts +35 -0
- package/components/ui/nuraly-ui/src/components/label/label.types.ts +48 -0
- package/components/ui/nuraly-ui/src/components/label/react.ts +11 -0
- package/components/ui/nuraly-ui/src/components/layout/README.md +200 -0
- package/components/ui/nuraly-ui/src/components/layout/content.component.ts +45 -0
- package/components/ui/nuraly-ui/src/components/layout/content.style.ts +17 -0
- package/components/ui/nuraly-ui/src/components/layout/footer.component.ts +54 -0
- package/components/ui/nuraly-ui/src/components/layout/footer.style.ts +17 -0
- package/components/ui/nuraly-ui/src/components/layout/header.component.ts +55 -0
- package/components/ui/nuraly-ui/src/components/layout/header.style.ts +19 -0
- package/components/ui/nuraly-ui/src/components/layout/index.ts +18 -0
- package/components/ui/nuraly-ui/src/components/layout/layout.component.ts +87 -0
- package/components/ui/nuraly-ui/src/components/layout/layout.stories.ts +616 -0
- package/components/ui/nuraly-ui/src/components/layout/layout.style.ts +23 -0
- package/components/ui/nuraly-ui/src/components/layout/layout.types.ts +90 -0
- package/components/ui/nuraly-ui/src/components/layout/react.ts +41 -0
- package/components/ui/nuraly-ui/src/components/layout/sider.component.ts +294 -0
- package/components/ui/nuraly-ui/src/components/layout/sider.style.ts +104 -0
- package/components/ui/nuraly-ui/src/components/menu/README.md +390 -0
- package/components/ui/nuraly-ui/src/components/menu/controllers/accessibility.controller.ts +257 -0
- package/components/ui/nuraly-ui/src/components/menu/controllers/base.controller.ts +123 -0
- package/components/ui/nuraly-ui/src/components/menu/controllers/index.ts +10 -0
- package/components/ui/nuraly-ui/src/components/menu/controllers/keyboard.controller.ts +360 -0
- package/components/ui/nuraly-ui/src/components/menu/controllers/state.controller.ts +268 -0
- package/components/ui/nuraly-ui/src/components/menu/index.ts +3 -0
- package/components/ui/nuraly-ui/src/components/menu/interfaces/controller.interface.ts +56 -0
- package/components/ui/nuraly-ui/src/components/menu/interfaces/index.ts +7 -0
- package/components/ui/nuraly-ui/src/components/menu/menu.component.ts +341 -0
- package/components/ui/nuraly-ui/src/components/menu/menu.constants.ts +12 -0
- package/components/ui/nuraly-ui/src/components/menu/menu.stories.ts +807 -0
- package/components/ui/nuraly-ui/src/components/menu/menu.style.ts +358 -0
- package/components/ui/nuraly-ui/src/components/menu/menu.types.ts +60 -0
- package/components/ui/nuraly-ui/src/components/menu/react.ts +11 -0
- package/components/ui/nuraly-ui/src/components/modal/controllers/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/modal/controllers/modal-drag-controller.ts +139 -0
- package/components/ui/nuraly-ui/src/components/modal/controllers/modal-keyboard-controller.ts +152 -0
- package/components/ui/nuraly-ui/src/components/modal/index.ts +10 -0
- package/components/ui/nuraly-ui/src/components/modal/modal-manager.ts +209 -0
- package/components/ui/nuraly-ui/src/components/modal/modal.component.ts +475 -0
- package/components/ui/nuraly-ui/src/components/modal/modal.stories.ts +823 -0
- package/components/ui/nuraly-ui/src/components/modal/modal.style.ts +369 -0
- package/components/ui/nuraly-ui/src/components/modal/modal.types.ts +148 -0
- package/components/ui/nuraly-ui/src/components/modal/react.ts +16 -0
- package/components/ui/nuraly-ui/src/components/panel/README.md +218 -0
- package/components/ui/nuraly-ui/src/components/panel/controllers/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/panel/controllers/panel-drag-controller.ts +151 -0
- package/components/ui/nuraly-ui/src/components/panel/controllers/panel-resize-controller.ts +153 -0
- package/components/ui/nuraly-ui/src/components/panel/index.ts +9 -0
- package/components/ui/nuraly-ui/src/components/panel/panel.component.ts +760 -0
- package/components/ui/nuraly-ui/src/components/panel/panel.stories.ts +978 -0
- package/components/ui/nuraly-ui/src/components/panel/panel.style.ts +499 -0
- package/components/ui/nuraly-ui/src/components/panel/panel.types.ts +89 -0
- package/components/ui/nuraly-ui/src/components/panel/react.ts +18 -0
- package/components/ui/nuraly-ui/src/components/popconfirm/README.md +403 -0
- package/components/ui/nuraly-ui/src/components/popconfirm/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/popconfirm/popconfirm.component.ts +336 -0
- package/components/ui/nuraly-ui/src/components/popconfirm/popconfirm.stories.ts +491 -0
- package/components/ui/nuraly-ui/src/components/popconfirm/popconfirm.style.ts +207 -0
- package/components/ui/nuraly-ui/src/components/popconfirm/popconfirm.types.ts +66 -0
- package/components/ui/nuraly-ui/src/components/popconfirm/react.ts +14 -0
- package/components/ui/nuraly-ui/src/components/radio/README.md +95 -0
- package/components/ui/nuraly-ui/src/components/radio/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/radio/radio.component.ts +186 -0
- package/components/ui/nuraly-ui/src/components/radio/radio.stories.ts +317 -0
- package/components/ui/nuraly-ui/src/components/radio/radio.style.ts +150 -0
- package/components/ui/nuraly-ui/src/components/radio/radio.types.ts +14 -0
- package/components/ui/nuraly-ui/src/components/radio/react.ts +20 -0
- package/components/ui/nuraly-ui/src/components/radio-group/controllers/focus.controller.ts +251 -0
- package/components/ui/nuraly-ui/src/components/radio-group/controllers/group.controller.ts +198 -0
- package/components/ui/nuraly-ui/src/components/radio-group/controllers/index.ts +11 -0
- package/components/ui/nuraly-ui/src/components/radio-group/controllers/keyboard.controller.ts +122 -0
- package/components/ui/nuraly-ui/src/components/radio-group/controllers/ripple.controller.ts +248 -0
- package/components/ui/nuraly-ui/src/components/radio-group/controllers/validation.controller.ts +189 -0
- package/components/ui/nuraly-ui/src/components/radio-group/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/radio-group/interfaces/base-controller.interface.ts +87 -0
- package/components/ui/nuraly-ui/src/components/radio-group/interfaces/focus-controller.interface.ts +45 -0
- package/components/ui/nuraly-ui/src/components/radio-group/interfaces/index.ts +14 -0
- package/components/ui/nuraly-ui/src/components/radio-group/interfaces/ripple-controller.interface.ts +35 -0
- package/components/ui/nuraly-ui/src/components/radio-group/interfaces/selection-controller.interface.ts +51 -0
- package/components/ui/nuraly-ui/src/components/radio-group/interfaces/validation-controller.interface.ts +53 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.component.ts +426 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.stories.ts +1334 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.style.ts +248 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.types.ts +43 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio.constant.ts +1 -0
- package/components/ui/nuraly-ui/src/components/radio-group/react.ts +18 -0
- package/components/ui/nuraly-ui/src/components/radio-group/test/radio_test.ts +87 -0
- package/components/ui/nuraly-ui/src/components/select/README.md +316 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/base.controller.ts +93 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/dropdown.controller.ts +415 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/event.controller.ts +118 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/focus.controller.ts +255 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/keyboard.controller.ts +407 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/search.controller.ts +187 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/selection.controller.ts +238 -0
- package/components/ui/nuraly-ui/src/components/select/controllers/validation.controller.ts +236 -0
- package/components/ui/nuraly-ui/src/components/select/index.ts +36 -0
- package/components/ui/nuraly-ui/src/components/select/interfaces/base-controller.interface.ts +155 -0
- package/components/ui/nuraly-ui/src/components/select/interfaces/controller-interfaces.ts +105 -0
- package/components/ui/nuraly-ui/src/components/select/interfaces/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/select/react.ts +30 -0
- package/components/ui/nuraly-ui/src/components/select/select.component.ts +804 -0
- package/components/ui/nuraly-ui/src/components/select/select.constant.ts +142 -0
- package/components/ui/nuraly-ui/src/components/select/select.stories.ts +1653 -0
- package/components/ui/nuraly-ui/src/components/select/select.style.ts +593 -0
- package/components/ui/nuraly-ui/src/components/select/select.types.ts +120 -0
- package/components/ui/nuraly-ui/src/components/skeleton/README.md +373 -0
- package/components/ui/nuraly-ui/src/components/skeleton/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/skeleton/react.ts +10 -0
- package/components/ui/nuraly-ui/src/components/skeleton/skeleton.component.ts +385 -0
- package/components/ui/nuraly-ui/src/components/skeleton/skeleton.stories.ts +425 -0
- package/components/ui/nuraly-ui/src/components/skeleton/skeleton.style.ts +224 -0
- package/components/ui/nuraly-ui/src/components/skeleton/skeleton.types.ts +90 -0
- package/components/ui/nuraly-ui/src/components/slider-input/README.md +145 -0
- package/components/ui/nuraly-ui/src/components/slider-input/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/slider-input/react.ts +12 -0
- package/components/ui/nuraly-ui/src/components/slider-input/slider-input.component.ts +184 -0
- package/components/ui/nuraly-ui/src/components/slider-input/slider-input.stories.ts +361 -0
- package/components/ui/nuraly-ui/src/components/slider-input/slider-input.style.ts +171 -0
- package/components/ui/nuraly-ui/src/components/slider-input/slider-input.style.variables.ts +59 -0
- package/components/ui/nuraly-ui/src/components/slider-input/slider-input.types.ts +24 -0
- package/components/ui/nuraly-ui/src/components/slider-input/utils/debounce.ts +7 -0
- package/components/ui/nuraly-ui/src/components/slider-input/utils/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/table/controllers/base.controller.ts +99 -0
- package/components/ui/nuraly-ui/src/components/table/controllers/filter.controller.ts +163 -0
- package/components/ui/nuraly-ui/src/components/table/controllers/index.ts +11 -0
- package/components/ui/nuraly-ui/src/components/table/controllers/pagination.controller.ts +83 -0
- package/components/ui/nuraly-ui/src/components/table/controllers/selection.controller.ts +143 -0
- package/components/ui/nuraly-ui/src/components/table/controllers/sort.controller.ts +115 -0
- package/components/ui/nuraly-ui/src/components/table/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/table/interfaces/index.ts +7 -0
- package/components/ui/nuraly-ui/src/components/table/interfaces/table-host.interface.ts +53 -0
- package/components/ui/nuraly-ui/src/components/table/react.ts +14 -0
- package/components/ui/nuraly-ui/src/components/table/table.component.ts +344 -0
- package/components/ui/nuraly-ui/src/components/table/table.stories.ts +1072 -0
- package/components/ui/nuraly-ui/src/components/table/table.style.ts +689 -0
- package/components/ui/nuraly-ui/src/components/table/table.types.ts +91 -0
- package/components/ui/nuraly-ui/src/components/table/templates/actions.template.ts +22 -0
- package/components/ui/nuraly-ui/src/components/table/templates/column-filter.template.ts +88 -0
- package/components/ui/nuraly-ui/src/components/table/templates/content.template.ts +257 -0
- package/components/ui/nuraly-ui/src/components/table/templates/empty.template.ts +49 -0
- package/components/ui/nuraly-ui/src/components/table/templates/filter.template.ts +35 -0
- package/components/ui/nuraly-ui/src/components/table/templates/index.ts +7 -0
- package/components/ui/nuraly-ui/src/components/table/templates/loading.template.ts +56 -0
- package/components/ui/nuraly-ui/src/components/table/templates/pagination.template.ts +70 -0
- package/components/ui/nuraly-ui/src/components/tabs/controllers/base.controller.ts +136 -0
- package/components/ui/nuraly-ui/src/components/tabs/controllers/dragdrop.controller.ts +251 -0
- package/components/ui/nuraly-ui/src/components/tabs/controllers/editable.controller.ts +292 -0
- package/components/ui/nuraly-ui/src/components/tabs/controllers/event.controller.ts +294 -0
- package/components/ui/nuraly-ui/src/components/tabs/controllers/index.ts +42 -0
- package/components/ui/nuraly-ui/src/components/tabs/controllers/keyboard.controller.ts +276 -0
- package/components/ui/nuraly-ui/src/components/tabs/controllers/popout.controller.ts +516 -0
- package/components/ui/nuraly-ui/src/components/tabs/index.ts +11 -0
- package/components/ui/nuraly-ui/src/components/tabs/react.ts +52 -0
- package/components/ui/nuraly-ui/src/components/tabs/tabs.component.ts +499 -0
- package/components/ui/nuraly-ui/src/components/tabs/tabs.constant.ts +30 -0
- package/components/ui/nuraly-ui/src/components/tabs/tabs.stories.ts +1334 -0
- package/components/ui/nuraly-ui/src/components/tabs/tabs.style.ts +569 -0
- package/components/ui/nuraly-ui/src/components/tabs/tabs.types.ts +261 -0
- package/components/ui/nuraly-ui/src/components/tag/README.md +22 -0
- package/components/ui/nuraly-ui/src/components/tag/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/tag/react.ts +13 -0
- package/components/ui/nuraly-ui/src/components/tag/tag.component.ts +167 -0
- package/components/ui/nuraly-ui/src/components/tag/tag.stories.ts +50 -0
- package/components/ui/nuraly-ui/src/components/tag/tag.style.ts +89 -0
- package/components/ui/nuraly-ui/src/components/tag/tag.types.ts +30 -0
- package/components/ui/nuraly-ui/src/components/textarea/README.md +314 -0
- package/components/ui/nuraly-ui/src/components/textarea/controllers/base.controller.ts +142 -0
- package/components/ui/nuraly-ui/src/components/textarea/controllers/event.controller.ts +484 -0
- package/components/ui/nuraly-ui/src/components/textarea/controllers/index.ts +16 -0
- package/components/ui/nuraly-ui/src/components/textarea/controllers/validation.controller.ts +347 -0
- package/components/ui/nuraly-ui/src/components/textarea/index.ts +19 -0
- package/components/ui/nuraly-ui/src/components/textarea/react.ts +16 -0
- package/components/ui/nuraly-ui/src/components/textarea/textarea.component.ts +716 -0
- package/components/ui/nuraly-ui/src/components/textarea/textarea.stories.ts +453 -0
- package/components/ui/nuraly-ui/src/components/textarea/textarea.style.ts +387 -0
- package/components/ui/nuraly-ui/src/components/textarea/textarea.types.ts +113 -0
- package/components/ui/nuraly-ui/src/components/timeline/README.md +340 -0
- package/components/ui/nuraly-ui/src/components/timeline/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/timeline/react.ts +9 -0
- package/components/ui/nuraly-ui/src/components/timeline/timeline.component.ts +235 -0
- package/components/ui/nuraly-ui/src/components/timeline/timeline.stories.ts +313 -0
- package/components/ui/nuraly-ui/src/components/timeline/timeline.style.ts +235 -0
- package/components/ui/nuraly-ui/src/components/timeline/timeline.types.ts +75 -0
- package/components/ui/nuraly-ui/src/components/timepicker/README.md +238 -0
- package/components/ui/nuraly-ui/src/components/timepicker/controllers/formatting.controller.ts +230 -0
- package/components/ui/nuraly-ui/src/components/timepicker/controllers/index.ts +9 -0
- package/components/ui/nuraly-ui/src/components/timepicker/controllers/selection.controller.ts +213 -0
- package/components/ui/nuraly-ui/src/components/timepicker/controllers/validation.controller.ts +240 -0
- package/components/ui/nuraly-ui/src/components/timepicker/index.ts +12 -0
- package/components/ui/nuraly-ui/src/components/timepicker/interfaces/timepicker.interface.ts +122 -0
- package/components/ui/nuraly-ui/src/components/timepicker/test/timepicker.test.ts +249 -0
- package/components/ui/nuraly-ui/src/components/timepicker/timepicker.component.ts +786 -0
- package/components/ui/nuraly-ui/src/components/timepicker/timepicker.constants.ts +94 -0
- package/components/ui/nuraly-ui/src/components/timepicker/timepicker.stories.ts +643 -0
- package/components/ui/nuraly-ui/src/components/timepicker/timepicker.style.ts +569 -0
- package/components/ui/nuraly-ui/src/components/timepicker/timepicker.style.variables.ts +122 -0
- package/components/ui/nuraly-ui/src/components/timepicker/timepicker.types.ts +183 -0
- package/components/ui/nuraly-ui/src/components/timepicker/utils/time.utils.ts +288 -0
- package/components/ui/nuraly-ui/src/components/toast/README.md +535 -0
- package/components/ui/nuraly-ui/src/components/toast/controllers/base.controller.ts +105 -0
- package/components/ui/nuraly-ui/src/components/toast/controllers/index.ts +8 -0
- package/components/ui/nuraly-ui/src/components/toast/index.ts +10 -0
- package/components/ui/nuraly-ui/src/components/toast/react.ts +19 -0
- package/components/ui/nuraly-ui/src/components/toast/toast.component.ts +394 -0
- package/components/ui/nuraly-ui/src/components/toast/toast.stories.ts +895 -0
- package/components/ui/nuraly-ui/src/components/toast/toast.style.ts +339 -0
- package/components/ui/nuraly-ui/src/components/toast/toast.types.ts +155 -0
- package/components/ui/nuraly-ui/src/components/tooltips/demo/tooltips-demo.ts +128 -0
- package/components/ui/nuraly-ui/src/components/tooltips/index.ts +1 -0
- package/components/ui/nuraly-ui/src/components/tooltips/react.ts +0 -0
- package/components/ui/nuraly-ui/src/components/tooltips/test/tooltips_test.ts +175 -0
- package/components/ui/nuraly-ui/src/components/tooltips/tooltips.component.ts +282 -0
- package/components/ui/nuraly-ui/src/components/tooltips/tooltips.constant.ts +15 -0
- package/components/ui/nuraly-ui/src/components/tooltips/tooltips.style.ts +103 -0
- package/components/ui/nuraly-ui/src/components/tooltips/tooltips.variables.ts +14 -0
- package/components/ui/nuraly-ui/src/components/video/index.ts +2 -0
- package/components/ui/nuraly-ui/src/components/video/react.ts +17 -0
- package/components/ui/nuraly-ui/src/components/video/video.component.ts +179 -0
- package/components/ui/nuraly-ui/src/components/video/video.stories.ts +289 -0
- package/components/ui/nuraly-ui/src/components/video/video.style.ts +124 -0
- package/components/ui/nuraly-ui/src/components/video/video.types.ts +102 -0
- package/components/ui/nuraly-ui/src/helpers/ThemeHandler.ts +68 -0
- package/components/ui/nuraly-ui/src/helpers/test.ts +8 -0
- package/components/ui/nuraly-ui/src/introduction.stories.ts +161 -0
- package/components/ui/nuraly-ui/src/shared/README.md +87 -0
- package/components/ui/nuraly-ui/src/shared/base-mixin.ts +48 -0
- package/components/ui/nuraly-ui/src/shared/constants.ts +0 -0
- package/components/ui/nuraly-ui/src/shared/controllers/dropdown.controller.ts +393 -0
- package/components/ui/nuraly-ui/src/shared/controllers/dropdown.interface.ts +39 -0
- package/components/ui/nuraly-ui/src/shared/controllers/index.ts +3 -0
- package/components/ui/nuraly-ui/src/shared/controllers/theme.controller.ts +158 -0
- package/components/ui/nuraly-ui/src/shared/dependency-mixin.ts +174 -0
- package/components/ui/nuraly-ui/src/shared/event-handler-mixin.ts +190 -0
- package/components/ui/nuraly-ui/src/shared/index.ts +20 -0
- package/components/ui/nuraly-ui/src/shared/theme-mixin.ts +227 -0
- package/components/ui/nuraly-ui/src/shared/themes/README.md +135 -0
- package/components/ui/nuraly-ui/src/shared/themes/editor/README.md +202 -0
- package/components/ui/nuraly-ui/src/shared/themes/editor.stories.ts +366 -0
- package/components/ui/nuraly-ui/src/shared/themes/index.ts +132 -0
- package/components/ui/nuraly-ui/src/shared/utils.ts +94 -0
- package/components/ui/nuraly-ui/src/shared/validation.types.ts +118 -0
- package/components/ui/nuraly-ui/tools/bump-versions.js +83 -0
- package/components/ui/nuraly-ui/web-dev-server.config.js +25 -0
- package/components/ui/nuraly-ui/web-test-runner.config.js +124 -0
- package/dist/CodeEditor-Ch2tv9BE.js +106211 -0
- package/dist/SmartAttributeHandler-hoSLpm1Y.js +153 -0
- package/dist/abap-B2diVmjb.js +1314 -0
- package/dist/apex-3NuJ-nsI.js +315 -0
- package/dist/assets/editor.worker-vBWydyGC.js +11 -0
- package/dist/assets/html.worker-BSmGlhXp.js +458 -0
- package/dist/assets/json.worker-Dqnoedz4.js +42 -0
- package/dist/assets/ts.worker-DyHHPhrh.js +37021 -0
- package/dist/azcli-XGXuUsMB.js +74 -0
- package/dist/bat-B8Vhm634.js +95 -0
- package/dist/bicep-Cc8X5S_k.js +108 -0
- package/dist/cameligo-Bo3wBh9T.js +168 -0
- package/dist/clojure-CPoQlpIK.js +754 -0
- package/dist/coffee-BxvTGz39.js +228 -0
- package/dist/cpp-5RpEV7vC.js +390 -0
- package/dist/csharp-slXXP3fo.js +320 -0
- package/dist/csp-B98p6-gH.js +57 -0
- package/dist/css-BDsDSAin.js +186 -0
- package/dist/cssMode-Bt2uK8XM.js +1446 -0
- package/dist/cypher-Dc4IMouD.js +262 -0
- package/dist/dart-LhvE3yD2.js +270 -0
- package/dist/dockerfile-CwzplJeZ.js +132 -0
- package/dist/ecl-DxW3FiJi.js +454 -0
- package/dist/elixir-BI40g7TU.js +489 -0
- package/dist/flow9-tR2v0bGz.js +141 -0
- package/dist/freemarker2-DNc2IxPf.js +643 -0
- package/dist/fsharp-BLAma0OT.js +210 -0
- package/dist/go-nYcD3y4Z.js +208 -0
- package/dist/graphql-Dp1cHWmP.js +141 -0
- package/dist/handlebars-CIbFckEw.js +391 -0
- package/dist/hcl-6NT8Kbna.js +177 -0
- package/dist/html-nRs_fneU.js +281 -0
- package/dist/htmlMode-BjehA1YF.js +1456 -0
- package/dist/ini-BZCOLrEc.js +68 -0
- package/dist/java-DAMcfJbX.js +221 -0
- package/dist/javascript-Bn0HduZA.js +75 -0
- package/dist/jsonMode-CfGfcJRX.js +1866 -0
- package/dist/julia-CQ46G71H.js +496 -0
- package/dist/kotlin-CEjVo_6E.js +245 -0
- package/dist/less-DreV99nP.js +168 -0
- package/dist/lexon-DBVJhqLb.js +151 -0
- package/dist/liquid-m4D_LCnC.js +238 -0
- package/dist/lua-Dcc_j6L-.js +157 -0
- package/dist/m3-B9SlZL4n.js +210 -0
- package/dist/markdown-CuGw9_MP.js +202 -0
- package/dist/mdx-CakMRbCr.js +171 -0
- package/dist/micro-app-entry-CI1Rupdh.js +17479 -0
- package/dist/micro-app.bundle.js +8 -0
- package/dist/mips-BUWqP-OH.js +194 -0
- package/dist/msdax-DtkouYCg.js +377 -0
- package/dist/mysql-IkAsWSmF.js +876 -0
- package/dist/objective-c-B2-ronfg.js +188 -0
- package/dist/pascal-Bsnz2eJA.js +245 -0
- package/dist/pascaligo-D_sMUn0Q.js +158 -0
- package/dist/perl-BPzHt9SS.js +599 -0
- package/dist/pgsql-DlTJB0PD.js +847 -0
- package/dist/php-Dmq5OjwK.js +471 -0
- package/dist/pla-HJcccrBy.js +131 -0
- package/dist/postiats-OQn6DKv-.js +544 -0
- package/dist/powerquery-DKaMYC8w.js +890 -0
- package/dist/powershell-DWeJHik1.js +233 -0
- package/dist/protobuf-CBn_IseU.js +422 -0
- package/dist/pug-BoRpCINl.js +393 -0
- package/dist/python-oJwaiPUY.js +259 -0
- package/dist/qsharp-4rGyVZOw.js +282 -0
- package/dist/r-DsgLhBOb.js +245 -0
- package/dist/razor-u_dd4rqc.js +512 -0
- package/dist/redis-B2fdL4Bg.js +298 -0
- package/dist/redshift-DoaeyCkH.js +806 -0
- package/dist/restructuredtext-D-6OFBY9.js +162 -0
- package/dist/ruby-D1DD6baV.js +444 -0
- package/dist/rust-DssUV39M.js +337 -0
- package/dist/sb-Dmb6tAdv.js +110 -0
- package/dist/scala-Co3ETaym.js +353 -0
- package/dist/scheme-CMrqXTty.js +114 -0
- package/dist/scss-DkGudv8Q.js +244 -0
- package/dist/shell-BHN2BI4L.js +224 -0
- package/dist/solidity-b-R-raGB.js +1351 -0
- package/dist/sophia-Y4GjyxNB.js +190 -0
- package/dist/sparql-CDAPZb88.js +193 -0
- package/dist/sql-DkkpPiUq.js +818 -0
- package/dist/st-CSPV91Ej.js +415 -0
- package/dist/style.css +1 -0
- package/dist/swift-DdSC5O48.js +315 -0
- package/dist/systemverilog-CI03XpAv.js +556 -0
- package/dist/tcl-B8DayMSI.js +232 -0
- package/dist/tsMode-DlZ38d3D.js +813 -0
- package/dist/twig-B1AUPVB_.js +323 -0
- package/dist/typescript-Bjs2N5Be.js +328 -0
- package/dist/vb-BIC7ccdG.js +364 -0
- package/dist/wgsl-Bv2xeo60.js +420 -0
- package/dist/xml-BCveATLl.js +95 -0
- package/dist/yaml-BfWQPJQi.js +184 -0
- package/handlers/compiler.ts +362 -0
- package/handlers/context-setup.ts +349 -0
- package/handlers/handler-executor.ts +348 -0
- package/handlers/index.ts +184 -0
- package/handlers/runtime-api/applications.ts +18 -0
- package/handlers/runtime-api/component-properties.ts +78 -0
- package/handlers/runtime-api/components.ts +63 -0
- package/handlers/runtime-api/editor.ts +29 -0
- package/handlers/runtime-api/functions.ts +42 -0
- package/handlers/runtime-api/index.ts +221 -0
- package/handlers/runtime-api/navigation.ts +52 -0
- package/handlers/runtime-api/pages.ts +45 -0
- package/handlers/runtime-api/storage.ts +95 -0
- package/handlers/runtime-api/toast.ts +108 -0
- package/handlers/runtime-api/variables.ts +400 -0
- package/index.ts +188 -0
- package/micro-app/README.md +565 -0
- package/micro-app/index.ts +29 -0
- package/micro-app/messaging/MicroAppMessageBus.ts +246 -0
- package/micro-app/state/MicroAppPageManager.ts +275 -0
- package/micro-app/state/MicroAppRuntimeContext.ts +423 -0
- package/micro-app/state/MicroAppStoreContext.ts +441 -0
- package/micro-app/state/SharedVariableRegistry.ts +187 -0
- package/micro-app/state/VariableScopeManager.ts +310 -0
- package/micro-app/utils/ComponentNamespaceManager.ts +88 -0
- package/micro-app-entry.ts +34 -0
- package/package.json +119 -0
- package/redux/actions/aitchat.ts +17 -0
- package/redux/actions/application/addPageToApplicationAction.ts +14 -0
- package/redux/actions/application/addTempApplication.ts +8 -0
- package/redux/actions/application/closeShareApplicationModalAction.ts +5 -0
- package/redux/actions/application/index.ts +20 -0
- package/redux/actions/application/loadApplicationPermissionAction.ts +10 -0
- package/redux/actions/application/resetPermissionMessage.ts +8 -0
- package/redux/actions/application/setApplication.ts +5 -0
- package/redux/actions/application/setApplicationPermissionAction.ts +6 -0
- package/redux/actions/application/setDefaultApplicationPageIfNotSet.ts +12 -0
- package/redux/actions/application/setPermissionMessage.ts +8 -0
- package/redux/actions/application/showCreateApplicationModalAction.ts +5 -0
- package/redux/actions/application/showShareApplicationModalAction.ts +5 -0
- package/redux/actions/application/updateApplication.ts +16 -0
- package/redux/actions/component/addComponentAction.ts +90 -0
- package/redux/actions/component/addComponentAsChildOf.ts +29 -0
- package/redux/actions/component/addComponentToCurrentPageAction.ts +32 -0
- package/redux/actions/component/copyComponentAction.ts +12 -0
- package/redux/actions/component/deleteComponentAction.ts +52 -0
- package/redux/actions/component/index.ts +22 -0
- package/redux/actions/component/moveDraggedComponent.ts +130 -0
- package/redux/actions/component/moveDraggedComponentInside.ts +64 -0
- package/redux/actions/component/moveDraggedComponentIntoCurrentPageRoot.ts +50 -0
- package/redux/actions/component/setCurrentComponentIdAction.ts +6 -0
- package/redux/actions/component/setDraggingComponentInfo.ts +14 -0
- package/redux/actions/component/setHoveredComponentAction.ts +5 -0
- package/redux/actions/component/setHoveredComponentIdAction.ts +5 -0
- package/redux/actions/component/update-component-name.ts +63 -0
- package/redux/actions/component/updateComponentAttributes.ts +192 -0
- package/redux/actions/component.ts +25 -0
- package/redux/actions/debug/index.ts +1 -0
- package/redux/actions/debug/store.ts +72 -0
- package/redux/actions/editor/closeCreateApplicationModalAction.ts +5 -0
- package/redux/actions/editor/closeEditorTab.ts +9 -0
- package/redux/actions/editor/index.ts +12 -0
- package/redux/actions/editor/openEditorTab.ts +12 -0
- package/redux/actions/editor/setCurrentEditorTab.ts +8 -0
- package/redux/actions/editor/setEnvirementMode.ts +8 -0
- package/redux/actions/environment.ts +5 -0
- package/redux/actions/index.ts +28 -0
- package/redux/actions/kernel/index.ts +1 -0
- package/redux/actions/kernel/set-property.ts +0 -0
- package/redux/actions/page/addPageAction.ts +7 -0
- package/redux/actions/page/deletePageAction.ts +13 -0
- package/redux/actions/page/index.ts +12 -0
- package/redux/actions/page/removeComponentToCurrentPageAction.ts +32 -0
- package/redux/actions/page/setContextMenuEvent.ts +5 -0
- package/redux/actions/page/setCurrentPageAction.ts +6 -0
- package/redux/actions/page/setCurrentPageViewPort.ts +5 -0
- package/redux/actions/page/setResizing.ts +5 -0
- package/redux/actions/page/setShowBorder.ts +5 -0
- package/redux/actions/page/updatePageAction.ts +20 -0
- package/redux/actions/page/updatePageInfo.ts +5 -0
- package/redux/actions/page/updatePageStyleAttributes.ts +13 -0
- package/redux/actions/page/updatePageZoom.ts +5 -0
- package/redux/handlers/aichat/create-chat.handler.ts +22 -0
- package/redux/handlers/api-urls.ts +8 -0
- package/redux/handlers/applications/handler.ts +78 -0
- package/redux/handlers/applications/index.ts +1 -0
- package/redux/handlers/components/add-component.handler.ts +30 -0
- package/redux/handlers/components/delete-component.handler.ts +21 -0
- package/redux/handlers/components/index.ts +6 -0
- package/redux/handlers/components/interfaces/add-component.request.ts +4 -0
- package/redux/handlers/components/interfaces/index.ts +2 -0
- package/redux/handlers/components/interfaces/update-component.reques.ts +3 -0
- package/redux/handlers/components/refresh-component.ts +25 -0
- package/redux/handlers/components/update-component.handler.ts +32 -0
- package/redux/handlers/components/validation-handler.ts +45 -0
- package/redux/handlers/functions/build-function-handler.ts +10 -0
- package/redux/handlers/functions/deploy-function-handler.ts +10 -0
- package/redux/handlers/functions/index.ts +13 -0
- package/redux/handlers/functions/invoke-function-handler.ts +13 -0
- package/redux/handlers/functions/load-functions-handler.ts +10 -0
- package/redux/handlers/functions/update-function-handler.ts +13 -0
- package/redux/handlers/index.ts +10 -0
- package/redux/handlers/pages/deletePageHandler.ts +23 -0
- package/redux/handlers/pages/handler.ts +59 -0
- package/redux/handlers/pages/index.ts +4 -0
- package/redux/handlers/pages/page.interface.ts +14 -0
- package/redux/handlers/pages/refresh-pages.ts +26 -0
- package/redux/handlers/providers/interface.ts +7 -0
- package/redux/index.ts +8 -0
- package/redux/store/actions/component.ts +9 -0
- package/redux/store/apps.ts +160 -0
- package/redux/store/component/component.interface.ts +90 -0
- package/redux/store/component/helper.ts +78 -0
- package/redux/store/component/index.ts +51 -0
- package/redux/store/component/runtime-store.ts +0 -0
- package/redux/store/component/store.ts +306 -0
- package/redux/store/context.ts +138 -0
- package/redux/store/debug.ts +28 -0
- package/redux/store/environment.ts +20 -0
- package/redux/store/index.ts +77 -0
- package/redux/store/interfaces/component.interfaces.ts +4 -0
- package/redux/store/page.ts +105 -0
- package/redux/store/provider.ts +24 -0
- package/redux/store/ssr/server-data.ts +4 -0
- package/redux/store/toast.ts +26 -0
- package/state/editor.ts +370 -0
- package/state/index.ts +27 -0
- package/state/runtime-context.ts +784 -0
- package/types/IRuntimeContext.ts +203 -0
- package/types/core.types.ts +28 -0
- package/types/database.types.ts +395 -0
- package/types/index.ts +7 -0
- package/utils/RuntimeContextHelpers.ts +454 -0
- package/utils/api-calls-utils.ts +9 -0
- package/utils/change-detection.ts +58 -0
- package/utils/clipboard-utils.ts +113 -0
- package/utils/constants.ts +2 -0
- package/utils/envirement.ts +2 -0
- package/utils/handler-security-rules.ts +153 -0
- package/utils/handler-validator.ts +447 -0
- package/utils/index.ts +67 -0
- package/utils/local-storage.ts +26 -0
- package/utils/logger.ts +90 -0
- package/utils/memoize.ts +15 -0
- package/utils/naming-generator.ts +6 -0
- package/utils/object.utils.ts +15 -0
- package/utils/performance-utils.ts +589 -0
- package/utils/randomness.ts +3 -0
- package/utils/register-components.ts +49 -0
- package/utils/render-util.ts +173 -0
- package/utils/runtime-helpers.ts +57 -0
- package/utils/styleUtil.ts +7 -0
- package/utils/time.ts +7 -0
- package/utils/validation-error-formatter.ts +11 -0
- package/vite.config.ts +83 -0
|
@@ -0,0 +1,784 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Runtime Context - Core State Management System
|
|
3
|
+
* @module Runtime/State/RuntimeContext
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* The RuntimeContext module provides the foundational state management system
|
|
7
|
+
* for the Nuraly runtime engine. It serves as the central nervous system that
|
|
8
|
+
* coordinates component lifecycle, reactive state, and handler execution.
|
|
9
|
+
*
|
|
10
|
+
* **Core Responsibilities:**
|
|
11
|
+
*
|
|
12
|
+
* 1. **Component Registry Management**
|
|
13
|
+
* - Maintains a centralized registry of all components across applications
|
|
14
|
+
* - Indexes components by both application ID and component name
|
|
15
|
+
* - Provides fast lookup for component access in handlers
|
|
16
|
+
*
|
|
17
|
+
* 2. **Reactive State System**
|
|
18
|
+
* - Creates and manages Proxy objects for reactive state
|
|
19
|
+
* - Tracks property access and mutations automatically
|
|
20
|
+
* - Emits change events for dependent component updates
|
|
21
|
+
* - Implements smart caching to avoid proxy recreation
|
|
22
|
+
*
|
|
23
|
+
* 3. **Component Hierarchy**
|
|
24
|
+
* - Builds and maintains parent-child component relationships
|
|
25
|
+
* - Resolves component IDs to actual component objects
|
|
26
|
+
* - Provides traversal capabilities for component trees
|
|
27
|
+
*
|
|
28
|
+
* 4. **Runtime Values Management**
|
|
29
|
+
* - Attaches reactive `Instance` properties to components
|
|
30
|
+
* - Backs component state with centralized `$runtimeValues` store
|
|
31
|
+
* - Provides persistent, reactive component-scoped state
|
|
32
|
+
*
|
|
33
|
+
* 5. **Store Integration**
|
|
34
|
+
* - Subscribes to nanostores (`$components`, `$applications`, `$context`)
|
|
35
|
+
* - Synchronizes internal state with store updates
|
|
36
|
+
* - Triggers re-registration on store changes
|
|
37
|
+
*
|
|
38
|
+
* **State Flow:**
|
|
39
|
+
* ```
|
|
40
|
+
* User Action (e.g., set variable)
|
|
41
|
+
* │
|
|
42
|
+
* ▼
|
|
43
|
+
* VarsProxy.username = 'John'
|
|
44
|
+
* │
|
|
45
|
+
* ▼
|
|
46
|
+
* Proxy intercepts set operation
|
|
47
|
+
* │
|
|
48
|
+
* ├─▶ Update internal state
|
|
49
|
+
* ├─▶ Emit change event
|
|
50
|
+
* └─▶ Trigger dependent updates
|
|
51
|
+
* │
|
|
52
|
+
* ▼
|
|
53
|
+
* Components Re-render
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* **Component Registration Flow:**
|
|
57
|
+
* ```
|
|
58
|
+
* Store Update ($components changes)
|
|
59
|
+
* │
|
|
60
|
+
* ▼
|
|
61
|
+
* registerApplications()
|
|
62
|
+
* │
|
|
63
|
+
* ├─▶ 1. Index all components by app ID and name
|
|
64
|
+
* ├─▶ 2. Initialize children arrays
|
|
65
|
+
* ├─▶ 3. Attach Instance (values) properties
|
|
66
|
+
* ├─▶ 4. Resolve childrenIds to children objects
|
|
67
|
+
* ├─▶ 5. Set parent references
|
|
68
|
+
* └─▶ 6. Update Editor.components
|
|
69
|
+
* │
|
|
70
|
+
* ▼
|
|
71
|
+
* Components Ready for Use
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* **Proxy System:**
|
|
75
|
+
*
|
|
76
|
+
* The RuntimeContext uses JavaScript Proxies extensively for reactivity:
|
|
77
|
+
*
|
|
78
|
+
* - **PropertiesProxy**: Tracks component property access/mutations
|
|
79
|
+
* - **VarsProxy**: Tracks variable access/mutations (GetVar/SetVar)
|
|
80
|
+
* - **Style Proxies**: Tracks style property changes (per component)
|
|
81
|
+
* - **Values Proxies**: Tracks component Instance property changes (per component)
|
|
82
|
+
*
|
|
83
|
+
* All proxies emit events on changes, enabling reactive component updates.
|
|
84
|
+
*
|
|
85
|
+
* **Caching Strategy:**
|
|
86
|
+
*
|
|
87
|
+
* - **Style Proxies**: Cached in WeakMap by style object
|
|
88
|
+
* - **Values Proxies**: Cached in WeakMap by component object
|
|
89
|
+
* - **Property Listeners**: Cached in Map by property name
|
|
90
|
+
*
|
|
91
|
+
* WeakMaps are used to allow garbage collection when objects are no longer referenced.
|
|
92
|
+
*
|
|
93
|
+
* **Performance Optimizations:**
|
|
94
|
+
*
|
|
95
|
+
* 1. **Lazy Initialization**: Components registered only when stores update
|
|
96
|
+
* 2. **Smart Caching**: Proxies cached and reused to avoid recreation overhead
|
|
97
|
+
* 3. **Deep Equality**: Changes only emit events if values actually differ
|
|
98
|
+
* 4. **Debounced Registration**: Store subscriptions prevent excessive re-registration
|
|
99
|
+
* 5. **WeakMap Caching**: Automatic garbage collection prevents memory leaks
|
|
100
|
+
*
|
|
101
|
+
* **Debug Mode:**
|
|
102
|
+
*
|
|
103
|
+
* Set `DEBUG = true` to enable verbose console logging:
|
|
104
|
+
* - Property access operations
|
|
105
|
+
* - Property set operations
|
|
106
|
+
* - Proxy creation
|
|
107
|
+
* - Event emissions
|
|
108
|
+
* - Component registration steps
|
|
109
|
+
*
|
|
110
|
+
* @example Basic Usage
|
|
111
|
+
* ```typescript
|
|
112
|
+
* import { ExecuteInstance } from './';
|
|
113
|
+
*
|
|
114
|
+
* // Access component by name
|
|
115
|
+
* const button = ExecuteInstance.applications['app-id']['MyButton'];
|
|
116
|
+
*
|
|
117
|
+
* // Access via Apps (by application name)
|
|
118
|
+
* const myApp = ExecuteInstance.Apps['MyAppName'];
|
|
119
|
+
* const button2 = myApp['MyButton'];
|
|
120
|
+
*
|
|
121
|
+
* // Set variable (reactive)
|
|
122
|
+
* ExecuteInstance.VarsProxy.username = 'John Doe';
|
|
123
|
+
*
|
|
124
|
+
* // Get variable
|
|
125
|
+
* const username = ExecuteInstance.GetVar('username');
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* @example Component Hierarchy
|
|
129
|
+
* ```typescript
|
|
130
|
+
* // Access component hierarchy
|
|
131
|
+
* const container = ExecuteInstance.applications['app-id']['Container'];
|
|
132
|
+
*
|
|
133
|
+
* console.log(container.children); // [child1, child2, ...]
|
|
134
|
+
* console.log(container.children[0].parent === container); // true
|
|
135
|
+
*
|
|
136
|
+
* // Traverse up the hierarchy
|
|
137
|
+
* let current = someComponent;
|
|
138
|
+
* while (current.parent) {
|
|
139
|
+
* console.log(`Parent: ${current.parent.name}`);
|
|
140
|
+
* current = current.parent;
|
|
141
|
+
* }
|
|
142
|
+
* ```
|
|
143
|
+
*
|
|
144
|
+
* @example Component Values (Instance)
|
|
145
|
+
* ```typescript
|
|
146
|
+
* const button = ExecuteInstance.applications['app-id']['MyButton'];
|
|
147
|
+
*
|
|
148
|
+
* // Component Instance is reactive
|
|
149
|
+
* button.Instance.clickCount = 0;
|
|
150
|
+
* button.Instance.clickCount++; // Emits event
|
|
151
|
+
*
|
|
152
|
+
* // Access in handler code
|
|
153
|
+
* // Handler: "Current.Instance.clickCount++"
|
|
154
|
+
* ```
|
|
155
|
+
*
|
|
156
|
+
* @example Reactive Variables
|
|
157
|
+
* ```typescript
|
|
158
|
+
* // VarsProxy is reactive
|
|
159
|
+
* ExecuteInstance.VarsProxy.theme = 'dark';
|
|
160
|
+
*
|
|
161
|
+
* // Listen for changes
|
|
162
|
+
* eventDispatcher.on('Vars:theme', ({ value }) => {
|
|
163
|
+
* console.log('Theme changed to:', value);
|
|
164
|
+
* });
|
|
165
|
+
*
|
|
166
|
+
* // Change triggers event
|
|
167
|
+
* ExecuteInstance.VarsProxy.theme = 'light'; // Event emitted
|
|
168
|
+
* ```
|
|
169
|
+
*
|
|
170
|
+
* @see {@link RuntimeContext} - Main class definition
|
|
171
|
+
* @see {@link ExecuteInstance} - Exported singleton
|
|
172
|
+
* @see {@link Editor} - Editor state management
|
|
173
|
+
* @see {@link executeHandler} - Handler execution
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
import { $applications } from '../redux/store/apps';
|
|
178
|
+
import {
|
|
179
|
+
$components,
|
|
180
|
+
setcomponentRuntimeStyleAttribute,
|
|
181
|
+
$runtimeValues,
|
|
182
|
+
setComponentRuntimeValue,
|
|
183
|
+
setComponentRuntimeValues
|
|
184
|
+
} from '../redux/store/component/store';
|
|
185
|
+
import type { ComponentElement } from '../redux/store/component/component.interface';
|
|
186
|
+
import { $context, getVar } from '../redux/store/context';
|
|
187
|
+
import { isServer } from '../utils/envirement';
|
|
188
|
+
import { eventDispatcher } from '../utils/change-detection';
|
|
189
|
+
import Editor from "./editor";
|
|
190
|
+
import { executeHandler } from "../handlers/handler-executor";
|
|
191
|
+
import type { IRuntimeContext } from "../types/IRuntimeContext";
|
|
192
|
+
import { RuntimeContextHelpers } from "../utils/RuntimeContextHelpers";
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Debug flag for verbose logging.
|
|
196
|
+
* Set to `true` to enable detailed console logs for:
|
|
197
|
+
* - Property access and mutations
|
|
198
|
+
* - Proxy creation and caching
|
|
199
|
+
* - Component registration steps
|
|
200
|
+
* - Event emissions
|
|
201
|
+
*
|
|
202
|
+
* @constant
|
|
203
|
+
* @type {boolean}
|
|
204
|
+
* @default false
|
|
205
|
+
*/
|
|
206
|
+
const DEBUG = false;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* @class RuntimeContext
|
|
210
|
+
* @description The core runtime execution engine for the Nuraly visual application builder
|
|
211
|
+
*
|
|
212
|
+
* RuntimeContext is a singleton that manages the entire component runtime system.
|
|
213
|
+
* It serves as the central hub for:
|
|
214
|
+
*
|
|
215
|
+
* **1. State Management**
|
|
216
|
+
* - Global context variables (`context`)
|
|
217
|
+
* - Application registry (`applications`, `Apps`)
|
|
218
|
+
* - Component values (`Values`)
|
|
219
|
+
* - Component properties (`Properties`)
|
|
220
|
+
* - Runtime variables (`Vars`)
|
|
221
|
+
*
|
|
222
|
+
* **2. Reactive System**
|
|
223
|
+
* - Proxy-based change detection (`PropertiesProxy`, `VarsProxy`)
|
|
224
|
+
* - Component property access tracking
|
|
225
|
+
* - Automatic change event emission
|
|
226
|
+
* - Style and value proxies with caching
|
|
227
|
+
*
|
|
228
|
+
* **3. Component Lifecycle**
|
|
229
|
+
* - Component registration from stores
|
|
230
|
+
* - Hierarchy building (parent-child relationships)
|
|
231
|
+
* - Children array initialization
|
|
232
|
+
* - Runtime values attachment
|
|
233
|
+
*
|
|
234
|
+
* **4. Event System**
|
|
235
|
+
* - Property change listeners
|
|
236
|
+
* - Component update events
|
|
237
|
+
* - Store subscription management
|
|
238
|
+
* - Change event dispatching
|
|
239
|
+
*
|
|
240
|
+
* **Architecture:**
|
|
241
|
+
* ```
|
|
242
|
+
* Nanostores ($components, $applications, $context)
|
|
243
|
+
* │
|
|
244
|
+
* ▼
|
|
245
|
+
* RuntimeContext.registerApplications()
|
|
246
|
+
* │
|
|
247
|
+
* ├─▶ Build component registry
|
|
248
|
+
* ├─▶ Create component hierarchy
|
|
249
|
+
* ├─▶ Attach values proxies
|
|
250
|
+
* └─▶ Update Editor.components
|
|
251
|
+
* │
|
|
252
|
+
* ▼
|
|
253
|
+
* Reactive Proxies (PropertiesProxy, VarsProxy)
|
|
254
|
+
* │
|
|
255
|
+
* ▼
|
|
256
|
+
* Handler Execution (executeHandler)
|
|
257
|
+
* │
|
|
258
|
+
* ▼
|
|
259
|
+
* Component Updates & Re-renders
|
|
260
|
+
* ```
|
|
261
|
+
*
|
|
262
|
+
* **Key Responsibilities:**
|
|
263
|
+
*
|
|
264
|
+
* 1. **Component Registration**
|
|
265
|
+
* - Listens to `$components` store changes
|
|
266
|
+
* - Indexes components by application ID and name
|
|
267
|
+
* - Builds parent-child relationships
|
|
268
|
+
*
|
|
269
|
+
* 2. **Hierarchy Management**
|
|
270
|
+
* - Resolves component.childrenIds to actual children
|
|
271
|
+
* - Sets component.parent references
|
|
272
|
+
* - Maintains bidirectional relationships
|
|
273
|
+
*
|
|
274
|
+
* 3. **Reactive Proxies**
|
|
275
|
+
* - Creates proxies that track property access
|
|
276
|
+
* - Emits events when properties change
|
|
277
|
+
* - Caches proxies to avoid recreation
|
|
278
|
+
*
|
|
279
|
+
* 4. **Values Management**
|
|
280
|
+
* - Attaches `Instance` property to components
|
|
281
|
+
* - Backs `Instance` with `$runtimeValues` store
|
|
282
|
+
* - Provides reactive component state
|
|
283
|
+
*
|
|
284
|
+
* 5. **Style Tracking**
|
|
285
|
+
* - Creates style proxies for reactive updates
|
|
286
|
+
* - Caches style proxies per component
|
|
287
|
+
* - Calls `setcomponentRuntimeStyleAttribute` on changes
|
|
288
|
+
*
|
|
289
|
+
* **Usage Patterns:**
|
|
290
|
+
*
|
|
291
|
+
* ```typescript
|
|
292
|
+
* // Access the singleton
|
|
293
|
+
* import { ExecuteInstance } from '..';
|
|
294
|
+
*
|
|
295
|
+
* // Access component registry
|
|
296
|
+
* const myApp = ExecuteInstance.Apps['MyApp'];
|
|
297
|
+
* const button = ExecuteInstance.applications['app-id']['ButtonComponent'];
|
|
298
|
+
*
|
|
299
|
+
* // Access/set variables via reactive proxy
|
|
300
|
+
* ExecuteInstance.VarsProxy.username = 'John Doe';
|
|
301
|
+
* const theme = ExecuteInstance.VarsProxy.theme;
|
|
302
|
+
*
|
|
303
|
+
* // Get variable with GetVar function
|
|
304
|
+
* const count = ExecuteInstance.GetVar('count');
|
|
305
|
+
*
|
|
306
|
+
* // Access current component context
|
|
307
|
+
* console.log(ExecuteInstance.Current.name);
|
|
308
|
+
* ```
|
|
309
|
+
*
|
|
310
|
+
* **Singleton Pattern:**
|
|
311
|
+
* Only one instance exists per application runtime. Access via:
|
|
312
|
+
* - `RuntimeContext.getInstance()`
|
|
313
|
+
* - Or the exported `ExecuteInstance` constant
|
|
314
|
+
*
|
|
315
|
+
* **Performance Considerations:**
|
|
316
|
+
* - Proxies are cached to avoid recreation
|
|
317
|
+
* - Component registration is debounced via store subscriptions
|
|
318
|
+
* - Deep equality checks prevent unnecessary updates
|
|
319
|
+
* - WeakMap used for garbage-collectable caches
|
|
320
|
+
*
|
|
321
|
+
* @example Accessing Runtime State
|
|
322
|
+
* ```typescript
|
|
323
|
+
* // Get all components in an application
|
|
324
|
+
* const appComponents = ExecuteInstance.applications['app-id'];
|
|
325
|
+
* Object.values(appComponents).forEach(component => {
|
|
326
|
+
* console.log(component.name);
|
|
327
|
+
* });
|
|
328
|
+
*
|
|
329
|
+
* // Access application by name
|
|
330
|
+
* const myApp = ExecuteInstance.Apps['MyAppName'];
|
|
331
|
+
*
|
|
332
|
+
* // Set and get variables
|
|
333
|
+
* ExecuteInstance.VarsProxy.counter = 0;
|
|
334
|
+
* ExecuteInstance.VarsProxy.counter++; // Triggers change events
|
|
335
|
+
* console.log(ExecuteInstance.VarsProxy.counter); // 1
|
|
336
|
+
* ```
|
|
337
|
+
*
|
|
338
|
+
* @example Component Hierarchy
|
|
339
|
+
* ```typescript
|
|
340
|
+
* // After registration, components have hierarchy:
|
|
341
|
+
* const container = ExecuteInstance.applications['app-id']['Container'];
|
|
342
|
+
* console.log(container.children); // [child1, child2, ...]
|
|
343
|
+
* console.log(container.children[0].parent === container); // true
|
|
344
|
+
* ```
|
|
345
|
+
*
|
|
346
|
+
* @example Component Values
|
|
347
|
+
* ```typescript
|
|
348
|
+
* // Access component instance values
|
|
349
|
+
* const button = ExecuteInstance.applications['app-id']['MyButton'];
|
|
350
|
+
*
|
|
351
|
+
* // Set value (reactive)
|
|
352
|
+
* button.Instance.clickCount = 0;
|
|
353
|
+
* button.Instance.clickCount++; // Triggers events
|
|
354
|
+
*
|
|
355
|
+
* // Get value
|
|
356
|
+
* console.log(button.Instance.clickCount); // 1
|
|
357
|
+
* ```
|
|
358
|
+
*
|
|
359
|
+
* @see {@link ExecuteInstance} - Exported singleton instance
|
|
360
|
+
* @see {@link RuntimeInstance} - Alternative export name
|
|
361
|
+
* @see {@link executeHandler} - Handler execution function
|
|
362
|
+
*/
|
|
363
|
+
class RuntimeContext implements IRuntimeContext {
|
|
364
|
+
/** Singleton instance of the RuntimeContext */
|
|
365
|
+
static instance: RuntimeContext;
|
|
366
|
+
|
|
367
|
+
/** Global context registry */
|
|
368
|
+
context: Record<string, any> = {};
|
|
369
|
+
|
|
370
|
+
/** Applications registry by ID */
|
|
371
|
+
applications: Record<string, any> = {};
|
|
372
|
+
|
|
373
|
+
/** Applications registry by name */
|
|
374
|
+
Apps: Record<string, any> = {};
|
|
375
|
+
|
|
376
|
+
/** Component values registry */
|
|
377
|
+
Values: Record<string, any> = {};
|
|
378
|
+
|
|
379
|
+
/** Component properties registry */
|
|
380
|
+
Properties: Record<string, any> = {};
|
|
381
|
+
|
|
382
|
+
/** Variables registry */
|
|
383
|
+
Vars: Record<string, any> = {};
|
|
384
|
+
|
|
385
|
+
/** Reactive proxy for component properties */
|
|
386
|
+
PropertiesProxy: Record<string, any> = {};
|
|
387
|
+
|
|
388
|
+
/** Reactive proxy for variables */
|
|
389
|
+
VarsProxy: Record<string, any> = {};
|
|
390
|
+
|
|
391
|
+
/** Currently active component context */
|
|
392
|
+
Current: Record<string, any> = {};
|
|
393
|
+
|
|
394
|
+
/** Current platform information */
|
|
395
|
+
currentPlatform: any;
|
|
396
|
+
|
|
397
|
+
/** Property change listeners map */
|
|
398
|
+
private listeners: Record<string, Set<string>> = {};
|
|
399
|
+
|
|
400
|
+
/** Cache for style proxies to avoid recreation */
|
|
401
|
+
styleProxyCache = new WeakMap();
|
|
402
|
+
|
|
403
|
+
/** Cache for values proxies to avoid recreation */
|
|
404
|
+
valuesProxyCache = new WeakMap();
|
|
405
|
+
|
|
406
|
+
/** Function to set component runtime style attributes */
|
|
407
|
+
setcomponentRuntimeStyleAttribute: (componentId: string, attribute: string, value: string) => void;
|
|
408
|
+
|
|
409
|
+
/** Function to retrieve variable values */
|
|
410
|
+
GetVar: (symbol: string) => any;
|
|
411
|
+
|
|
412
|
+
/** Function to retrieve context variables */
|
|
413
|
+
GetContextVar: any;
|
|
414
|
+
|
|
415
|
+
/** Event object */
|
|
416
|
+
Event: Event;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Private constructor to enforce singleton pattern.
|
|
420
|
+
* Initializes the executor system and sets up event listeners.
|
|
421
|
+
*/
|
|
422
|
+
private constructor() {
|
|
423
|
+
if(isServer){
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
this.PropertiesProxy = this.createProxy(this.Properties);
|
|
427
|
+
this.VarsProxy = this.createProxy(this.Vars, 'Vars');
|
|
428
|
+
this.registerContext();
|
|
429
|
+
$applications.subscribe(() => this.registerApplications());
|
|
430
|
+
$components.subscribe(() => this.registerApplications());
|
|
431
|
+
eventDispatcher.on("component:refresh", () => this.registerApplications())
|
|
432
|
+
eventDispatcher.on("component:updated", () => this.registerApplications())
|
|
433
|
+
|
|
434
|
+
if (DEBUG) {
|
|
435
|
+
console.log("Executor initialized with debug mode enabled.");
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Updates the editor context with selected components.
|
|
441
|
+
* Filters the current application's components based on selection state.
|
|
442
|
+
*/
|
|
443
|
+
updateEditorContext() {
|
|
444
|
+
const selectedComponensIds = this.Vars.selectedComponents || []
|
|
445
|
+
const currentEditingApplicationUUID = getVar("global", "currentEditingApplication")?.value?.uuid;
|
|
446
|
+
Editor.Vars = Editor.Vars ?? {}
|
|
447
|
+
Editor.selectedComponents = this.createProxy(Object.values(this.applications[currentEditingApplicationUUID] || {}).filter((c: ComponentElement) => selectedComponensIds.includes(c.uuid)));
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Creates a reactive proxy for the target object.
|
|
452
|
+
* Tracks property access and changes, triggers events on property updates.
|
|
453
|
+
*
|
|
454
|
+
* Uses RuntimeContextHelpers to eliminate code duplication with MicroAppRuntimeContext.
|
|
455
|
+
*
|
|
456
|
+
* @param target - Object to be proxied
|
|
457
|
+
* @param scope - Optional scope name for event namespacing
|
|
458
|
+
* @returns Reactive proxy for the target object
|
|
459
|
+
*/
|
|
460
|
+
createProxy(target: any, scope?: string): any {
|
|
461
|
+
return RuntimeContextHelpers.createReactiveProxy(target, {
|
|
462
|
+
eventPrefix: '', // Empty prefix for global context (no scoping)
|
|
463
|
+
scope,
|
|
464
|
+
listeners: this.listeners,
|
|
465
|
+
current: this.Current,
|
|
466
|
+
onPropertyChange: (prop: string, value: any, listeners: Set<string>) => {
|
|
467
|
+
// Emit events to all listeners for this property
|
|
468
|
+
listeners.forEach((componentName: string) => {
|
|
469
|
+
eventDispatcher.emit(`component-property-changed:${componentName}`, {
|
|
470
|
+
prop,
|
|
471
|
+
value, // IMPORTANT: Include value in event data
|
|
472
|
+
ctx: this.Current
|
|
473
|
+
});
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
// IMPORTANT: Emit global variable change events for micro-apps to listen to
|
|
477
|
+
// This ensures that when global RuntimeContext changes a variable, all micro-apps are notified
|
|
478
|
+
if (scope === 'Vars') {
|
|
479
|
+
if (DEBUG) {
|
|
480
|
+
console.log(`[RuntimeContext] Emitting global variable change: ${prop} = ${value}`);
|
|
481
|
+
}
|
|
482
|
+
eventDispatcher.emit('global:variable:changed', {
|
|
483
|
+
varName: prop,
|
|
484
|
+
name: prop,
|
|
485
|
+
value,
|
|
486
|
+
oldValue: undefined // Global context doesn't track oldValue
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
debug: DEBUG
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Attaches a values property to the component that is backed by $runtimeValues.
|
|
496
|
+
* Creates a reactive proxy that interacts with the global runtime values store.
|
|
497
|
+
*
|
|
498
|
+
* Uses RuntimeContextHelpers to eliminate code duplication with MicroAppRuntimeContext.
|
|
499
|
+
*
|
|
500
|
+
* @param component - The component to attach the values property to
|
|
501
|
+
*/
|
|
502
|
+
attachValuesProperty(component: any) {
|
|
503
|
+
const componentId = component.uniqueUUID;
|
|
504
|
+
|
|
505
|
+
if (!componentId) {
|
|
506
|
+
console.error('Cannot attach values property: component uniqueUUID is undefined');
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
// Use RuntimeContextHelpers to create the values proxy
|
|
511
|
+
const valuesProxy = RuntimeContextHelpers.createValuesProxy(
|
|
512
|
+
component,
|
|
513
|
+
{
|
|
514
|
+
// Backend: Global runtime values store
|
|
515
|
+
get: (id: string, prop: string) => {
|
|
516
|
+
const runtimeValues = $runtimeValues.get();
|
|
517
|
+
return runtimeValues[id]?.[prop];
|
|
518
|
+
},
|
|
519
|
+
set: (id: string, prop: string, value: any) => {
|
|
520
|
+
setComponentRuntimeValue(id, prop, value);
|
|
521
|
+
},
|
|
522
|
+
has: (id: string, prop: string) => {
|
|
523
|
+
const runtimeValues = $runtimeValues.get();
|
|
524
|
+
return prop in (runtimeValues[id] || {});
|
|
525
|
+
},
|
|
526
|
+
delete: (id: string, prop: string) => {
|
|
527
|
+
const runtimeValues = $runtimeValues.get();
|
|
528
|
+
const componentValues = { ...(runtimeValues[id] || {}) };
|
|
529
|
+
if (prop in componentValues) {
|
|
530
|
+
delete componentValues[prop];
|
|
531
|
+
setComponentRuntimeValues(id, componentValues);
|
|
532
|
+
eventDispatcher.emit('component:value:remove', { componentId: id, key: prop });
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
keys: (id: string) => {
|
|
536
|
+
const runtimeValues = $runtimeValues.get();
|
|
537
|
+
return Object.keys(runtimeValues[id] || {});
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
(id: string, prop: string, value: any) => {
|
|
541
|
+
// Emit event when value changes
|
|
542
|
+
eventDispatcher.emit(`component:value:set:${id}`, { prop, value });
|
|
543
|
+
},
|
|
544
|
+
this.valuesProxyCache
|
|
545
|
+
);
|
|
546
|
+
|
|
547
|
+
// Attach the proxy to the component
|
|
548
|
+
component.Instance = valuesProxy;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Creates a proxy for style objects that tracks changes to style properties.
|
|
553
|
+
* Uses a cache to avoid recreating proxies for the same target objects.
|
|
554
|
+
*
|
|
555
|
+
* @param target - The style object to watch
|
|
556
|
+
* @param callback - Function to call when a style property changes
|
|
557
|
+
* @returns A proxy that watches for style property changes
|
|
558
|
+
*/
|
|
559
|
+
watchStyleChanges(target, callback) {
|
|
560
|
+
if (typeof target !== "object" || target === null) {
|
|
561
|
+
return target;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
// If the proxy already exists in the cache, return it
|
|
565
|
+
if (this.styleProxyCache.has(target)) {
|
|
566
|
+
return this.styleProxyCache.get(target);
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
const proxy = new Proxy(target, {
|
|
570
|
+
set(obj, prop: any, value) {
|
|
571
|
+
if (obj[prop] !== value) {
|
|
572
|
+
console.log(`Style property changed: ${prop} = ${value}`);
|
|
573
|
+
callback(prop, value);
|
|
574
|
+
}
|
|
575
|
+
obj[prop] = value;
|
|
576
|
+
return true;
|
|
577
|
+
}
|
|
578
|
+
});
|
|
579
|
+
|
|
580
|
+
// Cache the proxy to avoid re-creating it
|
|
581
|
+
this.styleProxyCache.set(target, proxy);
|
|
582
|
+
return proxy;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Get component by UUID.
|
|
587
|
+
* Searches through all applications to find a component by its UUID.
|
|
588
|
+
*
|
|
589
|
+
* @param uuid - Component UUID to find
|
|
590
|
+
* @returns Component element or undefined if not found
|
|
591
|
+
*/
|
|
592
|
+
getComponentByUUID(uuid: string): ComponentElement | undefined {
|
|
593
|
+
// Search through all applications
|
|
594
|
+
for (const appId in this.applications) {
|
|
595
|
+
const appComponents = this.applications[appId];
|
|
596
|
+
for (const componentName in appComponents) {
|
|
597
|
+
const component = appComponents[componentName];
|
|
598
|
+
if (component.uuid === uuid) {
|
|
599
|
+
return component;
|
|
600
|
+
}
|
|
601
|
+
// Also search in children recursively
|
|
602
|
+
const found = this.findComponentInChildren(component, uuid);
|
|
603
|
+
if (found) return found;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
return undefined;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Recursively search for component in children.
|
|
611
|
+
*
|
|
612
|
+
* @param parent - Parent component to search in
|
|
613
|
+
* @param uuid - UUID to find
|
|
614
|
+
* @returns Component or undefined
|
|
615
|
+
*/
|
|
616
|
+
private findComponentInChildren(parent: ComponentElement, uuid: string): ComponentElement | undefined {
|
|
617
|
+
if (!parent.children || parent.children.length === 0) {
|
|
618
|
+
return undefined;
|
|
619
|
+
}
|
|
620
|
+
for (const child of parent.children) {
|
|
621
|
+
if (child.uuid === uuid) {
|
|
622
|
+
return child;
|
|
623
|
+
}
|
|
624
|
+
const found = this.findComponentInChildren(child, uuid);
|
|
625
|
+
if (found) return found;
|
|
626
|
+
}
|
|
627
|
+
return undefined;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* Get component by name.
|
|
632
|
+
*
|
|
633
|
+
* @param name - Component name
|
|
634
|
+
* @param appId - Optional application ID (uses first available app if not provided)
|
|
635
|
+
* @returns Component element or undefined if not found
|
|
636
|
+
*/
|
|
637
|
+
getComponent(name: string, appId?: string): ComponentElement | undefined {
|
|
638
|
+
if (appId) {
|
|
639
|
+
return this.applications[appId]?.[name];
|
|
640
|
+
}
|
|
641
|
+
// If no appId provided, search in all applications
|
|
642
|
+
for (const applicationId in this.applications) {
|
|
643
|
+
const component = this.applications[applicationId][name];
|
|
644
|
+
if (component) return component;
|
|
645
|
+
}
|
|
646
|
+
return undefined;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* Set variable value.
|
|
651
|
+
* Updates the variable in the reactive proxy, triggering change events.
|
|
652
|
+
*
|
|
653
|
+
* @param name - Variable name
|
|
654
|
+
* @param value - Value to set
|
|
655
|
+
*/
|
|
656
|
+
setVar(name: string, value: any): void {
|
|
657
|
+
this.VarsProxy[name] = value;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* Set component runtime style attribute.
|
|
662
|
+
* Updates the component's runtime styles and triggers re-render.
|
|
663
|
+
*
|
|
664
|
+
* @param componentId - Component unique UUID
|
|
665
|
+
* @param attribute - Style attribute name (e.g., 'backgroundColor')
|
|
666
|
+
* @param value - Style value
|
|
667
|
+
*/
|
|
668
|
+
setComponentRuntimeStyleAttribute(componentId: string, attribute: string, value: any): void {
|
|
669
|
+
setcomponentRuntimeStyleAttribute(componentId, attribute, value);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* Gets the singleton instance of the RuntimeContext class.
|
|
674
|
+
* Creates it if it doesn't exist yet.
|
|
675
|
+
*
|
|
676
|
+
* @returns The singleton RuntimeContext instance
|
|
677
|
+
*/
|
|
678
|
+
static getInstance(): RuntimeContext {
|
|
679
|
+
if (!RuntimeContext.instance) {
|
|
680
|
+
RuntimeContext.instance = new RuntimeContext();
|
|
681
|
+
}
|
|
682
|
+
return RuntimeContext.instance;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
/**
|
|
686
|
+
* Registers the global context.
|
|
687
|
+
* Sets up a listener for context changes and updates the internal context.
|
|
688
|
+
*/
|
|
689
|
+
registerContext() {
|
|
690
|
+
$context.listen((context: any) => {
|
|
691
|
+
Object.assign(this.context, context);
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Registers all applications and their components.
|
|
697
|
+
* Builds the component hierarchy, initializes runtime values,
|
|
698
|
+
* and sets up component relationships.
|
|
699
|
+
*/
|
|
700
|
+
registerApplications() {
|
|
701
|
+
const components = $components.get();
|
|
702
|
+
const componentsList = Object.values(components).flat();
|
|
703
|
+
const runtimeValues = $runtimeValues.get();
|
|
704
|
+
|
|
705
|
+
const loadedApplications = $applications.get();
|
|
706
|
+
const loadedApplicationObj: Record<string, string> = {};
|
|
707
|
+
|
|
708
|
+
loadedApplications.forEach((app: any) => {
|
|
709
|
+
loadedApplicationObj[app.uuid] = app.name;
|
|
710
|
+
});
|
|
711
|
+
|
|
712
|
+
componentsList.forEach((component: any) => {
|
|
713
|
+
const application_id = component.application_id || component.application_id;
|
|
714
|
+
|
|
715
|
+
if (!this.context[application_id]) {
|
|
716
|
+
this.context[application_id] = {};
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
if (!this.context[application_id][component.uuid]) {
|
|
720
|
+
this.context[application_id][component.uuid] = { ...component };
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
if (!this.applications[application_id]) {
|
|
724
|
+
this.applications[application_id] = {};
|
|
725
|
+
}
|
|
726
|
+
if (!this.Apps[loadedApplicationObj[application_id]]) {
|
|
727
|
+
this.Apps[loadedApplicationObj[application_id]] = {};
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
component.children = [];
|
|
731
|
+
|
|
732
|
+
this.Apps[loadedApplicationObj[application_id]][component.name] = component;
|
|
733
|
+
this.applications[application_id][component.name] = component;
|
|
734
|
+
|
|
735
|
+
// Initialize runtime values if they don't exist
|
|
736
|
+
if (component.uniqueUUID) {
|
|
737
|
+
// Get existing values or use empty object
|
|
738
|
+
const existingValues = runtimeValues[component.uniqueUUID] || {};
|
|
739
|
+
// If component has any initial values not yet in runtime store, add them
|
|
740
|
+
const initialValues = component.Instance || {};
|
|
741
|
+
|
|
742
|
+
// Merge any new initial values with existing runtime values
|
|
743
|
+
if (Object.keys(initialValues).length > 0) {
|
|
744
|
+
const mergedValues = { ...existingValues, ...initialValues };
|
|
745
|
+
if (JSON.stringify(existingValues) !== JSON.stringify(mergedValues)) {
|
|
746
|
+
setComponentRuntimeValues(component.uniqueUUID, mergedValues);
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
this.attachValuesProperty(component);
|
|
750
|
+
}
|
|
751
|
+
});
|
|
752
|
+
|
|
753
|
+
componentsList.forEach((component: any) => {
|
|
754
|
+
if (component.childrenIds && Array.isArray(component.childrenIds) && component.childrenIds.length > 0) {
|
|
755
|
+
component.childrenIds.forEach((childId: string) => {
|
|
756
|
+
const childComponent = componentsList.find((c: any) => c.uuid === childId);
|
|
757
|
+
if (childComponent) {
|
|
758
|
+
component.children.push(childComponent);
|
|
759
|
+
childComponent.parent = component;
|
|
760
|
+
}
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
});
|
|
764
|
+
|
|
765
|
+
Editor.components = componentsList;
|
|
766
|
+
this.PropertiesProxy = componentsList;
|
|
767
|
+
this.updateEditorContext();
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
// Create singleton instance
|
|
772
|
+
export const RuntimeInstance = RuntimeContext.getInstance();
|
|
773
|
+
RuntimeInstance.setcomponentRuntimeStyleAttribute = setcomponentRuntimeStyleAttribute;
|
|
774
|
+
|
|
775
|
+
// Store in global for editor.ts to access (avoids circular dependency)
|
|
776
|
+
if (!isServer) {
|
|
777
|
+
(globalThis as any).__NURALY_EXECUTE_INSTANCE__ = RuntimeInstance;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
// Alias for existing code - this is the main export
|
|
781
|
+
export const ExecuteInstance = RuntimeInstance;
|
|
782
|
+
|
|
783
|
+
// Export handler execution function
|
|
784
|
+
export { executeHandler };
|