bitboss-ui 3.0.0-beta.72 → 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 +34 -7
- 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 +17 -4
- package/dist/ai/BbDropdown.md +23 -10
- package/dist/ai/BbDropdownButton.md +2 -2
- package/dist/ai/BbForm.md +11 -7
- 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 +60 -4
- package/dist/ai/components.json +56 -20
- 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/components/use-confirm.md +4 -1
- 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/BbConfirm.removed.json +4 -4
- package/dist/ai/manifest/components/BbConfirmPortal.json +1 -1
- package/dist/ai/manifest/components/BbConfirmPortal.removed.json +2 -2
- 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/BbToast.removed.json +1 -1
- 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 +80 -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/deprecation/ai-deprecations.json.js +1 -1
- 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 +874 -136
- 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 +123 -3
- package/dist/utilities/functions/isEqual.js +69 -3
- package/dist/utils/versionCheck.js +1 -1
- package/dist/vite-plugin.d.ts +2 -1
- package/dist/vite.js +8 -5
- package/llms.txt +3 -1
- package/package.json +2 -3
- package/scripts/README.md +43 -43
- 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/helpers-add.mjs +21 -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 +153 -6
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// inertia-helpers/utils.ts
|
|
2
2
|
// micro-utilities the helpers share
|
|
3
|
-
import {
|
|
3
|
+
import { toRaw } from 'vue';
|
|
4
4
|
|
|
5
5
|
export const isNil = (value: unknown): value is null | undefined =>
|
|
6
6
|
value === null || value === undefined;
|
|
@@ -13,8 +13,557 @@ export const isEmpty = (value: unknown): boolean =>
|
|
|
13
13
|
|
|
14
14
|
export const noop = (): void => undefined;
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/*
|
|
17
|
+
* EXACT deep equality, the same as bitboss-ui's own. Never a hash: the
|
|
18
|
+
* object-code hash it replaced folded a number to int32 (2400 === 2400.5,
|
|
19
|
+
* 0.1 === 0.2), so a decimal-only change read as "unchanged".
|
|
20
|
+
*
|
|
21
|
+
* - Primitives: `Object.is` (NaN equals NaN, 0 and -0 differ).
|
|
22
|
+
* - Vue proxies are read raw; the same reference is equal.
|
|
23
|
+
* - Arrays by index; plain objects by own enumerable keys (order aside, a key
|
|
24
|
+
* holding `undefined` is still a key); Dates by time; Maps and Sets by content.
|
|
25
|
+
* - Files: the same file, or one with the same name, size, type and
|
|
26
|
+
* lastModified (a re-read of the same pick).
|
|
27
|
+
* - Class instances: the same constructor, then a primitive `valueOf()`
|
|
28
|
+
* (dayjs, Decimal …), else a custom `toString()` when there are no fields
|
|
29
|
+
* (URL, Temporal …), else their fields.
|
|
30
|
+
* - Cycles: a pair already being compared counts as equal.
|
|
31
|
+
*
|
|
32
|
+
* `hash` below agrees: equal values give the same key.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
type Seen = { xs: object[]; ys: object[] };
|
|
36
|
+
|
|
37
|
+
const isPlainProto = (proto: object | null) =>
|
|
38
|
+
proto === null || Object.getPrototypeOf(proto) === null;
|
|
39
|
+
|
|
40
|
+
export const isEqual = (a: unknown, b: unknown): boolean => equal(a, b, null);
|
|
41
|
+
|
|
42
|
+
const equal = (a: unknown, b: unknown, seen: Seen | null): boolean => {
|
|
43
|
+
if (Object.is(a, b)) return true;
|
|
44
|
+
if (
|
|
45
|
+
a === null ||
|
|
46
|
+
b === null ||
|
|
47
|
+
typeof a !== 'object' ||
|
|
48
|
+
typeof b !== 'object'
|
|
49
|
+
)
|
|
50
|
+
return false;
|
|
51
|
+
|
|
52
|
+
const x = toRaw(a);
|
|
53
|
+
const y = toRaw(b);
|
|
54
|
+
if (x === y) return true;
|
|
55
|
+
if (seen === null) seen = { xs: [], ys: [] };
|
|
56
|
+
const { xs, ys } = seen;
|
|
57
|
+
for (let i = 0; i < xs.length; i++)
|
|
58
|
+
if (xs[i] === x && ys[i] === y) return true;
|
|
59
|
+
xs.push(x);
|
|
60
|
+
ys.push(y);
|
|
61
|
+
try {
|
|
62
|
+
return equalObjects(x, y, seen);
|
|
63
|
+
} finally {
|
|
64
|
+
xs.pop();
|
|
65
|
+
ys.pop();
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const equalObjects = (x: object, y: object, seen: Seen): boolean => {
|
|
70
|
+
if (Array.isArray(x)) {
|
|
71
|
+
if (!Array.isArray(y) || x.length !== y.length) return false;
|
|
72
|
+
const other = y as unknown[];
|
|
73
|
+
for (let i = 0; i < x.length; i++)
|
|
74
|
+
if (!equal(x[i], other[i], seen)) return false;
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
if (Array.isArray(y)) return false;
|
|
78
|
+
|
|
79
|
+
const px = Object.getPrototypeOf(x) as object | null;
|
|
80
|
+
const py = Object.getPrototypeOf(y) as object | null;
|
|
81
|
+
const plainX = px === Object.prototype || px === null;
|
|
82
|
+
const plainY = py === Object.prototype || py === null;
|
|
83
|
+
if (plainX && plainY) return equalFields(x, y, seen);
|
|
84
|
+
if (plainX !== plainY || px !== py) {
|
|
85
|
+
// Plain objects from two realms (or a null-prototype one) still compare.
|
|
86
|
+
return isPlainProto(px) && isPlainProto(py)
|
|
87
|
+
? equalFields(x, y, seen)
|
|
88
|
+
: false;
|
|
89
|
+
}
|
|
90
|
+
// Same prototype from here on; a foreign realm's plain objects land here too.
|
|
91
|
+
if (isPlainProto(px)) return equalFields(x, y, seen);
|
|
92
|
+
|
|
93
|
+
if (x instanceof Date) return Object.is(x.getTime(), (y as Date).getTime());
|
|
94
|
+
if (x instanceof Map) return equalMaps(x, y as Map<unknown, unknown>, seen);
|
|
95
|
+
if (x instanceof Set) return equalSets(x, y as Set<unknown>, seen);
|
|
96
|
+
if (typeof Blob !== 'undefined' && x instanceof Blob) {
|
|
97
|
+
const f = x as File;
|
|
98
|
+
const g = y as File;
|
|
99
|
+
return (
|
|
100
|
+
f.name === g.name &&
|
|
101
|
+
f.size === g.size &&
|
|
102
|
+
f.type === g.type &&
|
|
103
|
+
f.lastModified === g.lastModified
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const p = primitiveValueOf(x);
|
|
108
|
+
if (p) {
|
|
109
|
+
const q = primitiveValueOf(y);
|
|
110
|
+
return !!q && Object.is(p.value, q.value);
|
|
111
|
+
}
|
|
112
|
+
if (Object.keys(x).length === 0 && Object.keys(y).length === 0) {
|
|
113
|
+
const text = customText(x);
|
|
114
|
+
if (text !== undefined) return text === customText(y);
|
|
115
|
+
}
|
|
116
|
+
return equalFields(x, y, seen);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
const equalFields = (x: object, y: object, seen: Seen) => {
|
|
120
|
+
const keys = Object.keys(x);
|
|
121
|
+
if (keys.length !== Object.keys(y).length) return false;
|
|
122
|
+
for (const key of keys) {
|
|
123
|
+
if (!Object.prototype.hasOwnProperty.call(y, key)) return false;
|
|
124
|
+
if (
|
|
125
|
+
!equal(
|
|
126
|
+
(x as Record<string, unknown>)[key],
|
|
127
|
+
(y as Record<string, unknown>)[key],
|
|
128
|
+
seen
|
|
129
|
+
)
|
|
130
|
+
)
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
return true;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const equalMaps = (
|
|
137
|
+
x: Map<unknown, unknown>,
|
|
138
|
+
y: Map<unknown, unknown>,
|
|
139
|
+
seen: Seen
|
|
140
|
+
) => {
|
|
141
|
+
if (x.size !== y.size) return false;
|
|
142
|
+
const unmatched = [...y.entries()];
|
|
143
|
+
for (const [key, value] of x) {
|
|
144
|
+
const at = y.has(key)
|
|
145
|
+
? unmatched.findIndex(([k]) => k === key || Object.is(k, key))
|
|
146
|
+
: unmatched.findIndex(([k]) => equal(k, key, seen));
|
|
147
|
+
const match = at === -1 ? undefined : unmatched[at];
|
|
148
|
+
if (!match || !equal(value, match[1], seen)) return false;
|
|
149
|
+
unmatched.splice(at, 1);
|
|
150
|
+
}
|
|
151
|
+
return true;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
const equalSets = (x: Set<unknown>, y: Set<unknown>, seen: Seen) => {
|
|
155
|
+
if (x.size !== y.size) return false;
|
|
156
|
+
const unmatched = [...y];
|
|
157
|
+
for (const member of x) {
|
|
158
|
+
const at = y.has(member)
|
|
159
|
+
? unmatched.findIndex((m) => m === member || Object.is(m, member))
|
|
160
|
+
: unmatched.findIndex((m) => equal(m, member, seen));
|
|
161
|
+
if (at === -1) return false;
|
|
162
|
+
unmatched.splice(at, 1);
|
|
163
|
+
}
|
|
164
|
+
return true;
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
/*
|
|
168
|
+
* A key for any value, the same as bitboss-ui's own: a 96-bit digest of an
|
|
169
|
+
* EXACT encoding (numbers by their IEEE-754 bits, strings by length + text,
|
|
170
|
+
* objects by sorted own keys, Maps and Sets by sorted content, Dates by time,
|
|
171
|
+
* Files by name/size/type/lastModified, value objects by `valueOf()`).
|
|
172
|
+
* Numbers, booleans, null and short id-safe strings are spelled out exactly.
|
|
173
|
+
* Equal values (by `isEqual`) give the same key; useHasChanged keeps one as
|
|
174
|
+
* its baseline.
|
|
175
|
+
*/
|
|
176
|
+
|
|
177
|
+
// Structural tags of the word stream. The encoding is prefix-free: a tag
|
|
178
|
+
// fixes how its payload words are counted (numbers are two words, strings
|
|
179
|
+
// are length-prefixed, arrays/objects/maps/sets are count-prefixed), so two
|
|
180
|
+
// different values can only key alike through the 96-bit finish.
|
|
181
|
+
const T_UNDEFINED = 0x100;
|
|
182
|
+
const T_NULL = 0x101;
|
|
183
|
+
const T_TRUE = 0x102;
|
|
184
|
+
const T_FALSE = 0x103;
|
|
185
|
+
const T_NUMBER = 0x104;
|
|
186
|
+
const T_BIGINT = 0x105;
|
|
187
|
+
const T_STRING = 0x106;
|
|
188
|
+
const T_SYMBOL = 0x107;
|
|
189
|
+
const T_FUNCTION = 0x108;
|
|
190
|
+
const T_ARRAY = 0x109;
|
|
191
|
+
const T_DATE = 0x10a;
|
|
192
|
+
const T_MAP = 0x10b;
|
|
193
|
+
const T_SET = 0x10c;
|
|
194
|
+
const T_BLOB = 0x10d;
|
|
195
|
+
const T_OBJECT = 0x10e;
|
|
196
|
+
const T_CLASS = 0x10f;
|
|
197
|
+
const T_CYCLE = 0x110;
|
|
198
|
+
const T_VALUE_OF = 0x111;
|
|
199
|
+
const T_TO_STRING = 0x112;
|
|
200
|
+
const T_ENTRY = 0x113;
|
|
201
|
+
|
|
202
|
+
type Lanes = [number, number, number, number];
|
|
203
|
+
|
|
204
|
+
const start = (): Lanes => [
|
|
205
|
+
0x243f6a88 | 0,
|
|
206
|
+
0x85a308d3 | 0,
|
|
207
|
+
0x13198a2e | 0,
|
|
208
|
+
0x03707344 | 0,
|
|
209
|
+
];
|
|
210
|
+
|
|
211
|
+
const mix = (s: Lanes, w: number) => {
|
|
212
|
+
s[0] = Math.imul(s[0] ^ w, 2654435761);
|
|
213
|
+
s[0] = (s[0] << 13) | (s[0] >>> 19);
|
|
214
|
+
s[1] = Math.imul(s[1] ^ w, 1597334677);
|
|
215
|
+
s[1] = (s[1] << 17) | (s[1] >>> 15);
|
|
216
|
+
s[2] = Math.imul(s[2] ^ w, 2246822519);
|
|
217
|
+
s[2] = (s[2] << 19) | (s[2] >>> 13);
|
|
218
|
+
s[3] = Math.imul(s[3] ^ w, 3266489917);
|
|
219
|
+
s[3] = (s[3] << 23) | (s[3] >>> 9);
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
const mix2 = (s: Lanes, w1: number, w2: number) => {
|
|
223
|
+
let a = s[0];
|
|
224
|
+
let b = s[1];
|
|
225
|
+
let c = s[2];
|
|
226
|
+
let d = s[3];
|
|
227
|
+
a = Math.imul(a ^ w1, 2654435761);
|
|
228
|
+
a = (a << 13) | (a >>> 19);
|
|
229
|
+
b = Math.imul(b ^ w1, 1597334677);
|
|
230
|
+
b = (b << 17) | (b >>> 15);
|
|
231
|
+
c = Math.imul(c ^ w1, 2246822519);
|
|
232
|
+
c = (c << 19) | (c >>> 13);
|
|
233
|
+
d = Math.imul(d ^ w1, 3266489917);
|
|
234
|
+
d = (d << 23) | (d >>> 9);
|
|
235
|
+
a = Math.imul(a ^ w2, 2654435761);
|
|
236
|
+
a = (a << 13) | (a >>> 19);
|
|
237
|
+
b = Math.imul(b ^ w2, 1597334677);
|
|
238
|
+
b = (b << 17) | (b >>> 15);
|
|
239
|
+
c = Math.imul(c ^ w2, 2246822519);
|
|
240
|
+
c = (c << 19) | (c >>> 13);
|
|
241
|
+
d = Math.imul(d ^ w2, 3266489917);
|
|
242
|
+
d = (d << 23) | (d >>> 9);
|
|
243
|
+
s[0] = a;
|
|
244
|
+
s[1] = b;
|
|
245
|
+
s[2] = c;
|
|
246
|
+
s[3] = d;
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
// Packed string feed: two UTF-16 units per word. `head` is a word mixed
|
|
250
|
+
// before the length (a type tag) or -1 to mix the length only (object keys).
|
|
251
|
+
const mixString = (s: Lanes, head: number, text: string) => {
|
|
252
|
+
let a = s[0];
|
|
253
|
+
let b = s[1];
|
|
254
|
+
let c = s[2];
|
|
255
|
+
let d = s[3];
|
|
256
|
+
if (head !== -1) {
|
|
257
|
+
a = Math.imul(a ^ head, 2654435761);
|
|
258
|
+
a = (a << 13) | (a >>> 19);
|
|
259
|
+
b = Math.imul(b ^ head, 1597334677);
|
|
260
|
+
b = (b << 17) | (b >>> 15);
|
|
261
|
+
c = Math.imul(c ^ head, 2246822519);
|
|
262
|
+
c = (c << 19) | (c >>> 13);
|
|
263
|
+
d = Math.imul(d ^ head, 3266489917);
|
|
264
|
+
d = (d << 23) | (d >>> 9);
|
|
265
|
+
}
|
|
266
|
+
const n = text.length;
|
|
267
|
+
a = Math.imul(a ^ n, 2654435761);
|
|
268
|
+
a = (a << 13) | (a >>> 19);
|
|
269
|
+
b = Math.imul(b ^ n, 1597334677);
|
|
270
|
+
b = (b << 17) | (b >>> 15);
|
|
271
|
+
c = Math.imul(c ^ n, 2246822519);
|
|
272
|
+
c = (c << 19) | (c >>> 13);
|
|
273
|
+
d = Math.imul(d ^ n, 3266489917);
|
|
274
|
+
d = (d << 23) | (d >>> 9);
|
|
275
|
+
let i = 0;
|
|
276
|
+
for (; i + 1 < n; i += 2) {
|
|
277
|
+
const w = text.charCodeAt(i) | (text.charCodeAt(i + 1) << 16);
|
|
278
|
+
a = Math.imul(a ^ w, 2654435761);
|
|
279
|
+
a = (a << 13) | (a >>> 19);
|
|
280
|
+
b = Math.imul(b ^ w, 1597334677);
|
|
281
|
+
b = (b << 17) | (b >>> 15);
|
|
282
|
+
c = Math.imul(c ^ w, 2246822519);
|
|
283
|
+
c = (c << 19) | (c >>> 13);
|
|
284
|
+
d = Math.imul(d ^ w, 3266489917);
|
|
285
|
+
d = (d << 23) | (d >>> 9);
|
|
286
|
+
}
|
|
287
|
+
if (i < n) {
|
|
288
|
+
const w = text.charCodeAt(i);
|
|
289
|
+
a = Math.imul(a ^ w, 2654435761);
|
|
290
|
+
a = (a << 13) | (a >>> 19);
|
|
291
|
+
b = Math.imul(b ^ w, 1597334677);
|
|
292
|
+
b = (b << 17) | (b >>> 15);
|
|
293
|
+
c = Math.imul(c ^ w, 2246822519);
|
|
294
|
+
c = (c << 19) | (c >>> 13);
|
|
295
|
+
d = Math.imul(d ^ w, 3266489917);
|
|
296
|
+
d = (d << 23) | (d >>> 9);
|
|
297
|
+
}
|
|
298
|
+
s[0] = a;
|
|
299
|
+
s[1] = b;
|
|
300
|
+
s[2] = c;
|
|
301
|
+
s[3] = d;
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
// A double by its bit pattern: exact for every finite/infinite value, -0
|
|
305
|
+
// apart from 0 as `Object.is` has it, every NaN payload mapped to one
|
|
306
|
+
// canonical pattern (Object.is(NaN, NaN)). The words are read
|
|
307
|
+
// little-endian whatever the host, so server and client agree.
|
|
308
|
+
const bits = new DataView(new ArrayBuffer(8));
|
|
309
|
+
const lowWord = (n: number) => {
|
|
310
|
+
bits.setFloat64(0, n, true);
|
|
311
|
+
return bits.getUint32(0, true);
|
|
312
|
+
};
|
|
313
|
+
/** The high word of the double `lowWord` last read. */
|
|
314
|
+
const highWord = () => bits.getUint32(4, true);
|
|
315
|
+
|
|
316
|
+
const mixNumber = (s: Lanes, n: number) => {
|
|
317
|
+
if (n !== n) return mix2(s, 0, 0x7ff80000);
|
|
318
|
+
const lo = lowWord(n);
|
|
319
|
+
return mix2(s, lo | 0, highWord() | 0);
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
const fmix32 = (h: number) => {
|
|
323
|
+
h ^= h >>> 16;
|
|
324
|
+
h = Math.imul(h, 0x85ebca6b);
|
|
325
|
+
h ^= h >>> 13;
|
|
326
|
+
h = Math.imul(h, 0xc2b2ae35);
|
|
327
|
+
h ^= h >>> 16;
|
|
328
|
+
return h >>> 0;
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
// 96 bits out: three lanes, each cross-folded with a neighbour so no lane's
|
|
332
|
+
// state reaches the key unmixed with the others.
|
|
333
|
+
const finishWords = (s: Lanes): [number, number, number] => [
|
|
334
|
+
fmix32(s[0] ^ s[3]),
|
|
335
|
+
fmix32(s[1] ^ s[0]),
|
|
336
|
+
fmix32(s[2] ^ s[1]),
|
|
337
|
+
];
|
|
338
|
+
|
|
339
|
+
/** A 32-bit word as 8 hex digits. */
|
|
340
|
+
const hexWord = (w: number) => (w >>> 0).toString(16).padStart(8, '0');
|
|
341
|
+
|
|
342
|
+
/** A primitive `valueOf()` of a value object (dayjs, Decimal …), else `undefined`. */
|
|
343
|
+
const primitiveValueOf = (o: object): { value: unknown } | undefined => {
|
|
344
|
+
const valueOf = (o as { valueOf?: unknown }).valueOf;
|
|
345
|
+
if (typeof valueOf !== 'function' || valueOf === Object.prototype.valueOf)
|
|
346
|
+
return undefined;
|
|
347
|
+
try {
|
|
348
|
+
const value = valueOf.call(o);
|
|
349
|
+
if (value !== o && (value === null || typeof value !== 'object'))
|
|
350
|
+
return { value };
|
|
351
|
+
} catch {
|
|
352
|
+
// Temporal and friends throw on valueOf: fall through.
|
|
353
|
+
}
|
|
354
|
+
return undefined;
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
/** `o`'s text through a custom `toString` (URL, Temporal …), else `undefined`. */
|
|
358
|
+
const customText = (o: object): string | undefined => {
|
|
359
|
+
const toString = (o as { toString?: unknown }).toString;
|
|
360
|
+
return typeof toString === 'function' &&
|
|
361
|
+
toString !== Object.prototype.toString
|
|
362
|
+
? (toString as (this: object) => string).call(o)
|
|
363
|
+
: undefined;
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
const encode = (s: Lanes, value: unknown, stack: object[]): void => {
|
|
367
|
+
switch (typeof value) {
|
|
368
|
+
case 'undefined':
|
|
369
|
+
return mix(s, T_UNDEFINED);
|
|
370
|
+
case 'boolean':
|
|
371
|
+
return mix(s, value ? T_TRUE : T_FALSE);
|
|
372
|
+
case 'number':
|
|
373
|
+
mix(s, T_NUMBER);
|
|
374
|
+
return mixNumber(s, value);
|
|
375
|
+
case 'bigint':
|
|
376
|
+
return mixString(s, T_BIGINT, String(value));
|
|
377
|
+
case 'string':
|
|
378
|
+
return mixString(s, T_STRING, value);
|
|
379
|
+
case 'symbol':
|
|
380
|
+
return mixString(s, T_SYMBOL, String(value.description));
|
|
381
|
+
case 'function':
|
|
382
|
+
// By source text, as before: two closures of one factory key alike.
|
|
383
|
+
return mixString(s, T_FUNCTION, String(value));
|
|
384
|
+
}
|
|
385
|
+
if (value === null) return mix(s, T_NULL);
|
|
386
|
+
|
|
387
|
+
const o = toRaw(value as object);
|
|
388
|
+
const depth = stack.indexOf(o);
|
|
389
|
+
if (depth !== -1) return mix2(s, T_CYCLE, depth);
|
|
390
|
+
stack.push(o);
|
|
391
|
+
try {
|
|
392
|
+
encodeObject(s, o, stack);
|
|
393
|
+
} finally {
|
|
394
|
+
stack.pop();
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
const encodeFields = (s: Lanes, o: object, stack: object[]) => {
|
|
399
|
+
const keys = Object.keys(o).sort();
|
|
400
|
+
mix(s, keys.length);
|
|
401
|
+
for (const key of keys) {
|
|
402
|
+
mixString(s, -1, key);
|
|
403
|
+
encode(s, (o as Record<string, unknown>)[key], stack);
|
|
404
|
+
}
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
// Map/Set members are digested apart and mixed back in sorted order, so
|
|
408
|
+
// iteration order cannot change the key.
|
|
409
|
+
const compareWords = (
|
|
410
|
+
a: [number, number, number],
|
|
411
|
+
b: [number, number, number]
|
|
412
|
+
) =>
|
|
413
|
+
a[0] !== b[0]
|
|
414
|
+
? a[0] < b[0]
|
|
415
|
+
? -1
|
|
416
|
+
: 1
|
|
417
|
+
: a[1] !== b[1]
|
|
418
|
+
? a[1] < b[1]
|
|
419
|
+
? -1
|
|
420
|
+
: 1
|
|
421
|
+
: a[2] < b[2]
|
|
422
|
+
? -1
|
|
423
|
+
: a[2] > b[2]
|
|
424
|
+
? 1
|
|
425
|
+
: 0;
|
|
426
|
+
|
|
427
|
+
const mixSortedDigests = (
|
|
428
|
+
s: Lanes,
|
|
429
|
+
digests: Array<[number, number, number]>
|
|
430
|
+
) => {
|
|
431
|
+
digests.sort(compareWords);
|
|
432
|
+
for (const d of digests) {
|
|
433
|
+
mix(s, d[0] | 0);
|
|
434
|
+
mix2(s, d[1] | 0, d[2] | 0);
|
|
435
|
+
}
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
const encodeObject = (s: Lanes, o: object, stack: object[]) => {
|
|
439
|
+
if (Array.isArray(o)) {
|
|
440
|
+
mix2(s, T_ARRAY, o.length);
|
|
441
|
+
for (const item of o) encode(s, item, stack);
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
const proto = Object.getPrototypeOf(o);
|
|
445
|
+
if (proto === Object.prototype || proto === null) {
|
|
446
|
+
mix(s, T_OBJECT);
|
|
447
|
+
return encodeFields(s, o, stack);
|
|
448
|
+
}
|
|
449
|
+
if (o instanceof Date) {
|
|
450
|
+
mix(s, T_DATE);
|
|
451
|
+
return mixNumber(s, o.getTime());
|
|
452
|
+
}
|
|
453
|
+
if (o instanceof Map) {
|
|
454
|
+
mix2(s, T_MAP, o.size);
|
|
455
|
+
const digests: Array<[number, number, number]> = [];
|
|
456
|
+
for (const [k, v] of o) {
|
|
457
|
+
const sub = start();
|
|
458
|
+
mix(sub, T_ENTRY);
|
|
459
|
+
encode(sub, k, stack);
|
|
460
|
+
encode(sub, v, stack);
|
|
461
|
+
digests.push(finishWords(sub));
|
|
462
|
+
}
|
|
463
|
+
return mixSortedDigests(s, digests);
|
|
464
|
+
}
|
|
465
|
+
if (o instanceof Set) {
|
|
466
|
+
mix2(s, T_SET, o.size);
|
|
467
|
+
const digests: Array<[number, number, number]> = [];
|
|
468
|
+
for (const member of o) {
|
|
469
|
+
const sub = start();
|
|
470
|
+
encode(sub, member, stack);
|
|
471
|
+
digests.push(finishWords(sub));
|
|
472
|
+
}
|
|
473
|
+
return mixSortedDigests(s, digests);
|
|
474
|
+
}
|
|
475
|
+
if (typeof Blob !== 'undefined' && o instanceof Blob) {
|
|
476
|
+
mix(s, T_BLOB);
|
|
477
|
+
encode(s, (o as File).name ?? null, stack);
|
|
478
|
+
encode(s, o.size, stack);
|
|
479
|
+
encode(s, o.type, stack);
|
|
480
|
+
encode(s, (o as File).lastModified ?? null, stack);
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
if (isPlainProto(proto)) {
|
|
484
|
+
// A plain object from another realm.
|
|
485
|
+
mix(s, T_OBJECT);
|
|
486
|
+
return encodeFields(s, o, stack);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
// A class instance: its constructor's name, then its value.
|
|
490
|
+
mix(s, T_CLASS);
|
|
491
|
+
mixString(s, -1, String(o.constructor?.name ?? ''));
|
|
492
|
+
const primitive = primitiveValueOf(o);
|
|
493
|
+
if (primitive) {
|
|
494
|
+
mix(s, T_VALUE_OF);
|
|
495
|
+
return encode(s, primitive.value, stack);
|
|
496
|
+
}
|
|
497
|
+
const text = Object.keys(o).length === 0 ? customText(o) : undefined;
|
|
498
|
+
if (text !== undefined) {
|
|
499
|
+
mix(s, T_TO_STRING);
|
|
500
|
+
return encode(s, text, stack);
|
|
501
|
+
}
|
|
502
|
+
return encodeFields(s, o, stack);
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
const digestOf = (value: unknown) => {
|
|
506
|
+
const s = start();
|
|
507
|
+
encode(s, value, []);
|
|
508
|
+
const words = finishWords(s);
|
|
509
|
+
return hexWord(words[0]) + hexWord(words[1]) + hexWord(words[2]);
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
// A short string of id characters is its own key (`s` + the text).
|
|
513
|
+
const isShortIdSafe = (text: string) => {
|
|
514
|
+
if (text.length > 64) return false;
|
|
515
|
+
for (let i = 0; i < text.length; i++) {
|
|
516
|
+
const c = text.charCodeAt(i);
|
|
517
|
+
if (
|
|
518
|
+
!(
|
|
519
|
+
(c >= 48 && c <= 57) ||
|
|
520
|
+
(c >= 65 && c <= 90) ||
|
|
521
|
+
(c >= 97 && c <= 122) ||
|
|
522
|
+
c === 95 ||
|
|
523
|
+
c === 45
|
|
524
|
+
)
|
|
525
|
+
)
|
|
526
|
+
return false;
|
|
527
|
+
}
|
|
528
|
+
return true;
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
// A number's key: a safe integer spelled out (`42`, `m7` for -7), anything
|
|
532
|
+
// else (decimals, ±Infinity, NaN, -0, huge integers) as `x` + its 64 IEEE-754
|
|
533
|
+
// bits in hex, high word first, NaN canonical. Both forms are exact, and no
|
|
534
|
+
// `String(n)` runs for a decimal (the costly part of a decimal key).
|
|
535
|
+
const numberKey = (n: number) => {
|
|
536
|
+
if (Number.isSafeInteger(n) && !Object.is(n, -0))
|
|
537
|
+
return n >= 0 ? String(n) : `m${String(-n)}`;
|
|
538
|
+
if (n !== n) return 'x7ff8000000000000';
|
|
539
|
+
const lo = lowWord(n);
|
|
540
|
+
return `x${hexWord(highWord())}${hexWord(lo)}`;
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* The key of `value`: `prefix` + a type tag + the value itself for numbers,
|
|
545
|
+
* booleans, null, undefined, bigints and short id-safe strings (exact, so
|
|
546
|
+
* those never collide); + `h` and a 96-bit digest of the exact encoding for
|
|
547
|
+
* everything else.
|
|
548
|
+
*/
|
|
549
|
+
export const hash = (value: unknown, prefix = 'bb'): string => {
|
|
550
|
+
switch (typeof value) {
|
|
551
|
+
case 'number':
|
|
552
|
+
return `${prefix}n${numberKey(value)}`;
|
|
553
|
+
case 'boolean':
|
|
554
|
+
return `${prefix}${value ? 't' : 'f'}`;
|
|
555
|
+
case 'undefined':
|
|
556
|
+
return `${prefix}u`;
|
|
557
|
+
case 'bigint':
|
|
558
|
+
return `${prefix}g${String(value).replace('-', 'm')}`;
|
|
559
|
+
case 'string':
|
|
560
|
+
if (isShortIdSafe(value)) return `${prefix}s${value}`;
|
|
561
|
+
break;
|
|
562
|
+
default:
|
|
563
|
+
if (value === null) return `${prefix}z`;
|
|
564
|
+
}
|
|
565
|
+
return `${prefix}h${digestOf(value)}`;
|
|
566
|
+
};
|
|
18
567
|
|
|
19
568
|
export const isPlainObject = (
|
|
20
569
|
value: unknown
|
package/dist/ai/index.md
CHANGED
|
@@ -263,6 +263,7 @@ Do not use these components directly in consumer code unless the user explicitly
|
|
|
263
263
|
- [Passthrough (pt)](./guides/passthrough.md) - Reach a named part of a component — its icon, its field box, a table row, a menu entry — with a class list, a style or an attribute, optionally only while a named state is on. One grammar for every component, typed and linted. A pt value typed in <script> (a const, a preset, a wrapper's prop, a split components map) uses <Component>Props['pt'] and satisfies BbComponentsMap; the Pt* types are not exported.
|
|
264
264
|
- [Porting forms from Element Plus, Naive UI and Ant Design Vue (async-validator `rules`)](./guides/migration/from-async-validator.md) - Port an `el-form` / `n-form` / `a-form` with a `rules` object (async-validator `FormItemRule`s) to BbForm. Every rule field mapped to a string rule AND a Zod schema (Valibot, Yup noted), `validator` / `asyncValidator` callbacks to return values, `trigger` to `validationMode`, every form and form-item prop and instance method (`validate`, `validateField`, `resetFields`, `clearValidate`, `scrollToField`, `restoreValidation`, `useForm` / `validateInfos`), three complete before/after forms, and what does not port.
|
|
265
265
|
- [Preset Components](./guides/preset-components.md) - Make an app component that is a bitboss-ui component with some props and slots already set (a CustomerSelect, a SearchInput) in one definePreset call, with no SFC, no re-emit and a typed v-model.
|
|
266
|
+
- [Reporting to the maintainers](./guides/reporting.md) - When you work around bitboss-ui or hit a bug, friction, glue, smell, missing feature or docs gap, report it and keep your workaround — the six kinds, `npx bitboss-ui report`, the MCP `report_issue` tool, and a curl one-liner.
|
|
266
267
|
- [SSR prefill](./guides/ssr-prefill.md) - Item providers run on the server only with an SSR-state adapter (bitboss-ui/nuxt installs one).
|
|
267
268
|
- [TypeScript and Generic Components](./guides/typescript-generic-components.md) - Which bitboss-ui components are generic, and the four places their type differs from a regular component — template refs (InstanceType), Storybook Meta, test-utils findComponent, and v-model write-backs vue-tsc never checks.
|
|
268
269
|
- [Validated Forms (vee-validate)](./guides/validated-forms.md) - Forms with validation — the form controls join a BbForm (vee-validate underneath). Validate with one schema for the whole form (any Standard Schema — Zod, Valibot, ArkType, Yup — on BbForm's `schema`, no adapter) or with per-field `rules="required|email"` strings; BbForm hosts the form, focuses the first invalid field on a failed submit and emits `invalid`; requiredAsterisk marks required fields.
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
{"class":"bb-alert","tag":"div","part":"root","reads":["--bg","--border-color","--elev","--fg"]},
|
|
67
67
|
{"class":"bb-alert__icon","tag":"BbIcon","part":"icon","reads":["--fg"]},
|
|
68
68
|
{"class":"bb-alert__title","tag":"div","part":"title","reads":["--close-size","--fg","--gap","--title-lh","--title-size"]},
|
|
69
|
-
{"class":"bb-alert__text","tag":"div","part":"text","reads":["--fg-muted","--text-lh","--text-size"]},
|
|
69
|
+
{"class":"bb-alert__text","tag":"div","part":"text","reads":["--close-size","--fg-muted","--gap","--text-lh","--text-size"]},
|
|
70
70
|
{"class":"bb-alert__close","tag":"ClearableButton","part":"close","reads":["--close-size","--fg","--fg-muted","--hit","--py","--right-p","--title-lh","--top-p"]},
|
|
71
71
|
{"class":"bb-alert--destructive","state":"destructive","pattern":true},
|
|
72
72
|
{"class":"bb-alert--outline","state":"outline","pattern":true},
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
{"name":"floating","type":"boolean","default":"false","description":"Emit plain calendar strings instead of zoned ISO instants. Implied (and forced) by `type=\"week\"`, `type=\"month\"` and `type=\"year\"`."},
|
|
16
16
|
{"name":"max","type":"string","description":"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."},
|
|
17
17
|
{"name":"min","type":"string","description":"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."},
|
|
18
|
-
{"name":"modelValue","type":"string | string[] | null","
|
|
18
|
+
{"name":"modelValue","type":"string | string[] | null","description":"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`)."},
|
|
19
19
|
{"name":"multiple","type":"boolean","description":"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\"`.","default":"false"},
|
|
20
20
|
{"name":"numberOfMonths","type":"number","default":"1","description":"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."},
|
|
21
21
|
{"name":"pt","type":"(PtCompoundOf<\"\", { readonly parts: readonly [\"root\", \"header\", \"arrow\", \"month\", \"year\", \"cellColumnHeader\", \"week\", \"weekNumber\", \"day\", \"dayButton\", \"monthItem\", \"yearItem\", \"item\"]; readonly states: readonly [\"outside\", \"today\", \"inRange\", \"selected\", \"rangeStart\", \"rangeEnd\", \"disabled\", \"active\", \"highlighted\"]; readonly wide: readonly [\"disabled\"]; readonly node: { readonly week: readonly [\"inRange\", \"selected\", \"rangeStart\", \"rangeEnd\"]; readonly weekNumber: readonly [\"inRange\", \"selected\", \"rangeStart\", \"rangeEnd\"]; readonly day: readonly [\"outside\", \"today\", \"inRange\", \"selected\", \"rangeStart\", \"rangeEnd\", \"highlighted\"]; readonly dayButton: readonly [\"outside\", \"today\", \"inRange\", \"selected\", \"rangeStart\", \"rangeEnd\", \"highlighted\"]; readonly monthItem: readonly [\"inRange\", \"selected\", \"rangeStart\", \"rangeEnd\", \"highlighted\"]; readonly yearItem: readonly [\"inRange\", \"selected\", \"rangeStart\", \"rangeEnd\", \"highlighted\"]; readonly month: readonly [\"active\"]; readonly year: readonly [\"active\"]; readonly item: readonly [\"selected\"]; }; }> & { header?: PtValue | undefined; root?: PtValue | undefined; \"header:disabled\"?: PtValue | undefined; \"root:disabled\"?: PtValue | undefined; item?: PtValue | undefined; \"item:disabled\"?: PtValue | undefined; arrow?: PtValue | undefined; month?: PtValue | undefined; year?: PtValue | undefined; cellColumnHeader?: PtValue | undefined; week?: PtValue | undefined; weekNumber?: PtValue | undefined; day?: PtValue | undefined; dayButton?: PtValue | undefined; monthItem?: PtValue | undefined; yearItem?: PtValue | undefined; \"arrow:disabled\"?: PtValue | undefined; \"month:disabled\"?: PtValue | undefined; \"year:disabled\"?: PtValue | undefined; \"cellColumnHeader:disabled\"?: PtValue | undefined; \"week:disabled\"?: PtValue | undefined; \"weekNumber:disabled\"?: PtValue | undefined; \"day:disabled\"?: PtValue | undefined; \"dayButton:disabled\"?: PtValue | undefined; \"monthItem:disabled\"?: PtValue | undefined; \"yearItem:disabled\"?: PtValue | undefined; \"item:selected\"?: PtValue | undefined; \"month:active\"?: PtValue | undefined; \"year:active\"?: PtValue | undefined; \"week:inRange\"?: PtValue | undefined; \"week:selected\"?: PtValue | undefined; \"week:rangeStart\"?: PtValue | undefined; \"week:rangeEnd\"?: PtValue | undefined; \"weekNumber:inRange\"?: PtValue | undefined; \"weekNumber:selected\"?: PtValue | undefined; \"weekNumber:rangeStart\"?: PtValue | undefined; \"weekNumber:rangeEnd\"?: PtValue | undefined; \"day:outside\"?: PtValue | undefined; \"day:today\"?: PtValue | undefined; \"day:inRange\"?: PtValue | undefined; \"day:selected\"?: PtValue | undefined; \"day:rangeStart\"?: PtValue | undefined; \"day:rangeEnd\"?: PtValue | undefined; \"day:highlighted\"?: PtValue | undefined; \"dayButton:outside\"?: PtValue | undefined; \"dayButton:today\"?: PtValue | undefined; \"dayButton:inRange\"?: PtValue | undefined; \"dayButton:selected\"?: PtValue | undefined; \"dayButton:rangeStart\"?: PtValue | undefined; \"dayButton:rangeEnd\"?: PtValue | undefined; \"dayButton:highlighted\"?: PtValue | undefined; \"monthItem:inRange\"?: PtValue | undefined; \"monthItem:selected\"?: PtValue | undefined; \"monthItem:rangeStart\"?: PtValue | undefined; \"monthItem:rangeEnd\"?: PtValue | undefined; \"monthItem:highlighted\"?: PtValue | undefined; \"yearItem:inRange\"?: PtValue | undefined; \"yearItem:selected\"?: PtValue | undefined; \"yearItem:rangeStart\"?: PtValue | undefined; \"yearItem:rangeEnd\"?: PtValue | undefined; \"yearItem:highlighted\"?: PtValue | undefined; })","description":"Passthrough, object form: the same keys as the `pt:*` attributes without the prefix. See the `pt:<part>` row."},
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"exposed": [],
|
|
45
45
|
"models": [
|
|
46
46
|
{"name":"activeSegment","type":"BbCalendarSegment | undefined"},
|
|
47
|
-
{"name":"modelValue","type":"string | string[] | null"},
|
|
47
|
+
{"name":"modelValue","type":"string | string[] | null | undefined"},
|
|
48
48
|
{"name":"time","type":"string | string[] | null | undefined"}
|
|
49
49
|
],
|
|
50
50
|
"pt": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
{"name":"eager","type":"boolean","default":"false","description":"Renders the palette panel at mount instead of on the first open (the phone sheet's too)."},
|
|
18
18
|
{"name":"eyeDropper","type":"boolean","default":"false","description":"Show an eyedropper button inside the palette to sample any color on screen. Uses the native EyeDropper API — hidden automatically on unsupported browsers."},
|
|
19
19
|
{"name":"label","type":"string","description":"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."},
|
|
20
|
-
{"name":"modelValue","type":"string | null","
|
|
20
|
+
{"name":"modelValue","type":"string | null","description":"v-model: the current color as a `#RRGGBB` hex string (or `#RRGGBBAA` when `alpha` is enabled), or `null` when empty."},
|
|
21
21
|
{"name":"offCanvasProps","common":true},
|
|
22
22
|
{"name":"offset","common":true},
|
|
23
23
|
{"name":"padding","type":"number","default":"6","description":"Minimum empty space to keep from the edge of the page"},
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"exposed": [],
|
|
41
41
|
"models": [
|
|
42
|
-
{"name":"modelValue","type":"string | null"}
|
|
42
|
+
{"name":"modelValue","type":"string | null | undefined"}
|
|
43
43
|
],
|
|
44
44
|
"pt": {
|
|
45
45
|
"parts": [
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"config": "adaptive*",
|
|
60
60
|
"types": [
|
|
61
61
|
{"name":"BbOffCanvasProps","usedAs":["prop offCanvasProps"]},
|
|
62
|
-
{"name":"ElementOrComponentRef","usedAs":["prop activator","prop anchor"],"definition":"type ElementOrComponentRef = Element | ComponentPublicInstance | Pick<ComponentPublicInstance, '$el'> | { el: Element | null; } | null;"},
|
|
62
|
+
{"name":"ElementOrComponentRef","usedAs":["prop activator","prop anchor"],"definition":"type ElementOrComponentRef = Element | ComponentPublicInstance | Pick<ComponentPublicInstance, '$el'> | { el: Element | null; } | { $el?: unknown; } | null;"},
|
|
63
63
|
{"name":"ElementOrComponentRefOrSelector","usedAs":["prop boundary"],"definition":"type ElementOrComponentRefOrSelector = ElementOrComponentRef | string;"},
|
|
64
64
|
{"name":"Placement","usedAs":["prop placement"],"values":["start","end","top","bottom","left","right","top-start","top-end","right-start","right-end","bottom-start","bottom-end","left-start","left-end","start-start","start-end","end-start","end-end"]}
|
|
65
65
|
]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "BbConfirm",
|
|
3
3
|
"removed": [
|
|
4
|
-
{"name":"yes","new":"ok","surface":"option","hint":"a `confirm()` option: `confirm({ ok: 'Delete' })`; same values, plus `true` for the default label","since":"3.0.0-
|
|
5
|
-
{"name":"no","new":"cancel","surface":"option","hint":"a `confirm()` option: `confirm({ cancel: false })`; same values, plus `true` for the default label","since":"3.0.0-
|
|
6
|
-
{"name":"dismissAsNo","new":"dismissAsCancel","surface":"option","hint":"a `confirm()` option: backdrop, Escape and the ✕ run `cancel.onClick` unless `dismissAsCancel: false`","since":"3.0.0-
|
|
7
|
-
{"name":"actions[].icon","new":"actions[].iconOnly","surface":"option","hint":"an icon-only button writes its label and icon: `{ text: 'Close', 'prepend:icon': 'lucide:x', iconOnly: true }` (also `ok` / `cancel`); the label is the accessible name","since":"3.0.0-
|
|
4
|
+
{"name":"yes","new":"ok","surface":"option","hint":"a `confirm()` option: `confirm({ ok: 'Delete' })`; same values, plus `true` for the default label","since":"3.0.0-beta.72","migration":"ai/guides/migration/components/use-confirm.md","silent":true,"fix":{"kind":"rename"}},
|
|
5
|
+
{"name":"no","new":"cancel","surface":"option","hint":"a `confirm()` option: `confirm({ cancel: false })`; same values, plus `true` for the default label","since":"3.0.0-beta.72","migration":"ai/guides/migration/components/use-confirm.md","silent":true,"fix":{"kind":"rename"}},
|
|
6
|
+
{"name":"dismissAsNo","new":"dismissAsCancel","surface":"option","hint":"a `confirm()` option: backdrop, Escape and the ✕ run `cancel.onClick` unless `dismissAsCancel: false`","since":"3.0.0-beta.72","migration":"ai/guides/migration/components/use-confirm.md","silent":true,"fix":{"kind":"rename"}},
|
|
7
|
+
{"name":"actions[].icon","new":"actions[].iconOnly","surface":"option","hint":"an icon-only button writes its label and icon: `{ text: 'Close', 'prepend:icon': 'lucide:x', iconOnly: true }` (also `ok` / `cancel`); the label is the accessible name","since":"3.0.0-beta.72","migration":"ai/guides/migration/components/use-confirm.md","silent":true,"fix":{"kind":"manual"}}
|
|
8
8
|
]
|
|
9
9
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"events": [],
|
|
13
13
|
"slots": [
|
|
14
|
-
{"name":"default","type":"BbConfirmPortalSlotProps","fields":["data: P","ok: () => void","cancel: () => void"]}
|
|
14
|
+
{"name":"default","type":"BbConfirmPortalSlotProps<any>","fields":["data: P","ok: () => void","cancel: () => void"],"description":"The confirm's body."}
|
|
15
15
|
],
|
|
16
16
|
"exposed": [],
|
|
17
17
|
"models": [],
|