@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,398 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Handler Scope - Transparent Variable Access with $ Prefix
|
|
3
|
+
* @module Runtime/Handlers/HandlerScope
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* Creates a scope proxy that enables transparent reactive variable access in handlers.
|
|
7
|
+
* Variables prefixed with `$` are automatically routed to VarsProxy for reactivity.
|
|
8
|
+
*
|
|
9
|
+
* This provides clear visual distinction between:
|
|
10
|
+
* - `$username` → Reactive state (persisted in Vars, triggers updates)
|
|
11
|
+
* - `username` → Local variable (temporary, disappears after handler)
|
|
12
|
+
*
|
|
13
|
+
* @example User writes:
|
|
14
|
+
* ```javascript
|
|
15
|
+
* // Reactive variables (stored in Vars)
|
|
16
|
+
* $username = 'John'
|
|
17
|
+
* $count = $count + 1
|
|
18
|
+
*
|
|
19
|
+
* // Local variables (temporary)
|
|
20
|
+
* let temp = 'hello'
|
|
21
|
+
* const MAX = 100
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @example Which behaves like:
|
|
25
|
+
* ```javascript
|
|
26
|
+
* $username = 'John'
|
|
27
|
+
* $count = $count + 1
|
|
28
|
+
*
|
|
29
|
+
* let temp = 'hello'
|
|
30
|
+
* const MAX = 100
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Set of reserved parameter names that should NOT be routed to $
|
|
36
|
+
* These are the built-in handler parameters and global objects.
|
|
37
|
+
*/
|
|
38
|
+
const RESERVED_NAMES = new Set([
|
|
39
|
+
// Core runtime parameters
|
|
40
|
+
'eventHandler',
|
|
41
|
+
'Components',
|
|
42
|
+
'Editor',
|
|
43
|
+
'Event',
|
|
44
|
+
'Item',
|
|
45
|
+
'Current',
|
|
46
|
+
'currentPlatform',
|
|
47
|
+
'Values',
|
|
48
|
+
'Apps',
|
|
49
|
+
'Vars',
|
|
50
|
+
'Instance',
|
|
51
|
+
|
|
52
|
+
// Namespaced APIs (new clean API)
|
|
53
|
+
'Nav',
|
|
54
|
+
'UI',
|
|
55
|
+
'Component',
|
|
56
|
+
'Data',
|
|
57
|
+
'Page',
|
|
58
|
+
'App',
|
|
59
|
+
'Var',
|
|
60
|
+
|
|
61
|
+
// Variable functions
|
|
62
|
+
'SetVar',
|
|
63
|
+
'GetContextVar',
|
|
64
|
+
'GetVar',
|
|
65
|
+
'SetContextVar',
|
|
66
|
+
|
|
67
|
+
// Component functions
|
|
68
|
+
'GetComponent',
|
|
69
|
+
'GetComponents',
|
|
70
|
+
'AddComponent',
|
|
71
|
+
'DeleteComponentAction',
|
|
72
|
+
'CopyComponentToClipboard',
|
|
73
|
+
'PasteComponentFromClipboard',
|
|
74
|
+
|
|
75
|
+
// Application functions
|
|
76
|
+
'UpdateApplication',
|
|
77
|
+
'context',
|
|
78
|
+
'applications',
|
|
79
|
+
|
|
80
|
+
// Page functions
|
|
81
|
+
'AddPage',
|
|
82
|
+
'UpdatePage',
|
|
83
|
+
'deletePage',
|
|
84
|
+
|
|
85
|
+
// Navigation functions
|
|
86
|
+
'NavigateToUrl',
|
|
87
|
+
'NavigateToHash',
|
|
88
|
+
'NavigateToPage',
|
|
89
|
+
|
|
90
|
+
// Property update functions
|
|
91
|
+
'updateInput',
|
|
92
|
+
'updateName',
|
|
93
|
+
'updateEvent',
|
|
94
|
+
'updateStyle',
|
|
95
|
+
'updateStyleHandlers',
|
|
96
|
+
|
|
97
|
+
// Editor functions
|
|
98
|
+
'openEditorTab',
|
|
99
|
+
'setCurrentEditorTab',
|
|
100
|
+
'TraitCompoentFromSchema',
|
|
101
|
+
|
|
102
|
+
// Other functions
|
|
103
|
+
'InvokeFunction',
|
|
104
|
+
'Utils',
|
|
105
|
+
'console',
|
|
106
|
+
'UploadFile',
|
|
107
|
+
'BrowseFiles',
|
|
108
|
+
'EventData',
|
|
109
|
+
|
|
110
|
+
// Toast functions
|
|
111
|
+
'ShowToast',
|
|
112
|
+
'ShowSuccessToast',
|
|
113
|
+
'ShowErrorToast',
|
|
114
|
+
'ShowWarningToast',
|
|
115
|
+
'ShowInfoToast',
|
|
116
|
+
'HideToast',
|
|
117
|
+
'ClearAllToasts',
|
|
118
|
+
|
|
119
|
+
// JavaScript built-ins that must be preserved
|
|
120
|
+
'undefined',
|
|
121
|
+
'null',
|
|
122
|
+
'true',
|
|
123
|
+
'false',
|
|
124
|
+
'NaN',
|
|
125
|
+
'Infinity',
|
|
126
|
+
'globalThis',
|
|
127
|
+
'window',
|
|
128
|
+
'self',
|
|
129
|
+
|
|
130
|
+
// Common globals
|
|
131
|
+
'Math',
|
|
132
|
+
'JSON',
|
|
133
|
+
'Date',
|
|
134
|
+
'Array',
|
|
135
|
+
'Object',
|
|
136
|
+
'String',
|
|
137
|
+
'Number',
|
|
138
|
+
'Boolean',
|
|
139
|
+
'RegExp',
|
|
140
|
+
'Error',
|
|
141
|
+
'TypeError',
|
|
142
|
+
'ReferenceError',
|
|
143
|
+
'SyntaxError',
|
|
144
|
+
'Promise',
|
|
145
|
+
'Map',
|
|
146
|
+
'Set',
|
|
147
|
+
'WeakMap',
|
|
148
|
+
'WeakSet',
|
|
149
|
+
'Symbol',
|
|
150
|
+
'Proxy',
|
|
151
|
+
'Reflect',
|
|
152
|
+
'parseInt',
|
|
153
|
+
'parseFloat',
|
|
154
|
+
'isNaN',
|
|
155
|
+
'isFinite',
|
|
156
|
+
'encodeURI',
|
|
157
|
+
'decodeURI',
|
|
158
|
+
'encodeURIComponent',
|
|
159
|
+
'decodeURIComponent',
|
|
160
|
+
'setTimeout',
|
|
161
|
+
'setInterval',
|
|
162
|
+
'clearTimeout',
|
|
163
|
+
'clearInterval',
|
|
164
|
+
'fetch',
|
|
165
|
+
'Request',
|
|
166
|
+
'Response',
|
|
167
|
+
'Headers',
|
|
168
|
+
'URL',
|
|
169
|
+
'URLSearchParams',
|
|
170
|
+
'FormData',
|
|
171
|
+
'Blob',
|
|
172
|
+
'File',
|
|
173
|
+
'FileReader',
|
|
174
|
+
'atob',
|
|
175
|
+
'btoa',
|
|
176
|
+
'crypto',
|
|
177
|
+
'performance',
|
|
178
|
+
'queueMicrotask',
|
|
179
|
+
'requestAnimationFrame',
|
|
180
|
+
'cancelAnimationFrame',
|
|
181
|
+
|
|
182
|
+
// Control flow keywords (not variables but good to have)
|
|
183
|
+
'arguments',
|
|
184
|
+
'this',
|
|
185
|
+
]);
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Configuration for creating a handler scope
|
|
189
|
+
*/
|
|
190
|
+
export interface HandlerScopeConfig {
|
|
191
|
+
/** The VarsProxy for reactive variable access */
|
|
192
|
+
VarsProxy: Record<string, any>;
|
|
193
|
+
|
|
194
|
+
/** All handler parameters as key-value pairs */
|
|
195
|
+
parameters: Record<string, any>;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Check if a property name is a reactive variable (starts with $)
|
|
200
|
+
*/
|
|
201
|
+
function isReactiveVar(prop: string): boolean {
|
|
202
|
+
return prop.startsWith('$') && prop.length > 1;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Strip the $ prefix from a reactive variable name
|
|
207
|
+
*/
|
|
208
|
+
function stripPrefix(prop: string): string {
|
|
209
|
+
return prop.slice(1);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Creates a handler execution scope that enables transparent variable access.
|
|
214
|
+
*
|
|
215
|
+
* The returned proxy intercepts all property access:
|
|
216
|
+
* - Reserved names (Current, Event, etc.) return their actual values
|
|
217
|
+
* - `$`-prefixed names are routed to VarsProxy for reactive get/set
|
|
218
|
+
* - Other names resolve normally (local variables, globals)
|
|
219
|
+
*
|
|
220
|
+
* This is used with JavaScript's `with` statement to create a scope
|
|
221
|
+
* where `$`-prefixed variables automatically become reactive.
|
|
222
|
+
*
|
|
223
|
+
* @param config - Configuration with VarsProxy and parameters
|
|
224
|
+
* @returns A Proxy that can be used with `with` statement
|
|
225
|
+
*
|
|
226
|
+
* @example
|
|
227
|
+
* ```typescript
|
|
228
|
+
* const scope = createHandlerScope({
|
|
229
|
+
* VarsProxy: context.VarsProxy,
|
|
230
|
+
* parameters: { Current, Event, Apps, ... }
|
|
231
|
+
* });
|
|
232
|
+
*
|
|
233
|
+
* // Execute code with transparent variable access
|
|
234
|
+
* with (scope) {
|
|
235
|
+
* $username = 'John'; // Sets VarsProxy.username (reactive)
|
|
236
|
+
* $count++; // Increments VarsProxy.count (reactive)
|
|
237
|
+
* let temp = 'local'; // Local variable (not reactive)
|
|
238
|
+
* }
|
|
239
|
+
* ```
|
|
240
|
+
*/
|
|
241
|
+
export function createHandlerScope(config: HandlerScopeConfig): any {
|
|
242
|
+
const { VarsProxy, parameters } = config;
|
|
243
|
+
|
|
244
|
+
return new Proxy(parameters, {
|
|
245
|
+
/**
|
|
246
|
+
* The `has` trap is critical for `with` statement behavior.
|
|
247
|
+
* We claim to have:
|
|
248
|
+
* - All reserved names (handler parameters)
|
|
249
|
+
* - All $-prefixed names (reactive variables)
|
|
250
|
+
*/
|
|
251
|
+
has(target, prop) {
|
|
252
|
+
const propStr = String(prop);
|
|
253
|
+
|
|
254
|
+
// Always claim reserved names
|
|
255
|
+
if (RESERVED_NAMES.has(propStr)) {
|
|
256
|
+
return true;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Claim $-prefixed names for reactive variable access
|
|
260
|
+
if (isReactiveVar(propStr)) {
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// Check if it's a handler parameter
|
|
265
|
+
if (propStr in target) {
|
|
266
|
+
return true;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// For other names, let them resolve normally (local vars, globals)
|
|
270
|
+
// Returning false lets the `with` statement fall through to outer scope
|
|
271
|
+
return false;
|
|
272
|
+
},
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Get property value.
|
|
276
|
+
* - Reserved names get their actual values
|
|
277
|
+
* - $-prefixed names get from VarsProxy (without the $ prefix)
|
|
278
|
+
* - Other names shouldn't reach here (has() returns false)
|
|
279
|
+
*/
|
|
280
|
+
get(target, prop, receiver) {
|
|
281
|
+
const propStr = String(prop);
|
|
282
|
+
|
|
283
|
+
// Symbol properties go to target
|
|
284
|
+
if (typeof prop === 'symbol') {
|
|
285
|
+
return target[prop];
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// $-prefixed: route to VarsProxy (strip the $ prefix)
|
|
289
|
+
if (isReactiveVar(propStr)) {
|
|
290
|
+
const varName = stripPrefix(propStr);
|
|
291
|
+
return VarsProxy[varName];
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// Reserved names: return actual parameter value or global
|
|
295
|
+
if (RESERVED_NAMES.has(propStr)) {
|
|
296
|
+
if (propStr in target) {
|
|
297
|
+
return target[propStr];
|
|
298
|
+
}
|
|
299
|
+
// Try globalThis for built-ins
|
|
300
|
+
if (propStr in globalThis) {
|
|
301
|
+
const value = (globalThis as any)[propStr];
|
|
302
|
+
// Bind functions that need 'this' context (like fetch, setTimeout, etc.)
|
|
303
|
+
if (typeof value === 'function' && ['fetch', 'setTimeout', 'setInterval', 'clearTimeout', 'clearInterval', 'requestAnimationFrame', 'cancelAnimationFrame', 'queueMicrotask'].includes(propStr)) {
|
|
304
|
+
return value.bind(globalThis);
|
|
305
|
+
}
|
|
306
|
+
return value;
|
|
307
|
+
}
|
|
308
|
+
return undefined;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// Check if it's a handler parameter
|
|
312
|
+
if (propStr in target) {
|
|
313
|
+
return target[propStr];
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// Fallback to undefined (shouldn't normally reach here)
|
|
317
|
+
return undefined;
|
|
318
|
+
},
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Set property value.
|
|
322
|
+
* - $-prefixed names set to VarsProxy (without the $ prefix)
|
|
323
|
+
* - Reserved names update actual values
|
|
324
|
+
* - Other names shouldn't reach here
|
|
325
|
+
*/
|
|
326
|
+
set(target, prop, value, receiver) {
|
|
327
|
+
const propStr = String(prop);
|
|
328
|
+
|
|
329
|
+
// Symbol properties go to target
|
|
330
|
+
if (typeof prop === 'symbol') {
|
|
331
|
+
target[prop] = value;
|
|
332
|
+
return true;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// $-prefixed: route to VarsProxy (strip the $ prefix)
|
|
336
|
+
if (isReactiveVar(propStr)) {
|
|
337
|
+
const varName = stripPrefix(propStr);
|
|
338
|
+
VarsProxy[varName] = value;
|
|
339
|
+
return true;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
// Don't allow setting reserved globals
|
|
343
|
+
if (RESERVED_NAMES.has(propStr) && propStr in globalThis) {
|
|
344
|
+
// Allow setting if it's a handler parameter (like Instance)
|
|
345
|
+
if (propStr in target) {
|
|
346
|
+
target[propStr] = value;
|
|
347
|
+
return true;
|
|
348
|
+
}
|
|
349
|
+
// Ignore attempts to set globals
|
|
350
|
+
return true;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
// Check if it's a handler parameter
|
|
354
|
+
if (propStr in target && RESERVED_NAMES.has(propStr)) {
|
|
355
|
+
target[propStr] = value;
|
|
356
|
+
return true;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// For non-$-prefixed, non-reserved: this shouldn't happen
|
|
360
|
+
// but if it does, store on target
|
|
361
|
+
target[propStr] = value;
|
|
362
|
+
return true;
|
|
363
|
+
},
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Property descriptor for iteration support
|
|
367
|
+
*/
|
|
368
|
+
getOwnPropertyDescriptor(target, prop) {
|
|
369
|
+
const propStr = String(prop);
|
|
370
|
+
|
|
371
|
+
// $-prefixed: describe from VarsProxy
|
|
372
|
+
if (isReactiveVar(propStr)) {
|
|
373
|
+
const varName = stripPrefix(propStr);
|
|
374
|
+
if (varName in VarsProxy) {
|
|
375
|
+
return {
|
|
376
|
+
configurable: true,
|
|
377
|
+
enumerable: true,
|
|
378
|
+
value: VarsProxy[varName],
|
|
379
|
+
writable: true,
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
// Return a descriptor anyway so the variable can be set
|
|
383
|
+
return {
|
|
384
|
+
configurable: true,
|
|
385
|
+
enumerable: true,
|
|
386
|
+
value: undefined,
|
|
387
|
+
writable: true,
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
if (propStr in target) {
|
|
392
|
+
return Object.getOwnPropertyDescriptor(target, propStr);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
return undefined;
|
|
396
|
+
},
|
|
397
|
+
});
|
|
398
|
+
}
|
package/handlers/index.ts
CHANGED
|
@@ -144,14 +144,17 @@ export {
|
|
|
144
144
|
/**
|
|
145
145
|
* Handler compilation utilities with automatic caching.
|
|
146
146
|
* Compiles JavaScript code strings into executable functions.
|
|
147
|
-
*
|
|
147
|
+
*
|
|
148
148
|
* @see {@link compiler.ts} for implementation details
|
|
149
149
|
*/
|
|
150
150
|
export {
|
|
151
151
|
compileHandlerFunction,
|
|
152
152
|
clearHandlerCache,
|
|
153
153
|
getHandlerCacheSize,
|
|
154
|
-
HANDLER_PARAMETERS
|
|
154
|
+
HANDLER_PARAMETERS,
|
|
155
|
+
setTransparentVarsEnabled,
|
|
156
|
+
isTransparentVarsEnabled,
|
|
157
|
+
createHandlerScope
|
|
155
158
|
} from './compiler';
|
|
156
159
|
|
|
157
160
|
// ============================================================================
|
|
@@ -182,3 +185,32 @@ export {
|
|
|
182
185
|
export {
|
|
183
186
|
createGlobalHandlerFunctions
|
|
184
187
|
} from './runtime-api';
|
|
188
|
+
|
|
189
|
+
// ============================================================================
|
|
190
|
+
// Namespaced Handler API
|
|
191
|
+
// ============================================================================
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Namespaced Handler API for clean, organized access to runtime functions.
|
|
195
|
+
* Provides Nav, UI, Component, Data, Page, App, Var namespaces.
|
|
196
|
+
*
|
|
197
|
+
* @see {@link handler-api.ts} for type definitions
|
|
198
|
+
* @see {@link handler-api-factory.ts} for factory implementation
|
|
199
|
+
*/
|
|
200
|
+
export {
|
|
201
|
+
createHandlerAPI,
|
|
202
|
+
extractLegacyParameters
|
|
203
|
+
} from './handler-api-factory';
|
|
204
|
+
|
|
205
|
+
export type {
|
|
206
|
+
HandlerAPI,
|
|
207
|
+
NavAPI,
|
|
208
|
+
UIAPI,
|
|
209
|
+
ComponentAPI,
|
|
210
|
+
DataAPI,
|
|
211
|
+
PageAPI,
|
|
212
|
+
AppAPI,
|
|
213
|
+
EditorAPI,
|
|
214
|
+
VarAPI,
|
|
215
|
+
ToastType
|
|
216
|
+
} from './handler-api';
|
|
@@ -25,14 +25,6 @@ export function createComponentPropertyFunctions() {
|
|
|
25
25
|
updateComponentAttributes(component.application_id, component.uuid, "input", eventData);
|
|
26
26
|
},
|
|
27
27
|
|
|
28
|
-
/**
|
|
29
|
-
* Updates component input handlers
|
|
30
|
-
*/
|
|
31
|
-
updateInputHandlers: (component: ComponentElement, inputName: string, value: any) => {
|
|
32
|
-
const eventData = { [inputName]: value };
|
|
33
|
-
updateComponentAttributes(component.application_id, component.uuid, "inputHandlers", eventData);
|
|
34
|
-
},
|
|
35
|
-
|
|
36
28
|
/**
|
|
37
29
|
* Updates component event handler
|
|
38
30
|
*/
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* 3. **Component Properties** (`component-properties.ts`)
|
|
24
24
|
* - `updateName`, `updateInput`, `updateStyle`, `updateEvent` - Property updates
|
|
25
|
-
* - `
|
|
25
|
+
* - `updateStyleHandlers` - Style handler updates
|
|
26
26
|
*
|
|
27
27
|
* 4. **Page Management** (`pages.ts`)
|
|
28
28
|
* - `AddPage`, `UpdatePage`, `deletePage` - Page CRUD
|
package/index.ts
CHANGED
|
@@ -1,59 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module Runtime
|
|
3
|
-
* @description Nuraly Runtime System - Core execution engine for the visual web application builder
|
|
4
|
-
*
|
|
5
|
-
* The Runtime System is responsible for:
|
|
6
|
-
* - **Handler Execution**: Compiling and executing JavaScript code from component properties
|
|
7
|
-
* - **State Management**: Reactive state with proxy-based change detection
|
|
8
|
-
* - **Component Lifecycle**: Managing component registration, hierarchy, and relationships
|
|
9
|
-
* - **Runtime API**: Providing rich APIs for components to interact with the system
|
|
10
|
-
* - **Editor Integration**: Connecting studio editor with runtime execution environment
|
|
11
|
-
*
|
|
12
|
-
* @example Basic Usage
|
|
13
|
-
* ```typescript
|
|
14
|
-
* import { executeHandler, ExecuteInstance, Editor } from './';
|
|
15
|
-
*
|
|
16
|
-
* // Execute a handler
|
|
17
|
-
* const result = executeHandler(component, "GetVar('username')", { event: clickEvent });
|
|
18
|
-
*
|
|
19
|
-
* // Access runtime state
|
|
20
|
-
* ExecuteInstance.VarsProxy.username = 'John Doe';
|
|
21
|
-
* const theme = ExecuteInstance.GetVar('theme');
|
|
22
|
-
*
|
|
23
|
-
* // Check editor mode
|
|
24
|
-
* if (Editor.getEditorMode()) {
|
|
25
|
-
* console.log('Running in editor mode');
|
|
26
|
-
* }
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* @example Advanced Usage - Creating Dynamic Applications
|
|
30
|
-
* ```typescript
|
|
31
|
-
* import { executeHandler, ExecuteInstance } from './';
|
|
32
|
-
*
|
|
33
|
-
* // Handler code for dynamic component behavior
|
|
34
|
-
* const handlerCode = `
|
|
35
|
-
* const count = GetVar('count') || 0;
|
|
36
|
-
* SetVar('count', count + 1);
|
|
37
|
-
* updateInput(Current, 'text', 'static', \`Clicked \${count + 1} times\`);
|
|
38
|
-
* `;
|
|
39
|
-
*
|
|
40
|
-
* // Execute handler when button is clicked
|
|
41
|
-
* executeHandler(buttonComponent, handlerCode, { event: clickEvent });
|
|
42
|
-
* ```
|
|
43
|
-
*
|
|
44
|
-
* @see {@link ./README.md} for comprehensive documentation
|
|
45
|
-
* @see {@link ./handlers/README.md} for handler execution details
|
|
46
|
-
* @see {@link ./state/README.md} for state management details
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
// ============================================================================
|
|
50
|
-
// Core Runtime Context and State Management
|
|
51
|
-
// ============================================================================
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* RuntimeInstance - Main singleton instance of the RuntimeContext
|
|
55
|
-
* @see {@link RuntimeContext} in ./state/runtime-context.ts
|
|
56
|
-
*/
|
|
57
1
|
export {
|
|
58
2
|
RuntimeInstance,
|
|
59
3
|
ExecuteInstance,
|
|
@@ -61,16 +5,7 @@ export {
|
|
|
61
5
|
RuntimeHelpers
|
|
62
6
|
} from './state';
|
|
63
7
|
|
|
64
|
-
// ============================================================================
|
|
65
|
-
// Redux Store - Application State
|
|
66
|
-
// ============================================================================
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Redux store atoms for component, application, page, and environment state
|
|
70
|
-
* @see {@link ./redux/store} for store definitions
|
|
71
|
-
*/
|
|
72
8
|
export {
|
|
73
|
-
// Component Store
|
|
74
9
|
$components,
|
|
75
10
|
$applicationComponents,
|
|
76
11
|
$selectedComponent,
|
|
@@ -99,12 +34,10 @@ export {
|
|
|
99
34
|
fillApplicationComponents,
|
|
100
35
|
extractChildresIds,
|
|
101
36
|
extractAllChildrenIds,
|
|
102
|
-
// Application Store
|
|
103
37
|
$applications,
|
|
104
38
|
$currentApplication,
|
|
105
39
|
$editorState,
|
|
106
40
|
$resizing,
|
|
107
|
-
// Page Store
|
|
108
41
|
$pages,
|
|
109
42
|
$currentPage,
|
|
110
43
|
$currentPageViewPort,
|
|
@@ -116,73 +49,39 @@ export {
|
|
|
116
49
|
$pageSize,
|
|
117
50
|
$applicationPages,
|
|
118
51
|
refreshPageStoreVar,
|
|
119
|
-
// Context/Variables Store
|
|
120
52
|
$context,
|
|
121
|
-
// Environment Store
|
|
122
53
|
ViewMode,
|
|
123
54
|
$environment,
|
|
124
|
-
// Toast Store
|
|
125
55
|
$toasts,
|
|
126
|
-
// Debug Store
|
|
127
56
|
$debug,
|
|
128
|
-
// Provider Store
|
|
129
57
|
$providers,
|
|
130
|
-
// Component Types
|
|
131
58
|
type ComponentElement,
|
|
132
59
|
type PageElement
|
|
133
60
|
} from './redux/store';
|
|
134
61
|
|
|
135
|
-
// ============================================================================
|
|
136
|
-
// Redux Actions
|
|
137
|
-
// ============================================================================
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Redux action creators for state mutations
|
|
141
|
-
* @see {@link ./redux/actions} for action definitions
|
|
142
|
-
*/
|
|
143
62
|
export * from './redux/actions';
|
|
144
|
-
|
|
145
|
-
// ============================================================================
|
|
146
|
-
// Redux Handlers
|
|
147
|
-
// ============================================================================
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Redux handlers for complex state transformations
|
|
151
|
-
* @see {@link ./redux/handlers} for handler definitions
|
|
152
|
-
*/
|
|
153
63
|
export * from './redux/handlers';
|
|
154
64
|
|
|
155
|
-
// ============================================================================
|
|
156
|
-
// Handler Execution System
|
|
157
|
-
// ============================================================================
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Handler execution utilities for compiling and running component handlers
|
|
161
|
-
* @see {@link executeHandler} in ./handlers/handler-executor.ts
|
|
162
|
-
* @see {@link compileHandlerFunction} in ./handlers/compiler.ts
|
|
163
|
-
* @see {@link getContextFromComponent} in ./handlers/handler-executor.ts
|
|
164
|
-
*/
|
|
165
65
|
export {
|
|
166
66
|
executeHandler,
|
|
167
67
|
getContextFromComponent,
|
|
168
68
|
compileHandlerFunction
|
|
169
69
|
} from './handlers';
|
|
170
70
|
|
|
171
|
-
// ============================================================================
|
|
172
|
-
// Utilities
|
|
173
|
-
// ============================================================================
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Utility functions for rendering, logging, validation, and more
|
|
177
|
-
* @see {@link ./utils} for utility definitions
|
|
178
|
-
*/
|
|
179
71
|
export * from './utils';
|
|
180
72
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
73
|
+
export {
|
|
74
|
+
ComponentRegistry,
|
|
75
|
+
registerComponent,
|
|
76
|
+
registerComponents,
|
|
77
|
+
type ComponentRegistrationOptions,
|
|
78
|
+
type ComponentTemplateFunction,
|
|
79
|
+
type ComponentRenderProps,
|
|
80
|
+
type RegisteredComponent
|
|
81
|
+
} from './utils/component-registry';
|
|
184
82
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
83
|
+
export {
|
|
84
|
+
BaseElementBlock as BaseElement,
|
|
85
|
+
BaseElementBlock,
|
|
86
|
+
BaseElementCore
|
|
87
|
+
} from './components/ui/components/base/BaseElement';
|