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

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 (169) hide show
  1. package/README.md +5 -5
  2. package/bin/cli.mjs +16 -10
  3. package/dist/ai/BbAlert.md +1 -1
  4. package/dist/ai/BbBreadcrumbs.md +1 -1
  5. package/dist/ai/BbButton.md +2 -2
  6. package/dist/ai/BbColorInput.md +1 -1
  7. package/dist/ai/BbColorPalette.md +1 -1
  8. package/dist/ai/BbConfirm.md +1 -1
  9. package/dist/ai/BbDatePicker.md +1 -1
  10. package/dist/ai/BbDatePickerInput.md +1 -1
  11. package/dist/ai/BbDialog.md +3 -2
  12. package/dist/ai/BbDropdown.md +23 -21
  13. package/dist/ai/BbDropdownButton.md +13 -11
  14. package/dist/ai/BbGallery.md +3 -2
  15. package/dist/ai/BbIcon.md +10 -10
  16. package/dist/ai/BbOffCanvas.md +3 -2
  17. package/dist/ai/BbPopover.md +1 -1
  18. package/dist/ai/BbSelect.md +153 -43
  19. package/dist/ai/BbSelectPopover.md +115 -9
  20. package/dist/ai/BbTable.md +1 -1
  21. package/dist/ai/BbTimePicker.md +1 -1
  22. package/dist/ai/BbTimePickerInput.md +1 -1
  23. package/dist/ai/GroupedListBox.md +2 -2
  24. package/dist/ai/ListBox.md +3 -2
  25. package/dist/ai/changelog.json +153 -7
  26. package/dist/ai/components.json +12 -12
  27. package/dist/ai/guides/agent-contract.md +1 -1
  28. package/dist/ai/guides/calendars-and-digits.md +1 -1
  29. package/dist/ai/guides/eslint-rules.md +1 -1
  30. package/dist/ai/guides/icons-policy.md +32 -11
  31. package/dist/ai/guides/installation-and-plugin-setup.md +24 -23
  32. package/dist/ai/guides/migration/adoption-checklist.md +1 -1
  33. package/dist/ai/guides/migration/components/bb-icon.md +4 -4
  34. package/dist/ai/guides/migration/v2-to-v3.md +48 -19
  35. package/dist/ai/guides/migration/v3-beta-css-classes.md +18 -3
  36. package/dist/ai/guides/passthrough.md +58 -58
  37. package/dist/ai/helpers/inertia/manifest.json +1 -1
  38. package/dist/ai/manifest/components/BbDialog.tree.json +1 -1
  39. package/dist/ai/manifest/components/BbDropdown.json +19 -17
  40. package/dist/ai/manifest/components/BbDropdown.tree.json +9 -9
  41. package/dist/ai/manifest/components/BbDropdownButton.json +12 -10
  42. package/dist/ai/manifest/components/BbDropdownButton.tree.json +2 -0
  43. package/dist/ai/manifest/components/BbGallery.tree.json +1 -1
  44. package/dist/ai/manifest/components/BbOffCanvas.tree.json +1 -1
  45. package/dist/ai/manifest/components/BbSelect.json +44 -40
  46. package/dist/ai/manifest/components/BbSelect.tree.json +2 -1
  47. package/dist/ai/manifest/components/BbSelectPopover.json +10 -6
  48. package/dist/ai/manifest/components/BbSelectPopover.tree.json +4 -1
  49. package/dist/ai/manifest/components/BbTable.tree.json +5 -1
  50. package/dist/ai/manifest/components/GroupedListBox.json +1 -1
  51. package/dist/ai/manifest/components/GroupedListBox.tree.json +1 -0
  52. package/dist/ai/manifest/components/ListBox.json +1 -1
  53. package/dist/ai/manifest/components/ListBox.tree.json +1 -1
  54. package/dist/ai/manifest/index.json +2 -2
  55. package/dist/ai/recipes/inertia/inline-edit-workspace.md +1 -1
  56. package/dist/ai/recipes/inertia/onboarding.md +1 -1
  57. package/dist/ai/recipes/nuxt/inline-edit-workspace.md +1 -1
  58. package/dist/ai/recipes/nuxt/onboarding.md +1 -1
  59. package/dist/ai/recipes/vue/inline-edit-workspace.md +1 -1
  60. package/dist/ai/recipes/vue/onboarding.md +2 -2
  61. package/dist/ai/source/BbAccordion.md +4 -5
  62. package/dist/ai/source/BbAvatar.md +9 -2
  63. package/dist/ai/source/BbBadge.md +6 -2
  64. package/dist/ai/source/BbBreadcrumbs.md +5 -2
  65. package/dist/ai/source/BbCalendar.md +8 -6
  66. package/dist/ai/source/BbCarousel.md +10 -6
  67. package/dist/ai/source/BbColorPalette.md +5 -2
  68. package/dist/ai/source/BbDatePickerInput.md +7 -2
  69. package/dist/ai/source/BbDropdown.md +91 -66
  70. package/dist/ai/source/BbDropdownButton.md +36 -19
  71. package/dist/ai/source/BbDropdownGroup.md +91 -66
  72. package/dist/ai/source/BbGallery.md +6 -5
  73. package/dist/ai/source/BbPagination.md +12 -28
  74. package/dist/ai/source/BbRating.md +4 -4
  75. package/dist/ai/source/BbSelect.md +130 -106
  76. package/dist/ai/source/BbSelectPopover.md +128 -21
  77. package/dist/ai/source/BbTable.md +42 -9
  78. package/dist/ai/source/BbTimePickerInput.md +6 -2
  79. package/dist/ai/source/ClearableButton.md +4 -2
  80. package/dist/ai/source/ErrorIcon.md +4 -3
  81. package/dist/ai/source/FlatListBox.md +7 -2
  82. package/dist/ai/source/GroupedListBox.md +22 -3
  83. package/dist/ai/source/ListBox.md +7 -1
  84. package/dist/ai/source/WarningIcon.md +4 -3
  85. package/dist/assets/svgs/close.svg_raw.js +1 -1
  86. package/dist/components/BbAccordion/BbAccordion.vue.d.ts +1 -1
  87. package/dist/components/BbAccordion/BbAccordion.vue_vue_type_script_setup_true_lang.js +35 -34
  88. package/dist/components/BbAvatar/BbAvatar.vue_vue_type_script_setup_true_lang.js +48 -47
  89. package/dist/components/BbBadge/BbBadge.vue_vue_type_script_setup_true_lang.js +60 -59
  90. package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +128 -127
  91. package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
  92. package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +240 -239
  93. package/dist/components/BbCarousel/BbCarousel.vue_vue_type_script_setup_true_lang.js +500 -499
  94. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +4 -4
  95. package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +175 -174
  96. package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
  97. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +2 -2
  98. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +263 -262
  99. package/dist/components/BbDropdown/AdaptiveDropdown.vue_vue_type_script_setup_true_lang.js +81 -80
  100. package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +4 -0
  101. package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +318 -312
  102. package/dist/components/BbDropdown/DropdownRow.vue_vue_type_script_setup_true_lang.js +47 -46
  103. package/dist/components/BbDropdown/ptKeys.generated.d.ts +36 -20
  104. package/dist/components/BbDropdown/types.d.ts +51 -53
  105. package/dist/components/BbDropdown/types.js +2 -0
  106. package/dist/components/BbDropdownButton/BbDropdownButton.vue.d.ts +1 -1
  107. package/dist/components/BbDropdownButton/BbDropdownButton.vue_vue_type_script_setup_true_lang.js +74 -59
  108. package/dist/components/BbDropdownButton/ptKeys.generated.d.ts +111 -63
  109. package/dist/components/BbDropdownButton/types.d.ts +12 -10
  110. package/dist/components/BbDropdownButton/types.js +2 -0
  111. package/dist/components/BbDropzone/BbDropzone.vue.d.ts +1 -1
  112. package/dist/components/BbGallery/BbGallery.vue_vue_type_script_setup_true_lang.js +204 -203
  113. package/dist/components/BbIcon/iconCache.js +1 -1
  114. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +1 -1
  115. package/dist/components/BbPagination/BbPagination.vue.d.ts +2 -2
  116. package/dist/components/BbPagination/BbPagination.vue_vue_type_script_setup_true_lang.js +138 -136
  117. package/dist/components/BbProgress/BbProgress.vue.d.ts +1 -1
  118. package/dist/components/BbRadioGroup/BbRadioGroup.vue.d.ts +4 -4
  119. package/dist/components/BbRating/BbRating.vue.d.ts +1 -1
  120. package/dist/components/BbRating/BbRating.vue_vue_type_script_setup_true_lang.js +100 -99
  121. package/dist/components/BbSelect/BbSelect.vue.d.ts +30 -20
  122. package/dist/components/BbSelect/BbSelect.vue_vue_type_script_setup_true_lang.js +201 -184
  123. package/dist/components/BbSelect/ptKeys.generated.d.ts +128 -96
  124. package/dist/components/BbSelect/types.d.ts +101 -105
  125. package/dist/components/BbSelect/types.js +1 -27
  126. package/dist/components/BbSelectPopover/BbSelectPopover.vue.d.ts +6 -3
  127. package/dist/components/BbSelectPopover/BbSelectPopover.vue_vue_type_script_setup_true_lang.js +617 -585
  128. package/dist/components/BbSelectPopover/ptKeys.generated.d.ts +22 -10
  129. package/dist/components/BbSelectPopover/types.d.ts +22 -13
  130. package/dist/components/BbSelectPopover/types.js +3 -1
  131. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
  132. package/dist/components/BbTable/BbTable.vue.d.ts +1 -1
  133. package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +1092 -1090
  134. package/dist/components/BbTable/BbTableDataRow.js +97 -90
  135. package/dist/components/BbTabs/BbTabs.vue.d.ts +3 -3
  136. package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +2 -2
  137. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue.d.ts +2 -2
  138. package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +225 -224
  139. package/dist/components/BbToast/BbToastMessage.vue_vue_type_script_setup_true_lang.js +76 -75
  140. package/dist/components/ClearableButton/ClearableButton.vue_vue_type_script_setup_true_lang.js +9 -8
  141. package/dist/components/CloseIcon/CloseButton.vue.js +1 -1
  142. package/dist/components/CloseIcon/CloseButton.vue_vue_type_script_setup_true_lang.js +9 -7
  143. package/dist/components/ErrorIcon/ErrorIcon.vue_vue_type_script_setup_true_lang.js +8 -6
  144. package/dist/components/FlatListBox/FlatListBox.vue_vue_type_script_setup_true_lang.js +69 -68
  145. package/dist/components/GroupedListBox/GroupedListBox.vue_vue_type_script_setup_true_lang.js +166 -165
  146. package/dist/components/WarningIcon/WarningIcon.vue_vue_type_script_setup_true_lang.js +8 -6
  147. package/dist/composables/useInternalIcon.js +25 -0
  148. package/dist/icon-scan.d.ts +1 -1
  149. package/dist/llms-full.txt +477 -187
  150. package/dist/llms-medium.txt +25 -24
  151. package/dist/llms.txt +1 -1
  152. package/dist/nuxt.js +1 -1
  153. package/dist/styles.css +2 -2
  154. package/dist/types/Config.d.ts +8 -1
  155. package/dist/types/ConfigDefaults.d.ts +10 -2
  156. package/dist/types/internalIcons.d.ts +89 -0
  157. package/dist/types/internalIcons.js +158 -0
  158. package/dist/types/ptComponentMap.d.ts +4 -4
  159. package/dist/utils/configDefaults.js +75 -64
  160. package/dist/utils/iconsOption.js +48 -0
  161. package/dist/utils/versionCheck.js +1 -1
  162. package/dist/vite-plugin.d.ts +10 -16
  163. package/dist/vite.js +319 -306
  164. package/llms.txt +1 -1
  165. package/package.json +1 -1
  166. package/scripts/lib/adoption-checklist.json +1 -1
  167. package/scripts/lib/update-install.mjs +48 -0
  168. package/scripts/lib/validate-bb-markup.mjs +73 -12
  169. package/dist/assets/svgs/caret_down.svg_raw.js +0 -3
