@done-coding/forge-core 0.0.0-placeholder.0 → 0.100.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +49 -0
  3. package/es/_virtual/_plugin-vue_export-helper.mjs +10 -0
  4. package/es/bridge/badge.mjs +37 -0
  5. package/es/bridge/config-hook.mjs +58 -0
  6. package/es/bridge/contracts/event.mjs +102 -0
  7. package/es/bridge/contracts/index.mjs +5 -0
  8. package/es/bridge/event.mjs +87 -0
  9. package/es/bridge/index.mjs +331 -0
  10. package/es/bridge/layout.mjs +100 -0
  11. package/es/bridge/permission.mjs +91 -0
  12. package/es/bridge/plugin.mjs +39 -0
  13. package/es/bridge/route.mjs +78 -0
  14. package/es/bridge/state.mjs +61 -0
  15. package/es/bridge/storage.mjs +26 -0
  16. package/es/bridge/theme/index.mjs +233 -0
  17. package/es/bridge/theme/persist.mjs +18 -0
  18. package/es/bridge/theme/system-dark.mjs +18 -0
  19. package/es/components/basic/AppCollapseToggle.vue.mjs +7 -0
  20. package/es/components/basic/AppCollapseToggle.vue2.mjs +63 -0
  21. package/es/components/basic/action-btn/ActionBtn.vue.mjs +200 -0
  22. package/es/components/basic/action-btn/ActionBtn.vue2.mjs +4 -0
  23. package/es/components/basic/action-btn/index.mjs +4 -0
  24. package/es/components/basic/action-btn/use-action-btn-report.mjs +54 -0
  25. package/es/components/basic/action-btn-group/ActionBtnGroup.vue.mjs +69 -0
  26. package/es/components/basic/action-btn-group/ActionBtnGroup.vue2.mjs +4 -0
  27. package/es/components/basic/action-btn-group/index.mjs +4 -0
  28. package/es/components/basic/action-btn-group/use-action-btn-group-report.mjs +30 -0
  29. package/es/components/basic/display-contracts/index.mjs +1 -0
  30. package/es/components/basic/drag-float/DragFloat.vue.mjs +7 -0
  31. package/es/components/basic/drag-float/DragFloat.vue2.mjs +109 -0
  32. package/es/components/basic/drag-float/index.mjs +4 -0
  33. package/es/components/basic/height-provider/HeightProvider.vue.mjs +62 -0
  34. package/es/components/basic/height-provider/HeightProvider.vue2.mjs +4 -0
  35. package/es/components/basic/height-provider/index.mjs +4 -0
  36. package/es/components/basic/index.mjs +4 -0
  37. package/es/components/basic/shadow-clone/ShadowClone.vue.mjs +32 -0
  38. package/es/components/basic/shadow-clone/ShadowClone.vue2.mjs +4 -0
  39. package/es/components/basic/shadow-clone/index.mjs +4 -0
  40. package/es/components/basic/shadow-clone/use-shadow-target.mjs +76 -0
  41. package/es/components/basic/slot-layout-flow-aside/SlotLayoutFlowAside.vue.mjs +7 -0
  42. package/es/components/basic/slot-layout-flow-aside/SlotLayoutFlowAside.vue2.mjs +68 -0
  43. package/es/components/basic/slot-layout-flow-aside/index.mjs +4 -0
  44. package/es/components/basic/slot-layout-template/SlotLayoutTemplate.vue.mjs +30 -0
  45. package/es/components/basic/slot-layout-template/SlotLayoutTemplate.vue2.mjs +4 -0
  46. package/es/components/basic/slot-layout-template/index.mjs +4 -0
  47. package/es/components/basic/watch-size/WatchSize.vue.mjs +73 -0
  48. package/es/components/basic/watch-size/WatchSize.vue2.mjs +4 -0
  49. package/es/components/basic/watch-size/index.mjs +4 -0
  50. package/es/components/config/app-theme/AppTheme.vue.mjs +7 -0
  51. package/es/components/config/app-theme/AppTheme.vue2.mjs +82 -0
  52. package/es/components/config/app-theme/index.mjs +4 -0
  53. package/es/components/data/badge-mark/BadgeMark.vue.mjs +7 -0
  54. package/es/components/data/badge-mark/BadgeMark.vue2.mjs +80 -0
  55. package/es/components/data/badge-mark/index.mjs +4 -0
  56. package/es/components/data/badge-mark/use-badge-mask.mjs +82 -0
  57. package/es/components/data/badge-mark/use-badge.mjs +106 -0
  58. package/es/components/data/boolean-tag/BooleanTag.vue.mjs +36 -0
  59. package/es/components/data/boolean-tag/BooleanTag.vue2.mjs +4 -0
  60. package/es/components/data/boolean-tag/index.mjs +4 -0
  61. package/es/components/data/image-preview-trigger/ImagePreviewTrigger.vue.mjs +38 -0
  62. package/es/components/data/image-preview-trigger/ImagePreviewTrigger.vue2.mjs +4 -0
  63. package/es/components/data/image-preview-trigger/index.mjs +4 -0
  64. package/es/components/data/modal-image-preview/ModalImagePreview.vue.mjs +52 -0
  65. package/es/components/data/modal-image-preview/ModalImagePreview.vue2.mjs +4 -0
  66. package/es/components/data/modal-image-preview/index.mjs +4 -0
  67. package/es/components/feedback/action-confirm/ActionConfirm.vue.mjs +7 -0
  68. package/es/components/feedback/action-confirm/ActionConfirm.vue2.mjs +143 -0
  69. package/es/components/feedback/action-confirm/index.mjs +4 -0
  70. package/es/components/feedback/modal-confirm/ModalConfirm.vue.mjs +8 -0
  71. package/es/components/feedback/modal-confirm/ModalConfirm.vue2.mjs +243 -0
  72. package/es/components/feedback/modal-confirm/index.mjs +4 -0
  73. package/es/components/feedback/modal-video-preview/ModalVideoPreview.vue.mjs +8 -0
  74. package/es/components/feedback/modal-video-preview/ModalVideoPreview.vue2.mjs +93 -0
  75. package/es/components/feedback/modal-video-preview/index.mjs +4 -0
  76. package/es/components/feedback/preview-keys/index.mjs +7 -0
  77. package/es/components/feedback/preview-keys/keys.mjs +7 -0
  78. package/es/components/feedback/shelf-contracts/index.mjs +1 -0
  79. package/es/components/feedback/video-preview-trigger/VideoPreviewTrigger.vue.mjs +7 -0
  80. package/es/components/feedback/video-preview-trigger/VideoPreviewTrigger.vue2.mjs +133 -0
  81. package/es/components/feedback/video-preview-trigger/index.mjs +4 -0
  82. package/es/components/other/TriggerAutoImport.vue.mjs +12 -0
  83. package/es/components/other/TriggerAutoImport.vue2.mjs +4 -0
  84. package/es/components/other/auto-refresh/AutoRefresh.vue.mjs +7 -0
  85. package/es/components/other/auto-refresh/AutoRefresh.vue2.mjs +96 -0
  86. package/es/components/other/auto-refresh/index.mjs +4 -0
  87. package/es/components/other/auto-refresh/use-auto-refresh-report.mjs +31 -0
  88. package/es/components/other/auto-refresh-contracts/index.mjs +1 -0
  89. package/es/components/other/auto-refresh-group/AutoRefreshGroup.vue.mjs +7 -0
  90. package/es/components/other/auto-refresh-group/AutoRefreshGroup.vue2.mjs +69 -0
  91. package/es/components/other/auto-refresh-group/index.mjs +4 -0
  92. package/es/components/other/auto-refresh-group/use-auto-refresh-group-report.mjs +12 -0
  93. package/es/components/other/index.mjs +4 -0
  94. package/es/config/badge-attr.mjs +6 -0
  95. package/es/config/index.mjs +19 -0
  96. package/es/config/list-model.mjs +13 -0
  97. package/es/config/modal-keys.mjs +6 -0
  98. package/es/config/route.mjs +6 -0
  99. package/es/config/slot-region.mjs +45 -0
  100. package/es/helpers/form.mjs +25 -0
  101. package/es/helpers/index.mjs +10 -0
  102. package/es/helpers/list-helper.mjs +77 -0
  103. package/es/hooks/activated.mjs +64 -0
  104. package/es/hooks/feel-size.mjs +46 -0
  105. package/es/hooks/index.mjs +31 -0
  106. package/es/hooks/menus-dispatch.mjs +85 -0
  107. package/es/hooks/timeout.mjs +36 -0
  108. package/es/hooks/use-active-record.mjs +104 -0
  109. package/es/hooks/use-breakpoint.mjs +48 -0
  110. package/es/hooks/use-bridge-report.mjs +12 -0
  111. package/es/hooks/use-channel-viewport-height.mjs +43 -0
  112. package/es/hooks/use-context-defaults.mjs +44 -0
  113. package/es/hooks/use-custom-breakpoint.mjs +69 -0
  114. package/es/hooks/use-is-dev.mjs +16 -0
  115. package/es/hooks/use-observe-size.mjs +43 -0
  116. package/es/hooks/use-permission.mjs +12 -0
  117. package/es/hooks/use-surface.mjs +35 -0
  118. package/es/hooks/use-theme-apply.mjs +496 -0
  119. package/es/hooks/use-viewport-apply.mjs +52 -0
  120. package/es/index.mjs +179 -0
  121. package/es/inject/index.mjs +19 -0
  122. package/es/inject/key.mjs +70 -0
  123. package/es/injection-namespace.mjs +4 -0
  124. package/es/internals/index.mjs +16 -0
  125. package/es/router/group-redirect.mjs +26 -0
  126. package/es/router/guard/index.mjs +36 -0
  127. package/es/router/guard/login.mjs +6 -0
  128. package/es/router/guard/permission.mjs +6 -0
  129. package/es/router/index.mjs +10 -0
  130. package/es/store/app.mjs +306 -0
  131. package/es/store/index.mjs +8 -0
  132. package/es/store/router-permission.mjs +94 -0
  133. package/es/store/user.mjs +128 -0
  134. package/es/style.css +339 -0
  135. package/es/types/index.mjs +1 -0
  136. package/es/utils/dom.mjs +42 -0
  137. package/es/utils/export.mjs +39 -0
  138. package/es/utils/gap-scale.mjs +25 -0
  139. package/es/utils/id.mjs +7 -0
  140. package/es/utils/index.mjs +37 -0
  141. package/es/utils/permission.mjs +31 -0
  142. package/es/utils/router.mjs +42 -0
  143. package/es/utils/theme-scale.mjs +86 -0
  144. package/es/utils/time.mjs +24 -0
  145. package/package.json +232 -1
  146. package/types/bridge/badge.d.ts +215 -0
  147. package/types/bridge/config-hook.d.ts +12 -0
  148. package/types/bridge/contracts/bridge.d.ts +339 -0
  149. package/types/bridge/contracts/config.d.ts +519 -0
  150. package/types/bridge/contracts/event.d.ts +546 -0
  151. package/types/bridge/contracts/index.d.ts +3 -0
  152. package/types/bridge/event.d.ts +3 -0
  153. package/types/bridge/index.d.ts +28 -0
  154. package/types/bridge/layout.d.ts +102 -0
  155. package/types/bridge/permission.d.ts +31 -0
  156. package/types/bridge/plugin.d.ts +11 -0
  157. package/types/bridge/route.d.ts +36 -0
  158. package/types/bridge/state.d.ts +26 -0
  159. package/types/bridge/storage.d.ts +10 -0
  160. package/types/bridge/theme/index.d.ts +10 -0
  161. package/types/bridge/theme/persist.d.ts +23 -0
  162. package/types/bridge/theme/system-dark.d.ts +14 -0
  163. package/types/bridge/theme/types.d.ts +346 -0
  164. package/types/components/basic/AppCollapseToggle.vue.d.ts +14 -0
  165. package/types/components/basic/action-btn/ActionBtn.vue.d.ts +19 -0
  166. package/types/components/basic/action-btn/index.d.ts +1 -0
  167. package/types/components/basic/action-btn/use-action-btn-report.d.ts +12 -0
  168. package/types/components/basic/action-btn-group/ActionBtnGroup.vue.d.ts +18 -0
  169. package/types/components/basic/action-btn-group/index.d.ts +1 -0
  170. package/types/components/basic/action-btn-group/use-action-btn-group-report.d.ts +6 -0
  171. package/types/components/basic/display-contracts/index.d.ts +1 -0
  172. package/types/components/basic/display-contracts/types.d.ts +280 -0
  173. package/types/components/basic/drag-float/DragFloat.vue.d.ts +35 -0
  174. package/types/components/basic/drag-float/index.d.ts +1 -0
  175. package/types/components/basic/height-provider/HeightProvider.vue.d.ts +28 -0
  176. package/types/components/basic/height-provider/index.d.ts +1 -0
  177. package/types/components/basic/index.d.ts +1 -0
  178. package/types/components/basic/shadow-clone/ShadowClone.vue.d.ts +20 -0
  179. package/types/components/basic/shadow-clone/index.d.ts +1 -0
  180. package/types/components/basic/shadow-clone/use-shadow-target.d.ts +9 -0
  181. package/types/components/basic/slot-layout-flow-aside/SlotLayoutFlowAside.vue.d.ts +32 -0
  182. package/types/components/basic/slot-layout-flow-aside/index.d.ts +2 -0
  183. package/types/components/basic/slot-layout-flow-aside/types.d.ts +10 -0
  184. package/types/components/basic/slot-layout-template/SlotLayoutTemplate.vue.d.ts +48 -0
  185. package/types/components/basic/slot-layout-template/index.d.ts +1 -0
  186. package/types/components/basic/watch-size/WatchSize.vue.d.ts +45 -0
  187. package/types/components/basic/watch-size/index.d.ts +1 -0
  188. package/types/components/config/app-theme/AppTheme.vue.d.ts +2 -0
  189. package/types/components/config/app-theme/index.d.ts +1 -0
  190. package/types/components/data/badge-mark/BadgeMark.vue.d.ts +212 -0
  191. package/types/components/data/badge-mark/index.d.ts +1 -0
  192. package/types/components/data/badge-mark/use-badge-mask.d.ts +8 -0
  193. package/types/components/data/badge-mark/use-badge.d.ts +78 -0
  194. package/types/components/data/boolean-tag/BooleanTag.vue.d.ts +8 -0
  195. package/types/components/data/boolean-tag/index.d.ts +1 -0
  196. package/types/components/data/image-preview-trigger/ImagePreviewTrigger.vue.d.ts +41 -0
  197. package/types/components/data/image-preview-trigger/index.d.ts +1 -0
  198. package/types/components/data/modal-image-preview/ModalImagePreview.vue.d.ts +31 -0
  199. package/types/components/data/modal-image-preview/index.d.ts +1 -0
  200. package/types/components/feedback/action-confirm/ActionConfirm.vue.d.ts +33 -0
  201. package/types/components/feedback/action-confirm/index.d.ts +1 -0
  202. package/types/components/feedback/modal-confirm/ModalConfirm.vue.d.ts +120 -0
  203. package/types/components/feedback/modal-confirm/index.d.ts +2 -0
  204. package/types/components/feedback/modal-confirm/types.d.ts +4 -0
  205. package/types/components/feedback/modal-video-preview/ModalVideoPreview.vue.d.ts +40 -0
  206. package/types/components/feedback/modal-video-preview/index.d.ts +1 -0
  207. package/types/components/feedback/preview-keys/index.d.ts +2 -0
  208. package/types/components/feedback/preview-keys/keys.d.ts +14 -0
  209. package/types/components/feedback/shelf-contracts/index.d.ts +1 -0
  210. package/types/components/feedback/shelf-contracts/types.d.ts +1 -0
  211. package/types/components/feedback/video-preview-trigger/VideoPreviewTrigger.vue.d.ts +46 -0
  212. package/types/components/feedback/video-preview-trigger/index.d.ts +1 -0
  213. package/types/components/other/TriggerAutoImport.vue.d.ts +17 -0
  214. package/types/components/other/auto-refresh/AutoRefresh.vue.d.ts +14 -0
  215. package/types/components/other/auto-refresh/index.d.ts +1 -0
  216. package/types/components/other/auto-refresh/use-auto-refresh-report.d.ts +1 -0
  217. package/types/components/other/auto-refresh-contracts/index.d.ts +1 -0
  218. package/types/components/other/auto-refresh-contracts/types.d.ts +17 -0
  219. package/types/components/other/auto-refresh-group/AutoRefreshGroup.vue.d.ts +18 -0
  220. package/types/components/other/auto-refresh-group/index.d.ts +1 -0
  221. package/types/components/other/auto-refresh-group/use-auto-refresh-group-report.d.ts +3 -0
  222. package/types/components/other/index.d.ts +1 -0
  223. package/types/config/badge-attr.d.ts +26 -0
  224. package/types/config/index.d.ts +5 -0
  225. package/types/config/list-model.d.ts +49 -0
  226. package/types/config/modal-keys.d.ts +12 -0
  227. package/types/config/route.d.ts +4 -0
  228. package/types/config/slot-region.d.ts +72 -0
  229. package/types/helpers/form.d.ts +8 -0
  230. package/types/helpers/index.d.ts +3 -0
  231. package/types/helpers/list-helper.d.ts +35 -0
  232. package/types/helpers/types.d.ts +15 -0
  233. package/types/hooks/activated.d.ts +36 -0
  234. package/types/hooks/feel-size.d.ts +10 -0
  235. package/types/hooks/index.d.ts +12 -0
  236. package/types/hooks/menus-dispatch.d.ts +35 -0
  237. package/types/hooks/timeout.d.ts +7 -0
  238. package/types/hooks/use-active-record.d.ts +64 -0
  239. package/types/hooks/use-breakpoint.d.ts +4 -0
  240. package/types/hooks/use-bridge-report.d.ts +3 -0
  241. package/types/hooks/use-channel-viewport-height.d.ts +22 -0
  242. package/types/hooks/use-context-defaults.d.ts +39 -0
  243. package/types/hooks/use-custom-breakpoint.d.ts +17 -0
  244. package/types/hooks/use-is-dev.d.ts +24 -0
  245. package/types/hooks/use-observe-size.d.ts +36 -0
  246. package/types/hooks/use-permission.d.ts +14 -0
  247. package/types/hooks/use-surface.d.ts +45 -0
  248. package/types/hooks/use-theme-apply.d.ts +34 -0
  249. package/types/hooks/use-viewport-apply.d.ts +20 -0
  250. package/types/index.d.ts +33 -0
  251. package/types/inject/index.d.ts +1 -0
  252. package/types/inject/key.d.ts +247 -0
  253. package/types/injection-namespace.d.ts +4 -0
  254. package/types/internals/index.d.ts +6 -0
  255. package/types/router/group-redirect.d.ts +14 -0
  256. package/types/router/guard/index.d.ts +20 -0
  257. package/types/router/guard/login.d.ts +4 -0
  258. package/types/router/guard/permission.d.ts +4 -0
  259. package/types/router/guard/types.d.ts +14 -0
  260. package/types/router/index.d.ts +2 -0
  261. package/types/store/app.d.ts +219 -0
  262. package/types/store/index.d.ts +3 -0
  263. package/types/store/router-permission.d.ts +79 -0
  264. package/types/store/user.d.ts +64 -0
  265. package/types/types/app-layout.d.ts +42 -0
  266. package/types/types/dc-path.d.ts +2 -0
  267. package/types/types/dot-path.d.ts +13 -0
  268. package/types/types/index.d.ts +9 -0
  269. package/types/types/list-api.d.ts +17 -0
  270. package/types/types/modal-shelf.d.ts +123 -0
  271. package/types/types/nest-form.d.ts +8 -0
  272. package/types/types/permission.d.ts +31 -0
  273. package/types/types/route.d.ts +141 -0
  274. package/types/types/utility-types.d.ts +25 -0
  275. package/types/utils/dom.d.ts +61 -0
  276. package/types/utils/export.d.ts +35 -0
  277. package/types/utils/gap-scale.d.ts +46 -0
  278. package/types/utils/id.d.ts +2 -0
  279. package/types/utils/index.d.ts +8 -0
  280. package/types/utils/permission.d.ts +16 -0
  281. package/types/utils/router.d.ts +18 -0
  282. package/types/utils/theme-scale.d.ts +78 -0
  283. package/types/utils/time.d.ts +2 -0
