bitboss-ui 3.0.0-beta.49 → 3.0.0-beta.50
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/dist/ai/BbForm.md +3 -2
- package/dist/ai/BbNumberInput.md +12 -11
- package/dist/ai/changelog.json +6 -5
- package/dist/ai/components.json +3 -3
- package/dist/ai/guides/installation-and-plugin-setup.md +2 -1
- package/dist/ai/guides/migration/v2-to-v3.md +1 -1
- package/dist/ai/helpers/inertia/manifest.json +1 -1
- package/dist/ai/manifest/components/BbForm.json +1 -1
- package/dist/ai/manifest/index.json +2 -2
- package/dist/ai/source/BbButton.md +3 -3
- package/dist/ai/source/BbForm.md +8 -5
- package/dist/ai/source/BbNumberInput.md +26 -2
- package/dist/components/BbButton/BbButton.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BbForm/BbForm.vue.d.ts +4 -4
- package/dist/components/BbForm/BbForm.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/BbNumberInput/BbNumberInput.vue_vue_type_script_setup_true_lang.js +197 -178
- package/dist/composables/formSubmitLock.d.ts +2 -0
- package/dist/llms-full.txt +18 -15
- package/dist/llms-medium.txt +2 -1
- package/dist/styles.css +1 -1
- package/dist/utils/versionCheck.js +1 -1
- package/package.json +1 -1
- package/scripts/lib/hand-imported-styles.mjs +31 -0
- package/scripts/lib/locale-check.mjs +19 -2
|
@@ -209,6 +209,37 @@ export function readPluginOptions(projectRoot) {
|
|
|
209
209
|
: { config: vite.name, nuxt: false, options, code: vite.code };
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
+
/**
|
|
213
|
+
* The build config that installs the plugin, as written (comments blanked),
|
|
214
|
+
* whatever shape its options take: an inline object, a variable, a spread.
|
|
215
|
+
* `undefined` when there is none or it cannot be read.
|
|
216
|
+
* @returns {{ config: string, nuxt: boolean, code: string } | undefined}
|
|
217
|
+
*/
|
|
218
|
+
export function readPluginConfig(projectRoot) {
|
|
219
|
+
for (const [names, nuxt] of [
|
|
220
|
+
[NUXT_CONFIGS, true],
|
|
221
|
+
[VITE_CONFIGS, false],
|
|
222
|
+
]) {
|
|
223
|
+
for (const name of names) {
|
|
224
|
+
const path = join(projectRoot, name);
|
|
225
|
+
if (!existsSync(path)) continue;
|
|
226
|
+
let code;
|
|
227
|
+
try {
|
|
228
|
+
code = blankComments(readFileSync(path, 'utf-8'), {
|
|
229
|
+
lineComments: true,
|
|
230
|
+
});
|
|
231
|
+
} catch {
|
|
232
|
+
return undefined;
|
|
233
|
+
}
|
|
234
|
+
const installs = nuxt
|
|
235
|
+
? /['"]bitboss-ui\/nuxt['"]/.test(code)
|
|
236
|
+
: /\bbitbossUi\s*\(/.test(code);
|
|
237
|
+
return installs ? { config: name, nuxt, code } : undefined;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return undefined;
|
|
241
|
+
}
|
|
242
|
+
|
|
212
243
|
/** `injectStyles` written with anything but a literal `true` — `false`, a variable, a condition. */
|
|
213
244
|
const NOT_LITERALLY_ON = /\binjectStyles\b(?!\s*:\s*true\b)/;
|
|
214
245
|
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import { readFileSync } from 'node:fs';
|
|
19
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
readPluginConfig,
|
|
21
|
+
readPluginOptions,
|
|
22
|
+
} from './hand-imported-styles.mjs';
|
|
20
23
|
|
|
21
24
|
export const UNKNOWN_LOCALE_KIND = 'unknown-locale';
|
|
22
25
|
|
|
@@ -139,9 +142,23 @@ export function unknownLocaleFindings(
|
|
|
139
142
|
findings.push(
|
|
140
143
|
finding(plugin.config, plugin.code, index, value, keys, where)
|
|
141
144
|
);
|
|
145
|
+
} else if (plugin === null) {
|
|
146
|
+
// Options not one inline object (`bitbossUi(options)`, a spread): the
|
|
147
|
+
// literals anywhere in the config file that installs the plugin.
|
|
148
|
+
const config = readPluginConfig(projectRoot);
|
|
149
|
+
if (config)
|
|
150
|
+
for (const { value, index, where } of optionLiterals(config.code, 0))
|
|
151
|
+
if (!resolveLocale(value, keys))
|
|
152
|
+
findings.push(
|
|
153
|
+
finding(config.config, config.code, index, value, keys, where)
|
|
154
|
+
);
|
|
142
155
|
}
|
|
143
156
|
for (const { path, relPath } of files) {
|
|
144
|
-
if (
|
|
157
|
+
if (
|
|
158
|
+
!/\.(?:vue|[cm]?[jt]sx?)$/.test(relPath) ||
|
|
159
|
+
relPath === plugin?.config ||
|
|
160
|
+
relPath === readPluginConfig(projectRoot)?.config
|
|
161
|
+
)
|
|
145
162
|
continue;
|
|
146
163
|
let code;
|
|
147
164
|
try {
|