cck-ui 0.0.1

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 (276) hide show
  1. package/LICENSE +13 -0
  2. package/README.md +3 -0
  3. package/dist/index.css +1 -0
  4. package/dist/index.full.js +2957 -0
  5. package/dist/index.full.min.js +21 -0
  6. package/dist/index.full.min.js.map +1 -0
  7. package/dist/index.full.min.mjs +21 -0
  8. package/dist/index.full.min.mjs.map +1 -0
  9. package/dist/index.full.mjs +2945 -0
  10. package/es/_virtual/_rolldown/runtime.mjs +27 -0
  11. package/es/component.d.ts +6 -0
  12. package/es/component.mjs +8 -0
  13. package/es/component.mjs.map +1 -0
  14. package/es/components/base/style/css.mjs +1 -0
  15. package/es/components/base/style/index.mjs +1 -0
  16. package/es/components/button/index.d.ts +8 -0
  17. package/es/components/button/src/button-custom.d.ts +6 -0
  18. package/es/components/button/src/button.types.d.ts +77 -0
  19. package/es/components/button/src/button.vue.d.ts +28 -0
  20. package/es/components/button/src/use-button.d.ts +14 -0
  21. package/es/components/button/style/css.mjs +2 -0
  22. package/es/components/form/index.d.ts +4 -0
  23. package/es/components/form/src/constants.d.ts +7 -0
  24. package/es/components/form/src/form.types.d.ts +10 -0
  25. package/es/components/form/src/hooks/index.d.ts +2 -0
  26. package/es/components/form/src/hooks/use-form-common-props.d.ts +7 -0
  27. package/es/components/icon/index.d.ts +26 -0
  28. package/es/components/icon/src/icon.types.d.ts +13 -0
  29. package/es/components/icon/src/icon.vue.d.ts +17 -0
  30. package/es/components/icon/style/css.mjs +1 -0
  31. package/es/components/icon/style/index.mjs +1 -0
  32. package/es/components/index.d.ts +5 -0
  33. package/es/constants/index.d.ts +3 -0
  34. package/es/constants/key.d.ts +4 -0
  35. package/es/constants/sizes.d.ts +12 -0
  36. package/es/defaults.d.ts +6 -0
  37. package/es/defaults.mjs +9 -0
  38. package/es/defaults.mjs.map +1 -0
  39. package/es/hooks/index.d.ts +4 -0
  40. package/es/hooks/use-namespace/index.d.ts +27 -0
  41. package/es/hooks/use-prop/index.d.ts +6 -0
  42. package/es/hooks/use-theme/index.d.ts +5 -0
  43. package/es/index.d.ts +11 -0
  44. package/es/index.mjs +11 -0
  45. package/es/index.mjs.map +1 -0
  46. package/es/make-installer.d.ts +8 -0
  47. package/es/make-installer.mjs +14 -0
  48. package/es/make-installer.mjs.map +1 -0
  49. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/conversion.mjs +268 -0
  50. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/conversion.mjs.map +1 -0
  51. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/css-color-names.mjs +158 -0
  52. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/css-color-names.mjs.map +1 -0
  53. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/format-input.mjs +192 -0
  54. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/format-input.mjs.map +1 -0
  55. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/index.mjs +456 -0
  56. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/index.mjs.map +1 -0
  57. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/util.mjs +65 -0
  58. package/es/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/module/util.mjs.map +1 -0
  59. package/es/node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs +53 -0
  60. package/es/node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs.map +1 -0
  61. package/es/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.runtime.esm-bundler.mjs +22 -0
  62. package/es/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.runtime.esm-bundler.mjs.map +1 -0
  63. package/es/packages/components/button/index.mjs +8 -0
  64. package/es/packages/components/button/index.mjs.map +1 -0
  65. package/es/packages/components/button/src/button-custom.mjs +121 -0
  66. package/es/packages/components/button/src/button-custom.mjs.map +1 -0
  67. package/es/packages/components/button/src/button.mjs +7 -0
  68. package/es/packages/components/button/src/button.mjs.map +1 -0
  69. package/es/packages/components/button/src/button.types.mjs +0 -0
  70. package/es/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs +139 -0
  71. package/es/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  72. package/es/packages/components/button/src/use-button.mjs +41 -0
  73. package/es/packages/components/button/src/use-button.mjs.map +1 -0
  74. package/es/packages/components/form/index.mjs +3 -0
  75. package/es/packages/components/form/src/constants.mjs +6 -0
  76. package/es/packages/components/form/src/constants.mjs.map +1 -0
  77. package/es/packages/components/form/src/form.types.mjs +0 -0
  78. package/es/packages/components/form/src/hooks/index.mjs +2 -0
  79. package/es/packages/components/form/src/hooks/use-form-common-props.mjs +16 -0
  80. package/es/packages/components/form/src/hooks/use-form-common-props.mjs.map +1 -0
  81. package/es/packages/components/icon/index.mjs +8 -0
  82. package/es/packages/components/icon/index.mjs.map +1 -0
  83. package/es/packages/components/icon/src/icon.mjs +7 -0
  84. package/es/packages/components/icon/src/icon.mjs.map +1 -0
  85. package/es/packages/components/icon/src/icon.types.mjs +0 -0
  86. package/es/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.mjs +42 -0
  87. package/es/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.mjs.map +1 -0
  88. package/es/packages/components/index.mjs +3 -0
  89. package/es/packages/constants/index.mjs +3 -0
  90. package/es/packages/constants/key.mjs +6 -0
  91. package/es/packages/constants/key.mjs.map +1 -0
  92. package/es/packages/constants/sizes.mjs +24 -0
  93. package/es/packages/constants/sizes.mjs.map +1 -0
  94. package/es/packages/hooks/index.mjs +4 -0
  95. package/es/packages/hooks/use-namespace/index.mjs +63 -0
  96. package/es/packages/hooks/use-namespace/index.mjs.map +1 -0
  97. package/es/packages/hooks/use-prop/index.mjs +10 -0
  98. package/es/packages/hooks/use-prop/index.mjs.map +1 -0
  99. package/es/packages/hooks/use-theme/index.mjs +19 -0
  100. package/es/packages/hooks/use-theme/index.mjs.map +1 -0
  101. package/es/packages/utils/colors.mjs +109 -0
  102. package/es/packages/utils/colors.mjs.map +1 -0
  103. package/es/packages/utils/dom/index.mjs +2 -0
  104. package/es/packages/utils/dom/style.mjs +11 -0
  105. package/es/packages/utils/dom/style.mjs.map +1 -0
  106. package/es/packages/utils/index.mjs +5 -0
  107. package/es/packages/utils/types.mjs +12 -0
  108. package/es/packages/utils/types.mjs.map +1 -0
  109. package/es/packages/utils/vue/index.mjs +2 -0
  110. package/es/packages/utils/vue/install.mjs +38 -0
  111. package/es/packages/utils/vue/install.mjs.map +1 -0
  112. package/es/packages/utils/vue/typescript.mjs +0 -0
  113. package/es/plugin.d.ts +6 -0
  114. package/es/plugin.mjs +6 -0
  115. package/es/plugin.mjs.map +1 -0
  116. package/es/utils/colors.d.ts +14 -0
  117. package/es/utils/dom/index.d.ts +2 -0
  118. package/es/utils/dom/style.d.ts +4 -0
  119. package/es/utils/index.d.ts +6 -0
  120. package/es/utils/types.d.ts +8 -0
  121. package/es/utils/vue/index.d.ts +3 -0
  122. package/es/utils/vue/install.d.ts +7 -0
  123. package/es/utils/vue/typescript.d.ts +19 -0
  124. package/global.d.ts +8 -0
  125. package/lib/_virtual/_rolldown/runtime.js +37 -0
  126. package/lib/component.d.ts +6 -0
  127. package/lib/component.js +12 -0
  128. package/lib/component.js.map +1 -0
  129. package/lib/components/base/style/css.js +2 -0
  130. package/lib/components/base/style/index.js +2 -0
  131. package/lib/components/button/index.d.ts +8 -0
  132. package/lib/components/button/src/button-custom.d.ts +6 -0
  133. package/lib/components/button/src/button.types.d.ts +77 -0
  134. package/lib/components/button/src/button.vue.d.ts +28 -0
  135. package/lib/components/button/src/use-button.d.ts +14 -0
  136. package/lib/components/button/style/css.js +3 -0
  137. package/lib/components/form/index.d.ts +4 -0
  138. package/lib/components/form/src/constants.d.ts +7 -0
  139. package/lib/components/form/src/form.types.d.ts +10 -0
  140. package/lib/components/form/src/hooks/index.d.ts +2 -0
  141. package/lib/components/form/src/hooks/use-form-common-props.d.ts +7 -0
  142. package/lib/components/icon/index.d.ts +26 -0
  143. package/lib/components/icon/src/icon.types.d.ts +13 -0
  144. package/lib/components/icon/src/icon.vue.d.ts +17 -0
  145. package/lib/components/icon/style/css.js +2 -0
  146. package/lib/components/icon/style/index.js +2 -0
  147. package/lib/components/index.d.ts +5 -0
  148. package/lib/constants/index.d.ts +3 -0
  149. package/lib/constants/key.d.ts +4 -0
  150. package/lib/constants/sizes.d.ts +12 -0
  151. package/lib/defaults.d.ts +6 -0
  152. package/lib/defaults.js +13 -0
  153. package/lib/defaults.js.map +1 -0
  154. package/lib/hooks/index.d.ts +4 -0
  155. package/lib/hooks/use-namespace/index.d.ts +27 -0
  156. package/lib/hooks/use-prop/index.d.ts +6 -0
  157. package/lib/hooks/use-theme/index.d.ts +5 -0
  158. package/lib/index.d.ts +11 -0
  159. package/lib/index.js +19 -0
  160. package/lib/index.js.map +1 -0
  161. package/lib/make-installer.d.ts +8 -0
  162. package/lib/make-installer.js +15 -0
  163. package/lib/make-installer.js.map +1 -0
  164. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/conversion.js +309 -0
  165. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/conversion.js.map +1 -0
  166. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/css-color-names.js +168 -0
  167. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/css-color-names.js.map +1 -0
  168. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/format-input.js +209 -0
  169. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/format-input.js.map +1 -0
  170. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/from-ratio.js +43 -0
  171. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/from-ratio.js.map +1 -0
  172. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/index.js +471 -0
  173. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/index.js.map +1 -0
  174. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/interfaces.js +14 -0
  175. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/interfaces.js.map +1 -0
  176. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/public_api.js +50 -0
  177. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/public_api.js.map +1 -0
  178. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/random.js +255 -0
  179. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/random.js.map +1 -0
  180. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/readability.js +96 -0
  181. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/readability.js.map +1 -0
  182. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/to-ms-filter.js +35 -0
  183. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/to-ms-filter.js.map +1 -0
  184. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/util.js +82 -0
  185. package/lib/node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/util.js.map +1 -0
  186. package/lib/node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.js +53 -0
  187. package/lib/node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.js.map +1 -0
  188. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.js +66 -0
  189. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.js.map +1 -0
  190. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.prod.js +56 -0
  191. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.prod.js.map +1 -0
  192. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index.js +18 -0
  193. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index.js.map +1 -0
  194. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index2.js +14 -0
  195. package/lib/node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index2.js.map +1 -0
  196. package/lib/packages/components/button/index.js +13 -0
  197. package/lib/packages/components/button/index.js.map +1 -0
  198. package/lib/packages/components/button/src/button-custom.js +122 -0
  199. package/lib/packages/components/button/src/button-custom.js.map +1 -0
  200. package/lib/packages/components/button/src/button.js +10 -0
  201. package/lib/packages/components/button/src/button.js.map +1 -0
  202. package/lib/packages/components/button/src/button.types.js +1 -0
  203. package/lib/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.js +139 -0
  204. package/lib/packages/components/button/src/button.vue_vue_type_script_setup_true_lang.js.map +1 -0
  205. package/lib/packages/components/button/src/use-button.js +42 -0
  206. package/lib/packages/components/button/src/use-button.js.map +1 -0
  207. package/lib/packages/components/form/index.js +6 -0
  208. package/lib/packages/components/form/src/constants.js +7 -0
  209. package/lib/packages/components/form/src/constants.js.map +1 -0
  210. package/lib/packages/components/form/src/form.types.js +1 -0
  211. package/lib/packages/components/form/src/hooks/index.js +4 -0
  212. package/lib/packages/components/form/src/hooks/use-form-common-props.js +18 -0
  213. package/lib/packages/components/form/src/hooks/use-form-common-props.js.map +1 -0
  214. package/lib/packages/components/icon/index.js +13 -0
  215. package/lib/packages/components/icon/index.js.map +1 -0
  216. package/lib/packages/components/icon/src/icon.js +10 -0
  217. package/lib/packages/components/icon/src/icon.js.map +1 -0
  218. package/lib/packages/components/icon/src/icon.types.js +1 -0
  219. package/lib/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.js +42 -0
  220. package/lib/packages/components/icon/src/icon.vue_vue_type_script_setup_true_lang.js.map +1 -0
  221. package/lib/packages/components/index.js +5 -0
  222. package/lib/packages/constants/index.js +6 -0
  223. package/lib/packages/constants/key.js +7 -0
  224. package/lib/packages/constants/key.js.map +1 -0
  225. package/lib/packages/constants/sizes.js +26 -0
  226. package/lib/packages/constants/sizes.js.map +1 -0
  227. package/lib/packages/hooks/index.js +10 -0
  228. package/lib/packages/hooks/use-namespace/index.js +67 -0
  229. package/lib/packages/hooks/use-namespace/index.js.map +1 -0
  230. package/lib/packages/hooks/use-prop/index.js +11 -0
  231. package/lib/packages/hooks/use-prop/index.js.map +1 -0
  232. package/lib/packages/hooks/use-theme/index.js +20 -0
  233. package/lib/packages/hooks/use-theme/index.js.map +1 -0
  234. package/lib/packages/utils/colors.js +112 -0
  235. package/lib/packages/utils/colors.js.map +1 -0
  236. package/lib/packages/utils/dom/index.js +3 -0
  237. package/lib/packages/utils/dom/style.js +13 -0
  238. package/lib/packages/utils/dom/style.js.map +1 -0
  239. package/lib/packages/utils/index.js +21 -0
  240. package/lib/packages/utils/types.js +21 -0
  241. package/lib/packages/utils/types.js.map +1 -0
  242. package/lib/packages/utils/vue/index.js +4 -0
  243. package/lib/packages/utils/vue/install.js +40 -0
  244. package/lib/packages/utils/vue/install.js.map +1 -0
  245. package/lib/packages/utils/vue/typescript.js +1 -0
  246. package/lib/plugin.d.ts +6 -0
  247. package/lib/plugin.js +10 -0
  248. package/lib/plugin.js.map +1 -0
  249. package/lib/utils/colors.d.ts +14 -0
  250. package/lib/utils/dom/index.d.ts +2 -0
  251. package/lib/utils/dom/style.d.ts +4 -0
  252. package/lib/utils/index.d.ts +6 -0
  253. package/lib/utils/types.d.ts +8 -0
  254. package/lib/utils/vue/index.d.ts +3 -0
  255. package/lib/utils/vue/install.d.ts +7 -0
  256. package/lib/utils/vue/typescript.d.ts +19 -0
  257. package/package.json +69 -0
  258. package/theme-slate/base.css +1 -0
  259. package/theme-slate/cu-button.css +1 -0
  260. package/theme-slate/cu-common.css +1 -0
  261. package/theme-slate/cu-icon.css +1 -0
  262. package/theme-slate/cu-var.css +1 -0
  263. package/theme-slate/dark/css-vars.css +0 -0
  264. package/theme-slate/index.css +1 -0
  265. package/theme-slate/src/base.scss +2 -0
  266. package/theme-slate/src/button.scss +317 -0
  267. package/theme-slate/src/common/var.scss +179 -0
  268. package/theme-slate/src/common.scss +9 -0
  269. package/theme-slate/src/dark/css-vars.scss +0 -0
  270. package/theme-slate/src/icon.scss +43 -0
  271. package/theme-slate/src/index.scss +4 -0
  272. package/theme-slate/src/mixins/_var.scss +9 -0
  273. package/theme-slate/src/mixins/config.scss +5 -0
  274. package/theme-slate/src/mixins/function.scss +11 -0
  275. package/theme-slate/src/mixins/mixins.scss +19 -0
  276. package/theme-slate/src/var.scss +297 -0
