@vantageos/mosaic-blocks 0.5.20-alpha → 0.5.22-alpha
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 +3 -3
- package/dist/index.cjs +1190 -419
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +624 -2
- package/dist/index.d.ts +624 -2
- package/dist/index.js +1132 -388
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -18,9 +18,10 @@ import { Input } from '@base-ui/react/input';
|
|
|
18
18
|
import { Field } from '@base-ui/react/field';
|
|
19
19
|
import { Switch } from '@base-ui/react/switch';
|
|
20
20
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
21
|
+
import { AlertDialog } from '@base-ui/react/alert-dialog';
|
|
21
22
|
export { Tooltip } from '@base-ui/react/tooltip';
|
|
22
23
|
|
|
23
|
-
declare const version = "0.5.
|
|
24
|
+
declare const version = "0.5.22-alpha";
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* Placeholder component — infra scaffold only.
|
|
@@ -1926,6 +1927,63 @@ interface MosaicComboboxProps {
|
|
|
1926
1927
|
*/
|
|
1927
1928
|
declare function MosaicCombobox({ items, value, onValueChange, defaultValue, placeholder, disabled, name, emptyMessage, className, }: MosaicComboboxProps): React.JSX.Element;
|
|
1928
1929
|
|
|
1930
|
+
interface MosaicModelOption {
|
|
1931
|
+
/** Unique identifier the host resolves back to its own model catalogue. */
|
|
1932
|
+
value: string;
|
|
1933
|
+
/** Display name (e.g. "GPT-5", "Claude Opus"). */
|
|
1934
|
+
label: string;
|
|
1935
|
+
/** Optional one-line description, supplied by the host. */
|
|
1936
|
+
description?: string;
|
|
1937
|
+
/** Optional meta line (e.g. context window / pricing), supplied by the host. */
|
|
1938
|
+
meta?: string;
|
|
1939
|
+
/** Optional badge text (e.g. "Recommended"), supplied by the host. */
|
|
1940
|
+
badge?: string;
|
|
1941
|
+
/** When true, the option is shown but cannot be selected. */
|
|
1942
|
+
disabled?: boolean;
|
|
1943
|
+
}
|
|
1944
|
+
interface MosaicModelSelectorProps {
|
|
1945
|
+
/** The full list of selectable models. The library knows no model names — host-owned. */
|
|
1946
|
+
models: MosaicModelOption[];
|
|
1947
|
+
/** Controlled selected value. */
|
|
1948
|
+
value?: string;
|
|
1949
|
+
/** Callback fired when the host's selection should change. Never fires for disabled options. */
|
|
1950
|
+
onValueChange?: (value: string) => void;
|
|
1951
|
+
/**
|
|
1952
|
+
* Text shown in the trigger when no model is selected. Required — the
|
|
1953
|
+
* host owns the language (e.g. `t('ModelSelector.placeholder')`).
|
|
1954
|
+
*/
|
|
1955
|
+
placeholder: string;
|
|
1956
|
+
/**
|
|
1957
|
+
* Message shown when no model matches the filter. Required — the host
|
|
1958
|
+
* owns the language. No default, no fallback.
|
|
1959
|
+
*/
|
|
1960
|
+
emptyMessage: string;
|
|
1961
|
+
disabled?: boolean;
|
|
1962
|
+
name?: string;
|
|
1963
|
+
className?: string;
|
|
1964
|
+
}
|
|
1965
|
+
/**
|
|
1966
|
+
* MosaicModelSelector — production model-picker atom for @vantageos/mosaic-blocks.
|
|
1967
|
+
*
|
|
1968
|
+
* The component owns zero model knowledge: `models` is supplied by the host,
|
|
1969
|
+
* filtered as the user types, and the selected id is surfaced through
|
|
1970
|
+
* `onValueChange`. All visible strings that are not per-model host data
|
|
1971
|
+
* (placeholder, emptyMessage) are required props with no default.
|
|
1972
|
+
*
|
|
1973
|
+
* @example
|
|
1974
|
+
* <MosaicModelSelector
|
|
1975
|
+
* models={[{ value: "gpt-5", label: "GPT-5", description: "Flagship model" }]}
|
|
1976
|
+
* value={selectedModel}
|
|
1977
|
+
* onValueChange={setSelectedModel}
|
|
1978
|
+
* placeholder={t('ModelSelector.placeholder')}
|
|
1979
|
+
* emptyMessage={t('ModelSelector.empty')}
|
|
1980
|
+
* />
|
|
1981
|
+
*/
|
|
1982
|
+
declare function MosaicModelSelector({ models, value, onValueChange, placeholder, emptyMessage, disabled, name, className, }: MosaicModelSelectorProps): React.JSX.Element;
|
|
1983
|
+
declare namespace MosaicModelSelector {
|
|
1984
|
+
var displayName: string;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1929
1987
|
/**
|
|
1930
1988
|
* MosaicDropdownMenu — @base-ui/react Menu primitive
|
|
1931
1989
|
*
|
|
@@ -2773,6 +2831,85 @@ declare namespace MosaicAgentComposer {
|
|
|
2773
2831
|
var displayName: string;
|
|
2774
2832
|
}
|
|
2775
2833
|
|
|
2834
|
+
/**
|
|
2835
|
+
* MosaicAgentEditor — agent config form (name / role / instructions)
|
|
2836
|
+
*
|
|
2837
|
+
* Ported (shape only) from any-debate-ai:
|
|
2838
|
+
* - components/agent-composer/AgentEditor.tsx
|
|
2839
|
+
* - components/agent-config/AgentBuilderModal.tsx
|
|
2840
|
+
*
|
|
2841
|
+
* No business logic is carried over: no roles/personas/frameworks lists, no
|
|
2842
|
+
* model presets, no default prompts. Every visible string is a REQUIRED prop
|
|
2843
|
+
* with no default. The form is fully controlled: values, onChange handlers,
|
|
2844
|
+
* validation errors and the busy state all come from the host.
|
|
2845
|
+
*
|
|
2846
|
+
* data-slot="agent-editor" on the root.
|
|
2847
|
+
* Deps: @base-ui/react (via MosaicButton) + class-variance-authority only.
|
|
2848
|
+
*/
|
|
2849
|
+
|
|
2850
|
+
interface MosaicAgentEditorProps {
|
|
2851
|
+
className?: string;
|
|
2852
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
2853
|
+
/** Name field */
|
|
2854
|
+
nameLabel: string;
|
|
2855
|
+
nameValue: string;
|
|
2856
|
+
onNameChange: (value: string) => void;
|
|
2857
|
+
/** Host-decided validation error for the name field, or null when valid */
|
|
2858
|
+
nameError: string | null;
|
|
2859
|
+
/** Role field */
|
|
2860
|
+
roleLabel: string;
|
|
2861
|
+
roleValue: string;
|
|
2862
|
+
onRoleChange: (value: string) => void;
|
|
2863
|
+
/** Host-decided validation error for the role field, or null when valid */
|
|
2864
|
+
roleError: string | null;
|
|
2865
|
+
/** Instructions field */
|
|
2866
|
+
instructionsLabel: string;
|
|
2867
|
+
instructionsValue: string;
|
|
2868
|
+
onInstructionsChange: (value: string) => void;
|
|
2869
|
+
/** Host-decided validation error for the instructions field, or null when valid */
|
|
2870
|
+
instructionsError: string | null;
|
|
2871
|
+
/** Actions */
|
|
2872
|
+
saveLabel: string;
|
|
2873
|
+
cancelLabel: string;
|
|
2874
|
+
onSave: () => void;
|
|
2875
|
+
onCancel: () => void;
|
|
2876
|
+
/** Host decides whether the form is currently valid/submittable */
|
|
2877
|
+
canSave: boolean;
|
|
2878
|
+
/** Host-controlled submission-in-flight state */
|
|
2879
|
+
isSaving: boolean;
|
|
2880
|
+
/** Label shown on the save button while isSaving is true */
|
|
2881
|
+
savingLabel: string;
|
|
2882
|
+
}
|
|
2883
|
+
/**
|
|
2884
|
+
* MosaicAgentEditor — production agent-editor form for @vantageos/mosaic-blocks.
|
|
2885
|
+
*
|
|
2886
|
+
* Fully controlled: name/role/instructions values, onChange handlers,
|
|
2887
|
+
* validation errors and busy state are all supplied by the host. The
|
|
2888
|
+
* component carries no business knowledge (no role list, no model, no
|
|
2889
|
+
* default instructions) — it only renders the form shape.
|
|
2890
|
+
*
|
|
2891
|
+
* @example
|
|
2892
|
+
* <MosaicAgentEditor
|
|
2893
|
+
* nameLabel="Name" nameValue={name} onNameChange={setName} nameError={nameError}
|
|
2894
|
+
* roleLabel="Role" roleValue={role} onRoleChange={setRole} roleError={null}
|
|
2895
|
+
* instructionsLabel="Instructions" instructionsValue={instructions}
|
|
2896
|
+
* onInstructionsChange={setInstructions} instructionsError={null}
|
|
2897
|
+
* saveLabel="Save" cancelLabel="Cancel" onSave={handleSave} onCancel={handleCancel}
|
|
2898
|
+
* canSave={isValid} isSaving={isSaving} savingLabel="Saving…"
|
|
2899
|
+
* />
|
|
2900
|
+
*/
|
|
2901
|
+
declare function MosaicAgentEditor({ className, ref, nameLabel, nameValue, onNameChange, nameError, roleLabel, roleValue, onRoleChange, roleError, instructionsLabel, instructionsValue, onInstructionsChange, instructionsError, saveLabel, cancelLabel, onSave, onCancel, canSave, isSaving, savingLabel, }: MosaicAgentEditorProps): React.JSX.Element;
|
|
2902
|
+
declare namespace MosaicAgentEditor {
|
|
2903
|
+
var displayName: string;
|
|
2904
|
+
}
|
|
2905
|
+
|
|
2906
|
+
/**
|
|
2907
|
+
* agent-editor-variants — cva variants for MosaicAgentEditor
|
|
2908
|
+
*
|
|
2909
|
+
* Separated per house convention (variants isolated from component logic).
|
|
2910
|
+
*/
|
|
2911
|
+
declare const agentEditorVariants: (props?: ({} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2912
|
+
|
|
2776
2913
|
/**
|
|
2777
2914
|
* MosaicModuleCard — selected-module display card (PC-11)
|
|
2778
2915
|
*
|
|
@@ -2901,6 +3038,123 @@ declare namespace MosaicDeleteConfirmationDialog {
|
|
|
2901
3038
|
var displayName: string;
|
|
2902
3039
|
}
|
|
2903
3040
|
|
|
3041
|
+
/**
|
|
3042
|
+
* MosaicAlertDialog — confirm-before-irreversible-action dialog (compound API)
|
|
3043
|
+
*
|
|
3044
|
+
* Ported from any-debate-ai components/ui/alert-dialog.tsx
|
|
3045
|
+
* (source: gh api repos/elpiarthera/any-debate-ai/contents/components/ui/alert-dialog.tsx)
|
|
3046
|
+
*
|
|
3047
|
+
* Radix (`@radix-ui/react-alert-dialog`) replaced with `@base-ui/react/alert-dialog`
|
|
3048
|
+
* per ADR-0001 — deps locked to @base-ui/react + class-variance-authority, no
|
|
3049
|
+
* radix, no vaul. `buttonVariants` from the shadcn source replaced with local
|
|
3050
|
+
* button-like classes (kept in-file to avoid a hard dependency between two
|
|
3051
|
+
* public components — MosaicButton is a separate export).
|
|
3052
|
+
*
|
|
3053
|
+
* Zero branding, zero copy: every visible string is a REQUIRED prop with no
|
|
3054
|
+
* default (SIN-01) — Title/Description/Cancel/Action are compound
|
|
3055
|
+
* components whose `children` is the required string; there is no `??`, no
|
|
3056
|
+
* `||`, no default-parameter fallback anywhere in this file.
|
|
3057
|
+
*
|
|
3058
|
+
* Accessibility (the reason this component exists — a human must be able to
|
|
3059
|
+
* say no):
|
|
3060
|
+
* - `role="alertdialog"` is set automatically by @base-ui/react/alert-dialog
|
|
3061
|
+
* (AlertDialog.Root sets it, distinct from the plain "dialog" role).
|
|
3062
|
+
* - `aria-labelledby` / `aria-describedby` are wired automatically by
|
|
3063
|
+
* @base-ui/react from Title / Description element ids.
|
|
3064
|
+
* - Focus trap: @base-ui/react/alert-dialog Popup traps Tab within the popup.
|
|
3065
|
+
* - Escape closes and is treated as CANCEL, never as confirm — Escape only
|
|
3066
|
+
* ever calls `onOpenChange(false)`, it never calls the confirm handler.
|
|
3067
|
+
* - Focus returns to the trigger element on close (Popup `finalFocus`
|
|
3068
|
+
* default behavior).
|
|
3069
|
+
* - The destructive action is never the default focus target: DOM order
|
|
3070
|
+
* places MosaicAlertDialogCancel before MosaicAlertDialogAction, and
|
|
3071
|
+
* @base-ui/react's default `initialFocus` picks the FIRST tabbable element
|
|
3072
|
+
* in the popup — i.e. Cancel. A reflex Enter never destroys anything.
|
|
3073
|
+
*/
|
|
3074
|
+
|
|
3075
|
+
declare function MosaicAlertDialog(props: React.ComponentProps<typeof AlertDialog.Root>): React.JSX.Element;
|
|
3076
|
+
declare namespace MosaicAlertDialog {
|
|
3077
|
+
var displayName: string;
|
|
3078
|
+
}
|
|
3079
|
+
declare function MosaicAlertDialogTrigger(props: React.ComponentProps<typeof AlertDialog.Trigger>): React.JSX.Element;
|
|
3080
|
+
declare namespace MosaicAlertDialogTrigger {
|
|
3081
|
+
var displayName: string;
|
|
3082
|
+
}
|
|
3083
|
+
declare function MosaicAlertDialogPortal(props: React.ComponentProps<typeof AlertDialog.Portal>): React.JSX.Element;
|
|
3084
|
+
declare namespace MosaicAlertDialogPortal {
|
|
3085
|
+
var displayName: string;
|
|
3086
|
+
}
|
|
3087
|
+
interface MosaicAlertDialogOverlayProps extends React.ComponentProps<typeof AlertDialog.Backdrop> {
|
|
3088
|
+
className?: string;
|
|
3089
|
+
}
|
|
3090
|
+
declare function MosaicAlertDialogOverlay({ className, ...props }: MosaicAlertDialogOverlayProps): React.JSX.Element;
|
|
3091
|
+
declare namespace MosaicAlertDialogOverlay {
|
|
3092
|
+
var displayName: string;
|
|
3093
|
+
}
|
|
3094
|
+
interface MosaicAlertDialogContentProps extends React.ComponentProps<typeof AlertDialog.Popup> {
|
|
3095
|
+
className?: string;
|
|
3096
|
+
}
|
|
3097
|
+
declare function MosaicAlertDialogContent({ className, ...props }: MosaicAlertDialogContentProps): React.JSX.Element;
|
|
3098
|
+
declare namespace MosaicAlertDialogContent {
|
|
3099
|
+
var displayName: string;
|
|
3100
|
+
}
|
|
3101
|
+
declare function MosaicAlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
3102
|
+
declare namespace MosaicAlertDialogHeader {
|
|
3103
|
+
var displayName: string;
|
|
3104
|
+
}
|
|
3105
|
+
declare function MosaicAlertDialogFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
3106
|
+
declare namespace MosaicAlertDialogFooter {
|
|
3107
|
+
var displayName: string;
|
|
3108
|
+
}
|
|
3109
|
+
interface MosaicAlertDialogTitleProps extends Omit<React.ComponentProps<typeof AlertDialog.Title>, "children"> {
|
|
3110
|
+
className?: string;
|
|
3111
|
+
/** Dialog title text. Required — the host owns the language, no default. */
|
|
3112
|
+
children: React.ReactNode;
|
|
3113
|
+
}
|
|
3114
|
+
declare function MosaicAlertDialogTitle({ className, children, ...props }: MosaicAlertDialogTitleProps): React.JSX.Element;
|
|
3115
|
+
declare namespace MosaicAlertDialogTitle {
|
|
3116
|
+
var displayName: string;
|
|
3117
|
+
}
|
|
3118
|
+
interface MosaicAlertDialogDescriptionProps extends Omit<React.ComponentProps<typeof AlertDialog.Description>, "children"> {
|
|
3119
|
+
className?: string;
|
|
3120
|
+
/** Dialog description text. Required — the host owns the language, no default. */
|
|
3121
|
+
children: React.ReactNode;
|
|
3122
|
+
}
|
|
3123
|
+
declare function MosaicAlertDialogDescription({ className, children, ...props }: MosaicAlertDialogDescriptionProps): React.JSX.Element;
|
|
3124
|
+
declare namespace MosaicAlertDialogDescription {
|
|
3125
|
+
var displayName: string;
|
|
3126
|
+
}
|
|
3127
|
+
interface MosaicAlertDialogActionProps extends Omit<React.ComponentProps<typeof AlertDialog.Close>, "children"> {
|
|
3128
|
+
className?: string;
|
|
3129
|
+
/** Confirm button label. Required — the host owns the language, no default. */
|
|
3130
|
+
children: React.ReactNode;
|
|
3131
|
+
}
|
|
3132
|
+
declare function MosaicAlertDialogAction({ className, children, ...props }: MosaicAlertDialogActionProps): React.JSX.Element;
|
|
3133
|
+
declare namespace MosaicAlertDialogAction {
|
|
3134
|
+
var displayName: string;
|
|
3135
|
+
}
|
|
3136
|
+
interface MosaicAlertDialogCancelProps extends Omit<React.ComponentProps<typeof AlertDialog.Close>, "children"> {
|
|
3137
|
+
className?: string;
|
|
3138
|
+
/** Cancel button label. Required — the host owns the language, no default. */
|
|
3139
|
+
children: React.ReactNode;
|
|
3140
|
+
}
|
|
3141
|
+
declare function MosaicAlertDialogCancel({ className, children, ...props }: MosaicAlertDialogCancelProps): React.JSX.Element;
|
|
3142
|
+
declare namespace MosaicAlertDialogCancel {
|
|
3143
|
+
var displayName: string;
|
|
3144
|
+
}
|
|
3145
|
+
|
|
3146
|
+
/**
|
|
3147
|
+
* alertDialogContentVariants — pure CVA variant function for MosaicAlertDialog content.
|
|
3148
|
+
*
|
|
3149
|
+
* Isolated in its own module so it can be re-exported from the
|
|
3150
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in
|
|
3151
|
+
* React or @base-ui/react (which live in MosaicAlertDialog.tsx but not here).
|
|
3152
|
+
*
|
|
3153
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
3154
|
+
*/
|
|
3155
|
+
declare const alertDialogContentVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
3156
|
+
declare const alertDialogOverlayVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
3157
|
+
|
|
2904
3158
|
interface MosaicSelectItem {
|
|
2905
3159
|
value: string;
|
|
2906
3160
|
label: string;
|
|
@@ -3182,6 +3436,83 @@ declare namespace MosaicQuickAgentSelector {
|
|
|
3182
3436
|
var displayName: string;
|
|
3183
3437
|
}
|
|
3184
3438
|
|
|
3439
|
+
/**
|
|
3440
|
+
* MosaicAgentPreview — presentational, controlled preview of an agent
|
|
3441
|
+
* configuration before creation is confirmed.
|
|
3442
|
+
*
|
|
3443
|
+
* Ported from components/agent-config/AgentPreview.tsx (any-debate-ai).
|
|
3444
|
+
*
|
|
3445
|
+
* Pure presentational — no business data (roles/personas/frameworks/models
|
|
3446
|
+
* are host-domain concepts and are NOT baked into this component). The host
|
|
3447
|
+
* passes a generic list of `attributes` (label/value pairs) for the
|
|
3448
|
+
* "detailed" variant, or a single `tagline` for the "summary" variant.
|
|
3449
|
+
*
|
|
3450
|
+
* Contract is non-lying: `variant` is a discriminated union — `tagline` +
|
|
3451
|
+
* `badgeLabel` only exist on the "summary" shape, `title` + `attributes` only
|
|
3452
|
+
* exist on the "detailed" shape. A field is required exactly where it is read.
|
|
3453
|
+
*/
|
|
3454
|
+
interface MosaicAgentPreviewAttribute {
|
|
3455
|
+
id: string;
|
|
3456
|
+
label: string;
|
|
3457
|
+
value: string;
|
|
3458
|
+
}
|
|
3459
|
+
interface MosaicAgentPreviewBaseProps {
|
|
3460
|
+
/** The agent's display name. Required — no default, no fallback string. */
|
|
3461
|
+
name: string;
|
|
3462
|
+
className?: string;
|
|
3463
|
+
}
|
|
3464
|
+
interface MosaicAgentPreviewSummaryProps extends MosaicAgentPreviewBaseProps {
|
|
3465
|
+
variant: "summary";
|
|
3466
|
+
/** One-line description shown under the name. Required — host-owned. */
|
|
3467
|
+
tagline: string;
|
|
3468
|
+
/** Label for the trailing badge (e.g. "Custom"). Required — host-owned. */
|
|
3469
|
+
badgeLabel: string;
|
|
3470
|
+
}
|
|
3471
|
+
interface MosaicAgentPreviewDetailedProps extends MosaicAgentPreviewBaseProps {
|
|
3472
|
+
variant: "detailed";
|
|
3473
|
+
/** Card title (e.g. "Configuration Summary"). Required — host-owned. */
|
|
3474
|
+
title: string;
|
|
3475
|
+
/** Generic label/value rows. Required — no business data baked in. */
|
|
3476
|
+
attributes: MosaicAgentPreviewAttribute[];
|
|
3477
|
+
}
|
|
3478
|
+
type MosaicAgentPreviewProps = MosaicAgentPreviewSummaryProps | MosaicAgentPreviewDetailedProps;
|
|
3479
|
+
/**
|
|
3480
|
+
* MosaicAgentPreview — read-only preview of an agent configuration before
|
|
3481
|
+
* the host confirms creation.
|
|
3482
|
+
*
|
|
3483
|
+
* @example
|
|
3484
|
+
* <MosaicAgentPreview
|
|
3485
|
+
* variant="summary"
|
|
3486
|
+
* name="StrategyBot"
|
|
3487
|
+
* tagline="Analyst • Formal • Claude Sonnet"
|
|
3488
|
+
* badgeLabel="Custom"
|
|
3489
|
+
* />
|
|
3490
|
+
*
|
|
3491
|
+
* @example
|
|
3492
|
+
* <MosaicAgentPreview
|
|
3493
|
+
* variant="detailed"
|
|
3494
|
+
* name="StrategyBot"
|
|
3495
|
+
* title="Configuration Summary"
|
|
3496
|
+
* attributes={[{ id: "role", label: "Role", value: "Strategist" }]}
|
|
3497
|
+
* />
|
|
3498
|
+
*/
|
|
3499
|
+
declare function MosaicAgentPreview(props: MosaicAgentPreviewProps): React.JSX.Element;
|
|
3500
|
+
declare namespace MosaicAgentPreview {
|
|
3501
|
+
var displayName: string;
|
|
3502
|
+
}
|
|
3503
|
+
|
|
3504
|
+
/**
|
|
3505
|
+
* agentPreviewVariants — pure CVA variant function for MosaicAgentPreview.
|
|
3506
|
+
*
|
|
3507
|
+
* Isolated in its own module so it can be re-exported from the
|
|
3508
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in React.
|
|
3509
|
+
*
|
|
3510
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
3511
|
+
*/
|
|
3512
|
+
declare const agentPreviewVariants: (props?: ({
|
|
3513
|
+
variant?: "summary" | "detailed" | null | undefined;
|
|
3514
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
3515
|
+
|
|
3185
3516
|
/**
|
|
3186
3517
|
* MosaicMemoryCard — memory item card (detailed / compact variants)
|
|
3187
3518
|
*
|
|
@@ -3347,6 +3678,141 @@ declare namespace MosaicMemoryCard {
|
|
|
3347
3678
|
var displayName: string;
|
|
3348
3679
|
}
|
|
3349
3680
|
|
|
3681
|
+
/**
|
|
3682
|
+
* MosaicTemplateAgentCard — agent-type template preview card
|
|
3683
|
+
*
|
|
3684
|
+
* Ported from any-debate-ai's components/templates/TemplateCard.tsx.
|
|
3685
|
+
*
|
|
3686
|
+
* What was dropped and why:
|
|
3687
|
+
* - `useDevice()` / `isMobile` breakpoint branching — a JS-side responsive
|
|
3688
|
+
* toggle is app-specific plumbing, not a library concern. The host controls
|
|
3689
|
+
* density via `className` / CSS container queries instead.
|
|
3690
|
+
* - `conversationIcons` (debate/collaboration/analysis -> lucide icon map) and
|
|
3691
|
+
* the `isPopular`/`isTrending` thresholds derived from `usageCount` — both
|
|
3692
|
+
* are hardcoded business knowledge (a taxonomy of conversation types, and a
|
|
3693
|
+
* "popular" threshold) that does not belong in the component. The host
|
|
3694
|
+
* passes an optional `icon` node and decides its own popularity badges, if
|
|
3695
|
+
* any, via composition around this card.
|
|
3696
|
+
* - `framer-motion` hover/tap scale — not a locked dependency here; dropped
|
|
3697
|
+
* with a plain CSS `transition-all` on the CVA root instead.
|
|
3698
|
+
* - lucide-react icons — no icon library dependency in this repo; inline SVG
|
|
3699
|
+
* only, same as MosaicAgentCard / MosaicModuleCard / MosaicMemoryCard.
|
|
3700
|
+
*
|
|
3701
|
+
* a11y fix vs. the source: the source made the whole `<Card>` a `<div
|
|
3702
|
+
* onClick>` with nested `<Button>`s for preview/duplicate (stopping click
|
|
3703
|
+
* propagation). A `<div onClick>` is not keyboard-actionable, and nesting
|
|
3704
|
+
* `<button>` inside a clickable non-button element is fragile. Here the
|
|
3705
|
+
* "select" affordance is its own real `<button>` (name + `aria-pressed`
|
|
3706
|
+
* driven by the host), and preview/duplicate are SIBLING buttons — never
|
|
3707
|
+
* nested inside another interactive element.
|
|
3708
|
+
*
|
|
3709
|
+
* SIN-01 (bilingual by design): every visible string is a required prop or a
|
|
3710
|
+
* required formatter function, no default, no fallback operator, no
|
|
3711
|
+
* destructuring default. `agentCountLabel` is the one exception that would
|
|
3712
|
+
* look surprising: it is the fully-formatted string ("3 agents"), not a
|
|
3713
|
+
* number, because pluralization is a locale rule the library must not own.
|
|
3714
|
+
*
|
|
3715
|
+
* Pattern: MosaicMemoryCard.tsx (data-slot, cva variants module, manual
|
|
3716
|
+
* dropdown-free actions row, inline SVG icons, React 19 ref prop,
|
|
3717
|
+
* displayName, JSDoc, formatter props over hardcoded strings).
|
|
3718
|
+
* Design tokens: --card, --card-foreground, --border, --primary,
|
|
3719
|
+
* --muted-foreground, --muted.
|
|
3720
|
+
* No icon library — inline SVGs only.
|
|
3721
|
+
*/
|
|
3722
|
+
|
|
3723
|
+
interface MosaicTemplateAgentData {
|
|
3724
|
+
id: string;
|
|
3725
|
+
name: string;
|
|
3726
|
+
description: string;
|
|
3727
|
+
/** Number of agents composing this template. Formatted by the host via `agentCountLabel`. */
|
|
3728
|
+
agentCount: number;
|
|
3729
|
+
/** Raw usage count. Formatted by the host via `formatUsageCount`. */
|
|
3730
|
+
usageCount: number;
|
|
3731
|
+
/** Free-form category string — host-owned taxonomy, never a library enum. */
|
|
3732
|
+
category?: string;
|
|
3733
|
+
tags?: string[];
|
|
3734
|
+
}
|
|
3735
|
+
interface MosaicTemplateAgentCardProps {
|
|
3736
|
+
template: MosaicTemplateAgentData;
|
|
3737
|
+
isSelected?: boolean;
|
|
3738
|
+
onSelect: (template: MosaicTemplateAgentData) => void;
|
|
3739
|
+
onPreview?: (template: MosaicTemplateAgentData) => void;
|
|
3740
|
+
onDuplicate?: (template: MosaicTemplateAgentData) => void;
|
|
3741
|
+
/** Optional leading icon — host-owned, no default (no icon-library dependency here). */
|
|
3742
|
+
icon?: React.ReactNode;
|
|
3743
|
+
/**
|
|
3744
|
+
* Accessible name for the card's clickable "select" button. Required —
|
|
3745
|
+
* host-owned (e.g. `t("templates.select", { name: template.name })`).
|
|
3746
|
+
*/
|
|
3747
|
+
selectAriaLabel: string;
|
|
3748
|
+
/**
|
|
3749
|
+
* Fully-formatted agent-count caption (e.g. "3 agents"). Required — the
|
|
3750
|
+
* host owns pluralization and language, the library never counts words.
|
|
3751
|
+
*/
|
|
3752
|
+
agentCountLabel: string;
|
|
3753
|
+
/**
|
|
3754
|
+
* Formatter producing the usage-count caption from `template.usageCount`.
|
|
3755
|
+
* Required — always called, even when the count is 0; a host that wants
|
|
3756
|
+
* the badge hidden at 0 returns `null` from this formatter itself.
|
|
3757
|
+
*/
|
|
3758
|
+
formatUsageCount: (count: number) => React.ReactNode;
|
|
3759
|
+
/**
|
|
3760
|
+
* Formatter producing the "+N" overflow caption when a template has more
|
|
3761
|
+
* than 3 tags. Required — host-owned (e.g. `(n) => \`+\${n}\`` or a
|
|
3762
|
+
* pluralized `t()` call).
|
|
3763
|
+
*/
|
|
3764
|
+
formatMoreTags: (count: number) => React.ReactNode;
|
|
3765
|
+
/** aria-label for the preview action. Required, no default. */
|
|
3766
|
+
previewAriaLabel: string;
|
|
3767
|
+
/** aria-label for the duplicate action. Required, no default. */
|
|
3768
|
+
duplicateAriaLabel: string;
|
|
3769
|
+
className?: string;
|
|
3770
|
+
/** React 19 ref prop — forwarded to the root element. */
|
|
3771
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
3772
|
+
}
|
|
3773
|
+
/**
|
|
3774
|
+
* MosaicTemplateAgentCard — production template preview card for
|
|
3775
|
+
* @vantageos/mosaic-blocks. Presentational and controlled: it renders a
|
|
3776
|
+
* template's identity and metadata and reports intents (`onSelect`,
|
|
3777
|
+
* `onPreview`, `onDuplicate`) — it never decides anything about the data.
|
|
3778
|
+
*
|
|
3779
|
+
* @example
|
|
3780
|
+
* <MosaicTemplateAgentCard
|
|
3781
|
+
* template={template}
|
|
3782
|
+
* isSelected={selectedId === template.id}
|
|
3783
|
+
* onSelect={(t) => setSelectedId(t.id)}
|
|
3784
|
+
* onPreview={(t) => openPreview(t)}
|
|
3785
|
+
* onDuplicate={(t) => duplicateTemplate(t)}
|
|
3786
|
+
* selectAriaLabel={t("templates.select", { name: template.name })}
|
|
3787
|
+
* agentCountLabel={t("templates.agentCount", { count: template.agentCount })}
|
|
3788
|
+
* formatUsageCount={(count) => (count > 0 ? t("templates.uses", { count }) : null)}
|
|
3789
|
+
* formatMoreTags={(count) => `+${count}`}
|
|
3790
|
+
* previewAriaLabel={t("templates.preview")}
|
|
3791
|
+
* duplicateAriaLabel={t("templates.duplicate")}
|
|
3792
|
+
* />
|
|
3793
|
+
*/
|
|
3794
|
+
declare function MosaicTemplateAgentCard({ template, isSelected, onSelect, onPreview, onDuplicate, icon, selectAriaLabel, agentCountLabel, formatUsageCount, formatMoreTags, previewAriaLabel, duplicateAriaLabel, className, ref, }: MosaicTemplateAgentCardProps): React.JSX.Element;
|
|
3795
|
+
declare namespace MosaicTemplateAgentCard {
|
|
3796
|
+
var displayName: string;
|
|
3797
|
+
}
|
|
3798
|
+
|
|
3799
|
+
/**
|
|
3800
|
+
* templateAgentCardVariants — pure CVA variant functions for MosaicTemplateAgentCard.
|
|
3801
|
+
*
|
|
3802
|
+
* Isolated in their own module so they can be re-exported from the
|
|
3803
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in React.
|
|
3804
|
+
*
|
|
3805
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
3806
|
+
*/
|
|
3807
|
+
/** Root card container variants — selected state only. */
|
|
3808
|
+
declare const templateAgentCardVariants: (props?: ({
|
|
3809
|
+
selected?: boolean | null | undefined;
|
|
3810
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
3811
|
+
/** Category / agent-count / usage-count badge. */
|
|
3812
|
+
declare const templateAgentCardBadgeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
3813
|
+
/** Tag chip, including the "+N" overflow chip. */
|
|
3814
|
+
declare const templateAgentCardTagVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
3815
|
+
|
|
3350
3816
|
/**
|
|
3351
3817
|
* MosaicSelectorModal — generic searchable item picker modal
|
|
3352
3818
|
*
|
|
@@ -7131,4 +7597,160 @@ declare const tagInputRemoveButtonVariants: (props?: class_variance_authority_ty
|
|
|
7131
7597
|
/** Bare text input where new tags are typed. */
|
|
7132
7598
|
declare const tagInputFieldVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
7133
7599
|
|
|
7134
|
-
export { type Breakpoint, type DeviceContextValue, type Feature3ColItem, type FeatureItem, type FooterColumn, type FooterLink, type HeroCta, type LogoItem, MosaicAccordion, MosaicAccordionItem, type MosaicAccordionItemProps, MosaicAccordionPanel, type MosaicAccordionPanelProps, type MosaicAccordionProps, MosaicAccordionTrigger, type MosaicAccordionTriggerProps, type MosaicActionAccent, type MosaicActivity, MosaicActivityFeed, type MosaicActivityFeedProps, MosaicActivityItem, type MosaicActivityItemProps, type MosaicActivityStatus, MosaicAdaptiveGrid, type MosaicAdaptiveGridProps, MosaicAdaptiveModal, type MosaicAdaptiveModalProps, MosaicAdaptiveNavigation, type MosaicAdaptiveNavigationProps, MosaicAgentCard, type MosaicAgentCardProps, MosaicAgentChat, type MosaicAgentChatApprovalLabels, type MosaicAgentChatApprovalRequest, type MosaicAgentChatApprovalResponsePayload, type MosaicAgentChatMessage, type MosaicAgentChatMessagePart, type MosaicAgentChatProps, type MosaicAgentChatState, type MosaicAgentChatToolPart, type MosaicAgentChatToolPartState, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, type MosaicAgentComposerMobileProps, type MosaicAgentComposerProps, type MosaicAgentData, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, type MosaicAgentListProps, type MosaicAgentPreset, MosaicAgentTeamPreview, type MosaicAgentTeamPreviewProps, MosaicAnimatedList, type MosaicAnimatedListProps, MosaicApiKeyPanel, type MosaicApiKeyPanelProps, type MosaicApiKeyPanelProvider, type MosaicApiKeyPanelState, MosaicAppSidebar, type MosaicAppSidebarProps, MosaicApprovalPrompt, type MosaicApprovalPromptProps, type MosaicApprovalPromptState, MosaicAvatar, type MosaicAvatarProps, MosaicBadge, type MosaicBadgeProps, MosaicBlurredOrb, type MosaicBlurredOrbProps, type MosaicBreadcrumb, MosaicButton, type MosaicButtonProps, MosaicCard, MosaicCardContent, type MosaicCardContentProps, MosaicCardDescription, type MosaicCardDescriptionProps, MosaicCardFooter, type MosaicCardFooterProps, MosaicCardHeader, type MosaicCardHeaderProps, type MosaicCardProps, MosaicCardTitle, type MosaicCardTitleProps, MosaicChatComposer, type MosaicChatComposerProps, type MosaicChatComposerState, MosaicChatMessage, type MosaicChatMessageAttachmentPart, type MosaicChatMessagePart, type MosaicChatMessageProps, type MosaicChatMessageReasoningPart, type MosaicChatMessageSenderRole, type MosaicChatMessageTextPart, type MosaicChatMessageToolPart, type MosaicChatMessageToolState, type MosaicChatMessageToolStatusLabels, MosaicChatThread, type MosaicChatThreadProps, MosaicCheckbox, type MosaicCheckboxProps, type MosaicClerkMembership, MosaicClerkOrgSwitcher, type MosaicClerkOrgSwitcherProps, type MosaicClerkOrganization, MosaicClerkWebhookHandler, type MosaicClerkWebhookHandlerOptions, MosaicCollapsible, MosaicCollapsiblePanel, type MosaicCollapsiblePanelProps, type MosaicCollapsibleProps, MosaicCollapsibleTrigger, type MosaicCollapsibleTriggerProps, MosaicCombobox, type MosaicComboboxItem, type MosaicComboboxProps, type MosaicComposerModel, type MosaicComposerModule, MosaicCounter, type MosaicCounterProps, MosaicCreateOrgDialog, type MosaicCreateOrgDialogProps, MosaicDashboardContent, type MosaicDashboardContentProps, MosaicDashboardHeader, type MosaicDashboardHeaderProps, MosaicDashboardLayout, type MosaicDashboardLayoutProps, type MosaicDashboardView, MosaicDataTable, type MosaicDataTableColumn, type MosaicDataTablePagination, type MosaicDataTableProps, MosaicDeleteConfirmationDialog, type MosaicDeleteConfirmationDialogProps, MosaicDeviceProvider, type MosaicDeviceProviderProps, MosaicDocumentUpload, type MosaicDocumentUploadFile, type MosaicDocumentUploadFileStatus, type MosaicDocumentUploadProps, MosaicDropdownMenu, type MosaicDropdownMenuItem, type MosaicDropdownMenuProps, MosaicEmptyState, type MosaicEmptyStateProps, MosaicFallingPattern, type MosaicFallingPatternProps, MosaicFeature3Col, type MosaicFeature3ColProps, MosaicFeatureCenteredMedia, type MosaicFeatureCenteredMediaProps, MosaicField, MosaicFieldControl, type MosaicFieldControlProps, MosaicFieldDescription, type MosaicFieldDescriptionProps, MosaicFieldError, type MosaicFieldErrorProps, MosaicFieldLabel, type MosaicFieldLabelProps, type MosaicFieldProps, MosaicFilterBar, type MosaicFilterBarProps, type MosaicFilterOption, MosaicFilterSidebar, type MosaicFilterSidebarProps, MosaicFooterSimple, type MosaicFooterSimpleProps, MosaicHeroSplit, type MosaicHeroSplitProps, MosaicInput, MosaicInputGroup, type MosaicInputGroupProps, type MosaicInputProps, MosaicIntegrationsBadge, type MosaicIntegrationsBadgeProps, MosaicInviteMemberDialog, type MosaicInviteMemberDialogProps, MosaicKanbanBoard, type MosaicKanbanBoardProps, MosaicKanbanColumn, type MosaicKanbanColumnProps, MosaicLogosGrid, type MosaicLogosGridProps, MosaicMainNav, type MosaicMainNavProps, MosaicMarkdown, type MosaicMarkdownProps, type MosaicMarketplaceItem, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, type MosaicMarketplaceListProps, MosaicMemberList, type MosaicMemberListProps, MosaicMemoryCard, type MosaicMemoryCardProps, type MosaicMemoryData, type MosaicMemoryScope, type MosaicMemorySource, type MosaicMessage, MosaicMessageCard, type MosaicMessageCardProps, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, type MosaicMessageListProps, type MosaicMessageReactions, type MosaicMessageSender, type MosaicMessageSenderType, MosaicModuleCard, type MosaicModuleCardProps, type MosaicModuleData, MosaicModuleForm, type MosaicModuleFormField, type MosaicModuleFormProps, type MosaicModuleItem, MosaicModuleLibrary, type MosaicModuleLibraryProps, type MosaicModuleType, MosaicMultiOrgIndicator, type MosaicMultiOrgIndicatorProps, MosaicMultiTenantProvider, type MosaicMultiTenantProviderProps, type MosaicNavItem, MosaicNavbar, type MosaicNavbarProps, type MosaicNavigationItem, type MosaicOrg, type MosaicOrgInfo, type MosaicOrgMember, MosaicOrgPanel, type MosaicOrgPanelProps, type MosaicOrgPanelTab, MosaicOrgProfilePage, type MosaicOrgProfilePageProps, type MosaicOrgRole, MosaicOrgRoleBadge, type MosaicOrgRoleBadgeProps, type MosaicOrgStats, MosaicOrgSwitcher, type MosaicOrgSwitcherProps, MosaicPdfViewer, type MosaicPdfViewerProps, type MosaicSelectItem as MosaicPrefSelectItem, type MosaicPreference, type MosaicPreferenceGroup, MosaicPreferencesPanel, type MosaicPreferencesPanelProps, MosaicPricingCard, type MosaicPricingCardProps, type MosaicProfileField, MosaicProfilePanel, type MosaicProfilePanelProps, MosaicProgress, type MosaicProgressProps, type MosaicQuickAction$1 as MosaicQuickAction, MosaicQuickActionCard, type MosaicQuickActionCardProps, MosaicQuickActionsMenu, type MosaicQuickAction as MosaicQuickActionsMenuItem, type MosaicQuickActionsMenuProps, type MosaicQuickAgent, MosaicQuickAgentSelector, type MosaicQuickAgentSelectorProps, MosaicQuickStartPanel, type MosaicQuickStartPanelProps, MosaicRadioGroup, MosaicRadioGroupItem, type MosaicRadioGroupItemProps, type MosaicRadioGroupProps, MosaicResizableSplitPane, type MosaicResizableSplitPaneProps, type MosaicScenario, MosaicScrollArea, type MosaicScrollAreaProps, MosaicSelect, type MosaicSelectItem$1 as MosaicSelectItem, type MosaicSelectProps, type MosaicSelectorCategory, type MosaicSelectorItem, MosaicSelectorModal, type MosaicSelectorModalProps, MosaicSeparator, type MosaicSeparatorProps, type MosaicSidebarFooterStatus, type MosaicSidebarNavItem, type MosaicSidebarQuickAction, type MosaicSidebarRecentItem, MosaicSignInLayout, type MosaicSignInLayoutProps, MosaicSignUpLayout, type MosaicSignUpLayoutProps, MosaicSkeleton, type MosaicSkeletonProps, MosaicSlider, type MosaicSliderProps, type MosaicStatItem, MosaicStatsGrid, type MosaicStatsGridProps, type MosaicStep, MosaicStepPipeline, type MosaicStepPipelineDotsProps, type MosaicStepPipelineProps, type MosaicStepPipelineSegmentsProps, type MosaicStepStatus, MosaicSwitch, type MosaicSwitchProps, MosaicTabs, MosaicTabsList, type MosaicTabsListProps, MosaicTabsPanel, type MosaicTabsPanelProps, type MosaicTabsProps, MosaicTabsTrigger, type MosaicTabsTriggerProps, MosaicTagInput, type MosaicTagInputProps, type MosaicTemplate, type MosaicTemplateAgent, MosaicTemplateCard, type MosaicTemplateCardProps, MosaicTemplateGallery, type MosaicTemplateGalleryProps, type MosaicTemplateMetadata, MosaicTemplatePreview, type MosaicTemplatePreviewProps, MosaicTestimonialsGrid, type MosaicTestimonialsGridProps, MosaicTextarea, type MosaicTextareaProps, MosaicThemeProvider, type MosaicThemeProviderProps, MosaicThemeToggle, type MosaicThemeToggleProps, MosaicToast, type MosaicToastProps, MosaicToastProvider, type MosaicToastProviderPosition, type MosaicToastProviderProps, type MosaicToastVariant, MosaicToolToggleList, type MosaicToolToggleListApprovalLevel, type MosaicToolToggleListProps, type MosaicToolToggleListSection, type MosaicToolToggleListTool, MosaicTooltip, MosaicTooltipContent, type MosaicTooltipContentProps, type MosaicTooltipProps, MosaicTooltipProvider, type MosaicTooltipProviderProps, MosaicTooltipRoot, type MosaicTooltipRootProps, MosaicTooltipTrigger, type MosaicTooltipTriggerProps, MosaicUrlScraper, type MosaicUrlScraperContent, type MosaicUrlScraperProps, type MosaicUrlScraperState, MosaicUserButton, type MosaicUserButtonProps, type MosaicWorkspaceContext, type NavCta, type NavLink, type OrbPosition, type Orientation, Placeholder, type PricingCta, type SocialLink, type StatItem, type TestimonialItem, type Theme, agentChatRootVariants, badgeVariants, buttonVariants, chatMessageBubbleVariants, chatMessageContainerVariants, chatMessageToolStatusVariants, pdfViewerFrameVariants, pdfViewerStatusVariants, pdfViewerToolbarButtonVariants, skeletonVariants, splitPaneCollapseButtonVariants, splitPaneHandleVariants, splitPaneRootVariants, tagInputFieldVariants, tagInputRemoveButtonVariants, tagInputRootVariants, tagInputTagVariants, toastCardVariants, toastDismissButtonVariants, toastProviderPositionVariants, toastTitleVariants, toolToggleListRowVariants, toolToggleListSectionVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
|
|
7600
|
+
interface MosaicDrawerProps {
|
|
7601
|
+
/** Controlled open state — the host owns the truth. */
|
|
7602
|
+
open: boolean;
|
|
7603
|
+
/** Controlled state setter, called on every open/close intent. */
|
|
7604
|
+
onOpenChange: (open: boolean) => void;
|
|
7605
|
+
/**
|
|
7606
|
+
* Visible drawer title, wired to `aria-labelledby`. Required — no
|
|
7607
|
+
* default, no fallback. The host supplies the localized string.
|
|
7608
|
+
*/
|
|
7609
|
+
title: string;
|
|
7610
|
+
/**
|
|
7611
|
+
* aria-label for the close button. Required — the host owns the
|
|
7612
|
+
* language (e.g. `t('Drawer.aria.close')`). No default, no fallback.
|
|
7613
|
+
*/
|
|
7614
|
+
closeAriaLabel: string;
|
|
7615
|
+
children: React.ReactNode;
|
|
7616
|
+
/** Panel edge + slide direction. @default "right" */
|
|
7617
|
+
side?: "left" | "right" | "top" | "bottom";
|
|
7618
|
+
className?: string;
|
|
7619
|
+
}
|
|
7620
|
+
/**
|
|
7621
|
+
* MosaicDrawer — side panel showing agent (or any record) detail without
|
|
7622
|
+
* covering the list behind it.
|
|
7623
|
+
*
|
|
7624
|
+
* @example
|
|
7625
|
+
* // Host owns i18n (e.g. next-intl) — title/closeAriaLabel always required.
|
|
7626
|
+
* <MosaicDrawer
|
|
7627
|
+
* open={open}
|
|
7628
|
+
* onOpenChange={setOpen}
|
|
7629
|
+
* title={agent.name}
|
|
7630
|
+
* closeAriaLabel={t('Drawer.aria.close')}
|
|
7631
|
+
* side="right"
|
|
7632
|
+
* >
|
|
7633
|
+
* <p>Agent detail body</p> // allow-hardcode-i18n: JSDoc @example doc comment, not shipped code
|
|
7634
|
+
* </MosaicDrawer>
|
|
7635
|
+
*/
|
|
7636
|
+
declare function MosaicDrawer({ open, onOpenChange, title, closeAriaLabel, children, side, className, }: MosaicDrawerProps): React.JSX.Element;
|
|
7637
|
+
declare namespace MosaicDrawer {
|
|
7638
|
+
var displayName: string;
|
|
7639
|
+
}
|
|
7640
|
+
|
|
7641
|
+
/**
|
|
7642
|
+
* drawerVariants — pure CVA variant functions for MosaicDrawer.
|
|
7643
|
+
*
|
|
7644
|
+
* Isolated in their own module so they can be re-exported from the
|
|
7645
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in React.
|
|
7646
|
+
*
|
|
7647
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
7648
|
+
*/
|
|
7649
|
+
/** Popup panel — position + slide direction depend on `side`. */
|
|
7650
|
+
declare const drawerPopupVariants: (props?: ({
|
|
7651
|
+
side?: "top" | "left" | "bottom" | "right" | null | undefined;
|
|
7652
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
7653
|
+
/** Backdrop overlay behind the popup. */
|
|
7654
|
+
declare const drawerBackdropVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
7655
|
+
|
|
7656
|
+
/**
|
|
7657
|
+
* MosaicTemplateCategoryChips — presentational horizontal chip row filtering
|
|
7658
|
+
* agent-templates by category.
|
|
7659
|
+
*
|
|
7660
|
+
* Ported from any-debate-ai `components/templates/shared/
|
|
7661
|
+
* TemplateCategoryChips.tsx` (source read verbatim via `gh api repos/
|
|
7662
|
+
* elpiarthera/any-debate-ai/contents/components/templates/shared/
|
|
7663
|
+
* TemplateCategoryChips.tsx`). That source hardcodes the `"All"` sentinel
|
|
7664
|
+
* string in its prop type (`TemplateCategory | "All"`) and imports a closed
|
|
7665
|
+
* `TemplateCategory` union from `@/lib/templates/types` — both a business
|
|
7666
|
+
* taxonomy AND a business copy string baked into the component. It also
|
|
7667
|
+
* omits scroll-fade / arrow chrome handling from this port (that is
|
|
7668
|
+
* presentation-shell concern, not the filter atom itself) and drops the
|
|
7669
|
+
* `useDevice()` mobile/desktop branch — a single responsive `flex-wrap` row
|
|
7670
|
+
* covers both, since this library never assumes a host's device-detection
|
|
7671
|
+
* context exists.
|
|
7672
|
+
*
|
|
7673
|
+
* Differentiator (the whole point of this component): the category
|
|
7674
|
+
* catalogue — including any "All" / "Tous" pseudo-category — is 100%
|
|
7675
|
+
* host-supplied DATA (`categories` prop). This library has never heard of a
|
|
7676
|
+
* single business category name; a client with a different vertical (legal,
|
|
7677
|
+
* healthcare, e-commerce) supplies its own list without touching this
|
|
7678
|
+
* package.
|
|
7679
|
+
*
|
|
7680
|
+
* Controlled component: no internal selection state. `selected` +
|
|
7681
|
+
* `onSelect` are host-owned; the host re-renders with the new selection
|
|
7682
|
+
* after handling the callback.
|
|
7683
|
+
*
|
|
7684
|
+
* No "use client" — prepend-use-client.mjs adds it to dist.
|
|
7685
|
+
* Design tokens: --primary, --primary-foreground, --background,
|
|
7686
|
+
* --foreground, --border, --muted, --ring.
|
|
7687
|
+
* a11y: every chip is a real `<button>` (keyboard-activatable natively —
|
|
7688
|
+
* Enter/Space), and the selected chip announces `aria-pressed="true"` so
|
|
7689
|
+
* screen-reader users get the selection state without relying on color
|
|
7690
|
+
* alone.
|
|
7691
|
+
* Bilingual: every category label is host-supplied data — zero hardcoded
|
|
7692
|
+
* copy, zero default (including the "All" / "Tous" sentinel).
|
|
7693
|
+
*
|
|
7694
|
+
* @example
|
|
7695
|
+
* <MosaicTemplateCategoryChips
|
|
7696
|
+
* categories={[
|
|
7697
|
+
* { id: "all", label: "Toutes" },
|
|
7698
|
+
* { id: "business", label: "Business" },
|
|
7699
|
+
* { id: "creative", label: "Créatif" },
|
|
7700
|
+
* ]}
|
|
7701
|
+
* selected={selectedCategoryId}
|
|
7702
|
+
* onSelect={(id) => setSelectedCategoryId(id)}
|
|
7703
|
+
* />
|
|
7704
|
+
*/
|
|
7705
|
+
|
|
7706
|
+
/**
|
|
7707
|
+
* One selectable category. The library knows nothing about any category by
|
|
7708
|
+
* name — including the "show everything" pseudo-category, which is just
|
|
7709
|
+
* another host-supplied entry (e.g. `{ id: "all", label: "All" }`).
|
|
7710
|
+
*/
|
|
7711
|
+
interface MosaicTemplateCategory {
|
|
7712
|
+
/** Stable identifier, matched against `selected` and passed to `onSelect`. */
|
|
7713
|
+
id: string;
|
|
7714
|
+
/** Host-supplied, host-localized display label. No built-in taxonomy. */
|
|
7715
|
+
label: string;
|
|
7716
|
+
}
|
|
7717
|
+
interface MosaicTemplateCategoryChipsProps {
|
|
7718
|
+
/** Full open catalogue of categories — a PROP, never a library constant. */
|
|
7719
|
+
categories: MosaicTemplateCategory[];
|
|
7720
|
+
/** Currently selected category id. Controlled by the host. */
|
|
7721
|
+
selected: string;
|
|
7722
|
+
/** Called with the category id when a chip is activated. */
|
|
7723
|
+
onSelect: (id: string) => void;
|
|
7724
|
+
/** Additional Tailwind classes on the root element. */
|
|
7725
|
+
className?: string;
|
|
7726
|
+
/** React 19 ref prop — forwarded to the root element. */
|
|
7727
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
7728
|
+
}
|
|
7729
|
+
/**
|
|
7730
|
+
* MosaicTemplateCategoryChips — production template-filter atom for
|
|
7731
|
+
* @vantageos/mosaic-blocks.
|
|
7732
|
+
*
|
|
7733
|
+
* Purely presentational: renders one real `<button>` per host-supplied
|
|
7734
|
+
* category, reports every activation via `onSelect`. No network call, no
|
|
7735
|
+
* internal state, no hardcoded category catalogue.
|
|
7736
|
+
*/
|
|
7737
|
+
declare function MosaicTemplateCategoryChips({ categories, selected, onSelect, className, ref, }: MosaicTemplateCategoryChipsProps): React.JSX.Element;
|
|
7738
|
+
declare namespace MosaicTemplateCategoryChips {
|
|
7739
|
+
var displayName: string;
|
|
7740
|
+
}
|
|
7741
|
+
|
|
7742
|
+
/**
|
|
7743
|
+
* templateCategoryChipVariants — pure CVA variant function for
|
|
7744
|
+
* MosaicTemplateCategoryChips.
|
|
7745
|
+
*
|
|
7746
|
+
* Isolated in its own module so it can be re-exported from the
|
|
7747
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in React.
|
|
7748
|
+
*
|
|
7749
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
7750
|
+
*/
|
|
7751
|
+
/** One category chip button — selected vs. unselected tone. */
|
|
7752
|
+
declare const templateCategoryChipVariants: (props?: ({
|
|
7753
|
+
selected?: boolean | null | undefined;
|
|
7754
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
7755
|
+
|
|
7756
|
+
export { type Breakpoint, type DeviceContextValue, type Feature3ColItem, type FeatureItem, type FooterColumn, type FooterLink, type HeroCta, type LogoItem, MosaicAccordion, MosaicAccordionItem, type MosaicAccordionItemProps, MosaicAccordionPanel, type MosaicAccordionPanelProps, type MosaicAccordionProps, MosaicAccordionTrigger, type MosaicAccordionTriggerProps, type MosaicActionAccent, type MosaicActivity, MosaicActivityFeed, type MosaicActivityFeedProps, MosaicActivityItem, type MosaicActivityItemProps, type MosaicActivityStatus, MosaicAdaptiveGrid, type MosaicAdaptiveGridProps, MosaicAdaptiveModal, type MosaicAdaptiveModalProps, MosaicAdaptiveNavigation, type MosaicAdaptiveNavigationProps, MosaicAgentCard, type MosaicAgentCardProps, MosaicAgentChat, type MosaicAgentChatApprovalLabels, type MosaicAgentChatApprovalRequest, type MosaicAgentChatApprovalResponsePayload, type MosaicAgentChatMessage, type MosaicAgentChatMessagePart, type MosaicAgentChatProps, type MosaicAgentChatState, type MosaicAgentChatToolPart, type MosaicAgentChatToolPartState, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, type MosaicAgentComposerMobileProps, type MosaicAgentComposerProps, type MosaicAgentData, MosaicAgentEditor, type MosaicAgentEditorProps, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, type MosaicAgentListProps, type MosaicAgentPreset, MosaicAgentPreview, type MosaicAgentPreviewAttribute, type MosaicAgentPreviewDetailedProps, type MosaicAgentPreviewProps, type MosaicAgentPreviewSummaryProps, MosaicAgentTeamPreview, type MosaicAgentTeamPreviewProps, MosaicAlertDialog, MosaicAlertDialogAction, type MosaicAlertDialogActionProps, MosaicAlertDialogCancel, type MosaicAlertDialogCancelProps, MosaicAlertDialogContent, type MosaicAlertDialogContentProps, MosaicAlertDialogDescription, type MosaicAlertDialogDescriptionProps, MosaicAlertDialogFooter, MosaicAlertDialogHeader, MosaicAlertDialogOverlay, type MosaicAlertDialogOverlayProps, MosaicAlertDialogPortal, MosaicAlertDialogTitle, type MosaicAlertDialogTitleProps, MosaicAlertDialogTrigger, MosaicAnimatedList, type MosaicAnimatedListProps, MosaicApiKeyPanel, type MosaicApiKeyPanelProps, type MosaicApiKeyPanelProvider, type MosaicApiKeyPanelState, MosaicAppSidebar, type MosaicAppSidebarProps, MosaicApprovalPrompt, type MosaicApprovalPromptProps, type MosaicApprovalPromptState, MosaicAvatar, type MosaicAvatarProps, MosaicBadge, type MosaicBadgeProps, MosaicBlurredOrb, type MosaicBlurredOrbProps, type MosaicBreadcrumb, MosaicButton, type MosaicButtonProps, MosaicCard, MosaicCardContent, type MosaicCardContentProps, MosaicCardDescription, type MosaicCardDescriptionProps, MosaicCardFooter, type MosaicCardFooterProps, MosaicCardHeader, type MosaicCardHeaderProps, type MosaicCardProps, MosaicCardTitle, type MosaicCardTitleProps, MosaicChatComposer, type MosaicChatComposerProps, type MosaicChatComposerState, MosaicChatMessage, type MosaicChatMessageAttachmentPart, type MosaicChatMessagePart, type MosaicChatMessageProps, type MosaicChatMessageReasoningPart, type MosaicChatMessageSenderRole, type MosaicChatMessageTextPart, type MosaicChatMessageToolPart, type MosaicChatMessageToolState, type MosaicChatMessageToolStatusLabels, MosaicChatThread, type MosaicChatThreadProps, MosaicCheckbox, type MosaicCheckboxProps, type MosaicClerkMembership, MosaicClerkOrgSwitcher, type MosaicClerkOrgSwitcherProps, type MosaicClerkOrganization, MosaicClerkWebhookHandler, type MosaicClerkWebhookHandlerOptions, MosaicCollapsible, MosaicCollapsiblePanel, type MosaicCollapsiblePanelProps, type MosaicCollapsibleProps, MosaicCollapsibleTrigger, type MosaicCollapsibleTriggerProps, MosaicCombobox, type MosaicComboboxItem, type MosaicComboboxProps, type MosaicComposerModel, type MosaicComposerModule, MosaicCounter, type MosaicCounterProps, MosaicCreateOrgDialog, type MosaicCreateOrgDialogProps, MosaicDashboardContent, type MosaicDashboardContentProps, MosaicDashboardHeader, type MosaicDashboardHeaderProps, MosaicDashboardLayout, type MosaicDashboardLayoutProps, type MosaicDashboardView, MosaicDataTable, type MosaicDataTableColumn, type MosaicDataTablePagination, type MosaicDataTableProps, MosaicDeleteConfirmationDialog, type MosaicDeleteConfirmationDialogProps, MosaicDeviceProvider, type MosaicDeviceProviderProps, MosaicDocumentUpload, type MosaicDocumentUploadFile, type MosaicDocumentUploadFileStatus, type MosaicDocumentUploadProps, MosaicDrawer, type MosaicDrawerProps, MosaicDropdownMenu, type MosaicDropdownMenuItem, type MosaicDropdownMenuProps, MosaicEmptyState, type MosaicEmptyStateProps, MosaicFallingPattern, type MosaicFallingPatternProps, MosaicFeature3Col, type MosaicFeature3ColProps, MosaicFeatureCenteredMedia, type MosaicFeatureCenteredMediaProps, MosaicField, MosaicFieldControl, type MosaicFieldControlProps, MosaicFieldDescription, type MosaicFieldDescriptionProps, MosaicFieldError, type MosaicFieldErrorProps, MosaicFieldLabel, type MosaicFieldLabelProps, type MosaicFieldProps, MosaicFilterBar, type MosaicFilterBarProps, type MosaicFilterOption, MosaicFilterSidebar, type MosaicFilterSidebarProps, MosaicFooterSimple, type MosaicFooterSimpleProps, MosaicHeroSplit, type MosaicHeroSplitProps, MosaicInput, MosaicInputGroup, type MosaicInputGroupProps, type MosaicInputProps, MosaicIntegrationsBadge, type MosaicIntegrationsBadgeProps, MosaicInviteMemberDialog, type MosaicInviteMemberDialogProps, MosaicKanbanBoard, type MosaicKanbanBoardProps, MosaicKanbanColumn, type MosaicKanbanColumnProps, MosaicLogosGrid, type MosaicLogosGridProps, MosaicMainNav, type MosaicMainNavProps, MosaicMarkdown, type MosaicMarkdownProps, type MosaicMarketplaceItem, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, type MosaicMarketplaceListProps, MosaicMemberList, type MosaicMemberListProps, MosaicMemoryCard, type MosaicMemoryCardProps, type MosaicMemoryData, type MosaicMemoryScope, type MosaicMemorySource, type MosaicMessage, MosaicMessageCard, type MosaicMessageCardProps, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, type MosaicMessageListProps, type MosaicMessageReactions, type MosaicMessageSender, type MosaicMessageSenderType, type MosaicModelOption, MosaicModelSelector, type MosaicModelSelectorProps, MosaicModuleCard, type MosaicModuleCardProps, type MosaicModuleData, MosaicModuleForm, type MosaicModuleFormField, type MosaicModuleFormProps, type MosaicModuleItem, MosaicModuleLibrary, type MosaicModuleLibraryProps, type MosaicModuleType, MosaicMultiOrgIndicator, type MosaicMultiOrgIndicatorProps, MosaicMultiTenantProvider, type MosaicMultiTenantProviderProps, type MosaicNavItem, MosaicNavbar, type MosaicNavbarProps, type MosaicNavigationItem, type MosaicOrg, type MosaicOrgInfo, type MosaicOrgMember, MosaicOrgPanel, type MosaicOrgPanelProps, type MosaicOrgPanelTab, MosaicOrgProfilePage, type MosaicOrgProfilePageProps, type MosaicOrgRole, MosaicOrgRoleBadge, type MosaicOrgRoleBadgeProps, type MosaicOrgStats, MosaicOrgSwitcher, type MosaicOrgSwitcherProps, MosaicPdfViewer, type MosaicPdfViewerProps, type MosaicSelectItem as MosaicPrefSelectItem, type MosaicPreference, type MosaicPreferenceGroup, MosaicPreferencesPanel, type MosaicPreferencesPanelProps, MosaicPricingCard, type MosaicPricingCardProps, type MosaicProfileField, MosaicProfilePanel, type MosaicProfilePanelProps, MosaicProgress, type MosaicProgressProps, type MosaicQuickAction$1 as MosaicQuickAction, MosaicQuickActionCard, type MosaicQuickActionCardProps, MosaicQuickActionsMenu, type MosaicQuickAction as MosaicQuickActionsMenuItem, type MosaicQuickActionsMenuProps, type MosaicQuickAgent, MosaicQuickAgentSelector, type MosaicQuickAgentSelectorProps, MosaicQuickStartPanel, type MosaicQuickStartPanelProps, MosaicRadioGroup, MosaicRadioGroupItem, type MosaicRadioGroupItemProps, type MosaicRadioGroupProps, MosaicResizableSplitPane, type MosaicResizableSplitPaneProps, type MosaicScenario, MosaicScrollArea, type MosaicScrollAreaProps, MosaicSelect, type MosaicSelectItem$1 as MosaicSelectItem, type MosaicSelectProps, type MosaicSelectorCategory, type MosaicSelectorItem, MosaicSelectorModal, type MosaicSelectorModalProps, MosaicSeparator, type MosaicSeparatorProps, type MosaicSidebarFooterStatus, type MosaicSidebarNavItem, type MosaicSidebarQuickAction, type MosaicSidebarRecentItem, MosaicSignInLayout, type MosaicSignInLayoutProps, MosaicSignUpLayout, type MosaicSignUpLayoutProps, MosaicSkeleton, type MosaicSkeletonProps, MosaicSlider, type MosaicSliderProps, type MosaicStatItem, MosaicStatsGrid, type MosaicStatsGridProps, type MosaicStep, MosaicStepPipeline, type MosaicStepPipelineDotsProps, type MosaicStepPipelineProps, type MosaicStepPipelineSegmentsProps, type MosaicStepStatus, MosaicSwitch, type MosaicSwitchProps, MosaicTabs, MosaicTabsList, type MosaicTabsListProps, MosaicTabsPanel, type MosaicTabsPanelProps, type MosaicTabsProps, MosaicTabsTrigger, type MosaicTabsTriggerProps, MosaicTagInput, type MosaicTagInputProps, type MosaicTemplate, type MosaicTemplateAgent, MosaicTemplateAgentCard, type MosaicTemplateAgentCardProps, type MosaicTemplateAgentData, MosaicTemplateCard, type MosaicTemplateCardProps, type MosaicTemplateCategory, MosaicTemplateCategoryChips, type MosaicTemplateCategoryChipsProps, MosaicTemplateGallery, type MosaicTemplateGalleryProps, type MosaicTemplateMetadata, MosaicTemplatePreview, type MosaicTemplatePreviewProps, MosaicTestimonialsGrid, type MosaicTestimonialsGridProps, MosaicTextarea, type MosaicTextareaProps, MosaicThemeProvider, type MosaicThemeProviderProps, MosaicThemeToggle, type MosaicThemeToggleProps, MosaicToast, type MosaicToastProps, MosaicToastProvider, type MosaicToastProviderPosition, type MosaicToastProviderProps, type MosaicToastVariant, MosaicToolToggleList, type MosaicToolToggleListApprovalLevel, type MosaicToolToggleListProps, type MosaicToolToggleListSection, type MosaicToolToggleListTool, MosaicTooltip, MosaicTooltipContent, type MosaicTooltipContentProps, type MosaicTooltipProps, MosaicTooltipProvider, type MosaicTooltipProviderProps, MosaicTooltipRoot, type MosaicTooltipRootProps, MosaicTooltipTrigger, type MosaicTooltipTriggerProps, MosaicUrlScraper, type MosaicUrlScraperContent, type MosaicUrlScraperProps, type MosaicUrlScraperState, MosaicUserButton, type MosaicUserButtonProps, type MosaicWorkspaceContext, type NavCta, type NavLink, type OrbPosition, type Orientation, Placeholder, type PricingCta, type SocialLink, type StatItem, type TestimonialItem, type Theme, agentChatRootVariants, agentEditorVariants, agentPreviewVariants, alertDialogContentVariants, alertDialogOverlayVariants, badgeVariants, buttonVariants, chatMessageBubbleVariants, chatMessageContainerVariants, chatMessageToolStatusVariants, drawerBackdropVariants, drawerPopupVariants, pdfViewerFrameVariants, pdfViewerStatusVariants, pdfViewerToolbarButtonVariants, skeletonVariants, splitPaneCollapseButtonVariants, splitPaneHandleVariants, splitPaneRootVariants, tagInputFieldVariants, tagInputRemoveButtonVariants, tagInputRootVariants, tagInputTagVariants, templateAgentCardBadgeVariants, templateAgentCardTagVariants, templateAgentCardVariants, templateCategoryChipVariants, toastCardVariants, toastDismissButtonVariants, toastProviderPositionVariants, toastTitleVariants, toolToggleListRowVariants, toolToggleListSectionVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
|