@nuraly/runtime 0.1.6 → 0.1.8
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 +83 -765
- package/components/ui/components/Event/EventValue/EventValue.ts +13 -8
- package/components/ui/components/ToastContainer/ToastContainer.ts +1 -1
- package/components/ui/components/advanced/AIChat/AIChat.ts +1 -2
- package/components/ui/components/advanced/Collapse/Collapse.ts +5 -2
- package/components/ui/components/advanced/Collections/Collections.ts +2 -2
- package/components/ui/components/advanced/MicroApp/MicroApp.ts +3 -11
- package/components/ui/components/advanced/RefComponent/RefComponent.ts +2 -2
- package/components/ui/components/advanced/RichText/RichText.ts +5 -4
- package/components/ui/components/advanced/RichText/RichTextEditor.ts +0 -167
- package/components/ui/components/base/BaseElement/base-change-detection.ts +1 -5
- package/components/ui/components/base/BaseElement.ts +229 -610
- package/components/ui/components/base/FormRegisterable.ts +83 -0
- package/components/ui/components/base/controllers/DragDropController.ts +175 -0
- package/components/ui/components/base/controllers/ErrorController.ts +180 -0
- package/components/ui/components/base/controllers/EventController.ts +112 -0
- package/components/ui/components/base/controllers/InputHandlerController.ts +298 -0
- package/components/ui/components/base/controllers/SelectionController.ts +323 -0
- package/components/ui/components/base/controllers/StyleHandlerController.ts +286 -0
- package/components/ui/components/base/controllers/index.ts +11 -0
- package/components/ui/components/base/mixins/EditorModeMixin.ts +185 -0
- package/components/ui/components/base/mixins/index.ts +6 -0
- package/components/ui/components/base/types/base-element.types.ts +138 -0
- package/components/ui/components/base/types/index.ts +21 -0
- package/components/ui/components/base/utils/event-debouncer.ts +209 -0
- package/components/ui/components/base/utils/index.ts +11 -0
- package/components/ui/components/base/utils/style-cache.ts +94 -0
- package/components/ui/components/display/BoxModel/BoxModel.ts +177 -116
- package/components/ui/components/display/Code/Code.ts +40 -26
- package/components/ui/components/display/Divider/Divider.ts +2 -2
- package/components/ui/components/display/Icon/Icon.ts +2 -3
- package/components/ui/components/display/Image/Image.ts +72 -46
- package/components/ui/components/display/Tag/Tag.ts +2 -3
- package/components/ui/components/display/Video/Video.ts +91 -31
- package/components/ui/components/inputs/Button/Button.ts +2 -2
- package/components/ui/components/inputs/Checkbox/Checkbox.ts +14 -40
- package/components/ui/components/inputs/ColorPicker/colorpicker.ts +3 -4
- package/components/ui/components/inputs/DatePicker/DatePicker.ts +47 -25
- package/components/ui/components/inputs/Dropdown/Dropdown.ts +2 -2
- package/components/ui/components/inputs/Form/Form.style.ts +26 -0
- package/components/ui/components/inputs/Form/Form.ts +352 -0
- package/components/ui/components/inputs/IconPicker/IconPicker.ts +22 -18
- package/components/ui/components/inputs/InsertDropdown/InsertDropdown.ts +0 -20
- package/components/ui/components/inputs/NumberInput/NumberInput.ts +0 -4
- package/components/ui/components/inputs/RadioButton/Radio-button.ts +11 -13
- package/components/ui/components/inputs/Select/Select.ts +38 -24
- package/components/ui/components/inputs/TextInput/TextInput.ts +15 -9
- package/components/ui/components/inputs/Textarea/Textarea.ts +30 -30
- package/components/ui/components/inputs/UsersDropdown/UsersDropdown.ts +1 -1
- package/components/ui/components/layout/Card/Card.ts +112 -10
- package/components/ui/components/layout/Containers/Container.style.ts +18 -0
- package/components/ui/components/layout/Containers/Container.ts +11 -5
- package/components/ui/components/layout/Grid/Col.style.ts +27 -0
- package/components/ui/components/layout/Grid/Col.ts +209 -0
- package/components/ui/components/layout/Grid/Row.style.ts +73 -0
- package/components/ui/components/layout/Grid/Row.ts +166 -0
- package/components/ui/components/layout/Grid/index.ts +7 -0
- package/components/ui/components/layout/Panel/Panel.ts +2 -2
- package/components/ui/components/layout/Tabs/Tabs.ts +0 -1
- package/components/ui/components/navigation/EmbedURL/EmbedURL.ts +62 -26
- package/components/ui/components/navigation/Link/Link.ts +27 -16
- package/components/ui/components/navigation/Menu/Menu.ts +26 -48
- package/components/ui/components/runtime/MicroApp/MicroApp.ts +2 -4
- package/components/ui/components/runtime/MicroApp/MicroAppDataLoader.ts +6 -2
- package/components/ui/components/studio/FunctionsPanel/FunctionsPanel.ts +472 -0
- package/components/ui/components/studio/FunctionsPanel/index.ts +1 -0
- package/components/ui/components/utility/AccessRoles/AccessRoles.style.ts +242 -0
- package/components/ui/components/utility/AccessRoles/AccessRoles.ts +476 -0
- package/components/ui/components/utility/Border/Border.ts +0 -14
- package/components/ui/components/utility/BorderManager/BorderManager.style.ts +237 -0
- package/components/ui/components/utility/BorderManager/BorderManager.ts +503 -0
- package/components/ui/components/utility/BoxShadow/BoxShadow.ts +0 -16
- package/components/ui/components/utility/Document/Document.ts +54 -25
- package/components/ui/components/utility/Export-Import/Export-Import.ts +8 -7
- package/components/ui/components/utility/Handlers/Handlers.ts +14 -17
- package/components/ui/components/utility/ValidationRules/ValidationRules.ts +440 -0
- package/components/ui/components/wrappers/GenerikWrapper/DragWrapper/DragWrapper.ts +1 -0
- package/components/ui/components/wrappers/GenerikWrapper/GenerikWrapper.ts +1 -24
- package/components/ui/nuraly-ui/src/components/badge/badge.style.ts +4 -3
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.component.ts +2 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.component.ts +12 -6
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.style.ts +23 -0
- package/dist/{index-B4yIOSMd.js → BaseElement-BNBn_IJk.js} +2920 -267
- package/dist/{CodeEditor-0GwD2UDB.js → CodeEditor-Bf4L2rO_.js} +84127 -76319
- package/dist/{CodeEditor-BiNku87K.js → CodeEditor-Cpph-xRc.js} +7 -7
- package/dist/{abap-B2diVmjb.js → abap-D0Neqhq6.js} +91 -1
- package/dist/{apex-3NuJ-nsI.js → apex-B5LhxkeG.js} +18 -1
- package/dist/assets/editor.worker-DcwbJ0PV.js +12 -0
- package/dist/assets/html.worker-BTMxskjR.js +461 -0
- package/dist/assets/json.worker-D3vTGdf_.js +49 -0
- package/dist/assets/ts.worker-BsM1BXac.js +51334 -0
- package/dist/{azcli-XGXuUsMB.js → azcli-BrBH0QTU.js} +1 -1
- package/dist/{bat-B8Vhm634.js → bat-BfzAov64.js} +12 -1
- package/dist/{bicep-Cc8X5S_k.js → bicep-C3bCSWel.js} +1 -1
- package/dist/{cameligo-Bo3wBh9T.js → cameligo-sFL5plcd.js} +13 -1
- package/dist/{clojure-CPoQlpIK.js → clojure-CfeExRz0.js} +14 -1
- package/dist/{coffee-BxvTGz39.js → coffee-Xws5K0WL.js} +11 -1
- package/dist/{cpp-5RpEV7vC.js → cpp-CqOUEpxN.js} +28 -23
- package/dist/{csharp-slXXP3fo.js → csharp-DVLiBOZb.js} +13 -1
- package/dist/{csp-B98p6-gH.js → csp-DVFp9bw5.js} +3 -1
- package/dist/{css-BDsDSAin.js → css-DwARn2R6.js} +8 -1
- package/dist/cssMode-DMsdy1N0.js +1577 -0
- package/dist/{cypher-Dc4IMouD.js → cypher-uY0Mffat.js} +8 -1
- package/dist/{dart-LhvE3yD2.js → dart-D27H-mX_.js} +18 -1
- package/dist/{dockerfile-CwzplJeZ.js → dockerfile-CmV85WZK.js} +5 -1
- package/dist/{ecl-DxW3FiJi.js → ecl--fKn7yzB.js} +9 -1
- package/dist/{elixir-BI40g7TU.js → elixir-DUhH17ON.js} +87 -1
- package/dist/{flow9-tR2v0bGz.js → flow9-B3Dx2LLe.js} +8 -1
- package/dist/{freemarker2-XzXhMwTc.js → freemarker2-D51H9HYi.js} +359 -7
- package/dist/{fsharp-BLAma0OT.js → fsharp-SyqBfUAR.js} +14 -1
- package/dist/{go-nYcD3y4Z.js → go-BbMR2tdT.js} +17 -1
- package/dist/{graphql-Dp1cHWmP.js → graphql-DDJE6tIl.js} +17 -1
- package/dist/{handlebars-CmrcNfkM.js → handlebars-CF6gdAX4.js} +38 -4
- package/dist/{hcl-6NT8Kbna.js → hcl-YBvpaUqf.js} +13 -1
- package/dist/{html-BsvlsNx5.js → html-c2n_zkM3.js} +37 -4
- package/dist/htmlMode-9IJTuZUh.js +1587 -0
- package/dist/{ini-BZCOLrEc.js → ini-Ct73dBtM.js} +10 -1
- package/dist/{java-DAMcfJbX.js → java-C_jlkwoG.js} +18 -1
- package/dist/{javascript-D-M-tA-x.js → javascript-DhEEBMxD.js} +3 -2
- package/dist/jsonMode-CB6k-4rp.js +2002 -0
- package/dist/{julia-CQ46G71H.js → julia-D8WE5U1e.js} +22 -1
- package/dist/{kotlin-CEjVo_6E.js → kotlin-Zy9aq5yB.js} +15 -1
- package/dist/{less-DreV99nP.js → less-sZ0iHtE8.js} +1 -1
- package/dist/{lexon-DBVJhqLb.js → lexon-CsdNL29A.js} +13 -1
- package/dist/{liquid-_8i5JYO-.js → liquid-CwtPiwnW.js} +12 -4
- package/dist/{lua-Dcc_j6L-.js → lua-C2YJo0zw.js} +12 -1
- package/dist/{m3-B9SlZL4n.js → m3-CPLP40SG.js} +7 -1
- package/dist/{markdown-CuGw9_MP.js → markdown-B1mf5e0R.js} +34 -1
- package/dist/{mdx-CiSJOftS.js → mdx-LewPRYF8.js} +2 -2
- package/dist/{micro-app-entry-BT6Pk6bn.js → micro-app-entry-C3RDIukG.js} +7621 -9067
- package/dist/micro-app.bundle.js +3 -3
- package/dist/micro-app.js +3575 -6621
- package/dist/{mips-BUWqP-OH.js → mips-DA33BZX1.js} +11 -1
- package/dist/{msdax-DtkouYCg.js → msdax-CCYFIQsP.js} +5 -1
- package/dist/{mysql-IkAsWSmF.js → mysql-hjmIjL-D.js} +11 -3
- package/dist/{objective-c-B2-ronfg.js → objective-c-RRCpEmqC.js} +2 -1
- package/dist/{pascal-Bsnz2eJA.js → pascal-CeV8XfxB.js} +13 -1
- package/dist/{pascaligo-D_sMUn0Q.js → pascaligo-IEEGVJAJ.js} +13 -1
- package/dist/{perl-BPzHt9SS.js → perl-B5-QbHq_.js} +34 -1
- package/dist/{pgsql-DlTJB0PD.js → pgsql-s6kqEJmi.js} +14 -4
- package/dist/{php-Dmq5OjwK.js → php-CWWqzOo8.js} +36 -1
- package/dist/{pla-HJcccrBy.js → pla-FSvb_YP_.js} +13 -1
- package/dist/{postiats-OQn6DKv-.js → postiats-DQdscQXO.js} +370 -1
- package/dist/{powerquery-DKaMYC8w.js → powerquery-CtA5JA1I.js} +7 -1
- package/dist/{powershell-DWeJHik1.js → powershell-DglEq96N.js} +13 -1
- package/dist/{protobuf-CBn_IseU.js → protobuf-BSepub3e.js} +5 -1
- package/dist/{pug-BoRpCINl.js → pug-B1847F4G.js} +16 -1
- package/dist/{python-DNxbUiJS.js → python-h5Z2g-yl.js} +59 -11
- package/dist/{qsharp-4rGyVZOw.js → qsharp-D4i0Nqg9.js} +28 -3
- package/dist/{r-DsgLhBOb.js → r-cdRigKxa.js} +5 -1
- package/dist/{razor-BFH0wq9s.js → razor-D5ep1Doy.js} +48 -4
- package/dist/{redis-B2fdL4Bg.js → redis-D9MFxvE8.js} +16 -6
- package/dist/{redshift-DoaeyCkH.js → redshift-CmCnsvL-.js} +13 -4
- package/dist/{restructuredtext-D-6OFBY9.js → restructuredtext-CWy8J51t.js} +19 -1
- package/dist/{ruby-D1DD6baV.js → ruby-WP-c36m5.js} +76 -3
- package/dist/runtime.js +34 -45
- package/dist/{rust-DssUV39M.js → rust-Q9FLdYpu.js} +13 -1
- package/dist/{sb-Dmb6tAdv.js → sb-C54-JBGT.js} +12 -1
- package/dist/{scala-Co3ETaym.js → scala-CzbFImc5.js} +24 -1
- package/dist/{scheme-CMrqXTty.js → scheme-BhfDmYN3.js} +1 -1
- package/dist/{scss-DkGudv8Q.js → scss-CEmiBXpS.js} +25 -1
- package/dist/{shell-BHN2BI4L.js → shell-Bmc1VhG0.js} +4 -1
- package/dist/{solidity-b-R-raGB.js → solidity-C9Q2I8Hh.js} +23 -1
- package/dist/{sophia-Y4GjyxNB.js → sophia-jWa1UyKz.js} +16 -1
- package/dist/{sparql-CDAPZb88.js → sparql-CM7jctbc.js} +15 -1
- package/dist/{sql-DkkpPiUq.js → sql-WzihTkbg.js} +42 -1
- package/dist/{st-CSPV91Ej.js → st-6y7_3aup.js} +8 -1
- package/dist/style.css +1 -1
- package/dist/{swift-DdSC5O48.js → swift-k-0zxG_D.js} +4 -1
- package/dist/{systemverilog-CI03XpAv.js → systemverilog-Pnr5_rIP.js} +29 -3
- package/dist/{tcl-B8DayMSI.js → tcl-fNPXval8.js} +7 -1
- package/dist/tsMode-B_6LiBE1.js +976 -0
- package/dist/{twig-B1AUPVB_.js → twig-L2MkztkV.js} +76 -1
- package/dist/{typescript-DFCDgKOy.js → typescript-BBG0jH4p.js} +23 -2
- package/dist/typespec-Cqqo-3Pt.js +123 -0
- package/dist/{vb-BIC7ccdG.js → vb-B5YC2xN9.js} +15 -1
- package/dist/{wgsl-C9yjop46.js → wgsl-D9BRtftY.js} +26 -1
- package/dist/{xml-axhHDYch.js → xml-DgLB7rE6.js} +8 -2
- package/dist/{yaml-fWSpoHsZ.js → yaml-DiI4HpSv.js} +30 -2
- package/handlers/compiler.ts +196 -16
- package/handlers/context-setup.ts +10 -5
- package/handlers/handler-api-factory.ts +358 -0
- package/handlers/handler-api.ts +379 -0
- package/handlers/handler-executor.ts +25 -5
- package/handlers/handler-scope.ts +398 -0
- package/handlers/index.ts +34 -2
- package/handlers/runtime-api/component-properties.ts +0 -8
- package/handlers/runtime-api/index.ts +1 -1
- package/handlers/runtime-api/toast.ts +1 -1
- package/index.ts +14 -115
- package/micro-app/README.md +10 -10
- package/micro-app/state/MicroAppRuntimeContext.ts +1 -28
- package/micro-app-entry.ts +0 -5
- package/package.json +19 -1
- package/redux/actions/application/index.ts +0 -1
- package/redux/actions/component/addComponentAction.ts +15 -4
- package/redux/actions/component/moveDraggedComponent.ts +1 -2
- package/redux/actions/component/update-component-name.ts +1 -1
- package/redux/actions/component/updateComponentAttributes.ts +7 -2
- package/redux/handlers/functions/build-function-handler.ts +11 -3
- package/redux/handlers/functions/deploy-function-handler.ts +11 -3
- package/redux/handlers/functions/invoke-function-handler.ts +11 -3
- package/redux/handlers/functions/load-functions-handler.ts +2 -1
- package/redux/handlers/functions/update-function-handler.ts +2 -1
- package/redux/store/component/component.interface.ts +8 -2
- package/redux/store/component/store.ts +1 -4
- package/state/runtime-context.ts +1 -23
- package/utils/RuntimeContextHelpers.ts +221 -90
- package/utils/change-detection.ts +125 -1
- package/utils/clipboard-utils.ts +18 -8
- package/utils/component-registry.ts +118 -0
- package/utils/index.ts +14 -1
- package/utils/naming-generator.ts +3 -1
- package/utils/randomness.ts +3 -1
- package/utils/register-components.ts +21 -29
- package/utils/render-util.ts +27 -48
- package/utils/toast.ts +97 -0
- package/vite.config.ts +29 -12
- package/components/ui/components/Event/EventAttribute/EventAttribute.style.ts +0 -11
- package/components/ui/components/Event/EventAttribute/EventAttribute.ts +0 -28
- package/components/ui/components/base/BaseElement/calculateStyles.ts +0 -31
- package/components/ui/components/base/BaseElement/drag-events.helpers.ts +0 -71
- package/components/ui/components/base/BaseElement/execute-event.helpers.ts +0 -45
- package/components/ui/components/base/BaseElement/interactions.helpers.ts +0 -14
- package/components/ui/components/wrappers/ComponentTitle/ComponentTitle.ts +0 -95
- package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.style.ts +0 -102
- package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.ts +0 -258
- package/components/ui/components/wrappers/PreviewWrapper.ts +0 -28
- package/components/ui/components/wrappers/RectangleSelection/RectangleSelection.ts +0 -154
- package/components/ui/nuraly-ui/packages/common/dist/constants/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/constants/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/constants.d.ts +0 -17
- package/components/ui/nuraly-ui/packages/common/dist/constants.js +0 -7
- package/components/ui/nuraly-ui/packages/common/dist/controllers/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/controllers/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/controllers.d.ts +0 -21
- package/components/ui/nuraly-ui/packages/common/dist/controllers.js +0 -22
- package/components/ui/nuraly-ui/packages/common/dist/index.d.ts +0 -25
- package/components/ui/nuraly-ui/packages/common/dist/index.js +0 -27
- package/components/ui/nuraly-ui/packages/common/dist/mixins/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/mixins/index.js +0 -3
- package/components/ui/nuraly-ui/packages/common/dist/mixins.d.ts +0 -26
- package/components/ui/nuraly-ui/packages/common/dist/mixins.js +0 -29
- package/components/ui/nuraly-ui/packages/common/dist/shared/base-mixin.d.ts +0 -42
- package/components/ui/nuraly-ui/packages/common/dist/shared/base-mixin.js +0 -38
- package/components/ui/nuraly-ui/packages/common/dist/shared/constants.d.ts +0 -1
- package/components/ui/nuraly-ui/packages/common/dist/shared/constants.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.d.ts +0 -77
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.js +0 -341
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.d.ts +0 -37
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/index.d.ts +0 -4
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/index.js +0 -4
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.d.ts +0 -48
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.js +0 -133
- package/components/ui/nuraly-ui/packages/common/dist/shared/dependency-mixin.d.ts +0 -37
- package/components/ui/nuraly-ui/packages/common/dist/shared/dependency-mixin.js +0 -141
- package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.d.ts +0 -64
- package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.js +0 -95
- package/components/ui/nuraly-ui/packages/common/dist/shared/index.d.ts +0 -13
- package/components/ui/nuraly-ui/packages/common/dist/shared/index.js +0 -17
- package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.d.ts +0 -78
- package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.js +0 -194
- package/components/ui/nuraly-ui/packages/common/dist/shared/themes.d.ts +0 -44
- package/components/ui/nuraly-ui/packages/common/dist/shared/themes.js +0 -85
- package/components/ui/nuraly-ui/packages/common/dist/shared/utils.d.ts +0 -60
- package/components/ui/nuraly-ui/packages/common/dist/shared/utils.js +0 -85
- package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.d.ts +0 -108
- package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.js +0 -17
- package/components/ui/nuraly-ui/packages/common/dist/themes/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/themes/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/themes.d.ts +0 -22
- package/components/ui/nuraly-ui/packages/common/dist/themes.js +0 -23
- package/components/ui/nuraly-ui/packages/common/dist/utils/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/utils/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/utils.d.ts +0 -21
- package/components/ui/nuraly-ui/packages/common/dist/utils.js +0 -22
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/LICENSE +0 -15
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/README.md +0 -294
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy-sync.js +0 -171
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy.js +0 -175
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/index.js +0 -7
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/empty/index.js +0 -39
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/file.js +0 -66
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/index.js +0 -23
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/link.js +0 -64
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -101
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -34
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink.js +0 -67
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/fs/index.js +0 -146
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/index.js +0 -16
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/index.js +0 -16
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/jsonfile.js +0 -11
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json-sync.js +0 -12
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json.js +0 -12
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -27
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/utils.js +0 -21
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/index.js +0 -7
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move-sync.js +0 -55
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move.js +0 -59
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/output-file/index.js +0 -31
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/path-exists/index.js +0 -12
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/remove/index.js +0 -17
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/async.js +0 -29
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/stat.js +0 -159
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/utimes.js +0 -36
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/LICENSE +0 -15
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/README.md +0 -294
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy-sync.js +0 -171
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy.js +0 -175
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/index.js +0 -7
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/empty/index.js +0 -39
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/file.js +0 -66
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/index.js +0 -23
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/link.js +0 -64
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -101
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -34
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink.js +0 -67
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/fs/index.js +0 -146
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/index.js +0 -16
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/index.js +0 -16
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/jsonfile.js +0 -11
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json-sync.js +0 -12
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json.js +0 -12
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -27
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/utils.js +0 -21
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/index.js +0 -7
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move-sync.js +0 -55
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move.js +0 -59
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/output-file/index.js +0 -31
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/path-exists/index.js +0 -12
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/remove/index.js +0 -17
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/async.js +0 -29
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/stat.js +0 -159
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/utimes.js +0 -36
- package/dist/SmartAttributeHandler-B1UJKlqJ.js +0 -153
- package/dist/SmartAttributeHandler-u-ZHGueR.js +0 -193
- package/dist/assets/editor.worker-C_S4Avdt.js +0 -11
- package/dist/assets/html.worker-DfuQASUV.js +0 -458
- package/dist/assets/json.worker-Cucz4wxY.js +0 -42
- package/dist/assets/ts.worker-Dme6S0YK.js +0 -37021
- package/dist/cssMode-BzqArQ52.js +0 -1443
- package/dist/htmlMode-CmNePjzn.js +0 -1453
- package/dist/jsonMode-CKj6yF-8.js +0 -1863
- package/dist/tsMode-DfXg_Y5Y.js +0 -800
- package/redux/actions/application/loadApplicationPermissionAction.ts +0 -10
- package/utils/styleUtil.ts +0 -7
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Handler API - Namespaced API for Handler Execution
|
|
3
|
+
* @module Runtime/Handlers/HandlerAPI
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* Provides a clean, namespaced API structure for handler code execution.
|
|
7
|
+
* Instead of 50+ individual parameters, handlers receive organized namespaces.
|
|
8
|
+
*
|
|
9
|
+
* This follows patterns from professional tools like:
|
|
10
|
+
* - Figma Plugin API: `figma.currentPage`, `figma.ui.postMessage()`
|
|
11
|
+
* - Unity: `Transform.position`, `Input.GetKey()`
|
|
12
|
+
* - Godot: `Input.is_action_pressed()`, `OS.get_time()`
|
|
13
|
+
*
|
|
14
|
+
* @example Handler code with namespaced API:
|
|
15
|
+
* ```javascript
|
|
16
|
+
* // Navigation
|
|
17
|
+
* Nav.toPage('Dashboard')
|
|
18
|
+
* Nav.toUrl('https://example.com')
|
|
19
|
+
*
|
|
20
|
+
* // UI feedback
|
|
21
|
+
* UI.toast('Saved!', 'success')
|
|
22
|
+
* UI.clearToasts()
|
|
23
|
+
*
|
|
24
|
+
* // Component operations
|
|
25
|
+
* const btn = Component.get('SubmitButton')
|
|
26
|
+
* Component.update(Current, 'text', 'static', 'Hello')
|
|
27
|
+
*
|
|
28
|
+
* // Data operations
|
|
29
|
+
* const result = await Data.invoke('getUserData', { id: 123 })
|
|
30
|
+
* await Data.upload(file)
|
|
31
|
+
*
|
|
32
|
+
* // Variables (reactive)
|
|
33
|
+
* $username = 'John'
|
|
34
|
+
* const count = $count || 0
|
|
35
|
+
*
|
|
36
|
+
* // Or with $ prefix
|
|
37
|
+
* $username = 'John'
|
|
38
|
+
* $count++
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
import type { ComponentElement } from '../redux/store/component/component.interface';
|
|
43
|
+
|
|
44
|
+
// ============================================================================
|
|
45
|
+
// Navigation API
|
|
46
|
+
// ============================================================================
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Navigation namespace for page and URL navigation.
|
|
50
|
+
*/
|
|
51
|
+
export interface NavAPI {
|
|
52
|
+
/** Navigate to a page by name */
|
|
53
|
+
toPage: (pageName: string) => void;
|
|
54
|
+
|
|
55
|
+
/** Navigate to an external URL */
|
|
56
|
+
toUrl: (url: string, target?: '_blank' | '_self') => void;
|
|
57
|
+
|
|
58
|
+
/** Navigate to a hash/anchor */
|
|
59
|
+
toHash: (hash: string) => void;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// ============================================================================
|
|
63
|
+
// UI API
|
|
64
|
+
// ============================================================================
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Toast notification types for UI.toast()
|
|
68
|
+
*/
|
|
69
|
+
export type ToastType = 'success' | 'error' | 'warning' | 'info' | 'default';
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* UI namespace for visual feedback and notifications.
|
|
73
|
+
*/
|
|
74
|
+
export interface UIAPI {
|
|
75
|
+
/** Show a toast notification */
|
|
76
|
+
toast: (message: string, type?: ToastType, duration?: number) => void;
|
|
77
|
+
|
|
78
|
+
/** Show success toast (shorthand) */
|
|
79
|
+
success: (message: string, duration?: number) => void;
|
|
80
|
+
|
|
81
|
+
/** Show error toast (shorthand) */
|
|
82
|
+
error: (message: string, duration?: number) => void;
|
|
83
|
+
|
|
84
|
+
/** Show warning toast (shorthand) */
|
|
85
|
+
warning: (message: string, duration?: number) => void;
|
|
86
|
+
|
|
87
|
+
/** Show info toast (shorthand) */
|
|
88
|
+
info: (message: string, duration?: number) => void;
|
|
89
|
+
|
|
90
|
+
/** Hide a specific toast or all toasts */
|
|
91
|
+
hideToast: (id?: string) => void;
|
|
92
|
+
|
|
93
|
+
/** Clear all active toasts */
|
|
94
|
+
clearToasts: () => void;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// ============================================================================
|
|
98
|
+
// Component API
|
|
99
|
+
// ============================================================================
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Component namespace for component operations.
|
|
103
|
+
*/
|
|
104
|
+
export interface ComponentAPI {
|
|
105
|
+
/** Get a component by name */
|
|
106
|
+
get: (name: string) => ComponentElement | undefined;
|
|
107
|
+
|
|
108
|
+
/** Get multiple components by name pattern or all */
|
|
109
|
+
getAll: (pattern?: string) => ComponentElement[];
|
|
110
|
+
|
|
111
|
+
/** Add a new component */
|
|
112
|
+
add: (schema: any, parentId?: string) => ComponentElement | undefined;
|
|
113
|
+
|
|
114
|
+
/** Delete a component */
|
|
115
|
+
delete: (component: ComponentElement) => void;
|
|
116
|
+
|
|
117
|
+
/** Copy component to clipboard */
|
|
118
|
+
copy: (component: ComponentElement) => void;
|
|
119
|
+
|
|
120
|
+
/** Paste component from clipboard */
|
|
121
|
+
paste: (parentId?: string) => ComponentElement | undefined;
|
|
122
|
+
|
|
123
|
+
/** Update component input property */
|
|
124
|
+
updateInput: (
|
|
125
|
+
component: ComponentElement,
|
|
126
|
+
prop: string,
|
|
127
|
+
type: 'static' | 'handler',
|
|
128
|
+
value: any
|
|
129
|
+
) => void;
|
|
130
|
+
|
|
131
|
+
/** Update component name */
|
|
132
|
+
updateName: (component: ComponentElement, name: string) => void;
|
|
133
|
+
|
|
134
|
+
/** Update component event handler */
|
|
135
|
+
updateEvent: (component: ComponentElement, eventName: string, handler: string) => void;
|
|
136
|
+
|
|
137
|
+
/** Update component style */
|
|
138
|
+
updateStyle: (component: ComponentElement, prop: string, value: any) => void;
|
|
139
|
+
|
|
140
|
+
/** Update component style handlers */
|
|
141
|
+
updateStyleHandlers: (component: ComponentElement, handlers: Record<string, any>) => void;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// ============================================================================
|
|
145
|
+
// Data API
|
|
146
|
+
// ============================================================================
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Data namespace for backend operations and file handling.
|
|
150
|
+
*/
|
|
151
|
+
export interface DataAPI {
|
|
152
|
+
/** Invoke a backend function */
|
|
153
|
+
invoke: (functionName: string, params?: Record<string, any>) => Promise<any>;
|
|
154
|
+
|
|
155
|
+
/** Upload a file */
|
|
156
|
+
upload: (file: File | Blob, options?: { path?: string }) => Promise<any>;
|
|
157
|
+
|
|
158
|
+
/** Browse for files (opens file picker) */
|
|
159
|
+
browse: (options?: { accept?: string; multiple?: boolean }) => Promise<File[]>;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// ============================================================================
|
|
163
|
+
// Page API
|
|
164
|
+
// ============================================================================
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Page namespace for page management operations.
|
|
168
|
+
*/
|
|
169
|
+
export interface PageAPI {
|
|
170
|
+
/** Add a new page */
|
|
171
|
+
add: (pageData: any) => void;
|
|
172
|
+
|
|
173
|
+
/** Update page properties */
|
|
174
|
+
update: (pageId: string, data: any) => void;
|
|
175
|
+
|
|
176
|
+
/** Delete a page */
|
|
177
|
+
delete: (pageId: string) => void;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// ============================================================================
|
|
181
|
+
// App API
|
|
182
|
+
// ============================================================================
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* App namespace for application-level operations.
|
|
186
|
+
*/
|
|
187
|
+
export interface AppAPI {
|
|
188
|
+
/** Update application settings */
|
|
189
|
+
update: (data: any) => void;
|
|
190
|
+
|
|
191
|
+
/** Get all applications */
|
|
192
|
+
all: Record<string, any>;
|
|
193
|
+
|
|
194
|
+
/** Get current application context */
|
|
195
|
+
context: any;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// ============================================================================
|
|
199
|
+
// Editor API
|
|
200
|
+
// ============================================================================
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Editor namespace for editor-specific operations.
|
|
204
|
+
* Only available in edit mode, not in preview/published apps.
|
|
205
|
+
*/
|
|
206
|
+
export interface EditorAPI {
|
|
207
|
+
/** Open an editor tab */
|
|
208
|
+
openTab: (tabName: string) => void;
|
|
209
|
+
|
|
210
|
+
/** Set current editor tab */
|
|
211
|
+
setTab: (tabName: string) => void;
|
|
212
|
+
|
|
213
|
+
/** Trait component from schema */
|
|
214
|
+
traitFromSchema: (schema: any) => any;
|
|
215
|
+
|
|
216
|
+
/** Console logging (appears in editor console) */
|
|
217
|
+
console: {
|
|
218
|
+
log: (...args: any[]) => void;
|
|
219
|
+
warn: (...args: any[]) => void;
|
|
220
|
+
error: (...args: any[]) => void;
|
|
221
|
+
info: (...args: any[]) => void;
|
|
222
|
+
debug: (...args: any[]) => void;
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// ============================================================================
|
|
227
|
+
// Variable API
|
|
228
|
+
// ============================================================================
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Variable namespace for reactive state management.
|
|
232
|
+
*/
|
|
233
|
+
export interface VarAPI {
|
|
234
|
+
/** Get a variable value */
|
|
235
|
+
get: (name: string) => any;
|
|
236
|
+
|
|
237
|
+
/** Set a variable value */
|
|
238
|
+
set: (name: string, value: any) => void;
|
|
239
|
+
|
|
240
|
+
/** Get context variable */
|
|
241
|
+
getContext: (name: string) => any;
|
|
242
|
+
|
|
243
|
+
/** Set context variable */
|
|
244
|
+
setContext: (name: string, value: any) => void;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// ============================================================================
|
|
248
|
+
// Complete Handler API
|
|
249
|
+
// ============================================================================
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Complete Handler API structure passed to handler code.
|
|
253
|
+
*
|
|
254
|
+
* This combines all namespaced APIs into a single object that provides
|
|
255
|
+
* clean, organized access to all runtime functionality.
|
|
256
|
+
*/
|
|
257
|
+
export interface HandlerAPI {
|
|
258
|
+
// ==================== Namespaced APIs ====================
|
|
259
|
+
|
|
260
|
+
/** Navigation operations */
|
|
261
|
+
Nav: NavAPI;
|
|
262
|
+
|
|
263
|
+
/** UI feedback (toasts, etc.) */
|
|
264
|
+
UI: UIAPI;
|
|
265
|
+
|
|
266
|
+
/** Component operations */
|
|
267
|
+
Component: ComponentAPI;
|
|
268
|
+
|
|
269
|
+
/** Data/backend operations */
|
|
270
|
+
Data: DataAPI;
|
|
271
|
+
|
|
272
|
+
/** Page management */
|
|
273
|
+
Page: PageAPI;
|
|
274
|
+
|
|
275
|
+
/** Application operations */
|
|
276
|
+
App: AppAPI;
|
|
277
|
+
|
|
278
|
+
/** Editor operations (edit mode only) */
|
|
279
|
+
Editor: EditorAPI;
|
|
280
|
+
|
|
281
|
+
/** Variable get/set functions */
|
|
282
|
+
Var: VarAPI;
|
|
283
|
+
|
|
284
|
+
// ==================== Direct Access ====================
|
|
285
|
+
|
|
286
|
+
/** Current component being executed */
|
|
287
|
+
Current: ComponentElement;
|
|
288
|
+
|
|
289
|
+
/** Event data from triggering event */
|
|
290
|
+
Event: any;
|
|
291
|
+
|
|
292
|
+
/** Item data (for collection/list contexts) */
|
|
293
|
+
Item: any;
|
|
294
|
+
|
|
295
|
+
/** Component instance state */
|
|
296
|
+
Instance: any;
|
|
297
|
+
|
|
298
|
+
/** Direct Vars proxy for reactive access */
|
|
299
|
+
Vars: Record<string, any>;
|
|
300
|
+
|
|
301
|
+
/** Direct Values proxy */
|
|
302
|
+
Values: Record<string, any>;
|
|
303
|
+
|
|
304
|
+
/** All applications */
|
|
305
|
+
Apps: Record<string, any>;
|
|
306
|
+
|
|
307
|
+
/** Current platform info */
|
|
308
|
+
Platform: string;
|
|
309
|
+
|
|
310
|
+
/** Event dispatcher for custom events */
|
|
311
|
+
Events: any;
|
|
312
|
+
|
|
313
|
+
/** Utility functions */
|
|
314
|
+
Utils: any;
|
|
315
|
+
|
|
316
|
+
/** Console (editor-aware logging) */
|
|
317
|
+
console: Console;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// ============================================================================
|
|
321
|
+
// Legacy Parameter Names (for backwards compatibility)
|
|
322
|
+
// ============================================================================
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Maps legacy parameter names to their new namespaced locations.
|
|
326
|
+
* This allows gradual migration from old API to new namespaced API.
|
|
327
|
+
*/
|
|
328
|
+
export const LEGACY_TO_NAMESPACED: Record<string, string> = {
|
|
329
|
+
// Navigation
|
|
330
|
+
NavigateToPage: 'Nav.toPage',
|
|
331
|
+
NavigateToUrl: 'Nav.toUrl',
|
|
332
|
+
NavigateToHash: 'Nav.toHash',
|
|
333
|
+
|
|
334
|
+
// UI
|
|
335
|
+
ShowToast: 'UI.toast',
|
|
336
|
+
ShowSuccessToast: 'UI.success',
|
|
337
|
+
ShowErrorToast: 'UI.error',
|
|
338
|
+
ShowWarningToast: 'UI.warning',
|
|
339
|
+
ShowInfoToast: 'UI.info',
|
|
340
|
+
HideToast: 'UI.hideToast',
|
|
341
|
+
ClearAllToasts: 'UI.clearToasts',
|
|
342
|
+
|
|
343
|
+
// Components
|
|
344
|
+
GetComponent: 'Component.get',
|
|
345
|
+
GetComponents: 'Component.getAll',
|
|
346
|
+
AddComponent: 'Component.add',
|
|
347
|
+
DeleteComponentAction: 'Component.delete',
|
|
348
|
+
CopyComponentToClipboard: 'Component.copy',
|
|
349
|
+
PasteComponentFromClipboard: 'Component.paste',
|
|
350
|
+
updateInput: 'Component.updateInput',
|
|
351
|
+
updateName: 'Component.updateName',
|
|
352
|
+
updateEvent: 'Component.updateEvent',
|
|
353
|
+
updateStyle: 'Component.updateStyle',
|
|
354
|
+
updateStyleHandlers: 'Component.updateStyleHandlers',
|
|
355
|
+
|
|
356
|
+
// Data
|
|
357
|
+
InvokeFunction: 'Data.invoke',
|
|
358
|
+
UploadFile: 'Data.upload',
|
|
359
|
+
BrowseFiles: 'Data.browse',
|
|
360
|
+
|
|
361
|
+
// Pages
|
|
362
|
+
AddPage: 'Page.add',
|
|
363
|
+
UpdatePage: 'Page.update',
|
|
364
|
+
deletePage: 'Page.delete',
|
|
365
|
+
|
|
366
|
+
// App
|
|
367
|
+
UpdateApplication: 'App.update',
|
|
368
|
+
|
|
369
|
+
// Variables
|
|
370
|
+
GetVar: 'Var.get',
|
|
371
|
+
SetVar: 'Var.set',
|
|
372
|
+
GetContextVar: 'Var.getContext',
|
|
373
|
+
SetContextVar: 'Var.setContext',
|
|
374
|
+
|
|
375
|
+
// Editor
|
|
376
|
+
openEditorTab: 'Editor.openTab',
|
|
377
|
+
setCurrentEditorTab: 'Editor.setTab',
|
|
378
|
+
TraitCompoentFromSchema: 'Editor.traitFromSchema',
|
|
379
|
+
};
|
|
@@ -89,11 +89,11 @@ import { RuntimeHelpers } from '../utils/runtime-helpers';
|
|
|
89
89
|
import { isServer } from '../utils/envirement';
|
|
90
90
|
import { eventDispatcher } from '../utils/change-detection';
|
|
91
91
|
import Editor from '../state/editor';
|
|
92
|
-
import Database from '@nuraly/dbclient';
|
|
93
92
|
|
|
94
|
-
import { compileHandlerFunction } from './compiler';
|
|
93
|
+
import { compileHandlerFunction, createHandlerScope } from './compiler';
|
|
95
94
|
import { setupRuntimeContext, extractRuntimeContext } from './context-setup';
|
|
96
95
|
import { createGlobalHandlerFunctions } from './runtime-api';
|
|
96
|
+
import { createHandlerAPI } from './handler-api-factory';
|
|
97
97
|
import type { IRuntimeContext } from '../types/IRuntimeContext';
|
|
98
98
|
import { ExecuteInstance } from '../state';
|
|
99
99
|
|
|
@@ -289,9 +289,21 @@ export function executeHandler(
|
|
|
289
289
|
debug: Editor.Console.debug,
|
|
290
290
|
};
|
|
291
291
|
|
|
292
|
+
// Create namespaced Handler API for clean access
|
|
293
|
+
const handlerAPI = createHandlerAPI(
|
|
294
|
+
runtimeContext,
|
|
295
|
+
globalFunctions as any,
|
|
296
|
+
component,
|
|
297
|
+
EventData,
|
|
298
|
+
item,
|
|
299
|
+
customConsole,
|
|
300
|
+
eventDispatcher,
|
|
301
|
+
RuntimeHelpers
|
|
302
|
+
);
|
|
303
|
+
|
|
292
304
|
// Execute the compiled function with all context and global functions
|
|
305
|
+
// Includes both legacy flat parameters and new namespaced API
|
|
293
306
|
return compiledFunction(
|
|
294
|
-
Database,
|
|
295
307
|
eventDispatcher,
|
|
296
308
|
runtimeContext.PropertiesProxy,
|
|
297
309
|
Editor,
|
|
@@ -319,7 +331,6 @@ export function executeHandler(
|
|
|
319
331
|
runtimeContext.context,
|
|
320
332
|
runtimeContext.applications,
|
|
321
333
|
globalFunctions.updateInput,
|
|
322
|
-
globalFunctions.updateInputHandlers,
|
|
323
334
|
globalFunctions.deletePage,
|
|
324
335
|
globalFunctions.CopyComponentToClipboard,
|
|
325
336
|
globalFunctions.PasteComponentFromClipboard,
|
|
@@ -343,6 +354,15 @@ export function executeHandler(
|
|
|
343
354
|
globalFunctions.ShowWarningToast,
|
|
344
355
|
globalFunctions.ShowInfoToast,
|
|
345
356
|
globalFunctions.HideToast,
|
|
346
|
-
globalFunctions.ClearAllToasts
|
|
357
|
+
globalFunctions.ClearAllToasts,
|
|
358
|
+
createHandlerScope,
|
|
359
|
+
// Namespaced APIs (new clean API)
|
|
360
|
+
handlerAPI.Nav,
|
|
361
|
+
handlerAPI.UI,
|
|
362
|
+
handlerAPI.Component,
|
|
363
|
+
handlerAPI.Data,
|
|
364
|
+
handlerAPI.Page,
|
|
365
|
+
handlerAPI.App,
|
|
366
|
+
handlerAPI.Var
|
|
347
367
|
);
|
|
348
368
|
}
|