@kg-ui/kg-ui-plus 0.0.0 → 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 (156) hide show
  1. package/README.md +2 -38
  2. package/package.json +1 -2
  3. package/dist/es/KgCopilot/CopiContent/AnswerHead.vue.mjs +0 -16
  4. package/dist/es/KgCopilot/CopiContent/AnswerHead.vue2.mjs +0 -4
  5. package/dist/es/KgCopilot/CopiContent/UserHead.vue.mjs +0 -26
  6. package/dist/es/KgCopilot/CopiContent/UserHead.vue2.mjs +0 -4
  7. package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue.mjs +0 -7
  8. package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue2.mjs +0 -49
  9. package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue3.mjs +0 -4
  10. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue.mjs +0 -7
  11. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue2.mjs +0 -94
  12. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue3.mjs +0 -4
  13. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue.mjs +0 -7
  14. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue2.mjs +0 -33
  15. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue3.mjs +0 -4
  16. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue.mjs +0 -7
  17. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue2.mjs +0 -140
  18. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue3.mjs +0 -4
  19. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue.mjs +0 -7
  20. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue2.mjs +0 -131
  21. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue3.mjs +0 -4
  22. package/dist/es/KgCopilot/CopiFooter/index.vue.mjs +0 -7
  23. package/dist/es/KgCopilot/CopiFooter/index.vue2.mjs +0 -21
  24. package/dist/es/KgCopilot/CopiFooter/index.vue3.mjs +0 -4
  25. package/dist/es/KgCopilot/dialogue.vue.mjs +0 -7
  26. package/dist/es/KgCopilot/dialogue.vue2.mjs +0 -131
  27. package/dist/es/KgCopilot/dialogue.vue3.mjs +0 -4
  28. package/dist/es/KgCopilot/index.vue.mjs +0 -7
  29. package/dist/es/KgCopilot/index.vue2.mjs +0 -49
  30. package/dist/es/KgCopilot/index.vue3.mjs +0 -4
  31. package/dist/es/KgCopilot/mdInCode.mjs +0 -56
  32. package/dist/es/KgCopilot/readMd.vue.mjs +0 -7
  33. package/dist/es/KgCopilot/readMd.vue2.mjs +0 -87
  34. package/dist/es/KgCopilot/readMd.vue3.mjs +0 -4
  35. package/dist/es/ReIcon/index.mjs +0 -11
  36. package/dist/es/ReIcon/src/iconfont.mjs +0 -46
  37. package/dist/es/ReIcon/src/iconifyIconOffline.mjs +0 -30
  38. package/dist/es/ReIcon/src/iconifyIconOnline.mjs +0 -29
  39. package/dist/es/_virtual/___vite-browser-external.mjs +0 -6
  40. package/dist/es/_virtual/__vite-browser-external.mjs +0 -4
  41. package/dist/es/_virtual/_commonjsHelpers.mjs +0 -34
  42. package/dist/es/_virtual/_plugin-vue_export-helper.mjs +0 -10
  43. package/dist/es/_virtual/index.mjs +0 -13
  44. package/dist/es/api/project.mjs +0 -51
  45. package/dist/es/directives/heighlight/index.mjs +0 -69
  46. package/dist/es/directives/index.mjs +0 -4
  47. package/dist/es/home/LFilter/FilterArea.vue.mjs +0 -7
  48. package/dist/es/home/LFilter/FilterArea.vue2.mjs +0 -507
  49. package/dist/es/home/LFilter/FilterArea.vue3.mjs +0 -4
  50. package/dist/es/home/LFilter/FilterHead.vue.mjs +0 -129
  51. package/dist/es/home/LFilter/FilterHead.vue2.mjs +0 -4
  52. package/dist/es/home/LFilter/FilterItem.vue.mjs +0 -7
  53. package/dist/es/home/LFilter/FilterItem.vue2.mjs +0 -114
  54. package/dist/es/home/LFilter/FilterItem.vue3.mjs +0 -4
  55. package/dist/es/home/LFilter/FilterItemIcon.vue.mjs +0 -7
  56. package/dist/es/home/LFilter/FilterItemIcon.vue2.mjs +0 -171
  57. package/dist/es/home/LFilter/FilterItemIcon.vue3.mjs +0 -4
  58. package/dist/es/home/LFilter/index.vue.mjs +0 -17
  59. package/dist/es/home/LFilter/index.vue2.mjs +0 -4
  60. package/dist/es/home/LProject/index.vue.mjs +0 -7
  61. package/dist/es/home/LProject/index.vue2.mjs +0 -70
  62. package/dist/es/home/LProject/index.vue3.mjs +0 -4
  63. package/dist/es/home/index.vue.mjs +0 -7
  64. package/dist/es/home/index.vue2.mjs +0 -80
  65. package/dist/es/home/index.vue3.mjs +0 -4
  66. package/dist/es/index.mjs +0 -36
  67. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/check.mjs +0 -8
  68. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/circle-plus.mjs +0 -8
  69. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/close.mjs +0 -8
  70. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/microphone.mjs +0 -8
  71. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/paperclip.mjs +0 -8
  72. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/promotion.mjs +0 -8
  73. package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/upload.mjs +0 -8
  74. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/copy-simple.mjs +0 -8
  75. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/speaker-high-light.mjs +0 -8
  76. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-down-thin.mjs +0 -8
  77. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-up-thin.mjs +0 -8
  78. package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/warning-bold.mjs +0 -8
  79. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/add-line.mjs +0 -8
  80. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-down-s-line.mjs +0 -8
  81. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-up-s-line.mjs +0 -8
  82. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/check-fill.mjs +0 -8
  83. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/download-line.mjs +0 -8
  84. package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/more-2-fill.mjs +0 -8
  85. package/dist/es/node_modules/.pnpm/@iconify_vue@4.0.0_vue@3.2.45/node_modules/@iconify/vue/dist/iconify.mjs +0 -1702
  86. package/dist/es/node_modules/.pnpm/@iconify_vue@4.0.0_vue@3.2.45/node_modules/@iconify/vue/dist/offline.mjs +0 -436
  87. package/dist/es/node_modules/.pnpm/@pureadmin_utils@1.8.5_vue@3.2.45/node_modules/@pureadmin/utils/dist/index.mjs +0 -70
  88. package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.mjs +0 -16
  89. package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.mjs +0 -36
  90. package/dist/es/node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.mjs +0 -48
  91. package/dist/es/node_modules/.pnpm/dompurify@3.0.10/node_modules/dompurify/dist/purify.es.mjs +0 -949
  92. package/dist/es/node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.mjs +0 -22
  93. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.mjs +0 -4
  94. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.mjs +0 -4
  95. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.mjs +0 -4
  96. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.mjs +0 -4
  97. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.mjs +0 -4
  98. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.mjs +0 -4
  99. package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.mjs +0 -4
  100. package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.mjs +0 -72
  101. package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.mjs +0 -6
  102. package/dist/es/node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.mjs +0 -320
  103. package/dist/es/node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.mjs +0 -14
  104. package/dist/es/node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.mjs +0 -19
  105. package/dist/es/node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.mjs +0 -11
  106. package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.mjs +0 -21
  107. package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.mjs +0 -48
  108. package/dist/es/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.mjs +0 -8
  109. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/core.mjs +0 -5
  110. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/apache.mjs +0 -91
  111. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/bash.mjs +0 -377
  112. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/basic.mjs +0 -221
  113. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/c.mjs +0 -280
  114. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/css.mjs +0 -732
  115. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dart.mjs +0 -247
  116. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/django.mjs +0 -47
  117. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dns.mjs +0 -71
  118. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dos.mjs +0 -160
  119. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dust.mjs +0 -38
  120. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/erlang.mjs +0 -176
  121. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/go.mjs +0 -135
  122. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/http.mjs +0 -89
  123. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/java.mjs +0 -254
  124. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/javascript.mjs +0 -698
  125. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/json.mjs +0 -40
  126. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/markdown.mjs +0 -227
  127. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/nginx.mjs +0 -144
  128. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/php.mjs +0 -589
  129. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/python.mjs +0 -414
  130. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/ruby.mjs +0 -414
  131. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/stylus.mjs +0 -766
  132. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/swift.mjs +0 -832
  133. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/typescript.mjs +0 -788
  134. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/xml.mjs +0 -227
  135. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/lib/core.mjs +0 -1580
  136. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/styles/paraiso-light.css.mjs +0 -4
  137. package/dist/es/node_modules/.pnpm/marked@12.0.1/node_modules/marked/lib/marked.esm.mjs +0 -2045
  138. package/dist/es/node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.mjs +0 -514
  139. package/dist/es/node_modules/.pnpm/pinyin-match@1.2.4/node_modules/pinyin-match/es/main.mjs +0 -124
  140. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/formats.mjs +0 -22
  141. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/index.mjs +0 -14
  142. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/parse.mjs +0 -199
  143. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/stringify.mjs +0 -262
  144. package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/utils.mjs +0 -196
  145. package/dist/es/node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.mjs +0 -54
  146. package/dist/es/node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.mjs +0 -115
  147. package/dist/es/store/index.mjs +0 -8
  148. package/dist/es/store/modules/copilot.mjs +0 -108
  149. package/dist/es/store/modules/filters.mjs +0 -346
  150. package/dist/es/store/modules/types.mjs +0 -19
  151. package/dist/es/style/index.scss.mjs +0 -4
  152. package/dist/es/style/tailwind.css.mjs +0 -4
  153. package/dist/es/style.css +0 -1
  154. package/dist/es/utils/home.mjs +0 -129
  155. package/dist/es/utils/http/index.mjs +0 -90
  156. package/dist/es/utils/message.mjs +0 -42
