@nadicodeai/ui 12.1.73 → 12.1.75
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/agent-profile.d.ts +3 -1
- package/dist/components/agent-profile.d.ts.map +1 -1
- package/dist/components/agent-profile.js +2 -2
- package/dist/components/model-identity.d.ts +5 -2
- package/dist/components/model-identity.d.ts.map +1 -1
- package/dist/components/model-identity.js +5 -3
- package/package.json +4 -4
|
@@ -70,12 +70,14 @@ export type ModelSelectProps = Omit<ComponentProps<typeof SelectPrimitive.Trigge
|
|
|
70
70
|
onValueChange: (model: string) => void;
|
|
71
71
|
/** What the trigger reads while no model is chosen. */
|
|
72
72
|
placeholder: string;
|
|
73
|
+
/** The product's own name for a model id, when its runtime names models itself. */
|
|
74
|
+
nameOf?: (model: string) => string;
|
|
73
75
|
};
|
|
74
76
|
/**
|
|
75
77
|
* A model chosen from a list: the trigger and every option read the model the
|
|
76
78
|
* way every surface does, with its maker's mark (`ModelIdentity`).
|
|
77
79
|
*/
|
|
78
|
-
export declare function ModelSelect({ value, options, onValueChange, placeholder, disabled, className, ...props }: ModelSelectProps): import("react").JSX.Element;
|
|
80
|
+
export declare function ModelSelect({ value, options, onValueChange, placeholder, nameOf, disabled, className, ...props }: ModelSelectProps): import("react").JSX.Element;
|
|
79
81
|
export type SegmentedChoiceProps<Choice extends string> = Omit<ComponentProps<typeof RadioGroup>, "children" | "defaultValue" | "onValueChange" | "value"> & {
|
|
80
82
|
value: Choice | null;
|
|
81
83
|
options: readonly {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-profile.d.ts","sourceRoot":"","sources":["../../src/components/agent-profile.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAK5D,OAAO,KAAK,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,oBAAoB,CAAC,MAAM,CAAC,+BA8B9B"}
|
|
@@ -41,11 +41,11 @@ export function AgentProfileCard({ orb, name, description, descriptionMissingLab
|
|
|
41
41
|
* A model chosen from a list: the trigger and every option read the model the
|
|
42
42
|
* way every surface does, with its maker's mark (`ModelIdentity`).
|
|
43
43
|
*/
|
|
44
|
-
export function ModelSelect({ value, options, onValueChange, placeholder, disabled, className, ...props }) {
|
|
44
|
+
export function ModelSelect({ value, options, onValueChange, placeholder, nameOf, disabled, className, ...props }) {
|
|
45
45
|
return (_jsxs(Select, { disabled: disabled, onValueChange: (model) => {
|
|
46
46
|
if (typeof model === "string")
|
|
47
47
|
onValueChange(model);
|
|
48
|
-
}, value: value, children: [_jsx(SelectTrigger, { className: cn("w-full min-w-0", className), ...props, children: _jsx(SelectPrimitive.Value, { className: "flex min-w-0 flex-1 items-center gap-1.5 text-left", "data-slot": "select-value", children: (model) => model ? (_jsx(ModelIdentity, { className: "min-w-0", markSize: 20, model: model })) : (_jsx("span", { className: "text-placeholder", children: placeholder })) }) }), _jsx(SelectContent, { align: "start", alignItemWithTrigger: false, children: _jsx(SelectGroup, { children: options.map((model) => (_jsx(SelectItem, { value: model, children: _jsx(ModelIdentity, { markSize: 20, model: model }) }, model))) }) })] }));
|
|
48
|
+
}, value: value, children: [_jsx(SelectTrigger, { className: cn("w-full min-w-0", className), ...props, children: _jsx(SelectPrimitive.Value, { className: "flex min-w-0 flex-1 items-center gap-1.5 text-left", "data-slot": "select-value", children: (model) => model ? (_jsx(ModelIdentity, { className: "min-w-0", markSize: 20, model: model, name: nameOf?.(model) })) : (_jsx("span", { className: "text-placeholder", children: placeholder })) }) }), _jsx(SelectContent, { align: "start", alignItemWithTrigger: false, children: _jsx(SelectGroup, { children: options.map((model) => (_jsx(SelectItem, { value: model, children: _jsx(ModelIdentity, { markSize: 20, model: model, name: nameOf?.(model) }) }, model))) }) })] }));
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
* One choice among a few short levels, drawn as segments that share a row,
|
|
@@ -13,13 +13,16 @@ export declare function modelAuthor(model: string): string;
|
|
|
13
13
|
export declare function modelDisplayName(model: string): string;
|
|
14
14
|
export type ModelIdentityProps = Omit<ComponentPropsWithoutRef<"span">, "children"> & {
|
|
15
15
|
model: string;
|
|
16
|
+
name?: string | undefined;
|
|
16
17
|
markSize?: number;
|
|
17
18
|
};
|
|
18
19
|
/**
|
|
19
20
|
* A model as every surface reads it: the maker's mark, one name, the muted
|
|
20
21
|
* maker. Callers pass the id and nothing else about its shape — the split, the
|
|
21
22
|
* name form and the mark all belong here, so a ranked list, a routing table and
|
|
22
|
-
* a settings row cannot drift into three readings of the same model.
|
|
23
|
+
* a settings row cannot drift into three readings of the same model. A product
|
|
24
|
+
* whose runtime names its models itself, as Hermes does in Nadia, passes that
|
|
25
|
+
* `name` so a model reads the same in its settings as in its chat.
|
|
23
26
|
*/
|
|
24
|
-
export declare function ModelIdentity({ model, markSize, ...props }: ModelIdentityProps): import("react").JSX.Element;
|
|
27
|
+
export declare function ModelIdentity({ model, name, markSize, ...props }: ModelIdentityProps): import("react").JSX.Element;
|
|
25
28
|
//# sourceMappingURL=model-identity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-identity.d.ts","sourceRoot":"","sources":["../../src/components/model-identity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjD;AAUD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKtD;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACpF,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"model-identity.d.ts","sourceRoot":"","sources":["../../src/components/model-identity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjD;AAUD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKtD;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACpF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,+BASpF"}
|
|
@@ -32,8 +32,10 @@ export function modelDisplayName(model) {
|
|
|
32
32
|
* A model as every surface reads it: the maker's mark, one name, the muted
|
|
33
33
|
* maker. Callers pass the id and nothing else about its shape — the split, the
|
|
34
34
|
* name form and the mark all belong here, so a ranked list, a routing table and
|
|
35
|
-
* a settings row cannot drift into three readings of the same model.
|
|
35
|
+
* a settings row cannot drift into three readings of the same model. A product
|
|
36
|
+
* whose runtime names its models itself, as Hermes does in Nadia, passes that
|
|
37
|
+
* `name` so a model reads the same in its settings as in its chat.
|
|
36
38
|
*/
|
|
37
|
-
export function ModelIdentity({ model, markSize, ...props }) {
|
|
38
|
-
return (_jsx(ModelMark, { author: modelAuthor(model), name: modelDisplayName(model), ...(markSize === undefined ? {} : { size: markSize }), ...props }));
|
|
39
|
+
export function ModelIdentity({ model, name, markSize, ...props }) {
|
|
40
|
+
return (_jsx(ModelMark, { author: modelAuthor(model), name: name ?? modelDisplayName(model), ...(markSize === undefined ? {} : { size: markSize }), ...props }));
|
|
39
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.75",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"build:dev": "node scripts/dev-build.mjs",
|
|
63
63
|
"generate:merge-tokens": "node scripts/generate-merge-tokens.mjs",
|
|
64
64
|
"prepack": "npm run build",
|
|
65
|
-
"lint": "node scripts/generate-merge-tokens.mjs --check && eslint --max-warnings=0",
|
|
66
|
-
"typecheck": "node ../../tools/workspace/heavy-slots.mjs -- node ../../node_modules/typescript-native/bin/tsc --noEmit",
|
|
65
|
+
"lint": "node scripts/generate-merge-tokens.mjs --check && node ../../tools/workspace/heavy-slots.mjs -- eslint --max-warnings=0",
|
|
66
|
+
"typecheck": "node ../../tools/workspace/heavy-slots.mjs -- node ../../node_modules/typescript-native/bin/tsc --checkers 2 --noEmit",
|
|
67
67
|
"check": "npm run lint && npm run typecheck",
|
|
68
68
|
"check:static": "npm run check",
|
|
69
69
|
"pretest": "npm run build",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@base-ui/react": "^1.8.0",
|
|
76
76
|
"@iconify-icons/logos": "^2.0.2",
|
|
77
77
|
"@iconify/react": "^6.0.2",
|
|
78
|
-
"@nadicodeai/design-system": "12.1.
|
|
78
|
+
"@nadicodeai/design-system": "12.1.75",
|
|
79
79
|
"@tanstack/react-table": "^9.2.4",
|
|
80
80
|
"class-variance-authority": "^0.7.1",
|
|
81
81
|
"clsx": "^2.1.1",
|