@@ -0,0 +1,42 @@
1
+ const require_types = require("../../../utils/types.js");
2
+ const require_style = require("../../../utils/dom/style.js");
3
+ const require_index = require("../../../../node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index2.js");
4
+ const require_index$1 = require("../../../hooks/use-namespace/index.js");
5
+ //#region ../../packages/components/icon/src/icon.vue?vue&type=script&setup=true&lang.ts
6
+ var icon_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, require_index.vue_exports.defineComponent)({
7
+ name: "CIcon",
8
+ inheritAttrs: false,
9
+ __name: "icon",
10
+ props: {
11
+ size: {
12
+ type: [Number, String],
13
+ required: false
14
+ },
15
+ color: {
16
+ type: String,
17
+ required: false
18
+ }
19
+ },
20
+ setup(__props) {
21
+ const props = __props;
22
+ const ns = require_index$1.useNamespace("icon");
23
+ const style = (0, require_index.vue_exports.computed)(() => {
24
+ const { size, color } = props;
25
+ if (!size && !color) return {};
26
+ return {
27
+ fontSize: require_types.isUndefined(size) ? void 0 : require_style.addUnit(size),
28
+ "--color": color
29
+ };
30
+ });
31
+ return (_ctx, _cache) => {
32
+ return (0, require_index.vue_exports.openBlock)(), (0, require_index.vue_exports.createElementBlock)("i", (0, require_index.vue_exports.mergeProps)({
33
+ class: (0, require_index.vue_exports.unref)(ns).b(),
34
+ style: style.value
35
+ }, _ctx.$attrs), [(0, require_index.vue_exports.renderSlot)(_ctx.$slots, "default")], 16);
36
+ };
37
+ }
38
+ });
39
+ //#endregion
40
+ exports.default = icon_vue_vue_type_script_setup_true_lang_default;
41
+
42
+ //# sourceMappingURL=icon.vue_vue_type_script_setup_true_lang.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../../../../../packages/components/icon/src/icon.vue","../../../../../../../packages/components/icon/src/icon.vue"],"sourcesContent":["<template>\n <i :class=\"ns.b()\" :style=\"style\" v-bind=\"$attrs\">\n <slot />\n </i>\n</template>\n\n<script setup lang=\"ts\">\nimport { type CSSProperties, computed } from 'vue'\nimport { useNamespace } from '@cck-ui/hooks'\nimport { addUnit, isUndefined } from '@cck-ui/utils'\nimport { type IconProps } from './icon.types'\n\ndefineOptions({\n name: 'CIcon',\n inheritAttrs: false\n})\nconst props = defineProps<IconProps>()\nconst ns = useNamespace('icon')\n\nconst style = computed<CSSProperties>(() => {\n const { size, color } = props\n if (!size && !color) return {}\n\n return {\n fontSize: isUndefined(size) ? undefined : addUnit(size),\n '--color': color\n }\n})\n</script>\n","<template>\n <i :class=\"ns.b()\" :style=\"style\" v-bind=\"$attrs\">\n <slot />\n </i>\n</template>\n\n<script setup lang=\"ts\">\nimport { type CSSProperties, computed } from 'vue'\nimport { useNamespace } from '@cck-ui/hooks'\nimport { addUnit, isUndefined } from '@cck-ui/utils'\nimport { type IconProps } from './icon.types'\n\ndefineOptions({\n name: 'CIcon',\n inheritAttrs: false\n})\nconst props = defineProps<IconProps>()\nconst ns = useNamespace('icon')\n\nconst style = computed<CSSProperties>(() => {\n const { size, color } = props\n if (!size && !color) return {}\n\n return {\n fontSize: isUndefined(size) ? undefined : addUnit(size),\n '--color': color\n }\n})\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAgBA,MAAM,QAAQ;EACd,MAAM,KAAK,gBAAA,aAAa,MAAM;EAE9B,MAAM,SAAA,GAAA,cAAA,YAAA,SAAA,OAAsC;GAC1C,MAAM,EAAE,MAAM,UAAU;GACxB,IAAI,CAAC,QAAQ,CAAC,OAAO,OAAO,CAAC;GAE7B,OAAO;IACL,UAAU,cAAA,YAAY,IAAI,IAAI,KAAA,IAAY,cAAA,QAAQ,IAAI;IACtD,WAAW;GACb;EACF,CAAC;;wGCxBK,MAAA,GAAA,cAAA,YAAA,WAAA,CAAA;IAFA,QAAA,GAAA,cAAA,YAAA,MAAA,CAAO,EAAA,CAAE,CAAC,EAAC;IAAK,OAAO,MAAA;MAAeA,KAAAA,MAAM,GAAA,EAAA,GAAA,cAAA,YAAA,WAAA,CACtC,KAAA,QAAA,SAAA,CAAA,GAAA,EAAA"}
@@ -0,0 +1,5 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_index = require("./button/index.js");
3
+ const require_index$1 = require("./icon/index.js");
4
+ exports.CButton = require_index.CButton;
5
+ exports.CIcon = require_index$1.CIcon;
@@ -0,0 +1,6 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_key = require("./key.js");
3
+ const require_sizes = require("./sizes.js");
4
+ exports.INSTALLED_KEY = require_key.INSTALLED_KEY;
5
+ exports.componentSizeMap = require_sizes.componentSizeMap;
6
+ exports.componentSizes = require_sizes.componentSizes;
@@ -0,0 +1,7 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region ../../packages/constants/key.ts
3
+ const INSTALLED_KEY = Symbol("INSTALLED_KEY");
4
+ //#endregion
5
+ exports.INSTALLED_KEY = INSTALLED_KEY;
6
+
7
+ //# sourceMappingURL=key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"key.js","names":[],"sources":["../../../../../packages/constants/key.ts"],"sourcesContent":["export const INSTALLED_KEY = Symbol('INSTALLED_KEY')\n"],"mappings":";;AAAA,MAAa,gBAAgB,OAAO,eAAe"}
@@ -0,0 +1,26 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region ../../packages/constants/sizes.ts
3
+ const componentSizes = [
4
+ "xs",
5
+ "sm",
6
+ "md",
7
+ "lg",
8
+ "xl",
9
+ "compact-xs",
10
+ "compact-sm",
11
+ "compact-md",
12
+ "compact-lg",
13
+ "compact-xl"
14
+ ];
15
+ const componentSizeMap = {
16
+ xl: 60,
17
+ lg: 50,
18
+ md: 42,
19
+ sm: 36,
20
+ xs: 30
21
+ };
22
+ //#endregion
23
+ exports.componentSizeMap = componentSizeMap;
24
+ exports.componentSizes = componentSizes;
25
+
26
+ //# sourceMappingURL=sizes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sizes.js","names":[],"sources":["../../../../../packages/constants/sizes.ts"],"sourcesContent":["export const componentSizes = [\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'xl',\n 'compact-xs',\n 'compact-sm',\n 'compact-md',\n 'compact-lg',\n 'compact-xl'\n]\n\nexport type ComponentSize = (typeof componentSizes)[number]\n\nexport const componentSizeMap = {\n xl: 60,\n lg: 50,\n md: 42,\n sm: 36,\n xs: 30\n} as const\n"],"mappings":";;AAAA,MAAa,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAIA,MAAa,mBAAmB;CAC9B,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN"}
@@ -0,0 +1,10 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_index = require("./use-namespace/index.js");
3
+ const require_index$1 = require("./use-prop/index.js");
4
+ const require_index$2 = require("./use-theme/index.js");
5
+ exports.defaultNamespace = require_index.defaultNamespace;
6
+ exports.namespaceContextKey = require_index.namespaceContextKey;
7
+ exports.useColorScheme = require_index$2.useColorScheme;
8
+ exports.useGetDerivedNamespace = require_index.useGetDerivedNamespace;
9
+ exports.useNamespace = require_index.useNamespace;
10
+ exports.useProp = require_index$1.useProp;
@@ -0,0 +1,67 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_index = require("../../../node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index2.js");
3
+ //#region ../../packages/hooks/use-namespace/index.ts
4
+ const defaultNamespace = "c";
5
+ const statePrefix = "is-";
6
+ const _bem = (namespace, block, blockSuffix, element, modifier) => {
7
+ let cls = `${namespace}-${block}`;
8
+ if (blockSuffix) cls += `-${blockSuffix}`;
9
+ if (element) cls += `__${element}`;
10
+ if (modifier) cls += `--${modifier}`;
11
+ return cls;
12
+ };
13
+ const namespaceContextKey = Symbol("namespaceContextKey");
14
+ const useGetDerivedNamespace = (namespaceOverrides) => {
15
+ const derivedNamespace = namespaceOverrides || ((0, require_index.vue_exports.getCurrentInstance)() ? (0, require_index.vue_exports.inject)(namespaceContextKey, (0, require_index.vue_exports.ref)("c")) : (0, require_index.vue_exports.ref)("c"));
16
+ return (0, require_index.vue_exports.computed)(() => {
17
+ return (0, require_index.vue_exports.unref)(derivedNamespace) || "c";
18
+ });
19
+ };
20
+ const useNamespace = (block, namespaceOverrides) => {
21
+ const namespace = useGetDerivedNamespace(namespaceOverrides);
22
+ const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
23
+ const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
24
+ const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
25
+ const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
26
+ const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
27
+ const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
28
+ const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
29
+ const is = (name, ...args) => {
30
+ const state = args.length >= 1 ? args[0] : true;
31
+ return name && state ? `${statePrefix}${name}` : "";
32
+ };
33
+ const cssVar = (object) => {
34
+ const styles = {};
35
+ for (const key in object) if (object[key]) styles[`--${namespace.value}-${key}`] = object[key];
36
+ return styles;
37
+ };
38
+ const cssVarBlock = (object) => {
39
+ const styles = {};
40
+ for (const key in object) if (object[key]) styles[`--${namespace.value}-${block}-${key}`] = object[key];
41
+ return styles;
42
+ };
43
+ const cssVarName = (name) => `--${namespace.value}-${name}`;
44
+ const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
45
+ return {
46
+ namespace,
47
+ b,
48
+ e,
49
+ m,
50
+ be,
51
+ em,
52
+ bm,
53
+ bem,
54
+ is,
55
+ cssVar,
56
+ cssVarName,
57
+ cssVarBlock,
58
+ cssVarBlockName
59
+ };
60
+ };
61
+ //#endregion
62
+ exports.defaultNamespace = defaultNamespace;
63
+ exports.namespaceContextKey = namespaceContextKey;
64
+ exports.useGetDerivedNamespace = useGetDerivedNamespace;
65
+ exports.useNamespace = useNamespace;
66
+
67
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../../packages/hooks/use-namespace/index.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, ref, unref } from 'vue'\n\nimport type { InjectionKey, Ref } from 'vue'\n\nexport const defaultNamespace = 'c'\nconst statePrefix = 'is-'\n\nconst _bem = (\n namespace: string,\n block: string,\n blockSuffix: string,\n element: string,\n modifier: string\n) => {\n let cls = `${namespace}-${block}`\n if (blockSuffix) {\n cls += `-${blockSuffix}`\n }\n if (element) {\n cls += `__${element}`\n }\n if (modifier) {\n cls += `--${modifier}`\n }\n return cls\n}\n\nexport const namespaceContextKey: InjectionKey<Ref<string | undefined>> =\n Symbol('namespaceContextKey')\n\nexport const useGetDerivedNamespace = (\n namespaceOverrides?: Ref<string | undefined>\n) => {\n const derivedNamespace =\n namespaceOverrides ||\n (getCurrentInstance()\n ? inject(namespaceContextKey, ref(defaultNamespace))\n : ref(defaultNamespace))\n const namespace = computed(() => {\n return unref(derivedNamespace) || defaultNamespace\n })\n return namespace\n}\n\nexport const useNamespace = (\n block: string,\n namespaceOverrides?: Ref<string | undefined>\n) => {\n const namespace = useGetDerivedNamespace(namespaceOverrides)\n const b = (blockSuffix = '') =>\n _bem(namespace.value, block, blockSuffix, '', '')\n const e = (element?: string) =>\n element ? _bem(namespace.value, block, '', element, '') : ''\n const m = (modifier?: string) =>\n modifier ? _bem(namespace.value, block, '', '', modifier) : ''\n const be = (blockSuffix?: string, element?: string) =>\n blockSuffix && element\n ? _bem(namespace.value, block, blockSuffix, element, '')\n : ''\n const em = (element?: string, modifier?: string) =>\n element && modifier\n ? _bem(namespace.value, block, '', element, modifier)\n : ''\n const bm = (blockSuffix?: string, modifier?: string) =>\n blockSuffix && modifier\n ? _bem(namespace.value, block, blockSuffix, '', modifier)\n : ''\n const bem = (blockSuffix?: string, element?: string, modifier?: string) =>\n blockSuffix && element && modifier\n ? _bem(namespace.value, block, blockSuffix, element, modifier)\n : ''\n const is: {\n (name: string, state: boolean | undefined): string\n (name: string): string\n } = (name: string, ...args: [boolean | undefined] | []) => {\n const state = args.length >= 1 ? args[0]! : true\n return name && state ? `${statePrefix}${name}` : ''\n }\n\n // for css var\n // --el-xxx: value;\n const cssVar = (object: Record<string, string>) => {\n const styles: Record<string, string> = {}\n for (const key in object) {\n if (object[key]) {\n styles[`--${namespace.value}-${key}`] = object[key]\n }\n }\n return styles\n }\n // with block\n const cssVarBlock = (object: Record<string, string>) => {\n const styles: Record<string, string> = {}\n for (const key in object) {\n if (object[key]) {\n styles[`--${namespace.value}-${block}-${key}`] = object[key]\n }\n }\n return styles\n }\n\n const cssVarName = (name: string) => `--${namespace.value}-${name}`\n const cssVarBlockName = (name: string) =>\n `--${namespace.value}-${block}-${name}`\n\n return {\n namespace,\n b,\n e,\n m,\n be,\n em,\n bm,\n bem,\n is,\n // css\n cssVar,\n cssVarName,\n cssVarBlock,\n cssVarBlockName\n }\n}\n\nexport type UseNamespaceReturn = ReturnType<typeof useNamespace>\n"],"mappings":";;;AAIA,MAAa,mBAAmB;AAChC,MAAM,cAAc;AAEpB,MAAM,QACJ,WACA,OACA,aACA,SACA,aACG;CACH,IAAI,MAAM,GAAG,UAAU,GAAG;CAC1B,IAAI,aACF,OAAO,IAAI;CAEb,IAAI,SACF,OAAO,KAAK;CAEd,IAAI,UACF,OAAO,KAAK;CAEd,OAAO;AACT;AAEA,MAAa,sBACX,OAAO,qBAAqB;AAE9B,MAAa,0BACX,uBACG;CACH,MAAM,mBACJ,wBAAA,GAAA,cAAA,YAAA,mBAAA,CACoB,KAAA,GAAA,cAAA,YAAA,OAAA,CACT,sBAAA,GAAA,cAAA,YAAA,IAAA,CAAA,GAAyC,CAAC,KAAA,GAAA,cAAA,YAAA,IAAA,CAAA,GAC7B;CAI1B,QAAA,GAAA,cAAA,YAAA,SAAA,OAHiC;EAC/B,QAAA,GAAA,cAAA,YAAA,MAAA,CAAa,gBAAgB,KAAA;CAC/B,CACe;AACjB;AAEA,MAAa,gBACX,OACA,uBACG;CACH,MAAM,YAAY,uBAAuB,kBAAkB;CAC3D,MAAM,KAAK,cAAc,OACvB,KAAK,UAAU,OAAO,OAAO,aAAa,IAAI,EAAE;CAClD,MAAM,KAAK,YACT,UAAU,KAAK,UAAU,OAAO,OAAO,IAAI,SAAS,EAAE,IAAI;CAC5D,MAAM,KAAK,aACT,WAAW,KAAK,UAAU,OAAO,OAAO,IAAI,IAAI,QAAQ,IAAI;CAC9D,MAAM,MAAM,aAAsB,YAChC,eAAe,UACX,KAAK,UAAU,OAAO,OAAO,aAAa,SAAS,EAAE,IACrD;CACN,MAAM,MAAM,SAAkB,aAC5B,WAAW,WACP,KAAK,UAAU,OAAO,OAAO,IAAI,SAAS,QAAQ,IAClD;CACN,MAAM,MAAM,aAAsB,aAChC,eAAe,WACX,KAAK,UAAU,OAAO,OAAO,aAAa,IAAI,QAAQ,IACtD;CACN,MAAM,OAAO,aAAsB,SAAkB,aACnD,eAAe,WAAW,WACtB,KAAK,UAAU,OAAO,OAAO,aAAa,SAAS,QAAQ,IAC3D;CACN,MAAM,MAGD,MAAc,GAAG,SAAqC;EACzD,MAAM,QAAQ,KAAK,UAAU,IAAI,KAAK,KAAM;EAC5C,OAAO,QAAQ,QAAQ,GAAG,cAAc,SAAS;CACnD;CAIA,MAAM,UAAU,WAAmC;EACjD,MAAM,SAAiC,CAAC;EACxC,KAAK,MAAM,OAAO,QAChB,IAAI,OAAO,MACT,OAAO,KAAK,UAAU,MAAM,GAAG,SAAS,OAAO;EAGnD,OAAO;CACT;CAEA,MAAM,eAAe,WAAmC;EACtD,MAAM,SAAiC,CAAC;EACxC,KAAK,MAAM,OAAO,QAChB,IAAI,OAAO,MACT,OAAO,KAAK,UAAU,MAAM,GAAG,MAAM,GAAG,SAAS,OAAO;EAG5D,OAAO;CACT;CAEA,MAAM,cAAc,SAAiB,KAAK,UAAU,MAAM,GAAG;CAC7D,MAAM,mBAAmB,SACvB,KAAK,UAAU,MAAM,GAAG,MAAM,GAAG;CAEnC,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;CACF;AACF"}
@@ -0,0 +1,11 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_index = require("../../../node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index2.js");
3
+ //#region ../../packages/hooks/use-prop/index.ts
4
+ const useProp = (name) => {
5
+ const vm = (0, require_index.vue_exports.getCurrentInstance)();
6
+ return (0, require_index.vue_exports.computed)(() => (vm?.proxy?.$props)?.[name]);
7
+ };
8
+ //#endregion
9
+ exports.useProp = useProp;
10
+
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../../packages/hooks/use-prop/index.ts"],"sourcesContent":["import { computed, getCurrentInstance } from 'vue'\nimport type { ComputedRef } from 'vue'\n\nexport const useProp = <T>(name: string): ComputedRef<T | undefined> => {\n const vm = getCurrentInstance()\n return computed(() => (vm?.proxy?.$props as any)?.[name])\n}\n"],"mappings":";;;AAGA,MAAa,WAAc,SAA6C;CACtE,MAAM,MAAA,GAAA,cAAA,YAAA,mBAAA,CAAwB;CAC9B,QAAA,GAAA,cAAA,YAAA,SAAA,QAAuB,IAAI,OAAO,OAAA,GAAiB,KAAK;AAC1D"}
@@ -0,0 +1,20 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_index = require("../../../node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/index2.js");
3
+ //#region ../../packages/hooks/use-theme/index.ts
4
+ const getCurrentScheme = () => {
5
+ if (typeof document === "undefined") return "light";
6
+ return document.documentElement.dataset.cColorScheme === "dark" ? "dark" : "light";
7
+ };
8
+ const colorScheme = (0, require_index.vue_exports.ref)(getCurrentScheme());
9
+ if (typeof window !== "undefined") new MutationObserver(() => {
10
+ const newScheme = getCurrentScheme();
11
+ if (newScheme !== colorScheme.value) colorScheme.value = newScheme;
12
+ }).observe(document.documentElement, {
13
+ attributes: true,
14
+ attributeFilter: ["data-c-color-scheme"]
15
+ });
16
+ const useColorScheme = () => (0, require_index.vue_exports.readonly)(colorScheme);
17
+ //#endregion
18
+ exports.useColorScheme = useColorScheme;
19
+
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../../packages/hooks/use-theme/index.ts"],"sourcesContent":["import { readonly, ref } from 'vue'\n\nexport type ColorScheme = 'light' | 'dark'\n\nconst getCurrentScheme = (): ColorScheme => {\n if (typeof document === 'undefined') return 'light'\n const scheme = document.documentElement.dataset.cColorScheme\n return scheme === 'dark' ? 'dark' : 'light'\n}\n\nconst colorScheme = ref<ColorScheme>(getCurrentScheme())\n\nif (typeof window !== 'undefined') {\n const observer = new MutationObserver(() => {\n const newScheme = getCurrentScheme()\n if (newScheme !== colorScheme.value) {\n colorScheme.value = newScheme\n }\n })\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['data-c-color-scheme']\n })\n}\n\nexport const useColorScheme = () => readonly(colorScheme)\n"],"mappings":";;;AAIA,MAAM,yBAAsC;CAC1C,IAAI,OAAO,aAAa,aAAa,OAAO;CAE5C,OADe,SAAS,gBAAgB,QAAQ,iBAC9B,SAAS,SAAS;AACtC;AAEA,MAAM,eAAA,GAAA,cAAA,YAAA,IAAA,CAA+B,iBAAiB,CAAC;AAEvD,IAAI,OAAO,WAAW,aAOpB,IANqB,uBAAuB;CAC1C,MAAM,YAAY,iBAAiB;CACnC,IAAI,cAAc,YAAY,OAC5B,YAAY,QAAQ;AAExB,CACO,CAAC,CAAC,QAAQ,SAAS,iBAAiB;CACzC,YAAY;CACZ,iBAAiB,CAAC,qBAAqB;AACzC,CAAC;AAGH,MAAa,wBAAA,GAAA,cAAA,YAAA,SAAA,CAAgC,WAAW"}
@@ -0,0 +1,112 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region ../../packages/utils/colors.ts
3
+ var import_public_api = require("../../node_modules/.pnpm/@ctrl_tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/public_api.js").default;
4
+ const SATURATIONS = [
5
+ 8,
6
+ 15,
7
+ 30,
8
+ 55,
9
+ 78,
10
+ 95,
11
+ 95,
12
+ 92,
13
+ 88,
14
+ 85
15
+ ];
16
+ const LIGHTNESSES = [
17
+ 95,
18
+ 88,
19
+ 75,
20
+ 62,
21
+ 50,
22
+ 40,
23
+ 32,
24
+ 27,
25
+ 22,
26
+ 18
27
+ ];
28
+ const shadeCache = /* @__PURE__ */ new Map();
29
+ function getNormalizedKey(colorStr) {
30
+ const tc = new import_public_api.TinyColor(colorStr);
31
+ if (!tc.isValid) return null;
32
+ return tc.toHexString();
33
+ }
34
+ function getFormat(colorStr) {
35
+ const fmt = new import_public_api.TinyColor(colorStr).format;
36
+ return fmt === "name" ? "hex" : fmt;
37
+ }
38
+ /**
39
+ * Generates 10 shades (index 0~9, 0 lightest, 9 darkest) from a given color.
40
+ * The output format matches the input format (hex / rgb / rgba / hsl / hsla).
41
+ * Results are cached so repeated calls with the same color (even different formats) return instantly.
42
+ * @param originalColor - Any valid CSS color string
43
+ * @returns An array of 10 color strings representing the shades
44
+ * @throws If the input color is invalid
45
+ */
46
+ function generateColorShades(originalColor) {
47
+ const normKey = getNormalizedKey(originalColor);
48
+ if (!normKey) throw new Error(`Invalid color: ${originalColor}`);
49
+ const targetFormat = getFormat(originalColor);
50
+ const cacheKey = `${normKey}|${targetFormat}`;
51
+ if (shadeCache.has(cacheKey)) return shadeCache.get(cacheKey);
52
+ const base = new import_public_api.TinyColor(originalColor);
53
+ if (!base.isValid) throw new Error(`Invalid color: ${originalColor}`);
54
+ const { h } = base.toHsl();
55
+ const shades = [];
56
+ for (let i = 0; i < 10; i++) {
57
+ const color = new import_public_api.TinyColor({
58
+ h,
59
+ s: SATURATIONS[i] / 100,
60
+ l: LIGHTNESSES[i] / 100
61
+ });
62
+ let output;
63
+ switch (targetFormat) {
64
+ case "hex":
65
+ output = color.toHexString();
66
+ break;
67
+ case "rgb":
68
+ output = color.toRgbString();
69
+ break;
70
+ case "hsl":
71
+ output = color.toHslString();
72
+ break;
73
+ case "hsv":
74
+ output = color.toHsvString();
75
+ break;
76
+ default: output = color.toHexString();
77
+ }
78
+ shades.push(output);
79
+ }
80
+ shadeCache.set(cacheKey, shades);
81
+ return shades;
82
+ }
83
+ function clearShadeCache() {
84
+ shadeCache.clear();
85
+ }
86
+ function setColorAlpha(originalColor, alpha) {
87
+ if (Number.isNaN(Number(alpha))) throw new TypeError(`Invalid alpha: ${alpha}`);
88
+ const tc = new import_public_api.TinyColor(originalColor);
89
+ if (!tc.isValid) throw new Error(`Invalid color: ${originalColor}`);
90
+ const targetFormat = getFormat(originalColor);
91
+ tc.setAlpha(alpha);
92
+ let output;
93
+ switch (targetFormat) {
94
+ case "rgb":
95
+ output = tc.toRgbString();
96
+ break;
97
+ case "hsl":
98
+ output = tc.toHslString();
99
+ break;
100
+ case "hsv":
101
+ output = tc.toHsvString();
102
+ break;
103
+ default: output = tc.toRgbString();
104
+ }
105
+ return output;
106
+ }
107
+ //#endregion
108
+ exports.clearShadeCache = clearShadeCache;
109
+ exports.generateColorShades = generateColorShades;
110
+ exports.setColorAlpha = setColorAlpha;
111
+
112
+ //# sourceMappingURL=colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.js","names":["TinyColor"],"sources":["../../../../../packages/utils/colors.ts"],"sourcesContent":["import { TinyColor } from '@ctrl/tinycolor'\n\nconst SATURATIONS = [8, 15, 30, 55, 78, 95, 95, 92, 88, 85]\n\nconst LIGHTNESSES = [95, 88, 75, 62, 50, 40, 32, 27, 22, 18]\n\nconst shadeCache = new Map<string, string[]>()\n\nfunction getNormalizedKey(colorStr: string): string | null {\n const tc = new TinyColor(colorStr)\n if (!tc.isValid) return null\n return tc.toHexString()\n}\n\nfunction getFormat(colorStr: string): string {\n const tc = new TinyColor(colorStr)\n const fmt = tc.format\n return fmt === 'name' ? 'hex' : fmt\n}\n\n/**\n * Generates 10 shades (index 0~9, 0 lightest, 9 darkest) from a given color.\n * The output format matches the input format (hex / rgb / rgba / hsl / hsla).\n * Results are cached so repeated calls with the same color (even different formats) return instantly.\n * @param originalColor - Any valid CSS color string\n * @returns An array of 10 color strings representing the shades\n * @throws If the input color is invalid\n */\nexport function generateColorShades(originalColor: string): string[] {\n const normKey = getNormalizedKey(originalColor)\n if (!normKey) {\n throw new Error(`Invalid color: ${originalColor}`)\n }\n\n const targetFormat = getFormat(originalColor)\n const cacheKey = `${normKey}|${targetFormat}`\n\n if (shadeCache.has(cacheKey)) {\n return shadeCache.get(cacheKey)!\n }\n\n const base = new TinyColor(originalColor)\n if (!base.isValid) {\n throw new Error(`Invalid color: ${originalColor}`)\n }\n\n const { h } = base.toHsl()\n\n const shades: string[] = []\n\n for (let i = 0; i < 10; i++) {\n const color = new TinyColor({\n h,\n s: SATURATIONS[i] / 100,\n l: LIGHTNESSES[i] / 100\n })\n\n let output: string\n switch (targetFormat) {\n case 'hex':\n output = color.toHexString()\n break\n case 'rgb':\n output = color.toRgbString()\n break\n case 'hsl':\n output = color.toHslString()\n break\n case 'hsv':\n output = color.toHsvString()\n break\n default:\n output = color.toHexString()\n }\n shades.push(output)\n }\n\n shadeCache.set(cacheKey, shades)\n return shades\n}\n\nexport function clearShadeCache(): void {\n shadeCache.clear()\n}\n\nexport function setColorAlpha(originalColor: string, alpha: number): string {\n if (Number.isNaN(Number(alpha))) {\n throw new TypeError(`Invalid alpha: ${alpha}`)\n }\n\n const tc = new TinyColor(originalColor)\n if (!tc.isValid) {\n throw new Error(`Invalid color: ${originalColor}`)\n }\n\n const targetFormat = getFormat(originalColor)\n tc.setAlpha(alpha)\n\n let output: string\n switch (targetFormat) {\n case 'rgb':\n output = tc.toRgbString()\n break\n case 'hsl':\n output = tc.toHslString()\n break\n case 'hsv':\n output = tc.toHsvString()\n break\n default:\n output = tc.toRgbString()\n }\n\n return output\n}\n"],"mappings":";;;AAEA,MAAM,cAAc;CAAC;CAAG;CAAI;CAAI;CAAI;CAAI;CAAI;CAAI;CAAI;CAAI;AAAE;AAE1D,MAAM,cAAc;CAAC;CAAI;CAAI;CAAI;CAAI;CAAI;CAAI;CAAI;CAAI;CAAI;AAAE;AAE3D,MAAM,6BAAa,IAAI,IAAsB;AAE7C,SAAS,iBAAiB,UAAiC;CACzD,MAAM,KAAK,IAAIA,kBAAAA,UAAU,QAAQ;CACjC,IAAI,CAAC,GAAG,SAAS,OAAO;CACxB,OAAO,GAAG,YAAY;AACxB;AAEA,SAAS,UAAU,UAA0B;CAE3C,MAAM,MAAM,IADGA,kBAAAA,UAAU,QACZ,CAAC,CAAC;CACf,OAAO,QAAQ,SAAS,QAAQ;AAClC;;;;;;;;;AAUA,SAAgB,oBAAoB,eAAiC;CACnE,MAAM,UAAU,iBAAiB,aAAa;CAC9C,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,kBAAkB,eAAe;CAGnD,MAAM,eAAe,UAAU,aAAa;CAC5C,MAAM,WAAW,GAAG,QAAQ,GAAG;CAE/B,IAAI,WAAW,IAAI,QAAQ,GACzB,OAAO,WAAW,IAAI,QAAQ;CAGhC,MAAM,OAAO,IAAIA,kBAAAA,UAAU,aAAa;CACxC,IAAI,CAAC,KAAK,SACR,MAAM,IAAI,MAAM,kBAAkB,eAAe;CAGnD,MAAM,EAAE,MAAM,KAAK,MAAM;CAEzB,MAAM,SAAmB,CAAC;CAE1B,KAAK,IAAI,IAAI,GAAG,IAAI,IAAI,KAAK;EAC3B,MAAM,QAAQ,IAAIA,kBAAAA,UAAU;GAC1B;GACA,GAAG,YAAY,KAAK;GACpB,GAAG,YAAY,KAAK;EACtB,CAAC;EAED,IAAI;EACJ,QAAQ,cAAR;GACE,KAAK;IACH,SAAS,MAAM,YAAY;IAC3B;GACF,KAAK;IACH,SAAS,MAAM,YAAY;IAC3B;GACF,KAAK;IACH,SAAS,MAAM,YAAY;IAC3B;GACF,KAAK;IACH,SAAS,MAAM,YAAY;IAC3B;GACF,SACE,SAAS,MAAM,YAAY;EAC/B;EACA,OAAO,KAAK,MAAM;CACpB;CAEA,WAAW,IAAI,UAAU,MAAM;CAC/B,OAAO;AACT;AAEA,SAAgB,kBAAwB;CACtC,WAAW,MAAM;AACnB;AAEA,SAAgB,cAAc,eAAuB,OAAuB;CAC1E,IAAI,OAAO,MAAM,OAAO,KAAK,CAAC,GAC5B,MAAM,IAAI,UAAU,kBAAkB,OAAO;CAG/C,MAAM,KAAK,IAAIA,kBAAAA,UAAU,aAAa;CACtC,IAAI,CAAC,GAAG,SACN,MAAM,IAAI,MAAM,kBAAkB,eAAe;CAGnD,MAAM,eAAe,UAAU,aAAa;CAC5C,GAAG,SAAS,KAAK;CAEjB,IAAI;CACJ,QAAQ,cAAR;EACE,KAAK;GACH,SAAS,GAAG,YAAY;GACxB;EACF,KAAK;GACH,SAAS,GAAG,YAAY;GACxB;EACF,KAAK;GACH,SAAS,GAAG,YAAY;GACxB;EACF,SACE,SAAS,GAAG,YAAY;CAC5B;CAEA,OAAO;AACT"}
@@ -0,0 +1,3 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_style = require("./style.js");
3
+ exports.addUnit = require_style.addUnit;
@@ -0,0 +1,13 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_types = require("../types.js");
3
+ let _vue_shared = require("@vue/shared");
4
+ //#region ../../packages/utils/dom/style.ts
5
+ function addUnit(value, defaultUnit = "px") {
6
+ if (!value && value !== 0) return "";
7
+ if (require_types.isNumber(value) || require_types.isStringNumber(value)) return `${value}${defaultUnit}`;
8
+ else if ((0, _vue_shared.isString)(value)) return value;
9
+ }
10
+ //#endregion
11
+ exports.addUnit = addUnit;
12
+
13
+ //# sourceMappingURL=style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.js","names":["isNumber","isStringNumber"],"sources":["../../../../../../packages/utils/dom/style.ts"],"sourcesContent":["import { isNumber, isString, isStringNumber } from '../types'\n\n// const SCOPE = 'utils/dom/style'\n\nexport function addUnit(value?: string | number, defaultUnit = 'px') {\n if (!value && value !== 0) return ''\n if (isNumber(value) || isStringNumber(value)) {\n return `${value}${defaultUnit}`\n } else if (isString(value)) {\n return value\n }\n // debugWarn(SCOPE, 'binding value must be a string or number')\n}\n"],"mappings":";;;;AAIA,SAAgB,QAAQ,OAAyB,cAAc,MAAM;CACnE,IAAI,CAAC,SAAS,UAAU,GAAG,OAAO;CAClC,IAAIA,cAAAA,SAAS,KAAK,KAAKC,cAAAA,eAAe,KAAK,GACzC,OAAO,GAAG,QAAQ;MACb,KAAA,GAAA,YAAA,SAAA,CAAa,KAAK,GACvB,OAAO;AAGX"}
@@ -0,0 +1,21 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_colors = require("./colors.js");
3
+ const require_types = require("./types.js");
4
+ const require_style = require("./dom/style.js");
5
+ const require_install = require("./vue/install.js");
6
+ let _vue_shared = require("@vue/shared");
7
+ exports.addUnit = require_style.addUnit;
8
+ exports.clearShadeCache = require_colors.clearShadeCache;
9
+ exports.generateColorShades = require_colors.generateColorShades;
10
+ exports.isNumber = require_types.isNumber;
11
+ Object.defineProperty(exports, "isString", {
12
+ enumerable: true,
13
+ get: function() {
14
+ return _vue_shared.isString;
15
+ }
16
+ });
17
+ exports.isStringNumber = require_types.isStringNumber;
18
+ exports.isUndefined = require_types.isUndefined;
19
+ exports.setColorAlpha = require_colors.setColorAlpha;
20
+ exports.withInstall = require_install.withInstall;
21
+ exports.withPropsDefaultSetter = require_install.withPropsDefaultSetter;
@@ -0,0 +1,21 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let _vue_shared = require("@vue/shared");
3
+ //#region ../../packages/utils/types.ts
4
+ const isUndefined = (val) => val === void 0;
5
+ const isNumber = (val) => typeof val === "number";
6
+ const isStringNumber = (val) => {
7
+ if (!(0, _vue_shared.isString)(val)) return false;
8
+ return !Number.isNaN(Number(val));
9
+ };
10
+ //#endregion
11
+ exports.isNumber = isNumber;
12
+ Object.defineProperty(exports, "isString", {
13
+ enumerable: true,
14
+ get: function() {
15
+ return _vue_shared.isString;
16
+ }
17
+ });
18
+ exports.isStringNumber = isStringNumber;
19
+ exports.isUndefined = isUndefined;
20
+
21
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../../../packages/utils/types.ts"],"sourcesContent":["import { isString } from '@vue/shared'\n\nexport { isString } from '@vue/shared'\n\nexport const isUndefined = (val: any): val is undefined => val === undefined\nexport const isNumber = (val: any): val is number => typeof val === 'number'\n\nexport const isStringNumber = (val: string): boolean => {\n if (!isString(val)) {\n return false\n }\n return !Number.isNaN(Number(val))\n}\n"],"mappings":";;;AAIA,MAAa,eAAe,QAA+B,QAAQ,KAAA;AACnE,MAAa,YAAY,QAA4B,OAAO,QAAQ;AAEpE,MAAa,kBAAkB,QAAyB;CACtD,IAAI,EAAA,GAAA,YAAA,SAAA,CAAU,GAAG,GACf,OAAO;CAET,OAAO,CAAC,OAAO,MAAM,OAAO,GAAG,CAAC;AAClC"}
@@ -0,0 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_install = require("./install.js");
3
+ exports.withInstall = require_install.withInstall;
4
+ exports.withPropsDefaultSetter = require_install.withPropsDefaultSetter;
@@ -0,0 +1,40 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_isPlainObject = require("../../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.js");
3
+ let _vue_shared = require("@vue/shared");
4
+ //#region ../../packages/utils/vue/install.ts
5
+ const withPropsDefaultSetter = (target) => {
6
+ const _p = target.props;
7
+ const props = (0, _vue_shared.isArray)(_p) ? Object.fromEntries(_p.map((key) => [key, {}])) : _p;
8
+ target.setPropsDefaults = (defaults) => {
9
+ if (!props) return;
10
+ for (const [key, value] of Object.entries(defaults)) {
11
+ const prop = props[key];
12
+ if (!(0, _vue_shared.hasOwn)(props, key)) continue;
13
+ if (require_isPlainObject.isPlainObject(prop)) {
14
+ props[key] = {
15
+ ...props,
16
+ default: value
17
+ };
18
+ continue;
19
+ }
20
+ props[key] = {
21
+ type: prop,
22
+ default: value
23
+ };
24
+ }
25
+ target.props = props;
26
+ };
27
+ };
28
+ const withInstall = (main, extra) => {
29
+ main.install = (app) => {
30
+ for (const comp of [main, ...Object.values(extra ?? [])]) app.component(comp.name, comp);
31
+ };
32
+ if (extra) for (const [key, comp] of Object.entries(extra)) main[key] = comp;
33
+ withPropsDefaultSetter(main);
34
+ return main;
35
+ };
36
+ //#endregion
37
+ exports.withInstall = withInstall;
38
+ exports.withPropsDefaultSetter = withPropsDefaultSetter;
39
+
40
+ //# sourceMappingURL=install.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.js","names":["isPlainObject"],"sources":["../../../../../../packages/utils/vue/install.ts"],"sourcesContent":["import { hasOwn, isArray } from '@vue/shared'\nimport { isPlainObject } from 'es-toolkit'\nimport type { SFCWithInstall } from './typescript'\n\nexport const withPropsDefaultSetter = (target: any) => {\n const _p = target.props\n const props = isArray(_p)\n ? Object.fromEntries(_p.map((key) => [key, {}]))\n : _p\n\n target.setPropsDefaults = (defaults: Record<string, any>) => {\n if (!props) return\n\n for (const [key, value] of Object.entries(defaults)) {\n const prop = props[key]\n\n if (!hasOwn(props, key)) continue\n\n if (isPlainObject(prop)) {\n props[key] = {\n ...props,\n default: value\n }\n continue\n }\n\n props[key] = {\n type: prop,\n default: value\n }\n }\n\n target.props = props\n }\n}\n\nexport const withInstall = <T, E extends Record<string, any>>(\n main: T,\n extra?: E\n) => {\n ;(main as SFCWithInstall<T>).install = (app): void => {\n for (const comp of [main, ...Object.values(extra ?? [])]) {\n app.component(comp.name, comp)\n }\n }\n\n if (extra) {\n for (const [key, comp] of Object.entries(extra)) {\n ;(main as any)[key] = comp\n }\n }\n withPropsDefaultSetter(main)\n return main as SFCWithInstall<T> & E\n}\n"],"mappings":";;;;AAIA,MAAa,0BAA0B,WAAgB;CACrD,MAAM,KAAK,OAAO;CAClB,MAAM,SAAA,GAAA,YAAA,QAAA,CAAgB,EAAE,IACpB,OAAO,YAAY,GAAG,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAC7C;CAEJ,OAAO,oBAAoB,aAAkC;EAC3D,IAAI,CAAC,OAAO;EAEZ,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,QAAQ,GAAG;GACnD,MAAM,OAAO,MAAM;GAEnB,IAAI,EAAA,GAAA,YAAA,OAAA,CAAQ,OAAO,GAAG,GAAG;GAEzB,IAAIA,sBAAAA,cAAc,IAAI,GAAG;IACvB,MAAM,OAAO;KACX,GAAG;KACH,SAAS;IACX;IACA;GACF;GAEA,MAAM,OAAO;IACX,MAAM;IACN,SAAS;GACX;EACF;EAEA,OAAO,QAAQ;CACjB;AACF;AAEA,MAAa,eACX,MACA,UACG;CACF,KAA4B,WAAW,QAAc;EACpD,KAAK,MAAM,QAAQ,CAAC,MAAM,GAAG,OAAO,OAAO,SAAS,CAAC,CAAC,CAAC,GACrD,IAAI,UAAU,KAAK,MAAM,IAAI;CAEjC;CAEA,IAAI,OACF,KAAK,MAAM,CAAC,KAAK,SAAS,OAAO,QAAQ,KAAK,GAC3C,KAAc,OAAO;CAG1B,uBAAuB,IAAI;CAC3B,OAAO;AACT"}
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
@@ -0,0 +1,6 @@
1
+ import { Plugin } from "vue";
2
+
3
+ //#region ../../packages/cck-ui/plugin.d.ts
4
+ declare const _default: Plugin[];
5
+ //#endregion
6
+ export { _default as default };
package/lib/plugin.js ADDED
@@ -0,0 +1,10 @@
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
4
+ });
5
+ //#region ../../packages/cck-ui/plugin.ts
6
+ var plugin_default = [];
7
+ //#endregion
8
+ exports.default = plugin_default;
9
+
10
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","names":[],"sources":["../../../packages/cck-ui/plugin.ts"],"sourcesContent":["import type { Plugin } from 'vue'\n\nexport default [] as Plugin[]\n"],"mappings":";;;;;AAEA,IAAA,iBAAe,CAAC"}
@@ -0,0 +1,14 @@
1
+ //#region ../../packages/utils/colors.d.ts
2
+ /**
3
+ * Generates 10 shades (index 0~9, 0 lightest, 9 darkest) from a given color.
4
+ * The output format matches the input format (hex / rgb / rgba / hsl / hsla).
5
+ * Results are cached so repeated calls with the same color (even different formats) return instantly.
6
+ * @param originalColor - Any valid CSS color string
7
+ * @returns An array of 10 color strings representing the shades
8
+ * @throws If the input color is invalid
9
+ */
10
+ declare function generateColorShades(originalColor: string): string[];
11
+ declare function clearShadeCache(): void;
12
+ declare function setColorAlpha(originalColor: string, alpha: number): string;
13
+ //#endregion
14
+ export { clearShadeCache, generateColorShades, setColorAlpha };
@@ -0,0 +1,2 @@
1
+ import { addUnit } from "./style.js";
2
+ export { addUnit };
@@ -0,0 +1,4 @@
1
+ //#region ../../packages/utils/dom/style.d.ts
2
+ declare function addUnit(value?: string | number, defaultUnit?: string): string | undefined;
3
+ //#endregion
4
+ export { addUnit };
@@ -0,0 +1,6 @@
1
+ import { clearShadeCache, generateColorShades, setColorAlpha } from "./colors.js";
2
+ import { addUnit } from "./dom/style.js";
3
+ import { EmitFn, SFCInstallWithContext, SFCWithInstall, SFCWithPropsDefaultSetter } from "./vue/typescript.js";
4
+ import { withInstall, withPropsDefaultSetter } from "./vue/install.js";
5
+ import { isNumber, isString, isStringNumber, isUndefined } from "./types.js";
6
+ export { EmitFn, SFCInstallWithContext, SFCWithInstall, SFCWithPropsDefaultSetter, addUnit, clearShadeCache, generateColorShades, isNumber, isString, isStringNumber, isUndefined, setColorAlpha, withInstall, withPropsDefaultSetter };
@@ -0,0 +1,8 @@
1
+ import { isString } from "@vue/shared";
2
+
3
+ //#region ../../packages/utils/types.d.ts
4
+ declare const isUndefined: (val: any) => val is undefined;
5
+ declare const isNumber: (val: any) => val is number;
6
+ declare const isStringNumber: (val: string) => boolean;
7
+ //#endregion
8
+ export { isNumber, isString, isStringNumber, isUndefined };
@@ -0,0 +1,3 @@
1
+ import { EmitFn, SFCInstallWithContext, SFCWithInstall, SFCWithPropsDefaultSetter } from "./typescript.js";
2
+ import { withInstall, withPropsDefaultSetter } from "./install.js";
3
+ export { EmitFn, SFCInstallWithContext, SFCWithInstall, SFCWithPropsDefaultSetter, withInstall, withPropsDefaultSetter };
@@ -0,0 +1,7 @@
1
+ import { SFCWithInstall } from "./typescript.js";
2
+
3
+ //#region ../../packages/utils/vue/install.d.ts
4
+ declare const withPropsDefaultSetter: (target: any) => void;
5
+ declare const withInstall: <T, E extends Record<string, any>>(main: T, extra?: E) => SFCWithInstall<T> & E;
6
+ //#endregion
7
+ export { withInstall, withPropsDefaultSetter };
@@ -0,0 +1,19 @@
1
+ import { AllowedComponentProps, AppContext, Component, EmitsOptions, ObjectPlugin, SetupContext, VNodeProps } from "vue";
2
+ import { ComponentEmit, ComponentProps } from "vue-component-type-helpers";
3
+
4
+ //#region ../../packages/utils/vue/typescript.d.ts
5
+ type NativeType = null | undefined | number | string | boolean | symbol | Function;
6
+ type InferDefaults<T> = { [K in keyof T as string extends K ? never : K]?: InferDefault<T[K]> };
7
+ type InferDefault<T> = (() => T & {}) | (T extends NativeType ? T : never);
8
+ type ExtractEventNames<T> = ComponentEmit<T> extends ((event: string, ...args: any[]) => any) ? never : keyof { [K in keyof ComponentProps<T> as K extends `on${infer Event}` ? ComponentEmit<T> extends ((event: Uncapitalize<Event>, ...args: any[]) => any) ? K : never : never]: unknown };
9
+ type ExcludeProps<T> = ExtractEventNames<T> | keyof VNodeProps | keyof AllowedComponentProps;
10
+ type SFCWithInstall<T> = T & ObjectPlugin & SFCWithPropsDefaultSetter<T>;
11
+ type SFCInstallWithContext<T> = SFCWithInstall<T> & {
12
+ _context: AppContext | null;
13
+ };
14
+ type SFCWithPropsDefaultSetter<T> = T extends Component ? {
15
+ setPropsDefault: (defaults: InferDefaults<{ [K in keyof ComponentProps<T> as K extends ExcludeProps<T> ? never : K]?: ComponentProps<T>[K] }>) => void;
16
+ } : unknown;
17
+ type EmitFn<E extends EmitsOptions> = SetupContext<E>['emit'];
18
+ //#endregion
19
+ export { EmitFn, SFCInstallWithContext, SFCWithInstall, SFCWithPropsDefaultSetter };