@nubisco/ui 1.56.0 → 1.56.1
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/components/BlueprintBackground.vue.d.ts +1 -1
- package/dist/components/CheckboxGroup.vue.d.ts +1 -1
- package/dist/components/ColorStrip.vue.d.ts +2 -2
- package/dist/components/DatePicker.vue.d.ts +2 -2
- package/dist/components/Field.vue.d.ts +1 -1
- package/dist/components/Grid.vue.d.ts +8 -8
- package/dist/components/NumberInput.vue.d.ts +1 -1
- package/dist/components/NumberInput.vue.d.ts.map +1 -1
- package/dist/components/ProgressBar.vue.d.ts +1 -1
- package/dist/components/Radio.vue.d.ts +1 -1
- package/dist/components/Select.vue.d.ts +1 -1
- package/dist/components/Switch.vue.d.ts +1 -1
- package/dist/components/TextInput.vue.d.ts +2 -2
- package/dist/components/TextInput.vue.d.ts.map +1 -1
- package/dist/global.d.ts +1 -1
- package/dist/plugins/globalTypes.d.ts.map +1 -1
- package/dist/plugins/globalTypes.js +6 -1
- package/package.json +3 -2
- package/src/plugins/globalTypes.ts +6 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { IBlueprintBackgroundProps } from './BlueprintBackground.d';
|
|
2
2
|
declare const __VLS_export: import("vue").DefineComponent<IBlueprintBackgroundProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IBlueprintBackgroundProps> & Readonly<{}>, {
|
|
3
3
|
variant: import("./BlueprintBackground.d").TBlueprintBackgroundVariant;
|
|
4
|
-
color: string;
|
|
5
4
|
gap: number;
|
|
5
|
+
color: string;
|
|
6
6
|
thickness: number;
|
|
7
7
|
secondaryColor: string;
|
|
8
8
|
secondaryGap: number;
|
|
@@ -4,10 +4,10 @@ type __VLS_Slots = {} & {
|
|
|
4
4
|
default?: (props: typeof __VLS_7) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import("vue").DefineComponent<ICheckboxGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ICheckboxGroupProps> & Readonly<{}>, {
|
|
7
|
+
id: string;
|
|
7
8
|
warning: string;
|
|
8
9
|
error: string;
|
|
9
10
|
direction: `${ECheckboxGroupDirection}`;
|
|
10
|
-
id: string;
|
|
11
11
|
disabled: boolean;
|
|
12
12
|
helper: string;
|
|
13
13
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -16,12 +16,12 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
16
16
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
17
17
|
}>, {
|
|
18
18
|
variant: "default" | "fluid";
|
|
19
|
-
|
|
19
|
+
wrap: boolean;
|
|
20
20
|
id: string;
|
|
21
|
+
label: string;
|
|
21
22
|
options: string[] | IOption[];
|
|
22
23
|
onlyView: boolean;
|
|
23
24
|
allowMultiple: boolean;
|
|
24
|
-
wrap: boolean;
|
|
25
25
|
showNull: boolean;
|
|
26
26
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
27
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -22,14 +22,14 @@ declare const __VLS_base: import("vue").DefineComponent<IDatePickerProps, {
|
|
|
22
22
|
}>, {
|
|
23
23
|
variant: "default" | "fluid";
|
|
24
24
|
size: "xs" | "sm" | "md" | "lg";
|
|
25
|
-
|
|
25
|
+
id: string;
|
|
26
26
|
type: "simple" | "single" | "range";
|
|
27
|
+
label: string;
|
|
27
28
|
name: string;
|
|
28
29
|
warning: string;
|
|
29
30
|
error: string;
|
|
30
31
|
min: string;
|
|
31
32
|
max: string;
|
|
32
|
-
id: string;
|
|
33
33
|
required: boolean;
|
|
34
34
|
disabled: boolean;
|
|
35
35
|
weekStart: 0 | 1;
|
|
@@ -10,10 +10,10 @@ type __VLS_Slots = {} & {
|
|
|
10
10
|
hint?: (props: typeof __VLS_5) => any;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_base: import("vue").DefineComponent<IFieldProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IFieldProps> & Readonly<{}>, {
|
|
13
|
+
align: "center" | "start";
|
|
13
14
|
label: string;
|
|
14
15
|
orientation: "row" | "stack";
|
|
15
16
|
control: "fill" | "fit";
|
|
16
|
-
align: "center" | "start";
|
|
17
17
|
hint: string;
|
|
18
18
|
labelFor: string;
|
|
19
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -181,25 +181,25 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
181
181
|
default: null;
|
|
182
182
|
};
|
|
183
183
|
}>> & Readonly<{}>, {
|
|
184
|
+
wrap: import("./Grid.d").TGridWrapInput;
|
|
184
185
|
reverse: import("./Grid.d").TBooleanResponsive;
|
|
185
|
-
shift: import("./Grid.d").TGridShiftInput;
|
|
186
|
-
visible: import("./Grid.d").TGridVisibleInput;
|
|
187
|
-
mode: import("./Grid.d").TGridMode;
|
|
188
|
-
grid: import("./Grid.d").TGridColumnsInput;
|
|
189
|
-
tabIndex: string;
|
|
190
186
|
id: string;
|
|
191
|
-
dir: import("./Grid.d").TGridTypeInput;
|
|
192
|
-
gap: import("./Grid.d").TGridGapInput;
|
|
193
|
-
wrap: import("./Grid.d").TGridWrapInput;
|
|
194
187
|
is: string;
|
|
188
|
+
dir: import("./Grid.d").TGridTypeInput;
|
|
195
189
|
align: import("./Grid.d").TGridAlignInput;
|
|
196
190
|
justify: import("./Grid.d").TGridJustifyInput;
|
|
191
|
+
gap: import("./Grid.d").TGridGapInput;
|
|
192
|
+
grid: import("./Grid.d").TGridColumnsInput;
|
|
193
|
+
shift: import("./Grid.d").TGridShiftInput;
|
|
197
194
|
first: import("./Grid.d").TBooleanResponsive;
|
|
198
195
|
last: import("./Grid.d").TBooleanResponsive;
|
|
196
|
+
visible: import("./Grid.d").TGridVisibleInput;
|
|
199
197
|
grow: boolean;
|
|
200
198
|
flex: boolean;
|
|
201
199
|
shrink: boolean;
|
|
202
200
|
distributed: boolean;
|
|
201
|
+
mode: import("./Grid.d").TGridMode;
|
|
202
|
+
tabIndex: string;
|
|
203
203
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
204
204
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
205
205
|
declare const _default: typeof __VLS_export;
|
|
@@ -16,12 +16,12 @@ declare const __VLS_export: import("vue").DefineComponent<INumberInputProps, {
|
|
|
16
16
|
}>, {
|
|
17
17
|
variant: "default" | "fluid";
|
|
18
18
|
size: "xs" | "sm" | "md" | "lg";
|
|
19
|
+
id: string;
|
|
19
20
|
label: string;
|
|
20
21
|
warning: string;
|
|
21
22
|
error: string;
|
|
22
23
|
min: number;
|
|
23
24
|
max: number;
|
|
24
|
-
id: string;
|
|
25
25
|
required: boolean;
|
|
26
26
|
disabled: boolean;
|
|
27
27
|
modelValue: number | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInput.vue.d.ts","sourceRoot":"","sources":["../../src/components/NumberInput.vue"],"names":[],"mappings":"AA+hBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAKtD,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAukBD,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"NumberInput.vue.d.ts","sourceRoot":"","sources":["../../src/components/NumberInput.vue"],"names":[],"mappings":"AA+hBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAKtD,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAukBD,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;SA1kBV,MAAM;SACN,MAAM;;;gBAFC,MAAM,GAAG,IAAI;;;UAGnB,MAAM;6EA6kBb,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EProgressBarSize, EProgressBarStatus, IProgressBarProps } from './ProgressBar.d';
|
|
2
2
|
declare const __VLS_export: import("vue").DefineComponent<IProgressBarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IProgressBarProps> & Readonly<{}>, {
|
|
3
3
|
size: `${EProgressBarSize}`;
|
|
4
|
-
max: number;
|
|
5
4
|
id: string;
|
|
5
|
+
max: number;
|
|
6
6
|
status: `${EProgressBarStatus}`;
|
|
7
7
|
helper: string;
|
|
8
8
|
value: number;
|
|
@@ -4,10 +4,10 @@ declare const __VLS_export: import("vue").DefineComponent<IRadioProps, {}, {}, {
|
|
|
4
4
|
}, string, import("vue").PublicProps, Readonly<IRadioProps> & Readonly<{
|
|
5
5
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
6
6
|
}>, {
|
|
7
|
+
id: string;
|
|
7
8
|
warning: string;
|
|
8
9
|
error: string;
|
|
9
10
|
direction: `${ERadioDirection}`;
|
|
10
|
-
id: string;
|
|
11
11
|
disabled: boolean;
|
|
12
12
|
helper: string;
|
|
13
13
|
readonly: boolean;
|
|
@@ -21,11 +21,11 @@ declare const __VLS_base: import("vue").DefineComponent<ISelectProps, {
|
|
|
21
21
|
}>, {
|
|
22
22
|
variant: "default" | "fluid";
|
|
23
23
|
size: "xs" | "sm" | "md" | "lg";
|
|
24
|
+
id: string;
|
|
24
25
|
label: string;
|
|
25
26
|
name: string;
|
|
26
27
|
warning: string;
|
|
27
28
|
error: string;
|
|
28
|
-
id: string;
|
|
29
29
|
required: boolean;
|
|
30
30
|
disabled: boolean;
|
|
31
31
|
modelValue: string | number | Array<string | number> | null;
|
|
@@ -63,8 +63,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
63
63
|
}>, {
|
|
64
64
|
variant: "primary" | "secondary";
|
|
65
65
|
size: "sm" | "md" | "lg";
|
|
66
|
-
label: string;
|
|
67
66
|
id: string;
|
|
67
|
+
label: string;
|
|
68
68
|
disabled: boolean;
|
|
69
69
|
verbose: boolean;
|
|
70
70
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -50,15 +50,15 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
50
50
|
}>, {
|
|
51
51
|
variant: "default" | "fluid";
|
|
52
52
|
size: "xs" | "sm" | "md" | "lg";
|
|
53
|
-
|
|
53
|
+
id: string;
|
|
54
54
|
type: string;
|
|
55
|
+
label: string;
|
|
55
56
|
rows: number;
|
|
56
57
|
name: string;
|
|
57
58
|
warning: string;
|
|
58
59
|
error: string;
|
|
59
60
|
min: string | number;
|
|
60
61
|
max: string | number;
|
|
61
|
-
id: string;
|
|
62
62
|
required: boolean;
|
|
63
63
|
disabled: boolean;
|
|
64
64
|
helper: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.vue.d.ts","sourceRoot":"","sources":["../../src/components/TextInput.vue"],"names":[],"mappings":"AA8iBA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAO9D,MAAM,WAAW,eAAgB,SAAQ,uBAAuB;IAC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AQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC9C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC9C;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAQ9C,QAAA,MAAM,UAAU;;;;;;;;;;;;UA7hBP,MAAM;;UAQN,MAAM;;;;SAPP,MAAM,GAAG,MAAM;SACf,MAAM,GAAG,MAAM;;;;;;UACd,MAAM,GAAG,MAAM;eAcV,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM;eAbxB,MAAM;eAEN,OAAO;6EA4hBnB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
package/dist/global.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ import TreeNode from './components/TreeNode.vue'
|
|
|
66
66
|
import UserMenu from './components/UserMenu.vue'
|
|
67
67
|
|
|
68
68
|
declare module 'vue' {
|
|
69
|
-
interface
|
|
69
|
+
interface GlobalComponents {
|
|
70
70
|
NbAiLabel: typeof AiLabel
|
|
71
71
|
NbBadge: typeof Badge
|
|
72
72
|
NbBarChart: typeof BarChart
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalTypes.d.ts","sourceRoot":"","sources":["../../src/plugins/globalTypes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAUlC,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"globalTypes.d.ts","sourceRoot":"","sources":["../../src/plugins/globalTypes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAUlC,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAqFpD"}
|
|
@@ -36,12 +36,17 @@ export function globalTypes(basePath) {
|
|
|
36
36
|
const entries = files
|
|
37
37
|
.map((f) => ` Nb${f.name}: typeof ${f.name}`)
|
|
38
38
|
.join('\n');
|
|
39
|
+
// The interface MUST be named `GlobalComponents`: that is the exact name
|
|
40
|
+
// Vue's template type-checker reads when resolving a tag that was never
|
|
41
|
+
// imported (i.e. everything registered by our plugin). Any other name is
|
|
42
|
+
// a valid module augmentation that nothing ever looks at, so consumers
|
|
43
|
+
// keep getting `any` for every <Nb*> tag and no prop is ever checked.
|
|
39
44
|
const content = `// AUTO-GENERATED: do not edit by hand
|
|
40
45
|
// Re-run the build to update this file when components change
|
|
41
46
|
${imports}
|
|
42
47
|
|
|
43
48
|
declare module 'vue' {
|
|
44
|
-
interface
|
|
49
|
+
interface GlobalComponents {
|
|
45
50
|
${entries}
|
|
46
51
|
}
|
|
47
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nubisco/ui",
|
|
3
|
-
"version": "1.56.
|
|
3
|
+
"version": "1.56.1",
|
|
4
4
|
"description": "Vue 3 UI component library",
|
|
5
5
|
"packageManager": "pnpm@11.0.8",
|
|
6
6
|
"repository": {
|
|
@@ -81,9 +81,10 @@
|
|
|
81
81
|
"build:lib": "vite build",
|
|
82
82
|
"build:types": "vue-tsc --noEmit false --declaration --emitDeclarationOnly --outDir dist && node scripts/copy-type-modules.mjs && node scripts/rewrite-dist-aliases.mjs dist",
|
|
83
83
|
"build:plugins": "tsc --project tsconfig.plugins.json",
|
|
84
|
-
"verify:types": "pnpm run verify:dist-types && pnpm run verify:consumer-types",
|
|
84
|
+
"verify:types": "pnpm run verify:dist-types && pnpm run verify:consumer-types && pnpm run verify:consumer-globals",
|
|
85
85
|
"verify:dist-types": "node scripts/verify-dist-types.mjs dist",
|
|
86
86
|
"verify:consumer-types": "node scripts/verify-consumer-types.mjs",
|
|
87
|
+
"verify:consumer-globals": "node scripts/verify-consumer-globals.mjs",
|
|
87
88
|
"dev": "vite build --watch",
|
|
88
89
|
"prepublishOnly": "pnpm run build",
|
|
89
90
|
"test": "vitest run",
|
|
@@ -49,12 +49,17 @@ export function globalTypes(basePath: string): Plugin {
|
|
|
49
49
|
.map((f) => ` Nb${f.name}: typeof ${f.name}`)
|
|
50
50
|
.join('\n')
|
|
51
51
|
|
|
52
|
+
// The interface MUST be named `GlobalComponents`: that is the exact name
|
|
53
|
+
// Vue's template type-checker reads when resolving a tag that was never
|
|
54
|
+
// imported (i.e. everything registered by our plugin). Any other name is
|
|
55
|
+
// a valid module augmentation that nothing ever looks at, so consumers
|
|
56
|
+
// keep getting `any` for every <Nb*> tag and no prop is ever checked.
|
|
52
57
|
const content = `// AUTO-GENERATED: do not edit by hand
|
|
53
58
|
// Re-run the build to update this file when components change
|
|
54
59
|
${imports}
|
|
55
60
|
|
|
56
61
|
declare module 'vue' {
|
|
57
|
-
interface
|
|
62
|
+
interface GlobalComponents {
|
|
58
63
|
${entries}
|
|
59
64
|
}
|
|
60
65
|
}
|