@vlian/framework 1.2.62 → 1.2.63

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.
Files changed (510) hide show
  1. package/dist/analytics.umd.js +1 -1
  2. package/dist/index.umd.js +1 -1
  3. package/dist/state.umd.js +1 -1
  4. package/package.json +21 -6
  5. package/dist/components/LocaleSwitch.cjs +0 -1
  6. package/dist/components/LocaleSwitch.d.ts +0 -21
  7. package/dist/components/LocaleSwitch.js +0 -1
  8. package/dist/components/ThemeSwitch.cjs +0 -1
  9. package/dist/components/ThemeSwitch.d.ts +0 -20
  10. package/dist/components/ThemeSwitch.js +0 -1
  11. package/dist/core/Test.cjs +0 -1
  12. package/dist/core/Test.d.ts +0 -5
  13. package/dist/core/Test.js +0 -1
  14. package/dist/core/app/AppContext.cjs +0 -1
  15. package/dist/core/app/AppContext.d.ts +0 -113
  16. package/dist/core/app/AppContext.js +0 -1
  17. package/dist/core/app/AppContext.types.cjs +0 -1
  18. package/dist/core/app/AppContext.types.d.ts +0 -146
  19. package/dist/core/app/AppContext.types.js +0 -1
  20. package/dist/core/app/BasicLayout.cjs +0 -1
  21. package/dist/core/app/BasicLayout.d.ts +0 -15
  22. package/dist/core/app/BasicLayout.js +0 -1
  23. package/dist/core/app/DefaultApp.cjs +0 -1
  24. package/dist/core/app/DefaultApp.d.ts +0 -10
  25. package/dist/core/app/DefaultApp.js +0 -1
  26. package/dist/core/app/index.cjs +0 -1
  27. package/dist/core/app/index.d.ts +0 -8
  28. package/dist/core/app/index.js +0 -1
  29. package/dist/core/config/AppConfig.cjs +0 -1
  30. package/dist/core/config/AppConfig.d.ts +0 -88
  31. package/dist/core/config/AppConfig.js +0 -1
  32. package/dist/core/config/ConfigLoader.cjs +0 -1
  33. package/dist/core/config/ConfigLoader.d.ts +0 -118
  34. package/dist/core/config/ConfigLoader.js +0 -1
  35. package/dist/core/config/ConfigValidator.cjs +0 -2
  36. package/dist/core/config/ConfigValidator.d.ts +0 -84
  37. package/dist/core/config/ConfigValidator.js +0 -2
  38. package/dist/core/config/index.cjs +0 -1
  39. package/dist/core/config/index.d.ts +0 -6
  40. package/dist/core/config/index.js +0 -1
  41. package/dist/core/dev/DevTools.cjs +0 -1
  42. package/dist/core/dev/DevTools.d.ts +0 -16
  43. package/dist/core/dev/DevTools.js +0 -1
  44. package/dist/core/error/ErrorBoundary.cjs +0 -1
  45. package/dist/core/error/ErrorBoundary.d.ts +0 -121
  46. package/dist/core/error/ErrorBoundary.js +0 -1
  47. package/dist/core/error/ErrorHandler.cjs +0 -1
  48. package/dist/core/error/ErrorHandler.d.ts +0 -171
  49. package/dist/core/error/ErrorHandler.js +0 -1
  50. package/dist/core/error/index.cjs +0 -1
  51. package/dist/core/error/index.d.ts +0 -7
  52. package/dist/core/error/index.js +0 -1
  53. package/dist/core/event/AppEventBus.cjs +0 -1
  54. package/dist/core/event/AppEventBus.d.ts +0 -178
  55. package/dist/core/event/AppEventBus.js +0 -1
  56. package/dist/core/event/frameworkEvents.cjs +0 -1
  57. package/dist/core/event/frameworkEvents.d.ts +0 -69
  58. package/dist/core/event/frameworkEvents.js +0 -1
  59. package/dist/core/event/hooks.cjs +0 -1
  60. package/dist/core/event/hooks.d.ts +0 -57
  61. package/dist/core/event/hooks.js +0 -1
  62. package/dist/core/event/index.cjs +0 -1
  63. package/dist/core/event/index.d.ts +0 -10
  64. package/dist/core/event/index.js +0 -1
  65. package/dist/core/event/types.cjs +0 -1
  66. package/dist/core/event/types.d.ts +0 -269
  67. package/dist/core/event/types.js +0 -1
  68. package/dist/core/event/useEventBus.cjs +0 -1
  69. package/dist/core/event/useEventBus.d.ts +0 -28
  70. package/dist/core/event/useEventBus.js +0 -1
  71. package/dist/core/index.cjs +0 -1
  72. package/dist/core/index.d.ts +0 -54
  73. package/dist/core/index.js +0 -1
  74. package/dist/core/initialization/InitializationErrorThrower.cjs +0 -1
  75. package/dist/core/initialization/InitializationErrorThrower.d.ts +0 -7
  76. package/dist/core/initialization/InitializationErrorThrower.js +0 -1
  77. package/dist/core/initialization/index.cjs +0 -1
  78. package/dist/core/initialization/index.d.ts +0 -7
  79. package/dist/core/initialization/index.js +0 -1
  80. package/dist/core/initialization/initialization.cjs +0 -1
  81. package/dist/core/initialization/initialization.d.ts +0 -69
  82. package/dist/core/initialization/initialization.js +0 -1
  83. package/dist/core/initialization/initializationErrorState.cjs +0 -1
  84. package/dist/core/initialization/initializationErrorState.d.ts +0 -35
  85. package/dist/core/initialization/initializationErrorState.js +0 -1
  86. package/dist/core/kernel/defaultAdapters.cjs +0 -1
  87. package/dist/core/kernel/defaultAdapters.d.ts +0 -2
  88. package/dist/core/kernel/defaultAdapters.js +0 -1
  89. package/dist/core/kernel/errors.cjs +0 -1
  90. package/dist/core/kernel/errors.d.ts +0 -18
  91. package/dist/core/kernel/errors.js +0 -1
  92. package/dist/core/kernel/index.cjs +0 -1
  93. package/dist/core/kernel/index.d.ts +0 -3
  94. package/dist/core/kernel/index.js +0 -1
  95. package/dist/core/kernel/startKernel.cjs +0 -1
  96. package/dist/core/kernel/startKernel.d.ts +0 -2
  97. package/dist/core/kernel/startKernel.js +0 -1
  98. package/dist/core/kernel/types.cjs +0 -1
  99. package/dist/core/kernel/types.d.ts +0 -114
  100. package/dist/core/kernel/types.js +0 -1
  101. package/dist/core/middleware.cjs +0 -1
  102. package/dist/core/middleware.d.ts +0 -36
  103. package/dist/core/middleware.js +0 -1
  104. package/dist/core/plugin/PluginEventBus.cjs +0 -1
  105. package/dist/core/plugin/PluginEventBus.d.ts +0 -169
  106. package/dist/core/plugin/PluginEventBus.js +0 -1
  107. package/dist/core/plugin/PluginSandbox.cjs +0 -1
  108. package/dist/core/plugin/PluginSandbox.d.ts +0 -101
  109. package/dist/core/plugin/PluginSandbox.js +0 -1
  110. package/dist/core/plugin.cjs +0 -1
  111. package/dist/core/plugin.d.ts +0 -224
  112. package/dist/core/plugin.js +0 -1
  113. package/dist/core/router/RouterManager.cjs +0 -1
  114. package/dist/core/router/RouterManager.d.ts +0 -87
  115. package/dist/core/router/RouterManager.js +0 -1
  116. package/dist/core/router/adapter/AdapterManager.cjs +0 -1
  117. package/dist/core/router/adapter/AdapterManager.d.ts +0 -94
  118. package/dist/core/router/adapter/AdapterManager.js +0 -1
  119. package/dist/core/router/adapter/index.cjs +0 -1
  120. package/dist/core/router/adapter/index.d.ts +0 -6
  121. package/dist/core/router/adapter/index.js +0 -1
  122. package/dist/core/router/adapter/react-router/ReactRouterAdapter.cjs +0 -1
  123. package/dist/core/router/adapter/react-router/ReactRouterAdapter.d.ts +0 -43
  124. package/dist/core/router/adapter/react-router/ReactRouterAdapter.js +0 -1
  125. package/dist/core/router/adapter/react-router/index.cjs +0 -1
  126. package/dist/core/router/adapter/react-router/index.d.ts +0 -4
  127. package/dist/core/router/adapter/react-router/index.js +0 -1
  128. package/dist/core/router/adapter/types.cjs +0 -1
  129. package/dist/core/router/adapter/types.d.ts +0 -111
  130. package/dist/core/router/adapter/types.js +0 -1
  131. package/dist/core/router/dev/RouterDevTools.cjs +0 -1
  132. package/dist/core/router/dev/RouterDevTools.d.ts +0 -5
  133. package/dist/core/router/dev/RouterDevTools.js +0 -1
  134. package/dist/core/router/dev/index.cjs +0 -1
  135. package/dist/core/router/dev/index.d.ts +0 -4
  136. package/dist/core/router/dev/index.js +0 -1
  137. package/dist/core/router/dynamic/DynamicRouteManager.cjs +0 -1
  138. package/dist/core/router/dynamic/DynamicRouteManager.d.ts +0 -71
  139. package/dist/core/router/dynamic/DynamicRouteManager.js +0 -1
  140. package/dist/core/router/dynamic/index.cjs +0 -1
  141. package/dist/core/router/dynamic/index.d.ts +0 -4
  142. package/dist/core/router/dynamic/index.js +0 -1
  143. package/dist/core/router/errors/RouterError.cjs +0 -1
  144. package/dist/core/router/errors/RouterError.d.ts +0 -48
  145. package/dist/core/router/errors/RouterError.js +0 -1
  146. package/dist/core/router/errors/index.cjs +0 -1
  147. package/dist/core/router/errors/index.d.ts +0 -4
  148. package/dist/core/router/errors/index.js +0 -1
  149. package/dist/core/router/index.cjs +0 -1
  150. package/dist/core/router/index.d.ts +0 -16
  151. package/dist/core/router/index.js +0 -1
  152. package/dist/core/router/lifecycle/RouterLifecycleManager.cjs +0 -1
  153. package/dist/core/router/lifecycle/RouterLifecycleManager.d.ts +0 -56
  154. package/dist/core/router/lifecycle/RouterLifecycleManager.js +0 -1
  155. package/dist/core/router/lifecycle/index.cjs +0 -1
  156. package/dist/core/router/lifecycle/index.d.ts +0 -4
  157. package/dist/core/router/lifecycle/index.js +0 -1
  158. package/dist/core/router/middleware/RouterMiddlewareManager.cjs +0 -1
  159. package/dist/core/router/middleware/RouterMiddlewareManager.d.ts +0 -61
  160. package/dist/core/router/middleware/RouterMiddlewareManager.js +0 -1
  161. package/dist/core/router/middleware/auth.cjs +0 -1
  162. package/dist/core/router/middleware/auth.d.ts +0 -54
  163. package/dist/core/router/middleware/auth.js +0 -1
  164. package/dist/core/router/middleware/index.cjs +0 -1
  165. package/dist/core/router/middleware/index.d.ts +0 -6
  166. package/dist/core/router/middleware/index.js +0 -1
  167. package/dist/core/router/middleware/types.cjs +0 -1
  168. package/dist/core/router/middleware/types.d.ts +0 -82
  169. package/dist/core/router/middleware/types.js +0 -1
  170. package/dist/core/router/monitoring/RouterMonitoring.cjs +0 -1
  171. package/dist/core/router/monitoring/RouterMonitoring.d.ts +0 -134
  172. package/dist/core/router/monitoring/RouterMonitoring.js +0 -1
  173. package/dist/core/router/monitoring/index.cjs +0 -1
  174. package/dist/core/router/monitoring/index.d.ts +0 -4
  175. package/dist/core/router/monitoring/index.js +0 -1
  176. package/dist/core/router/navigation/RouterNavigation.cjs +0 -1
  177. package/dist/core/router/navigation/RouterNavigation.d.ts +0 -43
  178. package/dist/core/router/navigation/RouterNavigation.js +0 -1
  179. package/dist/core/router/navigation/index.cjs +0 -1
  180. package/dist/core/router/navigation/index.d.ts +0 -4
  181. package/dist/core/router/navigation/index.js +0 -1
  182. package/dist/core/router/performance/RouteCache.cjs +0 -1
  183. package/dist/core/router/performance/RouteCache.d.ts +0 -113
  184. package/dist/core/router/performance/RouteCache.js +0 -1
  185. package/dist/core/router/performance/RoutePreloader.cjs +0 -1
  186. package/dist/core/router/performance/RoutePreloader.d.ts +0 -111
  187. package/dist/core/router/performance/RoutePreloader.js +0 -1
  188. package/dist/core/router/performance/index.cjs +0 -1
  189. package/dist/core/router/performance/index.d.ts +0 -5
  190. package/dist/core/router/performance/index.js +0 -1
  191. package/dist/core/router/plugin/RouterPluginManager.cjs +0 -1
  192. package/dist/core/router/plugin/RouterPluginManager.d.ts +0 -74
  193. package/dist/core/router/plugin/RouterPluginManager.js +0 -1
  194. package/dist/core/router/plugin/index.cjs +0 -1
  195. package/dist/core/router/plugin/index.d.ts +0 -5
  196. package/dist/core/router/plugin/index.js +0 -1
  197. package/dist/core/router/plugin/types.cjs +0 -1
  198. package/dist/core/router/plugin/types.d.ts +0 -153
  199. package/dist/core/router/plugin/types.js +0 -1
  200. package/dist/core/router/types.cjs +0 -1
  201. package/dist/core/router/types.d.ts +0 -464
  202. package/dist/core/router/types.js +0 -1
  203. package/dist/core/router/utils/adapters/react-router/RouteErrorBoundary.cjs +0 -1
  204. package/dist/core/router/utils/adapters/react-router/RouteErrorBoundary.d.ts +0 -2
  205. package/dist/core/router/utils/adapters/react-router/RouteErrorBoundary.js +0 -1
  206. package/dist/core/router/utils/adapters/react-router/transform.cjs +0 -1
  207. package/dist/core/router/utils/adapters/react-router/transform.d.ts +0 -5
  208. package/dist/core/router/utils/adapters/react-router/transform.js +0 -1
  209. package/dist/core/router/utils/transform.cjs +0 -1
  210. package/dist/core/router/utils/transform.d.ts +0 -348
  211. package/dist/core/router/utils/transform.js +0 -1
  212. package/dist/core/router/validation/RouterConfigValidator.cjs +0 -2
  213. package/dist/core/router/validation/RouterConfigValidator.d.ts +0 -121
  214. package/dist/core/router/validation/RouterConfigValidator.js +0 -2
  215. package/dist/core/router/validation/index.cjs +0 -1
  216. package/dist/core/router/validation/index.d.ts +0 -5
  217. package/dist/core/router/validation/index.js +0 -1
  218. package/dist/core/router/validation/schema.cjs +0 -1
  219. package/dist/core/router/validation/schema.d.ts +0 -180
  220. package/dist/core/router/validation/schema.js +0 -1
  221. package/dist/core/router/version/RouteVersionManager.cjs +0 -1
  222. package/dist/core/router/version/RouteVersionManager.d.ts +0 -124
  223. package/dist/core/router/version/RouteVersionManager.js +0 -1
  224. package/dist/core/router/version/index.cjs +0 -1
  225. package/dist/core/router/version/index.d.ts +0 -4
  226. package/dist/core/router/version/index.js +0 -1
  227. package/dist/core/splash/SplashScreen.cjs +0 -1
  228. package/dist/core/splash/SplashScreen.d.ts +0 -14
  229. package/dist/core/splash/SplashScreen.js +0 -1
  230. package/dist/core/splash/index.cjs +0 -1
  231. package/dist/core/splash/index.d.ts +0 -5
  232. package/dist/core/splash/index.js +0 -1
  233. package/dist/core/splash/splashScreenUtils.cjs +0 -1
  234. package/dist/core/splash/splashScreenUtils.d.ts +0 -7
  235. package/dist/core/splash/splashScreenUtils.js +0 -1
  236. package/dist/core/startup/AppInstance.cjs +0 -1
  237. package/dist/core/startup/AppInstance.d.ts +0 -138
  238. package/dist/core/startup/AppInstance.js +0 -1
  239. package/dist/core/startup/environment.cjs +0 -1
  240. package/dist/core/startup/environment.d.ts +0 -87
  241. package/dist/core/startup/environment.js +0 -1
  242. package/dist/core/startup/index.cjs +0 -1
  243. package/dist/core/startup/index.d.ts +0 -7
  244. package/dist/core/startup/index.js +0 -1
  245. package/dist/core/startup/initializeServices.cjs +0 -1
  246. package/dist/core/startup/initializeServices.d.ts +0 -68
  247. package/dist/core/startup/initializeServices.js +0 -1
  248. package/dist/core/startup/performanceTracker.cjs +0 -1
  249. package/dist/core/startup/performanceTracker.d.ts +0 -104
  250. package/dist/core/startup/performanceTracker.js +0 -1
  251. package/dist/core/startup/renderApp.cjs +0 -1
  252. package/dist/core/startup/renderApp.d.ts +0 -70
  253. package/dist/core/startup/renderApp.js +0 -1
  254. package/dist/core/startup/startApp.cjs +0 -1
  255. package/dist/core/startup/startApp.d.ts +0 -14
  256. package/dist/core/startup/startApp.js +0 -1
  257. package/dist/core/types.cjs +0 -1
  258. package/dist/core/types.d.ts +0 -501
  259. package/dist/core/types.js +0 -1
  260. package/dist/core-bak/Test.cjs +0 -1
  261. package/dist/core-bak/Test.d.ts +0 -5
  262. package/dist/core-bak/Test.js +0 -1
  263. package/dist/core-bak/app/AppContext.cjs +0 -1
  264. package/dist/core-bak/app/AppContext.d.ts +0 -113
  265. package/dist/core-bak/app/AppContext.js +0 -1
  266. package/dist/core-bak/app/AppContext.types.cjs +0 -1
  267. package/dist/core-bak/app/AppContext.types.d.ts +0 -146
  268. package/dist/core-bak/app/AppContext.types.js +0 -1
  269. package/dist/core-bak/app/BasicLayout.cjs +0 -1
  270. package/dist/core-bak/app/BasicLayout.d.ts +0 -15
  271. package/dist/core-bak/app/BasicLayout.js +0 -1
  272. package/dist/core-bak/app/DefaultApp.cjs +0 -1
  273. package/dist/core-bak/app/DefaultApp.d.ts +0 -10
  274. package/dist/core-bak/app/DefaultApp.js +0 -1
  275. package/dist/core-bak/app/index.cjs +0 -1
  276. package/dist/core-bak/app/index.d.ts +0 -8
  277. package/dist/core-bak/app/index.js +0 -1
  278. package/dist/core-bak/config/AppConfig.cjs +0 -1
  279. package/dist/core-bak/config/AppConfig.d.ts +0 -88
  280. package/dist/core-bak/config/AppConfig.js +0 -1
  281. package/dist/core-bak/config/ConfigLoader.cjs +0 -1
  282. package/dist/core-bak/config/ConfigLoader.d.ts +0 -118
  283. package/dist/core-bak/config/ConfigLoader.js +0 -1
  284. package/dist/core-bak/config/ConfigValidator.cjs +0 -2
  285. package/dist/core-bak/config/ConfigValidator.d.ts +0 -84
  286. package/dist/core-bak/config/ConfigValidator.js +0 -2
  287. package/dist/core-bak/config/index.cjs +0 -1
  288. package/dist/core-bak/config/index.d.ts +0 -6
  289. package/dist/core-bak/config/index.js +0 -1
  290. package/dist/core-bak/dev/DevTools.cjs +0 -1
  291. package/dist/core-bak/dev/DevTools.d.ts +0 -16
  292. package/dist/core-bak/dev/DevTools.js +0 -1
  293. package/dist/core-bak/error/ErrorBoundary.cjs +0 -1
  294. package/dist/core-bak/error/ErrorBoundary.d.ts +0 -121
  295. package/dist/core-bak/error/ErrorBoundary.js +0 -1
  296. package/dist/core-bak/error/ErrorHandler.cjs +0 -1
  297. package/dist/core-bak/error/ErrorHandler.d.ts +0 -171
  298. package/dist/core-bak/error/ErrorHandler.js +0 -1
  299. package/dist/core-bak/error/index.cjs +0 -1
  300. package/dist/core-bak/error/index.d.ts +0 -7
  301. package/dist/core-bak/error/index.js +0 -1
  302. package/dist/core-bak/event/AppEventBus.cjs +0 -1
  303. package/dist/core-bak/event/AppEventBus.d.ts +0 -178
  304. package/dist/core-bak/event/AppEventBus.js +0 -1
  305. package/dist/core-bak/event/frameworkEvents.cjs +0 -1
  306. package/dist/core-bak/event/frameworkEvents.d.ts +0 -69
  307. package/dist/core-bak/event/frameworkEvents.js +0 -1
  308. package/dist/core-bak/event/hooks.cjs +0 -1
  309. package/dist/core-bak/event/hooks.d.ts +0 -57
  310. package/dist/core-bak/event/hooks.js +0 -1
  311. package/dist/core-bak/event/index.cjs +0 -1
  312. package/dist/core-bak/event/index.d.ts +0 -10
  313. package/dist/core-bak/event/index.js +0 -1
  314. package/dist/core-bak/event/types.cjs +0 -1
  315. package/dist/core-bak/event/types.d.ts +0 -269
  316. package/dist/core-bak/event/types.js +0 -1
  317. package/dist/core-bak/event/useEventBus.cjs +0 -1
  318. package/dist/core-bak/event/useEventBus.d.ts +0 -28
  319. package/dist/core-bak/event/useEventBus.js +0 -1
  320. package/dist/core-bak/index.cjs +0 -1
  321. package/dist/core-bak/index.d.ts +0 -54
  322. package/dist/core-bak/index.js +0 -1
  323. package/dist/core-bak/initialization/InitializationErrorThrower.cjs +0 -1
  324. package/dist/core-bak/initialization/InitializationErrorThrower.d.ts +0 -7
  325. package/dist/core-bak/initialization/InitializationErrorThrower.js +0 -1
  326. package/dist/core-bak/initialization/index.cjs +0 -1
  327. package/dist/core-bak/initialization/index.d.ts +0 -7
  328. package/dist/core-bak/initialization/index.js +0 -1
  329. package/dist/core-bak/initialization/initialization.cjs +0 -1
  330. package/dist/core-bak/initialization/initialization.d.ts +0 -69
  331. package/dist/core-bak/initialization/initialization.js +0 -1
  332. package/dist/core-bak/initialization/initializationErrorState.cjs +0 -1
  333. package/dist/core-bak/initialization/initializationErrorState.d.ts +0 -35
  334. package/dist/core-bak/initialization/initializationErrorState.js +0 -1
  335. package/dist/core-bak/kernel/defaultAdapters.cjs +0 -1
  336. package/dist/core-bak/kernel/defaultAdapters.d.ts +0 -2
  337. package/dist/core-bak/kernel/defaultAdapters.js +0 -1
  338. package/dist/core-bak/kernel/errors.cjs +0 -1
  339. package/dist/core-bak/kernel/errors.d.ts +0 -18
  340. package/dist/core-bak/kernel/errors.js +0 -1
  341. package/dist/core-bak/kernel/index.cjs +0 -1
  342. package/dist/core-bak/kernel/index.d.ts +0 -3
  343. package/dist/core-bak/kernel/index.js +0 -1
  344. package/dist/core-bak/kernel/startKernel.cjs +0 -1
  345. package/dist/core-bak/kernel/startKernel.d.ts +0 -2
  346. package/dist/core-bak/kernel/startKernel.js +0 -1
  347. package/dist/core-bak/kernel/types.cjs +0 -1
  348. package/dist/core-bak/kernel/types.d.ts +0 -114
  349. package/dist/core-bak/kernel/types.js +0 -1
  350. package/dist/core-bak/middleware.cjs +0 -1
  351. package/dist/core-bak/middleware.d.ts +0 -36
  352. package/dist/core-bak/middleware.js +0 -1
  353. package/dist/core-bak/plugin/PluginEventBus.cjs +0 -1
  354. package/dist/core-bak/plugin/PluginEventBus.d.ts +0 -169
  355. package/dist/core-bak/plugin/PluginEventBus.js +0 -1
  356. package/dist/core-bak/plugin/PluginSandbox.cjs +0 -1
  357. package/dist/core-bak/plugin/PluginSandbox.d.ts +0 -101
  358. package/dist/core-bak/plugin/PluginSandbox.js +0 -1
  359. package/dist/core-bak/plugin.cjs +0 -1
  360. package/dist/core-bak/plugin.d.ts +0 -224
  361. package/dist/core-bak/plugin.js +0 -1
  362. package/dist/core-bak/router/RouterManager.cjs +0 -1
  363. package/dist/core-bak/router/RouterManager.d.ts +0 -87
  364. package/dist/core-bak/router/RouterManager.js +0 -1
  365. package/dist/core-bak/router/adapter/AdapterManager.cjs +0 -1
  366. package/dist/core-bak/router/adapter/AdapterManager.d.ts +0 -94
  367. package/dist/core-bak/router/adapter/AdapterManager.js +0 -1
  368. package/dist/core-bak/router/adapter/index.cjs +0 -1
  369. package/dist/core-bak/router/adapter/index.d.ts +0 -6
  370. package/dist/core-bak/router/adapter/index.js +0 -1
  371. package/dist/core-bak/router/adapter/react-router/ReactRouterAdapter.cjs +0 -1
  372. package/dist/core-bak/router/adapter/react-router/ReactRouterAdapter.d.ts +0 -43
  373. package/dist/core-bak/router/adapter/react-router/ReactRouterAdapter.js +0 -1
  374. package/dist/core-bak/router/adapter/react-router/index.cjs +0 -1
  375. package/dist/core-bak/router/adapter/react-router/index.d.ts +0 -4
  376. package/dist/core-bak/router/adapter/react-router/index.js +0 -1
  377. package/dist/core-bak/router/adapter/types.cjs +0 -1
  378. package/dist/core-bak/router/adapter/types.d.ts +0 -111
  379. package/dist/core-bak/router/adapter/types.js +0 -1
  380. package/dist/core-bak/router/dev/RouterDevTools.cjs +0 -1
  381. package/dist/core-bak/router/dev/RouterDevTools.d.ts +0 -5
  382. package/dist/core-bak/router/dev/RouterDevTools.js +0 -1
  383. package/dist/core-bak/router/dev/index.cjs +0 -1
  384. package/dist/core-bak/router/dev/index.d.ts +0 -4
  385. package/dist/core-bak/router/dev/index.js +0 -1
  386. package/dist/core-bak/router/dynamic/DynamicRouteManager.cjs +0 -1
  387. package/dist/core-bak/router/dynamic/DynamicRouteManager.d.ts +0 -71
  388. package/dist/core-bak/router/dynamic/DynamicRouteManager.js +0 -1
  389. package/dist/core-bak/router/dynamic/index.cjs +0 -1
  390. package/dist/core-bak/router/dynamic/index.d.ts +0 -4
  391. package/dist/core-bak/router/dynamic/index.js +0 -1
  392. package/dist/core-bak/router/errors/RouterError.cjs +0 -1
  393. package/dist/core-bak/router/errors/RouterError.d.ts +0 -48
  394. package/dist/core-bak/router/errors/RouterError.js +0 -1
  395. package/dist/core-bak/router/errors/index.cjs +0 -1
  396. package/dist/core-bak/router/errors/index.d.ts +0 -4
  397. package/dist/core-bak/router/errors/index.js +0 -1
  398. package/dist/core-bak/router/index.cjs +0 -1
  399. package/dist/core-bak/router/index.d.ts +0 -16
  400. package/dist/core-bak/router/index.js +0 -1
  401. package/dist/core-bak/router/lifecycle/RouterLifecycleManager.cjs +0 -1
  402. package/dist/core-bak/router/lifecycle/RouterLifecycleManager.d.ts +0 -56
  403. package/dist/core-bak/router/lifecycle/RouterLifecycleManager.js +0 -1
  404. package/dist/core-bak/router/lifecycle/index.cjs +0 -1
  405. package/dist/core-bak/router/lifecycle/index.d.ts +0 -4
  406. package/dist/core-bak/router/lifecycle/index.js +0 -1
  407. package/dist/core-bak/router/middleware/RouterMiddlewareManager.cjs +0 -1
  408. package/dist/core-bak/router/middleware/RouterMiddlewareManager.d.ts +0 -61
  409. package/dist/core-bak/router/middleware/RouterMiddlewareManager.js +0 -1
  410. package/dist/core-bak/router/middleware/auth.cjs +0 -1
  411. package/dist/core-bak/router/middleware/auth.d.ts +0 -54
  412. package/dist/core-bak/router/middleware/auth.js +0 -1
  413. package/dist/core-bak/router/middleware/index.cjs +0 -1
  414. package/dist/core-bak/router/middleware/index.d.ts +0 -6
  415. package/dist/core-bak/router/middleware/index.js +0 -1
  416. package/dist/core-bak/router/middleware/types.cjs +0 -1
  417. package/dist/core-bak/router/middleware/types.d.ts +0 -82
  418. package/dist/core-bak/router/middleware/types.js +0 -1
  419. package/dist/core-bak/router/monitoring/RouterMonitoring.cjs +0 -1
  420. package/dist/core-bak/router/monitoring/RouterMonitoring.d.ts +0 -134
  421. package/dist/core-bak/router/monitoring/RouterMonitoring.js +0 -1
  422. package/dist/core-bak/router/monitoring/index.cjs +0 -1
  423. package/dist/core-bak/router/monitoring/index.d.ts +0 -4
  424. package/dist/core-bak/router/monitoring/index.js +0 -1
  425. package/dist/core-bak/router/navigation/RouterNavigation.cjs +0 -1
  426. package/dist/core-bak/router/navigation/RouterNavigation.d.ts +0 -43
  427. package/dist/core-bak/router/navigation/RouterNavigation.js +0 -1
  428. package/dist/core-bak/router/navigation/index.cjs +0 -1
  429. package/dist/core-bak/router/navigation/index.d.ts +0 -4
  430. package/dist/core-bak/router/navigation/index.js +0 -1
  431. package/dist/core-bak/router/performance/RouteCache.cjs +0 -1
  432. package/dist/core-bak/router/performance/RouteCache.d.ts +0 -113
  433. package/dist/core-bak/router/performance/RouteCache.js +0 -1
  434. package/dist/core-bak/router/performance/RoutePreloader.cjs +0 -1
  435. package/dist/core-bak/router/performance/RoutePreloader.d.ts +0 -111
  436. package/dist/core-bak/router/performance/RoutePreloader.js +0 -1
  437. package/dist/core-bak/router/performance/index.cjs +0 -1
  438. package/dist/core-bak/router/performance/index.d.ts +0 -5
  439. package/dist/core-bak/router/performance/index.js +0 -1
  440. package/dist/core-bak/router/plugin/RouterPluginManager.cjs +0 -1
  441. package/dist/core-bak/router/plugin/RouterPluginManager.d.ts +0 -74
  442. package/dist/core-bak/router/plugin/RouterPluginManager.js +0 -1
  443. package/dist/core-bak/router/plugin/index.cjs +0 -1
  444. package/dist/core-bak/router/plugin/index.d.ts +0 -5
  445. package/dist/core-bak/router/plugin/index.js +0 -1
  446. package/dist/core-bak/router/plugin/types.cjs +0 -1
  447. package/dist/core-bak/router/plugin/types.d.ts +0 -153
  448. package/dist/core-bak/router/plugin/types.js +0 -1
  449. package/dist/core-bak/router/types.cjs +0 -1
  450. package/dist/core-bak/router/types.d.ts +0 -464
  451. package/dist/core-bak/router/types.js +0 -1
  452. package/dist/core-bak/router/utils/adapters/react-router/RouteErrorBoundary.cjs +0 -1
  453. package/dist/core-bak/router/utils/adapters/react-router/RouteErrorBoundary.d.ts +0 -2
  454. package/dist/core-bak/router/utils/adapters/react-router/RouteErrorBoundary.js +0 -1
  455. package/dist/core-bak/router/utils/adapters/react-router/transform.cjs +0 -1
  456. package/dist/core-bak/router/utils/adapters/react-router/transform.d.ts +0 -5
  457. package/dist/core-bak/router/utils/adapters/react-router/transform.js +0 -1
  458. package/dist/core-bak/router/utils/transform.cjs +0 -1
  459. package/dist/core-bak/router/utils/transform.d.ts +0 -348
  460. package/dist/core-bak/router/utils/transform.js +0 -1
  461. package/dist/core-bak/router/validation/RouterConfigValidator.cjs +0 -2
  462. package/dist/core-bak/router/validation/RouterConfigValidator.d.ts +0 -121
  463. package/dist/core-bak/router/validation/RouterConfigValidator.js +0 -2
  464. package/dist/core-bak/router/validation/index.cjs +0 -1
  465. package/dist/core-bak/router/validation/index.d.ts +0 -5
  466. package/dist/core-bak/router/validation/index.js +0 -1
  467. package/dist/core-bak/router/validation/schema.cjs +0 -1
  468. package/dist/core-bak/router/validation/schema.d.ts +0 -180
  469. package/dist/core-bak/router/validation/schema.js +0 -1
  470. package/dist/core-bak/router/version/RouteVersionManager.cjs +0 -1
  471. package/dist/core-bak/router/version/RouteVersionManager.d.ts +0 -124
  472. package/dist/core-bak/router/version/RouteVersionManager.js +0 -1
  473. package/dist/core-bak/router/version/index.cjs +0 -1
  474. package/dist/core-bak/router/version/index.d.ts +0 -4
  475. package/dist/core-bak/router/version/index.js +0 -1
  476. package/dist/core-bak/splash/SplashScreen.cjs +0 -1
  477. package/dist/core-bak/splash/SplashScreen.d.ts +0 -14
  478. package/dist/core-bak/splash/SplashScreen.js +0 -1
  479. package/dist/core-bak/splash/index.cjs +0 -1
  480. package/dist/core-bak/splash/index.d.ts +0 -5
  481. package/dist/core-bak/splash/index.js +0 -1
  482. package/dist/core-bak/splash/splashScreenUtils.cjs +0 -1
  483. package/dist/core-bak/splash/splashScreenUtils.d.ts +0 -7
  484. package/dist/core-bak/splash/splashScreenUtils.js +0 -1
  485. package/dist/core-bak/startup/AppInstance.cjs +0 -1
  486. package/dist/core-bak/startup/AppInstance.d.ts +0 -138
  487. package/dist/core-bak/startup/AppInstance.js +0 -1
  488. package/dist/core-bak/startup/environment.cjs +0 -1
  489. package/dist/core-bak/startup/environment.d.ts +0 -87
  490. package/dist/core-bak/startup/environment.js +0 -1
  491. package/dist/core-bak/startup/index.cjs +0 -1
  492. package/dist/core-bak/startup/index.d.ts +0 -7
  493. package/dist/core-bak/startup/index.js +0 -1
  494. package/dist/core-bak/startup/initializeServices.cjs +0 -1
  495. package/dist/core-bak/startup/initializeServices.d.ts +0 -68
  496. package/dist/core-bak/startup/initializeServices.js +0 -1
  497. package/dist/core-bak/startup/performanceTracker.cjs +0 -1
  498. package/dist/core-bak/startup/performanceTracker.d.ts +0 -104
  499. package/dist/core-bak/startup/performanceTracker.js +0 -1
  500. package/dist/core-bak/startup/renderApp.cjs +0 -1
  501. package/dist/core-bak/startup/renderApp.d.ts +0 -70
  502. package/dist/core-bak/startup/renderApp.js +0 -1
  503. package/dist/core-bak/startup/startApp.cjs +0 -1
  504. package/dist/core-bak/startup/startApp.d.ts +0 -14
  505. package/dist/core-bak/startup/startApp.js +0 -1
  506. package/dist/core-bak/types.cjs +0 -1
  507. package/dist/core-bak/types.d.ts +0 -501
  508. package/dist/core-bak/types.js +0 -1
  509. package/dist/index.umd.cjs +0 -1
  510. package/dist/index.umd.d.ts +0 -7
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});function _export(target,all){for(var name in all)Object.defineProperty(target,name,{enumerable:true,get:Object.getOwnPropertyDescriptor(all,name).get})}_export(exports,{get useAppEvent(){return useAppEvent},get useAppEventEmitter(){return useAppEventEmitter},get useAppEventOnce(){return useAppEventOnce}});const _react=require("react");function useAppEvent(eventBus,event,listener,options){const listenerRef=(0,_react.useRef)(listener);listenerRef.current=listener;const optionsRef=(0,_react.useRef)(options);optionsRef.current=options;(0,_react.useEffect)(()=>{const wrappedListener=(data,metadata)=>{return listenerRef.current(data,metadata)};const unsubscribe=eventBus.on(event,wrappedListener,optionsRef.current);return unsubscribe},[eventBus,event])}function useAppEventOnce(eventBus,event,listener,options){const listenerRef=(0,_react.useRef)(listener);listenerRef.current=listener;const optionsRef=(0,_react.useRef)(options);optionsRef.current=options;(0,_react.useEffect)(()=>{const wrappedListener=(data,metadata)=>{return listenerRef.current(data,metadata)};const unsubscribe=eventBus.once(event,wrappedListener,optionsRef.current);return unsubscribe},[eventBus,event])}function useAppEventEmitter(eventBus){return(0,_react.useCallback)((event,data,metadata)=>{return eventBus.emit(event,data,metadata)},[eventBus])}
@@ -1,57 +0,0 @@
1
- /**
2
- * React Hooks 支持
3
- * 提供便捷的 React 组件事件订阅能力
4
- */
5
- import type { EventListener, EventListenerOptions } from './types';
6
- import type { AppEventBus } from './AppEventBus';
7
- /**
8
- * 使用事件总线的 Hook
9
- *
10
- * @param eventBus - 事件总线实例
11
- * @param event - 事件名称
12
- * @param listener - 事件监听器
13
- * @param options - 监听器选项
14
- *
15
- * @example
16
- * ```tsx
17
- * import { useAppEventBus } from '@vlian/framework';
18
- *
19
- * function MyComponent() {
20
- * useAppEvent('user:login', (data, metadata) => {
21
- * console.log('用户登录:', data);
22
- * });
23
- *
24
- * return <div>My Component</div>;
25
- * }
26
- * ```
27
- */
28
- export declare function useAppEvent<T = unknown>(eventBus: AppEventBus, event: string, listener: EventListener<T>, options?: EventListenerOptions): void;
29
- /**
30
- * 一次性事件订阅 Hook
31
- *
32
- * @param eventBus - 事件总线实例
33
- * @param event - 事件名称
34
- * @param listener - 事件监听器
35
- * @param options - 监听器选项
36
- */
37
- export declare function useAppEventOnce<T = unknown>(eventBus: AppEventBus, event: string, listener: EventListener<T>, options?: Omit<EventListenerOptions, 'once'>): void;
38
- /**
39
- * 创建事件发射器 Hook
40
- *
41
- * @param eventBus - 事件总线实例
42
- * @returns 事件发射函数
43
- *
44
- * @example
45
- * ```tsx
46
- * function MyComponent() {
47
- * const emit = useAppEventEmitter(eventBus);
48
- *
49
- * const handleClick = () => {
50
- * emit('button:click', { buttonId: 'submit' });
51
- * };
52
- *
53
- * return <button onClick={handleClick}>Click</button>;
54
- * }
55
- * ```
56
- */
57
- export declare function useAppEventEmitter(eventBus: AppEventBus): <T = unknown>(event: string, data?: T, metadata?: Partial<import("./types").EventMetadata>) => Promise<void>;
@@ -1 +0,0 @@
1
- import{useEffect,useRef,useCallback}from"react";export function useAppEvent(eventBus,event,listener,options){const listenerRef=useRef(listener);listenerRef.current=listener;const optionsRef=useRef(options);optionsRef.current=options;useEffect(()=>{const wrappedListener=(data,metadata)=>{return listenerRef.current(data,metadata)};const unsubscribe=eventBus.on(event,wrappedListener,optionsRef.current);return unsubscribe},[eventBus,event])}export function useAppEventOnce(eventBus,event,listener,options){const listenerRef=useRef(listener);listenerRef.current=listener;const optionsRef=useRef(options);optionsRef.current=options;useEffect(()=>{const wrappedListener=(data,metadata)=>{return listenerRef.current(data,metadata)};const unsubscribe=eventBus.once(event,wrappedListener,optionsRef.current);return unsubscribe},[eventBus,event])}export function useAppEventEmitter(eventBus){return useCallback((event,data,metadata)=>{return eventBus.emit(event,data,metadata)},[eventBus])}
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});function _export(target,all){for(var name in all)Object.defineProperty(target,name,{enumerable:true,get:Object.getOwnPropertyDescriptor(all,name).get})}_export(exports,{get AppEventBus(){return _AppEventBus.AppEventBus},get FrameworkEventManager(){return _frameworkEvents.FrameworkEventManager},get FrameworkEventType(){return _types.FrameworkEventType},get useAppEvent(){return _hooks.useAppEvent},get useAppEventEmitter(){return _hooks.useAppEventEmitter},get useAppEventOnce(){return _hooks.useAppEventOnce},get useEventBus(){return _useEventBus.useEventBus}});const _AppEventBus=require("./AppEventBus");const _frameworkEvents=require("./frameworkEvents");const _hooks=require("./hooks");const _useEventBus=require("./useEventBus");const _types=require("./types");
@@ -1,10 +0,0 @@
1
- /**
2
- * 应用级事件系统
3
- * 提供高性能、类型安全、可观测的事件通信能力
4
- */
5
- export { AppEventBus } from './AppEventBus';
6
- export { FrameworkEventManager } from './frameworkEvents';
7
- export { useAppEvent, useAppEventOnce, useAppEventEmitter, } from './hooks';
8
- export { useEventBus } from './useEventBus';
9
- export type { EventListener, EventMetadata, EventWrapper, EventMiddleware, EventListenerOptions, AppEventBusConfig, EventStats, FrameworkEventData, } from './types';
10
- export { FrameworkEventType } from './types';
@@ -1 +0,0 @@
1
- export{AppEventBus}from"./AppEventBus";export{FrameworkEventManager}from"./frameworkEvents";export{useAppEvent,useAppEventOnce,useAppEventEmitter}from"./hooks";export{useEventBus}from"./useEventBus";export{FrameworkEventType}from"./types";
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"FrameworkEventType",{enumerable:true,get:function(){return FrameworkEventType}});var FrameworkEventType=/*#__PURE__*/function(FrameworkEventType){FrameworkEventType["APP_START"]="framework:app:start";FrameworkEventType["APP_STARTED"]="framework:app:started";FrameworkEventType["APP_INIT_START"]="framework:app:init:start";FrameworkEventType["APP_INIT_COMPLETE"]="framework:app:init:complete";FrameworkEventType["APP_INIT_ERROR"]="framework:app:init:error";FrameworkEventType["APP_RENDER_START"]="framework:app:render:start";FrameworkEventType["APP_RENDER_COMPLETE"]="framework:app:render:complete";FrameworkEventType["ROUTE_CHANGE"]="framework:route:change";FrameworkEventType["ROUTE_NAVIGATE_START"]="framework:route:navigate:start";FrameworkEventType["ROUTE_NAVIGATE_COMPLETE"]="framework:route:navigate:complete";FrameworkEventType["ERROR_OCCURRED"]="framework:error:occurred";FrameworkEventType["INSTANCE_CREATED"]="framework:instance:created";FrameworkEventType["INSTANCE_DESTROYED"]="framework:instance:destroyed";FrameworkEventType["PERFORMANCE_UPDATE"]="framework:performance:update";return FrameworkEventType}({});
@@ -1,269 +0,0 @@
1
- /**
2
- * 应用级事件系统类型定义
3
- * 提供类型安全的事件通信能力
4
- */
5
- /**
6
- * 事件监听器类型
7
- *
8
- * @template T - 事件数据类型
9
- */
10
- export type EventListener<T = unknown> = (data: T, metadata: EventMetadata) => void | Promise<void>;
11
- /**
12
- * 事件元数据
13
- */
14
- export interface EventMetadata {
15
- /**
16
- * 事件来源(模块/组件名称)
17
- */
18
- source?: string;
19
- /**
20
- * 事件时间戳
21
- */
22
- timestamp: number;
23
- /**
24
- * 事件ID(用于追踪)
25
- */
26
- eventId: string;
27
- /**
28
- * 事件优先级(数字越小优先级越高)
29
- */
30
- priority?: number;
31
- /**
32
- * 应用实例ID(多实例场景)
33
- */
34
- instanceId?: string;
35
- /**
36
- * 事件命名空间(用于作用域隔离)
37
- */
38
- namespace?: string;
39
- /**
40
- * 自定义元数据
41
- */
42
- [key: string]: unknown;
43
- }
44
- /**
45
- * 事件包装器
46
- *
47
- * @template T - 事件数据类型
48
- */
49
- export interface EventWrapper<T = unknown> {
50
- /**
51
- * 事件数据
52
- */
53
- data: T;
54
- /**
55
- * 事件元数据
56
- */
57
- metadata: EventMetadata;
58
- }
59
- /**
60
- * 事件中间件函数类型
61
- *
62
- * @template T - 事件数据类型
63
- */
64
- export type EventMiddleware<T = unknown> = (event: string, data: T, metadata: EventMetadata, next: () => Promise<void>) => Promise<void> | void;
65
- /**
66
- * 事件监听器选项
67
- */
68
- export interface EventListenerOptions {
69
- /**
70
- * 监听器优先级(数字越小优先级越高)
71
- */
72
- priority?: number;
73
- /**
74
- * 是否只执行一次
75
- */
76
- once?: boolean;
77
- /**
78
- * 事件命名空间(用于作用域隔离)
79
- */
80
- namespace?: string;
81
- /**
82
- * 是否异步执行
83
- */
84
- async?: boolean;
85
- }
86
- /**
87
- * 事件总线配置
88
- */
89
- export interface AppEventBusConfig {
90
- /**
91
- * 是否启用事件追踪
92
- */
93
- enableTracking?: boolean;
94
- /**
95
- * 最大事件历史记录数
96
- */
97
- maxHistorySize?: number;
98
- /**
99
- * 是否启用事件验证
100
- */
101
- enableValidation?: boolean;
102
- /**
103
- * 事件验证函数
104
- */
105
- validator?: (event: string, data: unknown) => boolean;
106
- /**
107
- * 是否启用性能监控
108
- */
109
- enablePerformanceMonitoring?: boolean;
110
- /**
111
- * 事件命名空间前缀(用于多实例隔离)
112
- */
113
- namespacePrefix?: string;
114
- /**
115
- * 应用实例ID(多实例场景)
116
- */
117
- instanceId?: string;
118
- /**
119
- * 是否启用安全模式(限制事件来源)
120
- */
121
- enableSecurityMode?: boolean;
122
- /**
123
- * 允许的事件来源白名单(安全模式)
124
- */
125
- allowedSources?: string[];
126
- }
127
- /**
128
- * 事件统计信息
129
- */
130
- export interface EventStats {
131
- /**
132
- * 事件名称
133
- */
134
- event: string;
135
- /**
136
- * 触发次数
137
- */
138
- count: number;
139
- /**
140
- * 平均执行时间(毫秒)
141
- */
142
- avgExecutionTime: number;
143
- /**
144
- * 监听器数量
145
- */
146
- listenerCount: number;
147
- /**
148
- * 最后触发时间
149
- */
150
- lastTriggered: number;
151
- }
152
- /**
153
- * 框架内置事件类型
154
- */
155
- export declare enum FrameworkEventType {
156
- /**
157
- * 应用启动开始
158
- */
159
- APP_START = "framework:app:start",
160
- /**
161
- * 应用启动完成
162
- */
163
- APP_STARTED = "framework:app:started",
164
- /**
165
- * 应用初始化开始
166
- */
167
- APP_INIT_START = "framework:app:init:start",
168
- /**
169
- * 应用初始化完成
170
- */
171
- APP_INIT_COMPLETE = "framework:app:init:complete",
172
- /**
173
- * 应用初始化失败
174
- */
175
- APP_INIT_ERROR = "framework:app:init:error",
176
- /**
177
- * 应用渲染开始
178
- */
179
- APP_RENDER_START = "framework:app:render:start",
180
- /**
181
- * 应用渲染完成
182
- */
183
- APP_RENDER_COMPLETE = "framework:app:render:complete",
184
- /**
185
- * 路由变化
186
- */
187
- ROUTE_CHANGE = "framework:route:change",
188
- /**
189
- * 路由导航开始
190
- */
191
- ROUTE_NAVIGATE_START = "framework:route:navigate:start",
192
- /**
193
- * 路由导航完成
194
- */
195
- ROUTE_NAVIGATE_COMPLETE = "framework:route:navigate:complete",
196
- /**
197
- * 错误发生
198
- */
199
- ERROR_OCCURRED = "framework:error:occurred",
200
- /**
201
- * 实例创建
202
- */
203
- INSTANCE_CREATED = "framework:instance:created",
204
- /**
205
- * 实例销毁
206
- */
207
- INSTANCE_DESTROYED = "framework:instance:destroyed",
208
- /**
209
- * 性能指标更新
210
- */
211
- PERFORMANCE_UPDATE = "framework:performance:update"
212
- }
213
- /**
214
- * 框架事件数据类型定义
215
- */
216
- export interface FrameworkEventData {
217
- [FrameworkEventType.APP_START]: {
218
- instanceId?: string;
219
- };
220
- [FrameworkEventType.APP_STARTED]: {
221
- instanceId?: string;
222
- duration: number;
223
- };
224
- [FrameworkEventType.APP_INIT_START]: {
225
- instanceId?: string;
226
- };
227
- [FrameworkEventType.APP_INIT_COMPLETE]: {
228
- instanceId?: string;
229
- context: unknown;
230
- duration: number;
231
- };
232
- [FrameworkEventType.APP_INIT_ERROR]: {
233
- instanceId?: string;
234
- error: Error;
235
- };
236
- [FrameworkEventType.APP_RENDER_START]: {
237
- instanceId?: string;
238
- };
239
- [FrameworkEventType.APP_RENDER_COMPLETE]: {
240
- instanceId?: string;
241
- duration: number;
242
- };
243
- [FrameworkEventType.ROUTE_CHANGE]: {
244
- from: string;
245
- to: string;
246
- params?: Record<string, unknown>;
247
- };
248
- [FrameworkEventType.ROUTE_NAVIGATE_START]: {
249
- to: string;
250
- options?: unknown;
251
- };
252
- [FrameworkEventType.ROUTE_NAVIGATE_COMPLETE]: {
253
- to: string;
254
- duration: number;
255
- };
256
- [FrameworkEventType.ERROR_OCCURRED]: {
257
- error: Error;
258
- context?: unknown;
259
- };
260
- [FrameworkEventType.INSTANCE_CREATED]: {
261
- instanceId: string;
262
- };
263
- [FrameworkEventType.INSTANCE_DESTROYED]: {
264
- instanceId: string;
265
- };
266
- [FrameworkEventType.PERFORMANCE_UPDATE]: {
267
- metrics: Record<string, number>;
268
- };
269
- }
@@ -1 +0,0 @@
1
- export var FrameworkEventType=/*#__PURE__*/function(FrameworkEventType){FrameworkEventType["APP_START"]="framework:app:start";FrameworkEventType["APP_STARTED"]="framework:app:started";FrameworkEventType["APP_INIT_START"]="framework:app:init:start";FrameworkEventType["APP_INIT_COMPLETE"]="framework:app:init:complete";FrameworkEventType["APP_INIT_ERROR"]="framework:app:init:error";FrameworkEventType["APP_RENDER_START"]="framework:app:render:start";FrameworkEventType["APP_RENDER_COMPLETE"]="framework:app:render:complete";FrameworkEventType["ROUTE_CHANGE"]="framework:route:change";FrameworkEventType["ROUTE_NAVIGATE_START"]="framework:route:navigate:start";FrameworkEventType["ROUTE_NAVIGATE_COMPLETE"]="framework:route:navigate:complete";FrameworkEventType["ERROR_OCCURRED"]="framework:error:occurred";FrameworkEventType["INSTANCE_CREATED"]="framework:instance:created";FrameworkEventType["INSTANCE_DESTROYED"]="framework:instance:destroyed";FrameworkEventType["PERFORMANCE_UPDATE"]="framework:performance:update";return FrameworkEventType}({});
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"useEventBus",{enumerable:true,get:function(){return useEventBus}});const _AppInstance=require("../startup/AppInstance");function useEventBus(){const instanceManager=(0,_AppInstance.getAppInstanceManager)();const instance=instanceManager.getInstance();if(!instance){throw new Error("应用实例未找到")}const eventBus=instance.getEventBus();if(!eventBus){throw new Error("事件总线未初始化")}return eventBus}
@@ -1,28 +0,0 @@
1
- /**
2
- * 便捷的 Hook:获取当前应用实例的事件总线
3
- */
4
- import type { AppEventBus } from './AppEventBus';
5
- /**
6
- * 获取当前应用实例的事件总线
7
- *
8
- * @returns 事件总线实例
9
- *
10
- * @example
11
- * ```tsx
12
- * import { useEventBus } from '@vlian/framework';
13
- *
14
- * function MyComponent() {
15
- * const eventBus = useEventBus();
16
- *
17
- * useEffect(() => {
18
- * const unsubscribe = eventBus.on('user:login', (data) => {
19
- * console.log('用户登录:', data);
20
- * });
21
- * return unsubscribe;
22
- * }, [eventBus]);
23
- *
24
- * return <div>My Component</div>;
25
- * }
26
- * ```
27
- */
28
- export declare function useEventBus(): AppEventBus;
@@ -1 +0,0 @@
1
- import{getAppInstanceManager}from"../startup/AppInstance";export function useEventBus(){const instanceManager=getAppInstanceManager();const instance=instanceManager.getInstance();if(!instance){throw new Error("应用实例未找到")}const eventBus=instance.getEventBus();if(!eventBus){throw new Error("事件总线未初始化")}return eventBus}
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});function _export(target,all){for(var name in all)Object.defineProperty(target,name,{enumerable:true,get:Object.getOwnPropertyDescriptor(all,name).get})}_export(exports,{get AppContextProvider(){return _app.AppContextProvider},get DevTools(){return _DevTools.DevTools},get DevToolsTrigger(){return _DevTools.DevToolsTrigger},get ErrorBoundary(){return _error.ErrorBoundary},get MiddlewareManager(){return _middleware.MiddlewareManager},get PluginManager(){return _plugin.PluginManager},get appConfig(){return _AppConfig.appConfig},get getAppInstanceManager(){return _AppInstance.getAppInstanceManager},get getStateManager(){return getStateManager},get middlewareManager(){return _middleware.middlewareManager},get pluginManager(){return _plugin.pluginManager},get start(){return start},get startApp(){return _startApp.startApp},get storage(){return _library.storage},get useAppContext(){return _app.useAppContext},get useConfig(){return _app.useConfig},get useErrorHandler(){return _error.useErrorHandler},get useLocale(){return _app.useLocale},get useStateManager(){return _app.useStateManager},get useTheme(){return _app.useTheme},get withErrorBoundary(){return _error.withErrorBoundary}});const _library=require("../library");const _startApp=require("./startup/startApp");const _AppInstance=require("./startup/AppInstance");const _app=require("./app");const _error=require("./error");const _AppConfig=require("./config/AppConfig");const _middleware=require("./middleware");const _plugin=require("./plugin");_export_star(require("./startup"),exports);_export_star(require("./config"),exports);_export_star(require("./kernel"),exports);_export_star(require("./router"),exports);_export_star(require("./event"),exports);const _DevTools=require("./dev/DevTools");function _export_star(from,to){Object.keys(from).forEach(function(k){if(k!=="default"&&!Object.prototype.hasOwnProperty.call(to,k)){Object.defineProperty(to,k,{enumerable:true,get:function(){return from[k]}})}});return from}const start=async(options={})=>{await (0,_startApp.startApp)(options)};const getStateManager=()=>{const instanceManager=(0,_AppInstance.getAppInstanceManager)();const instance=instanceManager.getInstance();if(instance){return instance.getServices().stateManager}return null};
@@ -1,54 +0,0 @@
1
- import type { StartOptions } from "./types";
2
- import { storage } from '../library';
3
- import { StateManager } from '../state';
4
- /**
5
- * 启动框架
6
- *
7
- * @param options - 启动配置选项
8
- * @returns Promise<void>
9
- *
10
- * @example
11
- * ```typescript
12
- * import { start } from '@vlian/framework';
13
- *
14
- * start({
15
- * loggerLevel: LogLevel.DEBUG,
16
- * lifecycle: {
17
- * beforeInitialization: async () => {
18
- * console.log('初始化前执行');
19
- * },
20
- * },
21
- * });
22
- * ```
23
- */
24
- /**
25
- * 启动框架(向后兼容的API)
26
- *
27
- * @param options - 启动配置选项
28
- * @returns Promise<void>
29
- *
30
- * @deprecated 建议使用 startApp 函数,支持多实例
31
- */
32
- declare const start: (options?: StartOptions) => Promise<void>;
33
- export { startApp } from './startup/startApp';
34
- export { getAppInstanceManager } from './startup/AppInstance';
35
- export type { AppInstance } from './startup/AppInstance';
36
- export { start, storage, };
37
- export declare const getStateManager: () => StateManager | null;
38
- export { AppContextProvider, useAppContext, useTheme, useLocale, useConfig, useStateManager, } from './app';
39
- export { ErrorBoundary, withErrorBoundary, useErrorHandler } from './error';
40
- export type { ErrorBoundaryProps } from './error';
41
- export { appConfig } from './config/AppConfig';
42
- export type { InitializationContext, InitializationOptions, ProgressCallback, } from './initialization';
43
- export { MiddlewareManager, middlewareManager } from './middleware';
44
- export type { Middleware } from './middleware';
45
- export { PluginManager, pluginManager } from './plugin';
46
- export type { Plugin } from './plugin';
47
- export type { AppContextValue, ThemeContextValue, LocaleContextValue, ConfigContextValue, StateManagerContextValue, ThemeConfig, AppConfig, AppContextProviderProps, } from './app';
48
- export type { StartOptions, ManagerLifecycle, SplashScreenCustomProps } from './types';
49
- export * from './startup';
50
- export * from './config';
51
- export * from './kernel';
52
- export * from './router';
53
- export * from './event';
54
- export { DevTools, DevToolsTrigger } from './dev/DevTools';
@@ -1 +0,0 @@
1
- import{storage}from"../library";import{startApp}from"./startup/startApp";import{getAppInstanceManager}from"./startup/AppInstance";const start=async(options={})=>{await startApp(options)};export{startApp}from"./startup/startApp";export{getAppInstanceManager}from"./startup/AppInstance";export{start,storage};export const getStateManager=()=>{const instanceManager=getAppInstanceManager();const instance=instanceManager.getInstance();if(instance){return instance.getServices().stateManager}return null};export{AppContextProvider,useAppContext,useTheme,useLocale,useConfig,useStateManager}from"./app";export{ErrorBoundary,withErrorBoundary,useErrorHandler}from"./error";export{appConfig}from"./config/AppConfig";export{MiddlewareManager,middlewareManager}from"./middleware";export{PluginManager,pluginManager}from"./plugin";export*from"./startup";export*from"./config";export*from"./kernel";export*from"./router";export*from"./event";export{DevTools,DevToolsTrigger}from"./dev/DevTools";
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"InitializationErrorThrower",{enumerable:true,get:function(){return InitializationErrorThrower}});const _react=/*#__PURE__*/_interop_require_wildcard(require("react"));const _initializationErrorState=require("./initializationErrorState");function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap;var cacheNodeInterop=new WeakMap;return(_getRequireWildcardCache=function(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop})(nodeInterop)}function _interop_require_wildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj}if(obj===null||typeof obj!=="object"&&typeof obj!=="function"){return{default:obj}}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj)}var newObj={__proto__:null};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc)}else{newObj[key]=obj[key]}}}newObj.default=obj;if(cache){cache.set(obj,newObj)}return newObj}const InitializationErrorThrower=()=>{const[error,setError]=(0,_react.useState)(null);(0,_react.useEffect)(()=>{const currentError=_initializationErrorState.initializationErrorState.getError();if(currentError){setError(currentError);return}const unsubscribe=_initializationErrorState.initializationErrorState.subscribe(()=>{const newError=_initializationErrorState.initializationErrorState.getError();setError(newError)});return unsubscribe},[]);if(error){throw error}return null};
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * 初始化错误抛出组件
4
- *
5
- * 当检测到初始化错误时,主动抛出错误给 ErrorBoundary 捕获
6
- */
7
- export declare const InitializationErrorThrower: React.FC;
@@ -1 +0,0 @@
1
- import React,{useEffect,useState}from"react";import{initializationErrorState}from"./initializationErrorState";export const InitializationErrorThrower=()=>{const[error,setError]=useState(null);useEffect(()=>{const currentError=initializationErrorState.getError();if(currentError){setError(currentError);return}const unsubscribe=initializationErrorState.subscribe(()=>{const newError=initializationErrorState.getError();setError(newError)});return unsubscribe},[]);if(error){throw error}return null};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});function _export(target,all){for(var name in all)Object.defineProperty(target,name,{enumerable:true,get:Object.getOwnPropertyDescriptor(all,name).get})}_export(exports,{get InitializationErrorThrower(){return _InitializationErrorThrower.InitializationErrorThrower},get initialization(){return _initialization.initialization},get initializationErrorState(){return _initializationErrorState.initializationErrorState}});const _initialization=require("./initialization");const _InitializationErrorThrower=require("./InitializationErrorThrower");const _initializationErrorState=require("./initializationErrorState");
@@ -1,7 +0,0 @@
1
- /**
2
- * 初始化模块统一导出
3
- */
4
- export { initialization } from './initialization';
5
- export type { InitializationContext, InitializationOptions, ProgressCallback, } from './initialization';
6
- export { InitializationErrorThrower } from './InitializationErrorThrower';
7
- export { initializationErrorState } from './initializationErrorState';
@@ -1 +0,0 @@
1
- export{initialization}from"./initialization";export{InitializationErrorThrower}from"./InitializationErrorThrower";export{initializationErrorState}from"./initializationErrorState";
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"initialization",{enumerable:true,get:function(){return initialization}});const _logger=require("@vlian/logger");const _library=require("../../library");const _plugin=require("../plugin");async function initialization(options,onProgress){const startTime=Date.now();let config={};try{await _plugin.pluginManager.executeBeforeInit(options);onProgress?.(5,"初始化日志系统...");_logger.logger.setLevel(options.loggerLevel??_logger.LogLevel.INFO);onProgress?.(30);if(options.lifecycle?.beforeInitialization){onProgress?.(35,"执行初始化前回调...");await options.lifecycle.beforeInitialization()}onProgress?.(40,"设置国际化...");(0,_library.setupI18n)(options.locale||undefined);if(options.lifecycle?.initialization){onProgress?.(50,"初始化核心功能...");await options.lifecycle.initialization();onProgress?.(70,"核心功能初始化完成")}else{onProgress?.(70)}onProgress?.(80,"准备完成...");const duration=Date.now()-startTime;const context={config,progress:100,isReady:true,duration};await _plugin.pluginManager.executeInit(options,context);await _plugin.pluginManager.executeAfterInit(options,context);if(options.lifecycle?.afterInitialization){onProgress?.(90,"执行初始化后回调...");await options.lifecycle.afterInitialization(context)}onProgress?.(100,"初始化完成");return context}catch(error){_logger.logger.error("初始化失败:",error);throw error}}
@@ -1,69 +0,0 @@
1
- import { LogLevel } from '@vlian/logger';
2
- import type { LangType } from '../../library/locale/types';
3
- import type { ManagerLifecycle, StartOptions } from '../types';
4
- /**
5
- * 初始化上下文
6
- */
7
- export interface InitializationContext {
8
- /**
9
- * 已加载的配置
10
- */
11
- config: Record<string, unknown>;
12
- /**
13
- * 初始化进度(0-100)
14
- */
15
- progress: number;
16
- /**
17
- * 是否准备就绪
18
- */
19
- isReady: boolean;
20
- /**
21
- * 初始化耗时(毫秒)
22
- */
23
- duration: number;
24
- }
25
- /**
26
- * 初始化选项
27
- */
28
- export interface InitializationOptions {
29
- /**
30
- * 日志级别
31
- */
32
- loggerLevel?: LogLevel;
33
- /**
34
- * 国际化配置
35
- */
36
- locale?: Record<LangType, Record<string, unknown>>;
37
- /**
38
- * 生命周期钩子
39
- */
40
- lifecycle?: ManagerLifecycle;
41
- }
42
- /**
43
- * 进度回调函数
44
- */
45
- export type ProgressCallback = (progress: number, step?: string) => void;
46
- /**
47
- * 初始化方法
48
- *
49
- * 这是核心的初始化逻辑,可被启动页或直接调用
50
- *
51
- * @param options - 初始化选项
52
- * @param onProgress - 进度回调函数(可选)
53
- * @returns Promise<InitializationContext>
54
- *
55
- * @example
56
- * ```typescript
57
- * const context = await initialization({
58
- * loggerLevel: LogLevel.INFO,
59
- * lifecycle: {
60
- * initialization: async () => {
61
- * // 初始化逻辑
62
- * },
63
- * },
64
- * }, (progress, step) => {
65
- * console.log(`进度: ${progress}%, 步骤: ${step}`);
66
- * });
67
- * ```
68
- */
69
- export declare function initialization(options: StartOptions, onProgress?: ProgressCallback): Promise<InitializationContext>;
@@ -1 +0,0 @@
1
- import{logger,LogLevel}from"@vlian/logger";import{setupI18n}from"../../library";import{pluginManager}from"../plugin";export async function initialization(options,onProgress){const startTime=Date.now();let config={};try{await pluginManager.executeBeforeInit(options);onProgress?.(5,"初始化日志系统...");logger.setLevel(options.loggerLevel??LogLevel.INFO);onProgress?.(30);if(options.lifecycle?.beforeInitialization){onProgress?.(35,"执行初始化前回调...");await options.lifecycle.beforeInitialization()}onProgress?.(40,"设置国际化...");setupI18n(options.locale||undefined);if(options.lifecycle?.initialization){onProgress?.(50,"初始化核心功能...");await options.lifecycle.initialization();onProgress?.(70,"核心功能初始化完成")}else{onProgress?.(70)}onProgress?.(80,"准备完成...");const duration=Date.now()-startTime;const context={config,progress:100,isReady:true,duration};await pluginManager.executeInit(options,context);await pluginManager.executeAfterInit(options,context);if(options.lifecycle?.afterInitialization){onProgress?.(90,"执行初始化后回调...");await options.lifecycle.afterInitialization(context)}onProgress?.(100,"初始化完成");return context}catch(error){logger.error("初始化失败:",error);throw error}}
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"initializationErrorState",{enumerable:true,get:function(){return initializationErrorState}});const _utils=require("@vlian/utils");function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}let InitializationErrorState=class InitializationErrorState{setError(error){this.error=_utils.errorUtils.normalizeError(error);this.listeners.forEach(listener=>listener())}getError(){return this.error}clearError(){this.error=null;this.listeners.forEach(listener=>listener())}subscribe(listener){this.listeners.add(listener);return()=>{this.listeners.delete(listener)}}hasError(){return this.error!==null}constructor(){_define_property(this,"error",null);_define_property(this,"listeners",new Set)}};const initializationErrorState=new InitializationErrorState;
@@ -1,35 +0,0 @@
1
- import type { FrameworkError } from '@vlian/utils';
2
- /**
3
- * 初始化错误状态管理器
4
- *
5
- * 用于在初始化过程中捕获和存储错误,以便 ErrorBoundary 能够捕获并显示
6
- */
7
- declare class InitializationErrorState {
8
- private error;
9
- private listeners;
10
- /**
11
- * 设置错误
12
- */
13
- setError(error: unknown): void;
14
- /**
15
- * 获取错误
16
- */
17
- getError(): FrameworkError | null;
18
- /**
19
- * 清除错误
20
- */
21
- clearError(): void;
22
- /**
23
- * 订阅错误变化
24
- */
25
- subscribe(listener: () => void): () => void;
26
- /**
27
- * 检查是否有错误
28
- */
29
- hasError(): boolean;
30
- }
31
- /**
32
- * 全局初始化错误状态管理器实例
33
- */
34
- export declare const initializationErrorState: InitializationErrorState;
35
- export {};
@@ -1 +0,0 @@
1
- function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}import{errorUtils}from"@vlian/utils";let InitializationErrorState=class InitializationErrorState{setError(error){this.error=errorUtils.normalizeError(error);this.listeners.forEach(listener=>listener())}getError(){return this.error}clearError(){this.error=null;this.listeners.forEach(listener=>listener())}subscribe(listener){this.listeners.add(listener);return()=>{this.listeners.delete(listener)}}hasError(){return this.error!==null}constructor(){_define_property(this,"error",null);_define_property(this,"listeners",new Set)}};export const initializationErrorState=new InitializationErrorState;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"resolveKernelAdapters",{enumerable:true,get:function(){return resolveKernelAdapters}});const _logger=require("@vlian/logger");const _monitoring=require("@vlian/monitoring");const _state=require("../../state");const _AppEventBus=require("../event/AppEventBus");const _library=require("../../library");function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}const defaultLoggerAdapter={initialize(options){if(options.loggerLevel){_logger.logger.setLevel(options.loggerLevel)}},setLevel(level){_logger.logger.setLevel(level)},debug(message,...args){_logger.logger.debug(message,...args)},info(message,...args){_logger.logger.info(message,...args)},warn(message,...args){_logger.logger.warn(message,...args)},error(message,...args){_logger.logger.error(message,...args)}};const defaultMonitoringAdapter={initialize(){(0,_monitoring.initMonitoring)()},captureError(error,metadata){try{const service=(0,_monitoring.initMonitoring)();service.captureError(error,metadata)}catch{_logger.logger.error("监控适配器上报失败",error,metadata)}},reportMetric(name,value,tags){_logger.logger.debug(`metric:${name}`,{value,tags})},reportPhase(metric){_logger.logger.debug("kernel.phase.metric",metric)}};let DefaultStateAdapter=class DefaultStateAdapter{initialize(){this.instance=new _state.StateManager({enableRegistry:true,defaultScope:"app"})}getInstance(){if(!this.instance){this.initialize()}return this.instance}destroy(){if(this.instance){this.instance.destroy();this.instance=null}}constructor(){_define_property(this,"instance",null)}};let DefaultEventBusAdapter=class DefaultEventBusAdapter{initialize(options){this.bus=new _AppEventBus.AppEventBus({enableTracking:process.env.NODE_ENV==="development",maxHistorySize:100,enableValidation:false,enablePerformanceMonitoring:process.env.NODE_ENV==="development",instanceId:options.instanceId})}emit(event,payload){if(!this.bus){this.initialize({})}this.bus.emit(event,payload)}on(event,handler){if(!this.bus){this.initialize({})}return this.bus.on(event,handler)}destroy(){if(this.bus){this.bus.clear();this.bus=null}}constructor(){_define_property(this,"bus",null)}};const defaultI18nAdapter={initialize(snapshot){(0,_library.setupI18n)(snapshot.resources||{});(0,_library.setLang)(snapshot.locale)},setLocale(locale){(0,_library.setLang)(locale)}};const defaultThemeAdapter={initialize(snapshot){if(typeof document==="undefined"){return}applyThemeToDocument(snapshot)},apply(snapshot){if(typeof document==="undefined"){return}applyThemeToDocument(snapshot)}};function applyThemeToDocument(theme){const root=document.documentElement;root.classList.remove("light","dark");const resolvedMode=theme.mode==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":theme.mode;root.classList.add(resolvedMode);if(theme.primaryColor){root.style.setProperty("--app-primary-color",theme.primaryColor)}if(theme.compatibility?.shadcn){Object.entries(theme.compatibility.shadcn).forEach(([key,value])=>{root.style.setProperty(`--${key}`,String(value))})}}const defaultErrorHandler={async handle(error){_logger.logger.error("Kernel 启动失败",error);return{handled:true,shouldThrow:true}}};function resolveKernelAdapters(options){return{logger:options.adapters?.logger||defaultLoggerAdapter,monitoring:options.adapters?.monitoring||defaultMonitoringAdapter,state:options.adapters?.state||new DefaultStateAdapter,eventBus:options.adapters?.eventBus||new DefaultEventBusAdapter,i18n:options.adapters?.i18n||defaultI18nAdapter,theme:options.adapters?.theme||defaultThemeAdapter,errorHandler:options.adapters?.errorHandler||defaultErrorHandler}}
@@ -1,2 +0,0 @@
1
- import type { KernelAdapters, KernelStartOptions } from './types';
2
- export declare function resolveKernelAdapters(options: KernelStartOptions): Required<KernelAdapters>;
@@ -1 +0,0 @@
1
- function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}import{logger}from"@vlian/logger";import{initMonitoring}from"@vlian/monitoring";import{StateManager}from"../../state";import{AppEventBus}from"../event/AppEventBus";import{setupI18n,setLang}from"../../library";const defaultLoggerAdapter={initialize(options){if(options.loggerLevel){logger.setLevel(options.loggerLevel)}},setLevel(level){logger.setLevel(level)},debug(message,...args){logger.debug(message,...args)},info(message,...args){logger.info(message,...args)},warn(message,...args){logger.warn(message,...args)},error(message,...args){logger.error(message,...args)}};const defaultMonitoringAdapter={initialize(){initMonitoring()},captureError(error,metadata){try{const service=initMonitoring();service.captureError(error,metadata)}catch{logger.error("监控适配器上报失败",error,metadata)}},reportMetric(name,value,tags){logger.debug(`metric:${name}`,{value,tags})},reportPhase(metric){logger.debug("kernel.phase.metric",metric)}};let DefaultStateAdapter=class DefaultStateAdapter{initialize(){this.instance=new StateManager({enableRegistry:true,defaultScope:"app"})}getInstance(){if(!this.instance){this.initialize()}return this.instance}destroy(){if(this.instance){this.instance.destroy();this.instance=null}}constructor(){_define_property(this,"instance",null)}};let DefaultEventBusAdapter=class DefaultEventBusAdapter{initialize(options){this.bus=new AppEventBus({enableTracking:process.env.NODE_ENV==="development",maxHistorySize:100,enableValidation:false,enablePerformanceMonitoring:process.env.NODE_ENV==="development",instanceId:options.instanceId})}emit(event,payload){if(!this.bus){this.initialize({})}this.bus.emit(event,payload)}on(event,handler){if(!this.bus){this.initialize({})}return this.bus.on(event,handler)}destroy(){if(this.bus){this.bus.clear();this.bus=null}}constructor(){_define_property(this,"bus",null)}};const defaultI18nAdapter={initialize(snapshot){setupI18n(snapshot.resources||{});setLang(snapshot.locale)},setLocale(locale){setLang(locale)}};const defaultThemeAdapter={initialize(snapshot){if(typeof document==="undefined"){return}applyThemeToDocument(snapshot)},apply(snapshot){if(typeof document==="undefined"){return}applyThemeToDocument(snapshot)}};function applyThemeToDocument(theme){const root=document.documentElement;root.classList.remove("light","dark");const resolvedMode=theme.mode==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":theme.mode;root.classList.add(resolvedMode);if(theme.primaryColor){root.style.setProperty("--app-primary-color",theme.primaryColor)}if(theme.compatibility?.shadcn){Object.entries(theme.compatibility.shadcn).forEach(([key,value])=>{root.style.setProperty(`--${key}`,String(value))})}}const defaultErrorHandler={async handle(error){logger.error("Kernel 启动失败",error);return{handled:true,shouldThrow:true}}};export function resolveKernelAdapters(options){return{logger:options.adapters?.logger||defaultLoggerAdapter,monitoring:options.adapters?.monitoring||defaultMonitoringAdapter,state:options.adapters?.state||new DefaultStateAdapter,eventBus:options.adapters?.eventBus||new DefaultEventBusAdapter,i18n:options.adapters?.i18n||defaultI18nAdapter,theme:options.adapters?.theme||defaultThemeAdapter,errorHandler:options.adapters?.errorHandler||defaultErrorHandler}}