light-chaser-pro 1.0.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 (730) hide show
  1. package/.trae/.ignore +1 -0
  2. package/LICENSE +21 -0
  3. package/README.md +99 -0
  4. package/UI_DESIGN_SPEC.md +130 -0
  5. package/deploy.bat +98 -0
  6. package/doc//344/277/256/345/244/215/347/224/273/345/270/203/350/207/252/351/200/202/345/272/224bug/350/203/214/345/220/216/347/232/204/347/220/206/350/256/272/347/237/245/350/257/206.md +291 -0
  7. package/light-chaser-app/.dockerignore +6 -0
  8. package/light-chaser-app/.eslintrc.cjs +19 -0
  9. package/light-chaser-app/Dockerfile +40 -0
  10. package/light-chaser-app/command.md +23 -0
  11. package/light-chaser-app/index.html +30 -0
  12. package/light-chaser-app/nginx.conf +31 -0
  13. package/light-chaser-app/package.json +74 -0
  14. package/light-chaser-app/public/favicon.ico +0 -0
  15. package/light-chaser-app/release.html +38 -0
  16. package/light-chaser-app/src/api/ReponseHandler.ts +49 -0
  17. package/light-chaser-app/src/api/RoleApi.ts +28 -0
  18. package/light-chaser-app/src/api/engineering/AbstractApi.ts +75 -0
  19. package/light-chaser-app/src/api/engineering/ApiManager.ts +26 -0
  20. package/light-chaser-app/src/api/engineering/BaseApi.ts +131 -0
  21. package/light-chaser-app/src/api/engineering/PureShowApi.ts +28 -0
  22. package/light-chaser-app/src/comps/antd/area-base/AntdBaseAreaConfig.tsx +269 -0
  23. package/light-chaser-app/src/comps/antd/area-base/AntdBaseAreaDefinition.ts +232 -0
  24. package/light-chaser-app/src/comps/antd/area-base/base-area.png +0 -0
  25. package/light-chaser-app/src/comps/antd/area-percent/AntdPercentAreaDefinition.ts +241 -0
  26. package/light-chaser-app/src/comps/antd/area-percent/percent-area.png +0 -0
  27. package/light-chaser-app/src/comps/antd/area-stack/AntdStackAreaDefinition.ts +212 -0
  28. package/light-chaser-app/src/comps/antd/area-stack/stack-area.png +0 -0
  29. package/light-chaser-app/src/comps/antd/bar-base/AntdBaseBarDefinition.ts +134 -0
  30. package/light-chaser-app/src/comps/antd/bar-base/base-bar.png +0 -0
  31. package/light-chaser-app/src/comps/antd/bar-group/AntdGroupBarDefinition.ts +160 -0
  32. package/light-chaser-app/src/comps/antd/bar-group/group-bar.png +0 -0
  33. package/light-chaser-app/src/comps/antd/bar-percent/AntdPercentBarController.ts +21 -0
  34. package/light-chaser-app/src/comps/antd/bar-percent/AntdPercentBarDefinition.ts +167 -0
  35. package/light-chaser-app/src/comps/antd/bar-percent/percent-bar.png +0 -0
  36. package/light-chaser-app/src/comps/antd/bar-range/AntdRangeBarDefinition.ts +180 -0
  37. package/light-chaser-app/src/comps/antd/bar-range/range-bar.png +0 -0
  38. package/light-chaser-app/src/comps/antd/bar-stack/AntdStackBarDefinition.ts +144 -0
  39. package/light-chaser-app/src/comps/antd/bar-stack/stack-bar.png +0 -0
  40. package/light-chaser-app/src/comps/antd/column-base/AntdBaseColumnDefinition.ts +144 -0
  41. package/light-chaser-app/src/comps/antd/column-base/base-column.png +0 -0
  42. package/light-chaser-app/src/comps/antd/column-group/AntdGroupColumnDefinition.ts +154 -0
  43. package/light-chaser-app/src/comps/antd/column-group/group-column.png +0 -0
  44. package/light-chaser-app/src/comps/antd/column-percent/AntdPercentColumnDefinition.ts +168 -0
  45. package/light-chaser-app/src/comps/antd/column-percent/percent-column.png +0 -0
  46. package/light-chaser-app/src/comps/antd/column-range/AntdRangeColumnDefinition.ts +178 -0
  47. package/light-chaser-app/src/comps/antd/column-range/range-column.png +0 -0
  48. package/light-chaser-app/src/comps/antd/column-stack/AntdStackColumnDefinition.ts +152 -0
  49. package/light-chaser-app/src/comps/antd/column-stack/stack-column.png +0 -0
  50. package/light-chaser-app/src/comps/antd/g2plot-custom/G2PlotCustomConfig.tsx +80 -0
  51. package/light-chaser-app/src/comps/antd/g2plot-custom/G2PlotCustomController.ts +83 -0
  52. package/light-chaser-app/src/comps/antd/g2plot-custom/G2PlotCustomDefinition.ts +160 -0
  53. package/light-chaser-app/src/comps/antd/g2plot-custom/g2-plot-custom.png +0 -0
  54. package/light-chaser-app/src/comps/antd/gauge/AntdGaugeConfig.tsx +423 -0
  55. package/light-chaser-app/src/comps/antd/gauge/AntdGaugeController.ts +110 -0
  56. package/light-chaser-app/src/comps/antd/gauge/AntdGaugeDefinition.ts +162 -0
  57. package/light-chaser-app/src/comps/antd/gauge/gauge.png +0 -0
  58. package/light-chaser-app/src/comps/antd/line-base/AntdBaseLineDefinition.ts +147 -0
  59. package/light-chaser-app/src/comps/antd/line-base/base-line.png +0 -0
  60. package/light-chaser-app/src/comps/antd/line-multi/AntdMultiLineConfig.tsx +241 -0
  61. package/light-chaser-app/src/comps/antd/line-multi/AntdMultiLineDefinition.ts +244 -0
  62. package/light-chaser-app/src/comps/antd/line-multi/multi-line.png +0 -0
  63. package/light-chaser-app/src/comps/antd/line-step/AntdStepLineDefinition.ts +171 -0
  64. package/light-chaser-app/src/comps/antd/line-step/step-line.png +0 -0
  65. package/light-chaser-app/src/comps/antd/liquid/AntdLiquidConfig.tsx +338 -0
  66. package/light-chaser-app/src/comps/antd/liquid/AntdLiquidController.ts +106 -0
  67. package/light-chaser-app/src/comps/antd/liquid/AntdLiquidDefinition.ts +152 -0
  68. package/light-chaser-app/src/comps/antd/liquid/liquid.png +0 -0
  69. package/light-chaser-app/src/comps/antd/pie/AntdPieController.ts +74 -0
  70. package/light-chaser-app/src/comps/antd/pie/AntdPieDefinition.ts +165 -0
  71. package/light-chaser-app/src/comps/antd/pie/AntdPieStyleConfig.tsx +528 -0
  72. package/light-chaser-app/src/comps/antd/pie/pie.png +0 -0
  73. package/light-chaser-app/src/comps/antd/radar/AntdRadarController.ts +110 -0
  74. package/light-chaser-app/src/comps/antd/radar/AntdRadarDefinition.ts +187 -0
  75. package/light-chaser-app/src/comps/antd/radar/AntdRadarStyleConfig.tsx +270 -0
  76. package/light-chaser-app/src/comps/antd/radar/radar.png +0 -0
  77. package/light-chaser-app/src/comps/antd/radial-bar-base/AntdBaseRadialBarController.ts +79 -0
  78. package/light-chaser-app/src/comps/antd/radial-bar-base/AntdBaseRadialBarDefinition.ts +124 -0
  79. package/light-chaser-app/src/comps/antd/radial-bar-base/AntdBaseRadialBarStyleConfig.tsx +275 -0
  80. package/light-chaser-app/src/comps/antd/radial-bar-base/base-radial-bar.png +0 -0
  81. package/light-chaser-app/src/comps/antd/ring-progress/AntdRingProgressConfig.tsx +334 -0
  82. package/light-chaser-app/src/comps/antd/ring-progress/AntdRingProgressController.ts +85 -0
  83. package/light-chaser-app/src/comps/antd/ring-progress/AntdRingProgressDefinition.ts +138 -0
  84. package/light-chaser-app/src/comps/antd/ring-progress/ring-progress.png +0 -0
  85. package/light-chaser-app/src/comps/antd/rose-base/AntdBaseRoseDefinition.ts +102 -0
  86. package/light-chaser-app/src/comps/antd/rose-base/base-rose.png +0 -0
  87. package/light-chaser-app/src/comps/antd/rose-group/AntdGroupRoseDefinition.ts +127 -0
  88. package/light-chaser-app/src/comps/antd/rose-group/group-rose.png +0 -0
  89. package/light-chaser-app/src/comps/antd/rose-stack/AntdStackRoseDefinition.ts +142 -0
  90. package/light-chaser-app/src/comps/antd/rose-stack/stack-rose.png +0 -0
  91. package/light-chaser-app/src/comps/antd/scatter-bubble/AntdScatterBubbleDefinition.ts +192 -0
  92. package/light-chaser-app/src/comps/antd/scatter-bubble/scatter-bubble.png +0 -0
  93. package/light-chaser-app/src/comps/antd/scatter-point/AntdScatterPointDefinition.ts +143 -0
  94. package/light-chaser-app/src/comps/antd/scatter-point/scatter-point.png +0 -0
  95. package/light-chaser-app/src/comps/antd/word-cloud/AntdWordCloudConfig.tsx +167 -0
  96. package/light-chaser-app/src/comps/antd/word-cloud/AntdWordCloudController.ts +75 -0
  97. package/light-chaser-app/src/comps/antd/word-cloud/AntdWordCloudDefinition.ts +198 -0
  98. package/light-chaser-app/src/comps/antd/word-cloud/word-cloud.png +0 -0
  99. package/light-chaser-app/src/comps/antd-common/AntdBaseDesignerController.ts +96 -0
  100. package/light-chaser-app/src/comps/antd-common/AntdCommonDefinition.ts +51 -0
  101. package/light-chaser-app/src/comps/antd-common/AntdCommonUtil.ts +27 -0
  102. package/light-chaser-app/src/comps/antd-common/area/AbstractAreaDefinition.ts +53 -0
  103. package/light-chaser-app/src/comps/antd-common/area/AntdAreaCommonConfig.tsx +276 -0
  104. package/light-chaser-app/src/comps/antd-common/area/AntdCommonAreaController.ts +108 -0
  105. package/light-chaser-app/src/comps/antd-common/bar/AbstractBarDefinition.ts +52 -0
  106. package/light-chaser-app/src/comps/antd-common/bar/AntdBarCommonConfig.tsx +177 -0
  107. package/light-chaser-app/src/comps/antd-common/bar/AntdCommonBarController.ts +98 -0
  108. package/light-chaser-app/src/comps/antd-common/column/AbstractColumnDefinition.ts +51 -0
  109. package/light-chaser-app/src/comps/antd-common/column/AntdColumnCommonConfig.tsx +185 -0
  110. package/light-chaser-app/src/comps/antd-common/column/AntdCommonColumnController.ts +99 -0
  111. package/light-chaser-app/src/comps/antd-common/config/AntdFragment.tsx +40 -0
  112. package/light-chaser-app/src/comps/antd-common/config/axis/AxisConfig.tsx +555 -0
  113. package/light-chaser-app/src/comps/antd-common/config/legend/AntdLegend.tsx +279 -0
  114. package/light-chaser-app/src/comps/antd-common/config/legend/Legend.less +68 -0
  115. package/light-chaser-app/src/comps/antd-common/config/tooltip/G2Tooltip.tsx +62 -0
  116. package/light-chaser-app/src/comps/antd-common/line/AbstractLineDefinition.ts +53 -0
  117. package/light-chaser-app/src/comps/antd-common/line/AntdCommonLineController.ts +109 -0
  118. package/light-chaser-app/src/comps/antd-common/line/AntdLineCommonConfig.tsx +229 -0
  119. package/light-chaser-app/src/comps/antd-common/rose/AbstractRoseDefinition.ts +52 -0
  120. package/light-chaser-app/src/comps/antd-common/rose/AntdCommonRoseController.ts +67 -0
  121. package/light-chaser-app/src/comps/antd-common/rose/AntdRoseCommonConfig.tsx +279 -0
  122. package/light-chaser-app/src/comps/antd-common/scatter/AbstractScatterDefinition.ts +51 -0
  123. package/light-chaser-app/src/comps/antd-common/scatter/AntdCommonScatterController.ts +96 -0
  124. package/light-chaser-app/src/comps/antd-common/scatter/AntdScatterCommonConfig.tsx +210 -0
  125. package/light-chaser-app/src/comps/antd-common/types.ts +82 -0
  126. package/light-chaser-app/src/comps/antd-common/util/G2ColorUtil.ts +129 -0
  127. package/light-chaser-app/src/comps/common-component/animation-config/AnimationConfig.less +23 -0
  128. package/light-chaser-app/src/comps/common-component/animation-config/AnimationConfig.tsx +26 -0
  129. package/light-chaser-app/src/comps/common-component/base-info/BaseInfo.tsx +238 -0
  130. package/light-chaser-app/src/comps/common-component/base-info/BaseInfoStore.ts +36 -0
  131. package/light-chaser-app/src/comps/common-component/config-code/ConfigCode.tsx +62 -0
  132. package/light-chaser-app/src/comps/common-component/data-config/DataConfig.tsx +130 -0
  133. package/light-chaser-app/src/comps/common-component/data-source-config/ApiDataConfig.tsx +285 -0
  134. package/light-chaser-app/src/comps/common-component/data-source-config/CommonApiConfig.tsx +210 -0
  135. package/light-chaser-app/src/comps/common-component/data-source-config/DataSourceConfig.less +19 -0
  136. package/light-chaser-app/src/comps/common-component/data-source-config/DataSourceConfig.tsx +151 -0
  137. package/light-chaser-app/src/comps/common-component/data-source-config/DatabaseConfig.tsx +241 -0
  138. package/light-chaser-app/src/comps/common-component/data-source-config/GlobalVariableConfig.tsx +178 -0
  139. package/light-chaser-app/src/comps/common-component/data-source-config/MQTTConfig.tsx +311 -0
  140. package/light-chaser-app/src/comps/common-component/data-source-config/StaticDataConfig.tsx +156 -0
  141. package/light-chaser-app/src/comps/common-component/data-source-config/WebSocketConfig.tsx +183 -0
  142. package/light-chaser-app/src/comps/common-component/filter-config/FilterConfig.less +18 -0
  143. package/light-chaser-app/src/comps/common-component/filter-config/FilterConfig.tsx +175 -0
  144. package/light-chaser-app/src/comps/common-component/floating-modal/FloatingModal.less +116 -0
  145. package/light-chaser-app/src/comps/common-component/floating-modal/FloatingModal.tsx +166 -0
  146. package/light-chaser-app/src/comps/common-component/schema-fragment/SchemaFragment.ts +137 -0
  147. package/light-chaser-app/src/comps/common-component/theme-config/ThemeConfig.tsx +57 -0
  148. package/light-chaser-app/src/comps/common-component/theme-config/theme-editor/ThemeEditor.less +189 -0
  149. package/light-chaser-app/src/comps/common-component/theme-config/theme-editor/ThemeEditor.tsx +199 -0
  150. package/light-chaser-app/src/comps/common-component/theme-config/theme-item/ColorPreviewItem.less +16 -0
  151. package/light-chaser-app/src/comps/common-component/theme-config/theme-item/ColorPreviewItem.tsx +16 -0
  152. package/light-chaser-app/src/comps/common-component/theme-config/theme-item/ThemeItem.less +82 -0
  153. package/light-chaser-app/src/comps/common-component/theme-config/theme-item/ThemeItem.tsx +66 -0
  154. package/light-chaser-app/src/comps/common-component/theme-config/theme-list/ThemeList.tsx +66 -0
  155. package/light-chaser-app/src/comps/echarts/EChartsConfig.tsx +80 -0
  156. package/light-chaser-app/src/comps/echarts/EChartsController.ts +121 -0
  157. package/light-chaser-app/src/comps/echarts/EChartsCustomDataUpdateConfig.tsx +80 -0
  158. package/light-chaser-app/src/comps/echarts/EChartsDefinition.ts +186 -0
  159. package/light-chaser-app/src/comps/echarts/echarts.png +0 -0
  160. package/light-chaser-app/src/comps/group-layer/GroupLayer.tsx +90 -0
  161. package/light-chaser-app/src/comps/group-layer/GroupLayerController.ts +64 -0
  162. package/light-chaser-app/src/comps/group-layer/GroupLayerDefinition.ts +95 -0
  163. package/light-chaser-app/src/comps/lc/base-button/BaseButtonComponent.less +105 -0
  164. package/light-chaser-app/src/comps/lc/base-button/BaseButtonComponent.tsx +81 -0
  165. package/light-chaser-app/src/comps/lc/base-button/BaseButtonConfig.tsx +186 -0
  166. package/light-chaser-app/src/comps/lc/base-button/BaseButtonController.ts +75 -0
  167. package/light-chaser-app/src/comps/lc/base-button/BaseButtonDefinition.ts +112 -0
  168. package/light-chaser-app/src/comps/lc/base-button/base-button.png +0 -0
  169. package/light-chaser-app/src/comps/lc/base-color-block/BaseColorBlockComponent.tsx +65 -0
  170. package/light-chaser-app/src/comps/lc/base-color-block/BaseColorBlockConfig.tsx +97 -0
  171. package/light-chaser-app/src/comps/lc/base-color-block/BaseColorBlockController.ts +69 -0
  172. package/light-chaser-app/src/comps/lc/base-color-block/BaseColorBlockDefinition.ts +95 -0
  173. package/light-chaser-app/src/comps/lc/base-color-block/base-color-block.png +0 -0
  174. package/light-chaser-app/src/comps/lc/base-iframe/BaseIframeComponent.tsx +65 -0
  175. package/light-chaser-app/src/comps/lc/base-iframe/BaseIframeConfig.tsx +45 -0
  176. package/light-chaser-app/src/comps/lc/base-iframe/BaseIframeController.ts +57 -0
  177. package/light-chaser-app/src/comps/lc/base-iframe/BaseIframeDefinition.ts +77 -0
  178. package/light-chaser-app/src/comps/lc/base-iframe/base-iframe.png +0 -0
  179. package/light-chaser-app/src/comps/lc/base-image/BaseImageComponent.tsx +86 -0
  180. package/light-chaser-app/src/comps/lc/base-image/BaseImageConfig.tsx +100 -0
  181. package/light-chaser-app/src/comps/lc/base-image/BaseImageController.ts +72 -0
  182. package/light-chaser-app/src/comps/lc/base-image/BaseImageDefinition.ts +89 -0
  183. package/light-chaser-app/src/comps/lc/base-image/baseImage.png +0 -0
  184. package/light-chaser-app/src/comps/lc/base-input/BaseInputComponent.less +44 -0
  185. package/light-chaser-app/src/comps/lc/base-input/BaseInputComponent.tsx +92 -0
  186. package/light-chaser-app/src/comps/lc/base-input/BaseInputConfig.tsx +173 -0
  187. package/light-chaser-app/src/comps/lc/base-input/BaseInputController.ts +77 -0
  188. package/light-chaser-app/src/comps/lc/base-input/BaseInputDefinition.ts +114 -0
  189. package/light-chaser-app/src/comps/lc/base-input/base-input.png +0 -0
  190. package/light-chaser-app/src/comps/lc/base-select/BaseSelectComponent.less +17 -0
  191. package/light-chaser-app/src/comps/lc/base-select/BaseSelectComponent.tsx +91 -0
  192. package/light-chaser-app/src/comps/lc/base-select/BaseSelectConfig.tsx +182 -0
  193. package/light-chaser-app/src/comps/lc/base-select/BaseSelectController.ts +92 -0
  194. package/light-chaser-app/src/comps/lc/base-select/BaseSelectDefinition.ts +116 -0
  195. package/light-chaser-app/src/comps/lc/base-select/base-select.png +0 -0
  196. package/light-chaser-app/src/comps/lc/base-switch/BaseSwitchComponent.less +9 -0
  197. package/light-chaser-app/src/comps/lc/base-switch/BaseSwitchComponent.tsx +190 -0
  198. package/light-chaser-app/src/comps/lc/base-switch/BaseSwitchController.ts +104 -0
  199. package/light-chaser-app/src/comps/lc/base-switch/BaseSwitchDefinition.ts +134 -0
  200. package/light-chaser-app/src/comps/lc/base-switch/BaseSwitchStyleConfig.tsx +187 -0
  201. package/light-chaser-app/src/comps/lc/base-switch/base-switch.png +0 -0
  202. package/light-chaser-app/src/comps/lc/base-tab/BaseTabComponent.less +90 -0
  203. package/light-chaser-app/src/comps/lc/base-tab/BaseTabComponent.tsx +240 -0
  204. package/light-chaser-app/src/comps/lc/base-tab/BaseTabController.ts +112 -0
  205. package/light-chaser-app/src/comps/lc/base-tab/BaseTabDefinition.ts +137 -0
  206. package/light-chaser-app/src/comps/lc/base-tab/BaseTabStyleConfig.tsx +278 -0
  207. package/light-chaser-app/src/comps/lc/base-tab/tab.jpg +0 -0
  208. package/light-chaser-app/src/comps/lc/base-table/BaseTableComponent.less +55 -0
  209. package/light-chaser-app/src/comps/lc/base-table/BaseTableComponent.tsx +214 -0
  210. package/light-chaser-app/src/comps/lc/base-table/BaseTableConfig.tsx +252 -0
  211. package/light-chaser-app/src/comps/lc/base-table/BaseTableController.ts +72 -0
  212. package/light-chaser-app/src/comps/lc/base-table/BaseTableDefinition.ts +185 -0
  213. package/light-chaser-app/src/comps/lc/base-table/base-table.png +0 -0
  214. package/light-chaser-app/src/comps/lc/base-text/BaseTextComponent.less +57 -0
  215. package/light-chaser-app/src/comps/lc/base-text/BaseTextComponent.tsx +124 -0
  216. package/light-chaser-app/src/comps/lc/base-text/BaseTextConfig.tsx +255 -0
  217. package/light-chaser-app/src/comps/lc/base-text/BaseTextController.ts +79 -0
  218. package/light-chaser-app/src/comps/lc/base-text/BaseTextDefinition.ts +102 -0
  219. package/light-chaser-app/src/comps/lc/base-text/base-text.png +0 -0
  220. package/light-chaser-app/src/comps/lc/base-video/BaseVideoComponent.tsx +64 -0
  221. package/light-chaser-app/src/comps/lc/base-video/BaseVideoConfig.tsx +43 -0
  222. package/light-chaser-app/src/comps/lc/base-video/BaseVideoController.ts +68 -0
  223. package/light-chaser-app/src/comps/lc/base-video/BaseVideoDefinition.ts +86 -0
  224. package/light-chaser-app/src/comps/lc/base-video/baseVideo.png +0 -0
  225. package/light-chaser-app/src/comps/lc/carousel/CarouselComponent.less +17 -0
  226. package/light-chaser-app/src/comps/lc/carousel/CarouselComponent.tsx +80 -0
  227. package/light-chaser-app/src/comps/lc/carousel/CarouselConfig.tsx +69 -0
  228. package/light-chaser-app/src/comps/lc/carousel/CarouselController.ts +62 -0
  229. package/light-chaser-app/src/comps/lc/carousel/CarouselDefinition.ts +91 -0
  230. package/light-chaser-app/src/comps/lc/carousel/carousel.png +0 -0
  231. package/light-chaser-app/src/comps/lc/date-time/DateTimeComponent.less +16 -0
  232. package/light-chaser-app/src/comps/lc/date-time/DateTimeComponent.tsx +106 -0
  233. package/light-chaser-app/src/comps/lc/date-time/DateTimeConfig.tsx +163 -0
  234. package/light-chaser-app/src/comps/lc/date-time/DateTimeController.ts +70 -0
  235. package/light-chaser-app/src/comps/lc/date-time/DateTimeDefinition.ts +93 -0
  236. package/light-chaser-app/src/comps/lc/date-time/date-time.png +0 -0
  237. package/light-chaser-app/src/comps/lc/date-time-picker/DateTimePickerComponent.less +15 -0
  238. package/light-chaser-app/src/comps/lc/date-time-picker/DateTimePickerComponent.tsx +259 -0
  239. package/light-chaser-app/src/comps/lc/date-time-picker/DateTimePickerConfig.tsx +219 -0
  240. package/light-chaser-app/src/comps/lc/date-time-picker/DateTimePickerController.ts +114 -0
  241. package/light-chaser-app/src/comps/lc/date-time-picker/DateTimePickerDefinition.ts +170 -0
  242. package/light-chaser-app/src/comps/lc/date-time-picker/datetime-picker.jpg +0 -0
  243. package/light-chaser-app/src/comps/lc/digital-flipper/DigitalFlipperComponent.tsx +106 -0
  244. package/light-chaser-app/src/comps/lc/digital-flipper/DigitalFlipperConfig.tsx +197 -0
  245. package/light-chaser-app/src/comps/lc/digital-flipper/DigitalFlipperController.ts +76 -0
  246. package/light-chaser-app/src/comps/lc/digital-flipper/DigitalFlipperDefinition.ts +99 -0
  247. package/light-chaser-app/src/comps/lc/digital-flipper/digital-flipper.png +0 -0
  248. package/light-chaser-app/src/comps/lc/flv-player/FlvPlayerComponent.tsx +89 -0
  249. package/light-chaser-app/src/comps/lc/flv-player/FlvPlayerConfig.tsx +44 -0
  250. package/light-chaser-app/src/comps/lc/flv-player/FlvPlayerController.ts +56 -0
  251. package/light-chaser-app/src/comps/lc/flv-player/FlvPlayerDefinition.ts +89 -0
  252. package/light-chaser-app/src/comps/lc/flv-player/flv-player.png +0 -0
  253. package/light-chaser-app/src/comps/lc/four-angle-glow-border/FourAngleGloeBorder.less +64 -0
  254. package/light-chaser-app/src/comps/lc/four-angle-glow-border/FourAngleGlowBorder.tsx +64 -0
  255. package/light-chaser-app/src/comps/lc/four-angle-glow-border/FourAngleGlowBorderConfig.tsx +67 -0
  256. package/light-chaser-app/src/comps/lc/four-angle-glow-border/FourAngleGlowBorderController.ts +71 -0
  257. package/light-chaser-app/src/comps/lc/four-angle-glow-border/FourAngleGlowBorderDefinition.ts +91 -0
  258. package/light-chaser-app/src/comps/lc/four-angle-glow-border/four-angle-glow-border.png +0 -0
  259. package/light-chaser-app/src/comps/lc/hls-player/HlsPlayerComponent.tsx +90 -0
  260. package/light-chaser-app/src/comps/lc/hls-player/HlsPlayerConfig.tsx +44 -0
  261. package/light-chaser-app/src/comps/lc/hls-player/HlsPlayerController.ts +51 -0
  262. package/light-chaser-app/src/comps/lc/hls-player/HlsPlayerDefinition.ts +89 -0
  263. package/light-chaser-app/src/comps/lc/hls-player/hls-player.png +0 -0
  264. package/light-chaser-app/src/comps/lc/screen-reference/ScreenReferenceComponent.tsx +144 -0
  265. package/light-chaser-app/src/comps/lc/screen-reference/ScreenReferenceConfig.tsx +63 -0
  266. package/light-chaser-app/src/comps/lc/screen-reference/ScreenReferenceController.ts +55 -0
  267. package/light-chaser-app/src/comps/lc/screen-reference/ScreenReferenceDefinition.ts +89 -0
  268. package/light-chaser-app/src/comps/lc/screen-reference/screen-reference.png +0 -0
  269. package/light-chaser-app/src/comps/lc/text-scroller/TextScrollerComponent.less +41 -0
  270. package/light-chaser-app/src/comps/lc/text-scroller/TextScrollerComponent.tsx +82 -0
  271. package/light-chaser-app/src/comps/lc/text-scroller/TextScrollerConfig.tsx +115 -0
  272. package/light-chaser-app/src/comps/lc/text-scroller/TextScrollerController.ts +71 -0
  273. package/light-chaser-app/src/comps/lc/text-scroller/TextScrollerDefinition.ts +89 -0
  274. package/light-chaser-app/src/comps/lc/text-scroller/text-scroller.png +0 -0
  275. package/light-chaser-app/src/comps/loop-container/LoopContainer.less +26 -0
  276. package/light-chaser-app/src/comps/loop-container/LoopContainer.tsx +69 -0
  277. package/light-chaser-app/src/comps/loop-container/LoopContainerConfig.tsx +84 -0
  278. package/light-chaser-app/src/comps/loop-container/LoopContainerController.ts +115 -0
  279. package/light-chaser-app/src/comps/loop-container/LoopContainerDefinition.ts +127 -0
  280. package/light-chaser-app/src/comps/map/AMapComponent.less +27 -0
  281. package/light-chaser-app/src/comps/map/AMapComponent.tsx +79 -0
  282. package/light-chaser-app/src/comps/map/AMapConfig.tsx +103 -0
  283. package/light-chaser-app/src/comps/map/AMapController.ts +57 -0
  284. package/light-chaser-app/src/comps/map/AMapDefinition.ts +104 -0
  285. package/light-chaser-app/src/comps/map/AMapScaleObserver.ts +44 -0
  286. package/light-chaser-app/src/comps/map/MapLoader.ts +61 -0
  287. package/light-chaser-app/src/comps/map/a-map.d.ts +22 -0
  288. package/light-chaser-app/src/comps/map/a-map.png +0 -0
  289. package/light-chaser-app/src/constant/GlobalConstant.ts +17 -0
  290. package/light-chaser-app/src/designer/Designer.tsx +146 -0
  291. package/light-chaser-app/src/designer/blueprint/BPCanvas.less +24 -0
  292. package/light-chaser-app/src/designer/blueprint/BPCanvas.tsx +79 -0
  293. package/light-chaser-app/src/designer/blueprint/BluePrint.tsx +39 -0
  294. package/light-chaser-app/src/designer/blueprint/IBPTyps.ts +27 -0
  295. package/light-chaser-app/src/designer/blueprint/bp-context-menu/BpContextMenu.tsx +112 -0
  296. package/light-chaser-app/src/designer/blueprint/core/BPExecutor.ts +43 -0
  297. package/light-chaser-app/src/designer/blueprint/core/BPTask.ts +67 -0
  298. package/light-chaser-app/src/designer/blueprint/drag/BPMovable.tsx +89 -0
  299. package/light-chaser-app/src/designer/blueprint/drag/BPSelectable.tsx +75 -0
  300. package/light-chaser-app/src/designer/blueprint/footer/BPFooter.less +268 -0
  301. package/light-chaser-app/src/designer/blueprint/footer/BPFooter.tsx +172 -0
  302. package/light-chaser-app/src/designer/blueprint/header/BPHeader.less +41 -0
  303. package/light-chaser-app/src/designer/blueprint/header/BPHeader.tsx +31 -0
  304. package/light-chaser-app/src/designer/blueprint/left/BPLeft.less +262 -0
  305. package/light-chaser-app/src/designer/blueprint/left/BPLeft.tsx +245 -0
  306. package/light-chaser-app/src/designer/blueprint/left/BPLeftStore.ts +44 -0
  307. package/light-chaser-app/src/designer/blueprint/line/LineLayer.tsx +301 -0
  308. package/light-chaser-app/src/designer/blueprint/manager/BluePrintManager.ts +503 -0
  309. package/light-chaser-app/src/designer/blueprint/manager/BluePrintPageManager.ts +94 -0
  310. package/light-chaser-app/src/designer/blueprint/node/BPNode.less +154 -0
  311. package/light-chaser-app/src/designer/blueprint/node/BPNode.tsx +77 -0
  312. package/light-chaser-app/src/designer/blueprint/node/NodeLayer.tsx +43 -0
  313. package/light-chaser-app/src/designer/blueprint/node/core/AbstractBPNodeController.ts +48 -0
  314. package/light-chaser-app/src/designer/blueprint/node/core/impl/condition/BPConditionNodeController.ts +108 -0
  315. package/light-chaser-app/src/designer/blueprint/node/core/impl/condition/ConditionNodeConfig.tsx +39 -0
  316. package/light-chaser-app/src/designer/blueprint/node/core/impl/global/BPGlobalNodeController.ts +67 -0
  317. package/light-chaser-app/src/designer/blueprint/node/core/impl/global-variable/BPGlobalVariableNodeController.ts +92 -0
  318. package/light-chaser-app/src/designer/blueprint/node/core/impl/layer/BPLayerNodeController.ts +95 -0
  319. package/light-chaser-app/src/designer/blueprint/node/core/impl/logical-process/BPLogicalProcessNodeController.ts +102 -0
  320. package/light-chaser-app/src/designer/blueprint/node/core/impl/logical-process/LogicalProcessNodeConfig.tsx +39 -0
  321. package/light-chaser-app/src/designer/blueprint/node/core/impl/mqtt/BPMqttNodeController.ts +165 -0
  322. package/light-chaser-app/src/designer/blueprint/node/core/impl/mqtt/MqttNodeConfig.tsx +33 -0
  323. package/light-chaser-app/src/designer/blueprint/node/core/impl/popup-box/BPPopupBoxNodeController.ts +79 -0
  324. package/light-chaser-app/src/designer/blueprint/node/core/impl/popup-box/ModalRenderUtil.tsx +181 -0
  325. package/light-chaser-app/src/designer/blueprint/node/core/impl/popup-box/PopupBoxNodeConfig.tsx +84 -0
  326. package/light-chaser-app/src/designer/blueprint/node/core/impl/timer/BPTimerNodeController.ts +73 -0
  327. package/light-chaser-app/src/designer/blueprint/node/core/impl/timer/TimerNodeConfig.tsx +51 -0
  328. package/light-chaser-app/src/designer/blueprint/node/core/impl/visible/BPVisibleNodeController.ts +93 -0
  329. package/light-chaser-app/src/designer/blueprint/node/core/impl/visible/VisibleNodeConfig.tsx +60 -0
  330. package/light-chaser-app/src/designer/blueprint/node/core/impl/websocket/BPWebSocketNodeController.ts +129 -0
  331. package/light-chaser-app/src/designer/blueprint/node/core/impl/websocket/WebSocketNodeConfig.tsx +33 -0
  332. package/light-chaser-app/src/designer/blueprint/node/core/node-container/BPNodeContainer.less +25 -0
  333. package/light-chaser-app/src/designer/blueprint/node/core/node-container/BPNodeContainer.tsx +87 -0
  334. package/light-chaser-app/src/designer/blueprint/right/BPRight.less +181 -0
  335. package/light-chaser-app/src/designer/blueprint/right/BPRight.tsx +66 -0
  336. package/light-chaser-app/src/designer/blueprint/right/BPRightStore.ts +34 -0
  337. package/light-chaser-app/src/designer/blueprint/util/BpCanvasUtil.ts +254 -0
  338. package/light-chaser-app/src/designer/blueprint/util/EventUtil.ts +60 -0
  339. package/light-chaser-app/src/designer/canvas/DesignerCanvas.tsx +73 -0
  340. package/light-chaser-app/src/designer/canvas/DesignerDragScaleContainer.tsx +77 -0
  341. package/light-chaser-app/src/designer/canvas/DesignerRuler.tsx +164 -0
  342. package/light-chaser-app/src/designer/event/ContextMenuStore.ts +71 -0
  343. package/light-chaser-app/src/designer/footer/DesignerFooter.less +110 -0
  344. package/light-chaser-app/src/designer/footer/DesignerFooter.tsx +125 -0
  345. package/light-chaser-app/src/designer/footer/FooterStore.ts +56 -0
  346. package/light-chaser-app/src/designer/footer/auto-save/AutoSaveManager.ts +130 -0
  347. package/light-chaser-app/src/designer/footer/auto-save/EnhanceFetch.ts +41 -0
  348. package/light-chaser-app/src/designer/footer/auto-save/RestoreLocalStorage.less +80 -0
  349. package/light-chaser-app/src/designer/footer/auto-save/RestoreLocalStorage.tsx +158 -0
  350. package/light-chaser-app/src/designer/footer/cover/CoverConfig.less +131 -0
  351. package/light-chaser-app/src/designer/footer/cover/CoverConfig.tsx +113 -0
  352. package/light-chaser-app/src/designer/footer/hotkey-des/HotKeyDes.less +63 -0
  353. package/light-chaser-app/src/designer/footer/hotkey-des/HotKeyDes.tsx +111 -0
  354. package/light-chaser-app/src/designer/header/DesignerHeader.less +132 -0
  355. package/light-chaser-app/src/designer/header/DesignerHeader.tsx +172 -0
  356. package/light-chaser-app/src/designer/header/DesignerHeaderStore.ts +30 -0
  357. package/light-chaser-app/src/designer/header/items/blue-print/BluePrintHdImpl.tsx +32 -0
  358. package/light-chaser-app/src/designer/header/items/canvas/CanvasHdConfigImpl.less +180 -0
  359. package/light-chaser-app/src/designer/header/items/canvas/CanvasHdConfigImpl.tsx +128 -0
  360. package/light-chaser-app/src/designer/header/items/canvas/CanvasManager.ts +55 -0
  361. package/light-chaser-app/src/designer/header/items/global-filter/GlobalFilterConfigImpl.tsx +42 -0
  362. package/light-chaser-app/src/designer/header/items/project/ProjectHdItemImpl.less +34 -0
  363. package/light-chaser-app/src/designer/header/items/project/ProjectHdItemImpl.tsx +64 -0
  364. package/light-chaser-app/src/designer/header/items/project/ProjectManager.ts +56 -0
  365. package/light-chaser-app/src/designer/header/items/release/ReleaseHdConfigImpl.less +205 -0
  366. package/light-chaser-app/src/designer/header/items/release/ReleaseHdConfigImpl.tsx +189 -0
  367. package/light-chaser-app/src/designer/header/items/theme/ThemeHdItem.less +161 -0
  368. package/light-chaser-app/src/designer/header/items/theme/ThemeHdItemImpl.tsx +76 -0
  369. package/light-chaser-app/src/designer/header/items/theme/ThemeManager.ts +81 -0
  370. package/light-chaser-app/src/designer/left/DesignerLeft.less +15 -0
  371. package/light-chaser-app/src/designer/left/DesignerLeft.tsx +55 -0
  372. package/light-chaser-app/src/designer/left/DesignerLeftStore.ts +40 -0
  373. package/light-chaser-app/src/designer/left/compoent-lib/ComponentCategorize.ts +135 -0
  374. package/light-chaser-app/src/designer/left/compoent-lib/ComponentList.less +129 -0
  375. package/light-chaser-app/src/designer/left/compoent-lib/ComponentList.tsx +89 -0
  376. package/light-chaser-app/src/designer/left/compoent-lib/ComponentListStore.ts +64 -0
  377. package/light-chaser-app/src/designer/left/compoent-lib/list/CompList.less +112 -0
  378. package/light-chaser-app/src/designer/left/compoent-lib/list/CompList.tsx +155 -0
  379. package/light-chaser-app/src/designer/left/designer-left-menus/LeftMenus.less +63 -0
  380. package/light-chaser-app/src/designer/left/designer-left-menus/LeftMenus.tsx +87 -0
  381. package/light-chaser-app/src/designer/left/filter-lilst/AddFilterDialog.tsx +76 -0
  382. package/light-chaser-app/src/designer/left/filter-lilst/FilterList.less +105 -0
  383. package/light-chaser-app/src/designer/left/filter-lilst/FilterList.tsx +65 -0
  384. package/light-chaser-app/src/designer/left/global-variable/GlobalVariable.less +231 -0
  385. package/light-chaser-app/src/designer/left/global-variable/GlobalVariable.ts +151 -0
  386. package/light-chaser-app/src/designer/left/global-variable/GlobalVariableEditPanel.tsx +79 -0
  387. package/light-chaser-app/src/designer/left/global-variable/GlobalVariableList.tsx +89 -0
  388. package/light-chaser-app/src/designer/left/global-variable/parse/ComponentDataGvParser.ts +298 -0
  389. package/light-chaser-app/src/designer/left/layer-list/CanvasRender.ts +69 -0
  390. package/light-chaser-app/src/designer/left/layer-list/DesignerRender.ts +70 -0
  391. package/light-chaser-app/src/designer/left/layer-list/LayerList.less +371 -0
  392. package/light-chaser-app/src/designer/left/layer-list/LayerList.tsx +129 -0
  393. package/light-chaser-app/src/designer/left/layer-list/LayerListStore.ts +197 -0
  394. package/light-chaser-app/src/designer/left/layer-list/LayerRender.ts +67 -0
  395. package/light-chaser-app/src/designer/left/layer-list/item/BaseLayer.tsx +125 -0
  396. package/light-chaser-app/src/designer/left/layer-list/item/LayerGroupItem.tsx +61 -0
  397. package/light-chaser-app/src/designer/left/layer-list/item/LayerItem.tsx +48 -0
  398. package/light-chaser-app/src/designer/left/layer-list/search-layer/SearchLayer.less +121 -0
  399. package/light-chaser-app/src/designer/left/layer-list/search-layer/SearchLayer.tsx +82 -0
  400. package/light-chaser-app/src/designer/left/layer-list/util/LayerUtil.ts +370 -0
  401. package/light-chaser-app/src/designer/left/source-list/SourceList.less +99 -0
  402. package/light-chaser-app/src/designer/left/source-list/SourceList.tsx +50 -0
  403. package/light-chaser-app/src/designer/left/source-list/image-source/ImageSource.less +139 -0
  404. package/light-chaser-app/src/designer/left/source-list/image-source/ImageSource.tsx +155 -0
  405. package/light-chaser-app/src/designer/left/sub-project/SubProject.less +200 -0
  406. package/light-chaser-app/src/designer/left/sub-project/SubProject.tsx +231 -0
  407. package/light-chaser-app/src/designer/left/template-lib/TemplateLib.less +226 -0
  408. package/light-chaser-app/src/designer/left/template-lib/TemplateLib.tsx +165 -0
  409. package/light-chaser-app/src/designer/loader/DesignerLoader.ts +334 -0
  410. package/light-chaser-app/src/designer/loader/EditDesignerLoader.ts +75 -0
  411. package/light-chaser-app/src/designer/loader/PureReleaseDesignerLoader.ts +123 -0
  412. package/light-chaser-app/src/designer/loader/ReleaseDesignerLoader.ts +129 -0
  413. package/light-chaser-app/src/designer/loader/ViewDesignerLoader.ts +57 -0
  414. package/light-chaser-app/src/designer/manager/DesignerManager.ts +96 -0
  415. package/light-chaser-app/src/designer/manager/FilterManager.ts +69 -0
  416. package/light-chaser-app/src/designer/manager/GlobalFilterManger.ts +69 -0
  417. package/light-chaser-app/src/designer/manager/GlobalVariableManager.ts +148 -0
  418. package/light-chaser-app/src/designer/manager/LayerManager.ts +170 -0
  419. package/light-chaser-app/src/designer/manager/ManagerStore.ts +93 -0
  420. package/light-chaser-app/src/designer/manager/core/AbstractManager.ts +18 -0
  421. package/light-chaser-app/src/designer/operate-provider/EventOperateStore.ts +150 -0
  422. package/light-chaser-app/src/designer/operate-provider/canvas-context-menu/CanvasContextMenu.tsx +204 -0
  423. package/light-chaser-app/src/designer/operate-provider/hot-key/HotKey.tsx +51 -0
  424. package/light-chaser-app/src/designer/operate-provider/hot-key/HotKeyConfig.ts +226 -0
  425. package/light-chaser-app/src/designer/operate-provider/hot-key/HotKeyImpl.ts +871 -0
  426. package/light-chaser-app/src/designer/operate-provider/hot-key/HotKeyType.ts +29 -0
  427. package/light-chaser-app/src/designer/operate-provider/movable/DesignerMovable.less +19 -0
  428. package/light-chaser-app/src/designer/operate-provider/movable/DesignerMovable.tsx +461 -0
  429. package/light-chaser-app/src/designer/operate-provider/movable/DesignerSelectable.tsx +123 -0
  430. package/light-chaser-app/src/designer/operate-provider/scale/ScaleCore.ts +43 -0
  431. package/light-chaser-app/src/designer/operate-provider/undo-redo/HistoryOperator.ts +37 -0
  432. package/light-chaser-app/src/designer/operate-provider/undo-redo/HistoryQueue.ts +170 -0
  433. package/light-chaser-app/src/designer/operate-provider/undo-redo/HistoryRecordOperateProxy.ts +1740 -0
  434. package/light-chaser-app/src/designer/operate-provider/undo-redo/OperateType.ts +183 -0
  435. package/light-chaser-app/src/designer/operate-provider/undo-redo/core/AbstractRollback.ts +27 -0
  436. package/light-chaser-app/src/designer/operate-provider/undo-redo/core/AddRollbackImpl.ts +89 -0
  437. package/light-chaser-app/src/designer/operate-provider/undo-redo/core/DelRollbackImpl.ts +99 -0
  438. package/light-chaser-app/src/designer/operate-provider/undo-redo/core/DragRollbackImpl.ts +59 -0
  439. package/light-chaser-app/src/designer/operate-provider/undo-redo/core/HideRollbackImpl.ts +61 -0
  440. package/light-chaser-app/src/designer/operate-provider/undo-redo/core/LockRollbackImpl.ts +57 -0
  441. package/light-chaser-app/src/designer/operate-provider/undo-redo/core/OrderRollbackImpl.ts +34 -0
  442. package/light-chaser-app/src/designer/operate-provider/undo-redo/core/ResizeRollbackImpl.ts +59 -0
  443. package/light-chaser-app/src/designer/operate-provider/undo-redo/core/RotateRollbackImpl.ts +58 -0
  444. package/light-chaser-app/src/designer/operate-provider/undo-redo/core/StyleRollbackImpl.ts +62 -0
  445. package/light-chaser-app/src/designer/operate-provider/undo-redo/core/UpdLayerGroupRollbackImpl.ts +62 -0
  446. package/light-chaser-app/src/designer/operate-provider/undo-redo/core/index.ts +37 -0
  447. package/light-chaser-app/src/designer/release/DesignerRelease.less +41 -0
  448. package/light-chaser-app/src/designer/release/DesignerRelease.tsx +91 -0
  449. package/light-chaser-app/src/designer/right/ConfigContent.tsx +186 -0
  450. package/light-chaser-app/src/designer/right/DesignerRight.less +325 -0
  451. package/light-chaser-app/src/designer/right/DesignerRight.tsx +28 -0
  452. package/light-chaser-app/src/designer/right/MenuList.tsx +70 -0
  453. package/light-chaser-app/src/designer/right/MenuType.ts +23 -0
  454. package/light-chaser-app/src/designer/right/RightStore.ts +122 -0
  455. package/light-chaser-app/src/designer/right/status-list/ComponentStatusList.tsx +73 -0
  456. package/light-chaser-app/src/designer/right/status-list/StatusListStore.ts +175 -0
  457. package/light-chaser-app/src/designer/right/util.ts +53 -0
  458. package/light-chaser-app/src/designer/store/RuntimeStore.ts +32 -0
  459. package/light-chaser-app/src/designer/style/DesignerGlobalStyle.less +75 -0
  460. package/light-chaser-app/src/designer/view/DesignerView.less +41 -0
  461. package/light-chaser-app/src/designer/view/DesignerView.tsx +61 -0
  462. package/light-chaser-app/src/framework/cache/AbstractCache.ts +38 -0
  463. package/light-chaser-app/src/framework/cache/ImageSourceCache.ts +23 -0
  464. package/light-chaser-app/src/framework/cache/LocalCoverCache.ts +29 -0
  465. package/light-chaser-app/src/framework/context-menu/ContextMenu.less +57 -0
  466. package/light-chaser-app/src/framework/context-menu/ContextMenu.tsx +76 -0
  467. package/light-chaser-app/src/framework/convert/AbstractConvert.ts +31 -0
  468. package/light-chaser-app/src/framework/core/AbstractController.ts +76 -0
  469. package/light-chaser-app/src/framework/core/AbstractDefinition.ts +77 -0
  470. package/light-chaser-app/src/framework/core/AbstractDesignerController.ts +129 -0
  471. package/light-chaser-app/src/framework/core/AbstractDesignerDefinition.ts +136 -0
  472. package/light-chaser-app/src/framework/core/AbstractScaleObserver.ts +15 -0
  473. package/light-chaser-app/src/framework/core/ComponentContainer.tsx +130 -0
  474. package/light-chaser-app/src/framework/core/ScaleAction.ts +33 -0
  475. package/light-chaser-app/src/framework/core/tools/ComponentDataUpdater.ts +260 -0
  476. package/light-chaser-app/src/framework/drag-scale/DragAddProvider.ts +45 -0
  477. package/light-chaser-app/src/framework/drag-scale/DragScaleProvider.tsx +202 -0
  478. package/light-chaser-app/src/framework/screen-fit/ScreenFit.less +25 -0
  479. package/light-chaser-app/src/framework/screen-fit/ScreenFit.tsx +177 -0
  480. package/light-chaser-app/src/global/ExportEditGlobalMember.ts +54 -0
  481. package/light-chaser-app/src/global/ExportViewGlobalMember.ts +40 -0
  482. package/light-chaser-app/src/global/GlobalConstants.ts +16 -0
  483. package/light-chaser-app/src/images/lock.svg +23 -0
  484. package/light-chaser-app/src/images/login-logo.png +0 -0
  485. package/light-chaser-app/src/images/logo.png +0 -0
  486. package/light-chaser-app/src/images/user.svg +23 -0
  487. package/light-chaser-app/src/index.less +359 -0
  488. package/light-chaser-app/src/index.tsx +47 -0
  489. package/light-chaser-app/src/pages/auth-reminder/AuthReminders.less +218 -0
  490. package/light-chaser-app/src/pages/auth-reminder/AuthReminders.tsx +174 -0
  491. package/light-chaser-app/src/pages/auth-reminder/AuthRemindersStore.ts +30 -0
  492. package/light-chaser-app/src/pages/designer/DesignerPage.tsx +18 -0
  493. package/light-chaser-app/src/pages/home/Home.less +123 -0
  494. package/light-chaser-app/src/pages/home/Home.tsx +81 -0
  495. package/light-chaser-app/src/pages/home/api-management/ApiEditPanel.tsx +79 -0
  496. package/light-chaser-app/src/pages/home/api-management/ApiManagement.module.less +234 -0
  497. package/light-chaser-app/src/pages/home/api-management/ApiManagement.tsx +152 -0
  498. package/light-chaser-app/src/pages/home/api-management/ApiManagementStore.ts +187 -0
  499. package/light-chaser-app/src/pages/home/database/DataBaseList.module.less +369 -0
  500. package/light-chaser-app/src/pages/home/database/DataBaseList.tsx +264 -0
  501. package/light-chaser-app/src/pages/home/database/DataBasePanel.less +170 -0
  502. package/light-chaser-app/src/pages/home/database/DataBasePanel.tsx +172 -0
  503. package/light-chaser-app/src/pages/home/database/DataBaseStore.ts +220 -0
  504. package/light-chaser-app/src/pages/home/dynamic-script/DynamicScriptList.module.less +305 -0
  505. package/light-chaser-app/src/pages/home/dynamic-script/DynamicScriptList.tsx +248 -0
  506. package/light-chaser-app/src/pages/home/dynamic-script/DynamicScriptManagement.tsx +19 -0
  507. package/light-chaser-app/src/pages/home/dynamic-script/DynamicScriptManagementStore.ts +192 -0
  508. package/light-chaser-app/src/pages/home/font-management/FontManagement.module.less +281 -0
  509. package/light-chaser-app/src/pages/home/font-management/FontManagement.tsx +218 -0
  510. package/light-chaser-app/src/pages/home/font-management/FontManagementStore.ts +153 -0
  511. package/light-chaser-app/src/pages/home/image/default-snapshot.jpg +0 -0
  512. package/light-chaser-app/src/pages/home/menus/HomeMenus.less +175 -0
  513. package/light-chaser-app/src/pages/home/menus/HomeMenus.tsx +148 -0
  514. package/light-chaser-app/src/pages/home/more-info/MoreInfo.module.less +154 -0
  515. package/light-chaser-app/src/pages/home/more-info/MoreInfo.tsx +71 -0
  516. package/light-chaser-app/src/pages/home/page-container/PageContainer.less +130 -0
  517. package/light-chaser-app/src/pages/home/page-container/PageContainer.tsx +41 -0
  518. package/light-chaser-app/src/pages/home/project-list/CloneProjectDialog.tsx +43 -0
  519. package/light-chaser-app/src/pages/home/project-list/DelProjectDialog.tsx +37 -0
  520. package/light-chaser-app/src/pages/home/project-list/NewProjectDialog.less +262 -0
  521. package/light-chaser-app/src/pages/home/project-list/NewProjectDialog.tsx +152 -0
  522. package/light-chaser-app/src/pages/home/project-list/ProjectItem.less +192 -0
  523. package/light-chaser-app/src/pages/home/project-list/ProjectItem.tsx +136 -0
  524. package/light-chaser-app/src/pages/home/project-list/ProjectList.less +137 -0
  525. package/light-chaser-app/src/pages/home/project-list/ProjectList.tsx +180 -0
  526. package/light-chaser-app/src/pages/home/project-management/ProjectManagement.tsx +18 -0
  527. package/light-chaser-app/src/pages/home/project-setting/ProjectSetting.less +39 -0
  528. package/light-chaser-app/src/pages/home/project-setting/ProjectSetting.tsx +39 -0
  529. package/light-chaser-app/src/pages/home/release-management/ReleaseEditPanel.tsx +62 -0
  530. package/light-chaser-app/src/pages/home/release-management/ReleaseManagement.module.less +216 -0
  531. package/light-chaser-app/src/pages/home/release-management/ReleaseManagement.tsx +213 -0
  532. package/light-chaser-app/src/pages/home/release-management/ReleaseStore.ts +138 -0
  533. package/light-chaser-app/src/pages/home/remote-component/RemoteComponentManagement.module.less +290 -0
  534. package/light-chaser-app/src/pages/home/remote-component/RemoteComponentManagement.tsx +244 -0
  535. package/light-chaser-app/src/pages/home/remote-component/RemoteComponentStore.ts +143 -0
  536. package/light-chaser-app/src/pages/home/resource-management/ResourceManagement.tsx +18 -0
  537. package/light-chaser-app/src/pages/home/server-list/ServerProjectList.tsx +21 -0
  538. package/light-chaser-app/src/pages/home/setting/Setting.module.less +298 -0
  539. package/light-chaser-app/src/pages/home/setting/Setting.tsx +123 -0
  540. package/light-chaser-app/src/pages/home/template-market/TemplateMarket.tsx +22 -0
  541. package/light-chaser-app/src/pages/home/user-info/UserInfo.less +279 -0
  542. package/light-chaser-app/src/pages/home/user-info/UserInfo.tsx +186 -0
  543. package/light-chaser-app/src/pages/home/user-management/UserManagement.module.less +211 -0
  544. package/light-chaser-app/src/pages/home/user-management/UserManagement.tsx +209 -0
  545. package/light-chaser-app/src/pages/home/user-management/UserManagementStore.ts +183 -0
  546. package/light-chaser-app/src/pages/home/user-management/UserPanel.tsx +113 -0
  547. package/light-chaser-app/src/pages/login/Login.less +282 -0
  548. package/light-chaser-app/src/pages/login/Login.tsx +77 -0
  549. package/light-chaser-app/src/pages/login/ServiceTerms.tsx +118 -0
  550. package/light-chaser-app/src/pages/login/bg.png +0 -0
  551. package/light-chaser-app/src/pages/preview/DesignerViewPage.tsx +18 -0
  552. package/light-chaser-app/src/pages/release/DesignerReleasePage.tsx +19 -0
  553. package/light-chaser-app/src/pages/result/Error.tsx +24 -0
  554. package/light-chaser-app/src/pages/result/NoAuth.tsx +24 -0
  555. package/light-chaser-app/src/pages/result/NotFound.tsx +24 -0
  556. package/light-chaser-app/src/pureRelease/home/PureHome.less +100 -0
  557. package/light-chaser-app/src/pureRelease/home/PureHome.tsx +90 -0
  558. package/light-chaser-app/src/pureRelease/index.less +335 -0
  559. package/light-chaser-app/src/pureRelease/index.tsx +59 -0
  560. package/light-chaser-app/src/pureRelease/list/PureList.less +173 -0
  561. package/light-chaser-app/src/pureRelease/list/PureList.tsx +118 -0
  562. package/light-chaser-app/src/pureRelease/release/PureRelease.less +41 -0
  563. package/light-chaser-app/src/pureRelease/release/PureRelease.tsx +53 -0
  564. package/light-chaser-app/src/router/AuthGuard.tsx +48 -0
  565. package/light-chaser-app/src/router/router.tsx +76 -0
  566. package/light-chaser-app/src/test/Demo.tsx +22 -0
  567. package/light-chaser-app/src/test/DemoMain.less +47 -0
  568. package/light-chaser-app/src/test/DemoStore.ts +51 -0
  569. package/light-chaser-app/src/test/alone-store-demo/AloneStore.ts +28 -0
  570. package/light-chaser-app/src/test/alone-store-demo/TestStoreA.tsx +28 -0
  571. package/light-chaser-app/src/test/alone-store-demo/TestStoreB.tsx +28 -0
  572. package/light-chaser-app/src/test/canvas-grid-animation/CanvasGridAnimation.tsx +59 -0
  573. package/light-chaser-app/src/test/drag-demo/LayerDemo.less +35 -0
  574. package/light-chaser-app/src/test/drag-demo/LayerDemo.tsx +53 -0
  575. package/light-chaser-app/src/test/drag-demo/LayerDemoStore.ts +33 -0
  576. package/light-chaser-app/src/test/drag-demo/MovableDemo.tsx +77 -0
  577. package/light-chaser-app/src/test/drag-demo/SelectableDemo.tsx +75 -0
  578. package/light-chaser-app/src/test/other-designer/_demo.js +99 -0
  579. package/light-chaser-app/src/test/test-json-schema/JsonSchemaDemo.tsx +120 -0
  580. package/light-chaser-app/src/theme/AntdTheme.ts +1285 -0
  581. package/light-chaser-app/src/theme/default.less +41 -0
  582. package/light-chaser-app/src/util/AuthFetchUtil.ts +37 -0
  583. package/light-chaser-app/src/util/BoundsValidatorUtil.ts +27 -0
  584. package/light-chaser-app/src/util/ControllerUtil.ts +14 -0
  585. package/light-chaser-app/src/util/CoordinateUtil.ts +105 -0
  586. package/light-chaser-app/src/util/DataUtil.ts +111 -0
  587. package/light-chaser-app/src/util/DomUtil.ts +57 -0
  588. package/light-chaser-app/src/util/EnvUtil.ts +27 -0
  589. package/light-chaser-app/src/util/FetchUtil.ts +193 -0
  590. package/light-chaser-app/src/util/HybridCryptoUtil.ts +137 -0
  591. package/light-chaser-app/src/util/LogoUtil.ts +34 -0
  592. package/light-chaser-app/src/util/ProjectUtil.ts +209 -0
  593. package/light-chaser-app/src/util/RequestAnimationFrameUtil.ts +31 -0
  594. package/light-chaser-app/src/util/TextUtil.ts +63 -0
  595. package/light-chaser-app/src/util/Tooles.ts +45 -0
  596. package/light-chaser-app/src/vite-env.d.ts +53 -0
  597. package/light-chaser-app/tsconfig.json +40 -0
  598. package/light-chaser-app/tsconfig.node.json +15 -0
  599. package/light-chaser-app/vite.base.config.ts +23 -0
  600. package/light-chaser-app/vite.build.config.ts +18 -0
  601. package/light-chaser-app/vite.dev.config.ts +43 -0
  602. package/light-chaser-app/vite.pure.release.config.ts +41 -0
  603. package/light-chaser-cli/bin/index.js +176 -0
  604. package/light-chaser-cli/config/vite.config.dev.js +24 -0
  605. package/light-chaser-cli/config/vite.config.prod.js +47 -0
  606. package/light-chaser-cli/package.json +41 -0
  607. package/light-chaser-cli/page/index.html +36 -0
  608. package/light-chaser-cli/pnpm-lock.yaml +494 -0
  609. package/light-chaser-cli/template/index.html +35 -0
  610. package/light-chaser-cli/template/package.json +38 -0
  611. package/light-chaser-cli/template/src/components/remote-button/base-button.png +0 -0
  612. package/light-chaser-cli/template/src/components/remote-button/component.module.less +105 -0
  613. package/light-chaser-cli/template/src/components/remote-button/component.tsx +82 -0
  614. package/light-chaser-cli/template/src/components/remote-button/config.tsx +179 -0
  615. package/light-chaser-cli/template/src/components/remote-button/controller.ts +108 -0
  616. package/light-chaser-cli/template/src/components/remote-button/definition.ts +125 -0
  617. package/light-chaser-cli/template/src/index.module.less +89 -0
  618. package/light-chaser-cli/template/src/index.tsx +140 -0
  619. package/light-chaser-cli/template/src/vite-env.d.ts +22 -0
  620. package/light-chaser-cli/template/tsconfig.json +39 -0
  621. package/light-chaser-cli/template/tsconfig.node.json +11 -0
  622. package/light-chaser-interface/README.md +3 -0
  623. package/light-chaser-interface/lib/AbstractController.ts +69 -0
  624. package/light-chaser-interface/lib/AbstractDefinition.ts +84 -0
  625. package/light-chaser-interface/lib/AbstractDesignerController.ts +80 -0
  626. package/light-chaser-interface/lib/AbstractDesignerDefinition.ts +71 -0
  627. package/light-chaser-interface/lib/BPExecutor.ts +28 -0
  628. package/light-chaser-interface/lib/ConfigComponents.tsx +40 -0
  629. package/light-chaser-interface/lib/main.ts +17 -0
  630. package/light-chaser-interface/package.json +46 -0
  631. package/light-chaser-interface/tsconfig-build.json +6 -0
  632. package/light-chaser-interface/tsconfig.json +40 -0
  633. package/light-chaser-interface/tsconfig.node.json +15 -0
  634. package/light-chaser-interface/vite.config.ts +22 -0
  635. package/light-chaser-types/package.json +38 -0
  636. package/light-chaser-types/tsconfig-build.json +6 -0
  637. package/light-chaser-types/tsconfig.json +41 -0
  638. package/light-chaser-types/tsconfig.node.json +12 -0
  639. package/light-chaser-types/types/BluePrintTypes.ts +85 -0
  640. package/light-chaser-types/types/CanvasTypes.ts +33 -0
  641. package/light-chaser-types/types/ComponentTypes.ts +100 -0
  642. package/light-chaser-types/types/DataSourceTypes.ts +96 -0
  643. package/light-chaser-types/types/DesignerToolsTypes.ts +18 -0
  644. package/light-chaser-types/types/DesignerTypes.ts +136 -0
  645. package/light-chaser-types/types/FilterTypes.ts +44 -0
  646. package/light-chaser-types/types/GlobalVariableTypes.ts +43 -0
  647. package/light-chaser-types/types/LayerTypes.ts +90 -0
  648. package/light-chaser-types/types/ReleaseTypes.ts +22 -0
  649. package/light-chaser-types/types/ThemeTypes.ts +34 -0
  650. package/light-chaser-types/types/main.ts +69 -0
  651. package/light-chaser-types/vite.config.ts +14 -0
  652. package/light-chaser-ui/index.html +24 -0
  653. package/light-chaser-ui/lib/accordion/Accordion.less +158 -0
  654. package/light-chaser-ui/lib/accordion/Accordion.tsx +43 -0
  655. package/light-chaser-ui/lib/accordion/IAccordionType.ts +35 -0
  656. package/light-chaser-ui/lib/accordion/SubAccordion.tsx +44 -0
  657. package/light-chaser-ui/lib/button/Button.tsx +37 -0
  658. package/light-chaser-ui/lib/card-panel/CardPanel.less +32 -0
  659. package/light-chaser-ui/lib/card-panel/CardPanel.tsx +36 -0
  660. package/light-chaser-ui/lib/checkbox/CheckBox.tsx +42 -0
  661. package/light-chaser-ui/lib/code-editor/CodeEditor.tsx +55 -0
  662. package/light-chaser-ui/lib/code-editor/FullEditor.tsx +45 -0
  663. package/light-chaser-ui/lib/code-editor/MonacoEditor.less +35 -0
  664. package/light-chaser-ui/lib/code-editor/MonacoEditor.tsx +83 -0
  665. package/light-chaser-ui/lib/color-mode/ColorMode.less +20 -0
  666. package/light-chaser-ui/lib/color-mode/ColorMode.tsx +80 -0
  667. package/light-chaser-ui/lib/color-picker/ColorPicker.less +104 -0
  668. package/light-chaser-ui/lib/color-picker/ColorPicker.tsx +315 -0
  669. package/light-chaser-ui/lib/color-picker/RecentColors.ts +46 -0
  670. package/light-chaser-ui/lib/colors-picker/ColorsPicker.less +77 -0
  671. package/light-chaser-ui/lib/colors-picker/ColorsPicker.tsx +78 -0
  672. package/light-chaser-ui/lib/control-group/ControlGroup.less +49 -0
  673. package/light-chaser-ui/lib/control-group/ControlGroup.tsx +101 -0
  674. package/light-chaser-ui/lib/frame-layout/FrameLayout.less +47 -0
  675. package/light-chaser-ui/lib/frame-layout/FrameLayout.tsx +42 -0
  676. package/light-chaser-ui/lib/grid/Grid.less +20 -0
  677. package/light-chaser-ui/lib/grid/Grid.tsx +33 -0
  678. package/light-chaser-ui/lib/group-button/GroupButton.less +52 -0
  679. package/light-chaser-ui/lib/group-button/GroupButton.tsx +54 -0
  680. package/light-chaser-ui/lib/gui/GUITheme.ts +547 -0
  681. package/light-chaser-ui/lib/gui/LCGUI.tsx +186 -0
  682. package/light-chaser-ui/lib/gui/LCGUIUtil.ts +108 -0
  683. package/light-chaser-ui/lib/imag-upload/ImageUpload.less +26 -0
  684. package/light-chaser-ui/lib/imag-upload/ImageUpload.tsx +102 -0
  685. package/light-chaser-ui/lib/input/Input.tsx +48 -0
  686. package/light-chaser-ui/lib/input/NumberInput.tsx +52 -0
  687. package/light-chaser-ui/lib/loading/Loading.less +211 -0
  688. package/light-chaser-ui/lib/loading/Loading.tsx +38 -0
  689. package/light-chaser-ui/lib/main.ts +71 -0
  690. package/light-chaser-ui/lib/message/GlobalMessage.tsx +44 -0
  691. package/light-chaser-ui/lib/message/GlobalModal.tsx +44 -0
  692. package/light-chaser-ui/lib/radio/Radio.tsx +53 -0
  693. package/light-chaser-ui/lib/searchable-select/SearchableSelect.tsx +239 -0
  694. package/light-chaser-ui/lib/select/Select.tsx +89 -0
  695. package/light-chaser-ui/lib/slider/Slider.tsx +51 -0
  696. package/light-chaser-ui/lib/switch/Switch.tsx +42 -0
  697. package/light-chaser-ui/lib/text-area/TextArea.tsx +49 -0
  698. package/light-chaser-ui/lib/text-only/TextOnly.tsx +25 -0
  699. package/light-chaser-ui/lib/types.ts +257 -0
  700. package/light-chaser-ui/lib/ui-container/UIContainer.less +44 -0
  701. package/light-chaser-ui/lib/ui-container/UIContainer.tsx +40 -0
  702. package/light-chaser-ui/lib/ui-map.ts +59 -0
  703. package/light-chaser-ui/package.json +57 -0
  704. package/light-chaser-ui/public/favicon.ico +0 -0
  705. package/light-chaser-ui/src/test.tsx +24 -0
  706. package/light-chaser-ui/tsconfig-build.json +6 -0
  707. package/light-chaser-ui/tsconfig.json +42 -0
  708. package/light-chaser-ui/tsconfig.node.json +12 -0
  709. package/light-chaser-ui/vite.config.ts +25 -0
  710. package/light-chaser-util/lib/AuthTools.ts +75 -0
  711. package/light-chaser-util/lib/Base64Util.ts +31 -0
  712. package/light-chaser-util/lib/ColorUtil.ts +110 -0
  713. package/light-chaser-util/lib/ComponentUtil.ts +45 -0
  714. package/light-chaser-util/lib/FileUtil.ts +49 -0
  715. package/light-chaser-util/lib/IdGenerate.ts +23 -0
  716. package/light-chaser-util/lib/ObjectUtil.ts +130 -0
  717. package/light-chaser-util/lib/SafeEvalUtil.ts +63 -0
  718. package/light-chaser-util/lib/URLUtil.ts +27 -0
  719. package/light-chaser-util/lib/main.ts +21 -0
  720. package/light-chaser-util/package.json +40 -0
  721. package/light-chaser-util/src/test.ts +12 -0
  722. package/light-chaser-util/tsconfig-build.json +6 -0
  723. package/light-chaser-util/tsconfig.json +36 -0
  724. package/light-chaser-util/vite.config.ts +18 -0
  725. package/package.json +12 -0
  726. package/pnpm-workspace.yaml +7 -0
  727. package/prompt/UI/344/274/230/345/214/226/346/217/220/347/244/272/350/257/215.md +144 -0
  728. package/prompt//347/273/204/344/273/266/345/274/200/345/217/221/346/217/220/347/244/272/350/257/215.md +1090 -0
  729. package/prompt//351/200/273/350/276/221/344/274/230/345/214/226/346/217/220/347/244/272/350/257/215.md +98 -0
  730. package/prompt//351/205/215/347/275/256/351/241/271/347/224/237/346/210/220/345/267/245/344/275/234/346/265/201.md +401 -0
