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
package/llms.txt CHANGED
@@ -7,7 +7,7 @@ Note: the `dist/` paths below resolve inside the installed `bitboss-ui` package
7
7
  ## AI Knowledge Base
8
8
 
9
9
  - [Core knowledge base](https://llms-bitboss-ui.bitboss.it/dist/llms-medium.txt): **Fetch this if you can only fetch one file** — hard rules, setup, component picker, design language, and the full component catalogue in ~240 KB.
10
- - [Complete knowledge base](https://llms-bitboss-ui.bitboss.it/dist/llms-full.txt): Everything concatenated (~6.2 MB). Bulk ingestion only — too large to prompt with.
10
+ - [Complete knowledge base](https://llms-bitboss-ui.bitboss.it/dist/llms-full.txt): Everything concatenated (~6.3 MB). Bulk ingestion only — too large to prompt with.
11
11
  - [AI Router](dist/ai/guides/ai-router.md): **Start here** — tiny hop map for any coding agent (which file to open next).
12
12
  - [Component index](dist/ai/index.md): Full component catalogue with agent rules, grouped by category. Each entry links a typed contract (props/events/slots/v-model).
13
13
  - [Component API files](dist/ai/manifest/index.json): Machine-readable API, one JSON file per component (`manifest/components/<Name>.json`: every prop, event, slot, v-model and pt part, one per line, plus the public types it uses; a row marked `common: true` is whole in `manifest/common.json`) — open the index, then the one component. The same data in one ~1.2 MB file for tools is [components.json](dist/ai/components.json); its `types` array lists the public TYPE exports with a `usage` tier (`api` = the ones you reach for) and, on the `api` ones, a `usedBy` array naming the component and prop or event each is the type OF — `BbTableColumn` is `usedBy` `BbTable.columns`, a value you pass, not a tag you write. This file is props and events, not paint.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitboss-ui",
3
- "version": "3.0.0-beta.75",
3
+ "version": "3.0.0-beta.76",
4
4
  "description": "Vue 3 component library by BitBoss: forms, selects, layout, overlays, and more.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -307,7 +307,7 @@
307
307
  }
308
308
  ],
309
309
  "use": "Remove it in the adaptive phase (below)",
310
- "example": "bitbossUi({ iconDir: 'resources/icons' })",
310
+ "example": "bitbossUi({ icons: { dir: 'resources/icons' } })",
311
311
  "note": "Keep it only on a surface that must never become a sheet, and say why in a comment."
312
312
  }
313
313
  ]
@@ -0,0 +1,48 @@
1
+ /**
2
+ * How `bitboss-ui update` installs the newest release: in the app's own pin
3
+ * style. The package manager writes its default range (`^`) on a plain
4
+ * install, so an exact pin (`"3.0.0-beta.75"`, installed with `npm i -E`)
5
+ * would turn into a caret, and a local tarball or a link (`file:`, `link:`,
6
+ * a path) into a registry version, an older one than the tarball when a
7
+ * release candidate is being tried. Exact stays exact; a range is the
8
+ * manager's default; a local spec is not reinstalled at all.
9
+ */
10
+
11
+ /** The style of the app's declared `bitboss-ui` spec. */
12
+ export function pinStyle(declared) {
13
+ const spec = String(declared ?? '').trim();
14
+ if (!spec) return 'range';
15
+ if (
16
+ /^(file:|link:|portal:|workspace:|git\+|git:|github:|https?:|\.{0,2}\/|~\/)/.test(
17
+ spec
18
+ ) ||
19
+ /\.(tgz|tar\.gz)$/.test(spec)
20
+ )
21
+ return 'local';
22
+ // A bare version, `=` allowed: what `npm i -E` and `--save-exact` write.
23
+ if (/^=?\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(spec))
24
+ return 'exact';
25
+ return 'range';
26
+ }
27
+
28
+ /** Each manager's save-exact flag. */
29
+ const EXACT_FLAG = {
30
+ npm: '--save-exact',
31
+ pnpm: '--save-exact',
32
+ yarn: '--exact',
33
+ bun: '--exact',
34
+ };
35
+
36
+ /**
37
+ * The install argv for `update`, or `null` when the app's spec is local and
38
+ * must not be replaced (the caller then only refreshes the agent setup).
39
+ */
40
+ export function updateInstallCommand(pm, { declared, dev, channel }) {
41
+ const style = pinStyle(declared);
42
+ if (style === 'local') return null;
43
+ const verb = pm === 'npm' ? 'install' : 'add';
44
+ const flags = [];
45
+ if (dev) flags.push(pm === 'npm' ? '--save-dev' : '-D');
46
+ if (style === 'exact') flags.push(EXACT_FLAG[pm] ?? '--save-exact');
47
+ return [pm, verb, ...flags, `bitboss-ui@${channel}`];
48
+ }
@@ -2597,6 +2597,9 @@ export function scriptSetupArrayConsts(code) {
2597
2597
  map.mutated = new Set();
2598
2598
  map.sealed = new Set();
2599
2599
  map.slotKeyed = new Set();
2600
+ // Top-level `const id = 'x'` strings: what a computed slot name like
2601
+ // `#[slotKey(id)]` resolves to (`staticSlotNameOf`).
2602
+ map.strings = new Map();
2600
2603
  const match = /<script\b[^>]*\bsetup\b[^>]*>([\s\S]*?)<\/script>/i.exec(code);
2601
2604
  if (!match) return map;
2602
2605
  let program;
@@ -2639,6 +2642,10 @@ export function scriptSetupArrayConsts(code) {
2639
2642
  init: declarator.init,
2640
2643
  });
