@cloudbase/cals 1.1.14 → 1.2.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 (372) hide show
  1. package/lib/{parser → cjs/parser}/cals/index.d.ts +1 -1
  2. package/lib/cjs/parser/cals/index.d.ts.map +1 -0
  3. package/lib/cjs/parser/cals/utils/block/helpers/get-component-namespace.d.ts.map +1 -0
  4. package/lib/cjs/parser/cals/utils/block/helpers/merge-dataset.d.ts.map +1 -0
  5. package/lib/cjs/parser/cals/utils/block/helpers/merge-listeners.d.ts.map +1 -0
  6. package/lib/cjs/parser/cals/utils/block/helpers/merge-resources.d.ts.map +1 -0
  7. package/lib/{parser → cjs/parser}/cals/utils/block/helpers/remap-component-ids.d.ts +2 -2
  8. package/lib/cjs/parser/cals/utils/block/helpers/remap-component-ids.d.ts.map +1 -0
  9. package/lib/cjs/parser/cals/utils/block/helpers/renew-id-in-code.d.ts.map +1 -0
  10. package/lib/cjs/parser/cals/utils/block/helpers/renew-id-in-expr.d.ts.map +1 -0
  11. package/lib/cjs/parser/cals/utils/block/helpers/renew-id-in-resource.d.ts.map +1 -0
  12. package/lib/cjs/parser/cals/utils/block/helpers/resolve-new-id.d.ts.map +1 -0
  13. package/lib/cjs/parser/cals/utils/block/index.d.ts.map +1 -0
  14. package/lib/cjs/parser/cals/utils/code/index.d.ts.map +1 -0
  15. package/lib/{parser → cjs/parser}/cals/utils/common.d.ts +1 -1
  16. package/lib/cjs/parser/cals/utils/common.d.ts.map +1 -0
  17. package/lib/cjs/parser/cals/utils/getUsedReference.d.ts.map +1 -0
  18. package/lib/cjs/parser/cals/utils/getUsedResources.d.ts.map +1 -0
  19. package/lib/cjs/parser/cals/utils/runtime.d.ts.map +1 -0
  20. package/lib/cjs/parser/cals/utils/spinoff/index.d.ts.map +1 -0
  21. package/lib/cjs/parser/cals/utils/style.d.ts.map +1 -0
  22. package/lib/cjs/parser/cals/utils/template.d.ts.map +1 -0
  23. package/lib/cjs/parser/cals/utils/version/common.d.ts.map +1 -0
  24. package/lib/cjs/parser/cals/utils/version/config.d.ts.map +1 -0
  25. package/lib/cjs/parser/cals/utils/version/index.d.ts.map +1 -0
  26. package/lib/cjs/parser/cals/utils/version/parses.d.ts.map +1 -0
  27. package/lib/cjs/parser/cals/utils/version/utils.d.ts.map +1 -0
  28. package/lib/cjs/parser/dependiencies/index.d.ts.map +1 -0
  29. package/lib/cjs/parser/expression/index.d.ts.map +1 -0
  30. package/lib/cjs/parser/index.d.ts.map +1 -0
  31. package/lib/cjs/parser/plugins/postcss-rpx2clac.d.ts.map +1 -0
  32. package/lib/cjs/types/basic/app.d.ts.map +1 -0
  33. package/lib/cjs/types/basic/common.d.ts.map +1 -0
  34. package/lib/cjs/types/basic/component.d.ts.map +1 -0
  35. package/lib/cjs/types/basic/datasource.d.ts.map +1 -0
  36. package/lib/cjs/types/index.d.ts.map +1 -0
  37. package/lib/{types → cjs/types}/lcds.d.ts +4 -4
  38. package/lib/cjs/types/lcds.d.ts.map +1 -0
  39. package/lib/{types → cjs/types}/platform/app.d.ts +2 -2
  40. package/lib/cjs/types/platform/app.d.ts.map +1 -0
  41. package/lib/cjs/types/platform/common.d.ts.map +1 -0
  42. package/lib/{types → cjs/types}/platform/component.d.ts +1 -1
  43. package/lib/cjs/types/platform/component.d.ts.map +1 -0
  44. package/lib/{types → cjs/types}/platform/datasource.d.ts +4 -4
  45. package/lib/cjs/types/platform/datasource.d.ts.map +1 -0
  46. package/lib/cjs/types/platform/eventFlow.d.ts.map +1 -0
  47. package/lib/cjs/types/platform/query.d.ts.map +1 -0
  48. package/lib/{types → cjs/types}/platform/theme.d.ts +4 -4
  49. package/lib/cjs/types/platform/theme.d.ts.map +1 -0
  50. package/lib/cjs/utils/CSSProperty.d.ts.map +1 -0
  51. package/lib/cjs/utils/color-generator/core.d.ts.map +1 -0
  52. package/lib/cjs/utils/color-generator/generate.d.ts.map +1 -0
  53. package/lib/cjs/utils/color-generator/utils.d.ts.map +1 -0
  54. package/lib/cjs/utils/constant.d.ts.map +1 -0
  55. package/lib/cjs/utils/dts/auto-generated.d.ts.map +1 -0
  56. package/lib/{utils → cjs/utils}/dts/build.d.ts.map +1 -1
  57. package/lib/cjs/utils/dts/index.d.ts.map +1 -0
  58. package/lib/cjs/utils/index.d.ts.map +1 -0
  59. package/lib/cjs/utils/version/common.d.ts.map +1 -0
  60. package/lib/cjs/utils/version/featureChecker.d.ts.map +1 -0
  61. package/lib/cjs/utils/version/migrations/version4.d.ts.map +1 -0
  62. package/lib/esm/parser/cals/index.d.ts +625 -0
  63. package/lib/esm/parser/cals/index.d.ts.map +1 -0
  64. package/lib/esm/parser/cals/index.js +1548 -0
  65. package/lib/esm/parser/cals/utils/block/helpers/get-component-namespace.d.ts +2 -0
  66. package/lib/esm/parser/cals/utils/block/helpers/get-component-namespace.d.ts.map +1 -0
  67. package/lib/esm/parser/cals/utils/block/helpers/get-component-namespace.js +5 -0
  68. package/lib/esm/parser/cals/utils/block/helpers/merge-dataset.d.ts +6 -0
  69. package/lib/esm/parser/cals/utils/block/helpers/merge-dataset.d.ts.map +1 -0
  70. package/lib/esm/parser/cals/utils/block/helpers/merge-dataset.js +13 -0
  71. package/lib/esm/parser/cals/utils/block/helpers/merge-listeners.d.ts +6 -0
  72. package/lib/esm/parser/cals/utils/block/helpers/merge-listeners.d.ts.map +1 -0
  73. package/lib/esm/parser/cals/utils/block/helpers/merge-listeners.js +10 -0
  74. package/lib/esm/parser/cals/utils/block/helpers/merge-resources.d.ts +6 -0
  75. package/lib/esm/parser/cals/utils/block/helpers/merge-resources.d.ts.map +1 -0
  76. package/lib/esm/parser/cals/utils/block/helpers/merge-resources.js +25 -0
  77. package/lib/esm/parser/cals/utils/block/helpers/remap-component-ids.d.ts +30 -0
  78. package/lib/esm/parser/cals/utils/block/helpers/remap-component-ids.d.ts.map +1 -0
  79. package/lib/esm/parser/cals/utils/block/helpers/remap-component-ids.js +125 -0
  80. package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-code.d.ts +7 -0
  81. package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-code.d.ts.map +1 -0
  82. package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-code.js +9 -0
  83. package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-expr.d.ts +8 -0
  84. package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-expr.d.ts.map +1 -0
  85. package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-expr.js +56 -0
  86. package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-resource.d.ts +15 -0
  87. package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-resource.d.ts.map +1 -0
  88. package/lib/esm/parser/cals/utils/block/helpers/renew-id-in-resource.js +13 -0
  89. package/lib/esm/parser/cals/utils/block/helpers/resolve-new-id.d.ts +7 -0
  90. package/lib/esm/parser/cals/utils/block/helpers/resolve-new-id.d.ts.map +1 -0
  91. package/lib/esm/parser/cals/utils/block/helpers/resolve-new-id.js +17 -0
  92. package/lib/esm/parser/cals/utils/block/index.d.ts +67 -0
  93. package/lib/esm/parser/cals/utils/block/index.d.ts.map +1 -0
  94. package/lib/esm/parser/cals/utils/block/index.js +451 -0
  95. package/lib/esm/parser/cals/utils/code/index.d.ts +36 -0
  96. package/lib/esm/parser/cals/utils/code/index.d.ts.map +1 -0
  97. package/lib/esm/parser/cals/utils/code/index.js +401 -0
  98. package/lib/esm/parser/cals/utils/common.d.ts +35 -0
  99. package/lib/esm/parser/cals/utils/common.d.ts.map +1 -0
  100. package/lib/esm/parser/cals/utils/common.js +301 -0
  101. package/lib/esm/parser/cals/utils/getUsedReference.d.ts +8 -0
  102. package/lib/esm/parser/cals/utils/getUsedReference.d.ts.map +1 -0
  103. package/lib/esm/parser/cals/utils/getUsedReference.js +54 -0
  104. package/lib/esm/parser/cals/utils/getUsedResources.d.ts +10 -0
  105. package/lib/esm/parser/cals/utils/getUsedResources.d.ts.map +1 -0
  106. package/lib/esm/parser/cals/utils/getUsedResources.js +132 -0
  107. package/lib/esm/parser/cals/utils/runtime.d.ts +14 -0
  108. package/lib/esm/parser/cals/utils/runtime.d.ts.map +1 -0
  109. package/lib/esm/parser/cals/utils/runtime.js +254 -0
  110. package/lib/esm/parser/cals/utils/spinoff/index.d.ts +10 -0
  111. package/lib/esm/parser/cals/utils/spinoff/index.d.ts.map +1 -0
  112. package/lib/esm/parser/cals/utils/spinoff/index.js +95 -0
  113. package/lib/esm/parser/cals/utils/style.d.ts +43 -0
  114. package/lib/esm/parser/cals/utils/style.d.ts.map +1 -0
  115. package/lib/esm/parser/cals/utils/style.js +463 -0
  116. package/lib/esm/parser/cals/utils/template.d.ts +6 -0
  117. package/lib/esm/parser/cals/utils/template.d.ts.map +1 -0
  118. package/lib/esm/parser/cals/utils/template.js +221 -0
  119. package/lib/esm/parser/cals/utils/version/common.d.ts +5 -0
  120. package/lib/esm/parser/cals/utils/version/common.d.ts.map +1 -0
  121. package/lib/esm/parser/cals/utils/version/common.js +375 -0
  122. package/lib/esm/parser/cals/utils/version/config.d.ts +16 -0
  123. package/lib/esm/parser/cals/utils/version/config.d.ts.map +1 -0
  124. package/lib/esm/parser/cals/utils/version/config.js +241 -0
  125. package/lib/esm/parser/cals/utils/version/index.d.ts +3 -0
  126. package/lib/esm/parser/cals/utils/version/index.d.ts.map +1 -0
  127. package/lib/esm/parser/cals/utils/version/index.js +68 -0
  128. package/lib/esm/parser/cals/utils/version/parses.d.ts +16 -0
  129. package/lib/esm/parser/cals/utils/version/parses.d.ts.map +1 -0
  130. package/lib/esm/parser/cals/utils/version/parses.js +560 -0
  131. package/lib/esm/parser/cals/utils/version/utils.d.ts +14 -0
  132. package/lib/esm/parser/cals/utils/version/utils.d.ts.map +1 -0
  133. package/lib/esm/parser/cals/utils/version/utils.js +129 -0
  134. package/lib/esm/parser/dependiencies/index.d.ts +143 -0
  135. package/lib/esm/parser/dependiencies/index.d.ts.map +1 -0
  136. package/lib/esm/parser/dependiencies/index.js +684 -0
  137. package/lib/esm/parser/expression/index.d.ts +123 -0
  138. package/lib/esm/parser/expression/index.d.ts.map +1 -0
  139. package/lib/esm/parser/expression/index.js +296 -0
  140. package/lib/esm/parser/index.d.ts +13 -0
  141. package/lib/esm/parser/index.d.ts.map +1 -0
  142. package/lib/esm/parser/index.js +12 -0
  143. package/lib/esm/parser/plugins/postcss-rpx2clac.d.ts +18 -0
  144. package/lib/esm/parser/plugins/postcss-rpx2clac.d.ts.map +1 -0
  145. package/lib/esm/parser/plugins/postcss-rpx2clac.js +67 -0
  146. package/lib/esm/types/basic/app.d.ts +76 -0
  147. package/lib/esm/types/basic/app.d.ts.map +1 -0
  148. package/lib/esm/types/basic/app.js +1 -0
  149. package/lib/esm/types/basic/common.d.ts +125 -0
  150. package/lib/esm/types/basic/common.d.ts.map +1 -0
  151. package/lib/esm/types/basic/common.js +1 -0
  152. package/lib/esm/types/basic/component.d.ts +212 -0
  153. package/lib/esm/types/basic/component.d.ts.map +1 -0
  154. package/lib/esm/types/basic/component.js +1 -0
  155. package/lib/esm/types/basic/datasource.d.ts +50 -0
  156. package/lib/esm/types/basic/datasource.d.ts.map +1 -0
  157. package/lib/esm/types/basic/datasource.js +1 -0
  158. package/lib/esm/types/index.d.ts +12 -0
  159. package/lib/esm/types/index.d.ts.map +1 -0
  160. package/lib/esm/types/index.js +14 -0
  161. package/lib/esm/types/lcds.d.ts +610 -0
  162. package/lib/esm/types/lcds.d.ts.map +1 -0
  163. package/lib/esm/types/lcds.js +22 -0
  164. package/lib/esm/types/platform/app.d.ts +276 -0
  165. package/lib/esm/types/platform/app.d.ts.map +1 -0
  166. package/lib/esm/types/platform/app.js +8 -0
  167. package/lib/esm/types/platform/common.d.ts +190 -0
  168. package/lib/esm/types/platform/common.d.ts.map +1 -0
  169. package/lib/esm/types/platform/common.js +84 -0
  170. package/lib/esm/types/platform/component.d.ts +166 -0
  171. package/lib/esm/types/platform/component.d.ts.map +1 -0
  172. package/lib/esm/types/platform/component.js +8 -0
  173. package/lib/esm/types/platform/datasource.d.ts +500 -0
  174. package/lib/esm/types/platform/datasource.d.ts.map +1 -0
  175. package/lib/esm/types/platform/datasource.js +6 -0
  176. package/lib/esm/types/platform/eventFlow.d.ts +20 -0
  177. package/lib/esm/types/platform/eventFlow.d.ts.map +1 -0
  178. package/lib/esm/types/platform/eventFlow.js +1 -0
  179. package/lib/esm/types/platform/query.d.ts +78 -0
  180. package/lib/esm/types/platform/query.d.ts.map +1 -0
  181. package/lib/esm/types/platform/query.js +12 -0
  182. package/lib/esm/types/platform/theme.d.ts +47 -0
  183. package/lib/esm/types/platform/theme.d.ts.map +1 -0
  184. package/lib/esm/types/platform/theme.js +1 -0
  185. package/lib/esm/utils/CSSProperty.d.ts +64 -0
  186. package/lib/esm/utils/CSSProperty.d.ts.map +1 -0
  187. package/lib/esm/utils/CSSProperty.js +86 -0
  188. package/lib/esm/utils/color-generator/core.d.ts +52 -0
  189. package/lib/esm/utils/color-generator/core.d.ts.map +1 -0
  190. package/lib/esm/utils/color-generator/core.js +57 -0
  191. package/lib/esm/utils/color-generator/generate.d.ts +67 -0
  192. package/lib/esm/utils/color-generator/generate.d.ts.map +1 -0
  193. package/lib/esm/utils/color-generator/generate.js +92 -0
  194. package/lib/esm/utils/color-generator/utils.d.ts +15 -0
  195. package/lib/esm/utils/color-generator/utils.d.ts.map +1 -0
  196. package/lib/esm/utils/color-generator/utils.js +30 -0
  197. package/lib/esm/utils/constant.d.ts +65 -0
  198. package/lib/esm/utils/constant.d.ts.map +1 -0
  199. package/lib/esm/utils/constant.js +69 -0
  200. package/lib/esm/utils/dts/auto-generated.d.ts +2 -0
  201. package/lib/esm/utils/dts/auto-generated.d.ts.map +1 -0
  202. package/lib/esm/utils/dts/auto-generated.js +1796 -0
  203. package/lib/esm/utils/dts/build.d.ts +2 -0
  204. package/lib/esm/utils/dts/build.d.ts.map +1 -0
  205. package/lib/esm/utils/dts/build.js +147 -0
  206. package/lib/esm/utils/dts/index.d.ts +141 -0
  207. package/lib/esm/utils/dts/index.d.ts.map +1 -0
  208. package/lib/esm/utils/dts/index.js +1071 -0
  209. package/lib/esm/utils/index.d.ts +9 -0
  210. package/lib/esm/utils/index.d.ts.map +1 -0
  211. package/lib/esm/utils/index.js +8 -0
  212. package/lib/esm/utils/version/common.d.ts +3 -0
  213. package/lib/esm/utils/version/common.d.ts.map +1 -0
  214. package/lib/esm/utils/version/common.js +22 -0
  215. package/lib/esm/utils/version/featureChecker.d.ts +5 -0
  216. package/lib/esm/utils/version/featureChecker.d.ts.map +1 -0
  217. package/lib/esm/utils/version/featureChecker.js +32 -0
  218. package/lib/esm/utils/version/migrations/version4.d.ts +3 -0
  219. package/lib/esm/utils/version/migrations/version4.d.ts.map +1 -0
  220. package/lib/esm/utils/version/migrations/version4.js +192 -0
  221. package/lib/tsconfig.tsbuildinfo +1 -0
  222. package/package.json +7 -5
  223. package/lib/parser/cals/index.d.ts.map +0 -1
  224. package/lib/parser/cals/utils/block/helpers/get-component-namespace.d.ts.map +0 -1
  225. package/lib/parser/cals/utils/block/helpers/merge-dataset.d.ts.map +0 -1
  226. package/lib/parser/cals/utils/block/helpers/merge-listeners.d.ts.map +0 -1
  227. package/lib/parser/cals/utils/block/helpers/merge-resources.d.ts.map +0 -1
  228. package/lib/parser/cals/utils/block/helpers/remap-component-ids.d.ts.map +0 -1
  229. package/lib/parser/cals/utils/block/helpers/renew-id-in-code.d.ts.map +0 -1
  230. package/lib/parser/cals/utils/block/helpers/renew-id-in-expr.d.ts.map +0 -1
  231. package/lib/parser/cals/utils/block/helpers/renew-id-in-resource.d.ts.map +0 -1
  232. package/lib/parser/cals/utils/block/helpers/resolve-new-id.d.ts.map +0 -1
  233. package/lib/parser/cals/utils/block/index.d.ts.map +0 -1
  234. package/lib/parser/cals/utils/code/index.d.ts.map +0 -1
  235. package/lib/parser/cals/utils/common.d.ts.map +0 -1
  236. package/lib/parser/cals/utils/getUsedReference.d.ts.map +0 -1
  237. package/lib/parser/cals/utils/getUsedResources.d.ts.map +0 -1
  238. package/lib/parser/cals/utils/runtime.d.ts.map +0 -1
  239. package/lib/parser/cals/utils/spinoff/index.d.ts.map +0 -1
  240. package/lib/parser/cals/utils/style.d.ts.map +0 -1
  241. package/lib/parser/cals/utils/template.d.ts.map +0 -1
  242. package/lib/parser/cals/utils/version/common.d.ts.map +0 -1
  243. package/lib/parser/cals/utils/version/config.d.ts.map +0 -1
  244. package/lib/parser/cals/utils/version/index.d.ts.map +0 -1
  245. package/lib/parser/cals/utils/version/parses.d.ts.map +0 -1
  246. package/lib/parser/cals/utils/version/utils.d.ts.map +0 -1
  247. package/lib/parser/dependiencies/index.d.ts.map +0 -1
  248. package/lib/parser/expression/index.d.ts.map +0 -1
  249. package/lib/parser/index.d.ts.map +0 -1
  250. package/lib/parser/plugins/postcss-rpx2clac.d.ts.map +0 -1
  251. package/lib/types/basic/app.d.ts.map +0 -1
  252. package/lib/types/basic/common.d.ts.map +0 -1
  253. package/lib/types/basic/component.d.ts.map +0 -1
  254. package/lib/types/basic/datasource.d.ts.map +0 -1
  255. package/lib/types/index.d.ts.map +0 -1
  256. package/lib/types/lcds.d.ts.map +0 -1
  257. package/lib/types/platform/app.d.ts.map +0 -1
  258. package/lib/types/platform/common.d.ts.map +0 -1
  259. package/lib/types/platform/component.d.ts.map +0 -1
  260. package/lib/types/platform/datasource.d.ts.map +0 -1
  261. package/lib/types/platform/eventFlow.d.ts.map +0 -1
  262. package/lib/types/platform/query.d.ts.map +0 -1
  263. package/lib/types/platform/theme.d.ts.map +0 -1
  264. package/lib/utils/CSSProperty.d.ts.map +0 -1
  265. package/lib/utils/color-generator/core.d.ts.map +0 -1
  266. package/lib/utils/color-generator/generate.d.ts.map +0 -1
  267. package/lib/utils/color-generator/utils.d.ts.map +0 -1
  268. package/lib/utils/constant.d.ts.map +0 -1
  269. package/lib/utils/dts/auto-generated.d.ts.map +0 -1
  270. package/lib/utils/dts/index.d.ts.map +0 -1
  271. package/lib/utils/index.d.ts.map +0 -1
  272. package/lib/utils/version/common.d.ts.map +0 -1
  273. package/lib/utils/version/featureChecker.d.ts.map +0 -1
  274. package/lib/utils/version/migrations/version4.d.ts.map +0 -1
  275. /package/lib/{parser → cjs/parser}/cals/index.js +0 -0
  276. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/get-component-namespace.d.ts +0 -0
  277. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/get-component-namespace.js +0 -0
  278. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-dataset.d.ts +0 -0
  279. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-dataset.js +0 -0
  280. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-listeners.d.ts +0 -0
  281. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-listeners.js +0 -0
  282. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-resources.d.ts +0 -0
  283. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/merge-resources.js +0 -0
  284. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/remap-component-ids.js +0 -0
  285. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-code.d.ts +0 -0
  286. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-code.js +0 -0
  287. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-expr.d.ts +0 -0
  288. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-expr.js +0 -0
  289. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-resource.d.ts +0 -0
  290. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/renew-id-in-resource.js +0 -0
  291. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/resolve-new-id.d.ts +0 -0
  292. /package/lib/{parser → cjs/parser}/cals/utils/block/helpers/resolve-new-id.js +0 -0
  293. /package/lib/{parser → cjs/parser}/cals/utils/block/index.d.ts +0 -0
  294. /package/lib/{parser → cjs/parser}/cals/utils/block/index.js +0 -0
  295. /package/lib/{parser → cjs/parser}/cals/utils/code/index.d.ts +0 -0
  296. /package/lib/{parser → cjs/parser}/cals/utils/code/index.js +0 -0
  297. /package/lib/{parser → cjs/parser}/cals/utils/common.js +0 -0
  298. /package/lib/{parser → cjs/parser}/cals/utils/getUsedReference.d.ts +0 -0
  299. /package/lib/{parser → cjs/parser}/cals/utils/getUsedReference.js +0 -0
  300. /package/lib/{parser → cjs/parser}/cals/utils/getUsedResources.d.ts +0 -0
  301. /package/lib/{parser → cjs/parser}/cals/utils/getUsedResources.js +0 -0
  302. /package/lib/{parser → cjs/parser}/cals/utils/runtime.d.ts +0 -0
  303. /package/lib/{parser → cjs/parser}/cals/utils/runtime.js +0 -0
  304. /package/lib/{parser → cjs/parser}/cals/utils/spinoff/index.d.ts +0 -0
  305. /package/lib/{parser → cjs/parser}/cals/utils/spinoff/index.js +0 -0
  306. /package/lib/{parser → cjs/parser}/cals/utils/style.d.ts +0 -0
  307. /package/lib/{parser → cjs/parser}/cals/utils/style.js +0 -0
  308. /package/lib/{parser → cjs/parser}/cals/utils/template.d.ts +0 -0
  309. /package/lib/{parser → cjs/parser}/cals/utils/template.js +0 -0
  310. /package/lib/{parser → cjs/parser}/cals/utils/version/common.d.ts +0 -0
  311. /package/lib/{parser → cjs/parser}/cals/utils/version/common.js +0 -0
  312. /package/lib/{parser → cjs/parser}/cals/utils/version/config.d.ts +0 -0
  313. /package/lib/{parser → cjs/parser}/cals/utils/version/config.js +0 -0
  314. /package/lib/{parser → cjs/parser}/cals/utils/version/index.d.ts +0 -0
  315. /package/lib/{parser → cjs/parser}/cals/utils/version/index.js +0 -0
  316. /package/lib/{parser → cjs/parser}/cals/utils/version/parses.d.ts +0 -0
  317. /package/lib/{parser → cjs/parser}/cals/utils/version/parses.js +0 -0
  318. /package/lib/{parser → cjs/parser}/cals/utils/version/utils.d.ts +0 -0
  319. /package/lib/{parser → cjs/parser}/cals/utils/version/utils.js +0 -0
  320. /package/lib/{parser → cjs/parser}/dependiencies/index.d.ts +0 -0
  321. /package/lib/{parser → cjs/parser}/dependiencies/index.js +0 -0
  322. /package/lib/{parser → cjs/parser}/expression/index.d.ts +0 -0
  323. /package/lib/{parser → cjs/parser}/expression/index.js +0 -0
  324. /package/lib/{parser → cjs/parser}/index.d.ts +0 -0
  325. /package/lib/{parser → cjs/parser}/index.js +0 -0
  326. /package/lib/{parser → cjs/parser}/plugins/postcss-rpx2clac.d.ts +0 -0
  327. /package/lib/{parser → cjs/parser}/plugins/postcss-rpx2clac.js +0 -0
  328. /package/lib/{types → cjs/types}/basic/app.d.ts +0 -0
  329. /package/lib/{types → cjs/types}/basic/app.js +0 -0
  330. /package/lib/{types → cjs/types}/basic/common.d.ts +0 -0
  331. /package/lib/{types → cjs/types}/basic/common.js +0 -0
  332. /package/lib/{types → cjs/types}/basic/component.d.ts +0 -0
  333. /package/lib/{types → cjs/types}/basic/component.js +0 -0
  334. /package/lib/{types → cjs/types}/basic/datasource.d.ts +0 -0
  335. /package/lib/{types → cjs/types}/basic/datasource.js +0 -0
  336. /package/lib/{types → cjs/types}/index.d.ts +0 -0
  337. /package/lib/{types → cjs/types}/index.js +0 -0
  338. /package/lib/{types → cjs/types}/lcds.js +0 -0
  339. /package/lib/{types → cjs/types}/platform/app.js +0 -0
  340. /package/lib/{types → cjs/types}/platform/common.d.ts +0 -0
  341. /package/lib/{types → cjs/types}/platform/common.js +0 -0
  342. /package/lib/{types → cjs/types}/platform/component.js +0 -0
  343. /package/lib/{types → cjs/types}/platform/datasource.js +0 -0
  344. /package/lib/{types → cjs/types}/platform/eventFlow.d.ts +0 -0
  345. /package/lib/{types → cjs/types}/platform/eventFlow.js +0 -0
  346. /package/lib/{types → cjs/types}/platform/query.d.ts +0 -0
  347. /package/lib/{types → cjs/types}/platform/query.js +0 -0
  348. /package/lib/{types → cjs/types}/platform/theme.js +0 -0
  349. /package/lib/{utils → cjs/utils}/CSSProperty.d.ts +0 -0
  350. /package/lib/{utils → cjs/utils}/CSSProperty.js +0 -0
  351. /package/lib/{utils → cjs/utils}/color-generator/core.d.ts +0 -0
  352. /package/lib/{utils → cjs/utils}/color-generator/core.js +0 -0
  353. /package/lib/{utils → cjs/utils}/color-generator/generate.d.ts +0 -0
  354. /package/lib/{utils → cjs/utils}/color-generator/generate.js +0 -0
  355. /package/lib/{utils → cjs/utils}/color-generator/utils.d.ts +0 -0
  356. /package/lib/{utils → cjs/utils}/color-generator/utils.js +0 -0
  357. /package/lib/{utils → cjs/utils}/constant.d.ts +0 -0
  358. /package/lib/{utils → cjs/utils}/constant.js +0 -0
  359. /package/lib/{utils → cjs/utils}/dts/auto-generated.d.ts +0 -0
  360. /package/lib/{utils → cjs/utils}/dts/auto-generated.js +0 -0
  361. /package/lib/{utils → cjs/utils}/dts/build.d.ts +0 -0
  362. /package/lib/{utils → cjs/utils}/dts/build.js +0 -0
  363. /package/lib/{utils → cjs/utils}/dts/index.d.ts +0 -0
  364. /package/lib/{utils → cjs/utils}/dts/index.js +0 -0
  365. /package/lib/{utils → cjs/utils}/index.d.ts +0 -0
  366. /package/lib/{utils → cjs/utils}/index.js +0 -0
  367. /package/lib/{utils → cjs/utils}/version/common.d.ts +0 -0
  368. /package/lib/{utils → cjs/utils}/version/common.js +0 -0
  369. /package/lib/{utils → cjs/utils}/version/featureChecker.d.ts +0 -0
  370. /package/lib/{utils → cjs/utils}/version/featureChecker.js +0 -0
  371. /package/lib/{utils → cjs/utils}/version/migrations/version4.d.ts +0 -0
  372. /package/lib/{utils → cjs/utils}/version/migrations/version4.js +0 -0
