bitboss-ui 3.0.0-beta.21 → 3.0.0-beta.22

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 (183) hide show
  1. package/README.md +55 -3
  2. package/bin/bitboss-ui-mcp.mjs +419 -9
  3. package/bin/bitboss-ui.mjs +293 -22
  4. package/dist/ai/BbAccordion.md +21 -23
  5. package/dist/ai/BbAlert.md +6 -12
  6. package/dist/ai/BbAvatar.md +60 -24
  7. package/dist/ai/BbBadge.md +12 -20
  8. package/dist/ai/BbBaseButton.md +14 -16
  9. package/dist/ai/BbBaseCheckboxIcon.md +6 -10
  10. package/dist/ai/BbBaseRadioIcon.md +6 -10
  11. package/dist/ai/BbBaseSwitchIcon.md +5 -9
  12. package/dist/ai/BbBreadcrumbs.md +23 -34
  13. package/dist/ai/BbButton.md +35 -47
  14. package/dist/ai/BbCheckbox.md +21 -37
  15. package/dist/ai/BbCheckboxGroup.md +13 -13
  16. package/dist/ai/BbCollapsible.md +14 -26
  17. package/dist/ai/BbColorInput.md +13 -23
  18. package/dist/ai/BbColorPalette.md +23 -35
  19. package/dist/ai/BbConfirm.md +17 -32
  20. package/dist/ai/BbDatePickerInput.md +15 -21
  21. package/dist/ai/BbDialog.md +159 -62
  22. package/dist/ai/BbDropdown.md +21 -25
  23. package/dist/ai/BbDropdownButton.md +13 -30
  24. package/dist/ai/BbDropzone.md +9 -11
  25. package/dist/ai/BbIcon.md +44 -33
  26. package/dist/ai/BbIndicator.md +2 -2
  27. package/dist/ai/BbNumberInput.md +18 -20
  28. package/dist/ai/BbOffCanvas.md +42 -42
  29. package/dist/ai/BbPagination.md +21 -23
  30. package/dist/ai/BbPopover.md +15 -17
  31. package/dist/ai/BbProgress.md +40 -51
  32. package/dist/ai/BbRadio.md +9 -9
  33. package/dist/ai/BbRadioGroup.md +7 -11
  34. package/dist/ai/BbRating.md +8 -12
  35. package/dist/ai/BbSelect.md +32 -36
  36. package/dist/ai/BbSelectPopover.md +19 -31
  37. package/dist/ai/BbSlider.md +15 -19
  38. package/dist/ai/BbSmoothHeight.md +16 -31
  39. package/dist/ai/BbSpinner.md +118 -74
  40. package/dist/ai/BbSwitch.md +25 -18
  41. package/dist/ai/BbSwitchGroup.md +9 -14
  42. package/dist/ai/BbTable.md +102 -55
  43. package/dist/ai/BbTabs.md +59 -82
  44. package/dist/ai/BbTag.md +12 -23
  45. package/dist/ai/BbTextInput.md +20 -26
  46. package/dist/ai/BbTextarea.md +28 -34
  47. package/dist/ai/BbToast.md +14 -34
  48. package/dist/ai/BbTooltip.md +22 -20
  49. package/dist/ai/BbTree.md +46 -72
  50. package/dist/ai/changelog.json +169 -62
  51. package/dist/ai/components.json +1467 -9
  52. package/dist/ai/composables/useConfirm.md +5 -2
  53. package/dist/ai/composables/useToast.md +4 -2
  54. package/dist/ai/guides/agent-contract.md +7 -4
  55. package/dist/ai/guides/ai-router.md +37 -22
  56. package/dist/ai/guides/component-picker.md +23 -18
  57. package/dist/ai/guides/design-language.md +141 -13
  58. package/dist/ai/guides/design-tokens.md +29 -4
  59. package/dist/ai/guides/icons-policy.md +46 -21
  60. package/dist/ai/guides/installation-and-plugin-setup.md +253 -17
  61. package/dist/ai/guides/migration/components/bb-rating.md +26 -1
  62. package/dist/ai/guides/migration/components/bb-tooltip.md +18 -0
  63. package/dist/ai/guides/migration/v2-to-v3.md +50 -23
  64. package/dist/ai/index.md +1 -1
  65. package/dist/ai/recipes/inertia/approvals-inbox.md +3 -3
  66. package/dist/ai/recipes/inertia/inline-edit-workspace.md +2 -2
  67. package/dist/ai/recipes/inertia/onboarding.md +2 -2
  68. package/dist/ai/recipes/inertia/ownership-atlas.md +6 -6
  69. package/dist/ai/recipes/inertia/record-form.md +5 -5
  70. package/dist/ai/recipes/inertia/records-workspace.md +4 -4
  71. package/dist/ai/recipes/inertia/upload-center.md +6 -6
  72. package/dist/ai/recipes/inertia/wizard-form.md +5 -5
  73. package/dist/ai/recipes/nuxt/approvals-inbox.md +3 -3
  74. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +2 -2
  75. package/dist/ai/recipes/nuxt/onboarding.md +2 -2
  76. package/dist/ai/recipes/nuxt/record-form.md +5 -5
  77. package/dist/ai/recipes/nuxt/records-workspace.md +4 -4
  78. package/dist/ai/recipes/nuxt/upload-center.md +6 -6
  79. package/dist/ai/recipes/nuxt/wizard-form.md +5 -5
  80. package/dist/ai/recipes/vue/approvals-inbox.md +3 -3
  81. package/dist/ai/recipes/vue/inline-edit-workspace.md +2 -2
  82. package/dist/ai/recipes/vue/onboarding.md +2 -2
  83. package/dist/ai/recipes/vue/record-form.md +10 -10
  84. package/dist/ai/recipes/vue/records-workspace.md +4 -4
  85. package/dist/ai/recipes/vue/upload-center.md +6 -6
  86. package/dist/ai/recipes/vue/wizard-form.md +5 -5
  87. package/dist/ai/source/BbBadge.md +1 -1
  88. package/dist/ai/source/BbBaseCheckbox.md +1 -1
  89. package/dist/ai/source/BbBaseDatePicker.md +5 -5
  90. package/dist/ai/source/BbBaseDatePickerInput.md +2 -2
  91. package/dist/ai/source/BbBaseRadio.md +1 -1
  92. package/dist/ai/source/BbBaseRating.md +5 -5
  93. package/dist/ai/source/BbBaseSelect.md +1 -1
  94. package/dist/ai/source/BbBaseSlider.md +5 -5
  95. package/dist/ai/source/BbBaseSwitch.md +1 -1
  96. package/dist/ai/source/BbBaseTimePickerInput.md +1 -1
  97. package/dist/ai/source/BbBreadcrumbs.md +20 -1
  98. package/dist/ai/source/BbButton.md +2 -2
  99. package/dist/ai/source/BbDialog.md +39 -8
  100. package/dist/ai/source/BbDropdown.md +1 -1
  101. package/dist/ai/source/BbDropzone.md +5 -5
  102. package/dist/ai/source/BbIcon.md +23 -10
  103. package/dist/ai/source/BbOffCanvas.md +50 -28
  104. package/dist/ai/source/BbPagination.md +2 -2
  105. package/dist/ai/source/BbPopover.md +12 -1
  106. package/dist/ai/source/BbSelectPopover.md +45 -7
  107. package/dist/ai/source/BbSpinner.md +2 -2
  108. package/dist/ai/source/BbTable.md +11 -11
  109. package/dist/ai/source/BbTooltip.md +57 -10
  110. package/dist/ai/source/ChipsBox.md +1 -1
  111. package/dist/ai/source/CommaBox.md +1 -1
  112. package/dist/ai/source/GuidesComponent.md +14 -7
  113. package/dist/ai/source/OptionsContainer.md +1 -1
  114. package/dist/components/BbBadge/BadgeBodyContent.vue_vue_type_script_setup_true_lang.js +1 -1
  115. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +1 -1
  116. package/dist/components/BbBaseCheckbox/BbBaseCheckbox.vue_vue_type_script_setup_true_lang.js +1 -1
  117. package/dist/components/BbBaseDatePicker/BbBaseDatePicker.vue_vue_type_script_setup_true_lang.js +4 -4
  118. package/dist/components/BbBaseDatePicker/BbBaseDatePickerInputDaySelector.vue_vue_type_script_setup_true_lang.js +1 -1
  119. package/dist/components/BbBaseDatePickerInput/BbBaseDatePickerInput.vue_vue_type_script_setup_true_lang.js +1 -1
  120. package/dist/components/BbBaseInputContainer/BbBaseInputContainer.vue.d.ts +1 -1
  121. package/dist/components/BbBaseRadio/BbBaseRadio.vue_vue_type_script_setup_true_lang.js +1 -1
  122. package/dist/components/BbBaseRating/BbBaseRating.vue_vue_type_script_setup_true_lang.js +3 -3
  123. package/dist/components/BbBaseSelect/BbBaseSelect.vue_vue_type_script_setup_true_lang.js +1 -1
  124. package/dist/components/BbBaseSlider/BbBaseSlider.vue_vue_type_script_setup_true_lang.js +3 -3
  125. package/dist/components/BbBaseSwitch/BbBaseSwitch.vue_vue_type_script_setup_true_lang.js +1 -1
  126. package/dist/components/BbBaseTimePickerInput/BbBaseTimePickerInput.vue_vue_type_script_setup_true_lang.js +1 -1
  127. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +71 -71
  128. package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +2 -2
  129. package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +102 -97
  130. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +1 -1
  131. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +58 -58
  132. package/dist/components/BbDropzone/BbDropzone.vue_vue_type_script_setup_true_lang.js +2 -2
  133. package/dist/components/BbIcon/BbIcon.vue_vue_type_script_setup_true_lang.js +33 -35
  134. package/dist/components/BbIcon/iconCache.d.ts +30 -0
  135. package/dist/components/BbIcon/iconCache.js +21 -3
  136. package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +57 -56
  137. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +2 -2
  138. package/dist/components/BbPopover/BbPopover.vue_vue_type_script_setup_true_lang.js +138 -138
  139. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +43 -43
  140. package/dist/components/BbSpinner/BbSpinner.vue_vue_type_script_setup_true_lang.js +1 -1
  141. package/dist/components/BbSpinner/types.d.ts +1 -1
  142. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +8 -8
  143. package/dist/components/BbTable/BbTableDataRow.js +2 -2
  144. package/dist/components/BbToast/BbToastRegion.vue_vue_type_script_setup_true_lang.js +62 -62
  145. package/dist/components/BbTooltip/BbTooltip.vue_vue_type_script_setup_true_lang.js +81 -78
  146. package/dist/components/BbTooltip/types.d.ts +8 -1
  147. package/dist/components/ChipsBox/ChipsBox.vue_vue_type_script_setup_true_lang.js +1 -1
  148. package/dist/components/CommaBox/CommaBox.vue_vue_type_script_setup_true_lang.js +1 -1
  149. package/dist/components/OptionsContainer/OptionsContainer.vue_vue_type_script_setup_true_lang.js +1 -1
  150. package/dist/composables/useConfirm.d.ts +22 -0
  151. package/dist/composables/useConfirm.js +43 -40
  152. package/dist/composables/useSafeAreaInternal.js +1 -1
  153. package/dist/composables/useToast.d.ts +16 -0
  154. package/dist/composables/useToast.js +20 -16
  155. package/dist/composables/useViewportWidth.d.ts +20 -6
  156. package/dist/composables/useViewportWidth.js +8 -7
  157. package/dist/icon-scan.d.ts +276 -0
  158. package/dist/icon-scan.js +485 -0
  159. package/dist/icons-whitelist.d.ts +5 -4
  160. package/dist/llms-full.txt +1979 -1527
  161. package/dist/llms-medium.txt +461 -74
  162. package/dist/llms.txt +1 -1
  163. package/dist/nuxt.js +10 -7
  164. package/dist/plugin.js +1 -0
  165. package/dist/runtime/nuxt-plugin.js +2 -1
  166. package/dist/styles.css +1 -1
  167. package/dist/types/Config.d.ts +18 -0
  168. package/dist/utils/cssLayers.d.ts +91 -0
  169. package/dist/utils/cssLayers.js +43 -0
  170. package/dist/utils/injectLibraryStyles.d.ts +3 -1
  171. package/dist/utils/injectLibraryStyles.js +24 -23
  172. package/dist/vite-plugin.d.ts +74 -11
  173. package/dist/vite.js +292 -253
  174. package/llms.txt +1 -1
  175. package/package.json +7 -5
  176. package/scripts/lib/ensure-manifest.mjs +28 -5
  177. package/scripts/lib/eslint-plugin.d.ts +35 -0
  178. package/scripts/lib/eslint-plugin.mjs +299 -3
  179. package/scripts/lib/hand-roll-hints.mjs +50 -6
  180. package/scripts/lib/html-attributes.mjs +42 -0
  181. package/scripts/lib/mcp-config.mjs +38 -34
  182. package/scripts/lib/public-type-exports.mjs +246 -0
  183. package/scripts/lib/validate-bb-markup.mjs +205 -12
