@redocly/theme 0.45.9 → 0.45.10

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.
@@ -117,6 +117,10 @@ exports.Markdown = styled_components_1.default.main.attrs(({ className }) => ({
117
117
  > *:last-child {
118
118
  margin-bottom: 1.25em;
119
119
  }
120
+
121
+ > :not(summary) {
122
+ margin-left: 2em;
123
+ }
120
124
  }
121
125
 
122
126
  ${baseTable_1.markdownBaseTableCss};
@@ -54,7 +54,7 @@ function SearchDialog({ onClose, className }) {
54
54
  const autoSearchDisabled = mode !== 'search';
55
55
  const { query, setQuery, filter, setFilter, items, isSearchLoading, facets, setLoadMore, advancedSearch, askAi, } = useSearch(product === null || product === void 0 ? void 0 : product.name, autoSearchDisabled);
56
56
  const { isFilterOpen, onFilterToggle, onFilterChange, onFilterReset, onFacetReset, onTopFacetsReset, } = (0, hooks_1.useSearchFilter)(filter, setFilter);
57
- const aiSearch = useAiSearch();
57
+ const aiSearch = useAiSearch({ filter });
58
58
  const modalRef = (0, react_1.useRef)(null);
59
59
  const { translate } = useTranslate();
60
60
  (0, hooks_1.useDialogHotKeys)(modalRef, onClose);
@@ -60,7 +60,9 @@ export type ThemeHooks = {
60
60
  advancedSearch?: boolean;
61
61
  askAi?: boolean;
62
62
  };
63
- useAiSearch: () => {
63
+ useAiSearch: (options?: {
64
+ filter?: SearchFilterItem[];
65
+ }) => {
64
66
  askQuestion: (question: string) => void;
65
67
  isGeneratingResponse: boolean;
66
68
  question: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.45.9",
3
+ "version": "0.45.10",
4
4
  "description": "Shared UI components lib",
5
5
  "keywords": [
6
6
  "theme",
@@ -108,6 +108,10 @@ export const Markdown = styled.main.attrs<{
108
108
  > *:last-child {
109
109
  margin-bottom: 1.25em;
110
110
  }
111
+
112
+ > :not(summary) {
113
+ margin-left: 2em;
114
+ }
111
115
  }
112
116
 
113
117
  ${markdownBaseTableCss};
@@ -53,7 +53,7 @@ export function SearchDialog({ onClose, className }: SearchDialogProps): JSX.Ele
53
53
  onFacetReset,
54
54
  onTopFacetsReset,
55
55
  } = useSearchFilter(filter, setFilter);
56
- const aiSearch = useAiSearch();
56
+ const aiSearch = useAiSearch({ filter });
57
57
 
58
58
  const modalRef = useRef<HTMLDivElement>(null);
59
59
  const { translate } = useTranslate();
@@ -77,7 +77,7 @@ export type ThemeHooks = {
77
77
  advancedSearch?: boolean;
78
78
  askAi?: boolean;
79
79
  };
80
- useAiSearch: () => {
80
+ useAiSearch: (options?: { filter?: SearchFilterItem[] }) => {
81
81
  askQuestion: (question: string) => void;
82
82
  isGeneratingResponse: boolean;
83
83
  question: string;