@examplary/ui 1.84.0 → 1.84.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,6 +84,7 @@ export declare const formatQuestionType: (type: QuestionType, i18n: i18n) => {
84
84
  "settings-area"?: string | undefined;
85
85
  results?: string | undefined;
86
86
  } | undefined;
87
+ functions?: Record<string, string> | undefined;
87
88
  public?: boolean | undefined;
88
89
  deprecated?: boolean | undefined;
89
90
  translations?: Record<string, string | Record<string, string>> | undefined;
@@ -75,9 +75,12 @@ export const CommandPalette = ({ placeholderText = "Type a command or search..."
75
75
  }, [commands, additionalCommands]);
76
76
  // additionalCommands are already filtered by the caller, so bypass cmdk's filter
77
77
  const unfilteredGroups = new Set(additionalCommands?.map((c) => c.group));
78
- return (_jsxs(CommandDialog, { open: open, onOpenChange: setOpen, children: [_jsx(CommandInput, { value: value, onValueChange: onValueChange, placeholder: placeholderText }), _jsxs(CommandList, { children: [!additionalCommands?.length && (_jsx(CommandEmpty, { children: noResultsText })), Object.entries(groupedCommands).map(([group, commands]) => (_jsx(CommandGroup, { heading: group, forceMount: unfilteredGroups.has(group), children: commands.length > 0 &&
78
+ return (_jsxs(CommandDialog, { open: open, onOpenChange: setOpen, children: [_jsx(CommandInput, { value: value, onValueChange: onValueChange, placeholder: placeholderText }), _jsxs(CommandList, { children: [!additionalCommands?.length && (_jsx(CommandEmpty, { children: noResultsText })), Object.entries(groupedCommands).map(([group, commands], index) => (_jsx(CommandGroup
79
+ // Headings are often translated; keying by them remounts the
80
+ // group on a language switch, which crashes cmdk mid-search
81
+ , { heading: group, forceMount: unfilteredGroups.has(group), children: commands.length > 0 &&
79
82
  commands.map(({ icon: Icon, ...command }) => (_jsxs(CommandItem, { value: command.id, className: command.className, keywords: [command.label], onSelect: () => {
80
83
  command.action();
81
84
  setOpen(false);
82
- }, children: [Icon && _jsx(Icon, {}), _jsx("span", { children: command.label }), command.shortcut && (_jsx(CommandShortcut, { children: command.shortcut }))] }, command.id))) }, group)))] })] }));
85
+ }, children: [Icon && _jsx(Icon, {}), _jsx("span", { children: command.label }), command.shortcut && (_jsx(CommandShortcut, { children: command.shortcut }))] }, command.id))) }, index)))] })] }));
83
86
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@examplary/ui",
3
3
  "description": "UI components for the Examplary testing platform.",
4
4
  "packageManager": "yarn@4.5.3",
5
- "version": "1.84.0",
5
+ "version": "1.84.1",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "files": [