@@ -4,67 +4,65 @@ import { useLogger as n } from "../../composables/useLogger.js";
4
4
  import { warnRemovedAttrs as r } from "../../utilities/functions/warnRemovedAttrs.js";
5
5
  import { parseSize as i } from "../../utilities/functions/parseSize.js";
6
6
  import { ICONS_INJECTION_KEY as a } from "../../utilities/misc/iconsInjectionKey.js";
7
- import { EMPTY_ICON as o, cacheKeyFor as s, parseIcon as c, parsedIcons as l } from "./iconCache.js";
8
- import { computed as u, createElementBlock as d, defineComponent as f, inject as p, mergeProps as m, onBeforeMount as h, onServerPrefetch as g, openBlock as _, ref as v, watch as y } from "vue";
7
+ import { EMPTY_ICON as o, MISSING_ICON as s, cacheKeyFor as c, parseIcon as l, parsedIcons as u, resolveRegistryIcon as d } from "./iconCache.js";
8
+ import { computed as f, createElementBlock as p, defineComponent as m, inject as h, mergeProps as g, onBeforeMount as _, onServerPrefetch as v, openBlock as y, shallowRef as b, watch as x } from "vue";
9
9
  //#region src/components/BbIcon/BbIcon.vue?vue&type=script&setup=true&lang.ts