package/es/index.mjs ADDED
@@ -0,0 +1,179 @@
1
+ import { createCoreBridge } from "./bridge/index.mjs";
2
+ import { BADGE_HOST_ATTR, BADGE_KEY_ATTR } from "./config/badge-attr.mjs";
3
+ import { APP_API_LIST_MODEL_KEY_CONFIG } from "./config/list-model.mjs";
4
+ import { ROUTE_MODULE_LEVEL, TabsMainReplaceQueryKey } from "./config/route.mjs";
5
+ import { APP_PAGE_SIDE_SLOTS, DC_SLOT_ATTR, SlotRegion, parseSlotRegion, resolveAppPageSlotName } from "./config/slot-region.mjs";
6
+ import { APP_GLOBAL_IMAGE_PREVIEW_KEY, APP_GLOBAL_VIDEO_PREVIEW_KEY } from "./config/modal-keys.mjs";
7
+ import { FORM_CONFIG_SELECT_ALL_VALUE, getConfirmPasswordRule, passwordRule } from "./helpers/form.mjs";
8
+ import { countAll, createListApi, fetchListAll } from "./helpers/list-helper.mjs";
9
+ import { useBreakpoint } from "./hooks/use-breakpoint.mjs";
10
+ import { resolveBreakpointByWidth, resolveRootEl, useCustomBreakpoint } from "./hooks/use-custom-breakpoint.mjs";
11
+ import { useActivated, useActivatedEvent, useActivatedExec } from "./hooks/activated.mjs";
12
+ import { useFeelSize } from "./hooks/feel-size.mjs";
13
+ import { useMenusDataDispatch } from "./hooks/menus-dispatch.mjs";
14
+ import { useTimeout } from "./hooks/timeout.mjs";
15
+ import { useChannelViewportHeight } from "./hooks/use-channel-viewport-height.mjs";
16
+ import { useObserveSize } from "./hooks/use-observe-size.mjs";
17
+ import { usePermission } from "./hooks/use-permission.mjs";
18
+ import { buildRhythmCss, useCoreThemeApply } from "./hooks/use-theme-apply.mjs";
19
+ import { useCoreViewportApply } from "./hooks/use-viewport-apply.mjs";
20
+ import { useBridgeReport } from "./hooks/use-bridge-report.mjs";
21
+ import { APP_LAYOUT_APP_STORE_KEY, APP_LAYOUT_BRIDGE_KEY, APP_LAYOUT_USER_STORE_KEY, APP_PAGE_CONTENT_INSET, APP_PAGE_LIST_DETAIL_CONTEXT, APP_PAGE_NAV_BAR_ACTIVE, BODY_CONTENT_VIEWPORT_HEIGHT, BODY_CONTENT_VIEWPORT_INSET, BODY_CONTENT_VIEWPORT_RECT, CORE_BRIDGE_KEY, FORM_NEST_REGISTRY_KEY, FORM_VALIDATE_ERROR_KEYS, NEST_LAYOUT_SCALE_KEY, SCOPE_VIEWPORT_MAX_HEIGHT, TABS_MAIN_VISUAL_LEVEL, getModalShelfInjectionKey } from "./inject/key.mjs";
22
+ import { createGuard } from "./router/guard/index.mjs";
23
+ import { withGroupRedirect } from "./router/group-redirect.mjs";
24
+ import { createUserStore } from "./store/user.mjs";
25
+ import { createAppStore } from "./store/app.mjs";
26
+ import { createRoutePermissionStore } from "./store/router-permission.mjs";
27
+ import { timeCountDown } from "./utils/time.mjs";
28
+ import { getId } from "./utils/id.mjs";
29
+ import { domClosestScrollableAncestor, domClosestStickyScrollport, domScrollIntoViewport } from "./utils/dom.mjs";
30
+ import { flatRouteMetaResolveRaw, getRoutePermissionKey, getRoutePermissionRequirement, routerOpenInNewTab } from "./utils/router.mjs";
31
+ import { checkPermissionRule, permissionCheckAll, permissionCheckAny, resolvePermissionRule } from "./utils/permission.mjs";
32
+ import { EXPORT_MAX_LIMIT, OPERATE_COLUMN_PROP, exportCSV, pickExportColumns } from "./utils/export.mjs";
33
+ import { themeScaleDerive, themeScaleIsNearBlack, themeScaleMix, themeScalePageColor, themeScaleParseHex, themeScaleSurfaceColor, themeScaleToRgba } from "./utils/theme-scale.mjs";
34
+ import { GAP_SCALE_RUNG, gapScaleBase, gapScaleValue } from "./utils/gap-scale.mjs";
35
+ import { default as default2 } from "./components/basic/action-btn/ActionBtn.vue.mjs";
36
+ import { default as default3 } from "./components/basic/action-btn-group/ActionBtnGroup.vue.mjs";
37
+ import { default as default4 } from "./components/basic/drag-float/DragFloat.vue.mjs";
38
+ import { default as default5 } from "./components/basic/height-provider/HeightProvider.vue.mjs";
39
+ import { default as default6 } from "./components/basic/AppCollapseToggle.vue.mjs";
40
+ import { default as default7 } from "./components/basic/shadow-clone/ShadowClone.vue.mjs";
41
+ import { default as default8 } from "./components/basic/slot-layout-flow-aside/SlotLayoutFlowAside.vue.mjs";
42
+ import { default as default9 } from "./components/basic/slot-layout-template/SlotLayoutTemplate.vue.mjs";
43
+ import { default as default10 } from "./components/basic/watch-size/WatchSize.vue.mjs";
44
+ import { default as default11 } from "./components/config/app-theme/AppTheme.vue.mjs";
45
+ import { default as default12 } from "./components/data/badge-mark/BadgeMark.vue.mjs";
46
+ import { default as default13 } from "./components/data/boolean-tag/BooleanTag.vue.mjs";
47
+ import { default as default14 } from "./components/data/image-preview-trigger/ImagePreviewTrigger.vue.mjs";
48
+ import { default as default15 } from "./components/data/modal-image-preview/ModalImagePreview.vue.mjs";
49
+ import { default as default16 } from "./components/feedback/action-confirm/ActionConfirm.vue.mjs";
50
+ import { default as default17 } from "./components/feedback/modal-confirm/ModalConfirm.vue.mjs";
51
+ import { default as default18 } from "./components/feedback/modal-video-preview/ModalVideoPreview.vue.mjs";
52
+ import { GLOBAL_MODAL_REMOTE_KEY } from "./components/feedback/preview-keys/keys.mjs";
53
+ import { default as default19 } from "./components/feedback/video-preview-trigger/VideoPreviewTrigger.vue.mjs";
54
+ import { default as default20 } from "./components/other/auto-refresh/AutoRefresh.vue.mjs";
55
+ import { default as default21 } from "./components/other/auto-refresh-group/AutoRefreshGroup.vue.mjs";
56
+ import { default as default22 } from "./components/other/TriggerAutoImport.vue.mjs";
57
+ import { BADGE_MASK_KINDS } from "./bridge/badge.mjs";
58
+ import { BridgeEventName, KNOWN_BRIDGE_EVENTS } from "./bridge/contracts/event.mjs";
59
+ import { checkLogin } from "./router/guard/login.mjs";
60
+ import { checkPermission } from "./router/guard/permission.mjs";
61
+ import { createGenerateRouteMetaRawTree } from "./bridge/route.mjs";
62
+ import { createStorageWithNamespace } from "./bridge/storage.mjs";
63
+ import { createUseState } from "./bridge/state.mjs";
64
+ export {
65
+ APP_API_LIST_MODEL_KEY_CONFIG,
66
+ APP_GLOBAL_IMAGE_PREVIEW_KEY,
67
+ APP_GLOBAL_VIDEO_PREVIEW_KEY,
68
+ APP_LAYOUT_APP_STORE_KEY,
69
+ APP_LAYOUT_BRIDGE_KEY,
70
+ APP_LAYOUT_USER_STORE_KEY,
71
+ APP_PAGE_CONTENT_INSET,
72
+ APP_PAGE_LIST_DETAIL_CONTEXT,
73
+ APP_PAGE_NAV_BAR_ACTIVE,
74
+ APP_PAGE_SIDE_SLOTS,
75
+ default2 as ActionBtn,
76
+ default3 as ActionBtnGroup,
77
+ default16 as ActionConfirm,
78
+ default6 as AppCollapseToggle,
79
+ default11 as AppTheme,
80
+ default20 as AutoRefresh,
81
+ default21 as AutoRefreshGroup,
82
+ BADGE_HOST_ATTR,
83
+ BADGE_KEY_ATTR,
84
+ BADGE_MASK_KINDS,
85
+ BODY_CONTENT_VIEWPORT_HEIGHT,
86
+ BODY_CONTENT_VIEWPORT_INSET,
87
+ BODY_CONTENT_VIEWPORT_RECT,
88
+ default12 as BadgeMark,
89
+ default13 as BooleanTag,
90
+ BridgeEventName,
91
+ CORE_BRIDGE_KEY,
92
+ DC_SLOT_ATTR,
93
+ default4 as DragFloat,
94
+ EXPORT_MAX_LIMIT,
95
+ FORM_CONFIG_SELECT_ALL_VALUE,
96
+ FORM_NEST_REGISTRY_KEY,
97
+ FORM_VALIDATE_ERROR_KEYS,
98
+ GAP_SCALE_RUNG,
99
+ GLOBAL_MODAL_REMOTE_KEY,
100
+ default5 as HeightProvider,
101
+ default14 as ImagePreviewTrigger,
102
+ KNOWN_BRIDGE_EVENTS,
103
+ default17 as ModalConfirm,
104
+ default15 as ModalImagePreview,
105
+ default18 as ModalVideoPreview,
106
+ NEST_LAYOUT_SCALE_KEY,
107
+ OPERATE_COLUMN_PROP,
108
+ ROUTE_MODULE_LEVEL,
109
+ SCOPE_VIEWPORT_MAX_HEIGHT,
110
+ default7 as ShadowClone,
111
+ default8 as SlotLayoutFlowAside,
112
+ default9 as SlotLayoutTemplate,
113
+ SlotRegion,
114
+ TABS_MAIN_VISUAL_LEVEL,
115
+ TabsMainReplaceQueryKey,
116
+ default22 as TriggerAutoImport,
117
+ default19 as VideoPreviewTrigger,
118
+ default10 as WatchSize,
119
+ buildRhythmCss,
120
+ checkLogin,
121
+ checkPermission,
122
+ checkPermissionRule,
123
+ countAll,
124
+ createAppStore,
125
+ createCoreBridge,
126
+ createGenerateRouteMetaRawTree,
127
+ createGuard,
128
+ createListApi,
129
+ createRoutePermissionStore,
130
+ createStorageWithNamespace,
131
+ createUseState,
132
+ createUserStore,
133
+ domClosestScrollableAncestor,
134
+ domClosestStickyScrollport,
135
+ domScrollIntoViewport,
136
+ exportCSV,
137
+ fetchListAll,
138
+ flatRouteMetaResolveRaw,
139
+ gapScaleBase,
140
+ gapScaleValue,
141
+ getConfirmPasswordRule,
142
+ getId,
143
+ getModalShelfInjectionKey,
144
+ getRoutePermissionKey,
145
+ getRoutePermissionRequirement,
146
+ parseSlotRegion,
147
+ passwordRule,
148
+ permissionCheckAll,
149
+ permissionCheckAny,
150
+ pickExportColumns,
151
+ resolveAppPageSlotName,
152
+ resolveBreakpointByWidth,
153
+ resolvePermissionRule,
154
+ resolveRootEl,
155
+ routerOpenInNewTab,
156
+ themeScaleDerive,
157
+ themeScaleIsNearBlack,
158
+ themeScaleMix,
159
+ themeScalePageColor,
160
+ themeScaleParseHex,
161
+ themeScaleSurfaceColor,
162
+ themeScaleToRgba,
163
+ timeCountDown,
164
+ useActivated,
165
+ useActivatedEvent,
166
+ useActivatedExec,
167
+ useBreakpoint,
168
+ useBridgeReport,
169
+ useChannelViewportHeight,
170
+ useCoreThemeApply,
171
+ useCoreViewportApply,
172
+ useCustomBreakpoint,
173
+ useFeelSize,
174
+ useMenusDataDispatch,
175
+ useObserveSize,
176
+ usePermission,
177
+ useTimeout,
178
+ withGroupRedirect
179
+ };
@@ -0,0 +1,19 @@
1
+ import { APP_LAYOUT_APP_STORE_KEY, APP_LAYOUT_BRIDGE_KEY, APP_LAYOUT_USER_STORE_KEY, APP_PAGE_CONTENT_INSET, APP_PAGE_LIST_DETAIL_CONTEXT, APP_PAGE_NAV_BAR_ACTIVE, BODY_CONTENT_VIEWPORT_HEIGHT, BODY_CONTENT_VIEWPORT_INSET, BODY_CONTENT_VIEWPORT_RECT, CORE_BRIDGE_KEY, FORM_NEST_REGISTRY_KEY, FORM_VALIDATE_ERROR_KEYS, NEST_LAYOUT_SCALE_KEY, SCOPE_VIEWPORT_MAX_HEIGHT, TABS_MAIN_VISUAL_LEVEL, getModalShelfInjectionKey } from "./key.mjs";
2
+ export {
3
+ APP_LAYOUT_APP_STORE_KEY,
4
+ APP_LAYOUT_BRIDGE_KEY,
5
+ APP_LAYOUT_USER_STORE_KEY,
6
+ APP_PAGE_CONTENT_INSET,
7
+ APP_PAGE_LIST_DETAIL_CONTEXT,
8
+ APP_PAGE_NAV_BAR_ACTIVE,
9
+ BODY_CONTENT_VIEWPORT_HEIGHT,
10
+ BODY_CONTENT_VIEWPORT_INSET,
11
+ BODY_CONTENT_VIEWPORT_RECT,
12
+ CORE_BRIDGE_KEY,
13
+ FORM_NEST_REGISTRY_KEY,
14
+ FORM_VALIDATE_ERROR_KEYS,
15
+ NEST_LAYOUT_SCALE_KEY,
16
+ SCOPE_VIEWPORT_MAX_HEIGHT,
17
+ TABS_MAIN_VISUAL_LEVEL,
18
+ getModalShelfInjectionKey
19
+ };
@@ -0,0 +1,70 @@
1
+ import injectInfo from "../injection-namespace.mjs";
2
+ const nsKey = (key) => `${injectInfo.name}:${key}`;
3
+ const BODY_CONTENT_VIEWPORT_HEIGHT = Symbol.for(
4
+ nsKey("BODY_CONTENT_VIEWPORT_HEIGHT")
5
+ );
6
+ const SCOPE_VIEWPORT_MAX_HEIGHT = Symbol.for(
7
+ nsKey("SCOPE_VIEWPORT_MAX_HEIGHT")
8
+ );
9
+ const BODY_CONTENT_VIEWPORT_RECT = Symbol.for(
10
+ nsKey("BODY_CONTENT_VIEWPORT_RECT")
11
+ );
12
+ const BODY_CONTENT_VIEWPORT_INSET = Symbol.for(
13
+ nsKey("BODY_CONTENT_VIEWPORT_INSET")
14
+ );
15
+ const APP_PAGE_NAV_BAR_ACTIVE = Symbol.for(
16
+ nsKey("APP_PAGE_NAV_BAR_ACTIVE")
17
+ );
18
+ const APP_PAGE_CONTENT_INSET = Symbol.for(
19
+ nsKey("APP_PAGE_CONTENT_INSET")
20
+ );
21
+ function getModalShelfInjectionKey(level) {
22
+ return Symbol.for(
23
+ nsKey(`MODAL_SHELF_${level}`)
24
+ );
25
+ }
26
+ const TABS_MAIN_VISUAL_LEVEL = Symbol.for(
27
+ nsKey("TABS_MAIN_VISUAL_LEVEL")
28
+ );
29
+ const APP_LAYOUT_APP_STORE_KEY = Symbol.for(
30
+ nsKey("APP_LAYOUT_APP_STORE_KEY")
31
+ );
32
+ const APP_LAYOUT_USER_STORE_KEY = Symbol.for(
33
+ nsKey("APP_LAYOUT_USER_STORE_KEY")
34
+ );
35
+ const APP_LAYOUT_BRIDGE_KEY = Symbol.for(
36
+ nsKey("APP_LAYOUT_BRIDGE_KEY")
37
+ );
38
+ const CORE_BRIDGE_KEY = Symbol.for(
39
+ nsKey("CORE_BRIDGE_KEY")
40
+ );
41
+ const FORM_VALIDATE_ERROR_KEYS = Symbol.for(
42
+ nsKey("FORM_VALIDATE_ERROR_KEYS")
43
+ );
44
+ const FORM_NEST_REGISTRY_KEY = Symbol.for(
45
+ nsKey("FORM_NEST_REGISTRY")
46
+ );
47
+ const NEST_LAYOUT_SCALE_KEY = Symbol.for(
48
+ nsKey("NEST_LAYOUT_SCALE")
49
+ );
50
+ const APP_PAGE_LIST_DETAIL_CONTEXT = Symbol.for(
51
+ nsKey("APP_PAGE_LIST_DETAIL_CONTEXT")
52
+ );
53
+ export {
54
+ APP_LAYOUT_APP_STORE_KEY,
55
+ APP_LAYOUT_BRIDGE_KEY,
56
+ APP_LAYOUT_USER_STORE_KEY,
57
+ APP_PAGE_CONTENT_INSET,
58
+ APP_PAGE_LIST_DETAIL_CONTEXT,
59
+ APP_PAGE_NAV_BAR_ACTIVE,
60
+ BODY_CONTENT_VIEWPORT_HEIGHT,
61
+ BODY_CONTENT_VIEWPORT_INSET,
62
+ BODY_CONTENT_VIEWPORT_RECT,
63
+ CORE_BRIDGE_KEY,
64
+ FORM_NEST_REGISTRY_KEY,
65
+ FORM_VALIDATE_ERROR_KEYS,
66
+ NEST_LAYOUT_SCALE_KEY,
67
+ SCOPE_VIEWPORT_MAX_HEIGHT,
68
+ TABS_MAIN_VISUAL_LEVEL,
69
+ getModalShelfInjectionKey
70
+ };
@@ -0,0 +1,4 @@
1
+ const injectInfo = { name: "@done-coding/admin-core" };
2
+ export {
3
+ injectInfo as default
4
+ };
@@ -0,0 +1,16 @@
1
+ import { BADGE_MASK_KINDS, createBridgeBadgeHook } from "../bridge/badge.mjs";
2
+ import { createBridgeEventHook } from "../bridge/event.mjs";
3
+ import { activeRecordValueOf, useActiveRecord } from "../hooks/use-active-record.mjs";
4
+ import { useContextDefaults } from "../hooks/use-context-defaults.mjs";
5
+ import { useIsDev } from "../hooks/use-is-dev.mjs";
6
+ import { useSurface } from "../hooks/use-surface.mjs";
7
+ export {
8
+ BADGE_MASK_KINDS,
9
+ activeRecordValueOf,
10
+ createBridgeBadgeHook,
11
+ createBridgeEventHook,
12
+ useActiveRecord,
13
+ useContextDefaults,
14
+ useIsDev,
15
+ useSurface
16
+ };
@@ -0,0 +1,26 @@
1
+ const joinPath = (parent, child) => child.startsWith("/") ? child : `${parent.replace(/\/$/, "")}/${child}`;
2
+ const buildGroupRoutes = (routes, onParentComponent) => routes.map((route) => {
3
+ var _a, _b;
4
+ const node = { ...route };
5
+ if ((_a = node.children) == null ? void 0 : _a.length) {
6
+ node.children = buildGroupRoutes(node.children, onParentComponent);
7
+ }
8
+ const hasComponent = !!(node.component || node.components);
9
+ const hasChildren = !!((_b = node.children) == null ? void 0 : _b.length);
10
+ if (hasChildren && hasComponent) {
11
+ const message = `[admin-core] withGroupRedirect: 路由 "${node.path}" 同时含 children 与 component/components——当前范式不建议父路由承接视图(组壳会被 KeepAlive 误缓存、且需内层 router-view)。建议父路由不配 component(叶子经 vue-router 原生渲染到 AppBody 出口);如需与子路由共享父视图,请改用 teleport 方案。`;
12
+ if (onParentComponent === "error") {
13
+ throw new Error(message);
14
+ }
15
+ console.warn(message);
16
+ }
17
+ if (!hasComponent && hasChildren && !node.redirect) {
18
+ const first = node.children[0];
19
+ node.redirect = (to) => first.name ? { name: first.name } : { path: joinPath(to.path, first.path) };
20
+ }
21
+ return node;
22
+ });
23
+ const withGroupRedirect = (routes, options) => buildGroupRoutes(routes, (options == null ? void 0 : options.onParentComponent) ?? "warn");
24
+ export {
25
+ withGroupRedirect
26
+ };
@@ -0,0 +1,36 @@
1
+ import { checkLogin } from "./login.mjs";
2
+ import { checkPermission } from "./permission.mjs";
3
+ const createGuard = (router, options) => {
4
+ const { bridge, useRoutePermission } = options;
5
+ router.beforeEach(async (to, _from, next) => {
6
+ const store = useRoutePermission();
7
+ const loginPass = await checkLogin(to, store);
8
+ if (!loginPass) {
9
+ return next({
10
+ path: bridge.APP_ROUTER_PATHS_CONFIG.loginPath,
11
+ query: {
12
+ from: encodeURIComponent(to.fullPath)
13
+ }
14
+ });
15
+ }
16
+ const permissionPass = await checkPermission(to, store);
17
+ if (!permissionPass) {
18
+ return next({
19
+ path: bridge.APP_ROUTER_PATHS_CONFIG.noPermissionPath,
20
+ query: {
21
+ target: encodeURIComponent(to.fullPath)
22
+ }
23
+ });
24
+ }
25
+ next();
26
+ });
27
+ router.beforeResolve((to) => {
28
+ const meta = to.meta;
29
+ document.title = meta.title;
30
+ });
31
+ };
32
+ export {
33
+ checkLogin,
34
+ checkPermission,
35
+ createGuard
36
+ };
@@ -0,0 +1,6 @@
1
+ const checkLogin = async (to, store) => {
2
+ return !store.checkNeedGoToLoginPage(to);
3
+ };
4
+ export {
5
+ checkLogin
6
+ };
@@ -0,0 +1,6 @@
1
+ const checkPermission = async (to, store) => {
2
+ return !store.checkNeedGoToAuthPage(to);
3
+ };
4
+ export {
5
+ checkPermission
6
+ };
@@ -0,0 +1,10 @@
1
+ import { createGuard } from "./guard/index.mjs";
2
+ import { withGroupRedirect } from "./group-redirect.mjs";
3
+ import { checkLogin } from "./guard/login.mjs";
4
+ import { checkPermission } from "./guard/permission.mjs";
5
+ export {
6
+ checkLogin,
7
+ checkPermission,
8
+ createGuard,
9
+ withGroupRedirect
10
+ };