@@ -1,436 +0,0 @@
1
- import { defineComponent, h } from "vue";
2
- const defaultIconDimensions = Object.freeze(
3
- {
4
- left: 0,
5
- top: 0,
6
- width: 16,
7
- height: 16
8
- }
9
- );
10
- const defaultIconTransformations = Object.freeze({
11
- rotate: 0,
12
- vFlip: false,
13
- hFlip: false
14
- });
15
- const defaultIconProps = Object.freeze({
16
- ...defaultIconDimensions,
17
- ...defaultIconTransformations
18
- });
19
- Object.freeze({
20
- ...defaultIconProps,
21
- body: "",
22
- hidden: false
23
- });
24
- ({
25
- provider: "",
26
- aliases: {},
27
- not_found: {},
28
- ...defaultIconDimensions
29
- });
30
- const defaultIconSizeCustomisations = Object.freeze({
31
- width: null,
32
- height: null
33
- });
34
- const defaultIconCustomisations = Object.freeze({
35
- ...defaultIconSizeCustomisations,
36
- ...defaultIconTransformations
37
- });
38
- function mergeCustomisations(defaults, item) {
39
- const result = {
40
- ...defaults
41
- };
42
- for (const key in item) {
43
- const value = item[key];
44
- const valueType = typeof value;
45
- if (key in defaultIconSizeCustomisations) {
46
- if (value === null || value && (valueType === "string" || valueType === "number")) {
47
- result[key] = value;
48
- }
49
- } else if (valueType === typeof result[key]) {
50
- result[key] = key === "rotate" ? value % 4 : value;
51
- }
52
- }
53
- return result;
54
- }
55
- const separator = /[\s,]+/;
56
- function flipFromString(custom, flip) {
57
- flip.split(separator).forEach((str) => {
58
- const value = str.trim();
59
- switch (value) {
60
- case "horizontal":
61
- custom.hFlip = true;
62
- break;
63
- case "vertical":
64
- custom.vFlip = true;
65
- break;
66
- }
67
- });
68
- }
69
- function rotateFromString(value, defaultValue = 0) {
70
- const units = value.replace(/^-?[0-9.]*/, "");
71
- function cleanup(value2) {
72
- while (value2 < 0) {
73
- value2 += 4;
74
- }
75
- return value2 % 4;
76
- }
77
- if (units === "") {
78
- const num = parseInt(value);
79
- return isNaN(num) ? 0 : cleanup(num);
80
- } else if (units !== value) {
81
- let split = 0;
82
- switch (units) {
83
- case "%":
84
- split = 25;
85
- break;
86
- case "deg":
87
- split = 90;
88
- }
89
- if (split) {
90
- let num = parseFloat(value.slice(0, value.length - units.length));
91
- if (isNaN(num)) {
92
- return 0;
93
- }
94
- num = num / split;
95
- return num % 1 === 0 ? cleanup(num) : 0;
96
- }
97
- }
98
- return defaultValue;
99
- }
100
- const unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;
101
- const unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
102
- function calculateSize(size, ratio, precision) {
103
- if (ratio === 1) {
104
- return size;
105
- }
106
- precision = precision || 100;
107
- if (typeof size === "number") {
108
- return Math.ceil(size * ratio * precision) / precision;
109
- }
110
- if (typeof size !== "string") {
111
- return size;
112
- }
113
- const oldParts = size.split(unitsSplit);
114
- if (oldParts === null || !oldParts.length) {
115
- return size;
116
- }
117
- const newParts = [];
118
- let code = oldParts.shift();
119
- let isNumber = unitsTest.test(code);
120
- while (true) {
121
- if (isNumber) {
122
- const num = parseFloat(code);
123
- if (isNaN(num)) {
124
- newParts.push(code);
125
- } else {
126
- newParts.push(Math.ceil(num * ratio * precision) / precision);
127
- }
128
- } else {
129
- newParts.push(code);
130
- }
131
- code = oldParts.shift();
132
- if (code === void 0) {
133
- return newParts.join("");
134
- }
135
- isNumber = !isNumber;
136
- }
137
- }
138
- function iconToSVG(icon, customisations) {
139
- const fullIcon = {
140
- ...defaultIconProps,
141
- ...icon
142
- };
143
- const fullCustomisations = {
144
- ...defaultIconCustomisations,
145
- ...customisations
146
- };
147
- const box = {
148
- left: fullIcon.left,
149
- top: fullIcon.top,
150
- width: fullIcon.width,
151
- height: fullIcon.height
152
- };
153
- let body = fullIcon.body;
154
- [fullIcon, fullCustomisations].forEach((props) => {
155
- const transformations = [];
156
- const hFlip = props.hFlip;
157
- const vFlip = props.vFlip;
158
- let rotation = props.rotate;
159
- if (hFlip) {
160
- if (vFlip) {
161
- rotation += 2;
162
- } else {
163
- transformations.push(
164
- "translate(" + (box.width + box.left).toString() + " " + (0 - box.top).toString() + ")"
165
- );
166
- transformations.push("scale(-1 1)");
167
- box.top = box.left = 0;
168
- }
169
- } else if (vFlip) {
170
- transformations.push(
171
- "translate(" + (0 - box.left).toString() + " " + (box.height + box.top).toString() + ")"
172
- );
173
- transformations.push("scale(1 -1)");
174
- box.top = box.left = 0;
175
- }
176
- let tempValue;
177
- if (rotation < 0) {
178
- rotation -= Math.floor(rotation / 4) * 4;
179
- }
180
- rotation = rotation % 4;
181
- switch (rotation) {
182
- case 1:
183
- tempValue = box.height / 2 + box.top;
184
- transformations.unshift(
185
- "rotate(90 " + tempValue.toString() + " " + tempValue.toString() + ")"
186
- );
187
- break;
188
- case 2:
189
- transformations.unshift(
190
- "rotate(180 " + (box.width / 2 + box.left).toString() + " " + (box.height / 2 + box.top).toString() + ")"
191
- );
192
- break;
193
- case 3:
194
- tempValue = box.width / 2 + box.left;
195
- transformations.unshift(
196
- "rotate(-90 " + tempValue.toString() + " " + tempValue.toString() + ")"
197
- );
198
- break;
199
- }
200
- if (rotation % 2 === 1) {
201
- if (box.left !== box.top) {
202
- tempValue = box.left;
203
- box.left = box.top;
204
- box.top = tempValue;
205
- }
206
- if (box.width !== box.height) {
207
- tempValue = box.width;
208
- box.width = box.height;
209
- box.height = tempValue;
210
- }
211
- }
212
- if (transformations.length) {
213
- body = '<g transform="' + transformations.join(" ") + '">' + body + "</g>";
214
- }
215
- });
216
- const customisationsWidth = fullCustomisations.width;
217
- const customisationsHeight = fullCustomisations.height;
218
- const boxWidth = box.width;
219
- const boxHeight = box.height;
220
- let width;
221
- let height;
222
- if (customisationsWidth === null) {
223
- height = customisationsHeight === null ? "1em" : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
224
- width = calculateSize(height, boxWidth / boxHeight);
225
- } else {
226
- width = customisationsWidth === "auto" ? boxWidth : customisationsWidth;
227
- height = customisationsHeight === null ? calculateSize(width, boxHeight / boxWidth) : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
228
- }
229
- const result = {
230
- attributes: {
231
- width: width.toString(),
232
- height: height.toString(),
233
- viewBox: box.left.toString() + " " + box.top.toString() + " " + boxWidth.toString() + " " + boxHeight.toString()
234
- },
235
- body
236
- };
237
- return result;
238
- }
239
- const regex = /\sid="(\S+)"/g;
240
- const randomPrefix = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
241
- let counter = 0;
242
- function replaceIDs(body, prefix = randomPrefix) {
243
- const ids = [];
244
- let match;
245
- while (match = regex.exec(body)) {
246
- ids.push(match[1]);
247
- }
248
- if (!ids.length) {
249
- return body;
250
- }
251
- ids.forEach((id) => {
252
- const newID = typeof prefix === "function" ? prefix(id) : prefix + (counter++).toString();
253
- const escapedID = id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
254
- body = body.replace(
255
- new RegExp('([#;"])(' + escapedID + ')([")]|\\.[a-z])', "g"),
256
- "$1" + newID + "$3"
257
- );
258
- });
259
- return body;
260
- }
261
- function iconToHTML(body, attributes) {
262
- let renderAttribsHTML = body.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
263
- for (const attr in attributes) {
264
- renderAttribsHTML += " " + attr + '="' + attributes[attr] + '"';
265
- }
266
- return '<svg xmlns="http://www.w3.org/2000/svg"' + renderAttribsHTML + ">" + body + "</svg>";
267
- }
268
- function encodeSVGforURL(svg) {
269
- return svg.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
270
- }
271
- function svgToURL(svg) {
272
- return 'url("data:image/svg+xml,' + encodeSVGforURL(svg) + '")';
273
- }
274
- const defaultExtendedIconCustomisations = {
275
- ...defaultIconCustomisations,
276
- inline: false
277
- };
278
- const svgDefaults = {
279
- "xmlns": "http://www.w3.org/2000/svg",
280
- "xmlns:xlink": "http://www.w3.org/1999/xlink",
281
- "aria-hidden": true,
282
- "role": "img"
283
- };
284
- const commonProps = {
285
- display: "inline-block"
286
- };
287
- const monotoneProps = {
288
- backgroundColor: "currentColor"
289
- };
290
- const coloredProps = {
291
- backgroundColor: "transparent"
292
- };
293
- const propsToAdd = {
294
- Image: "var(--svg)",
295
- Repeat: "no-repeat",
296
- Size: "100% 100%"
297
- };
298
- const propsToAddTo = {
299
- webkitMask: monotoneProps,
300
- mask: monotoneProps,
301
- background: coloredProps
302
- };
303
- for (const prefix in propsToAddTo) {
304
- const list = propsToAddTo[prefix];
305
- for (const prop in propsToAdd) {
306
- list[prefix + prop] = propsToAdd[prop];
307
- }
308
- }
309
- const customisationAliases = {};
310
- ["horizontal", "vertical"].forEach((prefix) => {
311
- const attr = prefix.slice(0, 1) + "Flip";
312
- customisationAliases[prefix + "-flip"] = attr;
313
- customisationAliases[prefix.slice(0, 1) + "-flip"] = attr;
314
- customisationAliases[prefix + "Flip"] = attr;
315
- });
316
- function fixSize(value) {
317
- return value + (value.match(/^[-0-9.]+$/) ? "px" : "");
318
- }
319
- const render = (icon, props) => {
320
- const customisations = mergeCustomisations(defaultExtendedIconCustomisations, props);
321
- const componentProps = { ...svgDefaults };
322
- const mode = props.mode || "svg";
323
- const style = {};
324
- const propsStyle = props.style;
325
- const customStyle = typeof propsStyle === "object" && !(propsStyle instanceof Array) ? propsStyle : {};
326
- for (let key in props) {
327
- const value = props[key];
328
- if (value === void 0) {
329
- continue;
330
- }
331
- switch (key) {
332
- case "icon":
333
- case "style":
334
- case "onLoad":
335
- case "mode":
336
- break;
337
- case "inline":
338
- case "hFlip":
339
- case "vFlip":
340
- customisations[key] = value === true || value === "true" || value === 1;
341
- break;
342
- case "flip":
343
- if (typeof value === "string") {
344
- flipFromString(customisations, value);
345
- }
346
- break;
347
- case "color":
348
- style.color = value;
349
- break;
350
- case "rotate":
351
- if (typeof value === "string") {
352
- customisations[key] = rotateFromString(value);
353
- } else if (typeof value === "number") {
354
- customisations[key] = value;
355
- }
356
- break;
357
- case "ariaHidden":
358
- case "aria-hidden":
359
- if (value !== true && value !== "true") {
360
- delete componentProps["aria-hidden"];
361
- }
362
- break;
363
- default: {
364
- const alias = customisationAliases[key];
365
- if (alias) {
366
- if (value === true || value === "true" || value === 1) {
367
- customisations[alias] = true;
368
- }
369
- } else if (defaultExtendedIconCustomisations[key] === void 0) {
370
- componentProps[key] = value;
371
- }
372
- }
373
- }
374
- }
375
- const item = iconToSVG(icon, customisations);
376
- const renderAttribs = item.attributes;
377
- if (customisations.inline) {
378
- style.verticalAlign = "-0.125em";
379
- }
380
- if (mode === "svg") {
381
- componentProps.style = {
382
- ...style,
383
- ...customStyle
384
- };
385
- Object.assign(componentProps, renderAttribs);
386
- let localCounter = 0;
387
- let id = props.id;
388
- if (typeof id === "string") {
389
- id = id.replace(/-/g, "_");
390
- }
391
- componentProps["innerHTML"] = replaceIDs(item.body, id ? () => id + "ID" + localCounter++ : "iconifyVue");
392
- return h("svg", componentProps);
393
- }
394
- const { body, width, height } = icon;
395
- const useMask = mode === "mask" || (mode === "bg" ? false : body.indexOf("currentColor") !== -1);
396
- const html = iconToHTML(body, {
397
- ...renderAttribs,
398
- width: width + "",
399
- height: height + ""
400
- });
401
- componentProps.style = {
402
- ...style,
403
- "--svg": svgToURL(html),
404
- "width": fixSize(renderAttribs.width),
405
- "height": fixSize(renderAttribs.height),
406
- ...commonProps,
407
- ...useMask ? monotoneProps : coloredProps,
408
- ...customStyle
409
- };
410
- return h("span", componentProps);
411
- };
412
- const storage = /* @__PURE__ */ Object.create(null);
413
- function addIcon(name, data) {
414
- storage[name] = data;
415
- }
416
- const Icon = defineComponent({
417
- // Do not inherit other attributes: it is handled by render()
418
- inheritAttrs: false,
419
- // Render icon
420
- render() {
421
- const props = this.$attrs;
422
- const propsIcon = props.icon;
423
- const icon = typeof propsIcon === "string" ? storage[propsIcon] : typeof propsIcon === "object" ? propsIcon : null;
424
- if (icon === null || typeof icon !== "object" || typeof icon.body !== "string") {
425
- return this.$slots.default ? this.$slots.default() : null;
426
- }
427
- return render({
428
- ...defaultIconProps,
429
- ...icon
430
- }, props);
431
- }
432
- });
433
- export {
434
- Icon,
435
- addIcon
436
- };
@@ -1,70 +0,0 @@
1
- import * as __viteBrowserExternal from "../../../../../../../_virtual/__vite-browser-external.mjs";
2
- import * as se from "vue";
3
- var at = Object.defineProperty;
4
- var It = Object.getOwnPropertyDescriptor;
5
- var Ut = Object.getOwnPropertyNames;
6
- var Pt = Object.prototype.hasOwnProperty;
7
- var ct = (t, n) => {
8
- for (var e in n)
9
- at(t, e, { get: n[e], enumerable: true });
10
- }, it = (t, n, e, r) => {
11
- if (n && typeof n == "object" || typeof n == "function")
12
- for (let o of Ut(n))
13
- !Pt.call(t, o) && o !== e && at(t, o, { get: () => n[o], enumerable: !(r = It(n, o)) || r.enumerable });
14
- return t;
15
- }, D = (t, n, e) => (it(t, n, "default"), e && it(e, n, "default"));
16
- var Bt = Object.prototype.toString;
17
- function O(t, n) {
18
- return Bt.call(t) === `[object ${n}]`;
19
- }
20
- function H(t) {
21
- return t !== null && O(t, "Object");
22
- }
23
- function R(t) {
24
- return typeof t < "u";
25
- }
26
- function dt(t) {
27
- return !R(t);
28
- }
29
- function gt(t) {
30
- return t === null;
31
- }
32
- function Nt(t) {
33
- return gt(t) || dt(t);
34
- }
35
- function Ft(t) {
36
- return Q(t) || S(t) ? t.length === 0 : t instanceof Map || t instanceof Set ? t.size === 0 : H(t) ? Object.keys(t).length === 0 : false;
37
- }
38
- function B(t) {
39
- return !!(Ft(t) || Nt(t));
40
- }
41
- function S(t) {
42
- return O(t, "String");
43
- }
44
- function mt(t) {
45
- return typeof t == "function";
46
- }
47
- function Q(t) {
48
- return t && Array.isArray(t);
49
- }
50
- var I = (t = 20) => new Promise((n) => setTimeout(n, t));
51
- var A = {};
52
- ct(A, { Fs: () => __viteBrowserExternal });
53
- D(A, __viteBrowserExternal);
54
- var i = {};
55
- ct(i, { Vue: () => se });
56
- D(i, se);
57
- export {
58
- I as delay,
59
- O as is,
60
- B as isAllEmpty,
61
- Q as isArray,
62
- R as isDef,
63
- Ft as isEmpty,
64
- mt as isFunction,
65
- gt as isNull,
66
- Nt as isNullOrUnDef,
67
- H as isObject,
68
- S as isString,
69
- dt as isUnDef
70
- };
@@ -1,16 +0,0 @@
1
- import getIntrinsic from "../../../get-intrinsic@1.2.4/node_modules/get-intrinsic/index.mjs";
2
- import "./index.mjs";
3
- import { exports as callBindExports } from "../../../../../_virtual/index.mjs";
4
- var GetIntrinsic = getIntrinsic;
5
- var callBind = callBindExports;
6
- var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf"));
7
- var callBound = function callBoundIntrinsic(name, allowMissing) {
8
- var intrinsic = GetIntrinsic(name, !!allowMissing);
9
- if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
10
- return callBind(intrinsic);
11
- }
12
- return intrinsic;
13
- };
14
- export {
15
- callBound as default
16
- };
@@ -1,36 +0,0 @@
1
- import { __module as callBind } from "../../../../../_virtual/index.mjs";
2
- import functionBind from "../../../function-bind@1.1.2/node_modules/function-bind/index.mjs";
3
- import getIntrinsic from "../../../get-intrinsic@1.2.4/node_modules/get-intrinsic/index.mjs";
4
- import setFunctionLength from "../../../set-function-length@1.2.2/node_modules/set-function-length/index.mjs";
5
- import type from "../../../es-errors@1.3.0/node_modules/es-errors/type.mjs";
6
- import { __require as requireEsDefineProperty } from "../../../es-define-property@1.0.0/node_modules/es-define-property/index.mjs";
7
- (function(module) {
8
- var bind = functionBind;
9
- var GetIntrinsic = getIntrinsic;
10
- var setFunctionLength$1 = setFunctionLength;
11
- var $TypeError = type;
12
- var $apply = GetIntrinsic("%Function.prototype.apply%");
13
- var $call = GetIntrinsic("%Function.prototype.call%");
14
- var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply);
15
- var $defineProperty = requireEsDefineProperty();
16
- var $max = GetIntrinsic("%Math.max%");
17
- module.exports = function callBind2(originalFunction) {
18
- if (typeof originalFunction !== "function") {
19
- throw new $TypeError("a function is required");
20
- }
21
- var func = $reflectApply(bind, $call, arguments);
22
- return setFunctionLength$1(
23
- func,
24
- 1 + $max(0, originalFunction.length - (arguments.length - 1)),
25
- true
26
- );
27
- };
28
- var applyBind = function applyBind2() {
29
- return $reflectApply(bind, $apply, arguments);
30
- };
31
- if ($defineProperty) {
32
- $defineProperty(module.exports, "apply", { value: applyBind });
33
- } else {
34
- module.exports.apply = applyBind;
35
- }
36
- })(callBind);
@@ -1,48 +0,0 @@
1
- import { __require as requireEsDefineProperty } from "../../../es-define-property@1.0.0/node_modules/es-define-property/index.mjs";
2
- import syntax from "../../../es-errors@1.3.0/node_modules/es-errors/syntax.mjs";
3
- import type from "../../../es-errors@1.3.0/node_modules/es-errors/type.mjs";
4
- import gopd$1 from "../../../gopd@1.0.1/node_modules/gopd/index.mjs";
5
- var $defineProperty = requireEsDefineProperty();
6
- var $SyntaxError = syntax;
7
- var $TypeError = type;
8
- var gopd = gopd$1;
9
- var defineDataProperty = function defineDataProperty2(obj, property, value) {
10
- if (!obj || typeof obj !== "object" && typeof obj !== "function") {
11
- throw new $TypeError("`obj` must be an object or a function`");
12
- }
13
- if (typeof property !== "string" && typeof property !== "symbol") {
14
- throw new $TypeError("`property` must be a string or a symbol`");
15
- }
16
- if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
17
- throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");
18
- }
19
- if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
20
- throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");
21
- }
22
- if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
23
- throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");
24
- }
25
- if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
26
- throw new $TypeError("`loose`, if provided, must be a boolean");
27
- }
28
- var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
29
- var nonWritable = arguments.length > 4 ? arguments[4] : null;
30
- var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
31
- var loose = arguments.length > 6 ? arguments[6] : false;
32
- var desc = !!gopd && gopd(obj, property);
33
- if ($defineProperty) {
34
- $defineProperty(obj, property, {
35
- configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
36
- enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
37
- value,
38
- writable: nonWritable === null && desc ? desc.writable : !nonWritable
39
- });
40
- } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
41
- obj[property] = value;
42
- } else {
43
- throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
44
- }
45
- };
46
- export {
47
- defineDataProperty as default
48
- };