@saolabs/client 1.0.0 → 1.0.2
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 +52 -195
- package/dist/index.d.ts +20 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/plugins.d.ts +2 -2
- package/dist/plugins.js +2 -2
- package/dist/src/core/app/Application.d.ts +17 -15
- package/dist/src/core/app/Application.d.ts.map +1 -1
- package/dist/src/core/app/Application.js +41 -18
- package/dist/src/core/app/Application.js.map +1 -1
- package/dist/src/core/bootstrap/app.d.ts +1 -1
- package/dist/src/core/bootstrap/app.d.ts.map +1 -1
- package/dist/src/core/bootstrap/app.js +74 -4
- package/dist/src/core/bootstrap/app.js.map +1 -1
- package/dist/src/core/bootstrap/bundle.d.ts +41 -0
- package/dist/src/core/bootstrap/bundle.d.ts.map +1 -0
- package/dist/src/core/bootstrap/bundle.js +98 -0
- package/dist/src/core/bootstrap/bundle.js.map +1 -0
- package/dist/src/core/bootstrap/providers/ApiServiceProvider.d.ts +1 -1
- package/dist/src/core/bootstrap/providers/ApiServiceProvider.d.ts.map +1 -1
- package/dist/src/core/bootstrap/providers/ApiServiceProvider.js +3 -3
- package/dist/src/core/bootstrap/providers/ApiServiceProvider.js.map +1 -1
- package/dist/src/core/bootstrap/providers/CoreServiceProvider.d.ts +1 -1
- package/dist/src/core/bootstrap/providers/CoreServiceProvider.d.ts.map +1 -1
- package/dist/src/core/bootstrap/providers/CoreServiceProvider.js +11 -8
- package/dist/src/core/bootstrap/providers/CoreServiceProvider.js.map +1 -1
- package/dist/src/core/bootstrap/providers/HelperServiceProvider.d.ts +3 -1
- package/dist/src/core/bootstrap/providers/HelperServiceProvider.d.ts.map +1 -1
- package/dist/src/core/bootstrap/providers/HelperServiceProvider.js +8 -3
- package/dist/src/core/bootstrap/providers/HelperServiceProvider.js.map +1 -1
- package/dist/src/core/bootstrap/providers/RouteServiceProvider.d.ts +2 -1
- package/dist/src/core/bootstrap/providers/RouteServiceProvider.d.ts.map +1 -1
- package/dist/src/core/bootstrap/providers/RouteServiceProvider.js +14 -4
- package/dist/src/core/bootstrap/providers/RouteServiceProvider.js.map +1 -1
- package/dist/src/core/bootstrap/providers/ServiceProvider.d.ts +4 -4
- package/dist/src/core/bootstrap/providers/ServiceProvider.d.ts.map +1 -1
- package/dist/src/core/bootstrap/providers/ServiceProvider.js +5 -5
- package/dist/src/core/bootstrap/providers/ServiceProvider.js.map +1 -1
- package/dist/src/core/bootstrap/providers/ViewServiceProvider.d.ts +1 -1
- package/dist/src/core/bootstrap/providers/ViewServiceProvider.d.ts.map +1 -1
- package/dist/src/core/bootstrap/providers/ViewServiceProvider.js +3 -3
- package/dist/src/core/bootstrap/providers/ViewServiceProvider.js.map +1 -1
- package/dist/src/core/bootstrap/providers/default-providers.d.ts +1 -1
- package/dist/src/core/bootstrap/providers/default-providers.d.ts.map +1 -1
- package/dist/src/core/bootstrap/providers/default-providers.js +44 -11
- package/dist/src/core/bootstrap/providers/default-providers.js.map +1 -1
- package/dist/src/core/bootstrap/providers/index.d.ts +9 -9
- package/dist/src/core/bootstrap/providers/index.d.ts.map +1 -1
- package/dist/src/core/bootstrap/providers/index.js +8 -8
- package/dist/src/core/bootstrap/providers/index.js.map +1 -1
- package/dist/src/core/bootstrap/providers/provider-order.d.ts +1 -1
- package/dist/src/core/bootstrap/providers/provider-order.d.ts.map +1 -1
- package/dist/src/core/bootstrap/ssr.d.ts +47 -0
- package/dist/src/core/bootstrap/ssr.d.ts.map +1 -0
- package/dist/src/core/bootstrap/ssr.js +125 -0
- package/dist/src/core/bootstrap/ssr.js.map +1 -0
- package/dist/src/core/cache/ViewCache.d.ts +1 -1
- package/dist/src/core/cache/ViewCache.d.ts.map +1 -1
- package/dist/src/core/cache/index.d.ts +1 -1
- package/dist/src/core/cache/index.d.ts.map +1 -1
- package/dist/src/core/cache/index.js +1 -1
- package/dist/src/core/cache/index.js.map +1 -1
- package/dist/src/core/contracts/ApplicationInterface.d.ts +13 -11
- package/dist/src/core/contracts/ApplicationInterface.d.ts.map +1 -1
- package/dist/src/core/contracts/BlockInterface.d.ts +10 -10
- package/dist/src/core/contracts/BlockInterface.d.ts.map +1 -1
- package/dist/src/core/contracts/BundleInterface.d.ts +38 -0
- package/dist/src/core/contracts/BundleInterface.d.ts.map +1 -0
- package/dist/src/core/contracts/BundleInterface.js +2 -0
- package/dist/src/core/contracts/BundleInterface.js.map +1 -0
- package/dist/src/core/contracts/ComponentInterface.d.ts +7 -6
- package/dist/src/core/contracts/ComponentInterface.d.ts.map +1 -1
- package/dist/src/core/contracts/ElementInterface.d.ts +91 -27
- package/dist/src/core/contracts/ElementInterface.d.ts.map +1 -1
- package/dist/src/core/contracts/HeadServiceInterface.d.ts +37 -0
- package/dist/src/core/contracts/HeadServiceInterface.d.ts.map +1 -0
- package/dist/src/core/contracts/HeadServiceInterface.js +3 -0
- package/dist/src/core/contracts/HeadServiceInterface.js.map +1 -0
- package/dist/src/core/contracts/HelperInterface.d.ts +9 -1
- package/dist/src/core/contracts/HelperInterface.d.ts.map +1 -1
- package/dist/src/core/contracts/HttpServiceInterface.d.ts +3 -0
- package/dist/src/core/contracts/HttpServiceInterface.d.ts.map +1 -1
- package/dist/src/core/contracts/MarkerInterface.d.ts +29 -44
- package/dist/src/core/contracts/MarkerInterface.d.ts.map +1 -1
- package/dist/src/core/contracts/ReactiveInterface.d.ts +9 -9
- package/dist/src/core/contracts/ReactiveInterface.d.ts.map +1 -1
- package/dist/src/core/contracts/RouterInterface.d.ts +5 -2
- package/dist/src/core/contracts/RouterInterface.d.ts.map +1 -1
- package/dist/src/core/contracts/SectionInterface.d.ts +48 -0
- package/dist/src/core/contracts/SectionInterface.d.ts.map +1 -0
- package/dist/src/core/contracts/SectionInterface.js +2 -0
- package/dist/src/core/contracts/SectionInterface.js.map +1 -0
- package/dist/src/core/contracts/ServiceProviderInterface.d.ts +3 -3
- package/dist/src/core/contracts/ServiceProviderInterface.d.ts.map +1 -1
- package/dist/src/core/contracts/ViewControllerInterface.d.ts +116 -15
- package/dist/src/core/contracts/ViewControllerInterface.d.ts.map +1 -1
- package/dist/src/core/contracts/ViewInterface.d.ts +31 -5
- package/dist/src/core/contracts/ViewInterface.d.ts.map +1 -1
- package/dist/src/core/contracts/ViewManagerInterface.d.ts +47 -5
- package/dist/src/core/contracts/ViewManagerInterface.d.ts.map +1 -1
- package/dist/src/core/contracts/ViewStateInterface.d.ts +39 -2
- package/dist/src/core/contracts/ViewStateInterface.d.ts.map +1 -1
- package/dist/src/core/contracts/common.d.ts +3 -3
- package/dist/src/core/contracts/common.js +3 -3
- package/dist/src/core/contracts/utils.d.ts +19 -19
- package/dist/src/core/contracts/utils.d.ts.map +1 -1
- package/dist/src/core/contracts/views.d.ts +1 -22
- package/dist/src/core/contracts/views.d.ts.map +1 -1
- package/dist/src/core/devtools/hook.d.ts +66 -0
- package/dist/src/core/devtools/hook.d.ts.map +1 -0
- package/dist/src/core/devtools/hook.js +114 -0
- package/dist/src/core/devtools/hook.js.map +1 -0
- package/dist/src/core/devtools/index.d.ts +34 -0
- package/dist/src/core/devtools/index.d.ts.map +1 -0
- package/dist/src/core/devtools/index.js +33 -0
- package/dist/src/core/devtools/index.js.map +1 -0
- package/dist/src/core/devtools/inspector.d.ts +31 -0
- package/dist/src/core/devtools/inspector.d.ts.map +1 -0
- package/dist/src/core/devtools/inspector.js +249 -0
- package/dist/src/core/devtools/inspector.js.map +1 -0
- package/dist/src/core/elements/Block.d.ts +9 -7
- package/dist/src/core/elements/Block.d.ts.map +1 -1
- package/dist/src/core/elements/Block.js +33 -9
- package/dist/src/core/elements/Block.js.map +1 -1
- package/dist/src/core/elements/BlockOutlet.d.ts +19 -8
- package/dist/src/core/elements/BlockOutlet.d.ts.map +1 -1
- package/dist/src/core/elements/BlockOutlet.js +57 -13
- package/dist/src/core/elements/BlockOutlet.js.map +1 -1
- package/dist/src/core/elements/Component.d.ts +83 -11
- package/dist/src/core/elements/Component.d.ts.map +1 -1
- package/dist/src/core/elements/Component.js +334 -13
- package/dist/src/core/elements/Component.js.map +1 -1
- package/dist/src/core/elements/ForeachSlotCache.d.ts +95 -0
- package/dist/src/core/elements/ForeachSlotCache.d.ts.map +1 -0
- package/dist/src/core/elements/ForeachSlotCache.js +149 -0
- package/dist/src/core/elements/ForeachSlotCache.js.map +1 -0
- package/dist/src/core/elements/Fragment.d.ts +19 -13
- package/dist/src/core/elements/Fragment.d.ts.map +1 -1
- package/dist/src/core/elements/Fragment.js +43 -20
- package/dist/src/core/elements/Fragment.js.map +1 -1
- package/dist/src/core/elements/Html.d.ts +89 -12
- package/dist/src/core/elements/Html.d.ts.map +1 -1
- package/dist/src/core/elements/Html.js +707 -106
- package/dist/src/core/elements/Html.js.map +1 -1
- package/dist/src/core/elements/Output.d.ts +34 -10
- package/dist/src/core/elements/Output.d.ts.map +1 -1
- package/dist/src/core/elements/Output.js +141 -26
- package/dist/src/core/elements/Output.js.map +1 -1
- package/dist/src/core/elements/Reactive.d.ts +85 -14
- package/dist/src/core/elements/Reactive.d.ts.map +1 -1
- package/dist/src/core/elements/Reactive.js +315 -41
- package/dist/src/core/elements/Reactive.js.map +1 -1
- package/dist/src/core/elements/TextElement.d.ts +11 -7
- package/dist/src/core/elements/TextElement.d.ts.map +1 -1
- package/dist/src/core/elements/TextElement.js +18 -11
- package/dist/src/core/elements/TextElement.js.map +1 -1
- package/dist/src/core/elements/Wrapper.d.ts +24 -13
- package/dist/src/core/elements/Wrapper.d.ts.map +1 -1
- package/dist/src/core/elements/Wrapper.js +65 -8
- package/dist/src/core/elements/Wrapper.js.map +1 -1
- package/dist/src/core/elements/Yield.d.ts +10 -9
- package/dist/src/core/elements/Yield.d.ts.map +1 -1
- package/dist/src/core/elements/Yield.js +31 -19
- package/dist/src/core/elements/Yield.js.map +1 -1
- package/dist/src/core/elements/helpers.d.ts +7 -7
- package/dist/src/core/elements/helpers.d.ts.map +1 -1
- package/dist/src/core/elements/helpers.js +4 -4
- package/dist/src/core/elements/index.d.ts +12 -11
- package/dist/src/core/elements/index.d.ts.map +1 -1
- package/dist/src/core/elements/index.js +12 -11
- package/dist/src/core/elements/index.js.map +1 -1
- package/dist/src/core/elements/reconcileChildren.d.ts +7 -0
- package/dist/src/core/elements/reconcileChildren.d.ts.map +1 -0
- package/dist/src/core/elements/reconcileChildren.js +74 -0
- package/dist/src/core/elements/reconcileChildren.js.map +1 -0
- package/dist/src/core/hellpers/utils.d.ts +2 -2
- package/dist/src/core/hellpers/utils.js +4 -4
- package/dist/src/core/helpers/ApiClient.d.ts +58 -0
- package/dist/src/core/helpers/ApiClient.d.ts.map +1 -0
- package/dist/src/core/helpers/ApiClient.js +131 -0
- package/dist/src/core/helpers/ApiClient.js.map +1 -0
- package/dist/src/core/helpers/app.d.ts +3 -0
- package/dist/src/core/helpers/app.d.ts.map +1 -0
- package/dist/src/core/helpers/app.js +63 -0
- package/dist/src/core/helpers/app.js.map +1 -0
- package/dist/src/core/helpers/transition.d.ts +34 -0
- package/dist/src/core/helpers/transition.d.ts.map +1 -0
- package/dist/src/core/helpers/transition.js +118 -0
- package/dist/src/core/helpers/transition.js.map +1 -0
- package/dist/src/core/helpers/utils.d.ts +26 -0
- package/dist/src/core/helpers/utils.d.ts.map +1 -0
- package/dist/src/core/helpers/utils.js +96 -0
- package/dist/src/core/helpers/utils.js.map +1 -0
- package/dist/src/core/helpers/view.d.ts +39 -0
- package/dist/src/core/helpers/view.d.ts.map +1 -0
- package/dist/src/core/helpers/view.js +286 -0
- package/dist/src/core/helpers/view.js.map +1 -0
- package/dist/src/core/routers/Router.d.ts +108 -7
- package/dist/src/core/routers/Router.d.ts.map +1 -1
- package/dist/src/core/routers/Router.js +444 -68
- package/dist/src/core/routers/Router.js.map +1 -1
- package/dist/src/core/routers/index.d.ts +2 -2
- package/dist/src/core/routers/index.d.ts.map +1 -1
- package/dist/src/core/routers/index.js +1 -1
- package/dist/src/core/routers/index.js.map +1 -1
- package/dist/src/core/services/AssetManager.d.ts +112 -0
- package/dist/src/core/services/AssetManager.d.ts.map +1 -0
- package/dist/src/core/services/AssetManager.js +361 -0
- package/dist/src/core/services/AssetManager.js.map +1 -0
- package/dist/src/core/services/BlockManager.d.ts +73 -2
- package/dist/src/core/services/BlockManager.d.ts.map +1 -1
- package/dist/src/core/services/BlockManager.js +270 -48
- package/dist/src/core/services/BlockManager.js.map +1 -1
- package/dist/src/core/services/DomService.js +3 -3
- package/dist/src/core/services/DomService.js.map +1 -1
- package/dist/src/core/services/HeadService.d.ts +24 -0
- package/dist/src/core/services/HeadService.d.ts.map +1 -0
- package/dist/src/core/services/HeadService.js +120 -0
- package/dist/src/core/services/HeadService.js.map +1 -0
- package/dist/src/core/services/HelperService.d.ts +14 -3
- package/dist/src/core/services/HelperService.d.ts.map +1 -1
- package/dist/src/core/services/HelperService.js +32 -2
- package/dist/src/core/services/HelperService.js.map +1 -1
- package/dist/src/core/services/HttpService.d.ts +8 -0
- package/dist/src/core/services/HttpService.d.ts.map +1 -1
- package/dist/src/core/services/HttpService.js +121 -47
- package/dist/src/core/services/HttpService.js.map +1 -1
- package/dist/src/core/services/MarkerRegistry.d.ts +51 -8
- package/dist/src/core/services/MarkerRegistry.d.ts.map +1 -1
- package/dist/src/core/services/MarkerRegistry.js +135 -14
- package/dist/src/core/services/MarkerRegistry.js.map +1 -1
- package/dist/src/core/services/PageCache.d.ts +101 -0
- package/dist/src/core/services/PageCache.d.ts.map +1 -0
- package/dist/src/core/services/PageCache.js +184 -0
- package/dist/src/core/services/PageCache.js.map +1 -0
- package/dist/src/core/services/SectionManager.d.ts +100 -0
- package/dist/src/core/services/SectionManager.d.ts.map +1 -0
- package/dist/src/core/services/SectionManager.js +408 -0
- package/dist/src/core/services/SectionManager.js.map +1 -0
- package/dist/src/core/services/StorageService.js +1 -1
- package/dist/src/core/services/TranslationService.d.ts +21 -0
- package/dist/src/core/services/TranslationService.d.ts.map +1 -0
- package/dist/src/core/services/TranslationService.js +95 -0
- package/dist/src/core/services/TranslationService.js.map +1 -0
- package/dist/src/core/services/index.d.ts +11 -8
- package/dist/src/core/services/index.d.ts.map +1 -1
- package/dist/src/core/services/index.js +11 -8
- package/dist/src/core/services/index.js.map +1 -1
- package/dist/src/core/types/utils.d.ts +8 -8
- package/dist/src/core/types/utils.d.ts.map +1 -1
- package/dist/src/core/view/LoopContext.d.ts +21 -1
- package/dist/src/core/view/LoopContext.d.ts.map +1 -1
- package/dist/src/core/view/LoopContext.js +36 -0
- package/dist/src/core/view/LoopContext.js.map +1 -1
- package/dist/src/core/view/ResourceScope.d.ts +38 -0
- package/dist/src/core/view/ResourceScope.d.ts.map +1 -0
- package/dist/src/core/view/ResourceScope.js +167 -0
- package/dist/src/core/view/ResourceScope.js.map +1 -0
- package/dist/src/core/view/Section.d.ts +17 -32
- package/dist/src/core/view/Section.d.ts.map +1 -1
- package/dist/src/core/view/Section.js +14 -55
- package/dist/src/core/view/Section.js.map +1 -1
- package/dist/src/core/view/View.d.ts +43 -7
- package/dist/src/core/view/View.d.ts.map +1 -1
- package/dist/src/core/view/View.js +22 -4
- package/dist/src/core/view/View.js.map +1 -1
- package/dist/src/core/view/ViewController.d.ts +313 -40
- package/dist/src/core/view/ViewController.d.ts.map +1 -1
- package/dist/src/core/view/ViewController.js +1002 -147
- package/dist/src/core/view/ViewController.js.map +1 -1
- package/dist/src/core/view/ViewManager.d.ts +318 -27
- package/dist/src/core/view/ViewManager.d.ts.map +1 -1
- package/dist/src/core/view/ViewManager.js +1199 -258
- package/dist/src/core/view/ViewManager.js.map +1 -1
- package/dist/src/core/view/ViewState.d.ts +185 -6
- package/dist/src/core/view/ViewState.d.ts.map +1 -1
- package/dist/src/core/view/ViewState.js +851 -123
- package/dist/src/core/view/ViewState.js.map +1 -1
- package/dist/src/core/view/index.d.ts +5 -5
- package/dist/src/core/view/index.d.ts.map +1 -1
- package/dist/src/core/view/index.js +5 -5
- package/dist/src/core/view/index.js.map +1 -1
- package/dist/src/testing/index.d.ts +69 -0
- package/dist/src/testing/index.d.ts.map +1 -0
- package/dist/src/testing/index.js +140 -0
- package/dist/src/testing/index.js.map +1 -0
- package/index.ts +29 -5
- package/package.json +30 -21
- package/plugins.ts +2 -2
- package/src/core/app/Application.ts +58 -31
- package/src/core/bootstrap/app.ts +80 -6
- package/src/core/bootstrap/bundle.ts +101 -0
- package/src/core/bootstrap/providers/ApiServiceProvider.ts +4 -4
- package/src/core/bootstrap/providers/CoreServiceProvider.ts +14 -8
- package/src/core/bootstrap/providers/HelperServiceProvider.ts +8 -3
- package/src/core/bootstrap/providers/RouteServiceProvider.ts +15 -4
- package/src/core/bootstrap/providers/ServiceProvider.ts +8 -8
- package/src/core/bootstrap/providers/ViewServiceProvider.ts +3 -3
- package/src/core/bootstrap/providers/default-providers.ts +51 -16
- package/src/core/bootstrap/providers/index.ts +9 -9
- package/src/core/bootstrap/providers/provider-order.test.ts +16 -27
- package/src/core/bootstrap/providers/provider-order.ts +1 -1
- package/src/core/bootstrap/ssr.ts +136 -0
- package/src/core/cache/ViewCache.ts +1 -1
- package/src/core/cache/index.ts +1 -1
- package/src/core/contracts/ApplicationInterface.ts +13 -11
- package/src/core/contracts/BlockInterface.ts +18 -18
- package/src/core/contracts/BundleInterface.ts +40 -0
- package/src/core/contracts/ComponentInterface.ts +7 -6
- package/src/core/contracts/ElementInterface.ts +95 -27
- package/src/core/contracts/HeadServiceInterface.ts +41 -0
- package/src/core/contracts/HelperInterface.ts +9 -1
- package/src/core/contracts/HttpServiceInterface.ts +3 -0
- package/src/core/contracts/MarkerInterface.ts +22 -49
- package/src/core/contracts/ReactiveInterface.ts +9 -9
- package/src/core/contracts/RouterInterface.ts +5 -2
- package/src/core/contracts/SectionInterface.ts +49 -0
- package/src/core/contracts/ServiceProviderInterface.ts +3 -3
- package/src/core/contracts/ViewControllerInterface.ts +124 -16
- package/src/core/contracts/ViewInterface.ts +34 -5
- package/src/core/contracts/ViewManagerInterface.ts +40 -5
- package/src/core/contracts/ViewStateInterface.ts +39 -2
- package/src/core/contracts/common.ts +3 -3
- package/src/core/contracts/utils.ts +19 -19
- package/src/core/contracts/views.ts +2 -22
- package/src/core/devtools/hook.ts +142 -0
- package/src/core/devtools/index.ts +38 -0
- package/src/core/devtools/inspector.ts +270 -0
- package/src/core/elements/Block.ts +43 -21
- package/src/core/elements/BlockOutlet.ts +61 -21
- package/src/core/elements/Component.ts +352 -18
- package/src/core/elements/ElementManager.ts +9 -9
- package/src/core/elements/ForeachSlotCache.ts +170 -0
- package/src/core/elements/Fragment.ts +50 -32
- package/src/core/elements/Html.ts +696 -117
- package/src/core/elements/Output.ts +147 -30
- package/src/core/elements/Reactive.ts +329 -52
- package/src/core/elements/TextElement.ts +25 -16
- package/src/core/elements/Wrapper.ts +84 -18
- package/src/core/elements/Yield.ts +35 -24
- package/src/core/elements/helpers.ts +12 -12
- package/src/core/elements/index.ts +25 -24
- package/src/core/elements/reconcileChildren.ts +70 -0
- package/src/core/{hellpers → helpers}/ApiClient.ts +8 -1
- package/src/core/{hellpers → helpers}/app.ts +13 -2
- package/src/core/helpers/transition.ts +127 -0
- package/src/core/{hellpers → helpers}/utils.ts +4 -4
- package/src/core/helpers/view.ts +283 -0
- package/src/core/routers/Router.ts +458 -64
- package/src/core/routers/index.ts +2 -2
- package/src/core/services/AssetManager.ts +387 -0
- package/src/core/services/BlockManager.ts +272 -50
- package/src/core/services/DomService.ts +3 -3
- package/src/core/services/HeadService.ts +124 -0
- package/src/core/services/HelperService.ts +34 -4
- package/src/core/services/HttpService.ts +116 -55
- package/src/core/services/MarkerRegistry.ts +142 -16
- package/src/core/services/PageCache.ts +239 -0
- package/src/core/services/SectionManager.ts +387 -0
- package/src/core/services/StorageService.ts +1 -1
- package/src/core/services/TranslationService.ts +91 -0
- package/src/core/services/index.ts +11 -8
- package/src/core/types/utils.ts +8 -8
- package/src/core/view/LoopContext.ts +38 -1
- package/src/core/view/ResourceScope.ts +174 -0
- package/src/core/view/Section.ts +21 -68
- package/src/core/view/View.ts +57 -8
- package/src/core/view/ViewController.ts +1070 -186
- package/src/core/view/ViewManager.ts +1346 -272
- package/src/core/view/ViewState.ts +834 -116
- package/src/core/view/index.ts +5 -5
- package/src/testing/index.ts +184 -0
- package/dist/src/core/services/MarkerService.d.ts +0 -299
- package/dist/src/core/services/MarkerService.d.ts.map +0 -1
- package/dist/src/core/services/MarkerService.js +0 -723
- package/dist/src/core/services/MarkerService.js.map +0 -1
- package/src/core/services/MarkerService.ts +0 -923
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { SaoElementChildren } from "../types/utils.js";
|
|
2
|
+
import type { ViewControllerInterface } from "./ViewControllerInterface.js";
|
|
3
|
+
import type { HtmlInterface } from "./ElementInterface.js";
|
|
4
|
+
export type SectionItemType = 'static' | 'dynamic' | 'async' | 'reactive';
|
|
5
|
+
export type SectionContentType = 'text' | 'html';
|
|
6
|
+
export type SectionContentRenderer = (parentElement?: HtmlInterface | null | undefined) => string | SaoElementChildren;
|
|
7
|
+
export type SectionConstruvtorArgs = {
|
|
8
|
+
ctx?: ViewControllerInterface | null;
|
|
9
|
+
name: string;
|
|
10
|
+
type: SectionItemType;
|
|
11
|
+
contentType?: SectionContentType;
|
|
12
|
+
stateKeys?: string[];
|
|
13
|
+
renderFactory: SectionContentRenderer;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
16
|
+
export interface SectionInterface {
|
|
17
|
+
ctx?: ViewControllerInterface | null;
|
|
18
|
+
/** Owning view instance — mirrors Block/BlockOutlet keying (`name` + `viewId`). */
|
|
19
|
+
viewId?: string | null;
|
|
20
|
+
name: string;
|
|
21
|
+
type: SectionItemType;
|
|
22
|
+
contentType?: SectionContentType;
|
|
23
|
+
stateKeys?: string[];
|
|
24
|
+
renderFactory?: SectionContentRenderer;
|
|
25
|
+
}
|
|
26
|
+
export interface SectionManagerInterface {
|
|
27
|
+
sections: Map<string, SectionInterface>;
|
|
28
|
+
subscribers: Map<string, ((section: SectionInterface) => void)[]>;
|
|
29
|
+
add(section: SectionInterface): void;
|
|
30
|
+
subscribe(name: string, callback: (section: SectionInterface) => void): () => void;
|
|
31
|
+
unsubscribe(name: string, callback?: (section: SectionInterface) => void): void;
|
|
32
|
+
/** Register a @yield(...) marker so mountViewSections() can find it by name. */
|
|
33
|
+
addYield(id: string, yieldEl: any): void;
|
|
34
|
+
/** Resolve the current value of a named section synchronously — used by `this.yieldContent()` in attribute/prop bindings. */
|
|
35
|
+
resolve(name: string, defaultValue?: any): any;
|
|
36
|
+
/** Mount sections owned by one controller (page or layout) into their matching yields. Mirrors BlockManagerService.mountViewBlocks(). */
|
|
37
|
+
mountViewSections(viewId: string): void;
|
|
38
|
+
/** Hydrate counterpart — claim SSR content, no DOM insertion, only (re)subscribe. */
|
|
39
|
+
hydrateViewSections(viewId: string): void;
|
|
40
|
+
startAll(): void;
|
|
41
|
+
stopAll(): void;
|
|
42
|
+
unmountView(viewId: string): void;
|
|
43
|
+
removeYieldsOfView(viewId: string): void;
|
|
44
|
+
/** Revert every page-scoped head tag (title/meta) before mounting a new page's chain. */
|
|
45
|
+
resetPageHead(): void;
|
|
46
|
+
destroy(): void;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=SectionInterface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionInterface.d.ts","sourceRoot":"","sources":["../../../../src/core/contracts/SectionInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAiB,MAAM,mBAAmB,CAAC;AAC3E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,KAAK,EAAE,aAAa,EAAiE,MAAM,uBAAuB,CAAC;AAG1H,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;AAC1E,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,CAAA;AAChD,MAAM,MAAM,sBAAsB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gFAAgF;IAChF,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;IACzC,6HAA6H;IAC7H,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IAC/C,yIAAyI;IACzI,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,qFAAqF;IACrF,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,QAAQ,IAAI,IAAI,CAAC;IACjB,OAAO,IAAI,IAAI,CAAC;IAChB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,yFAAyF;IACzF,aAAa,IAAI,IAAI,CAAC;IACtB,OAAO,IAAI,IAAI,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionInterface.js","sourceRoot":"","sources":["../../../../src/core/contracts/SectionInterface.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { ApplicationInterface } from "./ApplicationInterface";
|
|
1
|
+
import { SaoObjectType } from "../types/utils.js";
|
|
2
|
+
import type { ApplicationInterface } from "./ApplicationInterface.js";
|
|
3
3
|
/** Service Provider — register() đăng ký, boot() khởi động */
|
|
4
4
|
export interface ServiceProviderInterface {
|
|
5
|
-
|
|
5
|
+
saoType?: SaoObjectType;
|
|
6
6
|
name: string;
|
|
7
7
|
dependsOn?: string[];
|
|
8
8
|
initApplication?(App?: ApplicationInterface): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceProviderInterface.d.ts","sourceRoot":"","sources":["../../../../src/core/contracts/ServiceProviderInterface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ServiceProviderInterface.d.ts","sourceRoot":"","sources":["../../../../src/core/contracts/ServiceProviderInterface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,8DAA8D;AAC9D,MAAM,WAAW,wBAAwB;IACrC,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,eAAe,CAAC,CAAC,GAAG,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACnD,QAAQ,IAAI,IAAI,CAAC;IACjB,IAAI,CAAC,IAAI,IAAI,CAAC;CACjB"}
|
|
@@ -1,36 +1,66 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ViewInterface, ViewRenderFactory } from "./ViewInterface";
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import {
|
|
1
|
+
import type { SaoObjectType } from "../types/utils.js";
|
|
2
|
+
import type { ViewInterface, ViewRenderFactory } from "./ViewInterface.js";
|
|
3
|
+
import type { ViewUserConfig } from "../view/View.js";
|
|
4
|
+
import type { ViewStateInterface } from "./ViewStateInterface.js";
|
|
5
|
+
import type { HtmlInterface, FragmentInterface, SaoElementEventHandler, SaoChildrenFactory, SaoChildrenFactoryOutput, SaoChildrenSlotContent, WrapperInterface, EventModifier } from "./ElementInterface.js";
|
|
6
|
+
import type { ReactiveInterface } from "./ReactiveInterface.js";
|
|
7
|
+
import type { BlockInterface } from "./BlockInterface.js";
|
|
8
|
+
import type { LoopContextInterface } from "./LoopContextInterface.js";
|
|
9
|
+
import { SectionInterface } from "../contracts/SectionInterface.js";
|
|
10
|
+
import type { ForeachSlotCache } from "../elements/ForeachSlotCache.js";
|
|
11
|
+
import type { InitMode } from "./common.js";
|
|
12
|
+
import type { ResourceScope } from '../view/ResourceScope.js';
|
|
9
13
|
export type ViewType = 'view' | 'layout' | 'component' | 'template';
|
|
10
14
|
export interface ViewControllerInterface {
|
|
11
|
-
|
|
15
|
+
saoType: SaoObjectType;
|
|
12
16
|
view: ViewInterface;
|
|
13
17
|
viewId: string;
|
|
14
18
|
path: string;
|
|
15
19
|
viewType: ViewType;
|
|
16
20
|
states: ViewStateInterface;
|
|
21
|
+
readonly scope: ResourceScope;
|
|
22
|
+
afterDom(callback: () => void): () => void;
|
|
17
23
|
loopContext: LoopContextInterface | null;
|
|
18
24
|
/** Raw input data reference */
|
|
19
25
|
data: Record<string, any>;
|
|
20
26
|
/** Whether this view defines a super view (layout) */
|
|
21
27
|
hasSuperView: boolean;
|
|
28
|
+
/** Exact DOM listener references, used for element-level cleanup before destroy. */
|
|
29
|
+
elementEventHandlers: Map<HTMLElement, Map<string, EventListener[]>>;
|
|
30
|
+
/**
|
|
31
|
+
* Active ForeachSlotCache — set bởi Reactive.renderForeach() trước khi gọi factory.
|
|
32
|
+
* __foreach() dùng để quyết định reuse hay create elements.
|
|
33
|
+
* null = không có cache active (render bình thường).
|
|
34
|
+
*/
|
|
35
|
+
_currentForeachCache: ForeachSlotCache | null;
|
|
36
|
+
/** Element gọi trong destroy() để tự gỡ khỏi registry (no-op nếu key đã trỏ bản mới) */
|
|
37
|
+
releaseElement(el: object): void;
|
|
38
|
+
/** Compiler helper for raw interpolation inside HTML RCDATA. */
|
|
39
|
+
decodeTextContent(value: string): string;
|
|
22
40
|
/** Path to super view (layout) */
|
|
23
41
|
superViewPath: string | null;
|
|
24
42
|
/** Main element (Wrapper) for this view */
|
|
25
|
-
mainElement:
|
|
43
|
+
mainElement: WrapperInterface | null;
|
|
44
|
+
preloadElement: WrapperInterface | null;
|
|
26
45
|
sections: Map<string, SectionInterface>;
|
|
27
46
|
blocks: Map<string, BlockInterface>;
|
|
28
47
|
urlPath: string | null;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
48
|
+
isActive: boolean;
|
|
49
|
+
childrenFactory: SaoChildrenFactory | null;
|
|
50
|
+
wrapper: (factory: SaoChildrenFactory) => WrapperInterface;
|
|
51
|
+
removeEventListener(element: HTMLElement, event: string): void;
|
|
52
|
+
addEventListener(element: HTMLElement, event: string, handlers: SaoElementEventHandler, modifiers?: EventModifier[]): void;
|
|
32
53
|
/** Called by reactive system to schedule an update */
|
|
33
54
|
scheduleUpdate(reactive: ReactiveInterface): void;
|
|
55
|
+
/** Còn vùng reactive chờ re-render trong frame này không? */
|
|
56
|
+
hasPendingReactiveUpdate(): boolean;
|
|
57
|
+
/** Flush đồng bộ các reactive update đang chờ (sau mount/hydrate). */
|
|
58
|
+
flushReactiveUpdatesNow(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Chế độ khởi tạo của view: 'create' (CSR) hoặc 'hydrate' (SSR).
|
|
61
|
+
* Truyền xuống mọi element con để chúng tạo mới hay claim DOM server.
|
|
62
|
+
*/
|
|
63
|
+
initMode: InitMode;
|
|
34
64
|
/** Lifecycle */
|
|
35
65
|
setup(config: Record<string, any>): void;
|
|
36
66
|
/** Commit initial data — set initial state values after render */
|
|
@@ -39,20 +69,36 @@ export interface ViewControllerInterface {
|
|
|
39
69
|
updateData(data: Record<string, any>): void;
|
|
40
70
|
/** Update single data item */
|
|
41
71
|
updateDataItem(key: string, value: any): void;
|
|
72
|
+
/** Mount — gắn instance vào real DOM (root!=null) + fire mounting/mounted + acquire asset */
|
|
73
|
+
mount(root?: HtmlInterface | null): void;
|
|
74
|
+
/** Unmount — gỡ instance khỏi real DOM + fire unmounting/unmounted + release asset */
|
|
75
|
+
unmount(): void;
|
|
42
76
|
/** Start reactive subscriptions */
|
|
43
77
|
start(): void;
|
|
44
78
|
/** Stop reactive subscriptions (for caching) */
|
|
45
79
|
stop(): void;
|
|
80
|
+
/** Pause — dirty-mode + buffer async, dùng khi vào PageCache (ROUTE_RENDER_FLOW §7) */
|
|
81
|
+
pause(): void;
|
|
82
|
+
/** Resume — flush dirty keys + apply buffered data, dùng khi restore từ PageCache */
|
|
83
|
+
resume(): void;
|
|
84
|
+
/** State machine: created → active ⇄ paused → destroyed */
|
|
85
|
+
readonly lifecycleState: string;
|
|
86
|
+
active(): void;
|
|
87
|
+
deactive(): void;
|
|
88
|
+
pushBlockAndSections(): void;
|
|
89
|
+
/** Materialize the lazy parent-owned slot only when ChildrenNode is rendered. */
|
|
90
|
+
__children(content: SaoChildrenSlotContent, parentElement: HtmlInterface | null): SaoChildrenFactoryOutput;
|
|
46
91
|
/** Loop directives */
|
|
47
|
-
__foreach<T>(list: T[] | Record<string, T>, callback: (item: T, key: string, index: number, loop: any) => any): any[];
|
|
92
|
+
__foreach<T>(list: T[] | Record<string, T>, callback: (item: T, key: string, index: number, loop: any, identity: number) => any, keyFn?: (item: T, index: number) => any, reconcile?: boolean, scopeId?: string): any[];
|
|
48
93
|
__for(loopType?: string, start?: number, end?: number, execute?: (loop: any) => any): any;
|
|
49
94
|
__while(execute: (loop: any) => any, maxIterations?: number): any;
|
|
50
95
|
/** App reference */
|
|
51
96
|
App: any;
|
|
52
97
|
setApp(app: any): void;
|
|
53
|
-
setUserDefinedConfig(config:
|
|
98
|
+
setUserDefinedConfig<T extends object>(config: ViewUserConfig<T>): void;
|
|
54
99
|
/** Set root element — the container this view renders into */
|
|
55
100
|
setRootElement(rootElement: HtmlInterface): void;
|
|
101
|
+
setParentElement(parentElement: HtmlInterface): void;
|
|
56
102
|
/** Render the view's element tree into rootElement */
|
|
57
103
|
render(): ViewInterface | FragmentInterface | null;
|
|
58
104
|
prerender(): ViewInterface | FragmentInterface | null;
|
|
@@ -63,6 +109,13 @@ export interface ViewControllerInterface {
|
|
|
63
109
|
setIsSuperView(isSuper: boolean): void;
|
|
64
110
|
/** Set the parent layout's controller */
|
|
65
111
|
setSuperView(superView: ViewControllerInterface): void;
|
|
112
|
+
/** Nested view tree (@include): parent controller */
|
|
113
|
+
parent: ViewControllerInterface | null;
|
|
114
|
+
/** Nested view tree (@include): child controllers */
|
|
115
|
+
children: ViewControllerInterface[];
|
|
116
|
+
setParent(parent: ViewControllerInterface | null): void;
|
|
117
|
+
addChild(child: ViewControllerInterface): void;
|
|
118
|
+
removeChild(child: ViewControllerInterface): void;
|
|
66
119
|
/** Track the original page view's controller for block mounting */
|
|
67
120
|
originView: ViewControllerInterface | null;
|
|
68
121
|
/** Set the origin (page) controller reference */
|
|
@@ -73,6 +126,15 @@ export interface ViewControllerInterface {
|
|
|
73
126
|
/** Get config value with optional default */
|
|
74
127
|
getConfig(key?: string, defaultValue?: any): any;
|
|
75
128
|
getConfig(): ViewControllerConfig;
|
|
129
|
+
/**
|
|
130
|
+
* Đưa lỗi cho error boundary gần nhất (chính controller này hoặc tổ tiên
|
|
131
|
+
* qua `parent`). Trả `{ handled: true, fallback }` nếu có boundary xử lý;
|
|
132
|
+
* `{ handled: false }` → caller giữ nguyên hành vi cũ (bubble lên trên).
|
|
133
|
+
*/
|
|
134
|
+
handleError(err: unknown, info: ErrorInfo): {
|
|
135
|
+
handled: boolean;
|
|
136
|
+
fallback?: any;
|
|
137
|
+
};
|
|
76
138
|
}
|
|
77
139
|
export type ViewConfig = {
|
|
78
140
|
hasSuperView?: boolean;
|
|
@@ -109,7 +171,46 @@ export type ViewRuntimeConfig = {
|
|
|
109
171
|
updateVariableItemData?: (key: string, value: any) => void;
|
|
110
172
|
prerender?: ViewRenderFactory | null;
|
|
111
173
|
render?: ViewRenderFactory | null;
|
|
174
|
+
/**
|
|
175
|
+
* Error boundary. Trả children → dùng làm fallback cho vùng lỗi;
|
|
176
|
+
* trả void → chỉ ghi nhận, lỗi tiếp tục bubble lên boundary cha.
|
|
177
|
+
*/
|
|
178
|
+
onError?: ErrorBoundaryHandler;
|
|
112
179
|
[key: string]: any;
|
|
113
180
|
};
|
|
181
|
+
/** Giai đoạn phát sinh lỗi — giúp handler phân biệt lỗi render lần đầu với lỗi sau tương tác. */
|
|
182
|
+
export type ErrorPhase = 'render' | 'update' | 'async';
|
|
183
|
+
export type ErrorInfo = {
|
|
184
|
+
phase: ErrorPhase;
|
|
185
|
+
/** path của view NƠI lỗi xảy ra (có thể là view con, khác với view chứa boundary) */
|
|
186
|
+
path: string;
|
|
187
|
+
};
|
|
188
|
+
export type ErrorBoundaryHandler = (err: unknown, info: ErrorInfo) => any;
|
|
114
189
|
export type ViewControllerConfig = ViewConfig & ViewRuntimeConfig;
|
|
190
|
+
/**
|
|
191
|
+
* `this` bên trong các hàm config do compiler sinh — `commitConstructorData`,
|
|
192
|
+
* `updateVariableData`, `updateVariableItemData`.
|
|
193
|
+
*
|
|
194
|
+
* Chúng được gọi bằng `fn.call(makeConfigThis(), …)`, tức receiver KHÔNG phải
|
|
195
|
+
* object chứa chúng. TypeScript mặc định suy `this` = chính object literal đó,
|
|
196
|
+
* nên `this.config` không tồn tại theo kiểu và `tsc --strict` báo TS2339.
|
|
197
|
+
*
|
|
198
|
+
* Compiler emit `function(this: ViewConfigThis)` cho đầu ra `.ts`; đầu ra `.js`
|
|
199
|
+
* không có tham số này vì tham số `this` là cú pháp chỉ có ở TypeScript và bị
|
|
200
|
+
* xoá khi emit — nó không bao giờ là đối số thật.
|
|
201
|
+
*/
|
|
202
|
+
export interface ViewConfigThis {
|
|
203
|
+
/**
|
|
204
|
+
* Config runtime của chính view — nơi các hàm sinh ra gọi lẫn nhau.
|
|
205
|
+
*
|
|
206
|
+
* KHÔNG nullable, và `ViewController.runtimeConfig` cũng vậy: nó khởi tạo
|
|
207
|
+
* `{}` rồi chỉ bị `setup()` ghi đè bằng config thật. Cái CÓ THỂ vắng là
|
|
208
|
+
* từng hàm trong đó (`commitConstructorData`… đều optional) — mỗi lời gọi
|
|
209
|
+
* đã tự canh bằng `typeof fn === 'function'`.
|
|
210
|
+
*/
|
|
211
|
+
config: ViewRuntimeConfig;
|
|
212
|
+
data: Record<string, any>;
|
|
213
|
+
ctrl: ViewControllerInterface;
|
|
214
|
+
view: ViewInterface;
|
|
215
|
+
}
|
|
115
216
|
//# sourceMappingURL=ViewControllerInterface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewControllerInterface.d.ts","sourceRoot":"","sources":["../../../../src/core/contracts/ViewControllerInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ViewControllerInterface.d.ts","sourceRoot":"","sources":["../../../../src/core/contracts/ViewControllerInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EACR,aAAa,EAAE,iBAAiB,EAAE,sBAAsB,EACxD,kBAAkB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,gBAAgB,EACtF,aAAa,EAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAI9D,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC;AAEpE,MAA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B,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IACzD,sBAAsB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC3D,SAAS,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACrC,MAAM,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB,CAAA;AAED,iGAAiG;AACjG,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEvD,MAAM,MAAM,SAAS,GAAG;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,qFAAqF;IACrF,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,KAAK,GAAG,CAAC;AAC1E,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,iBAAiB,CAAC;AAElE;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,cAAc;IAC3B;;;;;;;OAOG;IACH,MAAM,EAAE,iBAAiB,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,IAAI,EAAE,uBAAuB,CAAC;IAC9B,IAAI,EAAE,aAAa,CAAC;CACvB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ViewControllerInterface, ViewType } from "./ViewControllerInterface";
|
|
3
|
-
import type { FragmentInterface } from "./ElementInterface";
|
|
1
|
+
import type { SaoObjectType } from "../types/utils.js";
|
|
2
|
+
import type { ViewControllerInterface, ViewType } from "./ViewControllerInterface.js";
|
|
3
|
+
import type { FragmentInterface } from "./ElementInterface.js";
|
|
4
4
|
export interface ViewInterface {
|
|
5
|
-
|
|
5
|
+
saoType: SaoObjectType;
|
|
6
6
|
__ctrl__: ViewControllerInterface;
|
|
7
7
|
path: string;
|
|
8
8
|
viewType: ViewType;
|
|
@@ -12,13 +12,39 @@ export interface ViewInterface {
|
|
|
12
12
|
export type ViewRenderFactory = () => FragmentInterface | ViewInterface | null;
|
|
13
13
|
/** View class constructor signature */
|
|
14
14
|
export type ViewConstructor = new (path: string, viewType: 'view' | 'layout' | 'component', viewControllerClass?: any) => ViewInterface;
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* View lifecycle hooks — user có thể cài bất kỳ hook nào (mẫu examples/sao/app.sao).
|
|
17
|
+
* Mỗi transition có cặp before/after:
|
|
18
|
+
* mount → mounting / mounted (gắn vào real DOM)
|
|
19
|
+
* start → starting / started (subscribe reactive + attach events)
|
|
20
|
+
* pause → pausing / paused (vào PageCache — rời real DOM)
|
|
21
|
+
* resume → resuming / resumed (khôi phục từ PageCache)
|
|
22
|
+
* stop → stopping / stopped (deactivate reactive)
|
|
23
|
+
* unmount → unmounting / unmounted (gỡ khỏi real DOM)
|
|
24
|
+
* destroy → destroying / destroyed (cleanup toàn bộ)
|
|
25
|
+
*/
|
|
16
26
|
export interface ViewLifecycleHooks {
|
|
27
|
+
mounting?(): void | Promise<void>;
|
|
28
|
+
mounted?(): void | Promise<void>;
|
|
29
|
+
starting?(): void | Promise<void>;
|
|
30
|
+
started?(): void | Promise<void>;
|
|
31
|
+
pausing?(): void | Promise<void>;
|
|
32
|
+
paused?(): void | Promise<void>;
|
|
33
|
+
resuming?(): void | Promise<void>;
|
|
34
|
+
resumed?(): void | Promise<void>;
|
|
35
|
+
stopping?(): void | Promise<void>;
|
|
36
|
+
stopped?(): void | Promise<void>;
|
|
37
|
+
unmounting?(): void | Promise<void>;
|
|
38
|
+
unmounted?(): void | Promise<void>;
|
|
39
|
+
destroying?(): void | Promise<void>;
|
|
40
|
+
destroyed?(): void | Promise<void>;
|
|
17
41
|
onInit?(): void | Promise<void>;
|
|
18
42
|
onMounted?(): void | Promise<void>;
|
|
19
43
|
onUpdated?(): void | Promise<void>;
|
|
20
44
|
onDestroy?(): void | Promise<void>;
|
|
21
45
|
onActivated?(): void | Promise<void>;
|
|
22
46
|
onDeactivated?(): void | Promise<void>;
|
|
47
|
+
onPause?(): void | Promise<void>;
|
|
48
|
+
onResume?(): void | Promise<void>;
|
|
23
49
|
}
|
|
24
50
|
//# sourceMappingURL=ViewInterface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewInterface.d.ts","sourceRoot":"","sources":["../../../../src/core/contracts/ViewInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ViewInterface.d.ts","sourceRoot":"","sources":["../../../../src/core/contracts/ViewInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACtF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAI/D,MAAM,WAAW,aAAa;IAC1B,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,uBAAuB,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAID,mFAAmF;AACnF,MAAM,MAAM,iBAAiB,GAAG,MAAM,iBAAiB,GAAG,aAAa,GAAG,IAAI,CAAC;AAE/E,uCAAuC;AACvC,MAAM,MAAM,eAAe,GAAG,KAAK,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ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CAAC,CAAC;IACnC,SAAS,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,WAAW,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,aAAa,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,QAAQ,CAAC,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACrC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ViewInterface } from "./ViewInterface";
|
|
2
|
-
import type { ApplicationInterface } from "./ApplicationInterface";
|
|
3
|
-
import { RouterNavigationType } from "./RouterInterface";
|
|
1
|
+
import type { ViewInterface } from "./ViewInterface.js";
|
|
2
|
+
import type { ApplicationInterface } from "./ApplicationInterface.js";
|
|
3
|
+
import { RouterNavigationType } from "./RouterInterface.js";
|
|
4
4
|
export interface ActiveViewInfo {
|
|
5
5
|
view: ViewInterface;
|
|
6
6
|
path: string;
|
|
@@ -21,15 +21,36 @@ export interface ViewManagerInterface {
|
|
|
21
21
|
registerView(name: string, loader: ((...args: any[]) => any) | (() => Promise<any>)): void;
|
|
22
22
|
/** Initialize with optional config */
|
|
23
23
|
init(config?: {
|
|
24
|
-
container?: HTMLElement;
|
|
24
|
+
container?: HTMLElement | string;
|
|
25
25
|
registry?: Record<string, any>;
|
|
26
|
+
systemData?: Record<string, any>;
|
|
27
|
+
revision?: string;
|
|
28
|
+
contextViews?: string;
|
|
29
|
+
dataEndpoint?: string;
|
|
30
|
+
fetchOptions?: Record<string, any>;
|
|
26
31
|
}): void;
|
|
32
|
+
/** Apply a newer server-authoritative view context. Returns true when changed. */
|
|
33
|
+
applyViewContext?(state: Record<string, any>): boolean;
|
|
34
|
+
/** A changed view namespace needs a full document load before it can be applied safely. */
|
|
35
|
+
requiresReloadForViewContext?(state: Record<string, any>): boolean;
|
|
36
|
+
/** Current server view-context fingerprint. */
|
|
37
|
+
getContextRevision?(): string | null;
|
|
27
38
|
/** Mount a view by name — main entry point */
|
|
28
39
|
mountView(name: string, data?: Record<string, any>, route?: any, navigationType?: RouterNavigationType): any;
|
|
40
|
+
/**
|
|
41
|
+
* Hydrate a server-side rendered view.
|
|
42
|
+
* data PHẢI có __SSR_VIEW_ID__ — viewId mà Blade dùng để prefix element classes.
|
|
43
|
+
*/
|
|
44
|
+
hydrateView(name: string, data: Record<string, any> & {
|
|
45
|
+
__SSR_VIEW_ID__: string;
|
|
46
|
+
}, route?: any): any;
|
|
47
|
+
/** Còn SSR boot chưa consume? (route đầu tiên nên hydrate thay vì mount) */
|
|
48
|
+
hasSSRBoot?(): boolean;
|
|
49
|
+
/** Lấy + consume viewId SSR cho view name (chỉ trả 1 lần, cho route đầu) */
|
|
50
|
+
consumeSSRViewId?(viewName: string): string | null;
|
|
29
51
|
/** Unmount all active views */
|
|
30
52
|
unmountAll(): void;
|
|
31
53
|
/** Unmount a specific view by path */
|
|
32
|
-
unmountView(path: string): void;
|
|
33
54
|
/** Get currently active page view */
|
|
34
55
|
getCurrentView(): ViewInterface | null;
|
|
35
56
|
/** Get current layout view */
|
|
@@ -38,7 +59,28 @@ export interface ViewManagerInterface {
|
|
|
38
59
|
getViewStack(): ViewInterface[];
|
|
39
60
|
/** Check if a view is mounted */
|
|
40
61
|
isViewMounted(path: string): boolean;
|
|
62
|
+
/** Invalidate async work of the navigation currently being rendered. */
|
|
63
|
+
cancelNavigation?(): void;
|
|
41
64
|
/** Full destroy */
|
|
42
65
|
destroy(): void;
|
|
66
|
+
/**
|
|
67
|
+
* generateViewId — tạo unique ID cho mỗi view instance.
|
|
68
|
+
* Compiled output gọi: App.View.generateViewId()
|
|
69
|
+
*/
|
|
70
|
+
generateViewId(): string;
|
|
71
|
+
/**
|
|
72
|
+
* exists — kiểm tra view đã đăng ký trong registry chưa.
|
|
73
|
+
* Dùng bởi @includeIf directive.
|
|
74
|
+
*/
|
|
75
|
+
exists(name: string): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* view — lấy view instance từ registry, có thể cache.
|
|
78
|
+
*/
|
|
79
|
+
/** Tạo View instance; hỗ trợ registry lazy (`() => import(...)`) — dùng cho view cấp route. */
|
|
80
|
+
view(name: string, data: Record<string, any>, cache: boolean): Promise<any>;
|
|
81
|
+
/** Bản đồng bộ cho `@include`/`@extends`; view lazy chưa preload → null. */
|
|
82
|
+
resolveViewSync(name: string, data: Record<string, any>, cache: boolean): any;
|
|
83
|
+
/** Nạp trước view lazy để dùng được đồng bộ sau đó. */
|
|
84
|
+
preloadView(name: string): Promise<boolean>;
|
|
43
85
|
}
|
|
44
86
|
//# sourceMappingURL=ViewManagerInterface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewManagerInterface.d.ts","sourceRoot":"","sources":["../../../../src/core/contracts/ViewManagerInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ViewManagerInterface.d.ts","sourceRoot":"","sources":["../../../../src/core/contracts/ViewManagerInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAK5D,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACjC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,uBAAuB;IACvB,MAAM,CAAC,GAAG,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACxC,6BAA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5E,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,GAAG,CAAC;IAC9E,uDAAuD;IACvD,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/C"}
|
|
@@ -10,16 +10,53 @@ export interface ViewStateInterface {
|
|
|
10
10
|
export interface StateManagerInterface {
|
|
11
11
|
/** Create reactive state — returns [value, setter, key] */
|
|
12
12
|
useState(value: any, key?: string | number): [any, (newValue: any) => void, string | number];
|
|
13
|
+
/**
|
|
14
|
+
* State dẫn xuất có memo hoá — chỉ tính lại khi `deps` đổi, và lazy
|
|
15
|
+
* (đánh dấu bẩn lúc dep đổi, tính lúc đọc). Đọc qua `getStateByKey(key)`
|
|
16
|
+
* hoặc `subscribe([key])` như state thường.
|
|
17
|
+
*/
|
|
18
|
+
computed<T>(key: string, fn: () => T, deps?: string[]): () => T;
|
|
13
19
|
/** Update state by key */
|
|
14
20
|
updateStateByKey(key: string | number, value: any): any;
|
|
15
21
|
/** Get state value by key (supports nested paths: 'user.name') */
|
|
16
22
|
getStateByKey(key: string | number): any;
|
|
23
|
+
getStateVersion(key: string): number;
|
|
17
24
|
/** Subscribe to state changes */
|
|
18
25
|
subscribe(key: string | number | string[] | Record<string, (value: any) => void>, callback?: (value: any) => void): () => void;
|
|
19
26
|
/** Unsubscribe */
|
|
20
27
|
unsubscribe(key: string | number | string[] | Record<string, (value: any) => void>, callback?: (value: any) => void): void;
|
|
21
|
-
/**
|
|
22
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Register shorthand — pre-declare a state slot, returns setter.
|
|
30
|
+
* Value is optional — compiler calls register(key) with 1 arg;
|
|
31
|
+
* initial value is set later via update$xxx() in commitConstructorData.
|
|
32
|
+
*/
|
|
33
|
+
register(key: string | number, value?: any): (newValue: any) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Setter map — exposed for direct access by compiled views.
|
|
36
|
+
* e.g. __STATE__.__.setters.setCount = setCount;
|
|
37
|
+
*/
|
|
38
|
+
setters: Record<string | number, (value: any) => void>;
|
|
39
|
+
/**
|
|
40
|
+
* Flag — true while commitConstructorData is running, false after lockUpdateRealState().
|
|
41
|
+
* Compiler-generated update$xxx() checks this before calling updateStateByKey.
|
|
42
|
+
*/
|
|
43
|
+
readonly canUpdateStateByKey: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Lock — called at end of commitConstructorData() to prevent update$xxx from
|
|
46
|
+
* being accidentally triggered after initialization.
|
|
47
|
+
*/
|
|
48
|
+
lockUpdateRealState(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Unlock — called before updateVariableData() to allow update$xxx again.
|
|
51
|
+
*/
|
|
52
|
+
unlockUpdateRealState(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Flush đồng bộ pending state changes (huỷ RAF đang chờ nếu có).
|
|
55
|
+
* Dùng sau commitData()/mount để DOM phản ánh state ngay trong cùng tick.
|
|
56
|
+
*/
|
|
57
|
+
flushNow(): void;
|
|
58
|
+
/** Opt into expensive mutation diagnostics; disabled by default in browsers. */
|
|
59
|
+
setMutationDiagnostics(enabled: boolean): void;
|
|
23
60
|
/** Destroy — cleanup all listeners and states */
|
|
24
61
|
destroy(): void;
|
|
25
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewStateInterface.d.ts","sourceRoot":"","sources":["../../../../src/core/contracts/ViewStateInterface.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IAC/B,4BAA4B;IAC5B,EAAE,EAAE,qBAAqB,CAAC;IAC1B,iCAAiC;IACjC,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,G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,WAAW,qBAAqB;IAClC,IAAI,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IAChD,MAAM,EAAE,OAAO,CAAC;CACnB;AAED,mDAAmD;AACnD,MAAM,WAAW,SAAS;IACtB,KAAK,EAAE,GAAG,CAAC;IACX,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB"}
|
|
@@ -4,13 +4,13 @@ export declare enum InitModes {
|
|
|
4
4
|
HYDRATE = "hydrate"
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
|
-
* Common types and utilities for
|
|
8
|
-
* This file defines shared types and enums used across
|
|
7
|
+
* Common types and utilities for SaoView contracts
|
|
8
|
+
* This file defines shared types and enums used across SaoView's contracts, such as initialization modes and system keys for HTML elements.
|
|
9
9
|
*
|
|
10
10
|
* Key exports:
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
* System keys for HTML elements used by
|
|
13
|
+
* System keys for HTML elements used by SaoView.
|
|
14
14
|
* These keys are used to store metadata on HTML elements, such as IDs and view information.
|
|
15
15
|
* @name ESK (Element System Keys)
|
|
16
16
|
* @enum {string}
|
|
@@ -4,13 +4,13 @@ export var InitModes;
|
|
|
4
4
|
InitModes["HYDRATE"] = "hydrate";
|
|
5
5
|
})(InitModes || (InitModes = {}));
|
|
6
6
|
/**
|
|
7
|
-
* Common types and utilities for
|
|
8
|
-
* This file defines shared types and enums used across
|
|
7
|
+
* Common types and utilities for SaoView contracts
|
|
8
|
+
* This file defines shared types and enums used across SaoView's contracts, such as initialization modes and system keys for HTML elements.
|
|
9
9
|
*
|
|
10
10
|
* Key exports:
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
* System keys for HTML elements used by
|
|
13
|
+
* System keys for HTML elements used by SaoView.
|
|
14
14
|
* These keys are used to store metadata on HTML elements, such as IDs and view information.
|
|
15
15
|
* @name ESK (Element System Keys)
|
|
16
16
|
* @enum {string}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export type { LoopContextInterface } from "./LoopContextInterface";
|
|
2
|
-
export type { ViewStateInterface, StateManagerInterface, StateListener, MultiKeyStateListener, StateItem } from "./ViewStateInterface";
|
|
3
|
-
export type {
|
|
4
|
-
export type { ReactiveInterface, ReactiveRenderFn, ReactiveChildrenFactory, ReactiveConfig } from "./ReactiveInterface";
|
|
5
|
-
export type { BlockInterface, BlockOutletInterface, BlockManagerInterface, BlockRenderFactory } from "./BlockInterface";
|
|
6
|
-
export type { ViewControllerInterface, ViewType, ViewConfig, ViewRuntimeConfig } from "./ViewControllerInterface";
|
|
7
|
-
export type { ViewInterface, ViewRenderFactory, ViewConstructor, ViewLifecycleHooks } from "./ViewInterface";
|
|
8
|
-
export type { ComponentInterface } from "./ComponentInterface";
|
|
9
|
-
export type { ApplicationInterface, AppFactory, ServiceKey, ServiceFactory, ServiceBinding } from "./ApplicationInterface";
|
|
10
|
-
export type { ServiceProviderInterface } from "./ServiceProviderInterface";
|
|
11
|
-
export type { ViewCacheInterface } from "./ViewCacheInterface";
|
|
12
|
-
export type { ViewManagerInterface, ActiveViewInfo } from "./ViewManagerInterface";
|
|
13
|
-
export type { RouterInterface } from "./RouterInterface";
|
|
14
|
-
export type { HelperInterface, CollectionProxyInterface } from "./HelperInterface";
|
|
15
|
-
export type { EventServiceInterface, EventCallback } from "./EventServiceInterface";
|
|
16
|
-
export type { HttpServiceInterface, HttpRequestConfig, HttpResponse, HttpInterceptor } from "./HttpServiceInterface";
|
|
17
|
-
export type { StoreServiceInterface } from "./StoreServiceInterface";
|
|
18
|
-
export type { StorageServiceInterface, StorageEventCallback } from "./StorageServiceInterface";
|
|
19
|
-
export type { LoggerServiceInterface, LoggerConfig, LogEntry, LogLevel } from "./LoggerServiceInterface";
|
|
1
|
+
export type { LoopContextInterface } from "./LoopContextInterface.js";
|
|
2
|
+
export type { ViewStateInterface, StateManagerInterface, StateListener, MultiKeyStateListener, StateItem } from "./ViewStateInterface.js";
|
|
3
|
+
export type { SaoNodeInterface, HtmlInterface, TextInterface, OutputInterface, FragmentInterface, SaoElementConfig, HtmlElementConfig, SaoElementEventHandler, SaoElementChildren, SaoChildrenFactoryOutput, SaoChildrenFactory } from "./ElementInterface.js";
|
|
4
|
+
export type { ReactiveInterface, ReactiveRenderFn, ReactiveChildrenFactory, ReactiveConfig } from "./ReactiveInterface.js";
|
|
5
|
+
export type { BlockInterface, BlockOutletInterface, BlockManagerInterface, BlockRenderFactory } from "./BlockInterface.js";
|
|
6
|
+
export type { ViewControllerInterface, ViewType, ViewConfig, ViewRuntimeConfig } from "./ViewControllerInterface.js";
|
|
7
|
+
export type { ViewInterface, ViewRenderFactory, ViewConstructor, ViewLifecycleHooks } from "./ViewInterface.js";
|
|
8
|
+
export type { ComponentInterface } from "./ComponentInterface.js";
|
|
9
|
+
export type { ApplicationInterface, AppFactory, ServiceKey, ServiceFactory, ServiceBinding } from "./ApplicationInterface.js";
|
|
10
|
+
export type { ServiceProviderInterface } from "./ServiceProviderInterface.js";
|
|
11
|
+
export type { ViewCacheInterface } from "./ViewCacheInterface.js";
|
|
12
|
+
export type { ViewManagerInterface, ActiveViewInfo } from "./ViewManagerInterface.js";
|
|
13
|
+
export type { RouterInterface } from "./RouterInterface.js";
|
|
14
|
+
export type { HelperInterface, CollectionProxyInterface } from "./HelperInterface.js";
|
|
15
|
+
export type { EventServiceInterface, EventCallback } from "./EventServiceInterface.js";
|
|
16
|
+
export type { HttpServiceInterface, HttpRequestConfig, HttpResponse, HttpInterceptor } from "./HttpServiceInterface.js";
|
|
17
|
+
export type { StoreServiceInterface } from "./StoreServiceInterface.js";
|
|
18
|
+
export type { StorageServiceInterface, StorageEventCallback } from "./StorageServiceInterface.js";
|
|
19
|
+
export type { LoggerServiceInterface, LoggerConfig, LogEntry, LogLevel } from "./LoggerServiceInterface.js";
|
|
20
20
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/core/contracts/utils.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/core/contracts/utils.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,aAAa,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC1I,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC/P,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC3H,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC3H,YAAY,EAAE,uBAAuB,EAAE,QAAQ,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACrH,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAChH,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,YAAY,EAAE,oBAAoB,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC9H,YAAY,EAAE,wBAAwB,EAAE,MAAM,+BAA+B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