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,255 @@
1
+ "use strict";
2
+ const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.js");
3
+ const require_index = require("./index.js");
4
+ //#region ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/random.js
5
+ var require_random = /* @__PURE__ */ require_runtime.__commonJSMin(((exports) => {
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.bounds = exports.random = void 0;
8
+ const index_js_1 = require_index.default;
9
+ function random(options = {}) {
10
+ if (options.count !== void 0 && options.count !== null) {
11
+ const totalColors = options.count;
12
+ const colors = [];
13
+ options.count = void 0;
14
+ while (totalColors > colors.length) {
15
+ options.count = null;
16
+ if (options.seed) options.seed += 1;
17
+ colors.push(random(options));
18
+ }
19
+ options.count = totalColors;
20
+ return colors;
21
+ }
22
+ const h = pickHue(options.hue, options.seed);
23
+ const s = pickSaturation(h, options);
24
+ const res = {
25
+ h,
26
+ s,
27
+ v: pickBrightness(h, s, options)
28
+ };
29
+ if (options.alpha !== void 0) res.a = options.alpha;
30
+ return new index_js_1.TinyColor(res);
31
+ }
32
+ exports.random = random;
33
+ function pickHue(hue, seed) {
34
+ let res = randomWithin(getHueRange(hue), seed);
35
+ if (res < 0) res = 360 + res;
36
+ return res;
37
+ }
38
+ function pickSaturation(hue, options) {
39
+ if (options.hue === "monochrome") return 0;
40
+ if (options.luminosity === "random") return randomWithin([0, 100], options.seed);
41
+ const { saturationRange } = getColorInfo(hue);
42
+ let sMin = saturationRange[0];
43
+ let sMax = saturationRange[1];
44
+ switch (options.luminosity) {
45
+ case "bright":
46
+ sMin = 55;
47
+ break;
48
+ case "dark":
49
+ sMin = sMax - 10;
50
+ break;
51
+ case "light":
52
+ sMax = 55;
53
+ break;
54
+ default: break;
55
+ }
56
+ return randomWithin([sMin, sMax], options.seed);
57
+ }
58
+ function pickBrightness(H, S, options) {
59
+ let bMin = getMinimumBrightness(H, S);
60
+ let bMax = 100;
61
+ switch (options.luminosity) {
62
+ case "dark":
63
+ bMax = bMin + 20;
64
+ break;
65
+ case "light":
66
+ bMin = (bMax + bMin) / 2;
67
+ break;
68
+ case "random":
69
+ bMin = 0;
70
+ bMax = 100;
71
+ break;
72
+ default: break;
73
+ }
74
+ return randomWithin([bMin, bMax], options.seed);
75
+ }
76
+ function getMinimumBrightness(H, S) {
77
+ const { lowerBounds } = getColorInfo(H);
78
+ for (let i = 0; i < lowerBounds.length - 1; i++) {
79
+ const s1 = lowerBounds[i][0];
80
+ const v1 = lowerBounds[i][1];
81
+ const s2 = lowerBounds[i + 1][0];
82
+ const v2 = lowerBounds[i + 1][1];
83
+ if (S >= s1 && S <= s2) {
84
+ const m = (v2 - v1) / (s2 - s1);
85
+ const b = v1 - m * s1;
86
+ return m * S + b;
87
+ }
88
+ }
89
+ return 0;
90
+ }
91
+ function getHueRange(colorInput) {
92
+ const num = parseInt(colorInput, 10);
93
+ if (!Number.isNaN(num) && num < 360 && num > 0) return [num, num];
94
+ if (typeof colorInput === "string") {
95
+ const namedColor = exports.bounds.find((n) => n.name === colorInput);
96
+ if (namedColor) {
97
+ const color = defineColor(namedColor);
98
+ if (color.hueRange) return color.hueRange;
99
+ }
100
+ const parsed = new index_js_1.TinyColor(colorInput);
101
+ if (parsed.isValid) {
102
+ const hue = parsed.toHsv().h;
103
+ return [hue, hue];
104
+ }
105
+ }
106
+ return [0, 360];
107
+ }
108
+ function getColorInfo(hue) {
109
+ if (hue >= 334 && hue <= 360) hue -= 360;
110
+ for (const bound of exports.bounds) {
111
+ const color = defineColor(bound);
112
+ if (color.hueRange && hue >= color.hueRange[0] && hue <= color.hueRange[1]) return color;
113
+ }
114
+ throw Error("Color not found");
115
+ }
116
+ function randomWithin(range, seed) {
117
+ if (seed === void 0) return Math.floor(range[0] + Math.random() * (range[1] + 1 - range[0]));
118
+ const max = range[1] || 1;
119
+ const min = range[0] || 0;
120
+ seed = (seed * 9301 + 49297) % 233280;
121
+ const rnd = seed / 233280;
122
+ return Math.floor(min + rnd * (max - min));
123
+ }
124
+ function defineColor(bound) {
125
+ const sMin = bound.lowerBounds[0][0];
126
+ const sMax = bound.lowerBounds[bound.lowerBounds.length - 1][0];
127
+ const bMin = bound.lowerBounds[bound.lowerBounds.length - 1][1];
128
+ const bMax = bound.lowerBounds[0][1];
129
+ return {
130
+ name: bound.name,
131
+ hueRange: bound.hueRange,
132
+ lowerBounds: bound.lowerBounds,
133
+ saturationRange: [sMin, sMax],
134
+ brightnessRange: [bMin, bMax]
135
+ };
136
+ }
137
+ /**
138
+ * @hidden
139
+ */
140
+ exports.bounds = [
141
+ {
142
+ name: "monochrome",
143
+ hueRange: null,
144
+ lowerBounds: [[0, 0], [100, 0]]
145
+ },
146
+ {
147
+ name: "red",
148
+ hueRange: [-26, 18],
149
+ lowerBounds: [
150
+ [20, 100],
151
+ [30, 92],
152
+ [40, 89],
153
+ [50, 85],
154
+ [60, 78],
155
+ [70, 70],
156
+ [80, 60],
157
+ [90, 55],
158
+ [100, 50]
159
+ ]
160
+ },
161
+ {
162
+ name: "orange",
163
+ hueRange: [19, 46],
164
+ lowerBounds: [
165
+ [20, 100],
166
+ [30, 93],
167
+ [40, 88],
168
+ [50, 86],
169
+ [60, 85],
170
+ [70, 70],
171
+ [100, 70]
172
+ ]
173
+ },
174
+ {
175
+ name: "yellow",
176
+ hueRange: [47, 62],
177
+ lowerBounds: [
178
+ [25, 100],
179
+ [40, 94],
180
+ [50, 89],
181
+ [60, 86],
182
+ [70, 84],
183
+ [80, 82],
184
+ [90, 80],
185
+ [100, 75]
186
+ ]
187
+ },
188
+ {
189
+ name: "green",
190
+ hueRange: [63, 178],
191
+ lowerBounds: [
192
+ [30, 100],
193
+ [40, 90],
194
+ [50, 85],
195
+ [60, 81],
196
+ [70, 74],
197
+ [80, 64],
198
+ [90, 50],
199
+ [100, 40]
200
+ ]
201
+ },
202
+ {
203
+ name: "blue",
204
+ hueRange: [179, 257],
205
+ lowerBounds: [
206
+ [20, 100],
207
+ [30, 86],
208
+ [40, 80],
209
+ [50, 74],
210
+ [60, 60],
211
+ [70, 52],
212
+ [80, 44],
213
+ [90, 39],
214
+ [100, 35]
215
+ ]
216
+ },
217
+ {
218
+ name: "purple",
219
+ hueRange: [258, 282],
220
+ lowerBounds: [
221
+ [20, 100],
222
+ [30, 87],
223
+ [40, 79],
224
+ [50, 70],
225
+ [60, 65],
226
+ [70, 59],
227
+ [80, 52],
228
+ [90, 45],
229
+ [100, 42]
230
+ ]
231
+ },
232
+ {
233
+ name: "pink",
234
+ hueRange: [283, 334],
235
+ lowerBounds: [
236
+ [20, 100],
237
+ [30, 90],
238
+ [40, 86],
239
+ [60, 84],
240
+ [80, 80],
241
+ [90, 75],
242
+ [100, 73]
243
+ ]
244
+ }
245
+ ];
246
+ }));
247
+ //#endregion
248
+ Object.defineProperty(exports, "default", {
249
+ enumerable: true,
250
+ get: function() {
251
+ return require_random();
252
+ }
253
+ });
254
+
255
+ //# sourceMappingURL=random.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/random.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.bounds = exports.random = void 0;\n// randomColor by David Merfield under the CC0 license\n// https://github.com/davidmerfield/randomColor/\nconst index_js_1 = require(\"./index.js\");\nfunction random(options = {}) {\n // Check if we need to generate multiple colors\n if (options.count !== undefined &&\n options.count !== null) {\n const totalColors = options.count;\n const colors = [];\n options.count = undefined;\n while (totalColors > colors.length) {\n // Since we're generating multiple colors,\n // incremement the seed. Otherwise we'd just\n // generate the same color each time...\n options.count = null;\n if (options.seed) {\n options.seed += 1;\n }\n colors.push(random(options));\n }\n options.count = totalColors;\n return colors;\n }\n // First we pick a hue (H)\n const h = pickHue(options.hue, options.seed);\n // Then use H to determine saturation (S)\n const s = pickSaturation(h, options);\n // Then use S and H to determine brightness (B).\n const v = pickBrightness(h, s, options);\n const res = { h, s, v };\n if (options.alpha !== undefined) {\n res.a = options.alpha;\n }\n // Then we return the HSB color in the desired format\n return new index_js_1.TinyColor(res);\n}\nexports.random = random;\nfunction pickHue(hue, seed) {\n const hueRange = getHueRange(hue);\n let res = randomWithin(hueRange, seed);\n // Instead of storing red as two seperate ranges,\n // we group them, using negative numbers\n if (res < 0) {\n res = 360 + res;\n }\n return res;\n}\nfunction pickSaturation(hue, options) {\n if (options.hue === 'monochrome') {\n return 0;\n }\n if (options.luminosity === 'random') {\n return randomWithin([0, 100], options.seed);\n }\n const { saturationRange } = getColorInfo(hue);\n let sMin = saturationRange[0];\n let sMax = saturationRange[1];\n switch (options.luminosity) {\n case 'bright':\n sMin = 55;\n break;\n case 'dark':\n sMin = sMax - 10;\n break;\n case 'light':\n sMax = 55;\n break;\n default:\n break;\n }\n return randomWithin([sMin, sMax], options.seed);\n}\nfunction pickBrightness(H, S, options) {\n let bMin = getMinimumBrightness(H, S);\n let bMax = 100;\n switch (options.luminosity) {\n case 'dark':\n bMax = bMin + 20;\n break;\n case 'light':\n bMin = (bMax + bMin) / 2;\n break;\n case 'random':\n bMin = 0;\n bMax = 100;\n break;\n default:\n break;\n }\n return randomWithin([bMin, bMax], options.seed);\n}\nfunction getMinimumBrightness(H, S) {\n const { lowerBounds } = getColorInfo(H);\n for (let i = 0; i < lowerBounds.length - 1; i++) {\n const s1 = lowerBounds[i][0];\n const v1 = lowerBounds[i][1];\n const s2 = lowerBounds[i + 1][0];\n const v2 = lowerBounds[i + 1][1];\n if (S >= s1 && S <= s2) {\n const m = (v2 - v1) / (s2 - s1);\n const b = v1 - m * s1;\n return m * S + b;\n }\n }\n return 0;\n}\nfunction getHueRange(colorInput) {\n const num = parseInt(colorInput, 10);\n if (!Number.isNaN(num) && num < 360 && num > 0) {\n return [num, num];\n }\n if (typeof colorInput === 'string') {\n const namedColor = exports.bounds.find(n => n.name === colorInput);\n if (namedColor) {\n const color = defineColor(namedColor);\n if (color.hueRange) {\n return color.hueRange;\n }\n }\n const parsed = new index_js_1.TinyColor(colorInput);\n if (parsed.isValid) {\n const hue = parsed.toHsv().h;\n return [hue, hue];\n }\n }\n return [0, 360];\n}\nfunction getColorInfo(hue) {\n // Maps red colors to make picking hue easier\n if (hue >= 334 && hue <= 360) {\n hue -= 360;\n }\n for (const bound of exports.bounds) {\n const color = defineColor(bound);\n if (color.hueRange && hue >= color.hueRange[0] && hue <= color.hueRange[1]) {\n return color;\n }\n }\n throw Error('Color not found');\n}\nfunction randomWithin(range, seed) {\n if (seed === undefined) {\n return Math.floor(range[0] + Math.random() * (range[1] + 1 - range[0]));\n }\n // Seeded random algorithm from http://indiegamr.com/generate-repeatable-random-numbers-in-js/\n const max = range[1] || 1;\n const min = range[0] || 0;\n seed = (seed * 9301 + 49297) % 233280;\n const rnd = seed / 233280.0;\n return Math.floor(min + rnd * (max - min));\n}\nfunction defineColor(bound) {\n const sMin = bound.lowerBounds[0][0];\n const sMax = bound.lowerBounds[bound.lowerBounds.length - 1][0];\n const bMin = bound.lowerBounds[bound.lowerBounds.length - 1][1];\n const bMax = bound.lowerBounds[0][1];\n return {\n name: bound.name,\n hueRange: bound.hueRange,\n lowerBounds: bound.lowerBounds,\n saturationRange: [sMin, sMax],\n brightnessRange: [bMin, bMax],\n };\n}\n/**\n * @hidden\n */\nexports.bounds = [\n {\n name: 'monochrome',\n hueRange: null,\n lowerBounds: [\n [0, 0],\n [100, 0],\n ],\n },\n {\n name: 'red',\n hueRange: [-26, 18],\n lowerBounds: [\n [20, 100],\n [30, 92],\n [40, 89],\n [50, 85],\n [60, 78],\n [70, 70],\n [80, 60],\n [90, 55],\n [100, 50],\n ],\n },\n {\n name: 'orange',\n hueRange: [19, 46],\n lowerBounds: [\n [20, 100],\n [30, 93],\n [40, 88],\n [50, 86],\n [60, 85],\n [70, 70],\n [100, 70],\n ],\n },\n {\n name: 'yellow',\n hueRange: [47, 62],\n lowerBounds: [\n [25, 100],\n [40, 94],\n [50, 89],\n [60, 86],\n [70, 84],\n [80, 82],\n [90, 80],\n [100, 75],\n ],\n },\n {\n name: 'green',\n hueRange: [63, 178],\n lowerBounds: [\n [30, 100],\n [40, 90],\n [50, 85],\n [60, 81],\n [70, 74],\n [80, 64],\n [90, 50],\n [100, 40],\n ],\n },\n {\n name: 'blue',\n hueRange: [179, 257],\n lowerBounds: [\n [20, 100],\n [30, 86],\n [40, 80],\n [50, 74],\n [60, 60],\n [70, 52],\n [80, 44],\n [90, 39],\n [100, 35],\n ],\n },\n {\n name: 'purple',\n hueRange: [258, 282],\n lowerBounds: [\n [20, 100],\n [30, 87],\n [40, 79],\n [50, 70],\n [60, 65],\n [70, 59],\n [80, 52],\n [90, 45],\n [100, 42],\n ],\n },\n {\n name: 'pink',\n hueRange: [283, 334],\n lowerBounds: [\n [20, 100],\n [30, 90],\n [40, 86],\n [60, 84],\n [80, 80],\n [90, 75],\n [100, 73],\n ],\n },\n];\n"],"x_google_ignoreList":[0],"mappings":";;;;;CACA,OAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;CAC5D,QAAQ,SAAS,QAAQ,SAAS,KAAK;CAGvC,MAAM,aAAA,cAAA;CACN,SAAS,OAAO,UAAU,CAAC,GAAG;EAE1B,IAAI,QAAQ,UAAU,KAAA,KAClB,QAAQ,UAAU,MAAM;GACxB,MAAM,cAAc,QAAQ;GAC5B,MAAM,SAAS,CAAC;GAChB,QAAQ,QAAQ,KAAA;GAChB,OAAO,cAAc,OAAO,QAAQ;IAIhC,QAAQ,QAAQ;IAChB,IAAI,QAAQ,MACR,QAAQ,QAAQ;IAEpB,OAAO,KAAK,OAAO,OAAO,CAAC;GAC/B;GACA,QAAQ,QAAQ;GAChB,OAAO;EACX;EAEA,MAAM,IAAI,QAAQ,QAAQ,KAAK,QAAQ,IAAI;EAE3C,MAAM,IAAI,eAAe,GAAG,OAAO;EAGn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AI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,KAAK,EAAE;GACZ;EACJ;EACA;GACI,MAAM;GACN,UAAU,CAAC,IAAI,GAAG;GAClB,aAAa;IACT,CAAC,IAAI,GAAG;IACR,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,KAAK,EAAE;GACZ;EACJ;EACA;GACI,MAAM;GACN,UAAU,CAAC,KAAK,GAAG;GACnB,aAAa;IACT,CAAC,IAAI,GAAG;IACR,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,KAAK,EAAE;GACZ;EACJ;EACA;GACI,MAAM;GACN,UAAU,CAAC,KAAK,GAAG;GACnB,aAAa;IACT,CAAC,IAAI,GAAG;IACR,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,KAAK,EAAE;GACZ;EACJ;EACA;GACI,MAAM;GACN,UAAU,CAAC,KAAK,GAAG;GACnB,aAAa;IACT,CAAC,IAAI,GAAG;IACR,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,IAAI,EAAE;IACP,CAAC,KAAK,EAAE;GACZ;EACJ;CACJ"}
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.js");
3
+ const require_index = require("./index.js");
4
+ //#region ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/readability.js
5
+ var require_readability = /* @__PURE__ */ require_runtime.__commonJSMin(((exports) => {
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.mostReadable = exports.isReadable = exports.readability = void 0;
8
+ const index_js_1 = require_index.default;
9
+ /**
10
+ * AKA `contrast`
11
+ *
12
+ * Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
13
+ */
14
+ function readability(color1, color2) {
15
+ const c1 = new index_js_1.TinyColor(color1);
16
+ const c2 = new index_js_1.TinyColor(color2);
17
+ return (Math.max(c1.getLuminance(), c2.getLuminance()) + .05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + .05);
18
+ }
19
+ exports.readability = readability;
20
+ /**
21
+ * Ensure that foreground and background color combinations meet WCAG2 guidelines.
22
+ * The third argument is an object.
23
+ * the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
24
+ * the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
25
+ * If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
26
+ *
27
+ * Example
28
+ * ```ts
29
+ * new TinyColor().isReadable('#000', '#111') => false
30
+ * new TinyColor().isReadable('#000', '#111', { level: 'AA', size: 'large' }) => false
31
+ * ```
32
+ */
33
+ function isReadable(color1, color2, wcag2 = {
34
+ level: "AA",
35
+ size: "small"
36
+ }) {
37
+ const readabilityLevel = readability(color1, color2);
38
+ switch ((wcag2.level ?? "AA") + (wcag2.size ?? "small")) {
39
+ case "AAsmall":
40
+ case "AAAlarge": return readabilityLevel >= 4.5;
41
+ case "AAlarge": return readabilityLevel >= 3;
42
+ case "AAAsmall": return readabilityLevel >= 7;
43
+ default: return false;
44
+ }
45
+ }
46
+ exports.isReadable = isReadable;
47
+ /**
48
+ * Given a base color and a list of possible foreground or background
49
+ * colors for that base, returns the most readable color.
50
+ * Optionally returns Black or White if the most readable color is unreadable.
51
+ *
52
+ * @param baseColor - the base color.
53
+ * @param colorList - array of colors to pick the most readable one from.
54
+ * @param args - and object with extra arguments
55
+ *
56
+ * Example
57
+ * ```ts
58
+ * new TinyColor().mostReadable('#123', ['#124", "#125'], { includeFallbackColors: false }).toHexString(); // "#112255"
59
+ * new TinyColor().mostReadable('#123', ['#124", "#125'],{ includeFallbackColors: true }).toHexString(); // "#ffffff"
60
+ * new TinyColor().mostReadable('#a8015a', ["#faf3f3"], { includeFallbackColors:true, level: 'AAA', size: 'large' }).toHexString(); // "#faf3f3"
61
+ * new TinyColor().mostReadable('#a8015a', ["#faf3f3"], { includeFallbackColors:true, level: 'AAA', size: 'small' }).toHexString(); // "#ffffff"
62
+ * ```
63
+ */
64
+ function mostReadable(baseColor, colorList, args = {
65
+ includeFallbackColors: false,
66
+ level: "AA",
67
+ size: "small"
68
+ }) {
69
+ let bestColor = null;
70
+ let bestScore = 0;
71
+ const { includeFallbackColors, level, size } = args;
72
+ for (const color of colorList) {
73
+ const score = readability(baseColor, color);
74
+ if (score > bestScore) {
75
+ bestScore = score;
76
+ bestColor = new index_js_1.TinyColor(color);
77
+ }
78
+ }
79
+ if (isReadable(baseColor, bestColor, {
80
+ level,
81
+ size
82
+ }) || !includeFallbackColors) return bestColor;
83
+ args.includeFallbackColors = false;
84
+ return mostReadable(baseColor, ["#fff", "#000"], args);
85
+ }
86
+ exports.mostReadable = mostReadable;
87
+ }));
88
+ //#endregion
89
+ Object.defineProperty(exports, "default", {
90
+ enumerable: true,
91
+ get: function() {
92
+ return require_readability();
93
+ }
94
+ });
95
+
96
+ //# sourceMappingURL=readability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readability.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/readability.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mostReadable = exports.isReadable = exports.readability = void 0;\nconst index_js_1 = require(\"./index.js\");\n// Readability Functions\n// ---------------------\n// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)\n/**\n * AKA `contrast`\n *\n * Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)\n */\nfunction readability(color1, color2) {\n const c1 = new index_js_1.TinyColor(color1);\n const c2 = new index_js_1.TinyColor(color2);\n return ((Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) /\n (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05));\n}\nexports.readability = readability;\n/**\n * Ensure that foreground and background color combinations meet WCAG2 guidelines.\n * The third argument is an object.\n * the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';\n * the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.\n * If the entire object is absent, isReadable defaults to {level:\"AA\",size:\"small\"}.\n *\n * Example\n * ```ts\n * new TinyColor().isReadable('#000', '#111') => false\n * new TinyColor().isReadable('#000', '#111', { level: 'AA', size: 'large' }) => false\n * ```\n */\nfunction isReadable(color1, color2, wcag2 = { level: 'AA', size: 'small' }) {\n const readabilityLevel = readability(color1, color2);\n switch ((wcag2.level ?? 'AA') + (wcag2.size ?? 'small')) {\n case 'AAsmall':\n case 'AAAlarge':\n return readabilityLevel >= 4.5;\n case 'AAlarge':\n return readabilityLevel >= 3;\n case 'AAAsmall':\n return readabilityLevel >= 7;\n default:\n return false;\n }\n}\nexports.isReadable = isReadable;\n/**\n * Given a base color and a list of possible foreground or background\n * colors for that base, returns the most readable color.\n * Optionally returns Black or White if the most readable color is unreadable.\n *\n * @param baseColor - the base color.\n * @param colorList - array of colors to pick the most readable one from.\n * @param args - and object with extra arguments\n *\n * Example\n * ```ts\n * new TinyColor().mostReadable('#123', ['#124\", \"#125'], { includeFallbackColors: false }).toHexString(); // \"#112255\"\n * new TinyColor().mostReadable('#123', ['#124\", \"#125'],{ includeFallbackColors: true }).toHexString(); // \"#ffffff\"\n * new TinyColor().mostReadable('#a8015a', [\"#faf3f3\"], { includeFallbackColors:true, level: 'AAA', size: 'large' }).toHexString(); // \"#faf3f3\"\n * new TinyColor().mostReadable('#a8015a', [\"#faf3f3\"], { includeFallbackColors:true, level: 'AAA', size: 'small' }).toHexString(); // \"#ffffff\"\n * ```\n */\nfunction mostReadable(baseColor, colorList, args = { includeFallbackColors: false, level: 'AA', size: 'small' }) {\n let bestColor = null;\n let bestScore = 0;\n const { includeFallbackColors, level, size } = args;\n for (const color of colorList) {\n const score = readability(baseColor, color);\n if (score > bestScore) {\n bestScore = score;\n bestColor = new index_js_1.TinyColor(color);\n }\n }\n if (isReadable(baseColor, bestColor, { level, size }) || !includeFallbackColors) {\n return bestColor;\n }\n args.includeFallbackColors = false;\n return mostReadable(baseColor, ['#fff', '#000'], args);\n}\nexports.mostReadable = mostReadable;\n"],"x_google_ignoreList":[0],"mappings":";;;;;CACA,OAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;CAC5D,QAAQ,eAAe,QAAQ,aAAa,QAAQ,cAAc,KAAK;CACvE,MAAM,aAAA,cAAA;;;;;;CASN,SAAS,YAAY,QAAQ,QAAQ;EACjC,MAAM,KAAK,IAAI,WAAW,UAAU,MAAM;EAC1C,MAAM,KAAK,IAAI,WAAW,UAAU,MAAM;EAC1C,QAAS,KAAK,IAAI,GAAG,aAAa,GAAG,GAAG,aAAa,CAAC,IAAI,QACrD,KAAK,IAAI,GAAG,aAAa,GAAG,GAAG,aAAa,CAAC,IAAI;CAC1D;CACA,QAAQ,cAAc;;;;;;;;;;;;;;CActB,SAAS,WAAW,QAAQ,QAAQ,QAAQ;EAAE,OAAO;EAAM,MAAM;CAAQ,GAAG;EACxE,MAAM,mBAAmB,YAAY,QAAQ,MAAM;EACnD,SAAS,MAAM,SAAS,SAAS,MAAM,QAAQ,UAA/C;GACI,KAAK;GACL,KAAK,YACD,OAAO,oBAAoB;GAC/B,KAAK,WACD,OAAO,oBAAoB;GAC/B,KAAK,YACD,OAAO,oBAAoB;GAC/B,SACI,OAAO;EACf;CACJ;CACA,QAAQ,aAAa;;;;;;;;;;;;;;;;;;CAkBrB,SAAS,aAAa,WAAW,WAAW,OAAO;EAAE,uBAAuB;EAAO,OAAO;EAAM,MAAM;CAAQ,GAAG;EAC7G,IAAI,YAAY;EAChB,IAAI,YAAY;EAChB,MAAM,EAAE,uBAAuB,OAAO,SAAS;EAC/C,KAAK,MAAM,SAAS,WAAW;GAC3B,MAAM,QAAQ,YAAY,WAAW,KAAK;GAC1C,IAAI,QAAQ,WAAW;IACnB,YAAY;IACZ,YAAY,IAAI,WAAW,UAAU,KAAK;GAC9C;EACJ;EACA,IAAI,WAAW,WAAW,WAAW;GAAE;GAAO;EAAK,CAAC,KAAK,CAAC,uBACtD,OAAO;EAEX,KAAK,wBAAwB;EAC7B,OAAO,aAAa,WAAW,CAAC,QAAQ,MAAM,GAAG,IAAI;CACzD;CACA,QAAQ,eAAe"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ const require_runtime = require("../../../../../../../_virtual/_rolldown/runtime.js");
3
+ const require_conversion$1 = require("./conversion.js");
4
+ const require_index = require("./index.js");
5
+ //#region ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/to-ms-filter.js
6
+ var require_to_ms_filter = /* @__PURE__ */ require_runtime.__commonJSMin(((exports) => {
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.toMsFilter = void 0;
9
+ const conversion_js_1 = require_conversion$1.default;
10
+ const index_js_1 = require_index.default;
11
+ /**
12
+ * Returns the color represented as a Microsoft filter for use in old versions of IE.
13
+ */
14
+ function toMsFilter(firstColor, secondColor) {
15
+ const color = new index_js_1.TinyColor(firstColor);
16
+ const hex8String = "#" + (0, conversion_js_1.rgbaToArgbHex)(color.r, color.g, color.b, color.a);
17
+ let secondHex8String = hex8String;
18
+ const gradientType = color.gradientType ? "GradientType = 1, " : "";
19
+ if (secondColor) {
20
+ const s = new index_js_1.TinyColor(secondColor);
21
+ secondHex8String = "#" + (0, conversion_js_1.rgbaToArgbHex)(s.r, s.g, s.b, s.a);
22
+ }
23
+ return `progid:DXImageTransform.Microsoft.gradient(${gradientType}startColorstr=${hex8String},endColorstr=${secondHex8String})`;
24
+ }
25
+ exports.toMsFilter = toMsFilter;
26
+ }));
27
+ //#endregion
28
+ Object.defineProperty(exports, "default", {
29
+ enumerable: true,
30
+ get: function() {
31
+ return require_to_ms_filter();
32
+ }
33
+ });
34
+
35
+ //# sourceMappingURL=to-ms-filter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-ms-filter.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/to-ms-filter.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toMsFilter = void 0;\nconst conversion_js_1 = require(\"./conversion.js\");\nconst index_js_1 = require(\"./index.js\");\n/**\n * Returns the color represented as a Microsoft filter for use in old versions of IE.\n */\nfunction toMsFilter(firstColor, secondColor) {\n const color = new index_js_1.TinyColor(firstColor);\n const hex8String = '#' + (0, conversion_js_1.rgbaToArgbHex)(color.r, color.g, color.b, color.a);\n let secondHex8String = hex8String;\n const gradientType = color.gradientType ? 'GradientType = 1, ' : '';\n if (secondColor) {\n const s = new index_js_1.TinyColor(secondColor);\n secondHex8String = '#' + (0, conversion_js_1.rgbaToArgbHex)(s.r, s.g, s.b, s.a);\n }\n return `progid:DXImageTransform.Microsoft.gradient(${gradientType}startColorstr=${hex8String},endColorstr=${secondHex8String})`;\n}\nexports.toMsFilter = toMsFilter;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;CACA,OAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;CAC5D,QAAQ,aAAa,KAAK;CAC1B,MAAM,kBAAA,qBAAA;CACN,MAAM,aAAA,cAAA;;;;CAIN,SAAS,WAAW,YAAY,aAAa;EACzC,MAAM,QAAQ,IAAI,WAAW,UAAU,UAAU;EACjD,MAAM,aAAa,OAAO,GAAG,gBAAgB,cAAA,CAAe,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;EAC9F,IAAI,mBAAmB;EACvB,MAAM,eAAe,MAAM,eAAe,uBAAuB;EACjE,IAAI,aAAa;GACb,MAAM,IAAI,IAAI,WAAW,UAAU,WAAW;GAC9C,mBAAmB,OAAO,GAAG,gBAAgB,cAAA,CAAe,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;EAClF;EACA,OAAO,8CAA8C,aAAa,gBAAgB,WAAW,eAAe,iBAAiB;CACjI;CACA,QAAQ,aAAa"}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ //#region ../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/util.js
3
+ var require_util = /* @__PURE__ */ require("../../../../../../../_virtual/_rolldown/runtime.js").__commonJSMin(((exports) => {
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.pad2 = exports.convertToPercentage = exports.boundAlpha = exports.isPercentage = exports.isOnePointZero = exports.clamp01 = exports.bound01 = void 0;
6
+ /**
7
+ * Take input from [0, n] and return it as [0, 1]
8
+ * @hidden
9
+ */
10
+ function bound01(n, max) {
11
+ if (isOnePointZero(n)) n = "100%";
12
+ const isPercent = isPercentage(n);
13
+ n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
14
+ if (isPercent) n = parseInt(String(n * max), 10) / 100;
15
+ if (Math.abs(n - max) < 1e-6) return 1;
16
+ if (max === 360) n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
17
+ else n = n % max / parseFloat(String(max));
18
+ return n;
19
+ }
20
+ exports.bound01 = bound01;
21
+ /**
22
+ * Force a number between 0 and 1
23
+ * @hidden
24
+ */
25
+ function clamp01(val) {
26
+ return Math.min(1, Math.max(0, val));
27
+ }
28
+ exports.clamp01 = clamp01;
29
+ /**
30
+ * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
31
+ * <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
32
+ * @hidden
33
+ */
34
+ function isOnePointZero(n) {
35
+ return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
36
+ }
37
+ exports.isOnePointZero = isOnePointZero;
38
+ /**
39
+ * Check to see if string passed in is a percentage
40
+ * @hidden
41
+ */
42
+ function isPercentage(n) {
43
+ return typeof n === "string" && n.indexOf("%") !== -1;
44
+ }
45
+ exports.isPercentage = isPercentage;
46
+ /**
47
+ * Return a valid alpha value [0,1] with all invalid values being set to 1
48
+ * @hidden
49
+ */
50
+ function boundAlpha(a) {
51
+ a = parseFloat(a);
52
+ if (isNaN(a) || a < 0 || a > 1) a = 1;
53
+ return a;
54
+ }
55
+ exports.boundAlpha = boundAlpha;
56
+ /**
57
+ * Replace a decimal with it's percentage value
58
+ * @hidden
59
+ */
60
+ function convertToPercentage(n) {
61
+ if (Number(n) <= 1) return `${Number(n) * 100}%`;
62
+ return n;
63
+ }
64
+ exports.convertToPercentage = convertToPercentage;
65
+ /**
66
+ * Force a hex value to have 2 characters
67
+ * @hidden
68
+ */
69
+ function pad2(c) {
70
+ return c.length === 1 ? "0" + c : String(c);
71
+ }
72
+ exports.pad2 = pad2;
73
+ }));
74
+ //#endregion
75
+ Object.defineProperty(exports, "default", {
76
+ enumerable: true,
77
+ get: function() {
78
+ return require_util();
79
+ }
80
+ });
81
+
82
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@ctrl+tinycolor@4.2.0/node_modules/@ctrl/tinycolor/dist/util.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.pad2 = exports.convertToPercentage = exports.boundAlpha = exports.isPercentage = exports.isOnePointZero = exports.clamp01 = exports.bound01 = void 0;\n/**\n * Take input from [0, n] and return it as [0, 1]\n * @hidden\n */\nfunction bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n const isPercent = isPercentage(n);\n n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));\n // Automatically convert percentage into number\n if (isPercent) {\n n = parseInt(String(n * max), 10) / 100;\n }\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n // Convert into [0, 1] range if it isn't already\n if (max === 360) {\n // If n is a hue given in degrees,\n // wrap around out-of-range values into [0, 360] range\n // then convert into [0, 1].\n n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));\n }\n else {\n // If n not a hue given in degrees\n // Convert into [0, 1] range if it isn't already.\n n = (n % max) / parseFloat(String(max));\n }\n return n;\n}\nexports.bound01 = bound01;\n/**\n * Force a number between 0 and 1\n * @hidden\n */\nfunction clamp01(val) {\n return Math.min(1, Math.max(0, val));\n}\nexports.clamp01 = clamp01;\n/**\n * Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n * <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>\n * @hidden\n */\nfunction isOnePointZero(n) {\n return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;\n}\nexports.isOnePointZero = isOnePointZero;\n/**\n * Check to see if string passed in is a percentage\n * @hidden\n */\nfunction isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') !== -1;\n}\nexports.isPercentage = isPercentage;\n/**\n * Return a valid alpha value [0,1] with all invalid values being set to 1\n * @hidden\n */\nfunction boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n}\nexports.boundAlpha = boundAlpha;\n/**\n * Replace a decimal with it's percentage value\n * @hidden\n */\nfunction convertToPercentage(n) {\n if (Number(n) <= 1) {\n return `${Number(n) * 100}%`;\n }\n return n;\n}\nexports.convertToPercentage = convertToPercentage;\n/**\n * Force a hex value to have 2 characters\n * @hidden\n */\nfunction pad2(c) {\n return c.length === 1 ? '0' + c : String(c);\n}\nexports.pad2 = pad2;\n"],"x_google_ignoreList":[0],"mappings":";;;CACA,OAAO,eAAe,SAAS,cAAc,EAAE,OAAO,KAAK,CAAC;CAC5D,QAAQ,OAAO,QAAQ,sBAAsB,QAAQ,aAAa,QAAQ,eAAe,QAAQ,iBAAiB,QAAQ,UAAU,QAAQ,UAAU,KAAK;;;;;CAK3J,SAAS,QAAQ,GAAG,KAAK;EACrB,IAAI,eAAe,CAAC,GAChB,IAAI;EAER,MAAM,YAAY,aAAa,CAAC;EAChC,IAAI,QAAQ,MAAM,IAAI,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC;EAE9D,IAAI,WACA,IAAI,SAAS,OAAO,IAAI,GAAG,GAAG,EAAE,IAAI;EAGxC,IAAI,KAAK,IAAI,IAAI,GAAG,IAAI,MACpB,OAAO;EAGX,IAAI,QAAQ,KAIR,KAAK,IAAI,IAAK,IAAI,MAAO,MAAM,IAAI,OAAO,WAAW,OAAO,GAAG,CAAC;OAKhE,IAAK,IAAI,MAAO,WAAW,OAAO,GAAG,CAAC;EAE1C,OAAO;CACX;CACA,QAAQ,UAAU;;;;;CAKlB,SAAS,QAAQ,KAAK;EAClB,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,GAAG,CAAC;CACvC;CACA,QAAQ,UAAU;;;;;;CAMlB,SAAS,eAAe,GAAG;EACvB,OAAO,OAAO,MAAM,YAAY,EAAE,QAAQ,GAAG,MAAM,MAAM,WAAW,CAAC,MAAM;CAC/E;CACA,QAAQ,iBAAiB;;;;;CAKzB,SAAS,aAAa,GAAG;EACrB,OAAO,OAAO,MAAM,YAAY,EAAE,QAAQ,GAAG,MAAM;CACvD;CACA,QAAQ,eAAe;;;;;CAKvB,SAAS,WAAW,GAAG;EACnB,IAAI,WAAW,CAAC;EAChB,IAAI,MAAM,CAAC,KAAK,IAAI,KAAK,IAAI,GACzB,IAAI;EAER,OAAO;CACX;CACA,QAAQ,aAAa;;;;;CAKrB,SAAS,oBAAoB,GAAG;EAC5B,IAAI,OAAO,CAAC,KAAK,GACb,OAAO,GAAG,OAAO,CAAC,IAAI,IAAI;EAE9B,OAAO;CACX;CACA,QAAQ,sBAAsB;;;;;CAK9B,SAAS,KAAK,GAAG;EACb,OAAO,EAAE,WAAW,IAAI,MAAM,IAAI,OAAO,CAAC;CAC9C;CACA,QAAQ,OAAO"}
@@ -0,0 +1,53 @@
1
+ //#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
2
+ /**
3
+ * Checks if a given value is a plain object.
4
+ *
5
+ * @param {object} value - The value to check.
6
+ * @returns {value is Record<PropertyKey, any>} - True if the value is a plain object, otherwise false.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * // ✅👇 True
11
+ *
12
+ * isPlainObject({ }); // ✅
13
+ * isPlainObject({ key: 'value' }); // ✅
14
+ * isPlainObject({ key: new Date() }); // ✅
15
+ * isPlainObject(new Object()); // ✅
16
+ * isPlainObject(Object.create(null)); // ✅
17
+ * isPlainObject({ nested: { key: true} }); // ✅
18
+ * isPlainObject(new Proxy({}, {})); // ✅
19
+ * isPlainObject({ [Symbol('tag')]: 'A' }); // ✅
20
+ *
21
+ * // ✅👇 (cross-realms, node context, workers, ...)
22
+ * const runInNewContext = await import('node:vm').then(
23
+ * (mod) => mod.runInNewContext
24
+ * );
25
+ * isPlainObject(runInNewContext('({})')); // ✅
26
+ *
27
+ * // ❌👇 False
28
+ *
29
+ * class Test { };
30
+ * isPlainObject(new Test()) // ❌
31
+ * isPlainObject(10); // ❌
32
+ * isPlainObject(null); // ❌
33
+ * isPlainObject('hello'); // ❌
34
+ * isPlainObject([]); // ❌
35
+ * isPlainObject(new Date()); // ❌
36
+ * isPlainObject(new Uint8Array([1])); // ❌
37
+ * isPlainObject(Buffer.from('ABC')); // ❌
38
+ * isPlainObject(Promise.resolve({})); // ❌
39
+ * isPlainObject(Object.create({})); // ❌
40
+ * isPlainObject(new (class Cls {})); // ❌
41
+ * isPlainObject(globalThis); // ❌,
42
+ * ```
43
+ */
44
+ function isPlainObject(value) {
45
+ if (!value || typeof value !== "object") return false;
46
+ const proto = Object.getPrototypeOf(value);
47
+ if (!(proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null)) return false;
48
+ return Object.prototype.toString.call(value) === "[object Object]";
49
+ }
50
+ //#endregion
51
+ exports.isPlainObject = isPlainObject;
52
+
53
+ //# sourceMappingURL=isPlainObject.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isPlainObject.js","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs"],"sourcesContent":["//#region src/predicate/isPlainObject.ts\n/**\n* Checks if a given value is a plain object.\n*\n* @param {object} value - The value to check.\n* @returns {value is Record<PropertyKey, any>} - True if the value is a plain object, otherwise false.\n*\n* @example\n* ```typescript\n* // ✅👇 True\n*\n* isPlainObject({ }); // ✅\n* isPlainObject({ key: 'value' }); // ✅\n* isPlainObject({ key: new Date() }); // ✅\n* isPlainObject(new Object()); // ✅\n* isPlainObject(Object.create(null)); // ✅\n* isPlainObject({ nested: { key: true} }); // ✅\n* isPlainObject(new Proxy({}, {})); // ✅\n* isPlainObject({ [Symbol('tag')]: 'A' }); // ✅\n*\n* // ✅👇 (cross-realms, node context, workers, ...)\n* const runInNewContext = await import('node:vm').then(\n* (mod) => mod.runInNewContext\n* );\n* isPlainObject(runInNewContext('({})')); // ✅\n*\n* // ❌👇 False\n*\n* class Test { };\n* isPlainObject(new Test()) // ❌\n* isPlainObject(10); // ❌\n* isPlainObject(null); // ❌\n* isPlainObject('hello'); // ❌\n* isPlainObject([]); // ❌\n* isPlainObject(new Date()); // ❌\n* isPlainObject(new Uint8Array([1])); // ❌\n* isPlainObject(Buffer.from('ABC')); // ❌\n* isPlainObject(Promise.resolve({})); // ❌\n* isPlainObject(Object.create({})); // ❌\n* isPlainObject(new (class Cls {})); // ❌\n* isPlainObject(globalThis); // ❌,\n* ```\n*/\nfunction isPlainObject(value) {\n\tif (!value || typeof value !== \"object\") return false;\n\tconst proto = Object.getPrototypeOf(value);\n\tif (!(proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null)) return false;\n\treturn Object.prototype.toString.call(value) === \"[object Object]\";\n}\n//#endregion\nexport { isPlainObject };\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,SAAS,cAAc,OAAO;CAC7B,IAAI,CAAC,SAAS,OAAO,UAAU,UAAU,OAAO;CAChD,MAAM,QAAQ,OAAO,eAAe,KAAK;CACzC,IAAI,EAAE,UAAU,QAAQ,UAAU,OAAO,aAAa,OAAO,eAAe,KAAK,MAAM,OAAO,OAAO;CACrG,OAAO,OAAO,UAAU,SAAS,KAAK,KAAK,MAAM;AAClD"}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ //#region ../../node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.js
3
+ /**
4
+ * vue v3.5.35
5
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
6
+ * @license MIT
7
+ **/
8
+ var require_vue_cjs = /* @__PURE__ */ require("../../../../../../_virtual/_rolldown/runtime.js").__commonJSMin(((exports) => {
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ var compilerDom = require("@vue/compiler-dom");
11
+ var runtimeDom = require("@vue/runtime-dom");
12
+ var shared = require("@vue/shared");
13
+ function _interopNamespaceDefault(e) {
14
+ var n = Object.create(null);
15
+ if (e) for (var k in e) n[k] = e[k];
16
+ n.default = e;
17
+ return Object.freeze(n);
18
+ }
19
+ var runtimeDom__namespace = /*#__PURE__*/ _interopNamespaceDefault(runtimeDom);
20
+ const compileCache = /* @__PURE__ */ Object.create(null);
21
+ function compileToFunction(template, options) {
22
+ if (!shared.isString(template)) if (template.nodeType) template = template.innerHTML;
23
+ else {
24
+ runtimeDom.warn(`invalid template option: `, template);
25
+ return shared.NOOP;
26
+ }
27
+ const key = shared.genCacheKey(template, options);
28
+ const cached = compileCache[key];
29
+ if (cached) return cached;
30
+ if (template[0] === "#") {
31
+ const el = document.querySelector(template);
32
+ if (!el) runtimeDom.warn(`Template element not found or is empty: ${template}`);
33
+ template = el ? el.innerHTML : ``;
34
+ }
35
+ const opts = shared.extend({
36
+ hoistStatic: true,
37
+ onError,
38
+ onWarn: (e) => onError(e, true)
39
+ }, options);
40
+ if (!opts.isCustomElement && typeof customElements !== "undefined") opts.isCustomElement = (tag) => !!customElements.get(tag);
41
+ const { code } = compilerDom.compile(template, opts);
42
+ function onError(err, asWarning = false) {
43
+ const message = asWarning ? err.message : `Template compilation error: ${err.message}`;
44
+ const codeFrame = err.loc && shared.generateCodeFrame(template, err.loc.start.offset, err.loc.end.offset);
45
+ runtimeDom.warn(codeFrame ? `${message}
46
+ ${codeFrame}` : message);
47
+ }
48
+ const render = new Function("Vue", code)(runtimeDom__namespace);
49
+ render._rc = true;
50
+ return compileCache[key] = render;
51
+ }
52
+ runtimeDom.registerRuntimeCompiler(compileToFunction);
53
+ exports.compile = compileToFunction;
54
+ Object.keys(runtimeDom).forEach(function(k) {
55
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeDom[k];
56
+ });
57
+ }));
58
+ //#endregion
59
+ Object.defineProperty(exports, "default", {
60
+ enumerable: true,
61
+ get: function() {
62
+ return require_vue_cjs();
63
+ }
64
+ });
65
+
66
+ //# sourceMappingURL=vue.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vue.cjs.js","names":[],"sources":["../../../../../../../../../node_modules/.pnpm/vue@3.5.35_typescript@6.0.3/node_modules/vue/dist/vue.cjs.js"],"sourcesContent":["/**\n* vue v3.5.35\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar compilerDom = require('@vue/compiler-dom');\nvar runtimeDom = require('@vue/runtime-dom');\nvar shared = require('@vue/shared');\n\nfunction _interopNamespaceDefault(e) {\n var n = Object.create(null);\n if (e) {\n for (var k in e) {\n n[k] = e[k];\n }\n }\n n.default = e;\n return Object.freeze(n);\n}\n\nvar runtimeDom__namespace = /*#__PURE__*/_interopNamespaceDefault(runtimeDom);\n\nconst compileCache = /* @__PURE__ */ Object.create(null);\nfunction compileToFunction(template, options) {\n if (!shared.isString(template)) {\n if (template.nodeType) {\n template = template.innerHTML;\n } else {\n runtimeDom.warn(`invalid template option: `, template);\n return shared.NOOP;\n }\n }\n const key = shared.genCacheKey(template, options);\n const cached = compileCache[key];\n if (cached) {\n return cached;\n }\n if (template[0] === \"#\") {\n const el = document.querySelector(template);\n if (!el) {\n runtimeDom.warn(`Template element not found or is empty: ${template}`);\n }\n template = el ? el.innerHTML : ``;\n }\n const opts = shared.extend(\n {\n hoistStatic: true,\n onError: onError ,\n onWarn: (e) => onError(e, true) \n },\n options\n );\n if (!opts.isCustomElement && typeof customElements !== \"undefined\") {\n opts.isCustomElement = (tag) => !!customElements.get(tag);\n }\n const { code } = compilerDom.compile(template, opts);\n function onError(err, asWarning = false) {\n const message = asWarning ? err.message : `Template compilation error: ${err.message}`;\n const codeFrame = err.loc && shared.generateCodeFrame(\n template,\n err.loc.start.offset,\n err.loc.end.offset\n );\n runtimeDom.warn(codeFrame ? `${message}\n${codeFrame}` : message);\n }\n const render = new Function(\"Vue\", code)(runtimeDom__namespace);\n render._rc = true;\n return compileCache[key] = render;\n}\nruntimeDom.registerRuntimeCompiler(compileToFunction);\n\nexports.compile = compileToFunction;\nObject.keys(runtimeDom).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeDom[k];\n});\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;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