bitboss-ui 3.0.0-beta.74 → 3.0.0-beta.75

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 (249) hide show
  1. package/dist/ai/BbAvatar.md +86 -58
  2. package/dist/ai/BbBadge.md +1 -1
  3. package/dist/ai/BbBreadcrumbs.md +2 -2
  4. package/dist/ai/BbButton.md +2 -2
  5. package/dist/ai/BbCalendar.md +5 -2
  6. package/dist/ai/BbCheckboxGroup.md +5 -4
  7. package/dist/ai/BbColorInput.md +12 -0
  8. package/dist/ai/BbColorPalette.md +11 -6
  9. package/dist/ai/BbDatePicker.md +12 -0
  10. package/dist/ai/BbDatePickerInput.md +17 -1
  11. package/dist/ai/BbDialog.md +3 -1
  12. package/dist/ai/BbDropdown.md +155 -60
  13. package/dist/ai/BbDropdownButton.md +25 -6
  14. package/dist/ai/BbNumberInput.md +3 -1
  15. package/dist/ai/BbRadioGroup.md +4 -4
  16. package/dist/ai/BbSelect.md +79 -67
  17. package/dist/ai/BbSelectPopover.md +24 -5
  18. package/dist/ai/BbSwitchGroup.md +5 -4
  19. package/dist/ai/BbTable.md +17 -16
  20. package/dist/ai/BbTimePicker.md +12 -0
  21. package/dist/ai/BbTimePickerInput.md +15 -1
  22. package/dist/ai/BbToast.md +3 -2
  23. package/dist/ai/BbTree.md +5 -1
  24. package/dist/ai/CommonPopover.md +1 -0
  25. package/dist/ai/FlatListBox.md +1 -0
  26. package/dist/ai/GroupedListBox.md +1 -0
  27. package/dist/ai/ListBox.md +1 -0
  28. package/dist/ai/OptionsContainer.md +4 -4
  29. package/dist/ai/changelog.json +163 -6
  30. package/dist/ai/components.json +32 -34
  31. package/dist/ai/composables/useToast.md +2 -2
  32. package/dist/ai/design-tokens.json +60 -0
  33. package/dist/ai/guides/agent-contract.md +8 -4
  34. package/dist/ai/guides/design-tokens.md +13 -0
  35. package/dist/ai/guides/fetch-items-playbook.md +7 -11
  36. package/dist/ai/guides/migration/components/bb-color-palette.md +11 -11
  37. package/dist/ai/guides/migration/components/bb-dropdown-button.md +1 -0
  38. package/dist/ai/guides/migration/components/bb-dropdown.md +1 -0
  39. package/dist/ai/guides/migration/components/bb-table.md +2 -1
  40. package/dist/ai/guides/migration/components/bb-toast.md +2 -2
  41. package/dist/ai/guides/migration/v2-to-v3.md +22 -5
  42. package/dist/ai/guides/migration/v3-beta-tooling.md +1 -0
  43. package/dist/ai/guides/passthrough.md +3 -3
  44. package/dist/ai/helpers/inertia/manifest.json +1 -1
  45. package/dist/ai/index.md +1 -1
  46. package/dist/ai/manifest/common.json +1 -0
  47. package/dist/ai/manifest/components/BbAvatar.json +5 -2
  48. package/dist/ai/manifest/components/BbAvatar.tree.json +32 -2
  49. package/dist/ai/manifest/components/BbCarousel.json +0 -3
  50. package/dist/ai/manifest/components/BbCheckboxGroup.json +2 -2
  51. package/dist/ai/manifest/components/BbCheckboxGroup.tree.json +2 -0
  52. package/dist/ai/manifest/components/BbColorInput.json +5 -2
  53. package/dist/ai/manifest/components/BbColorPalette.json +5 -2
  54. package/dist/ai/manifest/components/BbColorPalette.removed.json +1 -2
  55. package/dist/ai/manifest/components/BbDatePicker.json +3 -0
  56. package/dist/ai/manifest/components/BbDatePickerInput.json +3 -0
  57. package/dist/ai/manifest/components/BbDialog.tree.json +2 -0
  58. package/dist/ai/manifest/components/BbDropdown.json +20 -14
  59. package/dist/ai/manifest/components/BbDropdown.removed.json +2 -1
  60. package/dist/ai/manifest/components/BbDropdown.tree.json +13 -3
  61. package/dist/ai/manifest/components/BbDropdownButton.json +13 -7
  62. package/dist/ai/manifest/components/BbDropdownButton.removed.json +2 -1
  63. package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
  64. package/dist/ai/manifest/components/BbOffCanvas.tree.json +2 -0
  65. package/dist/ai/manifest/components/BbRadioGroup.json +2 -2
  66. package/dist/ai/manifest/components/BbRadioGroup.tree.json +2 -0
  67. package/dist/ai/manifest/components/BbSelect.json +10 -7
  68. package/dist/ai/manifest/components/BbSelectPopover.json +6 -3
  69. package/dist/ai/manifest/components/BbSelectPopover.tree.json +5 -1
  70. package/dist/ai/manifest/components/BbSwitchGroup.json +2 -2
  71. package/dist/ai/manifest/components/BbSwitchGroup.tree.json +2 -0
  72. package/dist/ai/manifest/components/BbTable.json +6 -6
  73. package/dist/ai/manifest/components/BbTable.tree.json +4 -0
  74. package/dist/ai/manifest/components/BbTimePicker.json +5 -2
  75. package/dist/ai/manifest/components/BbTimePickerInput.json +5 -2
  76. package/dist/ai/manifest/components/BbTree.json +1 -1
  77. package/dist/ai/manifest/components/CommonPopover.json +1 -0
  78. package/dist/ai/manifest/components/FlatListBox.json +2 -1
  79. package/dist/ai/manifest/components/GroupedListBox.json +2 -1
  80. package/dist/ai/manifest/components/ListBox.json +2 -1
  81. package/dist/ai/manifest/components/OptionsContainer.json +6 -4
  82. package/dist/ai/manifest/index.json +2 -2
  83. package/dist/ai/manifest/meta.json +0 -3
  84. package/dist/ai/manifest/types.advanced.json +6 -6
  85. package/dist/ai/manifest/types.api.json +1 -3
  86. package/dist/ai/source/BbAvatar.md +119 -9
  87. package/dist/ai/source/BbBadge.md +12 -5
  88. package/dist/ai/source/BbBreadcrumbs.md +52 -54
  89. package/dist/ai/source/BbButton.md +41 -25
  90. package/dist/ai/source/BbCarousel.md +31 -28
  91. package/dist/ai/source/BbCheckboxGroup.md +15 -9
  92. package/dist/ai/source/BbColorInput.md +19 -0
  93. package/dist/ai/source/BbColorPalette.md +18 -0
  94. package/dist/ai/source/BbDatePicker.md +18 -0
  95. package/dist/ai/source/BbDatePickerInput.md +40 -1
  96. package/dist/ai/source/BbDialog.md +14 -1
  97. package/dist/ai/source/BbDropdown.md +211 -39
  98. package/dist/ai/source/BbDropdownButton.md +27 -2
  99. package/dist/ai/source/BbDropdownGroup.md +104 -38
  100. package/dist/ai/source/BbGallery.md +76 -55
  101. package/dist/ai/source/BbHost.md +12 -0
  102. package/dist/ai/source/BbNumberInput.md +17 -10
  103. package/dist/ai/source/BbOffCanvas.md +14 -1
  104. package/dist/ai/source/BbRadioGroup.md +12 -5
  105. package/dist/ai/source/BbSelect.md +35 -20
  106. package/dist/ai/source/BbSelectPopover.md +116 -8
  107. package/dist/ai/source/BbSwitchGroup.md +11 -4
  108. package/dist/ai/source/BbTable.md +72 -26
  109. package/dist/ai/source/BbTimePicker.md +19 -0
  110. package/dist/ai/source/BbTimePickerInput.md +15 -0
  111. package/dist/ai/source/BbToast.md +2 -2
  112. package/dist/ai/source/BbToastPortal.md +2 -2
  113. package/dist/ai/source/BbTree.md +1 -1
  114. package/dist/ai/source/CommonPopover.md +24 -1
  115. package/dist/ai/source/FlatListBox.md +26 -5
  116. package/dist/ai/source/GroupedListBox.md +63 -11
  117. package/dist/ai/source/ListBox.md +4 -0
  118. package/dist/ai/source/OptionsContainer.md +29 -11
  119. package/dist/components/BbAvatar/BbAvatar.vue.d.ts +1 -0
  120. package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +61 -43
  121. package/dist/components/BbAvatar/avatarIdentity.js +25 -0
  122. package/dist/components/BbAvatar/ptKeys.generated.d.ts +5 -1
  123. package/dist/components/BbAvatar/types.d.ts +24 -5
  124. package/dist/components/BbAvatar/types.js +5 -1
  125. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +24 -23
  126. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +80 -79
  127. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +152 -158
  128. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +100 -85
  129. package/dist/components/BbCalendar/useDayGrid.js +120 -123
  130. package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +7 -7
  131. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue_vue_type_script_setup_true_lang.js +126 -122
  132. package/dist/components/BbCheckboxGroup/types.d.ts +7 -11
  133. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +2 -0
  134. package/dist/components/BbColorInput/BbColorInput.vue_vue_type_script_setup_true_lang.js +148 -141
  135. package/dist/components/BbColorInput/types.d.ts +7 -0
  136. package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +2 -0
  137. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +213 -202
  138. package/dist/components/BbColorPalette/types.d.ts +7 -0
  139. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +3 -1
  140. package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +84 -73
  141. package/dist/components/BbDatePicker/types.d.ts +7 -0
  142. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +3 -1
  143. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +495 -510
  144. package/dist/components/BbDatePickerInput/types.d.ts +7 -0
  145. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +219 -211
  146. package/dist/components/BbDialog/leaveGhost.js +22 -17
  147. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +92 -87
  148. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +3 -0
  149. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +412 -369
  150. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +382 -338
  151. package/dist/components/BbDropdown/DropdownFailures.vue.js +4 -0
  152. package/dist/components/BbDropdown/DropdownFailures.vue_vue_type_script_setup_true_lang.js +24 -0
  153. package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +117 -102
  154. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +73 -45
  155. package/dist/components/BbDropdown/normalizeGroups.js +6 -2
  156. package/dist/components/BbDropdown/ptKeys.generated.d.ts +8 -0
  157. package/dist/components/BbDropdown/types.d.ts +65 -41
  158. package/dist/components/BbDropdown/types.js +1 -0
  159. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +2 -0
  160. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +93 -72
  161. package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +48 -0
  162. package/dist/components/BbDropdownButton/types.d.ts +13 -2
  163. package/dist/components/BbDropdownButton/types.js +2 -0
  164. package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +318 -296
  165. package/dist/components/BbHost/BbHost.vue_vue_type_script_setup_true_lang.js +7 -1
  166. package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +9 -5
  167. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +152 -144
  168. package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +108 -104
  169. package/dist/components/BbRadioGroup/types.d.ts +4 -7
  170. package/dist/components/BbSelect/BbSelect.vue.d.ts +3 -1
  171. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +167 -163
  172. package/dist/components/BbSelect/types.d.ts +23 -20
  173. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +3 -1
  174. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +680 -637
  175. package/dist/components/BbSelectPopover/types.d.ts +10 -4
  176. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue_vue_type_script_setup_true_lang.js +159 -155
  177. package/dist/components/BbSwitchGroup/types.d.ts +3 -6
  178. package/dist/components/BbTable/BbTable.vue.d.ts +1 -3
  179. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1086 -1069
  180. package/dist/components/BbTable/types.d.ts +11 -10
  181. package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +3 -1
  182. package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +145 -134
  183. package/dist/components/BbTimePicker/types.d.ts +7 -0
  184. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +3 -1
  185. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +268 -259
  186. package/dist/components/BbTimePickerInput/types.d.ts +7 -0
  187. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +12 -12
  188. package/dist/components/BbToast/types.d.ts +2 -2
  189. package/dist/components/BbTree/BbTreeLevel.vue_vue_type_script_setup_true_lang.js +56 -46
  190. package/dist/components/BbTree/types.d.ts +1 -1
  191. package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +13 -1
  192. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +115 -96
  193. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +194 -166
  194. package/dist/components/ListBox/ListBox.vue_vue_type_script_setup_true_lang.js +7 -4
  195. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +86 -77
  196. package/dist/composables/useItemsGetter.js +34 -32
  197. package/dist/composables/useOpenModel.js +20 -0
  198. package/dist/deprecation/ai-deprecations.json.js +1 -1
  199. package/dist/i18n/locales/ar.json +2 -0
  200. package/dist/i18n/locales/cs.json +2 -0
  201. package/dist/i18n/locales/da.json +2 -0
  202. package/dist/i18n/locales/de-CH.json +2 -0
  203. package/dist/i18n/locales/de.json +2 -0
  204. package/dist/i18n/locales/el.json +2 -0
  205. package/dist/i18n/locales/en-GB.json +2 -0
  206. package/dist/i18n/locales/en.json +2 -0
  207. package/dist/i18n/locales/es-MX.json +2 -0
  208. package/dist/i18n/locales/es.json +2 -0
  209. package/dist/i18n/locales/fa.json +2 -0
  210. package/dist/i18n/locales/fi.json +2 -0
  211. package/dist/i18n/locales/fr.json +2 -0
  212. package/dist/i18n/locales/he.json +2 -0
  213. package/dist/i18n/locales/hu.json +2 -0
  214. package/dist/i18n/locales/it.json +2 -0
  215. package/dist/i18n/locales/ja.json +2 -0
  216. package/dist/i18n/locales/ko.json +2 -0
  217. package/dist/i18n/locales/nb.json +2 -0
  218. package/dist/i18n/locales/nl.json +2 -0
  219. package/dist/i18n/locales/pl.json +2 -0
  220. package/dist/i18n/locales/pt-BR.json +2 -0
  221. package/dist/i18n/locales/pt-PT.json +2 -0
  222. package/dist/i18n/locales/ro.json +2 -0
  223. package/dist/i18n/locales/ru.json +2 -0
  224. package/dist/i18n/locales/sv.json +2 -0
  225. package/dist/i18n/locales/tr.json +2 -0
  226. package/dist/i18n/locales/uk.json +2 -0
  227. package/dist/i18n/locales/zh-CN.json +2 -0
  228. package/dist/i18n/locales/zh-HK.json +2 -0
  229. package/dist/i18n/locales/zh-TW.json +2 -0
  230. package/dist/icon-scan.js +68 -61
  231. package/dist/index.d.ts +2 -2
  232. package/dist/llms-full.txt +573 -276
  233. package/dist/llms-medium.txt +8 -4
  234. package/dist/llms.txt +1 -1
  235. package/dist/locale-blueprint.json +2 -0
  236. package/dist/styles.css +2 -2
  237. package/dist/types/ActionButton.d.ts +2 -3
  238. package/dist/types/Option.d.ts +10 -0
  239. package/dist/types/ptComponentMap.d.ts +3 -3
  240. package/dist/utilities/functions/slotContent.js +19 -0
  241. package/dist/utils/loadRetry.js +8 -0
  242. package/dist/utils/versionCheck.js +1 -1
  243. package/dist/vite.js +4 -1
  244. package/llms.txt +1 -1
  245. package/package.json +3 -1
  246. package/scripts/README.md +2 -0
  247. package/scripts/lib/agent-setup.mjs +44 -26
  248. package/scripts/lib/validate-bb-markup.mjs +20 -0
  249. package/dist/ai/manifest/components/BbAvatar.removed.json +0 -6
