bitboss-ui 3.0.0-beta.73 → 3.0.0-beta.74
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.
- package/README.md +4 -2
- package/bin/bitboss-ui-mcp.mjs +101 -3
- package/bin/bitboss-ui.mjs +6 -1
- package/bin/cli.mjs +31 -5
- package/dist/ai/BbBadge.md +4 -4
- package/dist/ai/BbCalendar.md +4 -3
- package/dist/ai/BbColorPalette.md +8 -9
- package/dist/ai/BbConfirmPortal.md +1 -1
- package/dist/ai/BbDatePicker.md +4 -3
- package/dist/ai/BbDialog.md +14 -4
- package/dist/ai/BbDropdown.md +23 -10
- package/dist/ai/BbDropdownButton.md +2 -2
- package/dist/ai/BbForm.md +4 -1
- package/dist/ai/BbHoverCardPortal.md +1 -1
- package/dist/ai/BbNumberInput.md +5 -3
- package/dist/ai/BbPopoverPortal.md +1 -1
- package/dist/ai/BbTable.md +43 -19
- package/dist/ai/BbTimePicker.md +4 -3
- package/dist/ai/BbToastPortal.md +1 -1
- package/dist/ai/changelog.json +56 -4
- package/dist/ai/components.json +54 -18
- package/dist/ai/guides/design-tokens.md +20 -0
- package/dist/ai/guides/eslint-rules.md +1 -1
- package/dist/ai/guides/inertia-helpers.md +613 -53
- package/dist/ai/guides/migration/adoption-checklist.md +5 -5
- package/dist/ai/guides/migration/v2-to-v3.md +24 -0
- package/dist/ai/guides/migration/v3-beta-tooling.md +3 -0
- package/dist/ai/guides/preset-components.md +15 -2
- package/dist/ai/guides/reporting.md +49 -0
- package/dist/ai/helpers/inertia/manifest.json +33 -38
- package/dist/ai/helpers/inertia/useHasChanged.ts +25 -37
- package/dist/ai/helpers/inertia/useQuery.ts +24 -6
- package/dist/ai/helpers/inertia/utils.ts +552 -3
- package/dist/ai/index.md +1 -0
- package/dist/ai/manifest/components/BbAlert.tree.json +1 -1
- package/dist/ai/manifest/components/BbCalendar.json +2 -2
- package/dist/ai/manifest/components/BbColorPalette.json +3 -3
- package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
- package/dist/ai/manifest/components/BbDatePicker.json +3 -3
- package/dist/ai/manifest/components/BbDialog.tree.json +5 -1
- package/dist/ai/manifest/components/BbDropdown.json +3 -3
- package/dist/ai/manifest/components/BbDropdown.tree.json +3 -2
- package/dist/ai/manifest/components/BbDropdownButton.json +2 -2
- package/dist/ai/manifest/components/BbForm.json +1 -1
- package/dist/ai/manifest/components/BbHoverCard.json +1 -1
- package/dist/ai/manifest/components/BbHoverCardPortal.json +1 -1
- package/dist/ai/manifest/components/BbNumberInput.json +1 -1
- package/dist/ai/manifest/components/BbPopover.json +1 -1
- package/dist/ai/manifest/components/BbPopoverPortal.json +1 -1
- package/dist/ai/manifest/components/BbSelectPopover.json +1 -1
- package/dist/ai/manifest/components/BbTable.tree.json +12 -6
- package/dist/ai/manifest/components/BbTimePicker.json +3 -3
- package/dist/ai/manifest/components/BbToastPortal.json +1 -1
- package/dist/ai/manifest/components/CommonPopover.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/manifest/meta.json +36 -0
- package/dist/ai/manifest/types.advanced.json +81 -80
- package/dist/ai/manifest/types.api.json +66 -65
- package/dist/ai/manifest/types.wrapper.json +155 -118
- package/dist/ai/recipes/inertia/layout-scaffold.md +3 -1
- package/dist/ai/recipes/nuxt/layout-scaffold.md +3 -1
- package/dist/ai/recipes/vue/layout-scaffold.md +3 -1
- package/dist/ai/source/BbAlert.md +16 -4
- package/dist/ai/source/BbAvatar.md +2 -0
- package/dist/ai/source/BbBreadcrumbs.md +4 -1
- package/dist/ai/source/BbCalendar.md +22 -12
- package/dist/ai/source/BbColorPalette.md +41 -12
- package/dist/ai/source/BbConfirm.md +7 -0
- package/dist/ai/source/BbConfirmPortal.md +9 -4
- package/dist/ai/source/BbDatePicker.md +53 -22
- package/dist/ai/source/BbDatePickerInput.md +32 -8
- package/dist/ai/source/BbDialog.md +31 -1
- package/dist/ai/source/BbDropdown.md +52 -24
- package/dist/ai/source/BbDropdownGroup.md +17 -21
- package/dist/ai/source/BbForm.md +73 -6
- package/dist/ai/source/BbHoverCard.md +7 -0
- package/dist/ai/source/BbHoverCardPortal.md +9 -5
- package/dist/ai/source/BbNumberInput.md +5 -6
- package/dist/ai/source/BbOffCanvas.md +34 -1
- package/dist/ai/source/BbPopover.md +7 -0
- package/dist/ai/source/BbPopoverPortal.md +9 -5
- package/dist/ai/source/BbRadio.md +4 -3
- package/dist/ai/source/BbRadioGroup.md +7 -5
- package/dist/ai/source/BbTable.md +54 -6
- package/dist/ai/source/BbTag.md +10 -3
- package/dist/ai/source/BbTimePicker.md +50 -15
- package/dist/ai/source/BbTimePickerInput.md +30 -7
- package/dist/ai/source/BbToast.md +14 -0
- package/dist/ai/source/BbToastPortal.md +16 -4
- package/dist/ai/source/CommonFieldInput.md +11 -5
- package/dist/ai/source/CommonPopover.md +4 -1
- package/dist/components/BbAlert/BbAlert.vue_vue_type_script_setup_true_lang.js +31 -26
- package/dist/components/BbBreadcrumbs/BbBreadcrumbs.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue.d.ts +1 -1
- package/dist/components/BbCalendar/BbCalendar.vue_vue_type_script_setup_true_lang.js +235 -234
- package/dist/components/BbCalendar/types.d.ts +2 -2
- package/dist/components/BbCalendar/useDayjsLocale.js +11 -8
- package/dist/components/BbColorPalette/BbColorPalette.vue_vue_type_script_setup_true_lang.js +197 -192
- package/dist/components/BbColorPalette/types.d.ts +1 -1
- package/dist/components/BbConfirm/BbConfirmPortal.vue.d.ts +2 -4
- package/dist/components/BbConfirm/types.d.ts +5 -0
- package/dist/components/BbDatePicker/BbDatePicker.vue.d.ts +1 -1
- package/dist/components/BbDatePicker/BbDatePicker.vue_vue_type_script_setup_true_lang.js +145 -139
- package/dist/components/BbDatePicker/types.d.ts +2 -2
- package/dist/components/BbDatePickerInput/BbDatePickerInput.vue_vue_type_script_setup_true_lang.js +337 -335
- package/dist/components/BbDialog/BbDialog.vue_vue_type_script_setup_true_lang.js +253 -245
- package/dist/components/BbDialog/leaveGhost.js +33 -0
- package/dist/components/BbDialog/overlayActions.js +34 -20
- package/dist/components/BbDropdown/BbDropdown.vue_vue_type_script_setup_true_lang.js +11 -3
- package/dist/components/BbDropdown/BbDropdownList.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/components/BbDropdown/DropdownPipelineResolver.vue_vue_type_script_setup_true_lang.js +119 -120
- package/dist/components/BbDropdown/types.d.ts +8 -17
- package/dist/components/BbForm/BbForm.vue.d.ts +2 -21
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +229 -227
- package/dist/components/BbForm/types.d.ts +31 -0
- package/dist/components/BbHoverCard/BbHoverCardPortal.vue.d.ts +2 -5
- package/dist/components/BbHoverCard/types.d.ts +5 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbNumberInput/numberDisplay.js +102 -106
- package/dist/components/BbNumberInput/types.d.ts +4 -3
- package/dist/components/BbOffCanvas/BbOffCanvas.vue_vue_type_script_setup_true_lang.js +385 -377
- package/dist/components/BbPopover/BbPopoverPortal.vue.d.ts +2 -5
- package/dist/components/BbPopover/types.d.ts +5 -0
- package/dist/components/BbRadio/types.d.ts +4 -3
- package/dist/components/BbRadioGroup/BbRadioGroup.vue_vue_type_script_setup_true_lang.js +10 -12
- package/dist/components/BbTable/BbTable.vue_vue_type_script_setup_true_lang.js +231 -231
- package/dist/components/BbTable/BbTableDataRow.js +96 -96
- package/dist/components/BbTag/BbTag.vue_vue_type_script_setup_true_lang.js +9 -3
- package/dist/components/BbTimePicker/BbTimePicker.vue.d.ts +1 -1
- package/dist/components/BbTimePicker/BbTimePicker.vue_vue_type_script_setup_true_lang.js +106 -100
- package/dist/components/BbTimePicker/types.d.ts +2 -2
- package/dist/components/BbTimePickerInput/BbTimePickerInput.vue_vue_type_script_setup_true_lang.js +214 -213
- package/dist/components/BbToast/BbToastPortal.vue.d.ts +2 -4
- package/dist/components/BbToast/types.d.ts +5 -0
- package/dist/components/CommonFieldInput/CommonFieldInput.vue_vue_type_script_setup_true_lang.js +36 -36
- package/dist/components/CommonPopover/CommonPopover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/CommonTimeSelector/useMeridiem.js +6 -6
- package/dist/composables/formSubmitLock.js +2 -1
- package/dist/composables/overlayRegistry.js +52 -42
- package/dist/composables/useActiveInactiveState.js +8 -4
- package/dist/composables/useBbDialog.js +5 -5
- package/dist/composables/useOwnModel.js +16 -0
- package/dist/composables/useSegmentedFields.js +31 -20
- package/dist/i18n/currencyDigits.js +58 -0
- package/dist/i18n/regionDates.js +250 -0
- package/dist/i18n/regionHints.js +30 -41
- package/dist/index.d.ts +34 -30
- package/dist/llms-full.txt +860 -129
- package/dist/llms.txt +3 -1
- package/dist/styles.css +2 -2
- package/dist/types/ActionButton.d.ts +3 -1
- package/dist/types/CommonProps.d.ts +8 -0
- package/dist/utilities/functions/hash.js +97 -64
- package/dist/utilities/functions/isEqual.js +33 -25
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +2 -1
- package/dist/vite.js +8 -4
- package/llms.txt +3 -1
- package/package.json +1 -2
- package/scripts/README.md +1 -1
- package/scripts/lib/adoption-checklist.json +6 -5
- package/scripts/lib/agent-manifest.mjs +33 -6
- package/scripts/lib/agent-setup.mjs +54 -6
- package/scripts/lib/cldr-pins.ts +182 -0
- package/scripts/lib/engines-include.d.mts +5 -0
- package/scripts/lib/engines-include.mjs +40 -0
- package/scripts/lib/eslint-plugin.mjs +8 -2
- package/scripts/lib/hidden-label-placeholder.mjs +25 -5
- package/scripts/lib/idiom-scan.mjs +30 -3
- package/scripts/lib/legacy-agent-files.json +152 -0
- package/scripts/lib/mcp-config.mjs +74 -7
- package/scripts/lib/portal-names.mjs +78 -8
- package/scripts/lib/release-results.mjs +5 -2
- package/scripts/lib/report.mjs +340 -0
- package/scripts/lib/run-beat.mjs +14 -0
- package/scripts/lib/run-records.mjs +313 -0
- package/scripts/lib/selector-log.mjs +98 -0
- package/scripts/lib/ticket-beat.mjs +30 -0
- package/scripts/lib/validate-bb-markup.mjs +17 -2
package/README.md
CHANGED
|
@@ -372,8 +372,9 @@ rows with `members`, guide prose with `sections`; also answers for type names
|
|
|
372
372
|
and for v2 / beta names that were renamed), `get_css_surface` (a component's
|
|
373
373
|
CSS hooks, pt part first, then the class), `get_guide`, `get_composable`,
|
|
374
374
|
`list_recipes` / `get_recipe`, `list_tokens`, `list_changes` (counts, then one
|
|
375
|
-
line per change)
|
|
376
|
-
|
|
375
|
+
line per change), `validate`, and `report_issue` (sends a report to the
|
|
376
|
+
maintainers, the one tool that is not read-only). Every answer is small by
|
|
377
|
+
default: ask for the part you need.
|
|
377
378
|
|
|
378
379
|
### CLI commands
|
|
379
380
|
|
|
@@ -382,6 +383,7 @@ part you need.
|
|
|
382
383
|
| `npx bitboss-ui@beta setup [--manual] [--yes] [--no-ai] [--validation <lib>] [--[no-]eslint]` | Installs bitboss-ui and its prerequisites, wires the build and runtime plugins, adds the app's `postinstall`, sets up coding agents (see Installation). |
|
|
383
384
|
| `npx bitboss-ui update [--no-install] [--all]` | Installs the newest release on the app's channel (`beta` while on a beta), refreshes the agent files and lists the breaking changes since the old version. `--no-install`: refresh only. As the app's `postinstall` it only refreshes, quietly, and never fails the install. |
|
|
384
385
|
| `npx bitboss-ui check [paths… \| --changed] [--fix] [--idioms] [--json]` | Validates `Bb*` markup in `.vue` / `.md` files against the installed version; `--fix` applies the library's renames first (v2 → v3, and between 3.0 betas); `--changed` checks only the files git sees changed vs HEAD (plus untracked); `--idioms` also lists the hand-rolled controls the library ships ([adoption checklist](dist/ai/guides/migration/adoption-checklist.md), report-only). |
|
|
386
|
+
| `npx bitboss-ui report --kind <kind> --component <name> --expected … --actual …` | Sends a bug, friction, glue, smell, feature request or docs problem to the maintainers with the installed version, and prints the report id and its status URL ([Reporting](dist/ai/guides/reporting.md)). |
|
|
385
387
|
| `npx bitboss-ui add <id…> \| --all` | Copies Inertia helpers into the app as files it owns, recorded in `bitboss-ui.lock.json`; never changes an existing file. |
|
|
386
388
|
| `npx bitboss-ui helpers [list \| diff \| update]` | The helper ids and their state in this app; `diff` your copy against this version`s; `update` replaces the copies you did not edit. |
|
|
387
389
|
| `npx bitboss-ui changelog --since <version> [--until <version>] [--json]` | Lists the **breaking** changes between the version you are on and the installed one — what breaks if you bump. |
|
package/bin/bitboss-ui-mcp.mjs
CHANGED
|
@@ -48,6 +48,13 @@ import { projectResolution } from '../scripts/lib/unimported-components.mjs';
|
|
|
48
48
|
import { isDirectRun as isDirectRunOf } from '../scripts/lib/is-direct-run.mjs';
|
|
49
49
|
import { loadMcpSdk } from '../scripts/lib/mcp-sdk.mjs';
|
|
50
50
|
import { definePresetCpSource } from '../scripts/lib/define-preset-copy.mjs';
|
|
51
|
+
import {
|
|
52
|
+
KIND_DEFINITIONS,
|
|
53
|
+
REPORT_KINDS,
|
|
54
|
+
buildReport,
|
|
55
|
+
reportingEnabled,
|
|
56
|
+
sendReport,
|
|
57
|
+
} from '../scripts/lib/report.mjs';
|
|
51
58
|
|
|
52
59
|
const SDK = await loadMcpSdk();
|
|
53
60
|
const { McpServer, StdioServerTransport, z } = SDK;
|
|
@@ -3266,6 +3273,53 @@ function toolCallback(fn) {
|
|
|
3266
3273
|
};
|
|
3267
3274
|
}
|
|
3268
3275
|
|
|
3276
|
+
/**
|
|
3277
|
+
* report_issue: send one report to the maintainers' inbox, with the installed
|
|
3278
|
+
* version and the proof of work (scripts/lib/report.mjs). Answers the id and
|
|
3279
|
+
* status URL, or what the inbox refused. `fetch` and `bits` are test seams.
|
|
3280
|
+
*/
|
|
3281
|
+
async function reportIssue(args = {}, { fetch, bits } = {}) {
|
|
3282
|
+
const version = packageVersion();
|
|
3283
|
+
const { body, problems } = buildReport(args, { version });
|
|
3284
|
+
if (problems.length) return { error: problems.join('; ') };
|
|
3285
|
+
let result;
|
|
3286
|
+
try {
|
|
3287
|
+
result = await sendReport(body, {
|
|
3288
|
+
client: `bitboss-ui-mcp/${version}`,
|
|
3289
|
+
fetch,
|
|
3290
|
+
bits,
|
|
3291
|
+
});
|
|
3292
|
+
} catch (error) {
|
|
3293
|
+
return {
|
|
3294
|
+
error: `Could not reach the inbox: ${error instanceof Error ? error.message : String(error)}. Keep your workaround; try again later.`,
|
|
3295
|
+
};
|
|
3296
|
+
}
|
|
3297
|
+
const { status, body: answer } = result;
|
|
3298
|
+
if ((status === 200 || status === 201) && answer?.id)
|
|
3299
|
+
return {
|
|
3300
|
+
id: answer.id,
|
|
3301
|
+
duplicate: answer.duplicate === true,
|
|
3302
|
+
verified: answer.verified,
|
|
3303
|
+
statusUrl: answer.statusUrl,
|
|
3304
|
+
hint: 'Keep your workaround in place; the status URL says when a fix ships.',
|
|
3305
|
+
};
|
|
3306
|
+
return {
|
|
3307
|
+
error: answer?.error ?? `HTTP ${status}`,
|
|
3308
|
+
...(answer?.issues ? { issues: answer.issues } : {}),
|
|
3309
|
+
...(answer?.retryAfter ? { retryAfter: answer.retryAfter } : {}),
|
|
3310
|
+
};
|
|
3311
|
+
}
|
|
3312
|
+
|
|
3313
|
+
function asyncToolCallback(fn) {
|
|
3314
|
+
return async (args) => {
|
|
3315
|
+
const result = await fn(args ?? {});
|
|
3316
|
+
return {
|
|
3317
|
+
content: [{ type: 'text', text: JSON.stringify(result) }],
|
|
3318
|
+
isError: typeof result?.error === 'string',
|
|
3319
|
+
};
|
|
3320
|
+
};
|
|
3321
|
+
}
|
|
3322
|
+
|
|
3269
3323
|
const platformSchema = z.enum(RECIPE_PLATFORMS);
|
|
3270
3324
|
|
|
3271
3325
|
/**
|
|
@@ -3285,13 +3339,19 @@ const SERVER_INSTRUCTIONS = [
|
|
|
3285
3339
|
].join('\n');
|
|
3286
3340
|
|
|
3287
3341
|
/** Register the knowledge-base tools on a fresh McpServer instance. */
|
|
3288
|
-
|
|
3342
|
+
/**
|
|
3343
|
+
* @param {{ root?: string }} [options] `root`: the project whose package.json
|
|
3344
|
+
* may turn reporting off (`"bitboss-ui": { "report": false }`): then
|
|
3345
|
+
* `report_issue` is not registered at all, so no agent sees or calls it.
|
|
3346
|
+
*/
|
|
3347
|
+
function buildServer({ root = process.cwd() } = {}) {
|
|
3289
3348
|
const server = new McpServer(
|
|
3290
3349
|
{ name: 'bitboss-ui', version: packageVersion() },
|
|
3291
3350
|
{ capabilities: { tools: {} }, instructions: SERVER_INSTRUCTIONS }
|
|
3292
3351
|
);
|
|
3293
|
-
// Every tool reads the installed package and nothing
|
|
3294
|
-
// client can call them without a confirmation (MCP
|
|
3352
|
+
// Every tool but report_issue reads the installed package and nothing
|
|
3353
|
+
// else: say so, so a client can call them without a confirmation (MCP
|
|
3354
|
+
// tool annotations). report_issue overrides them: it sends.
|
|
3295
3355
|
const registerTool = server.registerTool.bind(server);
|
|
3296
3356
|
server.registerTool = (name, config, callback) =>
|
|
3297
3357
|
registerTool(
|
|
@@ -3307,6 +3367,7 @@ function buildServer() {
|
|
|
3307
3367
|
destructiveHint: false,
|
|
3308
3368
|
idempotentHint: true,
|
|
3309
3369
|
openWorldHint: false,
|
|
3370
|
+
...config.annotations,
|
|
3310
3371
|
},
|
|
3311
3372
|
},
|
|
3312
3373
|
callback
|
|
@@ -3636,6 +3697,42 @@ function buildServer() {
|
|
|
3636
3697
|
toolCallback(validateCode)
|
|
3637
3698
|
);
|
|
3638
3699
|
|
|
3700
|
+
if (!reportingEnabled(root)) return server;
|
|
3701
|
+
const text = (describe) => z.string().describe(describe);
|
|
3702
|
+
server.registerTool(
|
|
3703
|
+
'report_issue',
|
|
3704
|
+
{
|
|
3705
|
+
description:
|
|
3706
|
+
'Report to the bitboss-ui maintainers whenever you work around the library or hit one of these, then KEEP your workaround (never wait on a fix): ' +
|
|
3707
|
+
REPORT_KINDS.map((k) => `${k}: ${KIND_DEFINITIONS[k]}`).join(' ') +
|
|
3708
|
+
' Send a minimal repro only: never app data, customer data, secrets or proprietary code. Answers the report id and a status URL.',
|
|
3709
|
+
inputSchema: {
|
|
3710
|
+
kind: z.enum(REPORT_KINDS).describe('Which of the kinds above.'),
|
|
3711
|
+
component: text(
|
|
3712
|
+
"The Bb* component, e.g. 'BbSelect', or the surface: 'cli', 'mcp', 'vite-plugin', 'nuxt-module', 'docs', 'other'."
|
|
3713
|
+
),
|
|
3714
|
+
expected: text('What you expected, in a sentence or two.'),
|
|
3715
|
+
actual: text(
|
|
3716
|
+
'What happened instead. Its first line becomes the title.'
|
|
3717
|
+
),
|
|
3718
|
+
workaround: text('What you did instead, if anything.').optional(),
|
|
3719
|
+
snippet: text(
|
|
3720
|
+
'A minimal repro: a few lines of template or code, nothing from the app beyond that.'
|
|
3721
|
+
).optional(),
|
|
3722
|
+
page: text('The docs page you were reading, if any.').optional(),
|
|
3723
|
+
version: text(
|
|
3724
|
+
'The bitboss-ui version; default: the installed one.'
|
|
3725
|
+
).optional(),
|
|
3726
|
+
},
|
|
3727
|
+
annotations: {
|
|
3728
|
+
readOnlyHint: false,
|
|
3729
|
+
idempotentHint: false,
|
|
3730
|
+
openWorldHint: true,
|
|
3731
|
+
},
|
|
3732
|
+
},
|
|
3733
|
+
asyncToolCallback(reportIssue)
|
|
3734
|
+
);
|
|
3735
|
+
|
|
3639
3736
|
return server;
|
|
3640
3737
|
}
|
|
3641
3738
|
|
|
@@ -3697,6 +3794,7 @@ export {
|
|
|
3697
3794
|
listRecipes,
|
|
3698
3795
|
getRecipe,
|
|
3699
3796
|
validateCode,
|
|
3797
|
+
reportIssue,
|
|
3700
3798
|
};
|
|
3701
3799
|
|
|
3702
3800
|
// Through a symlink too (`node_modules/.bin`, a pnpm store): see the helper.
|
package/bin/bitboss-ui.mjs
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* that runs before the app has `vue` installed (`yarn dlx` / `pnpm dlx`
|
|
5
5
|
* install no peers), while the full CLI (bin/cli.mjs) loads Vue's template
|
|
6
6
|
* compiler at start-up for `check`. `update --no-install` (the app's
|
|
7
|
-
* postinstall) takes the same slim path, so an install never fails on it
|
|
7
|
+
* postinstall) takes the same slim path, so an install never fails on it,
|
|
8
|
+
* and so does `report`, which needs nothing but Node.
|
|
8
9
|
* Every other command is the full CLI.
|
|
9
10
|
*/
|
|
10
11
|
const [command, ...args] = process.argv.slice(2);
|
|
@@ -18,6 +19,10 @@ const refreshOnly =
|
|
|
18
19
|
if (command === 'setup') {
|
|
19
20
|
const { setupCli } = await import('../scripts/lib/setup.mjs');
|
|
20
21
|
process.exitCode = await setupCli(args);
|
|
22
|
+
} else if (command === 'report') {
|
|
23
|
+
// Zero dependencies: an agent reports from any project, Vue or not.
|
|
24
|
+
const { reportCli } = await import('../scripts/lib/report.mjs');
|
|
25
|
+
process.exitCode = await reportCli(args);
|
|
21
26
|
} else if (refreshOnly) {
|
|
22
27
|
// The app's postinstall: the agent refresh alone, on the same slim path.
|
|
23
28
|
const { refreshCli } = await import('../scripts/lib/agent-refresh.mjs');
|
package/bin/cli.mjs
CHANGED
|
@@ -50,7 +50,10 @@
|
|
|
50
50
|
* mcp Start a stdio MCP server exposing the dist/ai knowledge base
|
|
51
51
|
* (search_docs, search_components, get_component, get_composable,
|
|
52
52
|
* get_css_surface, list_tokens, list_guides, get_guide, list_changes,
|
|
53
|
-
* list_recipes, get_recipe, validate) to MCP-capable
|
|
53
|
+
* list_recipes, get_recipe, validate, report_issue) to MCP-capable
|
|
54
|
+
* agent harnesses.
|
|
55
|
+
* report Send a report to the maintainers' inbox (scripts/lib/report.mjs,
|
|
56
|
+
* on the slim entry: it needs nothing but Node).
|
|
54
57
|
*
|
|
55
58
|
* Plain ESM JavaScript on purpose: shipped as-is in the package, no build.
|
|
56
59
|
*/
|
|
@@ -71,6 +74,7 @@ import {
|
|
|
71
74
|
repeatedIdioms,
|
|
72
75
|
repeatOccurrences,
|
|
73
76
|
scanIdioms,
|
|
77
|
+
adoptedComponents,
|
|
74
78
|
} from '../scripts/lib/idiom-scan.mjs';
|
|
75
79
|
import {
|
|
76
80
|
disabledChecker,
|
|
@@ -1136,6 +1140,18 @@ async function checkCommand(
|
|
|
1136
1140
|
if (wantIdioms) {
|
|
1137
1141
|
const rows = loadAdoptionRows();
|
|
1138
1142
|
const exts = new Set(rows.flatMap((row) => row.ext));
|
|
1143
|
+
// the app's wrappers already built on a library group.
|
|
1144
|
+
const adopted = adoptedComponents(
|
|
1145
|
+
projectSources
|
|
1146
|
+
.filter((path) => path.endsWith('.vue'))
|
|
1147
|
+
.map((path) => {
|
|
1148
|
+
try {
|
|
1149
|
+
return [path, readText(path)];
|
|
1150
|
+
} catch {
|
|
1151
|
+
return [path, ''];
|
|
1152
|
+
}
|
|
1153
|
+
})
|
|
1154
|
+
);
|
|
1139
1155
|
const TEST_FILE = /\.(?:test|spec)(?:-d)?\.[cm]?[jt]sx?$/;
|
|
1140
1156
|
const scope = changed ? changed.all : globs.length ? files : projectSources;
|
|
1141
1157
|
// the repeats count across files, so they are judged at the end.
|
|
@@ -1151,7 +1167,7 @@ async function checkCommand(
|
|
|
1151
1167
|
continue;
|
|
1152
1168
|
}
|
|
1153
1169
|
const file = relative(projectRoot, path);
|
|
1154
|
-
for (const hit of scanIdioms(content, ext, rows))
|
|
1170
|
+
for (const hit of scanIdioms(content, ext, rows, { adopted }))
|
|
1155
1171
|
idioms.push({ file, ...hit });
|
|
1156
1172
|
for (const occurrence of repeatOccurrences(content, ext))
|
|
1157
1173
|
repeats.push({ file, ...occurrence });
|
|
@@ -1482,8 +1498,9 @@ Commands:
|
|
|
1482
1498
|
error or diff found a difference; 2 refused (add wrote
|
|
1483
1499
|
nothing); 3 a precondition failed, nothing written; 4 a
|
|
1484
1500
|
write failed and was rolled back. No --force: to take
|
|
1485
|
-
bitboss-ui's copy over your edit
|
|
1486
|
-
|
|
1501
|
+
bitboss-ui's copy over your edit (the edit is lost:
|
|
1502
|
+
read helpers diff <id> first), delete the file and run
|
|
1503
|
+
add again. --yes is accepted and does nothing (the
|
|
1487
1504
|
commands never prompt).
|
|
1488
1505
|
check [glob…] [--changed] [--json] [--allow-empty] [--allow-component <Name>]
|
|
1489
1506
|
[--no-hints] [--manifest <path>] [--fix] [--idioms]
|
|
@@ -1782,7 +1799,16 @@ Commands:
|
|
|
1782
1799
|
base (search_docs, search_components, get_component,
|
|
1783
1800
|
get_composable, get_css_surface, list_tokens,
|
|
1784
1801
|
list_guides, get_guide, list_changes, list_recipes,
|
|
1785
|
-
get_recipe, validate) to MCP-capable
|
|
1802
|
+
get_recipe, validate) and report_issue to MCP-capable
|
|
1803
|
+
agent harnesses.
|
|
1804
|
+
report --kind <kind> --component <name> --expected <text> --actual <text>
|
|
1805
|
+
[--workaround <text>] [--snippet <text>] [--page <path>]
|
|
1806
|
+
[--reporter <contact>] [--version <v>] [--stdin] [--json]
|
|
1807
|
+
Send a bug, friction, glue, smell, feature request or
|
|
1808
|
+
docs problem to the maintainers' inbox, with the
|
|
1809
|
+
installed version; prints the report id and its status
|
|
1810
|
+
URL. \`report --help\` defines the kinds. A minimal
|
|
1811
|
+
repro only: never app data, secrets or proprietary code.
|
|
1786
1812
|
help Show this help.
|
|
1787
1813
|
`);
|
|
1788
1814
|
}
|
package/dist/ai/BbBadge.md
CHANGED
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
|
|
30
30
|
`BbBadge` is a small inline pill. Use it for a status label ("Active", "Beta"),
|
|
31
31
|
a short count, a removable token (`clearable`), a clickable chip (slot a
|
|
32
|
-
`BbBadgeButton`), or all three at once. The label
|
|
33
|
-
slot
|
|
32
|
+
`BbBadgeButton`), or all three at once. The label goes in `text` or the
|
|
33
|
+
**default slot** (the slot wins, as on `BbButton`).
|
|
34
34
|
|
|
35
35
|
Pick a sibling when the marker should do more:
|
|
36
36
|
|
|
@@ -852,8 +852,8 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
852
852
|
|
|
853
853
|
### Gotchas & anti-patterns
|
|
854
854
|
|
|
855
|
-
- The label
|
|
856
|
-
|
|
855
|
+
- The label is `text` or the **default slot** (the slot wins). In button mode
|
|
856
|
+
it moves to `BbBadgeButton`'s slot; don't write both.
|
|
857
857
|
- **`BbBadgeButton` must be a direct child** of the badge's default slot:
|
|
858
858
|
inside a wrapper element or your own component, the badge keeps its body —
|
|
859
859
|
a duplicated label and a button inside a button. Wrap the whole `BbBadge`
|
package/dist/ai/BbCalendar.md
CHANGED
|
@@ -176,7 +176,8 @@ or a time rail with no single value to edit.
|
|
|
176
176
|
|
|
177
177
|
The value is typed `string | string[] | null` in every mode. `v-model` needs
|
|
178
178
|
nothing: bind a `ref<string | null>` for one date, a `ref<string[]>` for a
|
|
179
|
-
range or `multiple`.
|
|
179
|
+
range or `multiple`. With no `v-model` at all the calendar keeps the picked value itself, like a
|
|
180
|
+
native input, and still emits `update:modelValue`. An explicit `@update:model-value` handler narrows in one
|
|
180
181
|
line:
|
|
181
182
|
|
|
182
183
|
```ts no-check
|
|
@@ -738,7 +739,7 @@ the page is `BbDatePicker`.
|
|
|
738
739
|
## v-model
|
|
739
740
|
|
|
740
741
|
- `v-model:activeSegment` — type: `BbCalendarSegment \| undefined`
|
|
741
|
-
- `v-model` — type: `string \| string[] \| null`
|
|
742
|
+
- `v-model` — type: `string \| string[] \| null \| undefined`
|
|
742
743
|
- `v-model:time` — type: `string \| string[] \| null \| undefined`
|
|
743
744
|
|
|
744
745
|
## Props
|
|
@@ -754,7 +755,7 @@ the page is `BbDatePicker`.
|
|
|
754
755
|
| `floating` | `boolean \| undefined` | `false` | | Emit plain calendar strings instead of zoned ISO instants. Implied (and forced) by `type="week"`, `type="month"` and `type="year"`. |
|
|
755
756
|
| `max` | `string \| undefined` | | | Maximum selectable value, in this `type`'s shape (as `min`). A finer bound is ceiled to the unit, with a warning. With `datetime`, on its own day the time rail disables the times after it. |
|
|
756
757
|
| `min` | `string \| undefined` | | | Minimum selectable value in this `type`'s shape (`YYYY-MM-DD`, `…THH:mm` with `datetime`, `YYYY-MM` / `YYYY` with `month` / `year`; a week or a date with `week`, whole weeks only). A finer bound is floored to the unit, with a warning. With `datetime` the rail disables the earlier times on its day. |
|
|
757
|
-
| `modelValue` | `string \| string[] \| null` | |
|
|
758
|
+
| `modelValue` | `string \| string[] \| null \| undefined` | | | v-model: `null` when empty, a string, a `[start, end]` pair with `range`, or a sorted array with `multiple`. The string is `YYYY-MM-DD` when `floating` (`YYYY-Www` / `YYYY-MM` / `YYYY` for `week` / `month` / `year`), otherwise a zoned ISO instant (carrying the time under `datetime`). |
|
|
758
759
|
| `multiple` | `boolean` | `false` | | Multi-selection: each pick toggles a value in a sorted array (days, weeks, months or years). Needs an array `modelValue` (`[]` when empty, never `null`). Throws with `range` or `type="datetime"`. |
|
|
759
760
|
| `numberOfMonths` | `number \| undefined` | `1` | | How many months show side by side (day grids only). The keyboard crosses from one month into the next, and the arrows page all of them at once. Too narrow for them all, the months wrap onto the next row. |
|
|
760
761
|
| `range` | `boolean` | `false` | | Enables range selection (`[start, end]`). |
|
|
@@ -58,11 +58,10 @@ gradient, hue or alpha handle, and once per swatch/eyedropper pick. Treat it
|
|
|
58
58
|
like an `input`-frequency event: cheap handlers, or debounce your own
|
|
59
59
|
persistence.
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
nothing is chosen yet.
|
|
61
|
+
Seed a bound model as `ref<string | null>(null)`: `null` is the "no color
|
|
62
|
+
yet" value, and renders an "empty" trigger (nothing painted). With no
|
|
63
|
+
`v-model` at all the palette keeps the picked color itself, like a native
|
|
64
|
+
input, and still emits `update:modelValue` on every change.
|
|
66
65
|
|
|
67
66
|
**The palette never emits `null`** — every selection is a concrete hex — so
|
|
68
67
|
`null` is an _inbound_ value only. Once the user picks a colour there is no
|
|
@@ -730,8 +729,8 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
730
729
|
swatches/gradient as the primary path.
|
|
731
730
|
- **Alpha mismatch** — without `alpha`, an incoming `#RRGGBBAA` value can't be
|
|
732
731
|
represented; enable `alpha` wherever 8-digit values occur.
|
|
733
|
-
- **
|
|
734
|
-
|
|
732
|
+
- **Start a bound model at `null`**, not `undefined`: `null` is the empty
|
|
733
|
+
value the palette reports back.
|
|
735
734
|
- **Don't try to force it open via a prop** — the open state is internal; gate
|
|
736
735
|
with `disabled`/`readonly`, observe with the slot's `open`.
|
|
737
736
|
|
|
@@ -751,7 +750,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
751
750
|
|
|
752
751
|
## v-model
|
|
753
752
|
|
|
754
|
-
- `v-model` — type: `string \| null`
|
|
753
|
+
- `v-model` — type: `string \| null \| undefined`
|
|
755
754
|
|
|
756
755
|
## Props
|
|
757
756
|
|
|
@@ -768,7 +767,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
768
767
|
| `eager` | `boolean \| undefined` | `false` | | Renders the palette panel at mount instead of on the first open (the phone sheet's too). |
|
|
769
768
|
| `eyeDropper` | `boolean \| undefined` | `false` | | Show an eyedropper button inside the palette to sample any color on screen. Uses the native EyeDropper API — hidden automatically on unsupported browsers. |
|
|
770
769
|
| `label` | `string \| undefined` | | | Accessible label. The activator is named by it followed by the activator's own text, through `aria-labelledby`. Defaults to the locale string for "Open color picker" when omitted. |
|
|
771
|
-
| `modelValue` | `string \| null` | |
|
|
770
|
+
| `modelValue` | `string \| null \| undefined` | | | v-model: the current color as a `#RRGGBB` hex string (or `#RRGGBBAA` when `alpha` is enabled), or `null` when empty. |
|
|
772
771
|
| `offCanvasProps` | `Partial<BbOffCanvasProps> \| undefined` | | | Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on mobile), spread over its defaults. A `pt` inside it styles only the sheet (passthrough guide § Inside the sheet). The sheet hides its ✕; `{ hideClose: false }` brings it back. |
|
|
773
772
|
| `offset` | `number \| undefined` | `4` | | Space the floating container will maintain from the activator. |
|
|
774
773
|
| `padding` | `number \| undefined` | `6` | | Minimum empty space to keep from the edge of the page |
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
## Slots
|
|
22
22
|
|
|
23
|
-
- `default` — scope: `BbConfirmPortalSlotProps
|
|
23
|
+
- `default` — scope: `BbConfirmPortalSlotProps<any>` `{ data: P; ok: () => void; cancel: () => void }` — The confirm's body.
|
|
24
24
|
|
|
25
25
|
## See Also
|
|
26
26
|
|
package/dist/ai/BbDatePicker.md
CHANGED
|
@@ -72,7 +72,8 @@ const due = ref<string | null>(null);
|
|
|
72
72
|
|
|
73
73
|
The value is typed `string | string[] | null` in every mode. `v-model` needs
|
|
74
74
|
nothing: bind a `ref<string | null>` for one date, a `ref<string[]>` for a
|
|
75
|
-
range or `multiple`.
|
|
75
|
+
range or `multiple`. With no `v-model` at all the picker keeps the picked value itself, like a
|
|
76
|
+
native input, and still emits `update:modelValue`. An explicit `@update:model-value` handler narrows in one
|
|
76
77
|
line:
|
|
77
78
|
|
|
78
79
|
```ts no-check
|
|
@@ -462,7 +463,7 @@ and digit typeahead; the time rail exposes labelled columns. Always pass a
|
|
|
462
463
|
## v-model
|
|
463
464
|
|
|
464
465
|
- `v-model:activeSegment` — type: `BbCalendarSegment \| undefined`
|
|
465
|
-
- `v-model` — type: `string \| string[] \| null`
|
|
466
|
+
- `v-model` — type: `string \| string[] \| null \| undefined`
|
|
466
467
|
- `v-model:time` — type: `string \| string[] \| null \| undefined`
|
|
467
468
|
|
|
468
469
|
## Props
|
|
@@ -485,7 +486,7 @@ and digit typeahead; the time rail exposes labelled columns. Always pass a
|
|
|
485
486
|
| `label` | `string \| undefined` | | | Accessible label. The activator is named by it followed by the activator's own text ("Due date 12 Sep"), through `aria-labelledby`. |
|
|
486
487
|
| `max` | `string \| undefined` | | | Maximum selectable value, in this `type`'s shape. A finer bound is accepted and ceiled to the unit, with a warning (`week`: as `min`). |
|
|
487
488
|
| `min` | `string \| undefined` | | | Minimum selectable value, in this `type`'s shape — `YYYY-MM-DD` (`YYYY-MM-DDTHH:mm` with `datetime`, `YYYY-MM` with `month`, `YYYY` with `year`; a week or a date with `week`, whole weeks only). A finer bound is accepted and floored to the unit, with a warning. |
|
|
488
|
-
| `modelValue` | `string \| string[] \| null` | |
|
|
489
|
+
| `modelValue` | `string \| string[] \| null \| undefined` | | | v-model: `null` when empty, a string, a `[start, end]` pair with `range`, or a sorted array with `multiple`. The string is `YYYY-MM-DD` when `floating` (`YYYY-Www` / `YYYY-MM` / `YYYY` for `week` / `month` / `year`), otherwise a zoned ISO instant (carrying the time under `datetime`). |
|
|
489
490
|
| `multiple` | `boolean` | `false` | | Multi-selection: each pick toggles a value in a sorted array (days, weeks, months or years), and the panel stays open until dismissed. Needs an array `modelValue` (`[]` when empty, never `null`). Throws with `range` or `type="datetime"`. |
|
|
490
491
|
| `numberOfMonths` | `number \| undefined` | `1` | | How many months the popover shows side by side (day grids only); the phone sheet always shows one. Too narrow for them all, the months wrap. |
|
|
491
492
|
| `offCanvasProps` | `Partial<BbOffCanvasProps> \| undefined` | | | Props for the phone sheet (the `BbOffCanvas` that `adaptive` renders on mobile), spread over its defaults. A `pt` inside it styles only the sheet (passthrough guide § Inside the sheet). The sheet hides its ✕; `{ hideClose: false }` brings it back. |
|
package/dist/ai/BbDialog.md
CHANGED
|
@@ -355,6 +355,11 @@ const replace = (saved: Member) => {
|
|
|
355
355
|
| `'server'` | `show()` called during a server render: nothing opens there |
|
|
356
356
|
|
|
357
357
|
- On Android, the system back button closes the top dialog like Escape (it is the browser's close request), so `prevent-close` and a saving form refuse it the same way; iOS swipe-back and the desktop back button are page navigation.
|
|
358
|
+
- **A dialog removed while open** (a `v-if` on the row its `@complete`
|
|
359
|
+
deleted, a route change) still plays its close and hands focus back. An
|
|
360
|
+
async `@complete` that removed it still decides the result: completed
|
|
361
|
+
when it succeeds, else `'unmounted'`. So `v-if="item"` on the dialog is
|
|
362
|
+
fine.
|
|
358
363
|
- It settles when the close **starts**, together with `@hide`, so a list can
|
|
359
364
|
update while the dialog fades out. It never rejects and never hangs. A
|
|
360
365
|
refused close settles nothing, and a `complete` after a dismissal is
|
|
@@ -755,12 +760,16 @@ onClick }`.
|
|
|
755
760
|
- **`ok`** runs its `onClick` when written, then completes. Without one, it
|
|
756
761
|
submits the `BbForm` inside (validation first; an invalid form stays
|
|
757
762
|
open), and a successful save completes with what it resolved, else the
|
|
758
|
-
form's values. Enter in a field completes the same way
|
|
759
|
-
more: it completes with `data`.
|
|
763
|
+
form's values. Enter in a field completes the same way (`ok` is the form's
|
|
764
|
+
submit button). No form, or two or more: it completes with `data`.
|
|
760
765
|
- **`cancel`** runs its `onClick`, then closes as a dismissal
|
|
761
766
|
(`reason: 'close'`); refused while a save locks the dialog.
|
|
762
767
|
- **`actions`** replaces both: an array of button configs, each running its
|
|
763
768
|
`onClick`, then completing with `data`. `false`: none.
|
|
769
|
+
- **While one button's `onClick` runs or a form inside saves, the others
|
|
770
|
+
ignore clicks** without greying out (the running one spins); Cancel is
|
|
771
|
+
refused like the ✕.
|
|
772
|
+
Buttons of your own `#footer` are yours to handle.
|
|
764
773
|
- **`false` from an `onClick`** keeps the dialog open; a throw keeps it open
|
|
765
774
|
and is reported once (a `BbValidationError` never is).
|
|
766
775
|
- **`ok` is never disabled until the form is valid**: the user submits, the
|
|
@@ -1128,8 +1137,9 @@ import { BbDialog, BbForm, BbTextInput } from 'bitboss-ui';
|
|
|
1128
1137
|
|
|
1129
1138
|
type Role = { id?: number; name: string };
|
|
1130
1139
|
const props = defineProps<{ role?: Role }>();
|
|
1131
|
-
// A 422 rejects with the field errors; the form shows them.
|
|
1132
|
-
|
|
1140
|
+
// A 422 rejects with the field errors; the form shows them. The slot's
|
|
1141
|
+
// `data` is untyped, so the form hands back a plain record.
|
|
1142
|
+
const save = (values: Record<string, unknown>) =>
|
|
1133
1143
|
props.role
|
|
1134
1144
|
? api.put(`/roles/${props.role.id}`, values)
|
|
1135
1145
|
: api.post('/roles', values);
|
package/dist/ai/BbDropdown.md
CHANGED
|
@@ -462,8 +462,9 @@ Behavior you can rely on:
|
|
|
462
462
|
- a change in a **single** group closes the menu and puts focus back on the
|
|
463
463
|
trigger: a pick (the same value included) or a `clearable` group's clear,
|
|
464
464
|
wherever the group sits (inside a submenu too) and whatever else the menu
|
|
465
|
-
holds — a filter menu with a "Role" list and a "Deleted"
|
|
466
|
-
closes after either
|
|
465
|
+
holds — a filter menu with a "Role" list and a "Deleted" entry made a
|
|
466
|
+
`clearable` single group closes after either (which on/off recipe to pick:
|
|
467
|
+
see [Gotchas and anti-patterns](#gotchas-and-anti-patterns));
|
|
467
468
|
- a **multiple** group keeps the menu open while you toggle;
|
|
468
469
|
- `close-on-select` overrides both: `true` closes after every selection
|
|
469
470
|
change (a multiple pick included), `false` never closes on a selection.
|
|
@@ -742,8 +743,9 @@ The full grammar:
|
|
|
742
743
|
need the mapping. On a **`searchable`** group the context also carries
|
|
743
744
|
`query` (what the user typed, and `reason: 'search'` when they did) —
|
|
744
745
|
the same shape `BbSelect` passes, which is why one provider drops into both.
|
|
745
|
-
A getter **throws** to fail: the group shows
|
|
746
|
-
|
|
746
|
+
A getter **throws** to fail: the group shows its failure row (an error
|
|
747
|
+
icon and `failedText`) instead of "no data", even when `#empty` is
|
|
748
|
+
slotted: `#empty` means empty.
|
|
747
749
|
- `itemText` / `itemValue` — a path string or getter producing each raw item's
|
|
748
750
|
label and value; without them a row reads its own `label` (else `text`) and
|
|
749
751
|
`value`. `v-model` on the companion surfaces the selected value(s);
|
|
@@ -756,7 +758,7 @@ The full grammar:
|
|
|
756
758
|
- `loadingText` / `emptyText` / `failedText` — placeholder row text per
|
|
757
759
|
group; the dropdown-level `loading-text` / `empty-text` / `failed-text` props
|
|
758
760
|
set the default for all groups, and the `#loading` / `#empty` slots (payload:
|
|
759
|
-
`{ text, groupId, query }
|
|
761
|
+
`{ text, groupId, query }`) replace the loading and empty placeholder
|
|
760
762
|
rows entirely. `query` is the group's search text (`''` without one), like
|
|
761
763
|
`BbSelect`'s `#empty="{ query }"`.
|
|
762
764
|
- `dependencies: [...]` + `depsDebounceTime` — re-run the getter (debounced)
|
|
@@ -1629,7 +1631,13 @@ Two things this replaces, both seen in real apps:
|
|
|
1629
1631
|
content above and below the scrolling items, each separated by a divider. Use
|
|
1630
1632
|
the header for a title or a filter field and the footer for a persistent
|
|
1631
1633
|
action — they stay put while the list scrolls. On the mobile sheet they become
|
|
1632
|
-
the sheet's pinned header and footer
|
|
1634
|
+
the sheet's pinned header and footer, and the footer takes the sheet's footer
|
|
1635
|
+
layout (BbOffCanvas § Header, footer and body): what you slot straight in is
|
|
1636
|
+
laid out as a row of buttons at the end, 8px apart, wrapping. To keep your own
|
|
1637
|
+
layout there (a full-width button, a hint beside an action), wrap the footer
|
|
1638
|
+
in one `<div>`: a single wrapping element stretches across the sheet and lays
|
|
1639
|
+
out its children itself. The example below does that, so the button spans the
|
|
1640
|
+
footer on both surfaces.
|
|
1633
1641
|
|
|
1634
1642
|
**Pinned header and footer**
|
|
1635
1643
|
|
|
@@ -2307,8 +2315,13 @@ own sizes.
|
|
|
2307
2315
|
- **An on/off entry ("Show deleted") is a selectable group too**, never an
|
|
2308
2316
|
action row with a check icon drawn in: a screen reader hears that as a plain
|
|
2309
2317
|
`menuitem`, with no state. Make it a `multiple` group of one row (a
|
|
2310
|
-
`menuitemcheckbox` with `aria-checked`), bound to a one-value array
|
|
2311
|
-
|
|
2318
|
+
`menuitemcheckbox` with `aria-checked`), bound to a one-value array. It
|
|
2319
|
+
stays open after the toggle, as checkbox items do. To close the menu after
|
|
2320
|
+
it, add `close-on-select` only when no other `multiple` group shares the
|
|
2321
|
+
menu: the prop is menu-wide, so every multiple group would close too. With
|
|
2322
|
+
one there, make the entry a `clearable` single group of one row instead
|
|
2323
|
+
(a change closes the menu, a second click clears it); it reads as a radio
|
|
2324
|
+
item, the one cost.
|
|
2312
2325
|
- **A server-searched group needs `filterBy: false`.** The default local
|
|
2313
2326
|
match runs on the getter's answer too, so a row the server matched on a field
|
|
2314
2327
|
the menu doesn't show (an email, a fiscal code) is fetched and then hidden.
|
|
@@ -2469,12 +2482,12 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
2469
2482
|
|
|
2470
2483
|
- `activator` — scope: `BbDropdownActivatorSlotProps` `{ disabled?: boolean; empty: boolean; loading: boolean; open: boolean; placement: Placement \| "cursor"; props: BbDropdownActivatorProps }` — The element that triggers the dropdown to open. Spread `props` onto your trigger element.
|
|
2471
2484
|
- `default` — scope: `any` — Hosts `<BbDropdownGroup>` companions. They register their group with the dropdown and render nothing themselves.
|
|
2472
|
-
- `empty` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string
|
|
2485
|
+
- `empty` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string }` — Replaces the default "no data" placeholder row shown in a pipeline group that resolved to no items. Rendered once per empty group. A failed load is not empty: it keeps its own row (the error icon and `failedText`).
|
|
2473
2486
|
- `footer` — scope: `BbDropdownEdgeSlotProps` `{ disabled?: boolean; open: boolean; placement: Placement \| "cursor" }` — Pinned below the rows, outside their scroll, with a divider — for action buttons.
|
|
2474
2487
|
- `header` — scope: `BbDropdownEdgeSlotProps` `{ disabled?: boolean; open: boolean; placement: Placement \| "cursor" }` — Pinned above the rows, outside their scroll, with a divider — for a title or a filter field.
|
|
2475
2488
|
- `item:append` — scope: `BbDropdownItemSlotProps` `{ description?: string; disabled?: boolean; group: BbDropdownSlotGroup; groupTitle: boolean; level: number; index: number; item: InternalItem; loading: boolean; open: boolean; placement: Placement \| "cursor"; selected: boolean; label: string; activeLink?: boolean; exactActiveLink?: boolean }` — The trailing region of every row (and group title line), replacing its `append:icon`. A named slot wins over it; the submenu chevron and the check on a selected row take its place.
|
|
2476
2489
|
- `item:prepend` — scope: `BbDropdownItemSlotProps` `{ description?: string; disabled?: boolean; group: BbDropdownSlotGroup; groupTitle: boolean; level: number; index: number; item: InternalItem; loading: boolean; open: boolean; placement: Placement \| "cursor"; selected: boolean; label: string; activeLink?: boolean; exactActiveLink?: boolean }` — The leading region of every row (and group title line), replacing its `prepend:icon`. A row's own or its group's named slot wins over it.
|
|
2477
|
-
- `loading` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string
|
|
2490
|
+
- `loading` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string }` — Replaces the default loading placeholder row shown in a pipeline group while its async items load. Rendered once per loading group.
|
|
2478
2491
|
- `#<value>` (named from data) — scope: `BbDropdownItemSlotProps` — One row's content (label and description), by its value; in a fetched group, by its resolved `itemValue`. Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `activator`, `default`, `empty`, `footer`, `header`, `item`, `loading`.
|
|
2479
2492
|
- `#<value>:prepend` (named from data) — scope: `BbDropdownItemSlotProps` — One row's leading region; replaces its `prepend:icon`.
|
|
2480
2493
|
- `#<value>:append` (named from data) — scope: `BbDropdownItemSlotProps` — One row's trailing region; replaces its `append:icon` and its submenu chevron. The check takes its place on the selected row.
|
|
@@ -760,12 +760,12 @@ States are listed in precedence order: when two are on at once and their entries
|
|
|
760
760
|
- `append:icon` — scope: `BbButtonIconSlotProps` `{ activeLink: boolean; exactActiveLink: boolean; pressed: boolean; loading: boolean; disabled: boolean }` — The main button's trailing icon, replacing `append:icon`.
|
|
761
761
|
- `default` — scope: `any` — The main button's label (falls back to `text`).
|
|
762
762
|
- `dropdown` — scope: `any` — Menu companions, forwarded into the dropdown: a `<BbDropdownGroup>` binding a group of `items` by id. A `#dropdown` slot keeps the toggle even with no `items`.
|
|
763
|
-
- `empty` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string
|
|
763
|
+
- `empty` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string }` — Replaces the default "no data" placeholder row shown in a pipeline group that resolved to no items. Rendered once per empty group. Forwarded to the underlying `BbDropdown`.
|
|
764
764
|
- `footer` — scope: `BbDropdownButtonEdgeSlotProps` `{ disabled?: boolean; open: boolean; placement: Placement \| "cursor" }` — Content pinned to the bottom of the dropdown panel, outside the scroll area.
|
|
765
765
|
- `header` — scope: `BbDropdownButtonEdgeSlotProps` `{ disabled?: boolean; open: boolean; placement: Placement \| "cursor" }` — Content pinned to the top of the dropdown panel, outside the scroll area.
|
|
766
766
|
- `item:append` — scope: `BbDropdownButtonItemSlotProps` `{ disabled?: boolean; index: number; item: InternalItem; open: boolean; placement: Placement \| "cursor"; label: string }` — The trailing region of every menu row, replacing its `append:icon`; the submenu chevron and the check on a selected row take its place (BbDropdown's rules).
|
|
767
767
|
- `item:prepend` — scope: `BbDropdownButtonItemSlotProps` `{ disabled?: boolean; index: number; item: InternalItem; open: boolean; placement: Placement \| "cursor"; label: string }` — The leading region of every menu row, replacing its `prepend:icon` (BbDropdown's rules).
|
|
768
|
-
- `loading` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string
|
|
768
|
+
- `loading` — scope: `BbDropdownPlaceholderSlotProps` `{ groupId?: string; query: string; text: string }` — Replaces the default loading placeholder row shown in a pipeline group while its async items load. Rendered once per loading group. Forwarded to the underlying `BbDropdown`.
|
|
769
769
|
- `prepend:icon` — scope: `BbButtonIconSlotProps` `{ activeLink: boolean; exactActiveLink: boolean; pressed: boolean; loading: boolean; disabled: boolean }` — The main button's leading icon, replacing `prepend:icon` (the one `icon-only` shows); inside its `icon` part, with its states.
|
|
770
770
|
- `#<value>` (named from data) — scope: `BbDropdownItemSlotProps` — One row's content (label and description), by its value; in a fetched group, by its resolved `itemValue`. Reserved names (their slot is one of this component's own, so an item value or column key spelled like them is an error): `default`, `dropdown`, `empty`, `footer`, `header`, `item`, `loading`.
|
|
771
771
|
- `#<value>:prepend` (named from data) — scope: `BbDropdownItemSlotProps` — One row's leading region; replaces its `prepend:icon`.
|
package/dist/ai/BbForm.md
CHANGED
|
@@ -1154,6 +1154,9 @@ While it runs:
|
|
|
1154
1154
|
(`disable-auto-loading` opts out). A submit from code
|
|
1155
1155
|
(`useBbForm(id).submit()`) spins no submit button: the button whose
|
|
1156
1156
|
click calls it spins on its own, since its click returns the promise.
|
|
1157
|
+
- **Another submit is dropped**: Enter, a submit button or `submit()` while
|
|
1158
|
+
the save runs starts no second save and is not queued (`submit()` resolves
|
|
1159
|
+
`false`), with `disable-submit-lock` too.
|
|
1157
1160
|
- **A `BbDialog` / `BbOffCanvas` around the form refuses every user close**
|
|
1158
1161
|
(the ✕, Cancel's `close()`, `Escape`, the backdrop, a swipe) until the save
|
|
1159
1162
|
settles; code still closes it (`hide()`, the model). Its `prevent-close`
|
|
@@ -1988,7 +1991,7 @@ marker stays consistent with the rules.
|
|
|
1988
1991
|
|
|
1989
1992
|
## Slots
|
|
1990
1993
|
|
|
1991
|
-
- `default` — scope: `{
|
|
1994
|
+
- `default` — scope: `FormMeta<GenericObject> & { errors: Record<string, string[]>; fields: Record<string, BbFormFieldEntry>; isSubmitting: boolean; removeField: (path: string) => vo…` — The form's fields, with its state and actions in scope: the meta (`valid`, `dirty`…), `values`, `errors`, `fields`, `unmatchedErrors`, `isSubmitting`, `submitCount`, `validate`, `resetForm`, `setErrors`, `snapshot`, `removeField`.
|
|
1992
1995
|
|
|
1993
1996
|
## Exposed (template ref)
|
|
1994
1997
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
## Slots
|
|
22
22
|
|
|
23
|
-
- `default` — scope: `BbHoverCardPortalSlotProps
|
|
23
|
+
- `default` — scope: `BbHoverCardPortalSlotProps<any>` `{ data: P; close: () => void }` — The card's body. `data` is the directive's `data`; `close` closes the card.
|
|
24
24
|
|
|
25
25
|
## See Also
|
|
26
26
|
|
package/dist/ai/BbNumberInput.md
CHANGED
|
@@ -225,7 +225,8 @@ the safe-integer bounds, i.e. effectively unbounded). `maxPrecision` caps the nu
|
|
|
225
225
|
which is how you pin a field to whole numbers (`0`); for money set `currency`,
|
|
226
226
|
which brings its own decimals. Extra decimals are refused as typed, never
|
|
227
227
|
rounded: with `0`, a typed `,` or `.` stays until blur and the digits after it
|
|
228
|
-
are refused (`12,5` is 12).
|
|
228
|
+
are refused (`12,5` is 12). The cap is on typing only: a model set from code
|
|
229
|
+
with more decimals shows and posts all of them. `minPrecision` (default `0`) is
|
|
229
230
|
its twin: with `2` the field always shows two decimals (`1` shows `1,00`),
|
|
230
231
|
padding with zeros the user types over, while the model stays the number
|
|
231
232
|
(`1.5`).
|
|
@@ -379,7 +380,8 @@ const formattedSubtotal = computed(() =>
|
|
|
379
380
|
`currency="EUR"` (an ISO 4217 code) shows the amount the locale's way, symbol
|
|
380
381
|
included, inside the text: `1.234,56 €` in Italian, `$1,234.56` in English,
|
|
381
382
|
`CHF-1’234.56` in Swiss German. The decimals follow the currency (2 for EUR,
|
|
382
|
-
0 for JPY, 3 for KWD
|
|
383
|
+
0 for JPY and HUF, 3 for KWD, from a table the library ships, so every browser
|
|
384
|
+
agrees); `minPrecision` / `maxPrecision` win when you set them.
|
|
383
385
|
`unit="kilogram"` does the same for a measure (`20 kg`, any unit
|
|
384
386
|
`Intl.NumberFormat` knows); `unit="percent"` holds the number you see, so `15%`
|
|
385
387
|
is `15`, not `0.15`. Set one or the other; with both, `currency` wins. The
|
|
@@ -891,7 +893,7 @@ A `pt` value written in `<script>` (a constant, a preset, a wrapper's
|
|
|
891
893
|
| `layout` | `Responsive<FieldLayout> \| undefined` | | | How label and input sit together: `'vertical'`, `'horizontal'` (50/50), `'auto'`, `'label-fill'`, `'input-fill'`, a ratio like `'xx xxxxx'`, or a per-breakpoint map (`{ default: 'vertical', md: 'xx xxxxx' }`). |
|
|
892
894
|
| `loading` | `boolean \| undefined` | `false` | | Sets the component in a loading state, usually triggering some visual styles. |
|
|
893
895
|
| `max` | `number \| undefined` | `Number.MAX_SAFE_INTEGER` | | Maximum value cap. |
|
|
894
|
-
| `maxPrecision` | `number \| undefined` | `8` | | Maximum
|
|
896
|
+
| `maxPrecision` | `number \| undefined` | `8` | | Maximum fraction digits the user can TYPE (more are refused, never rounded); a model with more still shows them all. With `currency`, the currency's own digits (`2` EUR, `0` JPY and HUF, `3` KWD), or `minPrecision` when that is larger. |
|
|
895
897
|
| `min` | `number \| undefined` | `Number.MIN_SAFE_INTEGER` | | Minimum value cap. Applied on blur and on Enter (before a surrounding form submits), not while typing, so a value above a `min` greater than 1 can be typed digit by digit. |
|
|
896
898
|
| `minPrecision` | `number \| undefined` | `0` | | Fraction digits always shown (`2`: `1` shows `1,00`), also while typing, where the padding zeros are placeholders; the model stays the number. Above `maxPrecision` it gives way. Applies with `disableFormatting` too. With `currency`: the currency's own digits. |
|
|
897
899
|
| `modelValue` | `string \| number \| null \| undefined` | `null` | | Used by v-model. |
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
## Slots
|
|
22
22
|
|
|
23
|
-
- `default` — scope: `BbPopoverPortalSlotProps
|
|
23
|
+
- `default` — scope: `BbPopoverPortalSlotProps<any>` `{ data: P; close: () => void }` — The popover body. `data` is the directive's `data`; `close` closes the popover.
|
|
24
24
|
|
|
25
25
|
## See Also
|
|
26
26
|
|