@neuronection/assistant-ui 0.49.0 → 0.50.0
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/CHANGELOG.md +12 -0
- package/README.md +1 -0
- package/dist/admin-user-table.js +1 -1
- package/dist/ai-magic-fill.js +1 -1
- package/dist/{chunk-RXFQZMSF.js → chunk-3YIVKKT6.js} +3 -3
- package/dist/{chunk-RXFQZMSF.js.map → chunk-3YIVKKT6.js.map} +1 -1
- package/dist/{chunk-OIET4P2M.js → chunk-47CRUWHB.js} +4 -4
- package/dist/{chunk-OIET4P2M.js.map → chunk-47CRUWHB.js.map} +1 -1
- package/dist/{chunk-67FLOT4X.js → chunk-5U45TQJE.js} +3 -3
- package/dist/{chunk-67FLOT4X.js.map → chunk-5U45TQJE.js.map} +1 -1
- package/dist/{chunk-WY5TO6R4.js → chunk-6ANLDUGL.js} +3 -3
- package/dist/{chunk-WY5TO6R4.js.map → chunk-6ANLDUGL.js.map} +1 -1
- package/dist/{chunk-PTTJJEYJ.js → chunk-CCFVDJHU.js} +3 -3
- package/dist/{chunk-PTTJJEYJ.js.map → chunk-CCFVDJHU.js.map} +1 -1
- package/dist/{chunk-QUVVOG7K.js → chunk-MFM4W6ZO.js} +3 -3
- package/dist/{chunk-QUVVOG7K.js.map → chunk-MFM4W6ZO.js.map} +1 -1
- package/dist/chunk-SNHU4PV3.js +169 -0
- package/dist/chunk-SNHU4PV3.js.map +1 -0
- package/dist/{chunk-URLF67WR.js → chunk-SVRCZUNQ.js} +6 -2
- package/dist/chunk-SVRCZUNQ.js.map +1 -0
- package/dist/{chunk-BCKOBT7T.js → chunk-UMI4M4MF.js} +3 -3
- package/dist/{chunk-BCKOBT7T.js.map → chunk-UMI4M4MF.js.map} +1 -1
- package/dist/{chunk-YM4YN3YC.js → chunk-X6L5Z5LV.js} +3 -3
- package/dist/{chunk-YM4YN3YC.js.map → chunk-X6L5Z5LV.js.map} +1 -1
- package/dist/combobox.js +1 -1
- package/dist/index.d.ts +59 -1
- package/dist/index.js +25 -24
- package/dist/instance-mode-control.d.ts +62 -0
- package/dist/instance-mode-control.js +3 -0
- package/dist/instance-mode-control.js.map +1 -0
- package/dist/markdown-diff-view.js +1 -1
- package/dist/model-picker.js +1 -1
- package/dist/model-registry.js +1 -1
- package/dist/profile-switcher.js +1 -1
- package/dist/provider-form.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/task-assignment-picker.js +1 -1
- package/package.json +5 -1
- package/dist/chunk-URLF67WR.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/combobox/Combobox.tsx"],"names":["ComboboxPanel","Combobox","ComboboxMulti"],"mappings":";;;;;;;;AAgBA,SAAS,aAAA,CAAc,SAA2B,IAAA,EAAgC;AAChF,EAAA,MAAM,MAAA,GAAS,KAAK,IAAA,EAAK;AACzB,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,OAAO,OAAA;AAAA,EACT;AACA,EAAA,MAAM,MAAA,GAAS,OAAA,CAAQ,OAAA,CAAQ,CAAC,MAAA,KAAW;AACzC,IAAA,IAAI,IAAA,GAAsB,IAAA;AAC1B,IAAA,KAAA,MAAW,MAAA,IAAU,CAAC,MAAA,CAAO,KAAA,EAAO,OAAO,KAAA,EAAO,MAAA,CAAO,WAAA,IAAe,EAAE,CAAA,EAAG;AAC3E,MAAA,MAAM,KAAA,GAAQ,WAAA,CAAY,MAAA,EAAQ,MAAM,CAAA;AACxC,MAAA,IAAI,KAAA,KAAU,IAAA,KAAS,IAAA,KAAS,IAAA,IAAQ,QAAQ,IAAA,CAAA,EAAO;AACrD,QAAA,IAAA,GAAO,KAAA;AAAA,MACT;AAAA,IACF;AACA,IAAA,OAAO,IAAA,KAAS,OAAO,EAAC,GAAI,CAAC,EAAE,MAAA,EAAQ,KAAA,EAAO,IAAA,EAAgB,CAAA;AAAA,EAChE,CAAC,CAAA;AACD,EAAA,MAAA,CAAO,IAAA;AAAA,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AA,EACN;AAAA,OAAA,EACF,CAAA;AAAA,MACC,KAAA,uBACE,GAAA,EAAA,EAAE,IAAA,EAAK,SAAQ,SAAA,EAAU,6CAAA,EACvB,iBACH,CAAA,GACE;AAAA,KAAA,EACN,CAAA;AAAA,EAEJ;AACF","file":"chunk-SVRCZUNQ.js","sourcesContent":["import * as React from 'react'\nimport * as PopoverPrimitive from '@radix-ui/react-popover'\nimport { Check, ChevronDown, Search, X } from 'lucide-react'\nimport { cn } from '../../lib/utils'\nimport { searchScore } from '../../lib/fuzzy'\nimport { Spinner } from '../spinner/Spinner'\n\nexport interface ComboboxOption {\n value: string\n label: string\n description?: string\n group?: string\n badge?: string\n disabled?: boolean\n}\n\nfunction defaultFilter(options: ComboboxOption[], term: string): ComboboxOption[] {\n const needle = term.trim()\n if (!needle) {\n return options\n }\n const scored = options.flatMap((option) => {\n let best: number | null = null\n for (const target of [option.label, option.value, option.description ?? '']) {\n const score = searchScore(needle, target)\n if (score !== null && (best === null || score > best)) {\n best = score\n }\n }\n return best === null ? [] : [{ option, score: best as number }]\n })\n scored.sort(\n (a, b) => b.score - a.score || a.option.label.localeCompare(b.option.label),\n )\n return scored.map((entry) => entry.option)\n}\n\n/** The option appended when `allowCreate` is on and the search term does\n * not exactly match an existing option. `value` is the raw trimmed term. */\nfunction createOption(\n options: ComboboxOption[],\n term: string,\n createLabel?: (term: string) => string,\n): ComboboxOption | null {\n const trimmed = term.trim()\n if (!trimmed) return null\n const needle = trimmed.toLowerCase()\n const exists = options.some(\n (option) =>\n option.value.toLowerCase() === needle ||\n option.label.toLowerCase() === needle,\n )\n if (exists) return null\n return {\n value: trimmed,\n label: createLabel ? createLabel(trimmed) : `Add \"${trimmed}\"`,\n }\n}\n\ninterface ComboboxListProps {\n id: string\n options: ComboboxOption[]\n activeIndex: number\n onActiveIndexChange: (index: number) => void\n selected: (value: string) => boolean\n onPick: (option: ComboboxOption) => void\n emptyLabel?: string\n loading?: boolean\n loadingLabel?: string\n listClassName?: string\n}\n\nfunction ComboboxList({\n id,\n options,\n activeIndex,\n onActiveIndexChange,\n selected,\n onPick,\n emptyLabel = 'No matches',\n loading = false,\n loadingLabel = 'Loading…',\n listClassName,\n}: ComboboxListProps) {\n const rows: React.ReactNode[] = []\n let currentGroup: string | undefined\n options.forEach((option, index) => {\n if (option.group !== undefined && option.group !== currentGroup) {\n currentGroup = option.group\n rows.push(\n <div\n key={`group-${option.group}-${index}`}\n role=\"presentation\"\n className=\"px-2 pb-0.5 pt-2 text-xs font-medium tracking-wide text-[var(--as-muted-fg)] uppercase\"\n >\n {option.group}\n </div>,\n )\n }\n const isSelected = selected(option.value)\n const isActive = index === activeIndex\n rows.push(\n <div\n key={`${option.value}-${index}`}\n id={`${id}-opt-${index}`}\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={option.disabled || undefined}\n data-state={isSelected ? 'checked' : 'unchecked'}\n data-active={isActive || undefined}\n tabIndex={-1}\n className={cn(\n 'flex cursor-pointer items-center justify-between gap-2 rounded-[calc(var(--as-radius-sm)-2px)] px-2 py-1.5 text-sm text-[var(--as-fg)] outline-none',\n isActive && 'bg-[var(--as-secondary)]',\n option.disabled && 'pointer-events-none opacity-50',\n )}\n onMouseMove={() => onActiveIndexChange(index)}\n onClick={() => !option.disabled && onPick(option)}\n >\n <span className=\"flex min-w-0 flex-1 items-center gap-2 text-left\">\n <span className=\"flex min-w-0 flex-col\">\n <span className=\"truncate\">{option.label}</span>\n {option.description ? (\n <span className=\"truncate text-xs text-[var(--as-muted-fg)]\">\n {option.description}\n </span>\n ) : null}\n </span>\n {option.badge ? (\n <span className=\"shrink-0 rounded-full bg-[var(--as-secondary)] px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-[var(--as-secondary-fg)]\">\n {option.badge}\n </span>\n ) : null}\n </span>\n {isSelected ? (\n <Check className=\"size-4 shrink-0 text-[var(--as-primary)]\" aria-hidden />\n ) : null}\n </div>,\n )\n })\n return (\n <div\n id={id}\n role=\"listbox\"\n className={cn('max-h-60 overflow-y-auto p-1', listClassName)}\n >\n {loading ? (\n <div className=\"flex items-center gap-2 px-2 py-3 text-sm text-[var(--as-muted-fg)]\">\n <Spinner />\n {loadingLabel}\n </div>\n ) : options.length === 0 ? (\n <div className=\"px-2 py-3 text-center text-sm text-[var(--as-muted-fg)]\">\n {emptyLabel}\n </div>\n ) : (\n rows\n )}\n </div>\n )\n}\n\ninterface ComboboxPanelProps {\n listId: string\n options: ComboboxOption[]\n activeIndex: number\n setActiveIndex: (index: number) => void\n selected: (value: string) => boolean\n onPick: (option: ComboboxOption) => void\n search: string\n setSearch: (term: string) => void\n onOpenChange: (open: boolean) => void\n searchPlaceholder: string\n searchLabel?: string\n panelLabel: string\n emptyLabel?: string\n loading?: boolean\n loadingLabel?: string\n multi?: boolean\n panelClassName?: string\n}\n\nconst ComboboxPanel = React.forwardRef<HTMLDivElement, ComboboxPanelProps>(\n function ComboboxPanel(props, ref) {\n const {\n listId,\n options,\n activeIndex,\n setActiveIndex,\n selected,\n onPick,\n search,\n setSearch,\n onOpenChange,\n searchPlaceholder,\n searchLabel = 'Search options',\n panelLabel,\n emptyLabel,\n loading,\n loadingLabel,\n multi,\n panelClassName,\n } = props\n\n const nextEnabled = React.useCallback(\n (from: number, delta: 1 | -1) => {\n for (let step = 1; step <= options.length; step++) {\n const index =\n delta === 1\n ? (from + step) % Math.max(options.length, 1)\n : (from - step + options.length * 2) % Math.max(options.length, 1)\n if (index < options.length && !options[index]?.disabled) {\n return index\n }\n }\n return from\n },\n [options],\n )\n\n const onKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault()\n setActiveIndex(nextEnabled(activeIndex, 1))\n } else if (event.key === 'ArrowUp') {\n event.preventDefault()\n setActiveIndex(nextEnabled(activeIndex, -1))\n } else if (event.key === 'Home') {\n event.preventDefault()\n setActiveIndex(options.findIndex((option) => !option.disabled))\n } else if (event.key === 'End') {\n event.preventDefault()\n const last = [...options].reverse().find((option) => !option.disabled)\n if (last) {\n setActiveIndex(options.lastIndexOf(last))\n }\n } else if (event.key === 'Enter') {\n event.preventDefault()\n const option = options[activeIndex]\n if (option && !option.disabled) {\n onPick(option)\n }\n } else if (event.key === 'Tab') {\n onOpenChange(false)\n }\n }\n\n return (\n <PopoverPrimitive.Content\n ref={ref}\n align=\"start\"\n collisionPadding={8}\n aria-label={panelLabel}\n onOpenAutoFocus={(event) => {\n event.preventDefault()\n const panel = event.currentTarget as HTMLElement | null\n const input = panel?.querySelector('input')\n if (input instanceof HTMLInputElement) {\n input.focus()\n }\n }}\n className={cn(\n 'as-anim-pop pointer-events-auto z-[var(--as-z-popover)] w-[var(--radix-popover-trigger-width)] min-w-48 overflow-hidden rounded-[var(--as-radius-lg)] border border-[var(--as-border)] bg-[var(--as-surface-raised)] text-[var(--as-fg)] shadow-[var(--as-shadow-3)]',\n panelClassName,\n )}\n data-as=\"combobox-panel\"\n >\n <div className=\"flex items-center gap-2 border-b border-[var(--as-border)] p-2\">\n <Search className=\"size-4 shrink-0 text-[var(--as-muted-fg)]\" aria-hidden />\n <input\n type=\"text\"\n role=\"combobox\"\n aria-expanded=\"true\"\n aria-controls={listId}\n aria-activedescendant={activeIndex >= 0 ? `${listId}-opt-${activeIndex}` : undefined}\n aria-label={searchLabel}\n placeholder={searchPlaceholder}\n className=\"h-7 w-full bg-transparent text-sm outline-none placeholder:text-[var(--as-muted-fg)]\"\n value={search}\n onChange={(event) => {\n setSearch(event.target.value)\n setActiveIndex(options.findIndex((option) => !option.disabled))\n }}\n onKeyDown={onKeyDown}\n />\n </div>\n <ComboboxList\n id={listId}\n options={options}\n activeIndex={activeIndex}\n onActiveIndexChange={setActiveIndex}\n selected={selected}\n onPick={onPick}\n emptyLabel={emptyLabel}\n loading={loading}\n loadingLabel={loadingLabel}\n />\n {multi ? (\n <div className=\"sr-only\" role=\"status\">\n {options.length} options\n </div>\n ) : null}\n </PopoverPrimitive.Content>\n )\n})\n\nexport interface ComboboxProps {\n options: ComboboxOption[]\n value?: string\n onChange: (value: string) => void\n placeholder?: string\n searchPlaceholder?: string\n searchLabel?: string\n emptyLabel?: string\n loadingLabel?: string\n loading?: boolean\n disabled?: boolean\n clearable?: boolean\n clearLabel?: string\n /** Offer an \"Add …\" row for search terms that match no option. */\n allowCreate?: boolean\n /** Custom label for the create row; receives the trimmed term. */\n createLabel?: (term: string) => string\n onSearchChange?: (term: string) => void\n onOpenChange?: (open: boolean) => void\n label?: string\n /** Keep the accessible name from `label` but do not render it visibly. */\n hideLabel?: boolean\n error?: string\n id?: string\n className?: string\n panelClassName?: string\n}\n\nexport const Combobox = React.forwardRef<HTMLButtonElement, ComboboxProps>(function Combobox(\n {\n options,\n value,\n onChange,\n placeholder = 'Select an option…',\n searchPlaceholder = 'Search…',\n searchLabel,\n emptyLabel,\n loadingLabel,\n loading = false,\n disabled = false,\n clearable = false,\n clearLabel = 'Clear',\n allowCreate = false,\n createLabel,\n onSearchChange,\n onOpenChange,\n label,\n hideLabel = false,\n error,\n id: idProp,\n className,\n panelClassName,\n },\n ref,\n) {\n const autoId = React.useId()\n const id = idProp ?? (label || error ? autoId : undefined)\n const listId = `${autoId}-list`\n const [open, setOpen] = React.useState(false)\n const [search, setSearch] = React.useState('')\n const [activeIndex, setActiveIndex] = React.useState(-1)\n\n const filtered = onSearchChange ? options : defaultFilter(options, search)\n const created = allowCreate ? createOption(options, search, createLabel) : null\n const panelOptions = created ? [...filtered, created] : filtered\n const selectedOption = options.find((option) => option.value === value)\n\n const handleOpenChange = (next: boolean) => {\n setOpen(next)\n onOpenChange?.(next)\n if (next) {\n setActiveIndex(options.findIndex((option) => !option.disabled))\n } else {\n setSearch('')\n setActiveIndex(-1)\n }\n }\n\n return (\n <div className={cn('flex w-full flex-col gap-1.5', className)}>\n {label && !hideLabel ? (\n <label htmlFor={id} className=\"text-sm font-medium leading-none text-[var(--as-fg)]\">\n {label}\n </label>\n ) : null}\n <PopoverPrimitive.Root modal open={open} onOpenChange={handleOpenChange}>\n <span className=\"relative inline-flex w-full\">\n <PopoverPrimitive.Trigger asChild>\n <button\n ref={ref}\n type=\"button\"\n id={id}\n data-as=\"combobox\"\n role=\"combobox\"\n aria-label={typeof label === 'string' ? label : placeholder}\n aria-haspopup=\"listbox\"\n aria-controls={open ? listId : undefined}\n aria-invalid={error ? true : undefined}\n disabled={disabled}\n onKeyDown={(event) => {\n if (!open && (event.key === 'ArrowDown' || event.key === 'ArrowUp')) {\n event.preventDefault()\n handleOpenChange(true)\n }\n }}\n className={cn(\n 'flex h-9 w-full cursor-pointer items-center justify-between gap-2 rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 text-sm text-[var(--as-fg)] transition-colors hover:border-[var(--as-fg)]/30 focus-visible:border-[var(--as-focus-ring)] focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--as-focus-ring)] disabled:cursor-not-allowed disabled:opacity-50',\n error && 'border-[var(--as-danger)]',\n clearable && selectedOption && 'pr-14',\n )}\n >\n <span className=\"flex min-w-0 flex-1 items-center gap-2 text-left\">\n {selectedOption ? (\n <span className=\"truncate font-medium\">{selectedOption.label}</span>\n ) : (\n <span className=\"text-[var(--as-muted-fg)]\">{placeholder}</span>\n )}\n </span>\n <ChevronDown\n aria-hidden\n className={cn(\n 'size-4 shrink-0 text-[var(--as-muted-fg)] transition-transform',\n open && 'rotate-180',\n )}\n />\n </button>\n </PopoverPrimitive.Trigger>\n {clearable && selectedOption ? (\n <button\n type=\"button\"\n aria-label={clearLabel}\n className=\"absolute right-7 top-1/2 [translate:0_-50%] cursor-pointer rounded-[var(--as-radius-sm)] p-0.5 text-[var(--as-muted-fg)] hover:text-[var(--as-fg)] focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--as-focus-ring)]\"\n onClick={(event) => {\n event.stopPropagation()\n onChange('')\n }}\n >\n <X className=\"size-4\" aria-hidden />\n </button>\n ) : null}\n </span>\n <PopoverPrimitive.Portal>\n {open ? (\n <ComboboxPanel\n listId={listId}\n options={panelOptions}\n activeIndex={activeIndex}\n setActiveIndex={setActiveIndex}\n selected={(optionValue) => optionValue === value}\n onPick={(option) => {\n onChange(option.value)\n handleOpenChange(false)\n }}\n search={search}\n setSearch={(term) => {\n setSearch(term)\n onSearchChange?.(term)\n }}\n onOpenChange={handleOpenChange}\n searchPlaceholder={searchPlaceholder}\n searchLabel={searchLabel}\n panelLabel={typeof label === 'string' ? label : placeholder || 'Options'}\n emptyLabel={emptyLabel}\n loading={loading}\n loadingLabel={loadingLabel}\n panelClassName={panelClassName}\n />\n ) : null}\n </PopoverPrimitive.Portal>\n </PopoverPrimitive.Root>\n {error ? (\n <p role=\"alert\" className=\"text-xs font-medium text-[var(--as-danger)]\">\n {error}\n </p>\n ) : null}\n </div>\n )\n})\n\nexport interface ComboboxMultiProps {\n options: ComboboxOption[]\n value: string[]\n onChange: (value: string[]) => void\n placeholder?: string\n searchPlaceholder?: string\n searchLabel?: string\n emptyLabel?: string\n loadingLabel?: string\n loading?: boolean\n disabled?: boolean\n maxTriggerLabels?: number\n /** Offer an \"Add …\" row for search terms that match no option. */\n allowCreate?: boolean\n /** Custom label for the create row; receives the trimmed term. */\n createLabel?: (term: string) => string\n onSearchChange?: (term: string) => void\n onOpenChange?: (open: boolean) => void\n label?: string\n error?: string\n id?: string\n className?: string\n panelClassName?: string\n}\n\nexport const ComboboxMulti = React.forwardRef<HTMLButtonElement, ComboboxMultiProps>(\n function ComboboxMulti(\n {\n options,\n value,\n onChange,\n placeholder = 'Select options…',\n searchPlaceholder = 'Search…',\n searchLabel,\n emptyLabel,\n loadingLabel,\n loading = false,\n disabled = false,\n maxTriggerLabels = 3,\n allowCreate = false,\n createLabel,\n onSearchChange,\n onOpenChange,\n label,\n error,\n id: idProp,\n className,\n panelClassName,\n },\n ref,\n ) {\n const autoId = React.useId()\n const id = idProp ?? (label || error ? autoId : undefined)\n const listId = `${autoId}-list`\n const [open, setOpen] = React.useState(false)\n const [search, setSearch] = React.useState('')\n const [activeIndex, setActiveIndex] = React.useState(-1)\n\n const filtered = onSearchChange ? options : defaultFilter(options, search)\n const created = allowCreate ? createOption(options, search, createLabel) : null\n const panelOptions = created ? [...filtered, created] : filtered\n const selectedOptions = options.filter((option) => value.includes(option.value))\n const triggerLabel =\n selectedOptions.length === 0\n ? placeholder\n : selectedOptions.length > maxTriggerLabels\n ? `${selectedOptions.length} selected`\n : selectedOptions.map((option) => option.label).join(', ')\n\n const handleOpenChange = (next: boolean) => {\n setOpen(next)\n onOpenChange?.(next)\n if (next) {\n setActiveIndex(options.findIndex((option) => !option.disabled))\n } else {\n setSearch('')\n setActiveIndex(-1)\n }\n }\n\n const toggle = (optionValue: string) => {\n onChange(\n value.includes(optionValue)\n ? value.filter((entry) => entry !== optionValue)\n : [...value, optionValue],\n )\n }\n\n return (\n <div className={cn('flex w-full flex-col gap-1.5', className)}>\n {label ? (\n <label htmlFor={id} className=\"text-sm font-medium leading-none text-[var(--as-fg)]\">\n {label}\n </label>\n ) : null}\n <PopoverPrimitive.Root open={open} onOpenChange={handleOpenChange}>\n <PopoverPrimitive.Trigger asChild>\n <button\n ref={ref}\n type=\"button\"\n id={id}\n data-as=\"combobox-multi\"\n role=\"combobox\"\n aria-label={typeof label === 'string' ? label : placeholder}\n aria-haspopup=\"listbox\"\n aria-controls={open ? listId : undefined}\n aria-invalid={error ? true : undefined}\n disabled={disabled}\n onKeyDown={(event) => {\n if (!open && (event.key === 'ArrowDown' || event.key === 'ArrowUp')) {\n event.preventDefault()\n handleOpenChange(true)\n }\n }}\n className=\"flex h-9 w-full cursor-pointer items-center justify-between gap-2 rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 text-sm text-[var(--as-fg)] transition-colors hover:border-[var(--as-fg)]/30 focus-visible:border-[var(--as-focus-ring)] focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--as-focus-ring)] disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <span className=\"min-w-0 flex-1 truncate text-left\">\n {selectedOptions.length === 0 ? (\n <span className=\"text-[var(--as-muted-fg)]\">{placeholder}</span>\n ) : (\n triggerLabel\n )}\n </span>\n <ChevronDown\n aria-hidden\n className={cn(\n 'size-4 shrink-0 text-[var(--as-muted-fg)] transition-transform',\n open && 'rotate-180',\n )}\n />\n </button>\n </PopoverPrimitive.Trigger>\n <PopoverPrimitive.Portal>\n {open ? (\n <ComboboxPanel\n listId={listId}\n options={panelOptions}\n activeIndex={activeIndex}\n setActiveIndex={setActiveIndex}\n selected={(optionValue) => value.includes(optionValue)}\n onPick={(option) => toggle(option.value)}\n search={search}\n setSearch={(term) => {\n setSearch(term)\n onSearchChange?.(term)\n }}\n onOpenChange={handleOpenChange}\n searchPlaceholder={searchPlaceholder}\n searchLabel={searchLabel}\n panelLabel={typeof label === 'string' ? label : placeholder || 'Options'}\n emptyLabel={emptyLabel}\n loading={loading}\n loadingLabel={loadingLabel}\n multi\n panelClassName={panelClassName}\n />\n ) : null}\n </PopoverPrimitive.Portal>\n </PopoverPrimitive.Root>\n {error ? (\n <p role=\"alert\" className=\"text-xs font-medium text-[var(--as-danger)]\">\n {error}\n </p>\n ) : null}\n </div>\n )\n },\n)\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Combobox } from './chunk-
|
|
1
|
+
import { Combobox } from './chunk-SVRCZUNQ.js';
|
|
2
2
|
import { Input } from './chunk-GQDW6BBO.js';
|
|
3
3
|
import { cn } from './chunk-RVVXVTH3.js';
|
|
4
4
|
import * as React from 'react';
|
|
@@ -166,5 +166,5 @@ var ProviderForm = React.forwardRef(
|
|
|
166
166
|
);
|
|
167
167
|
|
|
168
168
|
export { CUSTOM_PRESET_KEY, ProviderForm };
|
|
169
|
-
//# sourceMappingURL=chunk-
|
|
170
|
-
//# sourceMappingURL=chunk-
|
|
169
|
+
//# sourceMappingURL=chunk-UMI4M4MF.js.map
|
|
170
|
+
//# sourceMappingURL=chunk-UMI4M4MF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/provider-form/ProviderForm.tsx"],"names":["ProviderForm"],"mappings":";;;;;;;AAgBO,IAAM,iBAAA,GAAoB;AA0D1B,IAAM,YAAA,GAAqB,KAAA,CAAA,UAAA;AAAA,EAChC,SAASA,aAAAA,CACP;AAAA,IACE,IAAA;AAAA,IACA,YAAA;AAAA,IACA,OAAA;AAAA,IACA,eAAA;AAAA,IACA,MAAA;AAAA,IACA,cAAA;AAAA,IACA,eAAA,GAAkB,eAAA;AAAA,IAClB,kBAAA,GAAqB,4BAAA;AAAA,IACrB,SAAA,GAAY,MAAA;AAAA,IACZ,YAAA,GAAe,cAAA;AAAA,IACf,WAAA,GAAc,KAAA;AAAA,IACd,WAAA,GAAc,SAAA;AAAA,IACd,UAAA;AAAA,IACA,YAAA,GAAe,KAAA;AAAA,IACf,OAAA;AAAA,IACA,SAAA,GAAY,EAAA;AAAA,IACZ,cAAA;AAAA,IACA,WAAA,GAAc,UAAA;AAAA,IACd,iBAAA,GAAoB,cAAA;AAAA,IACpB,gBAAA,GAAmB,KAAA;AAAA,IACnB,YAAA,GAAe,OAAA;AAAA,IACf,oBAAA;AAAA,IACA,aAAA,GAAgB,SAAA;AAAA,IAChB,UAAA,GAAa,oBAAA;AAAA,IACb,UAAA,GAAa,OAAA;AAAA,IACb,WAAA,GAAc,KAAA;AAAA,IACd,OAAA;AAAA,IACA,eAAA;AAAA,IACA,YAAA,GAAe,SAAA;AAAA,IACf,iBAAiB,EAAC;AAAA,IAClB,kBAAA,GAAqB,wBAAA;AAAA,IACrB,wBAAA,GAA2B,wBAAA;AAAA,IAC3B,iBAAA,GAAoB,qBAAA;AAAA,IACpB,iBAAA,GAAoB,eAAA;AAAA,IACpB,cAAA,GAAiB,mCAAA;AAAA,IACjB,cAAA,GAAiB,WAAA;AAAA,IACjB,KAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,GAAG;AAAA,KAEL,GAAA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wBAAA;AAAA,cACnB,WAAA,EAAa,wBAAA;AAAA,cACb,UAAA,EAAY,iBAAA;AAAA,cACZ,SAAA,EAAS,IAAA;AAAA,cACT,UAAA,EAAY;AAAA;AAAA,WACd,GACE,IAAA;AAAA,UACH,QAAA;AAAA,UACA,KAAA,uBACE,GAAA,EAAA,EAAE,IAAA,EAAK,SAAQ,SAAA,EAAU,6CAAA,EACvB,iBACH,CAAA,GACE;AAAA;AAAA;AAAA,KACN;AAAA,EAEJ;AACF","file":"chunk-BCKOBT7T.js","sourcesContent":["import * as React from 'react'\nimport { Building2, House, KeyRound } from 'lucide-react'\nimport { cn } from '../../lib/utils'\nimport { Combobox } from '../combobox/Combobox'\nimport { Input } from '../input/Input'\n\n/** One entry of the app's provider catalog (ADR-006: the catalog lives in\n * the app/backend — the form only renders the picker and reports the key). */\nexport interface ProviderPresetOption {\n key: string\n name: string\n /** Local/on-premise preset — apps may default the hosting toggle from it. */\n local?: boolean\n}\n\n/** Reserved key of the built-in \"custom\" preset entry (never a catalog key). */\nexport const CUSTOM_PRESET_KEY = 'custom'\n\nexport interface ProviderFormProps extends React.ComponentProps<'div'> {\n name: string\n onNameChange: (value: string) => void\n baseUrl: string\n onBaseUrlChange: (value: string) => void\n apiKey: string\n onApiKeyChange: (value: string) => void\n namePlaceholder?: string\n baseUrlPlaceholder?: string\n nameLabel?: string\n baseUrlLabel?: string\n /** Hide the base URL field for provider types that have a fixed endpoint. */\n hideBaseUrl?: boolean\n apiKeyLabel?: string\n /** Optional preset catalog select — render only when `presets` is non-empty. */\n presets?: ProviderPresetOption[]\n presetKey?: string\n onPresetChange?: (key: string) => void\n presetLabel?: string\n customPresetLabel?: string\n /** Optional Local/Cloud toggle — render only when `showLocationKind`. */\n showLocationKind?: boolean\n locationKind?: 'local' | 'cloud'\n onLocationKindChange?: (kind: 'local' | 'cloud') => void\n locationLabel?: string\n localLabel?: string\n cloudLabel?: string\n /** Optional country select — render only when `showCountry`. */\n showCountry?: boolean\n country?: string\n onCountryChange?: (country: string) => void\n countryLabel?: string\n countryOptions?: { value: string; label: string }[]\n countryPlaceholder?: string\n /** Search-input placeholder for the country picker (searchable — the\n * catalog is ~250 entries, ADR-0024). */\n countrySearchPlaceholder?: string\n /** Empty-search result label for the country picker. */\n countryEmptyLabel?: string\n /** Accessible name of the country picker's clear button. */\n countryClearLabel?: string\n /** Hint under the key field; apps mention keyring storage here. */\n apiKeyHelp?: string\n /** The provider already stores a key (write-only field shows no value). */\n hasStoredKey?: boolean\n storedKeyLabel?: string\n keyPlaceholder?: string\n error?: string\n children?: React.ReactNode\n}\n\n/**\n * Standard provider credential fields: name, base URL and a **write-only**\n * masked API key (`onChange` only — the library never renders a stored key;\n * keyring/storage is the app's business, ADR-006).\n */\nexport const ProviderForm = React.forwardRef<HTMLDivElement, ProviderFormProps>(\n function ProviderForm(\n {\n name,\n onNameChange,\n baseUrl,\n onBaseUrlChange,\n apiKey,\n onApiKeyChange,\n namePlaceholder = 'Provider name',\n baseUrlPlaceholder = 'https://api.example.com/v1',\n nameLabel = 'Name',\n baseUrlLabel = 'API base URL',\n hideBaseUrl = false,\n apiKeyLabel = 'API key',\n apiKeyHelp,\n hasStoredKey = false,\n presets,\n presetKey = '',\n onPresetChange,\n presetLabel = 'Provider',\n customPresetLabel = 'Custom…',\n showLocationKind = false,\n locationKind = 'cloud',\n onLocationKindChange,\n locationLabel = 'Hosting',\n localLabel = 'Local / on-premise',\n cloudLabel = 'Cloud',\n showCountry = false,\n country,\n onCountryChange,\n countryLabel = 'Country',\n countryOptions = [],\n countryPlaceholder = 'Select a country…',\n countrySearchPlaceholder = 'Search countries…',\n countryEmptyLabel = 'No matching country',\n countryClearLabel = 'Clear country',\n storedKeyLabel = 'Stored — leave empty to keep',\n keyPlaceholder = 'sk-…',\n error,\n children,\n className,\n ...props\n },\n ref,\n ) {\n return (\n <div\n ref={ref}\n data-as=\"provider-form\"\n className={cn('flex w-full flex-col gap-4', className)}\n {...props}\n >\n {presets && presets.length > 0 && onPresetChange ? (\n <label className=\"block space-y-1 text-sm\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">{presetLabel}</span>\n <select\n value={presetKey}\n onChange={(event) => onPresetChange(event.target.value)}\n className=\"w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 text-sm text-[var(--as-fg)]\"\n >\n {presets.map((preset) => (\n <option key={preset.key} value={preset.key}>\n {preset.name}\n </option>\n ))}\n <option value={CUSTOM_PRESET_KEY}>{customPresetLabel}</option>\n </select>\n </label>\n ) : null}\n <Input\n label={nameLabel}\n value={name}\n onChange={(event) => onNameChange(event.target.value)}\n placeholder={namePlaceholder}\n />\n {hideBaseUrl ? null : (\n <Input\n label={baseUrlLabel}\n value={baseUrl}\n onChange={(event) => onBaseUrlChange(event.target.value)}\n placeholder={baseUrlPlaceholder}\n className=\"font-mono\"\n />\n )}\n <Input\n label={\n hasStoredKey ? (\n <>\n {apiKeyLabel}{' '}\n <span className=\"font-normal text-[var(--as-muted-fg)]\">\n ({storedKeyLabel})\n </span>\n </>\n ) : (\n apiKeyLabel\n )\n }\n type=\"password\"\n value={apiKey}\n onChange={(event) => onApiKeyChange(event.target.value)}\n placeholder={hasStoredKey ? '•••' : keyPlaceholder}\n autoComplete=\"new-password\"\n hint={\n apiKeyHelp ? (\n <span className=\"inline-flex items-center gap-1\">\n <KeyRound className=\"size-3\" aria-hidden />\n {apiKeyHelp}\n </span>\n ) : undefined\n }\n />\n {showLocationKind && onLocationKindChange ? (\n <div className=\"space-y-1\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">{locationLabel}</span>\n <div className=\"flex gap-2\" role=\"group\" aria-label={locationLabel}>\n {(\n [\n { kind: 'local' as const, label: localLabel, Icon: House },\n { kind: 'cloud' as const, label: cloudLabel, Icon: Building2 },\n ]\n ).map(({ kind, label, Icon }) => {\n const on = locationKind === kind\n return (\n <button\n key={kind}\n type=\"button\"\n data-as-location={kind}\n aria-pressed={on}\n onClick={() => onLocationKindChange(kind)}\n className={cn(\n 'flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--as-radius)] border px-3 py-2 text-xs font-semibold transition-all',\n 'focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--as-focus-ring)]',\n on\n ? 'border-[var(--as-primary)]/30 bg-[var(--as-primary)]/10 text-[var(--as-primary)] shadow-[var(--as-shadow-1)]'\n : 'border-[var(--as-border)] bg-[var(--as-surface)] text-[var(--as-muted-fg)] hover:border-[var(--as-muted-fg)]/40',\n )}\n >\n <Icon className=\"size-3.5\" aria-hidden />\n {label}\n </button>\n )\n })}\n </div>\n </div>\n ) : null}\n {showCountry && onCountryChange ? (\n <Combobox\n options={countryOptions}\n value={country ?? ''}\n onChange={onCountryChange}\n label={countryLabel}\n placeholder={countryPlaceholder}\n searchPlaceholder={countrySearchPlaceholder}\n searchLabel={countrySearchPlaceholder}\n emptyLabel={countryEmptyLabel}\n clearable\n clearLabel={countryClearLabel}\n />\n ) : null}\n {children}\n {error ? (\n <p role=\"alert\" className=\"text-sm font-medium text-[var(--as-danger)]\">\n {error}\n </p>\n ) : null}\n </div>\n )\n },\n)\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/provider-form/ProviderForm.tsx"],"names":["ProviderForm"],"mappings":";;;;;;;AAgBO,IAAM,iBAAA,GAAoB;AA0D1B,IAAM,YAAA,GAAqB,KAAA,CAAA,UAAA;AAAA,EAChC,SAASA,aAAAA,CACP;AAAA,IACE,IAAA;AAAA,IACA,YAAA;AAAA,IACA,OAAA;AAAA,IACA,eAAA;AAAA,IACA,MAAA;AAAA,IACA,cAAA;AAAA,IACA,eAAA,GAAkB,eAAA;AAAA,IAClB,kBAAA,GAAqB,4BAAA;AAAA,IACrB,SAAA,GAAY,MAAA;AAAA,IACZ,YAAA,GAAe,cAAA;AAAA,IACf,WAAA,GAAc,KAAA;AAAA,IACd,WAAA,GAAc,SAAA;AAAA,IACd,UAAA;AAAA,IACA,YAAA,GAAe,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A,EAAkB,IAAA;AAAA,kBAClB,cAAA,EAAc,EAAA;AAAA,kBACd,OAAA,EAAS,MAAM,oBAAA,CAAqB,IAAI,CAAA;AAAA,kBACxC,SAAA,EAAW,EAAA;AAAA,oBACT,iJAAA;AAAA,oBACA,qGAAA;AAAA,oBACA,KACI,8GAAA,GACA;AAAA,mBACN;AAAA,kBAEA,QAAA,EAAA;AAAA,oCAAA,GAAA,CAAC,IAAA,EAAA,EAAK,SAAA,EAAU,UAAA,EAAW,aAAA,EAAW,IAAA,EAAC,CAAA;AAAA,oBACtC;AAAA;AAAA,iBAAA;AAAA,gBAdI;AAAA,eAeP;AAAA,YAEJ,CAAC,CAAA,EACH;AAAA,WAAA,EACF,CAAA,GACE,IAAA;AAAA,UACH,eAAe,eAAA,mBACd,GAAA;AAAA,YAAC,QAAA;AAAA,YAAA;AAAA,cACC,OAAA,EAAS,cAAA;AAAA,cACT,OAAO,OAAA,IAAW,EAAA;AAAA,cAClB,QAAA,EAAU,eAAA;AAAA,cACV,KAAA,EAAO,YAAA;AAAA,cACP,WAAA,EAAa,kBAAA;AAAA,cACb,iBAAA,EAAmB,wBAAA;AAAA,cACnB,WAAA,EAAa,wBAAA;AAAA,cACb,UAAA,EAAY,iBAAA;AAAA,cACZ,SAAA,EAAS,IAAA;AAAA,cACT,UAAA,EAAY;AAAA;AAAA,WACd,GACE,IAAA;AAAA,UACH,QAAA;AAAA,UACA,KAAA,uBACE,GAAA,EAAA,EAAE,IAAA,EAAK,SAAQ,SAAA,EAAU,6CAAA,EACvB,iBACH,CAAA,GACE;AAAA;AAAA;AAAA,KACN;AAAA,EAEJ;AACF","file":"chunk-UMI4M4MF.js","sourcesContent":["import * as React from 'react'\nimport { Building2, House, KeyRound } from 'lucide-react'\nimport { cn } from '../../lib/utils'\nimport { Combobox } from '../combobox/Combobox'\nimport { Input } from '../input/Input'\n\n/** One entry of the app's provider catalog (ADR-006: the catalog lives in\n * the app/backend — the form only renders the picker and reports the key). */\nexport interface ProviderPresetOption {\n key: string\n name: string\n /** Local/on-premise preset — apps may default the hosting toggle from it. */\n local?: boolean\n}\n\n/** Reserved key of the built-in \"custom\" preset entry (never a catalog key). */\nexport const CUSTOM_PRESET_KEY = 'custom'\n\nexport interface ProviderFormProps extends React.ComponentProps<'div'> {\n name: string\n onNameChange: (value: string) => void\n baseUrl: string\n onBaseUrlChange: (value: string) => void\n apiKey: string\n onApiKeyChange: (value: string) => void\n namePlaceholder?: string\n baseUrlPlaceholder?: string\n nameLabel?: string\n baseUrlLabel?: string\n /** Hide the base URL field for provider types that have a fixed endpoint. */\n hideBaseUrl?: boolean\n apiKeyLabel?: string\n /** Optional preset catalog select — render only when `presets` is non-empty. */\n presets?: ProviderPresetOption[]\n presetKey?: string\n onPresetChange?: (key: string) => void\n presetLabel?: string\n customPresetLabel?: string\n /** Optional Local/Cloud toggle — render only when `showLocationKind`. */\n showLocationKind?: boolean\n locationKind?: 'local' | 'cloud'\n onLocationKindChange?: (kind: 'local' | 'cloud') => void\n locationLabel?: string\n localLabel?: string\n cloudLabel?: string\n /** Optional country select — render only when `showCountry`. */\n showCountry?: boolean\n country?: string\n onCountryChange?: (country: string) => void\n countryLabel?: string\n countryOptions?: { value: string; label: string }[]\n countryPlaceholder?: string\n /** Search-input placeholder for the country picker (searchable — the\n * catalog is ~250 entries, ADR-0024). */\n countrySearchPlaceholder?: string\n /** Empty-search result label for the country picker. */\n countryEmptyLabel?: string\n /** Accessible name of the country picker's clear button. */\n countryClearLabel?: string\n /** Hint under the key field; apps mention keyring storage here. */\n apiKeyHelp?: string\n /** The provider already stores a key (write-only field shows no value). */\n hasStoredKey?: boolean\n storedKeyLabel?: string\n keyPlaceholder?: string\n error?: string\n children?: React.ReactNode\n}\n\n/**\n * Standard provider credential fields: name, base URL and a **write-only**\n * masked API key (`onChange` only — the library never renders a stored key;\n * keyring/storage is the app's business, ADR-006).\n */\nexport const ProviderForm = React.forwardRef<HTMLDivElement, ProviderFormProps>(\n function ProviderForm(\n {\n name,\n onNameChange,\n baseUrl,\n onBaseUrlChange,\n apiKey,\n onApiKeyChange,\n namePlaceholder = 'Provider name',\n baseUrlPlaceholder = 'https://api.example.com/v1',\n nameLabel = 'Name',\n baseUrlLabel = 'API base URL',\n hideBaseUrl = false,\n apiKeyLabel = 'API key',\n apiKeyHelp,\n hasStoredKey = false,\n presets,\n presetKey = '',\n onPresetChange,\n presetLabel = 'Provider',\n customPresetLabel = 'Custom…',\n showLocationKind = false,\n locationKind = 'cloud',\n onLocationKindChange,\n locationLabel = 'Hosting',\n localLabel = 'Local / on-premise',\n cloudLabel = 'Cloud',\n showCountry = false,\n country,\n onCountryChange,\n countryLabel = 'Country',\n countryOptions = [],\n countryPlaceholder = 'Select a country…',\n countrySearchPlaceholder = 'Search countries…',\n countryEmptyLabel = 'No matching country',\n countryClearLabel = 'Clear country',\n storedKeyLabel = 'Stored — leave empty to keep',\n keyPlaceholder = 'sk-…',\n error,\n children,\n className,\n ...props\n },\n ref,\n ) {\n return (\n <div\n ref={ref}\n data-as=\"provider-form\"\n className={cn('flex w-full flex-col gap-4', className)}\n {...props}\n >\n {presets && presets.length > 0 && onPresetChange ? (\n <label className=\"block space-y-1 text-sm\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">{presetLabel}</span>\n <select\n value={presetKey}\n onChange={(event) => onPresetChange(event.target.value)}\n className=\"w-full rounded-[var(--as-radius)] border border-[var(--as-border)] bg-[var(--as-surface)] px-3 py-2 text-sm text-[var(--as-fg)]\"\n >\n {presets.map((preset) => (\n <option key={preset.key} value={preset.key}>\n {preset.name}\n </option>\n ))}\n <option value={CUSTOM_PRESET_KEY}>{customPresetLabel}</option>\n </select>\n </label>\n ) : null}\n <Input\n label={nameLabel}\n value={name}\n onChange={(event) => onNameChange(event.target.value)}\n placeholder={namePlaceholder}\n />\n {hideBaseUrl ? null : (\n <Input\n label={baseUrlLabel}\n value={baseUrl}\n onChange={(event) => onBaseUrlChange(event.target.value)}\n placeholder={baseUrlPlaceholder}\n className=\"font-mono\"\n />\n )}\n <Input\n label={\n hasStoredKey ? (\n <>\n {apiKeyLabel}{' '}\n <span className=\"font-normal text-[var(--as-muted-fg)]\">\n ({storedKeyLabel})\n </span>\n </>\n ) : (\n apiKeyLabel\n )\n }\n type=\"password\"\n value={apiKey}\n onChange={(event) => onApiKeyChange(event.target.value)}\n placeholder={hasStoredKey ? '•••' : keyPlaceholder}\n autoComplete=\"new-password\"\n hint={\n apiKeyHelp ? (\n <span className=\"inline-flex items-center gap-1\">\n <KeyRound className=\"size-3\" aria-hidden />\n {apiKeyHelp}\n </span>\n ) : undefined\n }\n />\n {showLocationKind && onLocationKindChange ? (\n <div className=\"space-y-1\">\n <span className=\"text-sm font-medium text-[var(--as-fg)]\">{locationLabel}</span>\n <div className=\"flex gap-2\" role=\"group\" aria-label={locationLabel}>\n {(\n [\n { kind: 'local' as const, label: localLabel, Icon: House },\n { kind: 'cloud' as const, label: cloudLabel, Icon: Building2 },\n ]\n ).map(({ kind, label, Icon }) => {\n const on = locationKind === kind\n return (\n <button\n key={kind}\n type=\"button\"\n data-as-location={kind}\n aria-pressed={on}\n onClick={() => onLocationKindChange(kind)}\n className={cn(\n 'flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--as-radius)] border px-3 py-2 text-xs font-semibold transition-all',\n 'focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-[var(--as-focus-ring)]',\n on\n ? 'border-[var(--as-primary)]/30 bg-[var(--as-primary)]/10 text-[var(--as-primary)] shadow-[var(--as-shadow-1)]'\n : 'border-[var(--as-border)] bg-[var(--as-surface)] text-[var(--as-muted-fg)] hover:border-[var(--as-muted-fg)]/40',\n )}\n >\n <Icon className=\"size-3.5\" aria-hidden />\n {label}\n </button>\n )\n })}\n </div>\n </div>\n ) : null}\n {showCountry && onCountryChange ? (\n <Combobox\n options={countryOptions}\n value={country ?? ''}\n onChange={onCountryChange}\n label={countryLabel}\n placeholder={countryPlaceholder}\n searchPlaceholder={countrySearchPlaceholder}\n searchLabel={countrySearchPlaceholder}\n emptyLabel={countryEmptyLabel}\n clearable\n clearLabel={countryClearLabel}\n />\n ) : null}\n {children}\n {error ? (\n <p role=\"alert\" className=\"text-sm font-medium text-[var(--as-danger)]\">\n {error}\n </p>\n ) : null}\n </div>\n )\n },\n)\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FormModal } from './chunk-QPY2Y532.js';
|
|
2
1
|
import { Textarea } from './chunk-F6J2H6UJ.js';
|
|
2
|
+
import { FormModal } from './chunk-QPY2Y532.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Sparkles } from 'lucide-react';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -70,5 +70,5 @@ function AiMagicFill({
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
export { AiMagicFill };
|
|
73
|
-
//# sourceMappingURL=chunk-
|
|
74
|
-
//# sourceMappingURL=chunk-
|
|
73
|
+
//# sourceMappingURL=chunk-X6L5Z5LV.js.map
|
|
74
|
+
//# sourceMappingURL=chunk-X6L5Z5LV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ai-magic-fill/AiMagicFill.tsx"],"names":[],"mappings":";;;;;;AAqBO,SAAS,WAAA,CAAY;AAAA,EAC1B,IAAA;AAAA,EACA,YAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA,GAAO,KAAA;AAAA,EACP,KAAA;AAAA,EACA,KAAA,GAAQ,YAAA;AAAA,EACR,QAAA,GAAW,4BAAA;AAAA,EACX,WAAA;AAAA,EACA,WAAA,GAAc,kBAAA;AAAA,EACd,WAAA,GAAc,8BAAA;AAAA,EACd,WAAA;AAAA,EACA,WAAA,GAAc,QAAA;AAAA,EACd;AACF,CAAA,EAAqB;AACnB,EAAA,MAAM,CAAC,MAAA,EAAQ,SAAS,CAAA,GAAU,eAAS,EAAE,CAAA;AAE7C,EAAA,MAAM,SAAS,MAAM;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AAA,CAAO,IAAA,EAAK;AAAA,MAC7B,QAAA,EAAU,MAAA;AAAA,MACV,gBAAA,EAAkB,SAAA;AAAA,MAElB,QAAA,kBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAQ,eAAA,EAAgB,WAAU,qBAAA,EACrC,QAAA,EAAA;AAAA,wBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,WAAU,uBAAA,EACb,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,OAAA;AAAA,YAAA;AAAA,cACC,OAAA,EAAQ,sBAAA;AAAA,cACR,SAAA,EAAU,6EAAA;AAAA,cAET,QAAA,EAAA;AAAA;AAAA,WACH;AAAA,0BACA,GAAA;AAAA,YAAC,QAAA;AAAA,YAAA;AAAA,cACC,EAAA,EAAG,sBAAA;AAAA,cACH,IAAA,EAAM,CAAA;AAAA,cACN,KAAA,EAAO,MAAA;AAAA,cACP,UAAU,CAAC,KAAA,KACT,SAAA,CAAU,KAAA,CAAM,OAAO,KAAK,CAAA;AAAA,cAE9B,WAAA;AAAA,cACA,SAAA,EAAU;AAAA;AAAA;AACZ,SAAA,EACF,CAAA;AAAA,QACC,8BACC,GAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,4MAAA,EACV,uBACH,CAAA,GACE,IAAA;AAAA,QACH,KAAA,uBACE,GAAA,EAAA,EAAE,IAAA,EAAK,SAAQ,SAAA,EAAU,+CAAA,EACvB,iBACH,CAAA,GACE;AAAA,OAAA,EACN;AAAA;AAAA,GACF;AAEJ","file":"chunk-X6L5Z5LV.js","sourcesContent":["import * as React from 'react'\nimport { Sparkles } from 'lucide-react'\nimport { FormModal } from '../form-modal/FormModal'\nimport { Textarea } from '../textarea/Textarea'\n\nexport interface AiMagicFillProps {\n open: boolean\n onOpenChange: (open: boolean) => void\n onSubmit: (prompt: string) => void\n busy?: boolean\n error?: string | null\n title?: string\n subtitle?: string\n description?: string\n promptLabel?: string\n placeholder?: string\n submitLabel?: string\n cancelLabel?: string\n className?: string\n}\n\nexport function AiMagicFill({\n open,\n onOpenChange,\n onSubmit,\n busy = false,\n error,\n title = 'Magic Fill',\n subtitle = 'AI-powered data extraction',\n description,\n promptLabel = 'Describe details',\n placeholder = 'Describe the data here…',\n submitLabel,\n cancelLabel = 'Cancel',\n className,\n}: AiMagicFillProps) {\n const [prompt, setPrompt] = React.useState('')\n\n const submit = () => {\n const trimmed = prompt.trim()\n if (!trimmed || busy) return\n onSubmit(trimmed)\n setPrompt('')\n }\n\n return (\n <FormModal\n open={open}\n onOpenChange={onOpenChange}\n title={title}\n description={subtitle}\n icon={Sparkles}\n submitLabel={submitLabel ?? `Apply ${title}`}\n cancelLabel={cancelLabel}\n submitting={busy}\n submitDisabled={!prompt.trim()}\n onSubmit={submit}\n contentClassName={className}\n >\n <div data-as=\"ai-magic-fill\" className=\"flex flex-col gap-4\">\n <div className=\"flex flex-col gap-1.5\">\n <label\n htmlFor=\"ai-magic-fill-prompt\"\n className=\"text-[11px] font-bold uppercase tracking-[0.18em] text-[var(--as-muted-fg)]\"\n >\n {promptLabel}\n </label>\n <Textarea\n id=\"ai-magic-fill-prompt\"\n rows={5}\n value={prompt}\n onChange={(event: React.ChangeEvent<HTMLTextAreaElement>) =>\n setPrompt(event.target.value)\n }\n placeholder={placeholder}\n className=\"resize-none leading-relaxed\"\n />\n </div>\n {description ? (\n <p className=\"rounded-[var(--as-radius)] border border-[color-mix(in_srgb,var(--as-ai)_25%,transparent)] bg-[color-mix(in_srgb,var(--as-ai)_8%,transparent)] p-3 text-xs font-medium leading-relaxed text-[var(--as-fg)]\">\n {description}\n </p>\n ) : null}\n {error ? (\n <p role=\"alert\" className=\"text-xs font-semibold text-[var(--as-danger)]\">\n {error}\n </p>\n ) : null}\n </div>\n </FormModal>\n )\n}\n"]}
|
package/dist/combobox.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2981,6 +2981,64 @@ declare function describeAdminUserError(error: unknown, labels: Pick<AdminUserTa
|
|
|
2981
2981
|
*/
|
|
2982
2982
|
declare const AdminUserTable: React.ForwardRefExoticComponent<AdminUserTableProps & React.RefAttributes<HTMLDivElement>>;
|
|
2983
2983
|
|
|
2984
|
+
type InstanceAuthMode = 'open' | 'authenticated';
|
|
2985
|
+
interface InstanceModeControlLabels {
|
|
2986
|
+
title: string;
|
|
2987
|
+
modeOpen: string;
|
|
2988
|
+
modeAuthenticated: string;
|
|
2989
|
+
modeOpenHint: string;
|
|
2990
|
+
modeAuthenticatedHint: string;
|
|
2991
|
+
enableLogin: string;
|
|
2992
|
+
enableLoginNote: (minLength: number) => string;
|
|
2993
|
+
disableLogin: string;
|
|
2994
|
+
disableLoginNote: string;
|
|
2995
|
+
password: string;
|
|
2996
|
+
confirmPassword: string;
|
|
2997
|
+
passwordMismatch: string;
|
|
2998
|
+
passwordTooShort: (minLength: number) => string;
|
|
2999
|
+
submitEnable: string;
|
|
3000
|
+
submitDisable: string;
|
|
3001
|
+
confirmAck: string;
|
|
3002
|
+
blockedServer: string;
|
|
3003
|
+
blockedUsers: (count: number) => string;
|
|
3004
|
+
auditNote: string;
|
|
3005
|
+
errorGeneric: string;
|
|
3006
|
+
errorForbidden: string;
|
|
3007
|
+
}
|
|
3008
|
+
interface InstanceModeControlIcons {
|
|
3009
|
+
open?: LucideIcon;
|
|
3010
|
+
authenticated?: LucideIcon;
|
|
3011
|
+
enableLogin?: LucideIcon;
|
|
3012
|
+
disableLogin?: LucideIcon;
|
|
3013
|
+
audit?: LucideIcon;
|
|
3014
|
+
}
|
|
3015
|
+
interface InstanceModeControlProps {
|
|
3016
|
+
mode: InstanceAuthMode;
|
|
3017
|
+
serverIdentity?: boolean;
|
|
3018
|
+
otherUserCount?: number;
|
|
3019
|
+
minPasswordLength?: number;
|
|
3020
|
+
onSetAuthenticated: (password: string) => void | Promise<unknown>;
|
|
3021
|
+
onSetOpen: (password: string) => void | Promise<unknown>;
|
|
3022
|
+
loading?: boolean;
|
|
3023
|
+
error?: string | null;
|
|
3024
|
+
labels?: Partial<InstanceModeControlLabels>;
|
|
3025
|
+
icons?: InstanceModeControlIcons;
|
|
3026
|
+
className?: string;
|
|
3027
|
+
}
|
|
3028
|
+
declare function describeInstanceModeError(error: unknown, labels: Pick<InstanceModeControlLabels, 'errorGeneric' | 'errorForbidden'>): string;
|
|
3029
|
+
/**
|
|
3030
|
+
* Presentational + controlled instance access-mode panel (identity-auth
|
|
3031
|
+
* §4.5, ADR-06): shows the current mode and offers the two admin
|
|
3032
|
+
* transitions — `open → authenticated` (the owner sets credentials in
|
|
3033
|
+
* the same call) and `authenticated → open` (current password plus an
|
|
3034
|
+
* explicit acknowledgement). Blocked states (server entrypoint, other
|
|
3035
|
+
* accounts existing) disable the transition with a label-driven reason.
|
|
3036
|
+
* Data flows in through `mode`; the transitions are events out — the app
|
|
3037
|
+
* persists them and re-supplies the mode. Rejections surface as
|
|
3038
|
+
* label-driven messages and every change carries an audit note.
|
|
3039
|
+
*/
|
|
3040
|
+
declare const InstanceModeControl: React.ForwardRefExoticComponent<InstanceModeControlProps & React.RefAttributes<HTMLDivElement>>;
|
|
3041
|
+
|
|
2984
3042
|
/**
|
|
2985
3043
|
* The three states of the boot machine (identity-auth §4): `checking`
|
|
2986
3044
|
* while the app's boot flow runs, `authenticated` once a session was
|
|
@@ -3202,4 +3260,4 @@ interface ChatLauncherProps {
|
|
|
3202
3260
|
*/
|
|
3203
3261
|
declare const ChatLauncher: React.ForwardRefExoticComponent<ChatLauncherProps & React.RefAttributes<HTMLButtonElement>>;
|
|
3204
3262
|
|
|
3205
|
-
export { AboutCard, type AboutCardProps, type AboutCreator, AboutFooterLine, type AboutFooterLineProps, type AboutLicense, type AboutLinkItem, AboutLinkList, type AboutLinkListProps, AboutNote, type AboutNoteContent, type AboutNoteProps, AboutPanel, type AboutPanelProps, type AboutSponsorContent, ActionMenu, type ActionMenuItem, type ActionMenuProps, type AdminUser, type AdminUserPatch, AdminUserTable, type AdminUserTableIcons, type AdminUserTableLabels, type AdminUserTableProps, type AiAction, AiActionsDropdown, type AiActionsDropdownProps, AiButton, type AiButtonProps, AiMagicFill, type AiMagicFillProps, type AiTextTransformEventHandlers, type AiTextTransformStatus, type AiTextTransformTransport, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateStatus, Badge, type BadgeProps, type BranchNode, type BranchNodeInput, type BranchTree, type BreadcrumbItem, type BreadcrumbLinkProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CUSTOM_PRESET_KEY, CapabilityChips, type CapabilityChipsProps, type CapabilityDescriptor, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CareerMark, type ChatAttachmentView, ChatBranchTree, type ChatBranchTreeIcons, type ChatBranchTreeLabels, type ChatBranchTreeNode, type ChatBranchTreeProps, ChatComposer, type ChatComposerIcons, type ChatComposerLabels, type ChatComposerProps, ChatDrawer, type ChatDrawerProps, type ChatError, type ChatExportMessage, type ChatExportOptions, ChatHistoryButton, type ChatHistoryButtonLabels, type ChatHistoryButtonProps, ChatLauncher, type ChatLauncherProps, ChatMessage, type ChatMessageAction, type ChatMessageActions, ChatMessageEditor, type ChatMessageEditorLabels, type ChatMessageEditorProps, type ChatMessageLabels, type ChatMessageProps, type ChatMessageStatus, type ChatMessageVariants, type ChatMessageView, ChatPanel, type ChatPanelProps, type ChatPanelVariant, ChatReasoning, type ChatReasoningLabels, type ChatReasoningProps, type ChatRole, ChatSessionList, type ChatSessionListIcons, type ChatSessionListLabels, type ChatSessionListProps, type ChatSessionView, type ChatStreamEvent, type ChatStreamTransport, ChatToolCard, type ChatToolCardLabels, type ChatToolCardProps, type ChatToolCatalogArgument, type ChatToolCatalogEntry, ChatToolsCatalog, type ChatToolsCatalogLabels, type ChatToolsCatalogProps, ChatTraceMeta, type ChatTraceMetaProps, ChatTraceTimeline, type ChatTraceTimelineEntry, type ChatTraceTimelineLabels, type ChatTraceTimelineProps, type ChatTraceTimelineTrace, ChatTranscript, type ChatTranscriptLabels, type ChatTranscriptProps, ChatTurnStatus, type ChatTurnStatusLabels, type ChatTurnStatusProps, CheckIndicator, type CheckIndicatorProps, ChipInput, type ChipInputProps, ChipList, type ChipListProps, type ChipVariant, Combobox, ComboboxMulti, type ComboboxMultiProps, type ComboboxOption, type ComboboxProps, ConfirmationModal, type ConfirmationModalProps, ConnectionTestRow, type ConnectionTestRowProps, type ConnectionTestStatus, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, DatePicker, type DatePickerProps, DesktopMark, DictationButton, type DictationButtonProps, type DictationError, type DictationResult, type DictationStatus, DictationStrip, type DictationStripLabels, type DictationStripProps, type DiffCell, type DiffRow, type DiffSegment, EmptyState, type EmptyStateProps, ErrorBanner, type ErrorBannerProps, ExpandableSearch, type ExpandableSearchProps, type FamilyApp, FamilyBadge, type FamilyBadgeProps, type FamilyCreator, type FamilyMember, FieldDiff, type FieldDiffLabels, type FieldDiffProps, type FieldDiffValue, FieldLabel, type FieldLabelProps, FieldSummary, type FieldSummaryProps, FileCard, type FileCardProps, type FileCardStatus, FileQueue, type FileQueueItem, type FileQueueProps, type FlowError, FlowStatusCard, type FlowStatusCardProps, type FlowStep, type FlowStepInfo, type FlowStepStatus, FlowTelemetryStrip, type FlowTelemetryStripProps, type FlowTrace, type FlowTraceCall, FlowTraceCard, type FlowTraceCardLabels, type FlowTraceCardProps, type FlowTraceStage, type FlowTraceToolOp, FormModal, type FormModalProps, HealthMark, type HitlProposalAction, HitlProposalCard, type HitlProposalCardLabels, type HitlProposalCardProps, type HitlProposalStatus, HoverCard, HoverCardContent, HoverCardPortal, type HoverCardProps, HoverCardTrigger, InfoButton, type InfoButtonProps, InfoTooltip, type InfoTooltipProps, Input, type InputProps, type LineDiffOptions, type LineDiffResult, type LiveNodeState, type LiveToolCall, type LiveTurnAction, type LiveTurnState, type LiveTurnStatus, LoginForm, type LoginFormFieldOverrides, type LoginFormFields, type LoginFormIcons, type LoginFormLabels, type LoginFormProps, type LogoProps, type LogoTheme, MarkdownCodeBlock, type MarkdownCodeBlockLabels, type MarkdownCodeBlockProps, type MarkdownComponents, MarkdownDiffView, type MarkdownDiffViewLabels, type MarkdownDiffViewProps, MarkdownSurface, type MarkdownSurfaceProps, MarqueeBand, type MarqueePhase, type MarqueeSelection, MarqueeSurface, type MarqueeSurfaceProps, Menu, MenuCheckboxItem, type MenuCheckboxItemProps, MenuContent, MenuGroup, MenuItem, type MenuItemProps, MenuLabel, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, MermaidDiagram, type MermaidDiagramProps, MessageVariantSwitcher, type MessageVariantSwitcherLabels, type MessageVariantSwitcherProps, Modal, ModalBody, ModalClose, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, ModalTrigger, ModelPicker, type ModelPickerModel, type ModelPickerProps, type ModelPickerProvider, ModelRegistry, type ModelRegistryDraft, type ModelRegistryModel, type ModelRegistryPatch, type ModelRegistryProps, type ModelRegistryProvider, type ModelRegistryRemoteModel, type ModelRegistryRemoteState, type NavChild, type NavItem, NeuronectionMark, NeuronectionWordmark, type NeuronectionWordmarkProps, PanelModal, type PanelModalProps, Popover, PopoverAnchor, PopoverButton, type PopoverButtonProps, PopoverClose, PopoverContent, PopoverTrigger, Portal, type PortalProps, type ProfileItem, ProfileSwitcher, type ProfileSwitcherIcons, type ProfileSwitcherLabels, type ProfileSwitcherProps, ProviderForm, type ProviderFormProps, type ProviderPresetOption, RangeBar, type RangeBarProps, type Rect, RegisterForm, type RegisterFormFieldOverrides, type RegisterFormFields, type RegisterFormIcons, type RegisterFormLabels, type RegisterFormProps, RichTextEditor, type RichTextEditorIcons, type RichTextEditorLabels, type RichTextEditorProps, type RichTextToolbarGroup, ScaleSlider, type ScaleSliderProps, SearchInput, type SearchInputProps, SegmentedTabs, type SegmentedTabsItem, type SegmentedTabsProps, SelectionBar, type SelectionBarProps, type SettingsNavItem, SettingsShell, type SettingsShellProps, SidebarNav, type SidebarNavLabels, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, Spinner, type SpinnerProps, SponsorCard, type SponsorCardProps, type SponsorChannel, Stepper, type StepperProps, type StepperStep, StudyMark, Table, type TableProps, TaskAssignmentPicker, type TaskAssignmentPickerProps, type TaskAssignmentSection, type TaskAssignmentTask, TechChips, type TechChipsProps, TextDiffView, type TextDiffViewLabels, type TextDiffViewProps, ThemeScope, type ThemeScopeProps, ThemeTokens, TimeList, type TimeListProps, TimePicker, TimePickerContent, type TimePickerContentProps, type TimePickerProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UndoNotice, type UndoNoticeProps, type UnitDiffOptions, UploadDropzone, type UploadDropzoneProps, type UseAiTextTransformOptions, type UseChatStreamOptions, type UseChatStreamResult, type UseDictationOptions, type UseMarqueeOptions, UserMenu, type UserMenuIcons, type UserMenuItem, type UserMenuLanguage, type UserMenuProps, type UserMenuStatus, type UserMenuStatusTone, type UserMenuTheme, type UserMenuUser, ViewToggle, type ViewToggleProps, type ViewToggleView, Wizard, type WizardContext, type WizardProps, type WizardStep, activePathSet, badgeVariants, buildBranchTree, buildChatMarkdown, buttonVariants, chatExportFileName, cn, computeLineDiff, computeUnitDiff, describeAdminUserError, downloadChatMarkdown, formatBytes, formatFlowLatency, hitTestIds, initialLiveTurnState, linearTree, liveTurnReducer, marqueeRect, modalContentVariants, rectsIntersect, scaleColorForValue, splitMarkdownBlocks, useAiTextTransform, useChatStream, useDictation, useLogoId, useMarquee, variantInfo, walkActivePath, wordSegments };
|
|
3263
|
+
export { AboutCard, type AboutCardProps, type AboutCreator, AboutFooterLine, type AboutFooterLineProps, type AboutLicense, type AboutLinkItem, AboutLinkList, type AboutLinkListProps, AboutNote, type AboutNoteContent, type AboutNoteProps, AboutPanel, type AboutPanelProps, type AboutSponsorContent, ActionMenu, type ActionMenuItem, type ActionMenuProps, type AdminUser, type AdminUserPatch, AdminUserTable, type AdminUserTableIcons, type AdminUserTableLabels, type AdminUserTableProps, type AiAction, AiActionsDropdown, type AiActionsDropdownProps, AiButton, type AiButtonProps, AiMagicFill, type AiMagicFillProps, type AiTextTransformEventHandlers, type AiTextTransformStatus, type AiTextTransformTransport, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateStatus, Badge, type BadgeProps, type BranchNode, type BranchNodeInput, type BranchTree, type BreadcrumbItem, type BreadcrumbLinkProps, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, CUSTOM_PRESET_KEY, CapabilityChips, type CapabilityChipsProps, type CapabilityDescriptor, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CareerMark, type ChatAttachmentView, ChatBranchTree, type ChatBranchTreeIcons, type ChatBranchTreeLabels, type ChatBranchTreeNode, type ChatBranchTreeProps, ChatComposer, type ChatComposerIcons, type ChatComposerLabels, type ChatComposerProps, ChatDrawer, type ChatDrawerProps, type ChatError, type ChatExportMessage, type ChatExportOptions, ChatHistoryButton, type ChatHistoryButtonLabels, type ChatHistoryButtonProps, ChatLauncher, type ChatLauncherProps, ChatMessage, type ChatMessageAction, type ChatMessageActions, ChatMessageEditor, type ChatMessageEditorLabels, type ChatMessageEditorProps, type ChatMessageLabels, type ChatMessageProps, type ChatMessageStatus, type ChatMessageVariants, type ChatMessageView, ChatPanel, type ChatPanelProps, type ChatPanelVariant, ChatReasoning, type ChatReasoningLabels, type ChatReasoningProps, type ChatRole, ChatSessionList, type ChatSessionListIcons, type ChatSessionListLabels, type ChatSessionListProps, type ChatSessionView, type ChatStreamEvent, type ChatStreamTransport, ChatToolCard, type ChatToolCardLabels, type ChatToolCardProps, type ChatToolCatalogArgument, type ChatToolCatalogEntry, ChatToolsCatalog, type ChatToolsCatalogLabels, type ChatToolsCatalogProps, ChatTraceMeta, type ChatTraceMetaProps, ChatTraceTimeline, type ChatTraceTimelineEntry, type ChatTraceTimelineLabels, type ChatTraceTimelineProps, type ChatTraceTimelineTrace, ChatTranscript, type ChatTranscriptLabels, type ChatTranscriptProps, ChatTurnStatus, type ChatTurnStatusLabels, type ChatTurnStatusProps, CheckIndicator, type CheckIndicatorProps, ChipInput, type ChipInputProps, ChipList, type ChipListProps, type ChipVariant, Combobox, ComboboxMulti, type ComboboxMultiProps, type ComboboxOption, type ComboboxProps, ConfirmationModal, type ConfirmationModalProps, ConnectionTestRow, type ConnectionTestRowProps, type ConnectionTestStatus, ContextMenu, type ContextMenuItem, type ContextMenuProps, CopyButton, type CopyButtonProps, DatePicker, type DatePickerProps, DesktopMark, DictationButton, type DictationButtonProps, type DictationError, type DictationResult, type DictationStatus, DictationStrip, type DictationStripLabels, type DictationStripProps, type DiffCell, type DiffRow, type DiffSegment, EmptyState, type EmptyStateProps, ErrorBanner, type ErrorBannerProps, ExpandableSearch, type ExpandableSearchProps, type FamilyApp, FamilyBadge, type FamilyBadgeProps, type FamilyCreator, type FamilyMember, FieldDiff, type FieldDiffLabels, type FieldDiffProps, type FieldDiffValue, FieldLabel, type FieldLabelProps, FieldSummary, type FieldSummaryProps, FileCard, type FileCardProps, type FileCardStatus, FileQueue, type FileQueueItem, type FileQueueProps, type FlowError, FlowStatusCard, type FlowStatusCardProps, type FlowStep, type FlowStepInfo, type FlowStepStatus, FlowTelemetryStrip, type FlowTelemetryStripProps, type FlowTrace, type FlowTraceCall, FlowTraceCard, type FlowTraceCardLabels, type FlowTraceCardProps, type FlowTraceStage, type FlowTraceToolOp, FormModal, type FormModalProps, HealthMark, type HitlProposalAction, HitlProposalCard, type HitlProposalCardLabels, type HitlProposalCardProps, type HitlProposalStatus, HoverCard, HoverCardContent, HoverCardPortal, type HoverCardProps, HoverCardTrigger, InfoButton, type InfoButtonProps, InfoTooltip, type InfoTooltipProps, Input, type InputProps, type InstanceAuthMode, InstanceModeControl, type InstanceModeControlIcons, type InstanceModeControlLabels, type InstanceModeControlProps, type LineDiffOptions, type LineDiffResult, type LiveNodeState, type LiveToolCall, type LiveTurnAction, type LiveTurnState, type LiveTurnStatus, LoginForm, type LoginFormFieldOverrides, type LoginFormFields, type LoginFormIcons, type LoginFormLabels, type LoginFormProps, type LogoProps, type LogoTheme, MarkdownCodeBlock, type MarkdownCodeBlockLabels, type MarkdownCodeBlockProps, type MarkdownComponents, MarkdownDiffView, type MarkdownDiffViewLabels, type MarkdownDiffViewProps, MarkdownSurface, type MarkdownSurfaceProps, MarqueeBand, type MarqueePhase, type MarqueeSelection, MarqueeSurface, type MarqueeSurfaceProps, Menu, MenuCheckboxItem, type MenuCheckboxItemProps, MenuContent, MenuGroup, MenuItem, type MenuItemProps, MenuLabel, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger, MermaidDiagram, type MermaidDiagramProps, MessageVariantSwitcher, type MessageVariantSwitcherLabels, type MessageVariantSwitcherProps, Modal, ModalBody, ModalClose, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, ModalTrigger, ModelPicker, type ModelPickerModel, type ModelPickerProps, type ModelPickerProvider, ModelRegistry, type ModelRegistryDraft, type ModelRegistryModel, type ModelRegistryPatch, type ModelRegistryProps, type ModelRegistryProvider, type ModelRegistryRemoteModel, type ModelRegistryRemoteState, type NavChild, type NavItem, NeuronectionMark, NeuronectionWordmark, type NeuronectionWordmarkProps, PanelModal, type PanelModalProps, Popover, PopoverAnchor, PopoverButton, type PopoverButtonProps, PopoverClose, PopoverContent, PopoverTrigger, Portal, type PortalProps, type ProfileItem, ProfileSwitcher, type ProfileSwitcherIcons, type ProfileSwitcherLabels, type ProfileSwitcherProps, ProviderForm, type ProviderFormProps, type ProviderPresetOption, RangeBar, type RangeBarProps, type Rect, RegisterForm, type RegisterFormFieldOverrides, type RegisterFormFields, type RegisterFormIcons, type RegisterFormLabels, type RegisterFormProps, RichTextEditor, type RichTextEditorIcons, type RichTextEditorLabels, type RichTextEditorProps, type RichTextToolbarGroup, ScaleSlider, type ScaleSliderProps, SearchInput, type SearchInputProps, SegmentedTabs, type SegmentedTabsItem, type SegmentedTabsProps, SelectionBar, type SelectionBarProps, type SettingsNavItem, SettingsShell, type SettingsShellProps, SidebarNav, type SidebarNavLabels, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, Spinner, type SpinnerProps, SponsorCard, type SponsorCardProps, type SponsorChannel, Stepper, type StepperProps, type StepperStep, StudyMark, Table, type TableProps, TaskAssignmentPicker, type TaskAssignmentPickerProps, type TaskAssignmentSection, type TaskAssignmentTask, TechChips, type TechChipsProps, TextDiffView, type TextDiffViewLabels, type TextDiffViewProps, ThemeScope, type ThemeScopeProps, ThemeTokens, TimeList, type TimeListProps, TimePicker, TimePickerContent, type TimePickerContentProps, type TimePickerProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UndoNotice, type UndoNoticeProps, type UnitDiffOptions, UploadDropzone, type UploadDropzoneProps, type UseAiTextTransformOptions, type UseChatStreamOptions, type UseChatStreamResult, type UseDictationOptions, type UseMarqueeOptions, UserMenu, type UserMenuIcons, type UserMenuItem, type UserMenuLanguage, type UserMenuProps, type UserMenuStatus, type UserMenuStatusTone, type UserMenuTheme, type UserMenuUser, ViewToggle, type ViewToggleProps, type ViewToggleView, Wizard, type WizardContext, type WizardProps, type WizardStep, activePathSet, badgeVariants, buildBranchTree, buildChatMarkdown, buttonVariants, chatExportFileName, cn, computeLineDiff, computeUnitDiff, describeAdminUserError, describeInstanceModeError, downloadChatMarkdown, formatBytes, formatFlowLatency, hitTestIds, initialLiveTurnState, linearTree, liveTurnReducer, marqueeRect, modalContentVariants, rectsIntersect, scaleColorForValue, splitMarkdownBlocks, useAiTextTransform, useChatStream, useDictation, useLogoId, useMarquee, variantInfo, walkActivePath, wordSegments };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { UserMenu } from './chunk-CYK3ZLAB.js';
|
|
1
2
|
export { ThemeScope } from './chunk-TGU3PKNM.js';
|
|
2
3
|
export { TimeList } from './chunk-67W2OLOQ.js';
|
|
3
4
|
export { TimePicker, TimePickerContent } from './chunk-WQ5MPOYG.js';
|
|
@@ -5,46 +6,49 @@ export { InfoTooltip, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }
|
|
|
5
6
|
export { UndoNotice } from './chunk-AT32ANZW.js';
|
|
6
7
|
export { ViewToggle } from './chunk-XZIJIGEB.js';
|
|
7
8
|
export { Stepper, Wizard } from './chunk-ZNVWHGKM.js';
|
|
9
|
+
export { SelectionBar } from './chunk-LXKRUJIS.js';
|
|
8
10
|
export { Skeleton, SkeletonText } from './chunk-4OJXAFGA.js';
|
|
9
11
|
export { HoverCard, HoverCardContent, HoverCardPortal, HoverCardTrigger } from './chunk-PNYJ5VX2.js';
|
|
10
12
|
export { Table } from './chunk-53JFRZAO.js';
|
|
11
|
-
export { TaskAssignmentPicker } from './chunk-
|
|
13
|
+
export { TaskAssignmentPicker } from './chunk-3YIVKKT6.js';
|
|
12
14
|
export { SettingsShell } from './chunk-YPDIA54W.js';
|
|
13
15
|
export { SidebarNav } from './chunk-VAUB5TDF.js';
|
|
14
|
-
export {
|
|
16
|
+
export { ScaleSlider, scaleColorForValue } from './chunk-NLHODVBI.js';
|
|
15
17
|
export { SearchInput } from './chunk-UUIMMMSJ.js';
|
|
16
|
-
export { ModelRegistry } from './chunk-
|
|
18
|
+
export { ModelRegistry } from './chunk-5U45TQJE.js';
|
|
17
19
|
export { CapabilityChips } from './chunk-SY5FR4HC.js';
|
|
18
20
|
export { SegmentedTabs } from './chunk-5IEBIDXQ.js';
|
|
19
|
-
export {
|
|
21
|
+
export { ModelPicker } from './chunk-CCFVDJHU.js';
|
|
20
22
|
export { PanelModal } from './chunk-6O4LOWZG.js';
|
|
21
|
-
export { ProfileSwitcher } from './chunk-
|
|
22
|
-
export { CUSTOM_PRESET_KEY, ProviderForm } from './chunk-
|
|
23
|
+
export { ProfileSwitcher } from './chunk-6ANLDUGL.js';
|
|
24
|
+
export { CUSTOM_PRESET_KEY, ProviderForm } from './chunk-UMI4M4MF.js';
|
|
23
25
|
export { RangeBar } from './chunk-3UDWLHLD.js';
|
|
24
|
-
export { ScaleSlider, scaleColorForValue } from './chunk-NLHODVBI.js';
|
|
25
26
|
export { RichTextEditor } from './chunk-QYZNTE6Y.js';
|
|
26
27
|
export { DictationButton, DictationStrip, useDictation } from './chunk-QRTECV3V.js';
|
|
27
28
|
export { useAiTextTransform } from './chunk-BKAO7BTU.js';
|
|
28
29
|
export { MarqueeBand, MarqueeSurface, hitTestIds, marqueeRect, rectsIntersect, useMarquee } from './chunk-RU3DEF2O.js';
|
|
29
|
-
export { MarkdownDiffView, splitMarkdownBlocks } from './chunk-
|
|
30
|
-
export {
|
|
30
|
+
export { MarkdownDiffView, splitMarkdownBlocks } from './chunk-MFM4W6ZO.js';
|
|
31
|
+
export { FlowTelemetryStrip, FlowTraceCard, formatFlowLatency } from './chunk-HMUM3RAS.js';
|
|
31
32
|
export { FieldLabel } from './chunk-UTECJFDO.js';
|
|
32
33
|
export { InfoButton } from './chunk-2M4BWGLD.js';
|
|
33
34
|
export { LoginForm } from './chunk-3V5EBB4N.js';
|
|
34
35
|
export { RegisterForm } from './chunk-A3XTCQ7C.js';
|
|
36
|
+
export { DatePicker } from './chunk-QFIXMIVP.js';
|
|
35
37
|
export { ExpandableSearch } from './chunk-BAXBFV7Q.js';
|
|
36
38
|
export { FileQueue } from './chunk-EEKWQQW3.js';
|
|
37
39
|
export { FileCard, formatBytes } from './chunk-SBVLHGDI.js';
|
|
38
40
|
export { UploadDropzone } from './chunk-Q7MRRVE6.js';
|
|
39
41
|
export { FlowStatusCard } from './chunk-E5GKW4XN.js';
|
|
40
|
-
export {
|
|
42
|
+
export { ConnectionTestRow } from './chunk-KV67D3RP.js';
|
|
41
43
|
export { CheckIndicator } from './chunk-FVIIVWRC.js';
|
|
42
44
|
export { ChipInput } from './chunk-HQN55NOV.js';
|
|
43
|
-
export { Combobox, ComboboxMulti } from './chunk-
|
|
45
|
+
export { Combobox, ComboboxMulti } from './chunk-SVRCZUNQ.js';
|
|
44
46
|
export { ConfirmationModal } from './chunk-SE2AHFA5.js';
|
|
45
47
|
export { ContextMenu } from './chunk-A64IW7ID.js';
|
|
46
48
|
export { ActionMenu, Menu, MenuCheckboxItem, MenuContent, MenuGroup, MenuItem, MenuLabel, MenuSeparator, MenuSub, MenuSubContent, MenuSubTrigger, MenuTrigger } from './chunk-3UCBKZ2O.js';
|
|
47
|
-
export {
|
|
49
|
+
export { FieldDiff, FieldSummary, HitlProposalCard } from './chunk-452GYIS7.js';
|
|
50
|
+
export { TextDiffView } from './chunk-WYIHBQVV.js';
|
|
51
|
+
export { computeLineDiff, computeUnitDiff, wordSegments } from './chunk-QLP7K3PY.js';
|
|
48
52
|
export { ChatToolCard } from './chunk-5BJ4VULP.js';
|
|
49
53
|
export { ChatTurnStatus } from './chunk-TQDTFPM4.js';
|
|
50
54
|
export { buildChatMarkdown, chatExportFileName, downloadChatMarkdown } from './chunk-DRJGZ5TB.js';
|
|
@@ -53,7 +57,7 @@ export { PopoverButton } from './chunk-2EC3NEAE.js';
|
|
|
53
57
|
export { ChatTraceMeta } from './chunk-5CIRID6W.js';
|
|
54
58
|
export { ChatTraceTimeline } from './chunk-HR3FYO7C.js';
|
|
55
59
|
export { ChatToolsCatalog } from './chunk-OMWI53FM.js';
|
|
56
|
-
export {
|
|
60
|
+
export { ChatPanel } from './chunk-SEZZVAGP.js';
|
|
57
61
|
export { ChatTranscript } from './chunk-XOODPYJ3.js';
|
|
58
62
|
export { MarkdownCodeBlock, MarkdownSurface, MermaidDiagram } from './chunk-HQ3X5SVR.js';
|
|
59
63
|
export { CopyButton } from './chunk-XFYCNCPS.js';
|
|
@@ -62,35 +66,32 @@ export { ChatBranchTree } from './chunk-BG44GKXQ.js';
|
|
|
62
66
|
export { ChatDrawer } from './chunk-UKR2WUO3.js';
|
|
63
67
|
export { ChatReasoning } from './chunk-S63SYV6O.js';
|
|
64
68
|
export { ChatSessionList } from './chunk-PC3CE4W2.js';
|
|
65
|
-
export {
|
|
66
|
-
export {
|
|
67
|
-
export {
|
|
69
|
+
export { AiMagicFill } from './chunk-X6L5Z5LV.js';
|
|
70
|
+
export { FormModal } from './chunk-QPY2Y532.js';
|
|
71
|
+
export { Modal, ModalBody, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalTitle, ModalTrigger, modalContentVariants } from './chunk-FVQWIDB5.js';
|
|
68
72
|
export { Breadcrumbs } from './chunk-FILCIMXX.js';
|
|
69
73
|
export { initialLiveTurnState, liveTurnReducer, useChatStream } from './chunk-6GNLY2EB.js';
|
|
70
74
|
export { activePathSet, buildBranchTree, linearTree, variantInfo, walkActivePath } from './chunk-Z4IBQ53C.js';
|
|
71
75
|
export { ChatLauncher } from './chunk-E3NZM4U7.js';
|
|
72
76
|
export { Portal } from './chunk-XZWLTTHA.js';
|
|
73
77
|
export { ChatComposer } from './chunk-NUD32RLL.js';
|
|
74
|
-
export { ChatPanel } from './chunk-SEZZVAGP.js';
|
|
75
78
|
export { rawTokens, semanticTokens } from './chunk-GDGKARRB.js';
|
|
76
79
|
export { AiActionsDropdown } from './chunk-HUIKW2PK.js';
|
|
77
80
|
export { AboutCard, AboutFooterLine, AboutLinkList, AboutNote, AboutPanel, FamilyBadge, SponsorCard, TechChips } from './chunk-PPW4GNM6.js';
|
|
78
81
|
export { CareerMark, DesktopMark, HealthMark, NeuronectionMark, NeuronectionWordmark, StudyMark, useLogoId } from './chunk-MK6V5MA4.js';
|
|
79
82
|
export { ChipList } from './chunk-UBJNPO7A.js';
|
|
80
83
|
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './chunk-2XS5Q7XT.js';
|
|
81
|
-
export { AdminUserTable, describeAdminUserError } from './chunk-
|
|
82
|
-
export { Input } from './chunk-GQDW6BBO.js';
|
|
84
|
+
export { AdminUserTable, describeAdminUserError } from './chunk-47CRUWHB.js';
|
|
83
85
|
export { EmptyState } from './chunk-QKWFRXU6.js';
|
|
86
|
+
export { InstanceModeControl, describeInstanceModeError } from './chunk-SNHU4PV3.js';
|
|
87
|
+
export { Input } from './chunk-GQDW6BBO.js';
|
|
84
88
|
export { ErrorBanner } from './chunk-HNMFDVMD.js';
|
|
89
|
+
export { Button, buttonVariants } from './chunk-4WBBF5LH.js';
|
|
90
|
+
export { Spinner } from './chunk-SQHW7TYF.js';
|
|
85
91
|
export { Badge, badgeVariants } from './chunk-AIQJNN5B.js';
|
|
86
92
|
export { AuthGate } from './chunk-CEXLCDPM.js';
|
|
87
93
|
export { AiButton } from './chunk-OY4UOY2W.js';
|
|
88
94
|
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger } from './chunk-VX3EQRSM.js';
|
|
89
|
-
export { AiMagicFill } from './chunk-YM4YN3YC.js';
|
|
90
|
-
export { FormModal } from './chunk-QPY2Y532.js';
|
|
91
|
-
export { Modal, ModalBody, ModalClose, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalTitle, ModalTrigger, modalContentVariants } from './chunk-FVQWIDB5.js';
|
|
92
|
-
export { Button, buttonVariants } from './chunk-4WBBF5LH.js';
|
|
93
|
-
export { Spinner } from './chunk-SQHW7TYF.js';
|
|
94
95
|
export { cn } from './chunk-RVVXVTH3.js';
|
|
95
96
|
//# sourceMappingURL=index.js.map
|
|
96
97
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
|
|
4
|
+
type InstanceAuthMode = 'open' | 'authenticated';
|
|
5
|
+
interface InstanceModeControlLabels {
|
|
6
|
+
title: string;
|
|
7
|
+
modeOpen: string;
|
|
8
|
+
modeAuthenticated: string;
|
|
9
|
+
modeOpenHint: string;
|
|
10
|
+
modeAuthenticatedHint: string;
|
|
11
|
+
enableLogin: string;
|
|
12
|
+
enableLoginNote: (minLength: number) => string;
|
|
13
|
+
disableLogin: string;
|
|
14
|
+
disableLoginNote: string;
|
|
15
|
+
password: string;
|
|
16
|
+
confirmPassword: string;
|
|
17
|
+
passwordMismatch: string;
|
|
18
|
+
passwordTooShort: (minLength: number) => string;
|
|
19
|
+
submitEnable: string;
|
|
20
|
+
submitDisable: string;
|
|
21
|
+
confirmAck: string;
|
|
22
|
+
blockedServer: string;
|
|
23
|
+
blockedUsers: (count: number) => string;
|
|
24
|
+
auditNote: string;
|
|
25
|
+
errorGeneric: string;
|
|
26
|
+
errorForbidden: string;
|
|
27
|
+
}
|
|
28
|
+
interface InstanceModeControlIcons {
|
|
29
|
+
open?: LucideIcon;
|
|
30
|
+
authenticated?: LucideIcon;
|
|
31
|
+
enableLogin?: LucideIcon;
|
|
32
|
+
disableLogin?: LucideIcon;
|
|
33
|
+
audit?: LucideIcon;
|
|
34
|
+
}
|
|
35
|
+
interface InstanceModeControlProps {
|
|
36
|
+
mode: InstanceAuthMode;
|
|
37
|
+
serverIdentity?: boolean;
|
|
38
|
+
otherUserCount?: number;
|
|
39
|
+
minPasswordLength?: number;
|
|
40
|
+
onSetAuthenticated: (password: string) => void | Promise<unknown>;
|
|
41
|
+
onSetOpen: (password: string) => void | Promise<unknown>;
|
|
42
|
+
loading?: boolean;
|
|
43
|
+
error?: string | null;
|
|
44
|
+
labels?: Partial<InstanceModeControlLabels>;
|
|
45
|
+
icons?: InstanceModeControlIcons;
|
|
46
|
+
className?: string;
|
|
47
|
+
}
|
|
48
|
+
declare function describeInstanceModeError(error: unknown, labels: Pick<InstanceModeControlLabels, 'errorGeneric' | 'errorForbidden'>): string;
|
|
49
|
+
/**
|
|
50
|
+
* Presentational + controlled instance access-mode panel (identity-auth
|
|
51
|
+
* §4.5, ADR-06): shows the current mode and offers the two admin
|
|
52
|
+
* transitions — `open → authenticated` (the owner sets credentials in
|
|
53
|
+
* the same call) and `authenticated → open` (current password plus an
|
|
54
|
+
* explicit acknowledgement). Blocked states (server entrypoint, other
|
|
55
|
+
* accounts existing) disable the transition with a label-driven reason.
|
|
56
|
+
* Data flows in through `mode`; the transitions are events out — the app
|
|
57
|
+
* persists them and re-supplies the mode. Rejections surface as
|
|
58
|
+
* label-driven messages and every change carries an audit note.
|
|
59
|
+
*/
|
|
60
|
+
declare const InstanceModeControl: React.ForwardRefExoticComponent<InstanceModeControlProps & React.RefAttributes<HTMLDivElement>>;
|
|
61
|
+
|
|
62
|
+
export { type InstanceAuthMode, InstanceModeControl, type InstanceModeControlIcons, type InstanceModeControlLabels, type InstanceModeControlProps, describeInstanceModeError };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"instance-mode-control.js"}
|
package/dist/model-picker.js
CHANGED
package/dist/model-registry.js
CHANGED
package/dist/profile-switcher.js
CHANGED
package/dist/provider-form.js
CHANGED