10
- var b = ["innerHTML"], x = /*@__PURE__*/ f({
10
+ var S = ["innerHTML"], C = /*@__PURE__*/ m({
11
11
  __name: "BbIcon",
12
12
  props: {
13
13
  label: {},
14
14
  icon: {},
15
15
  size: { default: "md" }
16
16
  },
17
- setup(f) {
18
- let x = f, S = e();
17
+ setup(m) {
18
+ let C = m, w = e();
19
19
  process.env.NODE_ENV !== "production" && r("BbIcon", t("BbIcon"));
20
- let C = n(), w = v(), T = () => {
21
- w.value = p(a) ?? p("icons"), w.value || C.throw("Failed to load icons. Make sure the plugin for your platform (Vue, Nuxt, or Inertia) is installed.");
22
- }, E = (e) => /<svg[\s>]/i.test(e), D = /* @__PURE__ */ RegExp("<(?:[^>\"']|\"[^\"]*\"|'[^']*')*[\\s/]on[a-z]+\\s*=", "i"), O = /<script[\s/>]/i, k = (e) => D.test(e) ? "inline event handler attributes" : O.test(e) ? "an embedded <script> element" : null, A = (e) => s(e, E(e)), j = v(l.get(A(x.icon)) ?? null), M = async () => {
23
- let e = A(x.icon), t = l.get(e);
20
+ let T = n(), E = b(), D = () => {
21
+ E.value = h(a) ?? h("icons"), E.value || T.throw("Failed to load icons. Make sure the plugin for your platform (Vue, Nuxt, or Inertia) is installed.");
22
+ }, O = (e) => /<svg[\s>]/i.test(e), k = /* @__PURE__ */ RegExp("<(?:[^>\"']|\"[^\"]*\"|'[^']*')*[\\s/]on[a-z]+\\s*=", "i"), A = /<script[\s/>]/i, j = (e) => k.test(e) ? "inline event handler attributes" : A.test(e) ? "an embedded <script> element" : null, M = (e) => c(e, O(e)), N = b(u.get(M(C.icon)) ?? null), P = async () => {
23
+ let e = M(C.icon), t = u.get(e);
24
24
  if (t) {
25
- j.value = t;
25
+ N.value = t;
26
26
  return;
27
27
  }
28
- if (E(x.icon)) {
29
- let t = k(x.icon);
28
+ if (O(C.icon)) {
29
+ let t = j(C.icon);
30
30
  if (t) {
31
- j.value = o, C.warn(`Inline SVG icon rejected: it carries ${t} and did not pass sanitation, so the icon was dropped. bitboss-ui never sanitizes inline SVG — pass trusted markup (e.g. an import with \`?raw\`), never a string from a CMS, an API, or user input.`);
31
+ N.value = o, T.warn(`Inline SVG icon rejected: it carries ${t} and did not pass sanitation, so the icon was dropped. bitboss-ui never sanitizes inline SVG — pass trusted markup (e.g. an import with \`?raw\`), never a string from a CMS, an API, or user input.`);
32
32
  return;
33
33
  }
34
- j.value = l.set(e, c(x.icon)).get(e);
34
+ N.value = u.set(e, l(C.icon)).get(e);
35
35
  return;
36
36
  }
37
- w.value || C.throw("Icons have not been loaded");
38
- let n = w.value[e];
39
- n || C.throw(`Icon "${e}" does not exist.`);
40
- let r = await n();
41
- j.value = l.set(e, c(r)).get(e);
37
+ E.value || T.throw("Icons have not been loaded");
38
+ let n = await d(e, E.value);
39
+ M(C.icon) === e && (N.value = n);
42
40
  };
43
- g(async () => {
44
- E(x.icon) || T(), await M();
45
- }), h(async () => {
46
- !w.value && !E(x.icon) && T(), j.value || await M();
47
- }), y(() => x.icon, M);
48
- let N = u(() => {
41
+ v(async () => {
42
+ O(C.icon) || D(), await P();
43
+ }), _(async () => {
44
+ !E.value && !O(C.icon) && D(), N.value || await P();
45
+ }), x(() => C.icon, P);
46
+ let F = f(() => {
49
47
  try {
50
- return i(x.size, S.iconDefaultSizes);
48
+ return i(C.size, w.iconDefaultSizes);
51
49
  } catch {
52
- return C.warn(`Invalid size: "${x.size}" in BbIcon. Falling back to "md".`), `${S.iconDefaultSizes.md}px`;
50
+ return T.warn(`Invalid size: "${C.size}" in BbIcon. Falling back to "md".`), `${w.iconDefaultSizes.md}px`;
53
51
  }
54
- }), P = u(() => {
55
- let e = { "bb-icon": !0 }, t = { "--w": N.value }, n = {
52
+ }), I = f(() => {
53
+ let e = { "bb-icon": !0 }, t = { "--w": F.value }, n = {
56
54
  viewBox: "0 0 1 1",
57
- ...j.value?.attributes ?? {},
55
+ ...N.value?.attributes ?? {},
58
56
  class: e,
59
57
  style: t
60
58
  };
61
- return x.label ? (n.role = "img", n["aria-label"] = x.label.trim()) : n["aria-hidden"] = "true", n.focusable = "false", n;
59
+ return C.label ? (n.role = "img", n["aria-label"] = C.label.trim()) : n["aria-hidden"] = "true", n.focusable = "false", N.value === s && (n["data-bb-icon-missing"] = C.icon), n;
62
60
  });
63
- return (e, t) => (_(), d("svg", m(P.value, {
61
+ return (e, t) => (y(), p("svg", g(I.value, {
64
62
  "data-allow-mismatch": "",
65
- innerHTML: j.value?.content
66
- }), null, 16, b));
63
+ innerHTML: N.value?.content
64
+ }), null, 16, S));
67
65
  }
68
66
  });
69
67
  //#endregion
70
- export { x as default };
68
+ export { C as default };
@@ -28,6 +28,36 @@ export type ParsedIcon = {
28
28
  export declare const parsedIcons: Map<string, ParsedIcon>;
29
29
  /** The "no icon at all" outcome: a rejected payload, or a value we never got. */
30
30
  export declare const EMPTY_ICON: ParsedIcon;
31
+ /**
32
+ * The built-in placeholder: a question mark in a circle on the house set's
33
+ * 24×24 grid and 2px stroke, painted in `currentColor`, no fixed size. It is
34
+ * part of the library bundle — never a provider or `local:` icon — so it can
35
+ * never itself be missing, and it is deliberately not configurable.
36
+ */
37
+ export declare const MISSING_ICON_SVG: string;
38
+ /**
39
+ * Names this page has already failed to resolve, with the message that was
40
+ * reported for each. Reported ONCE per name per page load — a table with the
41
+ * same missing glyph on every row logs one line, not one per cell.
42
+ */
43
+ export declare const missingIcons: Map<string, string>;
44
+ /** Test-only: forget every reported miss so a spec starts on a clean page. */
45
+ export declare const __resetForTest: () => void;
46
+ /**
47
+ * Resolve a registry key to its parsed icon, or to the placeholder when the
48
+ * name does not resolve. Never rejects: an unknown name is a rendering
49
+ * outcome (the placeholder plus one `console.error`), not an exception, so
50
+ * the component tree around the icon stays mounted.
51
+ *
52
+ * The registry's loader for an unknown name (a Proxy the build plugin emits)
53
+ * rejects with the actionable diagnosis — "does not exist in the lucide icon
54
+ * set — did you mean …", "exists but is not bundled … add it to
55
+ * `iconWhitelist`", "requires @iconify-json/… run npm install …" — and, in
56
+ * dev, also raises the Vite error overlay. That message is what gets logged.
57
+ */
58
+ export declare const resolveRegistryIcon: (key: string, registry: Record<string, (() => Promise<string>) | undefined>) => Promise<ParsedIcon>;
31
59
  export declare const parseIcon: (source: string) => ParsedIcon;
60
+ /** The placeholder, parsed once — `BbIcon` compares against it by identity. */
61
+ export declare const MISSING_ICON: ParsedIcon;
32
62
  /** Registry key for a name, or the markup itself for an inline payload. */
33
63
  export declare const cacheKeyFor: (value: string, isInlineSvg: boolean) => string;
@@ -2,7 +2,25 @@
2
2
  var e = /* @__PURE__ */ new Map(), t = {
3
3
  content: null,
4
4
  attributes: {}
5
- }, n = (e) => {
5
+ }, n = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M9.3 9.4a2.8 2.8 0 0 1 5.4.9c0 1.9-2.7 2.3-2.7 4\"/><path d=\"M12 17.6h.01\"/></svg>", r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = (e) => e.startsWith("local:") ? `[bitboss-ui] icon "${e}" does not exist — there is no "${e.slice(6)}.svg" in the plugin's iconDir.` : `[bitboss-ui] icon "${e}" does not exist in the icon registry.`, o = (t, n) => {
6
+ let o = e.get(t);
7
+ if (o) return Promise.resolve(o);
8
+ if (r.has(t)) return Promise.resolve(c);
9
+ let l = i.get(t);
10
+ return l || (l = (async () => {
11
+ try {
12
+ let r = n[t];
13
+ if (!r) throw Error(a(t));
14
+ let i = s(await r());
15
+ return e.set(t, i), i;
16
+ } catch (e) {
17
+ let n = e instanceof Error ? e.message : String(e);
18
+ return r.has(t) || (r.set(t, n), console.error(n.replace(/^\[bitboss-ui\] /, "bitboss-ui | "))), c;
19
+ } finally {
20
+ i.delete(t);
21
+ }
22
+ })(), i.set(t, l)), l;
23
+ }, s = (e) => {
6
24
  let t = e.replace(/<\?xml[^?]*\?>/gi, "").replace(/<!DOCTYPE[^>]*>/gi, "").replace(/<\/?svg(?:[^>"']|"[^"]*"|'[^']*')*>/gi, ""), n = {}, r = e.match(/<svg((?:[^>"']|"[^"]*"|'[^']*')*)>/i);
7
25
  if (r) {
8
26
  let e = /([\w-]+)="([^"]*)"/g, t;
@@ -12,6 +30,6 @@ var e = /* @__PURE__ */ new Map(), t = {
12
30
  content: t,
13
31
  attributes: n
14
32
  };
15
- }, r = (e, t) => t || e.includes(":") ? e : `local:${e}`;
33
+ }, c = s(n), l = (e, t) => t || e.includes(":") ? e : `local:${e}`;
16
34
  //#endregion
17
- export { t as EMPTY_ICON, r as cacheKeyFor, n as parseIcon, e as parsedIcons };
35
+ export { t as EMPTY_ICON, c as MISSING_ICON, n as MISSING_ICON_SVG, l as cacheKeyFor, r as missingIcons, s as parseIcon, e as parsedIcons, o as resolveRegistryIcon };
@@ -30,7 +30,7 @@ var Me = [
30
30
  }, Pe = {
31
31
  key: 1,
32
32
  class: "bb-offcanvas__header"
33
- }, Fe = { class: "bb-offcanvas__body-content" }, Ie = { class: "bb-offcanvas__footer" }, Le = 4, Re = 2, ze = 50, Be = 8, p = 500, Ve = "cubic-bezier(0.32, 0.72, 0, 1)", m = /*@__PURE__*/ xe({
33
+ }, Fe = { class: "bb-offcanvas__body-content" }, Ie = { class: "bb-offcanvas__footer" }, Le = 4, Re = 50, ze = 8, p = 500, Be = "cubic-bezier(0.32, 0.72, 0, 1)", m = /*@__PURE__*/ xe({
34
34
  __name: "BbOffCanvas",
35
35
  props: /*@__PURE__*/ s({
36
36
  description: {},
@@ -64,93 +64,93 @@ var Me = [
64
64
  "hidden"
65
65
  ], ["update:modelValue"]),
66
66
  setup(re, { emit: xe }) {
67
- let s = Oe(re, "modelValue"), m = re, h = xe, g = ke(), He = e();
67
+ let s = Oe(re, "modelValue"), m = re, h = xe, g = ke(), Ve = e();
68
68
  process.env.NODE_ENV !== "production" && ne("BbOffCanvas", ee("BbOffCanvas"));
69
- let { t: Ue } = ue(), _ = () => !!m.title || !!g.title, v = () => _() || !!g.header || w(), y = r(() => !!(m.disabled || m.persistent)), b = () => typeof document < "u", x = l(null), S = n(() => s.value || m.eager, { initialValue: s.value || m.eager }), C = `title_${t().id.value}`, We = `desc_${t().id.value}`, w = () => !!m.description || !!g.description, T = l(0), E = l(!1), D = l(null), Ge = () => {
69
+ let { t: He } = ue(), _ = () => !!m.title || !!g.title, v = () => _() || !!g.header || w(), y = r(() => !!(m.disabled || m.persistent)), b = () => typeof document < "u", x = l(null), S = n(() => s.value || m.eager, { initialValue: s.value || m.eager }), C = `title_${t().id.value}`, Ue = `desc_${t().id.value}`, w = () => !!m.description || !!g.description, T = l(0), E = l(!1), D = l(null), We = () => {
70
70
  D.value = null;
71
- }, Ke = (e) => {
71
+ }, Ge = (e) => {
72
72
  D.value = {
73
73
  startX: e.clientX,
74
74
  startY: e.clientY,
75
75
  startedOnBackdrop: e.target === e.currentTarget
76
76
  };
77
- }, qe = (e) => {
77
+ }, Ke = (e) => {
78
78
  let t = D.value;
79
- Ge(), !(t && !t.startedOnBackdrop) && (t && (Math.abs(e.clientX - t.startX) > Le || Math.abs(e.clientY - t.startY) > Le) || tt(e));
79
+ We(), !(t && !t.startedOnBackdrop) && (t && (Math.abs(e.clientX - t.startX) > Le || Math.abs(e.clientY - t.startY) > Le) || et(e));
80
80
  }, O, k = (e) => {
81
81
  clearTimeout(O), N.value = !0, O = setTimeout(() => {
82
82
  N.value = !1;
83
83
  }, e);
84
- }, A = Symbol("bb-off-canvas-escape"), Je = () => {
85
- oe(A), b() && document.addEventListener("keydown", Ze, { capture: !0 });
84
+ }, A = Symbol("bb-off-canvas-escape"), qe = () => {
85
+ oe(A), b() && document.addEventListener("keydown", Xe, { capture: !0 });
86
+ }, Je = () => {
87
+ se(A), b() && document.removeEventListener("keydown", Xe, { capture: !0 });
86
88
  }, Ye = () => {
87
- se(A), b() && document.removeEventListener("keydown", Ze, { capture: !0 });
88
- }, Xe = () => {
89
89
  if (!m.focusTarget) return;
90
90
  let e = x.value?.querySelector(m.focusTarget);
91
91
  e instanceof HTMLElement && e.focus();
92
- }, Ze = (e) => {
92
+ }, Xe = (e) => {
93
93
  if (e.key === "Escape" && !H.value && ae(A) && (e.stopImmediatePropagation(), y.value)) return e.preventDefault(), k(200), !1;
94
- }, j = null, Qe = async (e) => {
95
- if (e) h("show"), T.value++, b() && !document.documentElement.style.getPropertyValue("--scrollbar-width") && document.documentElement.style.setProperty("--scrollbar-width", `${rt()}px`), Je(), await Ce(), E.value = !0, x.value && !x.value.open && x.value.showModal(), _t(), x.value && (j = _e(x.value)), Xe(), h("shown");
94
+ }, j = null, Ze = async (e) => {
95
+ if (e) h("show"), T.value++, b() && !document.documentElement.style.getPropertyValue("--scrollbar-width") && document.documentElement.style.setProperty("--scrollbar-width", `${nt()}px`), qe(), await Ce(), E.value = !0, x.value && !x.value.open && x.value.showModal(), gt(), x.value && (j = _e(x.value)), Ye(), h("shown");
96
96
  else {
97
- h("hide");
97
+ h("hide"), _t();
98
98
  let e = T.value;
99
99
  if (await le(m.transitionDuration), e !== T.value) return;
100
- Ye(), vt(), x.value?.close(), j?.(), j = null, E.value = !1, q = !1, K.value = !1, kt(), h("hidden");
100
+ Je(), x.value?.close(), j?.(), j = null, E.value = !1, q = !1, K.value = !1, kt(), h("hidden");
101
101
  }
102
- }, $e = () => {
102
+ }, Qe = () => {
103
103
  process.env.NODE_ENV !== "production" && (!g.header || m.title || Ce(() => {
104
104
  !x.value || document.getElementById(C) || te().warn(`BbOffCanvas: the #header slot does not contain an element with id="${C}", so aria-labelledby points at nothing and the panel announces as unnamed. Bind the slot's \`titleId\` to your heading: <template #header="{ titleId }"><h2 :id="titleId">…</h2></template>.`);
105
105
  }));
106
106
  };
107
- f(s, Qe), Te(() => {
108
- s.value && Qe(!0), $e();
107
+ f(s, Ze), Te(() => {
108
+ s.value && Ze(!0), Qe();
109
109
  }), we(() => {
110
- clearTimeout(O), Ye(), W.value?.removeEventListener("scroll", Ct), J?.disconnect(), J = null, vt(), j?.(), j = null;
110
+ clearTimeout(O), Je(), W.value?.removeEventListener("scroll", Ct), J?.disconnect(), J = null, _t(), j?.(), j = null;
111
111
  });
112
- let et = r(() => {
113
- if (ot.value) return "100%";
114
- let e = at(m.size);
115
- return e === "auto" ? "fit-content" : de(e, He.offCanvasDefaultSizes);
116
- }), tt = (e) => {
112
+ let $e = r(() => {
113
+ if (at.value) return "100%";
114
+ let e = it(m.size);
115
+ return e === "auto" ? "fit-content" : de(e, Ve.offCanvasDefaultSizes);
116
+ }), et = (e) => {
117
117
  if (e.preventDefault(), y.value) return k(300), !1;
118
118
  M();
119
119
  }, M = () => {
120
120
  s.value = !1;
121
- }, nt = () => {
121
+ }, tt = () => {
122
122
  if (m.disabled) {
123
123
  k(300);
124
124
  return;
125
125
  }
126
126
  M();
127
- }, N = l(!1), rt = () => b() ? window.innerWidth - document.documentElement.clientWidth : 0, { isMobile: it } = ce(), { resolve: at } = me(), ot = r(() => m.fullscreen === !0 || m.fullscreen === "mobile" && it.value), P = Symbol("bb-offcanvas"), { stacks: F, push: st, setSize: ct, remove: lt, offset: ut, openOrder: dt, registerOpen: ft, deregisterOpen: pt } = ge(), I = r(() => m.side === "left" || m.side === "right" ? "x" : "y"), L = r(() => m.side === "right" || m.side === "bottom" ? 1 : -1), mt = `bb-offcanvas-${t().id.value}`, R = r(() => m.stack || mt), z = null, B = () => {
127
+ }, N = l(!1), nt = () => b() ? window.innerWidth - document.documentElement.clientWidth : 0, { isMobile: rt } = ce(), { resolve: it } = me(), at = r(() => m.fullscreen === !0 || m.fullscreen === "mobile" && rt.value), P = Symbol("bb-offcanvas"), { stacks: F, push: ot, setSize: st, remove: ct, offset: lt, openOrder: ut, registerOpen: dt, deregisterOpen: ft } = ge(), I = r(() => m.side === "left" || m.side === "right" ? "x" : "y"), L = r(() => m.side === "right" || m.side === "bottom" ? 1 : -1), pt = `bb-offcanvas-${t().id.value}`, R = r(() => m.stack || pt), z = null, B = () => {
128
128
  let e = x.value?.getBoundingClientRect();
129
129
  return e ? I.value === "x" ? e.width : e.height : 0;
130
- }, V = null, ht = () => {
130
+ }, V = null, mt = () => {
131
131
  typeof ResizeObserver > "u" || !x.value || (V = new ResizeObserver(() => {
132
- z !== null && ct(z, P, B());
132
+ z !== null && st(z, P, B());
133
133
  }), V.observe(x.value));
134
- }, gt = () => {
134
+ }, ht = () => {
135
135
  V?.disconnect(), V = null;
136
+ }, gt = () => {
137
+ z = R.value, ot(z, P, m.side, B(), m.stackGap), dt(P), mt();
136
138
  }, _t = () => {
137
- z = R.value, st(z, P, m.side, B(), m.stackGap), ft(P), ht();
138
- }, vt = () => {
139
- gt(), pt(P), z !== null && (lt(z, P), z = null);
139
+ ht(), ft(P), z !== null && (ct(z, P), z = null);
140
140
  }, H = r(() => {
141
- let e = dt.value.indexOf(P);
142
- return E.value && e !== -1 && e < dt.value.length - Re;
143
- });
141
+ let e = ut.value.indexOf(P);
142
+ return E.value && e !== -1 && e < ut.value.length - 1;
143
+ }), vt = r(() => ut.value.indexOf(P) > 0);
144
144
  f([
145
145
  R,
146
146
  () => m.side,
147
147
  () => m.stackGap
148
148
  ], ([e]) => {
149
- z !== null && (lt(z, P), z = e, st(e, P, m.side, B(), m.stackGap));
149
+ z !== null && (ct(z, P), z = e, ot(e, P, m.side, B(), m.stackGap));
150
150
  });
151
- let yt = r(() => it.value ? 14 : 20), bt = r(() => {
151
+ let yt = r(() => rt.value ? 14 : 20), bt = r(() => {
152
152
  F.value;
153
- let e = I.value === "x" ? pe.value : fe.value, t = ut(R.value, P, e, yt.value);
153
+ let e = I.value === "x" ? pe.value : fe.value, t = lt(R.value, P, e, yt.value);
154
154
  return {
155
155
  [I.value === "x" ? "--stack-x" : "--stack-y"]: `${-L.value * t}px`,
156
156
  "--stack-fill": `${t}px`
@@ -189,7 +189,7 @@ var Me = [
189
189
  let t = x.value;
190
190
  if (t) {
191
191
  if (e) {
192
- t.style.transition = `transform ${p}ms ${Ve}`, t.style.transform = "translate3d(0, 0, 0)", window.setTimeout(() => {
192
+ t.style.transition = `transform ${p}ms ${Be}`, t.style.transform = "translate3d(0, 0, 0)", window.setTimeout(() => {
193
193
  !t.isConnected || q || (t.style.removeProperty("transform"), t.style.removeProperty("transition"), $());
194
194
  }, p);
195
195
  return;
@@ -205,7 +205,7 @@ var Me = [
205
205
  M();
206
206
  return;
207
207
  }
208
- if (q = !0, K.value = !0, e.style.transition = `transform ${p}ms ${Ve}`, Dt(), await le(p), !s.value) {
208
+ if (q = !0, K.value = !0, e.style.transition = `transform ${p}ms ${Be}`, Dt(), await le(p), !s.value) {
209
209
  q = !1, K.value = !1, e.style.removeProperty("transform"), e.style.removeProperty("transition"), $();
210
210
  return;
211
211
  }
@@ -225,7 +225,7 @@ var Me = [
225
225
  }, Pt = () => {
226
226
  Y = !1, X = !1, Z = !1, Q = !1, G.value = !1;
227
227
  }, { lengthX: Ft, lengthY: It } = je(x, {
228
- threshold: Be,
228
+ threshold: ze,
229
229
  passive: !1,
230
230
  onSwipeStart: (e) => {
231
231
  if (Pt(), !m.draggable || !E.value || e.target === x.value) return;
@@ -240,7 +240,7 @@ var Me = [
240
240
  Q = !0;
241
241
  return;
242
242
  }
243
- if (t < Be) return;
243
+ if (t < ze) return;
244
244
  Z = !0, G.value = !0, Tt();
245
245
  }
246
246
  e.preventDefault(), Et(t);
@@ -251,43 +251,44 @@ var Me = [
251
251
  return;
252
252
  }
253
253
  let e = wt();
254
- if (Pt(), e >= ze && !y.value) {
254
+ if (Pt(), e >= Re && !y.value) {
255
255
  At();
256
256
  return;
257
257
  }
258
- Ot(!0), e >= ze && k(300);
258
+ Ot(!0), e >= Re && k(300);
259
259
  }
260
260
  });
261
261
  return (e, t) => (c(), a("dialog", Se({
262
262
  ref_key: "dialog",
263
263
  ref: x,
264
- "aria-describedby": d(S) && w() ? We : void 0,
264
+ "aria-describedby": d(S) && w() ? Ue : void 0,
265
265
  "aria-labelledby": d(S) && (_() || e.$slots.header) ? C : void 0,
266
266
  class: ["bb-offcanvas", [{
267
267
  "bb-offcanvas--open": s.value,
268
268
  "bb-offcanvas--visible": E.value,
269
- "bb-offcanvas--fullscreen": ot.value,
269
+ "bb-offcanvas--fullscreen": at.value,
270
270
  "bb-offcanvas--deny-close": N.value,
271
271
  "bb-offcanvas--dragging": G.value,
272
272
  "bb-offcanvas--swipe-exit": K.value,
273
273
  "bb-offcanvas--instant-stack": U.value,
274
274
  "bb-offcanvas--covered": H.value,
275
+ "bb-offcanvas--stacked": vt.value,
275
276
  "bb-offcanvas--has-handle": e.draggable,
276
277
  "bb-offcanvas--no-header": !v(),
277
278
  [`bb-offcanvas--${m.side}`]: !0
278
279
  }].flat()],
279
280
  inert: !s.value && !E.value || H.value,
280
281
  style: {
281
- "--max-size": et.value,
282
+ "--max-size": $e.value,
282
283
  "--transition-duration": `${m.transitionDuration}ms`,
283
284
  "--stack-gap": `${m.stackGap}px`,
284
285
  ...bt.value
285
286
  }
286
287
  }, De(d(ie), !0), {
287
- onCancel: tt,
288
- onClick: Ae(qe, ["self"]),
289
- onPointercancel: Ge,
290
- onPointerdown: Ke
288
+ onCancel: et,
289
+ onClick: Ae(Ke, ["self"]),
290
+ onPointercancel: We,
291
+ onPointerdown: Ge
291
292
  }), [d(S) ? (c(), a(ve, { key: 0 }, [
292
293
  e.draggable ? (c(), a("div", Ne)) : i("", !0),
293
294
  v() ? (c(), a("div", Pe, [u(e.$slots, "header", {
@@ -302,13 +303,13 @@ var Me = [
302
303
  }, [u(e.$slots, "title", { text: e.title }, () => [be(Ee(e.title), 1)])])) : i("", !0),
303
304
  w() ? (c(), a("p", {
304
305
  key: 1,
305
- id: We,
306
+ id: Ue,
306
307
  class: "bb-offcanvas__description"
307
308
  }, [u(e.$slots, "description", { text: e.description }, () => [be(Ee(e.description), 1)])])) : i("", !0),
308
309
  e.hideClose ? i("", !0) : (c(), ye(he, {
309
310
  key: 2,
310
- "aria-label": d(Ue)("offCanvas.closeLabel").value,
311
- onClick: nt
311
+ "aria-label": d(He)("offCanvas.closeLabel").value,
312
+ onClick: tt
312
313
  }, null, 8, ["aria-label"]))
313
314
  ])])) : i("", !0),
314
315
  o("div", {
@@ -317,8 +318,8 @@ var Me = [
317
318
  class: "bb-offcanvas__body scrollbar-border"
318
319
  }, [o("div", Fe, [u(e.$slots, "default", { close: M }), !v() && !e.hideClose ? (c(), ye(he, {
319
320
  key: 0,
320
- "aria-label": d(Ue)("offCanvas.closeLabel").value,
321
- onClick: nt
321
+ "aria-label": d(He)("offCanvas.closeLabel").value,
322
+ onClick: tt
322
323
  }, null, 8, ["aria-label"])) : i("", !0)])], 512),
323
324
  o("div", Ie, [u(e.$slots, "footer")])
324
325
  ], 64)) : i("", !0)], 16, Me));
@@ -9,11 +9,11 @@ import { parseCount as c, parsePositiveInteger as l } from "../../utilities/func
9
9
  import { computeNextMaxSize as u } from "./paginationFit.js";
10
10
  import { Fragment as d, computed as f, createBlock as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, guardReactiveProps as v, mergeModels as y, mergeProps as b, normalizeClass as x, normalizeProps as S, onBeforeUnmount as te, onMounted as ne, openBlock as C, ref as w, renderList as T, renderSlot as E, toDisplayString as D, unref as O, useModel as re, watch as k, withCtx as A } from "vue";
11
11
  //#region src/components/BbPagination/BbPagination.vue?vue&type=script&setup=true&lang.ts
12
- var j = ["aria-label"], M = { class: "bb-pagination__page-label sr-only" }, N = {
12
+ var j = ["aria-label"], M = { class: "bb-pagination__page-label bb-sr-only" }, N = {
13
13
  key: 0,
14
14
  "aria-hidden": "true",
15
15
  class: "bb-pagination__page bb-pagination__page--ellipsis"
16
- }, P = { class: "bb-pagination__page-label" }, F = { class: "bb-pagination__page-label" }, I = { class: "bb-pagination__page-label sr-only" }, L = /*@__PURE__*/ _({
16
+ }, P = { class: "bb-pagination__page-label" }, F = { class: "bb-pagination__page-label" }, I = { class: "bb-pagination__page-label bb-sr-only" }, L = /*@__PURE__*/ _({
17
17
  __name: "BbPagination",
18
18
  props: /*@__PURE__*/ y({
19
19
  disabled: { type: Boolean },