color-star-custom-components 0.0.9 → 0.0.11

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.
@@ -1,8 +1,9 @@
1
1
  import { w as s } from "./chunks/index.bCzIhWFw.js";
2
- import { shallowRef as u, ref as m, watch as f, onMounted as d, createBlock as l, createCommentVNode as p, openBlock as c, unref as y, mergeProps as v, withCtx as g, resolveDynamicComponent as b } from "vue";
3
- import { ElIcon as N } from "element-plus";
4
- import { i, g as h } from "./chunks/config.B0uhXFjw.js";
5
- const w = /* @__PURE__ */ Object.assign({
2
+ import { useCssVars as u, shallowRef as m, ref as f, watch as d, onMounted as p, createBlock as c, createCommentVNode as y, openBlock as l, unref as v, mergeProps as g, withCtx as b, resolveDynamicComponent as C } from "vue";
3
+ import { ElIcon as I } from "element-plus";
4
+ import { i, g as N } from "./chunks/config.DuuYqasP.js";
5
+ import { _ as h } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
6
+ import './assets/IconRenderer.css';const w = /* @__PURE__ */ Object.assign({
6
7
  name: "IconRenderer"
7
8
  }, {
8
9
  __name: "layout",
@@ -30,46 +31,49 @@ const w = /* @__PURE__ */ Object.assign({
30
31
  }
31
32
  },
32
33
  setup(e) {
33
- const o = e, n = u(null), a = m(!1), r = async () => {
34
- if (!o.iconName) {
35
- n.value = null;
34
+ u((o) => ({
35
+ c078896a: e.color
36
+ }));
37
+ const n = e, t = m(null), a = f(!1), r = async () => {
38
+ if (!n.iconName) {
39
+ t.value = null;
36
40
  return;
37
41
  }
38
42
  if (!a.value) {
39
43
  a.value = !0;
40
44
  try {
41
- const t = await h(o.iconLibrary, o.iconName);
42
- n.value = t;
43
- } catch (t) {
44
- console.error("Failed to load icon component:", t), n.value = null;
45
+ const o = await N(n.iconLibrary, n.iconName);
46
+ t.value = o;
47
+ } catch (o) {
48
+ console.error("Failed to load icon component:", o), t.value = null;
45
49
  } finally {
46
50
  a.value = !1;
47
51
  }
48
52
  }
49
53
  };
50
- return f(
51
- () => [o.iconLibrary, o.iconName],
54
+ return d(
55
+ () => [n.iconLibrary, n.iconName],
52
56
  () => {
53
57
  r();
54
58
  },
55
59
  { immediate: !1 }
56
60
  // 初始加载在 onMounted 中处理
57
- ), d(() => {
61
+ ), p(() => {
58
62
  r();
59
- }), (t, C) => e.iconName && n.value ? (c(), l(y(N), v({
63
+ }), (o, _) => e.iconName && t.value ? (l(), c(v(I), g({
60
64
  key: 0,
61
65
  size: e.size,
62
66
  color: e.color
63
- }, t.$attrs), {
64
- default: g(() => [
65
- (c(), l(b(n.value)))
67
+ }, o.$attrs), {
68
+ default: b(() => [
69
+ (l(), c(C(t.value)))
66
70
  ]),
67
71
  _: 1
68
- }, 16, ["size", "color"])) : p("", !0);
72
+ }, 16, ["size", "color"])) : y("", !0);
69
73
  }
70
- }), R = s(w);
74
+ }), L = /* @__PURE__ */ h(w, [["__scopeId", "data-v-563503ea"]]), j = s(L);
71
75
  export {
72
- R as IconRenderer,
73
- R as default,
76
+ j as IconRenderer,
77
+ j as default,
74
78
  i as iconLibraryMap
75
79
  };
package/es/IconSelect.mjs CHANGED
@@ -2,7 +2,7 @@ import { w as M } from "./chunks/index.bCzIhWFw.js";
2
2
  import { ref as r, shallowRef as $, computed as F, watch as _, onMounted as P, createBlock as c, openBlock as l, unref as u, withCtx as i, createElementVNode as C, createVNode as I, createElementBlock as d, createSlots as R, resolveDynamicComponent as h, Fragment as V, renderList as U, normalizeClass as j, createCommentVNode as D, createTextVNode as T, markRaw as z } from "vue";
3
3
  import { ElPopover as q, ElInput as G, ElIcon as w } from "element-plus";
4
4
  import { _ as H } from "./chunks/layout.CJWd6Qr3.js";
5
- import { i as N, g as J, a as K } from "./chunks/config.B0uhXFjw.js";
5
+ import { i as N, g as J, a as K } from "./chunks/config.DuuYqasP.js";
6
6
  import { _ as Q } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
7
7
  import './assets/IconSelect.css';const W = { class: "icon-select-content flex flex-col overflow-hidden" }, X = {
8
8
  key: 0,
@@ -0,0 +1 @@
1
+ svg[data-v-563503ea]{fill:var(--c078896a)}
@@ -0,0 +1,24 @@
1
+ const a = {
2
+ lingyun: "lingyun",
3
+ aibox: "aibox"
4
+ }, o = async (n) => {
5
+ switch (n) {
6
+ case a.lingyun:
7
+ return await import("./global.CCbNdFdD.js");
8
+ case a.aibox:
9
+ return await import("./global.ChiJSpBx.js");
10
+ }
11
+ return null;
12
+ }, i = async (n, r) => {
13
+ if (!r) return null;
14
+ try {
15
+ return (await o(n))[r] || null;
16
+ } catch (t) {
17
+ return console.warn(`Failed to load icon ${r} from ${n} library:`, t), null;
18
+ }
19
+ };
20
+ export {
21
+ o as a,
22
+ i as g,
23
+ a as i
24
+ };