package/dist/icon-scan.js CHANGED
@@ -3,20 +3,20 @@ import { existsSync as t, readFileSync as n } from "node:fs";
3
3
  import { dirname as r, isAbsolute as i, join as a, relative as o, resolve as s, sep as c } from "node:path";
4
4
  import l from "ignore";
5
5
  import * as u from "node:crypto";
6
- import { mkdir as d, readdir as f, stat as p, writeFile as m } from "node:fs/promises";
7
- import { availableParallelism as h } from "node:os";
8
- import { Worker as g } from "node:worker_threads";
6
+ import { mkdir as d, readdir as f, rename as p, rm as m, stat as h, writeFile as g } from "node:fs/promises";
7
+ import { availableParallelism as _ } from "node:os";
8
+ import { Worker as v } from "node:worker_threads";
9
9
  // src/icon-scan.ts
10
- var _ = /* @__PURE__ */ new Set([
10
+ var y = /* @__PURE__ */ new Set([
11
11
  "node_modules",
12
12
  "vendor",
13
13
  "storage"
14
- ]), v = 268435456, y = 8192, b = 48, x = 1500, S = 64, C = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
15
- function w(e) {
16
- let t = [...e].sort((e, t) => t.length - e.length).map(C).join("|");
14
+ ]), b = 268435456, x = 8192, S = 48, C = 1500, w = 64, T = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
15
+ function E(e) {
16
+ let t = [...e].sort((e, t) => t.length - e.length).map(T).join("|");
17
17
  return RegExp(`(?<![A-Za-z0-9_-])(${t}):([a-z0-9][a-z0-9-]*)`, "g");
18
18
  }
19
- function T(e, t) {
19
+ function D(e, t) {
20
20
  let n = e.toString("latin1"), r = /* @__PURE__ */ new Set();
21
21
  t.lastIndex = 0;
22
22
  for (let e of n.matchAll(t)) {
@@ -25,8 +25,8 @@ function T(e, t) {
25
25
  }
26
26
  return [...r];
27
27
  }
28
- var E = /[*?[{]/, D = (e) => E.test(e);
29
- function O(e) {
28
+ var O = /[*?[{]/, k = (e) => O.test(e);
29
+ function A(e) {
30
30
  let t = "^";
31
31
  for (let n = 0; n < e.length; n++) {
32
32
  let r = e[n];
@@ -37,17 +37,17 @@ function O(e) {
37
37
  r === -1 ? t += "\\[" : (t += `[${e.slice(n + 1, r).replace(/\\/g, "\\\\")}]`, n = r);
38
38
  } else if (r === "{") {
39
39
  let r = e.indexOf("}", n + 1);
40
- r === -1 ? t += "\\{" : (t += `(?:${e.slice(n + 1, r).split(",").map(C).join("|")})`, n = r);
41
- } else t += C(r);
40
+ r === -1 ? t += "\\{" : (t += `(?:${e.slice(n + 1, r).split(",").map(T).join("|")})`, n = r);
41
+ } else t += T(r);
42
42
  }
43
43
  return RegExp(t + "$");
44
44
  }
45
- var k = (e) => c === "/" ? e : e.split(c).join("/");
46
- function A(e, t) {
45
+ var j = (e) => c === "/" ? e : e.split(c).join("/");
46
+ function M(e, t) {
47
47
  let n = o(e, t);
48
48
  return n === "" || !n.startsWith("..") && !i(n);
49
49
  }
50
- function j(e) {
50
+ function N(e) {
51
51
  let n = [], i = r(e), o = -1;
52
52
  for (;;) {
53
53
  if (n.push(i), t(a(i, ".git"))) {
@@ -59,14 +59,14 @@ function j(e) {
59
59
  i = e;
60
60
  }
61
61
  return o === -1 ? [] : n.slice(0, o).reverse().flatMap((e) => {
62
- let t = M(e);
62
+ let t = P(e);
63
63
  return t ? [{
64
64
  dir: e,
65
65
  ig: t
66
66
  }] : [];
67
67
  });
68
68
  }
69
- function M(e) {
69
+ function P(e) {
70
70
  let r = a(e, ".gitignore");
71
71
  try {
72
72
  return t(r) ? l().add(n(r, "utf-8")) : null;
@@ -74,10 +74,10 @@ function M(e) {
74
74
  return null;
75
75
  }
76
76
  }
77
- function N(e, t, n) {
77
+ function F(e, t, n) {
78
78
  let r = !1;
79
79
  for (let { dir: i, ig: a } of e) {
80
- let e = k(o(i, t));
80
+ let e = j(o(i, t));
81
81
  if (!e || e.startsWith("..")) continue;
82
82
  n && (e += "/");
83
83
  let s = a.test(e);
@@ -85,7 +85,7 @@ function N(e, t, n) {
85
85
  }
86
86
  return r;
87
87
  }
88
- function P(e, t, n) {
88
+ function I(e, t, n) {
89
89
  let r = n.needles.map((e) => Buffer.from(e, "latin1")), i = new RegExp(n.regexSource, "g"), a = t.hash ? (e) => t.hash("sha1", e, "hex") : (e) => t.createHash("sha1").update(e).digest("hex"), o = (t, r) => {
90
90
  let i = Math.min(r, n.probeBytes), a = Buffer.allocUnsafe(i), o = e.readSync(t, a, 0, i, 0);
91
91
  if (a.subarray(0, o).indexOf(0) !== -1) return null;
@@ -169,23 +169,23 @@ function P(e, t, n) {
169
169
  }
170
170
  };
171
171
  }
172
- var F = `
172
+ var L = `
173
173
  const { parentPort, workerData } = require('node:worker_threads');
174
- const scan = (${P.toString()})(require('node:fs'), require('node:crypto'), workerData);
174
+ const scan = (${I.toString()})(require('node:fs'), require('node:crypto'), workerData);
175
175
  parentPort.on('message', (jobs) => parentPort.postMessage(jobs.map(scan)));
176
176
  `;
177
- function I(e) {
177
+ function R(e) {
178
178
  return Math.max(2, Math.min(4, e - 1));
179
179
  }
180
- function L(e, t) {
181
- return Array.from({ length: e }, () => new g(F, {
180
+ function z(e, t) {
181
+ return Array.from({ length: e }, () => new v(L, {
182
182
  eval: !0,
183
183
  workerData: t
184
184
  }));
185
185
  }
186
- async function R(e, t) {
186
+ async function B(e, t) {
187
187
  let n = [], r = [];
188
- for (let t = 0; t < e.length; t += S) r.push(e.slice(t, t + S));
188
+ for (let t = 0; t < e.length; t += w) r.push(e.slice(t, t + w));
189
189
  let i = 0;
190
190
  try {
191
191
  await Promise.all(t.map((e) => new Promise((t, a) => {
@@ -205,7 +205,7 @@ async function R(e, t) {
205
205
  }
206
206
  return n;
207
207
  }
208
- async function z(e, t, n) {
208
+ async function V(e, t, n) {
209
209
  let r = Array(e.length), i = 0;
210
210
  return await Promise.all(Array.from({ length: Math.min(t, e.length) }, async () => {
211
211
  for (;;) {
@@ -215,23 +215,23 @@ async function z(e, t, n) {
215
215
  }
216
216
  })), r;
217
217
  }
218
- var B = class {
218
+ var H = class {
219
219
  constructor(t) {
220
220
  this.resolveMemo = /* @__PURE__ */ new Map(), this.gitignoreMemo = /* @__PURE__ */ new Map(), this.entries = /* @__PURE__ */ new Map(), this.cold = !0, this.dirty = !1, this.lastWorkers = 0, this.cfg = t, this.fileOptions = t.prefixes.length ? {
221
221
  needles: t.prefixes.map((e) => `${e}:`),
222
- regexSource: w(t.prefixes).source,
222
+ regexSource: E(t.prefixes).source,
223
223
  maxFileSize: t.scanner.maxFileSize ?? 268435456,
224
- probeBytes: y
225
- } : null, this.scanOne = this.fileOptions ? P(e, u, this.fileOptions) : null, this.workerThreshold = t.workerThreshold ?? 1500;
224
+ probeBytes: x
225
+ } : null, this.scanOne = this.fileOptions ? I(e, u, this.fileOptions) : null, this.workerThreshold = t.workerThreshold ?? 1500;
226
226
  let n = t.scanner.exclude ?? [];
227
227
  this.excludes = n.length ? l().add(n) : null, this.bases = [{
228
228
  dir: t.root,
229
229
  match: null,
230
- ancestors: j(t.root)
230
+ ancestors: N(t.root)
231
231
  }, ...(t.scanner.include ?? []).map((e) => this.includeBase(e))];
232
232
  }
233
233
  get includeDirs() {
234
- return this.bases.slice(1).map((e) => e.dir).filter((e) => !A(this.cfg.root, e));
234
+ return this.bases.slice(1).map((e) => e.dir).filter((e) => !M(this.cfg.root, e));
235
235
  }
236
236
  get icons() {
237
237
  let e = /* @__PURE__ */ new Set();
@@ -239,7 +239,7 @@ var B = class {
239
239
  return e;
240
240
  }
241
241
  includeBase(e) {
242
- let t = k(e).split("/"), n = t.findIndex((e) => D(e));
242
+ let t = j(e).split("/"), n = t.findIndex((e) => k(e));
243
243
  if (n === -1) return {
244
244
  dir: s(this.cfg.root, e),
245
245
  match: null,
@@ -248,36 +248,36 @@ var B = class {
248
248
  let r = t.slice(0, n).join("/"), i = t.slice(n).join("/");
249
249
  return {
250
250
  dir: s(this.cfg.root, r || "."),
251
- match: O(i),
251
+ match: A(i),
252
252
  ancestors: []
253
253
  };
254
254
  }
255
255
  gitignoreFor(e) {
256
256
  let t = this.gitignoreMemo.get(e);
257
- return t === void 0 && (t = M(e), this.gitignoreMemo.set(e, t)), t;
257
+ return t === void 0 && (t = P(e), this.gitignoreMemo.set(e, t)), t;
258
258
  }
259
259
  resetGitignores() {
260
- this.gitignoreMemo.clear(), this.bases[0].ancestors = j(this.cfg.root);
260
+ this.gitignoreMemo.clear(), this.bases[0].ancestors = N(this.cfg.root);
261
261
  }
262
262
  isGitignored(e, t, n) {
263
- return N(e, t, n);
263
+ return F(e, t, n);
264
264
  }
265
265
  isExcluded(e, t, n) {
266
266
  if (!this.excludes) return !1;
267
- let r = A(this.cfg.root, t) ? this.cfg.root : e.dir, i = k(o(r, t));
267
+ let r = M(this.cfg.root, t) ? this.cfg.root : e.dir, i = j(o(r, t));
268
268
  return !i || i.startsWith("..") ? !1 : (n && (i += "/"), this.excludes.ignores(i));
269
269
  }
270
270
  admits(e, t, n, r, i) {
271
- if (n.startsWith(".") || r && (_.has(n) || t === this.cfg.outDir) || this.isGitignored(i, t, r) || this.isExcluded(e, t, r)) return !1;
271
+ if (n.startsWith(".") || r && (y.has(n) || t === this.cfg.outDir) || this.isGitignored(i, t, r) || this.isExcluded(e, t, r)) return !1;
272
272
  if (!r && e.match) {
273
- let n = k(o(e.dir, t));
273
+ let n = j(o(e.dir, t));
274
274
  if (!e.match.test(n)) return !1;
275
275
  }
276
276
  return !0;
277
277
  }
278
278
  isCandidate(e) {
279
279
  e = s(e);
280
- let t = this.bases.find((t) => A(t.dir, e));
280
+ let t = this.bases.find((t) => M(t.dir, e));
281
281
  if (!t) return !1;
282
282
  if (e === t.dir) return t.match === null;
283
283
  let n = [...t.ancestors], r = this.gitignoreFor(t.dir);
@@ -285,7 +285,7 @@ var B = class {
285
285
  dir: t.dir,
286
286
  ig: r
287
287
  });
288
- let i = k(o(t.dir, e)).split("/"), c = t.dir;
288
+ let i = j(o(t.dir, e)).split("/"), c = t.dir;
289
289
  for (let e = 0; e < i.length; e++) {
290
290
  let r = i[e], o = a(c, r), s = e < i.length - 1;
291
291
  if (!this.admits(t, o, r, s, n)) return !1;
@@ -322,7 +322,7 @@ var B = class {
322
322
  for (let t of this.bases) {
323
323
  let n;
324
324
  try {
325
- n = await p(t.dir);
325
+ n = await h(t.dir);
326
326
  } catch {
327
327
  continue;
328
328
  }
@@ -373,7 +373,7 @@ var B = class {
373
373
  }
374
374
  async statOnly(e) {
375
375
  try {
376
- let t = await p(e);
376
+ let t = await h(e);
377
377
  return t.isFile() ? {
378
378
  size: t.size,
379
379
  mtime: t.mtimeMs,
@@ -403,32 +403,32 @@ var B = class {
403
403
  prev: t.get(e) ?? null
404
404
  }));
405
405
  if (n && this.useWorkers(r.length)) try {
406
- let e = await R(r, n);
406
+ let e = await B(r, n);
407
407
  return this.lastWorkers = n.length, e;
408
408
  } catch {}
409
409
  else n && Promise.all(n.map((e) => e.terminate()));
410
410
  this.lastWorkers = 0;
411
411
  let i = [];
412
- for (let e = 0; e < r.length; e += S) {
413
- for (let t of r.slice(e, e + S)) i.push(this.scanOne(t));
414
- e + S < r.length && await new Promise((e) => setImmediate(e));
412
+ for (let e = 0; e < r.length; e += w) {
413
+ for (let t of r.slice(e, e + w)) i.push(this.scanOne(t));
414
+ e + w < r.length && await new Promise((e) => setImmediate(e));
415
415
  }
416
416
  return i;
417
417
  }
418
418
  loadCache() {
419
419
  try {
420
420
  let e = JSON.parse(n(this.cfg.cacheFile, "utf-8"));
421
- if (e.version === 4 && e.key === this.cfg.cacheKey && e.entries && typeof e.entries == "object") return this.cold = !1, new Map(Object.entries(e.entries));
421
+ if (e.version === 4 && e.key === this.cfg.cacheKey && e.entries && typeof e.entries == "object") return this.cold = !1, new Map(Object.entries(e.entries).filter(([, e]) => U(e)));
422
422
  } catch {}
423
423
  return this.cold = !0, /* @__PURE__ */ new Map();
424
424
  }
425
425
  async scan() {
426
- let e = performance.now(), t = this.loadCache(), n = this.cold ? 2 ** 53 - 1 : t.size, r = this.fileOptions && this.useWorkers(n) ? L(I(h()), this.fileOptions) : null, i = await this.collectFiles(), a = /* @__PURE__ */ new Map(), o = 0, s = 0, c = 0;
426
+ let e = performance.now(), t = this.loadCache(), n = this.cold ? 2 ** 53 - 1 : t.size, r = this.fileOptions && this.useWorkers(n) ? z(R(_()), this.fileOptions) : null, i = await this.collectFiles(), a = /* @__PURE__ */ new Map(), o = 0, s = 0, c = 0;
427
427
  if (this.scanOne) for (let e of await this.scanAll(i, t, r)) {
428
428
  let n = this.fold(e, t.get(e.path));
429
429
  n.read && o++, n.extracted && s++, n.entry ? a.set(e.path, n.entry) : c++;
430
430
  }
431
- else await z(i, b, async (e) => {
431
+ else await V(i, S, async (e) => {
432
432
  let t = await this.statOnly(e);
433
433
  t ? a.set(e, t) : c++;
434
434
  });
@@ -445,12 +445,12 @@ var B = class {
445
445
  async updateFile(e) {
446
446
  if (e = s(e), !this.isCandidate(e)) return this.removeFile(e);
447
447
  let t = this.icons, n = await this.scanFile(e, this.entries.get(e));
448
- return n.entry ? this.entries.set(e, n.entry) : this.entries.delete(e), this.dirty = !0, !V(t, this.icons);
448
+ return n.entry ? this.entries.set(e, n.entry) : this.entries.delete(e), this.dirty = !0, !W(t, this.icons);
449
449
  }
450
450
  removeFile(e) {
451
451
  if (e = s(e), !this.entries.has(e)) return !1;
452
452
  let t = this.icons;
453
- return this.entries.delete(e), this.dirty = !0, !V(t, this.icons);
453
+ return this.entries.delete(e), this.dirty = !0, !W(t, this.icons);
454
454
  }
455
455
  async persist() {
456
456
  if (!this.dirty) return;
@@ -459,18 +459,25 @@ var B = class {
459
459
  version: 4,
460
460
  key: this.cfg.cacheKey,
461
461
  entries: Object.fromEntries(this.entries)
462
- };
462
+ }, t = `${this.cfg.cacheFile}.${process.pid}-${u.randomUUID()}.tmp`;
463
463
  try {
464
- await d(r(this.cfg.cacheFile), { recursive: !0 }), await m(this.cfg.cacheFile, JSON.stringify(e), "utf-8");
465
- } catch {}
464
+ await d(r(this.cfg.cacheFile), { recursive: !0 }), await g(t, JSON.stringify(e), "utf-8"), await p(t, this.cfg.cacheFile);
465
+ } catch {
466
+ await m(t, { force: !0 }).catch(() => {});
467
+ }
466
468
  }
467
469
  };
468
- function V(e, t) {
470
+ function U(e) {
471
+ if (!e || typeof e != "object") return !1;
472
+ let t = e;
473
+ return typeof t.size == "number" && typeof t.mtime == "number" && typeof t.hash == "string" && Array.isArray(t.icons) && t.icons.every((e) => typeof e == "string");
474
+ }
475
+ function W(e, t) {
469
476
  if (e.size !== t.size) return !1;
470
477
  for (let n of e) if (!t.has(n)) return !1;
471
478
  return !0;
472
479
  }
473
- function H(e) {
480
+ function G(e) {
474
481
  let n = s(e);
475
482
  for (;;) {
476
483
  if (t(a(n, "node_modules"))) return a(n, "node_modules", ".cache", "bitboss-ui", "icon-scan.json");
@@ -480,4 +487,4 @@ function H(e) {
480
487
  }
481
488
  return a(e, "node_modules", ".cache", "bitboss-ui", "icon-scan.json");
482
489
  }
483
- export { _ as ALWAYS_SKIPPED_DIRS, v as DEFAULT_MAX_FILE_SIZE, x as DEFAULT_WORKER_THRESHOLD, B as IconScanner, j as ancestorGitignores, P as createFileScanner, T as extractIconCandidates, O as globToRegExp, D as hasGlobMagic, w as iconLiteralRegExp, H as iconScanCacheFile, N as isGitignored, M as readGitignore, I as workerCountFor };
490
+ export { y as ALWAYS_SKIPPED_DIRS, b as DEFAULT_MAX_FILE_SIZE, C as DEFAULT_WORKER_THRESHOLD, H as IconScanner, N as ancestorGitignores, I as createFileScanner, D as extractIconCandidates, A as globToRegExp, k as hasGlobMagic, E as iconLiteralRegExp, G as iconScanCacheFile, F as isGitignored, P as readGitignore, R as workerCountFor };
package/dist/index.d.ts CHANGED
@@ -184,14 +184,14 @@ export type { BbColorPaletteProps, BbColorPaletteEvents, BbColorPaletteSlots, }
184
184
  export type { BbCheckboxProps, BbCheckboxEvents, } from './components/BbCheckbox/BbCheckbox.vue.js';
185
185
  export type { BbCollapsibleProps, BbCollapsibleSlots, } from './components/BbCollapsible/types.js';
186
186
  export type { BbCalendarProps, BbCalendarEvents, BbDateValue, BbCalendarSlots, BbCalendarSegment, } from './components/BbCalendar/types.js';
187
- export type { BbCarouselImage, BbCarouselProps, BbCarouselEvents, BbCarouselSlots, BbCarouselSlotProps, } from './components/BbCarousel/types.js';
187
+ export type { BbCarouselImage, BbCarouselProps, BbCarouselEvents, BbCarouselSlots, } from './components/BbCarousel/types.js';
188
188
  export type { BbDatePickerProps, BbDatePickerEvents, BbDatePickerSlots, BbDatePickerSegment, } from './components/BbDatePicker/types.js';
189
189
  export type { BbDatePickerInputProps, BbDatePickerInputEvents, DatePickerInputError, BbDatePickerInputSlots, } from './components/BbDatePickerInput/types.js';
190
190
  export type { BbTimePickerInputProps, BbTimePickerInputEvents, BbTimePickerInputSlots, TimePickerInputError, } from './components/BbTimePickerInput/types.js';
191
191
  export type { BbTimePickerProps, BbTimePickerEvents, BbTimeValue, BbTimePickerSlots, BbTimePickerSegment, } from './components/BbTimePicker/types.js';
192
192
  export type { Sizes as BbDialogSizes } from './components/BbDialog/types.js';
193
193
  export type { BbDropdownButtonEvents, BbDropdownButtonProps, BbDropdownButtonSlots, } from './components/BbDropdownButton/types.js';
194
- export type { BbDropdownGroupModel, BbDropdownGroupProps, BbDropdownProps, BbDropdownEvents, DropdownGroupItemsGetter, Item as BbDropdownItem, BbDropdownItemProps, BbDropdownItemSlotProps, BbDropdownSlotGroup, BbDropdownSlots, } from './components/BbDropdown/types.js';
194
+ export type { BbDropdownGroupModel, BbDropdownGroupProps, BbDropdownProps, BbDropdownEvents, DropdownGroupItemsGetter, Item as BbDropdownItem, BbDropdownItemProps, BbDropdownSlotGroup, BbDropdownSlots, } from './components/BbDropdown/types.js';
195
195
  export type { BbDropzoneProps, DropZoneError, BbDropzoneEvents, BbDropzoneValue, BbDropzoneSlots, } from './components/BbDropzone/types.js';
196
196
  export type { BbIconProps, BbIconSize } from './components/BbIcon/types.js';
197
197
  export type { BbNumberInputProps, BbNumberInputEvents, BbNumberSimpleUnit, BbNumberUnit, BbNumberInputSlots, } from './components/BbNumberInput/types.js';