@@ -1,3 +1,4 @@
1
+ import { BbIconRole } from './internalIcons.js';
1
2
  import { CssLayersOption } from '../utils/cssLayers.js';
2
3
  import { BbComponentsMap } from './ConfigDefaults.js';
3
4
  import { PtGlobalMap } from './passthrough.js';
@@ -111,6 +112,12 @@ export type ResolvedConfig = EditableConfig & {
111
112
  * like `pt`: a toast or alert without its own `icon` uses its variant's,
112
113
  * and `hideIcon` hides either.
113
114
  */
115
+ /**
116
+ * The library's own glyphs the app swapped app-wide, from the build
117
+ * plugin's `icons.defaults`. Build-time only, like `pt`: a component's
118
+ * `components.<C>.icons` wins, an unset role keeps the built-in glyph.
119
+ */
120
+ readonly iconDefaults: Readonly<Partial<Record<BbIconRole, string>>>;
114
121
  readonly variantIcons: Readonly<{
115
122
  toast: Readonly<Record<string, string>>;
116
123
  alert: Readonly<Record<string, string>>;
@@ -129,7 +136,7 @@ export type ResolvedConfig = EditableConfig & {
129
136
  * build-time config. `pt` and `components` are not among them — see
130
137
  * `ResolvedConfig.pt`.
131
138
  */
132
- export type PerAppConfig = Partial<Omit<ResolvedConfig, 'pt' | 'components'>>;
139
+ export type PerAppConfig = Partial<Omit<ResolvedConfig, 'pt' | 'components' | 'iconDefaults'>>;
133
140
  /**
134
141
  * The runtime-settable slice of the config (`setConfig`).
135
142
  */
@@ -1,3 +1,4 @@
1
+ import { BbComponentIcons, BbIconComponent } from './internalIcons.js';
1
2
  import { BbActionLook } from '../types/ActionButton.js';
2
3
  import { BbIsValidationError } from '../components/BbForm/recognizeValidation.js';
3
4
  import { BbAlertProps } from '../components/BbAlert/types.js';
@@ -116,7 +117,7 @@ export declare const SIZE_MAP_COMPONENTS: readonly ["BbAvatar", "BbDialog", "BbI
116
117
  * component declares a prop under one of them (`pt` is the passthrough prop
117
118
  * itself), so a config key can never mean two things.
118
119
  */
119
- export declare const RESERVED_CONFIG_KEYS: readonly ["pt", "variants", "sizeMap"];
120
+ export declare const RESERVED_CONFIG_KEYS: readonly ["pt", "variants", "sizeMap", "icons"];
120
121
  /**
121
122
  * The allowlisted props a config scope may NOT set: the model's type follows
122
123
  * them (`RegisteredNullValue`), and TypeScript cannot know which scope a
@@ -265,6 +266,13 @@ type EntryRest<C extends string> = DefaultsExceptVariant<C> & (C extends keyof S
265
266
  } & (C extends SizeMapOwner ? {
266
267
  /** What each size name means, in px; unset names keep the built-in. */
267
268
  sizeMap?: Partial<Sizes>;
269
+ } : unknown) & (C extends BbIconComponent ? {
270
+ /**
271
+ * The library's own glyphs this component draws, role → icon
272
+ * name (`{ close: 'ph:x-bold' }`); wins over `icons.defaults`.
273
+ * App-wide only.
274
+ */
275
+ icons?: BbComponentIcons<C>;
268
276
  } : unknown);
269
277
  /**
270
278
  * The `variant` default: the component's own type (built-ins, the registry,
@@ -335,7 +343,7 @@ export interface BbAllConfig {
335
343
  block?: boolean;
336
344
  }
337
345
  /** One component's entry in a scope: the app's minus the app-wide-only keys. */
338
- type ScopeEntry<C extends string, V> = Omit<EntryRest<C>, C extends keyof GlobalOnly ? GlobalOnly[C][number] : never> & VariantDefault<C, ExtraNames<C, V>>;
346
+ type ScopeEntry<C extends string, V> = Omit<EntryRest<C>, (C extends keyof GlobalOnly ? GlobalOnly[C][number] : never) | 'icons'> & VariantDefault<C, ExtraNames<C, V>>;
339
347
  /**
340
348
  * The `components` map: per component its allowlisted prop defaults, `pt`,
341
349
  * `variants` and `sizeMap`, plus `all`. Data only (it ships as JSON) and
@@ -0,0 +1,89 @@
1
+ /**
2
+ * The library's own glyphs an app may swap: one role name per meaning,
3
+ * shared across components (`close` is the ✕ of a dialog, a panel, the
4
+ * gallery and a toast). Set app-wide with `bitbossUi({ icons: { defaults } })`,
5
+ * per component with `components.<C>.icons`; build-time only, like `pt`.
6
+ */
7
+ export declare const BB_ICON_ROLES: readonly ["close", "clear", "expandChevron", "prev", "next", "separator", "search", "check", "dragHandle", "move", "sortAsc", "sortDesc", "calendar", "clock", "error", "warning", "avatar", "star", "eyedropper", "play", "pause"];
8
+ /** A swappable glyph of the library. */
9
+ export type BbIconRole = (typeof BB_ICON_ROLES)[number];
10
+ /**
11
+ * The roles each component draws, itself or through the library components
12
+ * it renders (a select's sheet ✕, its listbox check). What
13
+ * `components.<C>.icons` accepts. Kept equal to the code by
14
+ * `internalIcons.node.test.ts`, which walks the imports.
15
+ */
16
+ export declare const BB_COMPONENT_ICON_ROLES: {
17
+ readonly BbAccordion: readonly ["expandChevron"];
18
+ readonly BbAlert: readonly ["clear"];
19
+ readonly BbAvatar: readonly ["avatar"];
20
+ readonly BbBadge: readonly ["clear"];
21
+ readonly BbBreadcrumbs: readonly ["check", "clear", "close", "error", "next", "prev", "search", "separator"];
22
+ readonly BbCalendar: readonly ["next", "prev"];
23
+ readonly BbCarousel: readonly ["next", "pause", "play", "prev"];
24
+ readonly BbColorInput: readonly ["clear", "close", "error", "eyedropper", "warning"];
25
+ readonly BbColorPalette: readonly ["close", "eyedropper"];
26
+ readonly BbConfirm: readonly ["close"];
27
+ readonly BbDatePicker: readonly ["close", "next", "prev"];
28
+ readonly BbDatePickerInput: readonly ["calendar", "clear", "close", "error", "next", "prev", "warning"];
29
+ readonly BbDialog: readonly ["close"];
30
+ readonly BbDropdown: readonly ["check", "clear", "close", "error", "next", "prev", "search"];
31
+ readonly BbDropdownButton: readonly ["check", "clear", "close", "error", "expandChevron", "next", "prev", "search"];
32
+ readonly BbGallery: readonly ["close", "next", "prev"];
33
+ readonly BbNumberInput: readonly ["clear", "error", "warning"];
34
+ readonly BbOffCanvas: readonly ["close"];
35
+ readonly BbPagination: readonly ["next", "prev"];
36
+ readonly BbPopover: readonly ["close"];
37
+ readonly BbRating: readonly ["star"];
38
+ readonly BbSelect: readonly ["check", "clear", "close", "error", "expandChevron", "search", "warning"];
39
+ readonly BbSelectPopover: readonly ["check", "clear", "close", "error", "search", "warning"];
40
+ readonly BbTable: readonly ["check", "clear", "close", "dragHandle", "error", "move", "next", "prev", "search", "sortAsc", "sortDesc"];
41
+ readonly BbTag: readonly ["clear", "error", "warning"];
42
+ readonly BbTextInput: readonly ["clear", "error", "warning"];
43
+ readonly BbTextarea: readonly ["clear", "error", "warning"];
44
+ readonly BbTimePicker: readonly ["close"];
45
+ readonly BbTimePickerInput: readonly ["clear", "clock", "close", "error", "warning"];
46
+ readonly BbToast: readonly ["close"];
47
+ };
48
+ /** The components with swappable glyphs. */
49
+ export type BbIconComponent = keyof typeof BB_COMPONENT_ICON_ROLES;
50
+ /**
51
+ * An icon name the plugin bundles at build time: an installed set's
52
+ * `prefix:name` (`'ph:x-bold'`) or `local:name` (an SVG in `icons.dir`).
53
+ */
54
+ export type BbIconName = `${string}:${string}`;
55
+ /** `components.<C>.icons`: the roles `C` draws. */
56
+ export type BbComponentIcons<C extends BbIconComponent> = Partial<Record<(typeof BB_COMPONENT_ICON_ROLES)[C][number], BbIconName>>;
57
+ /** `bitbossUi({ icons })`. */
58
+ export interface BbIconsOption {
59
+ /**
60
+ * Absolute, or relative to the Vite root (the project root in Vite; `app/`
61
+ * under Nuxt 4), path to the folder of SVG files for `local:` icons.
62
+ * Sub-folders are scanned recursively; the icon name is the file's
63
+ * basename without extension.
64
+ *
65
+ * @defaultValue `'./assets/icons'`
66
+ */
67
+ dir?: string;
68
+ /**
69
+ * Provider icons that ALWAYS ship, scanned or not: exact names
70
+ * (`'tabler:crown'`) and globs (`'tabler:calendar-*'`). The home of every
71
+ * name the scanner cannot see as a literal: composed at runtime, stored in
72
+ * a database, chosen by an admin. An entry that resolves in no installed
73
+ * set fails the build.
74
+ */
75
+ whitelist?: string[];
76
+ /**
77
+ * The library's own glyphs, app-wide: role → icon name
78
+ * (`{ close: 'ph:x-bold' }`). A component's `components.<C>.icons` wins;
79
+ * an unset role keeps the built-in glyph. Each name is bundled.
80
+ */
81
+ defaults?: Partial<Record<BbIconRole, BbIconName>>;
82
+ }
83
+ /**
84
+ * Every component name the library renders (SFC file names and the
85
+ * `defineComponent` names): an internal glyph looks up the components that
86
+ * rendered it until it reaches the app's own. Kept equal to `src/components`
87
+ * by `internalIcons.node.test.ts`. Internal.
88
+ */
89
+ export declare const LIBRARY_COMPONENT_NAMES: ReadonlySet<string>;
@@ -0,0 +1,158 @@
1
+ // src/types/internalIcons.ts
2
+ var e = [
3
+ "close",
4
+ "clear",
5
+ "expandChevron",
6
+ "prev",
7
+ "next",
8
+ "separator",
9
+ "search",
10
+ "check",
11
+ "dragHandle",
12
+ "move",
13
+ "sortAsc",
14
+ "sortDesc",
15
+ "calendar",
16
+ "clock",
17
+ "error",
18
+ "warning",
19
+ "avatar",
20
+ "star",
21
+ "eyedropper",
22
+ "play",
23
+ "pause"
24
+ ], t = {
25
+ BbAccordion: ["expandChevron"],
26
+ BbAlert: ["clear"],
27
+ BbAvatar: ["avatar"],
28
+ BbBadge: ["clear"],
29
+ BbBreadcrumbs: [
30
+ "check",
31
+ "clear",
32
+ "close",
33
+ "error",
34
+ "next",
35
+ "prev",
36
+ "search",
37
+ "separator"
38
+ ],
39
+ BbCalendar: ["next", "prev"],
40
+ BbCarousel: [
41
+ "next",
42
+ "pause",
43
+ "play",
44
+ "prev"
45
+ ],
46
+ BbColorInput: [
47
+ "clear",
48
+ "close",
49
+ "error",
50
+ "eyedropper",
51
+ "warning"
52
+ ],
53
+ BbColorPalette: ["close", "eyedropper"],
54
+ BbConfirm: ["close"],
55
+ BbDatePicker: [
56
+ "close",
57
+ "next",
58
+ "prev"
59
+ ],
60
+ BbDatePickerInput: [
61
+ "calendar",
62
+ "clear",
63
+ "close",
64
+ "error",
65
+ "next",
66
+ "prev",
67
+ "warning"
68
+ ],
69
+ BbDialog: ["close"],
70
+ BbDropdown: [
71
+ "check",
72
+ "clear",
73
+ "close",
74
+ "error",
75
+ "next",
76
+ "prev",
77
+ "search"
78
+ ],
79
+ BbDropdownButton: [
80
+ "check",
81
+ "clear",
82
+ "close",
83
+ "error",
84
+ "expandChevron",
85
+ "next",
86
+ "prev",
87
+ "search"
88
+ ],
89
+ BbGallery: [
90
+ "close",
91
+ "next",
92
+ "prev"
93
+ ],
94
+ BbNumberInput: [
95
+ "clear",
96
+ "error",
97
+ "warning"
98
+ ],
99
+ BbOffCanvas: ["close"],
100
+ BbPagination: ["next", "prev"],
101
+ BbPopover: ["close"],
102
+ BbRating: ["star"],
103
+ BbSelect: [
104
+ "check",
105
+ "clear",
106
+ "close",
107
+ "error",
108
+ "expandChevron",
109
+ "search",
110
+ "warning"
111
+ ],
112
+ BbSelectPopover: [
113
+ "check",
114
+ "clear",
115
+ "close",
116
+ "error",
117
+ "search",
118
+ "warning"
119
+ ],
120
+ BbTable: [
121
+ "check",
122
+ "clear",
123
+ "close",
124
+ "dragHandle",
125
+ "error",
126
+ "move",
127
+ "next",
128
+ "prev",
129
+ "search",
130
+ "sortAsc",
131
+ "sortDesc"
132
+ ],
133
+ BbTag: [
134
+ "clear",
135
+ "error",
136
+ "warning"
137
+ ],
138
+ BbTextInput: [
139
+ "clear",
140
+ "error",
141
+ "warning"
142
+ ],
143
+ BbTextarea: [
144
+ "clear",
145
+ "error",
146
+ "warning"
147
+ ],
148
+ BbTimePicker: ["close"],
149
+ BbTimePickerInput: [
150
+ "clear",
151
+ "clock",
152
+ "close",
153
+ "error",
154
+ "warning"
155
+ ],
156
+ BbToast: ["close"]
157
+ }, n = /* @__PURE__ */ new Set(/* @__PURE__ */ "AdaptiveDropdown.BadgeBodyContent.BbAccordion.BbAlert.BbAsterisk.BbAvatar.BbBadge.BbBadgeButton.BbBaseButton.BbBaseCheckboxIcon.BbBaseRadioIcon.BbBaseSwitchIcon.BbBreadcrumbs.BbButton.BbCalendar.BbCarousel.BbCheckbox.BbCheckboxGroup.BbCollapsible.BbColorInput.BbColorPalette.BbConfigScope.BbConfirm.BbConfirmHost.BbConfirmPortal.BbDatePicker.BbDatePickerInput.BbDialog.BbDropdown.BbDropdownButton.BbDropdownGroup.BbDropdownList.BbDropzone.BbForm.BbFormCustomField.BbGallery.BbHost.BbHostOpening.BbHoverCard.BbHoverCardPortal.BbIcon.BbIndicator.BbNumberInput.BbOffCanvas.BbPagination.BbPopover.BbPopoverPortal.BbProgress.BbRadio.BbRadioGroup.BbRating.BbSelect.BbSelectPopover.BbSlider.BbSmoothHeight.BbSpinner.BbSwitch.BbSwitchGroup.BbTable.BbTableDataRow.BbTableEdgeRow.BbTableExpandRow.BbTableRowMenu.BbTableSelectToggle.BbTabs.BbTabsList.BbTabsPanels.BbTabsRoot.BbTag.BbTextInput.BbTextarea.BbTimePicker.BbTimePickerInput.BbToast.BbToastMessage.BbToastPortal.BbToastRegion.BbTooltip.BbTree.BbTreeLevel.CalendarMonthPanel.CalendarYearPanel.ChipsBox.ClearableButton.CloseButton.CommaBox.CommonField.CommonFieldInput.CommonPopover.CommonTimeSelector.DropdownFailures.DropdownPipelineResolver.DropdownRow.ErrorIcon.Fade.FlatListBox.GroupedListBox.GuidesComponent.ListBox.OptionsContainer.RouterComponent.ScaleFade.Slide.SlideBack.WarningIcon".split("."));
158
+ export { t as BB_COMPONENT_ICON_ROLES, e as BB_ICON_ROLES, n as LIBRARY_COMPONENT_NAMES };
@@ -40,8 +40,8 @@ export interface BbPtComponentMap {
40
40
  BbDatePicker?: PtDataMap<'root' | 'panel' | 'sheet' | 'header' | 'arrow' | 'month' | 'year' | 'cellColumnHeader' | 'week' | 'weekNumber' | 'day' | 'dayButton' | 'monthItem' | 'yearItem' | 'item', never> & PtStateDataMap<'root' | 'panel' | 'sheet' | 'header' | 'arrow' | 'cellColumnHeader', 'disabled' | 'open'> & PtStateDataMap<'month' | 'year', 'disabled' | 'active' | 'open'> & PtStateDataMap<'week' | 'weekNumber', 'inRange' | 'selected' | 'rangeStart' | 'rangeEnd' | 'disabled' | 'open'> & PtStateDataMap<'day' | 'dayButton', 'outside' | 'today' | 'inRange' | 'selected' | 'rangeStart' | 'rangeEnd' | 'disabled' | 'open' | 'highlighted'> & PtStateDataMap<'monthItem' | 'yearItem', 'inRange' | 'selected' | 'rangeStart' | 'rangeEnd' | 'disabled' | 'open' | 'highlighted'> & PtStateDataMap<'item', 'selected' | 'disabled' | 'open'>;
41
41
  BbDatePickerInput?: PtDataMap<'root' | 'label' | 'description' | 'message' | 'hint' | 'box' | 'input' | 'icon' | 'spinner' | 'prefix' | 'suffix' | 'clear' | 'activator' | 'panel' | 'sheet' | 'header' | 'arrow' | 'month' | 'year' | 'cellColumnHeader' | 'week' | 'weekNumber' | 'day' | 'dayButton' | 'monthItem' | 'yearItem' | 'item', never> & PtStateDataMap<'root' | 'label' | 'description' | 'message' | 'hint' | 'box' | 'input' | 'icon' | 'spinner' | 'prefix' | 'suffix' | 'activator' | 'panel' | 'sheet' | 'header' | 'arrow' | 'cellColumnHeader', 'hasValue' | 'readonly' | 'disabled' | 'warnings' | 'errors' | 'open' | 'loading'> & PtStateDataMap<'clear', 'hasValue' | 'warnings' | 'errors' | 'open' | 'loading'> & PtStateDataMap<'month' | 'year', 'hasValue' | 'readonly' | 'disabled' | 'warnings' | 'errors' | 'active' | 'open' | 'loading'> & PtStateDataMap<'week' | 'weekNumber', 'hasValue' | 'inRange' | 'selected' | 'rangeStart' | 'rangeEnd' | 'readonly' | 'disabled' | 'warnings' | 'errors' | 'open' | 'loading'> & PtStateDataMap<'day' | 'dayButton', 'hasValue' | 'outside' | 'today' | 'inRange' | 'selected' | 'rangeStart' | 'rangeEnd' | 'readonly' | 'disabled' | 'warnings' | 'errors' | 'open' | 'highlighted' | 'loading'> & PtStateDataMap<'monthItem' | 'yearItem', 'hasValue' | 'inRange' | 'selected' | 'rangeStart' | 'rangeEnd' | 'readonly' | 'disabled' | 'warnings' | 'errors' | 'open' | 'highlighted' | 'loading'> & PtStateDataMap<'item', 'hasValue' | 'selected' | 'readonly' | 'disabled' | 'warnings' | 'errors' | 'open' | 'loading'> & PtVariantDataMap<'root' | 'label' | 'description' | 'message' | 'hint' | 'box' | 'input' | 'icon' | 'spinner' | 'prefix' | 'suffix' | 'clear' | 'activator', keyof DatePickerInputVariantRegistry>;
42
42
  BbDialog?: PtDataMap<'root' | 'sheet' | 'header' | 'title' | 'description' | 'content' | 'footer' | 'close', 'open' | 'fullscreen'>;
43
- BbDropdown?: PtDataMap<'root' | 'panel' | 'sheet' | 'header' | 'footer' | 'box' | 'input' | 'list' | 'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check' | 'submenu', never> & PtStateDataMap<'root' | 'panel' | 'sheet' | 'header' | 'footer' | 'box' | 'input' | 'list' | 'submenu', 'open'> & PtStateDataMap<'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check', 'activeLink' | 'exactActiveLink' | 'selected' | 'disabled' | 'open'> & PtVariantDataMap<'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check', keyof DropdownItemVariantRegistry>;
44
- BbDropdownButton?: PtDataMap<'root' | 'main' | 'toggle' | 'icon' | 'spinner' | 'text' | 'panel' | 'sheet' | 'header' | 'footer' | 'box' | 'input' | 'list' | 'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check' | 'submenu', never> & PtStateDataMap<'root' | 'main' | 'toggle' | 'icon' | 'spinner' | 'text' | 'panel' | 'sheet' | 'header' | 'footer' | 'box' | 'input' | 'list' | 'submenu', 'activeLink' | 'exactActiveLink' | 'disabled' | 'open' | 'loading'> & PtStateDataMap<'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check', 'activeLink' | 'exactActiveLink' | 'selected' | 'disabled' | 'open' | 'loading'> & PtVariantDataMap<'root' | 'main' | 'toggle' | 'icon' | 'spinner' | 'text', keyof ButtonVariantRegistry> & PtVariantDataMap<'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check', keyof DropdownItemVariantRegistry>;
43
+ BbDropdown?: PtDataMap<'root' | 'panel' | 'sheet' | 'header' | 'footer' | 'box' | 'input' | 'list' | 'groupLabel' | 'groupHeader' | 'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check' | 'submenu', never> & PtStateDataMap<'root' | 'panel' | 'sheet' | 'header' | 'footer' | 'box' | 'input' | 'list' | 'groupLabel' | 'groupHeader' | 'submenu', 'open'> & PtStateDataMap<'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check', 'activeLink' | 'exactActiveLink' | 'selected' | 'disabled' | 'open'> & PtVariantDataMap<'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check', keyof DropdownItemVariantRegistry>;
44
+ BbDropdownButton?: PtDataMap<'root' | 'main' | 'toggle' | 'icon' | 'spinner' | 'text' | 'panel' | 'sheet' | 'header' | 'footer' | 'box' | 'input' | 'list' | 'groupLabel' | 'groupHeader' | 'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check' | 'submenu', never> & PtStateDataMap<'root' | 'main' | 'toggle' | 'icon' | 'spinner' | 'text' | 'panel' | 'sheet' | 'header' | 'footer' | 'box' | 'input' | 'list' | 'groupLabel' | 'groupHeader' | 'submenu', 'activeLink' | 'exactActiveLink' | 'disabled' | 'open' | 'loading'> & PtStateDataMap<'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check', 'activeLink' | 'exactActiveLink' | 'selected' | 'disabled' | 'open' | 'loading'> & PtVariantDataMap<'root' | 'main' | 'toggle' | 'icon' | 'spinner' | 'text', keyof ButtonVariantRegistry> & PtVariantDataMap<'item' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check', keyof DropdownItemVariantRegistry>;
45
45
  BbDropzone?: PtDataMap<'root' | 'content' | 'message', 'readonly' | 'disabled' | 'warnings' | 'errors' | 'active'>;
46
46
  BbGallery?: PtDataMap<'root' | 'header' | 'title' | 'close' | 'slide' | 'image' | 'caption' | 'prev' | 'next' | 'footer' | 'counter' | 'more', never> & PtStateDataMap<'root' | 'header' | 'title' | 'close' | 'image' | 'caption' | 'footer' | 'counter' | 'more', 'zoomed'> & PtStateDataMap<'slide', 'active' | 'zoomed'> & PtStateDataMap<'prev' | 'next', 'disabled' | 'zoomed'>;
47
47
  BbHoverCard?: PtDataMap<'root' | 'panel' | 'header' | 'content' | 'footer', 'open'>;
@@ -55,8 +55,8 @@ export interface BbPtComponentMap {
55
55
  BbRadio?: PtDataMap<'root' | 'label' | 'description' | 'message' | 'hint' | 'icon', 'checked' | 'readonly' | 'disabled' | 'warnings' | 'errors' | 'focused' | 'focusVisible'>;
56
56
  BbRadioGroup?: PtDataMap<'root' | 'legend' | 'description' | 'message' | 'hint' | 'list' | 'item' | 'icon' | 'label' | 'itemDescription' | 'indicator', never> & PtStateDataMap<'root' | 'legend' | 'description' | 'message' | 'hint' | 'list' | 'indicator', 'hasValue' | 'readonly' | 'disabled' | 'warnings' | 'errors' | 'loading'> & PtStateDataMap<'item' | 'icon' | 'label' | 'itemDescription', 'hasValue' | 'checked' | 'readonly' | 'disabled' | 'warnings' | 'errors' | 'focused' | 'focusVisible' | 'loading'> & PtVariantDataMap<'root' | 'legend' | 'description' | 'message' | 'hint' | 'list' | 'item' | 'icon' | 'label' | 'itemDescription' | 'indicator', keyof RadioVariantRegistry>;
57
57
  BbRating?: PtDataMap<'root' | 'legend' | 'description' | 'message' | 'hint' | 'item', never> & PtStateDataMap<'root' | 'legend' | 'description' | 'message' | 'hint', 'hasValue' | 'readonly' | 'disabled' | 'warnings' | 'errors'> & PtStateDataMap<'item', 'hasValue' | 'selected' | 'readonly' | 'disabled' | 'warnings' | 'errors'>;
58
- BbSelect?: PtDataMap<'root' | 'label' | 'description' | 'message' | 'hint' | 'box' | 'activator' | 'input' | 'icon' | 'spinner' | 'prefix' | 'suffix' | 'clear' | 'panel' | 'sheet' | 'header' | 'footer' | 'list' | 'option' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check' | 'badge' | 'comma', never> & PtStateDataMap<'root' | 'label' | 'description' | 'message' | 'hint' | 'box' | 'activator' | 'input' | 'icon' | 'spinner' | 'prefix' | 'suffix' | 'panel' | 'sheet' | 'header' | 'footer' | 'list' | 'badge' | 'comma', 'hasValue' | 'readonly' | 'disabled' | 'warnings' | 'errors' | 'open' | 'loading'> & PtStateDataMap<'clear', 'hasValue' | 'warnings' | 'errors' | 'open' | 'loading'> & PtStateDataMap<'option' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check', 'hasValue' | 'selected' | 'readonly' | 'disabled' | 'warnings' | 'errors' | 'open' | 'loading'> & PtVariantDataMap<'root' | 'label' | 'description' | 'message' | 'hint' | 'box' | 'activator' | 'icon' | 'spinner' | 'prefix' | 'suffix' | 'clear', keyof SelectVariantRegistry>;
59
- BbSelectPopover?: PtDataMap<'root' | 'panel' | 'sheet' | 'input' | 'clear' | 'list' | 'option' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check' | 'header' | 'footer', never> & PtStateDataMap<'root' | 'panel' | 'sheet' | 'input' | 'clear' | 'list' | 'header' | 'footer', 'open'> & PtStateDataMap<'option' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check', 'selected' | 'disabled' | 'open'>;
58
+ BbSelect?: PtDataMap<'root' | 'label' | 'description' | 'message' | 'hint' | 'box' | 'activator' | 'input' | 'icon' | 'spinner' | 'prefix' | 'suffix' | 'clear' | 'panel' | 'sheet' | 'header' | 'footer' | 'list' | 'groupHeader' | 'option' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check' | 'badge' | 'comma', never> & PtStateDataMap<'root' | 'label' | 'description' | 'message' | 'hint' | 'box' | 'activator' | 'input' | 'icon' | 'spinner' | 'prefix' | 'suffix' | 'panel' | 'sheet' | 'header' | 'footer' | 'list' | 'groupHeader' | 'badge' | 'comma', 'hasValue' | 'readonly' | 'disabled' | 'warnings' | 'errors' | 'open' | 'loading'> & PtStateDataMap<'clear', 'hasValue' | 'warnings' | 'errors' | 'open' | 'loading'> & PtStateDataMap<'option' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check', 'hasValue' | 'selected' | 'readonly' | 'disabled' | 'warnings' | 'errors' | 'open' | 'loading'> & PtVariantDataMap<'root' | 'label' | 'description' | 'message' | 'hint' | 'box' | 'activator' | 'icon' | 'spinner' | 'prefix' | 'suffix' | 'clear', keyof SelectVariantRegistry>;
59
+ BbSelectPopover?: PtDataMap<'root' | 'panel' | 'sheet' | 'input' | 'clear' | 'list' | 'groupHeader' | 'option' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check' | 'header' | 'footer', never> & PtStateDataMap<'root' | 'panel' | 'sheet' | 'input' | 'clear' | 'list' | 'header' | 'footer', 'open'> & PtStateDataMap<'groupHeader', 'disabled' | 'open'> & PtStateDataMap<'option' | 'itemText' | 'itemIcon' | 'itemDescription' | 'check', 'selected' | 'disabled' | 'open'>;
60
60
  BbSlider?: PtDataMap<'root' | 'label' | 'description' | 'message' | 'hint' | 'box' | 'track' | 'bar' | 'ticks' | 'tick' | 'thumb', never> & PtStateDataMap<'root' | 'label' | 'description' | 'message' | 'hint' | 'box' | 'track' | 'bar' | 'ticks' | 'thumb', 'hasValue' | 'readonly' | 'disabled' | 'warnings' | 'errors' | 'active'> & PtStateDataMap<'tick', 'hasValue' | 'inRange' | 'readonly' | 'disabled' | 'warnings' | 'errors' | 'active'>;
61
61
  BbSmoothHeight?: PtDataMap<'root', never>;
62
62
  BbSpinner?: PtDataMap<'root', never>;
@@ -1,8 +1,10 @@
1
1
  import { ALL_PROPS as e, ALL_SETTINGS as t, COMPONENT_SETTINGS as n, DEFAULTS_ALLOWLIST as r, GLOBAL_ONLY_DEFAULTS as i, SIZE_MAP_COMPONENTS as a } from "../types/ConfigDefaults.js";
2
2
  import { validatePtGlobalMap as o } from "./passthrough.js";
3
- import { VARIANT_OPTION_PATHS as s } from "../project-dts.js";
3
+ import { validateComponentIcons as s } from "./iconsOption.js";
4
+ import { BB_COMPONENT_ICON_ROLES as c } from "../types/internalIcons.js";
5
+ import { VARIANT_OPTION_PATHS as l } from "../project-dts.js";
4
6
  // src/utils/configDefaults.ts
5
- var c = (e) => !!e && typeof e == "object" && !Array.isArray(e), l = r, u = n, d = i, f = a, p = [...e, ...t], m = (e, t) => {
7
+ var u = (e) => !!e && typeof e == "object" && !Array.isArray(e), d = r, f = n, p = i, m = a, h = Object.keys(c), g = [...e, ...t], _ = (e, t) => {
6
8
  let n = Array.from({ length: t.length + 1 }, (e, t) => t);
7
9
  for (let r = 1; r <= e.length; r++) {
8
10
  let i = n[0];
@@ -13,106 +15,114 @@ var c = (e) => !!e && typeof e == "object" && !Array.isArray(e), l = r, u = n, d
13
15
  }
14
16
  }
15
17
  return n[t.length];
16
- }, h = (e, t) => {
18
+ }, v = (e, t) => {
17
19
  let n = null, r = Infinity;
18
20
  for (let i of t) {
19
- let t = m(e.toLowerCase(), i.toLowerCase());
21
+ let t = _(e.toLowerCase(), i.toLowerCase());
20
22
  t < r && (r = t, n = i);
21
23
  }
22
24
  return n && r <= Math.max(2, Math.floor(e.length / 3)) ? n : null;
23
- }, g = (e) => e === null || [
25
+ }, y = (e) => e === null || [
24
26
  "string",
25
27
  "number",
26
28
  "boolean"
27
- ].includes(typeof e) ? !0 : Array.isArray(e) ? e.every(g) : c(e) && Object.getPrototypeOf(e) === Object.prototype ? Object.values(e).every(g) : !1, _ = {
29
+ ].includes(typeof e) ? !0 : Array.isArray(e) ? e.every(y) : u(e) && Object.getPrototypeOf(e) === Object.prototype ? Object.values(e).every(y) : !1, b = {
28
30
  sizes: "the size scale is `sizeMap`",
29
31
  defaultSize: "the default size is `size`",
30
32
  toastPosition: "it is `BbToast: { position }`",
31
33
  defaultInputLabelMode: "it is `all: { labelMode }`"
32
- }, v = (e, t) => {
33
- if (!c(e)) return `[bitboss-ui] ${t}.all must be an object, e.g. all: { adaptive: false }.`;
34
+ }, x = (e, t) => {
35
+ if (!u(e)) return `[bitboss-ui] ${t}.all must be an object, e.g. all: { adaptive: false }.`;
34
36
  for (let [n, r] of Object.entries(e)) {
35
- if (!p.includes(n)) {
37
+ if (!g.includes(n)) {
36
38
  if (n === "variants" || n === "sizeMap" || n === "pt") return `[bitboss-ui] ${t}.all.${n}: \`${n}\` belongs to one component, not to \`all\` — e.g. ${t}.BbButton.${n}.`;
37
- let e = Object.keys(l).filter((e) => l[e].includes(n));
39
+ let e = Object.keys(d).filter((e) => d[e].includes(n));
38
40
  if (e.length) return `[bitboss-ui] ${t}.all.${n}: \`${n}\` is not shared through \`all\`; set it per component (${e.map((e) => `${t}.${e}.${n}`).join(", ")}).`;
39
- let r = h(n, p);
40
- return `[bitboss-ui] ${t}.all.${n}: not a key \`all\` takes${r ? ` — did you mean "${r}"?` : "."} It takes: ${p.join(", ")}.`;
41
+ let r = v(n, g);
42
+ return `[bitboss-ui] ${t}.all.${n}: not a key \`all\` takes${r ? ` — did you mean "${r}"?` : "."} It takes: ${g.join(", ")}.`;
41
43
  }
42
- if (r === void 0 || !g(r)) return `[bitboss-ui] ${t}.all.${n} must be a plain value: the map ships as JSON.`;
44
+ if (r === void 0 || !y(r)) return `[bitboss-ui] ${t}.all.${n} must be a plain value: the map ships as JSON.`;
43
45
  if (n === "autoDisableWritingThreshold" && !(Number.isInteger(r) && r >= 0)) return `[bitboss-ui] ${t}.all.autoDisableWritingThreshold must be a non-negative integer (received ${JSON.stringify(r)}); 0 turns the 'auto' rule off. Remove the key for the default, 6.`;
44
46
  if (n === "popoverOffset" && !(typeof r == "number" && Number.isFinite(r))) return `[bitboss-ui] ${t}.all.popoverOffset must be a number of px (received ${JSON.stringify(r)}). Remove the key for the default, 4.`;
45
47
  }
46
48
  return null;
47
- }, y = (e, t = {}) => {
49
+ }, S = (e, t = {}) => {
48
50
  let n = t.where ?? "components", r = t.variantComponents ?? [];
49
51
  if (e === void 0) return null;
50
- if (!c(e)) return `[bitboss-ui] ${n} must be an object keyed by component, e.g. ${n}: { BbButton: { size: 'sm' } }.`;
52
+ if (!u(e)) return `[bitboss-ui] ${n} must be an object keyed by component, e.g. ${n}: { BbButton: { size: 'sm' } }.`;
51
53
  let i = [.../* @__PURE__ */ new Set([
52
- ...Object.keys(l),
53
- ...Object.keys(u),
54
- ...f,
54
+ ...Object.keys(d),
55
+ ...Object.keys(f),
56
+ ...m,
57
+ ...h,
55
58
  ...r
56
59
  ])];
57
- for (let [a, s] of Object.entries(e)) {
60
+ for (let [a, c] of Object.entries(e)) {
58
61
  if (a === "all") {
59
- let e = v(s, n);
62
+ let e = x(c, n);
60
63
  if (e) return e;
61
64
  continue;
62
65
  }
63
- if (!c(s)) return `[bitboss-ui] ${n}.${a} must be an object, e.g. { pt: { root: '…' } }.`;
66
+ if (!u(c)) return `[bitboss-ui] ${n}.${a} must be an object, e.g. { pt: { root: '…' } }.`;
64
67
  let e = t.knownComponents;
65
68
  if (e && !e.includes(a) && !i.includes(a)) {
66
- let t = h(a, [...e, ...i]);
69
+ let t = v(a, [...e, ...i]);
67
70
  return `[bitboss-ui] ${n}.${a}: no component is called "${a}"${t ? ` — did you mean "${t}"?` : ""}.`;
68
71
  }
69
- let m = l[a] ?? [], y = u[a] ?? [], b = [
70
- ...m,
71
- ...y,
72
+ let l = d[a] ?? [], _ = f[a] ?? [], S = [
73
+ ...l,
74
+ ..._,
72
75
  "pt",
73
76
  ...r.includes(a) ? ["variants"] : [],
74
- ...f.includes(a) ? ["sizeMap"] : []
77
+ ...m.includes(a) ? ["sizeMap"] : [],
78
+ ...h.includes(a) ? ["icons"] : []
75
79
  ];
76
- for (let [e, r] of Object.entries(s)) {
77
- if (!b.includes(e)) {
78
- let t = h(e, b), r = _[e];
79
- return `[bitboss-ui] ${n}.${a}.${e}: not a key ${a} takes.${e === "variants" ? ` ${a} registers no variants of its own.` : e === "sizeMap" ? ` Only ${f.join(", ")} take a size scale.` : p.includes(e) && !m.includes(e) ? ` ${a} has no \`${e}\` prop (\`all.${e}\` reaches only the components that do).` : r ? ` ${r}.` : t ? ` Did you mean "${t}"?` : ""} It takes: ${b.join(", ")}.`;
80
+ for (let [e, r] of Object.entries(c)) {
81
+ if (!S.includes(e)) {
82
+ let t = v(e, S), r = b[e];
83
+ return `[bitboss-ui] ${n}.${a}.${e}: not a key ${a} takes.${e === "icons" ? ` ${a} draws none of the library's swappable glyphs.` : e === "variants" ? ` ${a} registers no variants of its own.` : e === "sizeMap" ? ` Only ${m.join(", ")} take a size scale.` : g.includes(e) && !l.includes(e) ? ` ${a} has no \`${e}\` prop (\`all.${e}\` reaches only the components that do).` : r ? ` ${r}.` : t ? ` Did you mean "${t}"?` : ""} It takes: ${S.join(", ")}.`;
80
84
  }
81
85
  if (e !== "pt") {
82
- if (t.scope && (e === "variants" || d[a]?.includes(e))) return e === "variants" ? `[bitboss-ui] ${n}.${a}.variants: app-wide only (one generated bitboss-ui.d.ts types the names). Register it under the plugin's \`components\`; a scope picks a default \`variant\`, never its own set.` : `[bitboss-ui] ${n}.${a}.${e}: app-wide only (the field's model type follows it, and TypeScript cannot know a scope). Set it under the plugin's \`components\`.`;
83
- if (r === void 0 || !g(r)) return `[bitboss-ui] ${n}.${a}.${e} must be a plain value: the map ships as JSON, so a function, undefined or a class instance cannot cross the build.`;
84
- if (e === "sizeMap") {
85
- if (!c(r)) return `[bitboss-ui] ${n}.${a}.sizeMap must be an object of px numbers, e.g. { md: 20 }.`;
86
- for (let [e, t] of Object.entries(r)) {
87
- if (![
88
- "xs",
89
- "sm",
90
- "md",
91
- "lg",
92
- "xl",
93
- "2xl"
94
- ].includes(e)) return `[bitboss-ui] ${n}.${a}.sizeMap.${e}: not a size name. Sizes: xs, sm, md, lg, xl, 2xl.`;
95
- if (typeof t != "number" || !(t > 0)) return `[bitboss-ui] ${n}.${a}.sizeMap.${e} must be a positive number of px (received ${JSON.stringify(t)}).`;
86
+ if (t.scope && e === "icons") return `[bitboss-ui] ${n}.${a}.icons: app-wide only (the glyphs are bundled at build time). Set it under the plugin's \`components\`.`;
87
+ if (e === "icons") {
88
+ let e = s(a, r, n);
89
+ if (e) return e;
90
+ } else {
91
+ if (t.scope && (e === "variants" || p[a]?.includes(e))) return e === "variants" ? `[bitboss-ui] ${n}.${a}.variants: app-wide only (one generated bitboss-ui.d.ts types the names). Register it under the plugin's \`components\`; a scope picks a default \`variant\`, never its own set.` : `[bitboss-ui] ${n}.${a}.${e}: app-wide only (the field's model type follows it, and TypeScript cannot know a scope). Set it under the plugin's \`components\`.`;
92
+ if (r === void 0 || !y(r)) return `[bitboss-ui] ${n}.${a}.${e} must be a plain value: the map ships as JSON, so a function, undefined or a class instance cannot cross the build.`;
93
+ if (e === "sizeMap") {
94
+ if (!u(r)) return `[bitboss-ui] ${n}.${a}.sizeMap must be an object of px numbers, e.g. { md: 20 }.`;
95
+ for (let [e, t] of Object.entries(r)) {
96
+ if (![
97
+ "xs",
98
+ "sm",
99
+ "md",
100
+ "lg",
101
+ "xl",
102
+ "2xl"
103
+ ].includes(e)) return `[bitboss-ui] ${n}.${a}.sizeMap.${e}: not a size name. Sizes: xs, sm, md, lg, xl, 2xl.`;
104
+ if (typeof t != "number" || !(t > 0)) return `[bitboss-ui] ${n}.${a}.sizeMap.${e} must be a positive number of px (received ${JSON.stringify(t)}).`;
105
+ }
96
106
  }
107
+ if (e === "variants" && !(Array.isArray(r) && r.every((e) => typeof e == "string") || u(r) && (a === "BbAlert" || a === "BbToast"))) return `[bitboss-ui] ${n}.${a}.variants must be an array of names${a === "BbAlert" || a === "BbToast" ? ", or an object of name → { icon }" : ""}, e.g. variants: ['brand'].`;
97
108
  }
98
- if (e === "variants" && !(Array.isArray(r) && r.every((e) => typeof e == "string") || c(r) && (a === "BbAlert" || a === "BbToast"))) return `[bitboss-ui] ${n}.${a}.variants must be an array of names${a === "BbAlert" || a === "BbToast" ? ", or an object of name → { icon }" : ""}, e.g. variants: ['brand'].`;
99
109
  }
100
110
  }
101
- let x = o(s.pt === void 0 ? void 0 : { [a]: s.pt }, n, !0);
102
- if (x) return x;
111
+ let C = o(c.pt === void 0 ? void 0 : { [a]: c.pt }, n, !0);
112
+ if (C) return C;
103
113
  }
104
114
  return null;
105
- }, b = (e) => Object.fromEntries(Object.entries(e ?? {}).flatMap(([e, t]) => e !== "all" && c(t) && c(t.pt) ? [[e, t.pt]] : [])), x = (e) => Object.fromEntries(Object.entries(e ?? {}).flatMap(([e, t]) => {
106
- if (!c(t)) return [];
115
+ }, C = (e) => Object.fromEntries(Object.entries(e ?? {}).flatMap(([e, t]) => e !== "all" && u(t) && u(t.pt) ? [[e, t.pt]] : [])), w = (e) => Object.fromEntries(Object.entries(e ?? {}).flatMap(([e, t]) => {
116
+ if (!u(t)) return [];
107
117
  let { pt: n, ...r } = t;
108
118
  return Object.keys(r).length ? [[e, r]] : [];
109
- })), S = (e, t = {}) => {
119
+ })), T = (e, t = {}) => {
110
120
  if (e === void 0) return null;
111
- if (!c(e)) return "[bitboss-ui] configScopes must be an object keyed by scope name, e.g. configScopes: { webapp: { BbButton: { size: 'lg', pt: { root: 'rounded-full' } } } }.";
121
+ if (!u(e)) return "[bitboss-ui] configScopes must be an object keyed by scope name, e.g. configScopes: { webapp: { BbButton: { size: 'lg', pt: { root: 'rounded-full' } } } }.";
112
122
  for (let [n, r] of Object.entries(e)) {
113
123
  if (!n.trim()) return "[bitboss-ui] configScopes has an empty scope name.";
114
- if (c(r) && ("pt" in r || "defaults" in r)) return `[bitboss-ui] configScopes.${n}: a scope is a \`components\`-shaped map — each component's entry holds its props and \`pt\` (configScopes.${n}.BbButton: { size: 'lg', pt: { … } }), not \`pt\` / \`defaults\` halves.`;
115
- let e = y(r, {
124
+ if (u(r) && ("pt" in r || "defaults" in r)) return `[bitboss-ui] configScopes.${n}: a scope is a \`components\`-shaped map — each component's entry holds its props and \`pt\` (configScopes.${n}.BbButton: { size: 'lg', pt: { … } }), not \`pt\` / \`defaults\` halves.`;
125
+ let e = S(r, {
116
126
  ...t,
117
127
  where: `configScopes.${n}`,
118
128
  scope: !0
@@ -120,7 +130,7 @@ var c = (e) => !!e && typeof e == "object" && !Array.isArray(e), l = r, u = n, d
120
130
  if (e) return e;
121
131
  }
122
132
  return null;
123
- }, C = {
133
+ }, E = {
124
134
  pt: "each component's `pt` under `components` (components: { BbButton: { pt: { … } } })",
125
135
  defaults: "the props under `components` (components: { BbButton: { size: 'sm' } })",
126
136
  variants: "each component's `variants` under `components` (components: { BbButton: { variants: ['brand'] } }; `inputs` split per field, `confirm` → BbConfirm)",
@@ -134,8 +144,10 @@ var c = (e) => !!e && typeof e == "object" && !Array.isArray(e), l = r, u = n, d
134
144
  iconDefaultSizes: "`sizeMap` on `components.BbIcon`, `BbAvatar` and `BbRating` (one each)",
135
145
  dialogDefaultSizes: "`components.BbDialog.sizeMap`",
136
146
  offCanvasDefaultSizes: "`components.BbOffCanvas.sizeMap`",
137
- ...Object.fromEntries(Object.entries(s).map(([e, t]) => [e, t.map((e) => `\`components.${e}.variants\``).join(" / ")]))
138
- }, w = Object.keys({
147
+ iconDir: "`icons.dir` (icons: { dir: './assets/icons' })",
148
+ iconWhitelist: "`icons.whitelist` (icons: { whitelist: ['tabler:crown'] })",
149
+ ...Object.fromEntries(Object.entries(l).map(([e, t]) => [e, t.map((e) => `\`components.${e}.variants\``).join(" / ")]))
150
+ }, D = Object.keys({
139
151
  inertiaLinkName: !0,
140
152
  nuxtLinkName: !0,
141
153
  linkActiveClass: !0,
@@ -148,9 +160,8 @@ var c = (e) => !!e && typeof e == "object" && !Array.isArray(e), l = r, u = n, d
148
160
  cssLayers: !0,
149
161
  injectDirectives: !0,
150
162
  enabledLocales: !0,
151
- iconDir: !0,
163
+ icons: !0,
152
164
  iconsScanner: !0,
153
- iconWhitelist: !0,
154
165
  ai: !0,
155
166
  allowComponents: !0,
156
167
  dts: !0,
@@ -158,13 +169,13 @@ var c = (e) => !!e && typeof e == "object" && !Array.isArray(e), l = r, u = n, d
158
169
  components: !0,
159
170
  configScopes: !0,
160
171
  passthroughDeduper: !0
161
- }), T = { autoImport: !0 }, E = [...w, ...Object.keys(T)], D = (e) => {
162
- let t = Object.keys(C).find((t) => t in e);
163
- return t ? `[bitboss-ui] \`${t}\` is no longer a plugin option: it moved to ${C[t]}. See the installation guide, "The components map".` : null;
164
- }, O = (e, t = w, n = "bitbossUi()") => {
172
+ }), O = { autoImport: !0 }, k = [...D, ...Object.keys(O)], A = (e) => {
173
+ let t = Object.keys(E).find((t) => t in e);
174
+ return t ? `[bitboss-ui] \`${t}\` is no longer a plugin option: it moved to ${E[t]}. See the installation guide, "The components map".` : null;
175
+ }, j = (e, t = D, n = "bitbossUi()") => {
165
176
  let r = Object.keys(e).find((e) => !t.includes(e));
166
177
  if (r === void 0) return null;
167
- let i = h(r, t);
178
+ let i = v(r, t);
168
179
  return `[bitboss-ui] \`${r}\` is not an option of ${n}${i ? ` — did you mean "${i}"?` : "."} It takes: ${t.join(", ")}. A key a newer bitboss-ui added lands here too when the running dev server still has the old plugin: restart it after upgrading.`;
169
180
  };
170
- export { E as NUXT_OPTION_KEYS, w as PLUGIN_OPTION_KEYS, C as REMOVED_OPTIONS, h as closestName, b as ptOfComponents, y as validateComponentsMap, S as validateConfigScopes, D as validateRemovedOptions, O as validateUnknownOptions, x as withoutPt };
181
+ export { k as NUXT_OPTION_KEYS, D as PLUGIN_OPTION_KEYS, E as REMOVED_OPTIONS, v as closestName, C as ptOfComponents, S as validateComponentsMap, T as validateConfigScopes, A as validateRemovedOptions, j as validateUnknownOptions, w as withoutPt };