2641
2644
  let init = unwrapTsExpression(declarator.init);
2645
+ if (init?.type === 'StringLiteral')
2646
+ map.strings.set(declarator.id.name, init.value);
2647
+ else if (init?.type === 'TemplateLiteral' && !init.expressions.length)
2648
+ map.strings.set(declarator.id.name, init.quasis[0].value.cooked);
2642
2649
  if (
2643
2650
  init?.type === 'CallExpression' &&
2644
2651
  init.callee.type === 'Identifier' &&
@@ -3337,6 +3344,47 @@ const parseTemplateExpression = (source) => {
3337
3344
  }
3338
3345
  };
3339
3346
 
3347
+ /**
3348
+ * The one name a computed slot `#[…]` always produces, when every part of it
3349
+ * is in sight: a top-level `const` string, `slotKey(…)` of one (or of a
3350
+ * literal), and a template literal joining them (`` `${slotKey(id)}:label` ``).
3351
+ * Null for anything that varies (a prop, a loop alias, a call).
3352
+ *
3353
+ * @param {string} slotText the `#[…]` expression
3354
+ * @param {Map<string, string> | undefined} strings from `scriptSetupArrayConsts`
3355
+ * @returns {string | null}
3356
+ */
3357
+ const staticSlotNameOf = (slotText, strings) => {
3358
+ if (!strings?.size && !/['"`]/.test(slotText)) return null;
3359
+ const valueOf = (node) => {
3360
+ const expr = unwrapTsExpression(node);
3361
+ if (!expr) return null;
3362
+ if (expr.type === 'StringLiteral') return expr.value;
3363
+ if (expr.type === 'NumericLiteral') return String(expr.value);
3364
+ if (expr.type === 'Identifier') return strings?.get(expr.name) ?? null;
3365
+ if (
3366
+ expr.type === 'CallExpression' &&
3367
+ expr.callee.type === 'Identifier' &&
3368
+ expr.callee.name === 'slotKey' &&
3369
+ expr.arguments.length === 1
3370
+ ) {
3371
+ const inner = valueOf(expr.arguments[0]);
3372
+ return inner === null ? null : runtimeSlotKey(inner);
3373
+ }
3374
+ if (expr.type === 'TemplateLiteral') {
3375
+ let out = expr.quasis[0].value.cooked;
3376
+ for (let i = 0; i < expr.expressions.length; i++) {
3377
+ const part = valueOf(expr.expressions[i]);
3378
+ if (part === null) return null;
3379
+ out += part + expr.quasis[i + 1].value.cooked;
3380
+ }
3381
+ return out;
3382
+ }
3383
+ return null;
3384
+ };
3385
+ return valueOf(parseTemplateExpression(slotText));
3386
+ };
3387
+
3340
3388
  /** What `slotKey()` (src/utilities/functions/slotKey.ts) makes of a key. */
3341
3389
  /** What `slotKey()` makes of a key: the library's rule, via its JS twin. */
3342
3390
  const runtimeSlotKey = slotKey;
@@ -3345,7 +3393,7 @@ const runtimeSlotKey = slotKey;
3345
3393
  * The static string a v-for element yields for `alias` / `alias.field`, or
3346
3394
  * null when it is not a literal.
3347
3395
  */
3348
- const literalKeyOf = (element, field) => {
3396
+ const literalKeyOf = (element, field, strings) => {
3349
3397
  const node = unwrapTsExpression(element);
3350
3398
  const value = field
3351
3399
  ? node?.type === 'ObjectExpression'
@@ -3354,6 +3402,9 @@ const literalKeyOf = (element, field) => {
3354
3402
  : node;
3355
3403
  if (value?.type === 'StringLiteral') return value.value;
3356
3404
  if (value?.type === 'NumericLiteral') return String(value.value);
3405
+ // A top-level `const id = 'x'` (`{ id }`, `id: groupId`).
3406
+ if (value?.type === 'Identifier' && strings?.has(value.name))
3407
+ return strings.get(value.name);
3357
3408
  return null;
3358
3409
  };
3359
3410
 
@@ -3672,7 +3723,7 @@ const OLD_IDENTITY_FIELD = 'key';
3672
3723
  * any other entry's `field` (a stale `key` still counts, so a slot check
3673
3724
  * agrees with the rename `renamed-item-field` asks for).
3674
3725
  */
3675
- const identityOf = (source, element) => {
3726
+ const identityOf = (source, element, strings) => {
3676
3727
  const entry = unwrapTsExpression(element);
3677
3728
  const isGroup =
3678
3729
  source.nested &&
@@ -3681,9 +3732,9 @@ const identityOf = (source, element) => {
3681
3732
  objectKeyNode(entry, 'selectable') ||
3682
3733
  objectKeyNode(entry, 'multiple'));
3683
3734
  const field = isGroup ? 'id' : source.field;
3684
- const now = literalKeyOf(element, field);
3735
+ const now = literalKeyOf(element, field, strings);
3685
3736
  if (now !== null || field === OLD_IDENTITY_FIELD) return now;
3686
- return literalKeyOf(element, OLD_IDENTITY_FIELD);
3737
+ return literalKeyOf(element, OLD_IDENTITY_FIELD, strings);
3687
3738
  };
3688
3739
 
3689
3740
  /**
@@ -3837,7 +3888,7 @@ export function keyedSlotLookup(name, surface, propSource, arrays) {
3837
3888
  let complete = resolveVisibleArray(expression, arrays) !== null;
3838
3889
  const walk = (array) => {
3839
3890
  for (const element of array.elements) {
3840
- const key = identityOf(source, element);
3891
+ const key = identityOf(source, element, arrays?.strings);
3841
3892
  if (key === null) complete = false;
3842
3893
  else keys.push(key);
3843
3894
  const entry = unwrapTsExpression(element);
@@ -4940,24 +4991,34 @@ function validateElement(node, manifest, findings, options = {}) {
4940
4991
  // start tag (`<BbAlert><template #actions>…</template></BbAlert>`).
4941
4992
  for (const child of node.children ?? []) {
4942
4993
  if (child.type !== NODE_ELEMENT || child.tag !== 'template') continue;
4994
+ const inLoop = (child.props ?? []).some(
4995
+ (p) => p.type === PROP_DIRECTIVE && p.name === 'for'
4996
+ );
4943
4997
  for (const prop of child.props ?? []) {
4944
4998
  if (prop.type !== PROP_DIRECTIVE || prop.name !== 'slot') continue;
4945
4999
  const arg = prop.arg;
4946
- // Bare `v-slot="…"` (default slot, no name) and dynamic `#[expr]`
4947
- // (unbounded) can't be — or don't need to be — checked.
4948
- if (!arg || !arg.isStatic) continue;
5000
+ // Bare `v-slot="…"` (default slot, no name) can't be checked; a
5001
+ // dynamic `#[expr]` only when it always yields one name in sight
5002
+ // (`#[slotKey(id)]` with `const id = 'x'`); loops are checked below.
5003
+ if (!arg) continue;
5004
+ const slotName = arg.isStatic
5005
+ ? arg.content
5006
+ : inLoop
5007
+ ? null
5008
+ : staticSlotNameOf(arg.content, options.arrays?.strings);
5009
+ if (slotName === null) continue;
4949
5010
  // Keys in sight decide first; without them, the
4950
5011
  // manifest rules, then the squashed-spelling warning (C9b).
4951
- const keyed = keyedLookup ? keyedLookup(arg.content) : undefined;
5012
+ const keyed = keyedLookup ? keyedLookup(slotName) : undefined;
4952
5013
  const finding =
4953
5014
  keyed !== undefined && keyed !== null
4954
5015
  ? keyed
4955
- : keyedLookup?.expects(arg.content)
5016
+ : keyedLookup?.expects(slotName)
4956
5017
  ? null
4957
- : (checker.checkSlot(arg.content) ??
5018
+ : (checker.checkSlot(slotName) ??
4958
5019
  (keyedLookup
4959
5020
  ? null
4960
- : squashedSlotWarning(name, surface, arg.content)));
5021
+ : squashedSlotWarning(name, surface, slotName)));
4961
5022
  if (finding)
4962
5023
  findings.push({ component: name, ...finding, line: propLine(prop) });
4963
5024
  }
@@ -1,3 +0,0 @@
1
- // src/assets/svgs/caret_down.svg?raw
2
- var e = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z\" fill=\"currentColor\" />\n</svg>\n";
3
- export { e as default };