@@ -0,0 +1,110 @@
1
+ /*
2
+ * Copyright © 2023-2025 puyinzhen
3
+ * All rights reserved.
4
+ *
5
+ * The copyright of this work (or idea/project/document) is owned by puyinzhen. Without explicit written permission, no part of this work may be reproduced, distributed, or modified in any form for commercial purposes.
6
+ *
7
+ * This copyright statement applies to, but is not limited to: concept descriptions, design documents, source code, images, presentation files, and any related content.
8
+ *
9
+ * For permission to use this work or any part of it, please contact 1182810784@qq.com to obtain written authorization.
10
+ */
11
+
12
+ export default class ColorUtil {
13
+
14
+ public static colorConversion(color: string) {
15
+ if (color.length >= 4 && color.length <= 9 && color[0] === '#') {
16
+ const rgba = ColorUtil.hexToRgba(color, 1);
17
+ return {hex: color, rgba: rgba};
18
+ } else if (color.includes('rgb')) {
19
+ const hex = ColorUtil.rgbaToHex(color);
20
+ return {hex: hex, rgba: color};
21
+ } else {
22
+ console.warn('color is not valid', color);
23
+ return {hex: '#000000', rgba: 'rgba(0,0,0,1)'};
24
+ }
25
+ }
26
+
27
+ public static hexToRgba(hex: string, alpha: number) {
28
+ // 去掉颜色值中的 # 符号
29
+ hex = hex.replace('#', '');
30
+ // 计算 RGB 值
31
+ const r = parseInt(hex.substring(0, 2), 16);
32
+ const g = parseInt(hex.substring(2, 4), 16);
33
+ const b = parseInt(hex.substring(4, 6), 16);
34
+ // 返回 RGBA 值
35
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
36
+ }
37
+
38
+ public static rgbaToHex(rgba: string) {
39
+ const parts = rgba.substring(rgba.indexOf('(')).split(',');
40
+ const r = parseInt(parts[0].substring(1).trim());
41
+ const g = parseInt(parts[1].trim());
42
+ const b = parseInt(parts[2].trim());
43
+ const a = parseFloat(parts[3] ? parts[3].substring(0, parts[3].length - 1).trim() : '1');
44
+
45
+ const rr = r.toString(16).length === 1 ? "0" + r.toString(16) : r.toString(16);
46
+ const gg = g.toString(16).length === 1 ? "0" + g.toString(16) : g.toString(16);
47
+ const bb = b.toString(16).length === 1 ? "0" + b.toString(16) : b.toString(16);
48
+
49
+ const aa = Math.round(a * 255).toString(16).length === 1 ? "0" + Math.round(a * 255).toString(16) : Math.round(a * 255).toString(16);
50
+ return "#" + rr + gg + bb + aa;
51
+ }
52
+
53
+ /**
54
+ * 解析线性渐变颜色值数据
55
+ * 注:本解析函数仅适用于
56
+ * linear-gradient(90deg, #b66666 0%, #10a9ea 36%, #ea1010 78%, #000 100%)
57
+ * linear-gradient(90deg, rgba(182,102,102,1) 0%, rgba(16,169,234,1) 36%, rgba(234,16,16,1) 78%, rgba(0,0,0,1) 100%)
58
+ * 这特定的两种场景,对于其他形式的线性渐变,本函数不保证完全解析
59
+ * @param gradient
60
+ */
61
+ public static parseLinerGradient(gradient: string) {
62
+ if (!gradient || gradient.indexOf('linear-gradient') === -1)
63
+ return null;
64
+ // 提取角度
65
+ const angle = gradient.match(/-?\d+deg/);
66
+ const angleValue = angle ? parseInt(angle[0]) : 0;
67
+
68
+ //截取颜色值列表
69
+ const colorStr = gradient.substring(gradient.indexOf('(') + 1, gradient.lastIndexOf(')'));
70
+ //替换角度值 "90deg,#016eb7 0%,#00000000 85%"
71
+ const gradientWithoutAngle = colorStr.replace(/\d+deg,\s*/, '');
72
+ const colorItems = gradientWithoutAngle.split(',');
73
+ const posArr: number[] = [];
74
+ const colorArr: string[] = [];
75
+ colorItems.forEach((item) => {
76
+ const radialItem = item.trim().split(/\s+/g);
77
+ const color = radialItem[0];
78
+ const pos = parseFloat(radialItem[1]);
79
+ posArr.push(pos);
80
+ colorArr.push(color);
81
+ });
82
+ return {mode: 'linear', angle: angleValue, rawValue: gradient, posArr, colorArr};
83
+ }
84
+
85
+ /**
86
+ * 解析径向渐变颜色值数据
87
+ * 注:本解析函数仅适用于
88
+ * radial-gradient(#ffffffc9 4%, #000 100%)
89
+ * radial-gradient(rgba(255,255,255,0.79) 4%, rgba(0,0,0,0.79) 100%)
90
+ * 这特定的两种场景,对于其他形式的径向渐变,本函数不保证完全解析
91
+ * @param gradient
92
+ */
93
+ public static parseRadialGradient(gradient: string) {
94
+ if (!gradient || gradient.indexOf('radial-gradient') === -1)
95
+ return null;
96
+ gradient = gradient.substring(gradient.indexOf('(') + 1, gradient.lastIndexOf(')'));
97
+ const colorItems = gradient.split(',');
98
+ const posArr: number[] = [];
99
+ const colorArr: string[] = [];
100
+ colorItems.forEach((item) => {
101
+ const radialItem = item.trim().split(/\s+/g);
102
+ const pos = parseFloat(radialItem[1]);
103
+ const color = radialItem[0];
104
+ posArr.push(pos);
105
+ colorArr.push(color);
106
+ });
107
+ return {mode: 'radial', rawValue: gradient, posArr, colorArr};
108
+ }
109
+
110
+ }
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Copyright © 2023-2025 puyinzhen
3
+ * All rights reserved.
4
+ *
5
+ * The copyright of this work (or idea/project/document) is owned by puyinzhen. Without explicit written permission, no part of this work may be reproduced, distributed, or modified in any form for commercial purposes.
6
+ *
7
+ * This copyright statement applies to, but is not limited to: concept descriptions, design documents, source code, images, presentation files, and any related content.
8
+ *
9
+ * For permission to use this work or any part of it, please contact 1182810784@qq.com to obtain written authorization.
10
+ */
11
+
12
+ import {ClassType, createElement} from "react";
13
+ import {createRoot} from "react-dom/client";
14
+
15
+ class ComponentUtil {
16
+
17
+ /**
18
+ * 创建并渲染组件
19
+ * @param container 组件容器
20
+ * @param Template 组件模板
21
+ * @param props 组件props参数
22
+ */
23
+ public static async createAndRender<I, P = any>(container: HTMLElement, Template: ClassType<P, any, any>, props?: P): Promise<I | null> {
24
+ if (!container)
25
+ throw new Error("create react node failed, container is null");
26
+ return new Promise<I | null>((resolve) => {
27
+ try {
28
+ //只有类组件与包含了forwardRef、useImperativeHandle的函数式组件才会执行ref回调
29
+ const noRef = !(Template.prototype && Template.prototype.isReactComponent)
30
+ && !(Template.$$typeof && Template.$$typeof === Symbol.for('react.forward_ref'));
31
+ if (!noRef)
32
+ props = {ref: (instance: I) => resolve(instance), ...props} as P;
33
+ createRoot(container).render(createElement(Template, {...props}));
34
+ //没有ref则直接resolve
35
+ if (noRef)
36
+ resolve(null);
37
+ } catch (e: unknown) {
38
+ console.error('create react node failed ', e)
39
+ resolve(null);
40
+ }
41
+ });
42
+ }
43
+ }
44
+
45
+ export default ComponentUtil;
@@ -0,0 +1,49 @@
1
+ /*
2
+ * Copyright © 2023-2025 puyinzhen
3
+ * All rights reserved.
4
+ *
5
+ * The copyright of this work (or idea/project/document) is owned by puyinzhen. Without explicit written permission, no part of this work may be reproduced, distributed, or modified in any form for commercial purposes.
6
+ *
7
+ * This copyright statement applies to, but is not limited to: concept descriptions, design documents, source code, images, presentation files, and any related content.
8
+ *
9
+ * For permission to use this work or any part of it, please contact 1182810784@qq.com to obtain written authorization.
10
+ */
11
+
12
+ export default class FileUtil {
13
+
14
+ public static async blobToBase64(blobUrl: string): Promise<string | boolean> {
15
+ try {
16
+ const response = await fetch(blobUrl);
17
+ if (!response.ok)
18
+ return false;
19
+ const blob = await response.blob();
20
+ return await new Promise<string>((resolve, reject) => {
21
+ const reader = new FileReader();
22
+ reader.onloadend = () => resolve(reader.result as string);
23
+ reader.onerror = () => reject("Failed to convert Blob to Base64");
24
+ reader.readAsDataURL(blob);
25
+ });
26
+ } catch (e) {
27
+ console.error(e);
28
+ return false;
29
+ }
30
+ }
31
+
32
+ public static async base64ToBlob(base64: string): Promise<string | boolean> {
33
+ return new Promise((resolve) => {
34
+ fetch(base64).then(response => {
35
+ if (response.ok)
36
+ return response.blob();
37
+ else
38
+ resolve(false);
39
+ }).then(blob => {
40
+ if (blob)
41
+ resolve(URL.createObjectURL(blob));
42
+ resolve(false);
43
+ }).catch(() => {
44
+ resolve(false);
45
+ })
46
+ })
47
+ }
48
+
49
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright © 2023-2025 puyinzhen
3
+ * All rights reserved.
4
+ *
5
+ * The copyright of this work (or idea/project/document) is owned by puyinzhen. Without explicit written permission, no part of this work may be reproduced, distributed, or modified in any form for commercial purposes.
6
+ *
7
+ * This copyright statement applies to, but is not limited to: concept descriptions, design documents, source code, images, presentation files, and any related content.
8
+ *
9
+ * For permission to use this work or any part of it, please contact 1182810784@qq.com to obtain written authorization.
10
+ */
11
+
12
+ import {customAlphabet} from "nanoid";
13
+
14
+ class IdGenerate {
15
+
16
+ public static generateId(): string {
17
+ const generateUniqueId = customAlphabet('1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 10);
18
+ return generateUniqueId();
19
+ }
20
+ }
21
+
22
+ export default IdGenerate;
23
+
@@ -0,0 +1,130 @@
1
+ /*
2
+ * Copyright © 2023-2025 puyinzhen
3
+ * All rights reserved.
4
+ *
5
+ * The copyright of this work (or idea/project/document) is owned by puyinzhen. Without explicit written permission, no part of this work may be reproduced, distributed, or modified in any form for commercial purposes.
6
+ *
7
+ * This copyright statement applies to, but is not limited to: concept descriptions, design documents, source code, images, presentation files, and any related content.
8
+ *
9
+ * For permission to use this work or any part of it, please contact 1182810784@qq.com to obtain written authorization.
10
+ */
11
+
12
+
13
+ /**
14
+ * 配置对象片段
15
+ */
16
+ export interface ConfigureObjectFragments {
17
+ [key: string]: ConfigureObjectFragments | string | number | null | undefined;
18
+ }
19
+
20
+ export default class ObjectUtil {
21
+ /**
22
+ * 合并两个对象,将newData中的属性合并到originalData中
23
+ * @param originalData
24
+ * @param newData
25
+ */
26
+ public static merge(originalData: any, newData: any): any {
27
+ if (!originalData && !newData)
28
+ return null;
29
+ if (!originalData && newData)
30
+ return newData;
31
+ if (originalData && !newData)
32
+ return originalData;
33
+ Object.keys(newData).forEach(key => {
34
+ const newValue = newData[key];
35
+ if (Object.prototype.hasOwnProperty.call(originalData, key)) {
36
+ if (Array.isArray(newValue)) {
37
+ originalData[key] = newValue;
38
+ } else if (newValue
39
+ && typeof newValue === "object"
40
+ && Object.keys(newValue).length > 0
41
+ && originalData[key]
42
+ && typeof originalData[key] === "object"
43
+ && !!originalData[key]) {
44
+ ObjectUtil.merge(originalData[key], newValue);
45
+ } else {
46
+ originalData[key] = newValue;
47
+ }
48
+ } else {
49
+ originalData[key] = newValue;
50
+ }
51
+ });
52
+ return originalData;
53
+ }
54
+
55
+ /**
56
+ * 获取原始对象中的属性值
57
+ */
58
+ public static getOriginValue(originObj: ConfigureObjectFragments, newObj: ConfigureObjectFragments): ConfigureObjectFragments {
59
+ function findAndExtract(original: ConfigureObjectFragments, updated: ConfigureObjectFragments): ConfigureObjectFragments {
60
+ const result: ConfigureObjectFragments = {};
61
+ for (const key in updated) {
62
+ if (typeof updated[key] === 'object' && !Array.isArray(updated[key]) && original[key]) {
63
+ if (original[key]) {
64
+ result[key] = findAndExtract(original[key] as ConfigureObjectFragments, updated[key] as ConfigureObjectFragments);
65
+ }
66
+ } else {
67
+ result[key] = original[key];
68
+ }
69
+ }
70
+ return result;
71
+ }
72
+
73
+ return findAndExtract(originObj, newObj);
74
+ }
75
+
76
+ /**
77
+ * 删除对象中的空值属性
78
+ * @param obj
79
+ */
80
+ public static removeEmptyKeys(obj: Record<string, any>): Record<string, any> {
81
+ //将对象中的空值属性删除
82
+ Object.keys(obj).forEach(key => {
83
+ if (obj[key] === null || obj[key] === undefined || obj[key] === "" || (typeof obj[key] === 'string' && obj[key].trim() === '')) {
84
+ delete obj[key];
85
+ }
86
+ })
87
+ return obj;
88
+ }
89
+
90
+ /**
91
+ * 将 JS 对象转换为 JS 代码字符串(可在浏览器运行,保留函数原样)
92
+ * @param obj JS对象
93
+ */
94
+ public static objToCodeStr(obj: Record<string, any>): string {
95
+ let jsonStr = JSON.stringify(obj, (key, value) => {
96
+ if (typeof value === 'function')
97
+ return value.toString();
98
+ return value;
99
+ }, 2);
100
+ jsonStr = jsonStr.replace(/(['"])([a-zA-Z_$][\w$]*)\1\s*:/g, '$2:');
101
+ //将函数字符串还原为编辑器中的函数代码格式
102
+ jsonStr = jsonStr.replace(/(["'])(function\s*\w*\s*\([^)]*\)\s*\{[\s\S]*?}|\([^)]*\)\s*=>\s*\{[\s\S]*?})(["'])/g, (_, quoteStart, fnBody: string, quoteEnd) => {
103
+ return fnBody
104
+ // 常规控制字符
105
+ .replace(/\\n/g, '\n')
106
+ .replace(/\\r/g, '\r')
107
+ .replace(/\\t/g, '\t')
108
+ .replace(/\\b/g, '\b')
109
+ .replace(/\\f/g, '\f')
110
+ .replace(/\\v/g, '\v')
111
+
112
+ // 必须先处理反斜杠(避免冲突)
113
+ .replace(/\\\\/g, '\\')
114
+
115
+ // 引号和模板字符串
116
+ .replace(/\\"/g, '"')
117
+ .replace(/\\'/g, '\'')
118
+ .replace(/\\`/g, '`')
119
+
120
+ // Unicode
121
+ .replace(/\\u([\dA-Fa-f]{4})/g, (_: any, hex: any) =>
122
+ String.fromCharCode(parseInt(hex, 16))
123
+ )
124
+ .trim();
125
+ });
126
+ return jsonStr;
127
+ }
128
+
129
+ }
130
+
@@ -0,0 +1,63 @@
1
+ /*
2
+ * Copyright © 2023-2025 puyinzhen
3
+ * All rights reserved.
4
+ *
5
+ * The copyright of this work (or idea/project/document) is owned by puyinzhen. Without explicit written permission, no part of this work may be reproduced, distributed, or modified in any form for commercial purposes.
6
+ *
7
+ * This copyright statement applies to, but is not limited to: concept descriptions, design documents, source code, images, presentation files, and any related content.
8
+ *
9
+ * For permission to use this work or any part of it, please contact 1182810784@qq.com to obtain written authorization.
10
+ */
11
+
12
+ /**
13
+ * SecureEvaluator - 安全表达式执行工具
14
+ * 支持:对象 / 函数 / 基础类型的安全执行与类型校验
15
+ */
16
+ export interface SafeEvalOptions {
17
+ /** 出错时是否返回 null(否则抛出异常) */
18
+ returnNullOnError?: boolean;
19
+ /** 允许的返回类型 */
20
+ allowTypes?: Array<'object' | 'function' | 'string' | 'number' | 'boolean'>;
21
+ }
22
+
23
+ export class SafeEvalUtil {
24
+ /**
25
+ * 安全执行表达式
26
+ * @param expression - 要执行的字符串表达式
27
+ * @param options - 可选配置项
28
+ * @returns 执行结果或 null
29
+ */
30
+ public static run<T = unknown>(expression: unknown, options: SafeEvalOptions = {}): T | null {
31
+ const {
32
+ returnNullOnError = true,
33
+ allowTypes = ['object', 'function', 'string', 'number', 'boolean'],
34
+ } = options;
35
+
36
+ try {
37
+ if (typeof expression !== 'string' || !expression.trim())
38
+ throw new Error(`表达式不能为空或非字符串, 当前值: ${expression}`);
39
+
40
+ const code = expression.trim();
41
+
42
+ // 禁止执行明显的危险关键字
43
+ const forbiddenPatterns = /(eval)/;
44
+ if (forbiddenPatterns.test(code))
45
+ throw new Error(`表达式中包含禁止的关键字, 当前值: ${code}`);
46
+
47
+ // 执行表达式(包裹括号,保证对象字面量等可正常解析)
48
+ const result = eval(`(${code})`);
49
+
50
+ // 检查结果类型
51
+ const type = typeof result;
52
+ if (!allowTypes.includes(type as any))
53
+ throw new Error(`不允许的返回类型: ${type}`);
54
+
55
+ return result as T;
56
+ } catch (err: any) {
57
+ console.error(`[SafeEvalUtil] 执行失败: ${err.message}`);
58
+ if (returnNullOnError)
59
+ return null;
60
+ throw err;
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Copyright © 2023-2025 puyinzhen
3
+ * All rights reserved.
4
+ *
5
+ * The copyright of this work (or idea/project/document) is owned by puyinzhen. Without explicit written permission, no part of this work may be reproduced, distributed, or modified in any form for commercial purposes.
6
+ *
7
+ * This copyright statement applies to, but is not limited to: concept descriptions, design documents, source code, images, presentation files, and any related content.
8
+ *
9
+ * For permission to use this work or any part of it, please contact 1182810784@qq.com to obtain written authorization.
10
+ */
11
+
12
+ export interface UrlParams {
13
+ [key: string]: string;
14
+ }
15
+
16
+ export default class URLUtil {
17
+
18
+ public static parseUrlParams(): UrlParams {
19
+ const urlParams: URLSearchParams = new URLSearchParams(window.location.search);
20
+ const params: UrlParams = {};
21
+ for (const [key, value] of urlParams) {
22
+ params[key] = value;
23
+ }
24
+ return params;
25
+ }
26
+
27
+ }
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Copyright © 2023-2025 puyinzhen
3
+ * All rights reserved.
4
+ *
5
+ * The copyright of this work (or idea/project/document) is owned by puyinzhen. Without explicit written permission, no part of this work may be reproduced, distributed, or modified in any form for commercial purposes.
6
+ *
7
+ * This copyright statement applies to, but is not limited to: concept descriptions, design documents, source code, images, presentation files, and any related content.
8
+ *
9
+ * For permission to use this work or any part of it, please contact 1182810784@qq.com to obtain written authorization.
10
+ */
11
+
12
+ export {default as AuthTools} from "./AuthTools";
13
+ export type {USER_INFO_KEY, RoleType, IUserInfo} from "./AuthTools";
14
+ export {default as Base64Util} from "./Base64Util";
15
+ export {default as ColorUtil} from "./ColorUtil";
16
+ export {default as FileUtil} from "./FileUtil";
17
+ export {default as IdGenerate} from "./IdGenerate";
18
+ export {default as ObjectUtil} from "./ObjectUtil";
19
+ export {default as URLUtil} from "./URLUtil";
20
+ export {default as ComponentUtil} from "./ComponentUtil";
21
+ export type {UrlParams} from "./URLUtil";
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "light-chaser-util",
3
+ "version": "0.0.7",
4
+ "description": "",
5
+ "main": "dist/light-chaser-util.mjs",
6
+ "types": "dist/lib/main.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "publishConfig": {
11
+ "access": "public",
12
+ "registry": "https://registry.npmjs.org/"
13
+ },
14
+ "scripts": {
15
+ "dev": "node src/test.ts",
16
+ "build": "tsc --p ./tsconfig-build.json && vite build",
17
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
18
+ "check": "npx tsc --noEmit --watch"
19
+ },
20
+ "keywords": [],
21
+ "author": "DAGU",
22
+ "license": "MIT",
23
+ "dependencies": {
24
+ "nanoid": "3"
25
+ },
26
+ "peerDependencies": {
27
+ "react": "18.2.0",
28
+ "react-dom": "18.2.0"
29
+ },
30
+ "devDependencies": {
31
+ "@types/react": "^18.2.45",
32
+ "@types/react-dom": "^18.2.18",
33
+ "vite": "^5.0.7",
34
+ "vite-plugin-dts": "4.0.0-beta.1",
35
+ "@types/node": "^20.10.4",
36
+ "typescript": "^5.0.2",
37
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
38
+ "@typescript-eslint/parser": "^6.0.0"
39
+ }
40
+ }
@@ -0,0 +1,12 @@
1
+ /*
2
+ * Copyright © 2023-2025 puyinzhen
3
+ * All rights reserved.
4
+ *
5
+ * The copyright of this work (or idea/project/document) is owned by puyinzhen. Without explicit written permission, no part of this work may be reproduced, distributed, or modified in any form for commercial purposes.
6
+ *
7
+ * This copyright statement applies to, but is not limited to: concept descriptions, design documents, source code, images, presentation files, and any related content.
8
+ *
9
+ * For permission to use this work or any part of it, please contact 1182810784@qq.com to obtain written authorization.
10
+ */
11
+
12
+ console.log('=====================> util test')
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "include": [
4
+ "lib"
5
+ ]
6
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2015",
4
+ "useDefineForClassFields": true,
5
+ "lib": [
6
+ "dom",
7
+ "dom.iterable",
8
+ "esnext"
9
+ ],
10
+ "allowJs": true,
11
+ "skipLibCheck": true,
12
+ "esModuleInterop": true,
13
+ "strict": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "module": "esnext",
16
+ "moduleResolution": "bundler",
17
+ "allowImportingTsExtensions": true,
18
+ "resolveJsonModule": true,
19
+ "isolatedModules": true,
20
+ "noUnusedLocals": true,
21
+ "noUnusedParameters": false,
22
+ "noEmitOnError": true,
23
+ "noFallthroughCasesInSwitch": true,
24
+ "allowSyntheticDefaultImports": true,
25
+ "noEmit": true,
26
+ "composite": true
27
+ },
28
+ "include": [
29
+ "src",
30
+ "lib"
31
+ ],
32
+ "exclude": [
33
+ "node_modules",
34
+ "dist"
35
+ ]
36
+ }
@@ -0,0 +1,18 @@
1
+ import {defineConfig} from 'vite'
2
+ import dts from 'vite-plugin-dts';
3
+ import * as path from "node:path";
4
+
5
+ export default defineConfig({
6
+ plugins: [dts({include: ['lib']})],
7
+ build: {
8
+ copyPublicDir: false,
9
+ lib: {
10
+ entry: path.resolve(__dirname, 'lib/main.ts'),
11
+ formats: ['es'],
12
+ fileName: 'light-chaser-util'
13
+ },
14
+ rollupOptions: {
15
+ external: ['react', 'react-dom', 'react-dom/client'],
16
+ }
17
+ }
18
+ });
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "light-chaser-pro",
3
+ "version": "1.0.0",
4
+ "description": "LIGHT CHASER 设计器Pro版",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "DAGU",
11
+ "license": "ISC"
12
+ }
@@ -0,0 +1,7 @@
1
+ packages:
2
+ - 'light-chaser-app'
3
+ - 'light-chaser-ui'
4
+ - 'light-chaser-util'
5
+ - 'light-chaser-interface'
6
+ - 'light-chaser-types'
7
+ - 'light-chaser-cli'