@@ -0,0 +1,463 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { camelcase, isEmptyObj, isPlainObject } from './common';
13
+ import _map from 'lodash/map';
14
+ import _uniq from 'lodash/uniq';
15
+ import { isUnitlessNumber } from '../../../utils';
16
+ const DISTANCE_KEY_LIST = ['top', 'right', 'bottom', 'left'];
17
+ export function removeInvalidStyleFormValue(styleForm = {}) {
18
+ return Object.keys(styleForm).reduce((result, key) => {
19
+ const propStyleFormData = styleForm[key];
20
+ if (isPlainObject(propStyleFormData)) {
21
+ setStyleValue(result, key, removeInvalidStyleFormValue(propStyleFormData));
22
+ }
23
+ else {
24
+ setStyleValue(result, key, styleForm[key]);
25
+ }
26
+ return result;
27
+ }, {});
28
+ }
29
+ function setStyleValue(object, key, value) {
30
+ if (value === undefined || value === null || value === '') {
31
+ return;
32
+ }
33
+ // 特殊样式移除
34
+ if (key === 'open') {
35
+ return;
36
+ }
37
+ if (isEmptyObj(value)) {
38
+ return;
39
+ }
40
+ if (key.startsWith('--')) {
41
+ // css 自定义属性
42
+ object[key] = value;
43
+ }
44
+ else {
45
+ object[camelcase(key)] = value;
46
+ }
47
+ }
48
+ function _handleStyleNumValue(styleVal, addPXUnit) {
49
+ if (addPXUnit) {
50
+ /**
51
+ * 2022.12.13
52
+ * 改分支未启用
53
+ */
54
+ const value = `${styleVal}`;
55
+ if (/^-?(?:\d*\.)?\d+$/.test(value)) {
56
+ return `${value}px`;
57
+ }
58
+ }
59
+ return styleVal;
60
+ }
61
+ function setDistanceStyle(style, distance, attr, addPXUnit) {
62
+ const attributeKey = camelcase(`${attr}`);
63
+ if (Object.keys(distance).length === 4) {
64
+ if (_uniq(_map(distance, (val) => val)).length === 1) {
65
+ // 4个值全相等的情况
66
+ setStyleValue(style, attributeKey, _handleStyleNumValue(distance.top, addPXUnit));
67
+ }
68
+ else if (distance.top === distance.bottom && distance.left === distance.right) {
69
+ // 俩俩相等的情况
70
+ setStyleValue(style, attributeKey, `${_handleStyleNumValue(distance.top, addPXUnit)} ${_handleStyleNumValue(distance.right, addPXUnit)}`);
71
+ }
72
+ else if (distance.left === distance.right) {
73
+ setStyleValue(style, attributeKey, `${_handleStyleNumValue(distance.top, addPXUnit)} ${_handleStyleNumValue(distance.right, addPXUnit)} ${_handleStyleNumValue(distance.bottom, addPXUnit)}`);
74
+ }
75
+ else {
76
+ setStyleValue(style, attributeKey, `${_handleStyleNumValue(distance.top, addPXUnit)} ${_handleStyleNumValue(distance.right, addPXUnit)} ${_handleStyleNumValue(distance.bottom, addPXUnit)} ${_handleStyleNumValue(distance.left, addPXUnit)}`);
77
+ }
78
+ }
79
+ else {
80
+ DISTANCE_KEY_LIST.forEach((key) => {
81
+ if (distance[key] !== undefined)
82
+ setStyleValue(style, camelcase(`${attr}_${key}`), _handleStyleNumValue(distance[key], addPXUnit));
83
+ });
84
+ }
85
+ }
86
+ function translateStyleByHandler(style = {}, handler, options) {
87
+ const { looseError = false, rpxCalcRoot } = options || {};
88
+ return Object.keys(style).reduce((result, key) => {
89
+ const value = style[key];
90
+ if (isUnitlessNumber[key]) {
91
+ setStyleValue(result, key, value);
92
+ }
93
+ else if (value !== undefined && value !== null) {
94
+ try {
95
+ setStyleValue(result, key, handler(value, rpxCalcRoot));
96
+ }
97
+ catch (e) {
98
+ if (looseError) {
99
+ console.warn('translate style error, key:value', key, value);
100
+ }
101
+ else {
102
+ throw e;
103
+ }
104
+ }
105
+ }
106
+ return result;
107
+ }, {});
108
+ }
109
+ function toREM(cssLen, rpxCalcRoot = undefined) {
110
+ if (typeof cssLen === 'string' || typeof cssLen === 'number') {
111
+ const cssLenArr = `${cssLen}`.split(' ');
112
+ return cssLenArr
113
+ .map((attr) => {
114
+ const matchResult = attr.match(/^(-?\d*\.?\d+)(r?px)?$/);
115
+ if (matchResult === null || matchResult === void 0 ? void 0 : matchResult[1]) {
116
+ const px = +matchResult[1];
117
+ if (Number.isNaN(px / 1))
118
+ return px.toString();
119
+ if (px === 0) {
120
+ return '0';
121
+ }
122
+ if ((matchResult === null || matchResult === void 0 ? void 0 : matchResult[2]) === 'rpx') {
123
+ return rpxCalcRoot ? `calc(${px}px / ${rpxCalcRoot})` : attr;
124
+ }
125
+ return `${(px / 28).toFixed(4)}rem`;
126
+ }
127
+ return attr;
128
+ })
129
+ .join(' ');
130
+ }
131
+ else {
132
+ throw new Error(`cssLen type error ${cssLen}`);
133
+ }
134
+ }
135
+ function toRPX(cssLen, rpxCalcRoot = undefined) {
136
+ const cssLenArr = `${cssLen}`.split(' ');
137
+ return cssLenArr
138
+ .map((attr) => {
139
+ const matchResult = attr.match(/^(-?\d*\.?\d+)(px)?$/);
140
+ if (matchResult === null || matchResult === void 0 ? void 0 : matchResult[1]) {
141
+ const px = +matchResult[1];
142
+ if (Number.isNaN(px / 1))
143
+ return px.toString();
144
+ if (px === 0) {
145
+ return '0';
146
+ }
147
+ return rpxCalcRoot ? `calc(${px}px / ${rpxCalcRoot})` : `${px}rpx`;
148
+ }
149
+ return attr;
150
+ })
151
+ .join(' ');
152
+ }
153
+ function toPX(cssLen, rpxCalcRoot = undefined) {
154
+ return `${cssLen}`
155
+ .split(' ')
156
+ .map((attr) => {
157
+ const matchResult = attr.match(/^(-?\d*\.?\d+)(rpx)?$/);
158
+ if (matchResult === null || matchResult === void 0 ? void 0 : matchResult[1]) {
159
+ const px = +matchResult[1];
160
+ if (Number.isNaN(px / 1))
161
+ return px.toString();
162
+ if (px === 0) {
163
+ return '0';
164
+ }
165
+ if ((matchResult === null || matchResult === void 0 ? void 0 : matchResult[2]) === 'rpx') {
166
+ return rpxCalcRoot ? `calc(${px}px / ${rpxCalcRoot})` : attr;
167
+ }
168
+ return `${+matchResult[1]}px`;
169
+ }
170
+ return attr;
171
+ })
172
+ .join(' ');
173
+ }
174
+ /**
175
+ * Convert WeApps common style to css styles(React.CSSProperties)
176
+ * toRem/toRpx/toRpx 三者互斥 @deprecated
177
+ * 应使用 defaultUnit 来声明
178
+ */
179
+ export function processCommonStyle2CSSProperties(commonStyle = {}, options = { toRem: true, ignoreSelf: false, addPXUnit: false, toRpx: false, rpxCalcRoot: undefined }) {
180
+ const { size,
181
+ // transform,
182
+ text, border, background, margin, padding, zIndex, position, display, flexConfig, custom, self, boxShadow, } = commonStyle;
183
+ const style = {};
184
+ if (size) {
185
+ setStyleValue(style, 'width', _handleStyleNumValue(size.width, !!options.addPXUnit));
186
+ setStyleValue(style, 'height', _handleStyleNumValue(size.height, !!options.addPXUnit));
187
+ }
188
+ // if (transform) {
189
+ // const { rotate, opacity, scale, radius } = transform
190
+ // if ((rotate && rotate !== 0) || (scale && scale !== 1)) {
191
+ // style.transform = `${rotate ? `rotate(${rotate}deg) ` : ''}${scale ? `scale(${scale})` : ''}`
192
+ // }
193
+ // setStyleValue(style, 'opacity', opacity)
194
+ // setStyleValue(style, 'borderRadius', radius)
195
+ // }
196
+ if (margin) {
197
+ setDistanceStyle(style, margin, 'margin', !!options.addPXUnit);
198
+ }
199
+ if (padding) {
200
+ setDistanceStyle(style, padding, 'padding', !!options.addPXUnit);
201
+ }
202
+ if (display) {
203
+ setStyleValue(style, 'display', display);
204
+ }
205
+ if (display === 'flex' && flexConfig) {
206
+ if (flexConfig.justifyContent)
207
+ setStyleValue(style, 'justifyContent', flexConfig.justifyContent);
208
+ if (flexConfig.alignItems)
209
+ setStyleValue(style, 'alignItems', flexConfig.alignItems);
210
+ if (flexConfig.flexWrap && flexConfig.flexDirection) {
211
+ setStyleValue(style, 'flexFlow', `${flexConfig.flexDirection} ${flexConfig.flexWrap}`);
212
+ }
213
+ else {
214
+ if (flexConfig.flexWrap)
215
+ setStyleValue(style, 'flexWrap', flexConfig.flexWrap);
216
+ if (flexConfig.flexDirection)
217
+ setStyleValue(style, 'flexDirection', flexConfig.flexDirection);
218
+ }
219
+ }
220
+ if (typeof zIndex === 'number' || `${zIndex}`.search(/^\d+$/) === 0) {
221
+ style.zIndex = zIndex;
222
+ }
223
+ if (text) {
224
+ setStyleValue(style, 'color', text.color);
225
+ setStyleValue(style, 'fontSize', _handleStyleNumValue(text.fontSize, !!options.addPXUnit));
226
+ setStyleValue(style, 'lineHeight', text.lineHeight);
227
+ setStyleValue(style, 'textAlign', text.textAlign);
228
+ setStyleValue(style, 'fontWeight', text.weight);
229
+ if (text.opacity !== undefined) {
230
+ setStyleValue(style, 'opacity', text.opacity / 100);
231
+ }
232
+ }
233
+ if (border) {
234
+ const { type, color, width, radius, radiusInfo } = border;
235
+ // width
236
+ if (typeof width === 'string') {
237
+ if (type && type !== 'none') {
238
+ setStyleValue(style, 'border', `${_handleStyleNumValue(width, !!options.addPXUnit)} ${type} ${color || ''}`);
239
+ }
240
+ else {
241
+ setStyleValue(style, 'borderWidth', _handleStyleNumValue(width, !!options.addPXUnit));
242
+ if (color)
243
+ setStyleValue(style, 'borderColor', color);
244
+ }
245
+ }
246
+ else if (Object.prototype.toString.call(width) === '[object Object]' && Object.keys(width).length !== 0) {
247
+ // https://developer.mozilla.org/zh-CN/docs/Web/CSS/border
248
+ // 虽然border-width,、border-style和 border-color 简写属性接受最多 4 个参数来为不同的边设置宽度、风格和颜色,但 boder 属性只接受三个参数,分别是宽度、风格和颜色,所以这样会使得四条边的边框相同。
249
+ const { top = '0', right = '0', bottom = '0', left = '0' } = width;
250
+ setStyleValue(style, 'borderWidth', `${_handleStyleNumValue(top, !!options.addPXUnit) || '0'} ${_handleStyleNumValue(right, !!options.addPXUnit) || '0'} ${_handleStyleNumValue(bottom, !!options.addPXUnit) || '0'} ${_handleStyleNumValue(left, !!options.addPXUnit) || '0'}`);
251
+ if (type) {
252
+ setStyleValue(style, 'borderStyle', type);
253
+ }
254
+ if (color) {
255
+ setStyleValue(style, 'borderColor', color);
256
+ }
257
+ }
258
+ // border radius
259
+ if (radius !== undefined) {
260
+ setStyleValue(style, 'borderRadius', _handleStyleNumValue(radius, !!options.addPXUnit));
261
+ }
262
+ if (radiusInfo && !isEmptyObj(radiusInfo)) {
263
+ let { topLeft, topRight, bottomRight, bottomLeft } = radiusInfo;
264
+ if (Object.keys(radiusInfo).length === 4) {
265
+ // 包含不为空的属性,将部分为空属性处理成 0
266
+ if (Object.values(radiusInfo).some((corner) => !!corner)) {
267
+ if (!topLeft) {
268
+ topLeft = '0';
269
+ }
270
+ if (!topRight) {
271
+ topRight = '0';
272
+ }
273
+ if (!bottomRight) {
274
+ bottomRight = '0';
275
+ }
276
+ if (!bottomLeft) {
277
+ bottomLeft = '0';
278
+ }
279
+ }
280
+ if (_uniq(_map(radiusInfo, (val) => val)).length === 1) {
281
+ // 4个值全相等的情况
282
+ setStyleValue(style, 'borderRadius', _handleStyleNumValue(topLeft, !!options.addPXUnit));
283
+ }
284
+ else if (topLeft === bottomRight && topRight === bottomLeft) {
285
+ // 俩俩相等的情况
286
+ setStyleValue(style, 'borderRadius', `${_handleStyleNumValue(topLeft, !!options.addPXUnit)} ${_handleStyleNumValue(topRight, !!options.addPXUnit)}`);
287
+ }
288
+ else if (topRight === bottomLeft) {
289
+ setStyleValue(style, 'borderRadius', `${_handleStyleNumValue(topLeft, !!options.addPXUnit)} ${_handleStyleNumValue(topRight, !!options.addPXUnit)} ${_handleStyleNumValue(bottomRight, !!options.addPXUnit)}`);
290
+ }
291
+ else {
292
+ setStyleValue(style, 'borderRadius', `${_handleStyleNumValue(topLeft, !!options.addPXUnit)} ${_handleStyleNumValue(topRight, !!options.addPXUnit)} ${_handleStyleNumValue(bottomRight, !!options.addPXUnit)} ${_handleStyleNumValue(bottomLeft, !!options.addPXUnit)}`);
293
+ }
294
+ }
295
+ else {
296
+ setStyleValue(style, 'borderTopLeftRadius', _handleStyleNumValue(topLeft, !!options.addPXUnit));
297
+ setStyleValue(style, 'borderTopRightRadius', _handleStyleNumValue(topRight, !!options.addPXUnit));
298
+ setStyleValue(style, 'borderBottomRightRadius', _handleStyleNumValue(bottomRight, !!options.addPXUnit));
299
+ setStyleValue(style, 'borderBottomLeftRadius', _handleStyleNumValue(bottomLeft, !!options.addPXUnit));
300
+ }
301
+ }
302
+ if (type === 'none') {
303
+ setStyleValue(style, 'border', `none`);
304
+ }
305
+ }
306
+ if (background) {
307
+ const { bgType, color, image, size, repeat, position, positionObj } = background;
308
+ if (bgType === 'none') {
309
+ setStyleValue(style, 'background', 'none');
310
+ }
311
+ else if (bgType === 'color') {
312
+ setStyleValue(style, 'background', color);
313
+ }
314
+ else if (bgType === 'image') {
315
+ // 如 radial-gradient(crimson, skyblue);
316
+ if (image != null) {
317
+ if (image.search(/[()]/) >= 0) {
318
+ style.background = image;
319
+ }
320
+ else {
321
+ style.background = `url(${image})`;
322
+ }
323
+ }
324
+ if (repeat)
325
+ style.background += ` ${repeat}`;
326
+ if (size) {
327
+ setStyleValue(style, 'backgroundSize', _handleStyleNumValue(size, !!options.addPXUnit));
328
+ }
329
+ setStyleValue(style, 'backgroundPosition', position);
330
+ if (positionObj && !isEmptyObj(positionObj)) {
331
+ style.background += ` ${_handleStyleNumValue(positionObj.left, !!options.addPXUnit)} ${_handleStyleNumValue(positionObj.top, !!options.addPXUnit)}`;
332
+ }
333
+ }
334
+ // FIXME: 这里兼容原有应用的数据,后面应去掉
335
+ if (bgType === undefined) {
336
+ setStyleValue(style, 'backgroundColor', color);
337
+ if (image != null) {
338
+ style.backgroundImage = `url(${image})`;
339
+ setStyleValue(style, 'backgroundRepeat', repeat);
340
+ setStyleValue(style, 'backgroundSize', _handleStyleNumValue(size, !!options.addPXUnit));
341
+ setStyleValue(style, 'backgroundPosition', position);
342
+ }
343
+ }
344
+ }
345
+ if (position) {
346
+ setStyleValue(style, 'position', position.position);
347
+ if (position.left !== undefined) {
348
+ setStyleValue(style, 'left', _handleStyleNumValue(position.left, !!options.addPXUnit));
349
+ }
350
+ if (position.right !== undefined) {
351
+ setStyleValue(style, 'right', _handleStyleNumValue(position.right, !!options.addPXUnit));
352
+ }
353
+ if (position.top !== undefined) {
354
+ setStyleValue(style, 'top', _handleStyleNumValue(position.top, !!options.addPXUnit));
355
+ }
356
+ if (position.bottom !== undefined) {
357
+ setStyleValue(style, 'bottom', _handleStyleNumValue(position.bottom, !!options.addPXUnit));
358
+ }
359
+ }
360
+ if (boxShadow) {
361
+ let processedBoxShadow = boxShadow;
362
+ if (Object.prototype.toString.call(boxShadow) === '[object Object]') {
363
+ processedBoxShadow = [boxShadow];
364
+ }
365
+ let boxShadowStyleString = '';
366
+ if (Array.isArray(processedBoxShadow)) {
367
+ processedBoxShadow.forEach((boxShadowItem, index) => {
368
+ let currentBoxShadowStyleString = '';
369
+ const { keyWord, offsetX, offsetY, blurRadius, spreadRadius, color, global, inset } = boxShadowItem;
370
+ // Keyword values
371
+ if (keyWord === 'none') {
372
+ currentBoxShadowStyleString = 'none';
373
+ }
374
+ else if (!!global) {
375
+ currentBoxShadowStyleString = global;
376
+ }
377
+ else if (!!offsetX || !!offsetY) {
378
+ // inset
379
+ if (!!inset) {
380
+ currentBoxShadowStyleString = 'inset ';
381
+ }
382
+ // offsetX
383
+ currentBoxShadowStyleString += _handleStyleNumValue(!!offsetX ? offsetX : 0, !!options.addPXUnit);
384
+ // offsetY
385
+ currentBoxShadowStyleString += ` ${_handleStyleNumValue(!!offsetY ? offsetY : 0, !!options.addPXUnit)}`;
386
+ // blur-radius 当 spread-radius 存在时,即使不存在 blur-radius,blur-radius 也要为 0
387
+ if (!!blurRadius || !!spreadRadius) {
388
+ currentBoxShadowStyleString += ` ${_handleStyleNumValue(!!blurRadius ? blurRadius : 0, !!options.addPXUnit)}`;
389
+ }
390
+ // spread-radius
391
+ if (!!spreadRadius) {
392
+ currentBoxShadowStyleString += ` ${_handleStyleNumValue(spreadRadius, !!options.addPXUnit)}`;
393
+ }
394
+ // color
395
+ if (!!color) {
396
+ currentBoxShadowStyleString += ` ${color}`;
397
+ }
398
+ }
399
+ if (!!currentBoxShadowStyleString) {
400
+ const splitLabel = !!boxShadowStyleString ? ' , ' : '';
401
+ boxShadowStyleString += splitLabel + currentBoxShadowStyleString;
402
+ }
403
+ });
404
+ }
405
+ else if (typeof boxShadow === 'string') {
406
+ boxShadowStyleString = boxShadow;
407
+ }
408
+ if (!!boxShadowStyleString) {
409
+ setStyleValue(style, 'boxShadow', boxShadowStyleString);
410
+ }
411
+ }
412
+ if (custom && custom.length > 0) {
413
+ custom.map((item) => {
414
+ setStyleValue(style, item.key, item.value);
415
+ });
416
+ }
417
+ if (self && !options.ignoreSelf) {
418
+ const _a = self, { cssFloat } = _a, restSelf = __rest(_a, ["cssFloat"]);
419
+ Object.assign(style, restSelf);
420
+ if (cssFloat) {
421
+ Object.assign(style, { float: cssFloat });
422
+ }
423
+ }
424
+ for (const key in style) {
425
+ const value = style[key];
426
+ if (Array.isArray(value)) {
427
+ style[key] = value[value.length - 1];
428
+ }
429
+ }
430
+ let { defaultUnit } = options;
431
+ const translateStyleOptions = { rpxCalcRoot: options.rpxCalcRoot };
432
+ if (!defaultUnit) {
433
+ if (options.toRpx) {
434
+ defaultUnit = 'rpx';
435
+ }
436
+ if (options.toRem) {
437
+ defaultUnit = 'rem';
438
+ }
439
+ }
440
+ if (defaultUnit) {
441
+ return processCSSPropertiesUnit(style, defaultUnit, translateStyleOptions);
442
+ }
443
+ return style;
444
+ }
445
+ /**
446
+ * @deprecated
447
+ */
448
+ export function processCSSProperties2Rem(style = {}, options) {
449
+ return translateStyleByHandler(style, toREM, options);
450
+ }
451
+ export function processCSSPropertiesUnit(style = {}, type, options) {
452
+ const _a = style, { cssFloat } = _a, restCssProperties = __rest(_a, ["cssFloat"]);
453
+ const handerMap = {
454
+ px: toPX,
455
+ rem: toREM,
456
+ rpx: toRPX,
457
+ };
458
+ const handler = handerMap[type] ||
459
+ function (cssLen, _) {
460
+ return cssLen;
461
+ };
462
+ return translateStyleByHandler(Object.assign({ float: cssFloat }, restCssProperties), handler, options);
463
+ }
@@ -0,0 +1,6 @@
1
+ import { ECodeType } from '../../../types';
2
+ export declare function generateDefaultCode(ctx: {
3
+ id: string;
4
+ version?: string;
5
+ }, type: ECodeType, scope: 'component' | 'page' | 'app'): string;
6
+ //# sourceMappingURL=template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../../../../../src/parser/cals/utils/template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAoM3C,wBAAgB,mBAAmB,CACjC,GAAG,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,EACrC,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,WAAW,GAAG,MAAM,GAAG,KAAK,UA6BpC"}