@diplodoc/client 3.10.3 → 3.12.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.
Files changed (29) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/build/client/app-2c83962500db98f3.js +2 -0
  3. package/build/client/app-2c83962500db98f3.js.map +1 -0
  4. package/build/client/app-34c68624e23be7ce.css.map +1 -1
  5. package/build/client/manifest.json +8 -8
  6. package/build/client/search-7dc3bfe50645287d.js +2 -0
  7. package/build/client/search-7dc3bfe50645287d.js.map +1 -0
  8. package/build/client/search-b82629d53f2e437c.css.map +1 -1
  9. package/build/client/{vendor-9aa0609c11103fb0.rtl.css → vendor-133b7f840d4bd15c.rtl.css} +1 -1
  10. package/build/client/{vendor-5c42c2d82fe19c6e.css → vendor-14432c0205e2d1bb.css} +2 -2
  11. package/build/client/vendor-14432c0205e2d1bb.css.map +1 -0
  12. package/build/client/{vendor-0ca3ecbd78ee745e.js → vendor-f38539851c503793.js} +4 -4
  13. package/build/client/vendor-f38539851c503793.js.map +1 -0
  14. package/build/components/App/useAvailableLangs.d.ts +3 -0
  15. package/build/components/HeaderControls/index.d.ts +2 -1
  16. package/build/components/Search/Page.d.ts +3 -0
  17. package/build/components/Search/index.d.ts +9 -3
  18. package/build/server/app.js +462 -352
  19. package/build/server/app.js.map +1 -1
  20. package/build/server/vendor.js +38 -14
  21. package/build/server/vendor.js.map +1 -1
  22. package/package.json +2 -2
  23. package/build/client/app-5320a31c05d20641.js +0 -2
  24. package/build/client/app-5320a31c05d20641.js.map +0 -1
  25. package/build/client/search-81a7f828ef481c84.js +0 -2
  26. package/build/client/search-81a7f828ef481c84.js.map +0 -1
  27. package/build/client/vendor-0ca3ecbd78ee745e.js.map +0 -1
  28. package/build/client/vendor-5c42c2d82fe19c6e.css.map +0 -1
  29. package/build/components/Search/Search.d.ts +0 -3
@@ -0,0 +1,3 @@
1
+ import type { PageData } from './index';
2
+ import { type Lang } from '@diplodoc/components';
3
+ export declare function useAvailableLangs(data: PageData, langs: (`${Lang}` | Lang)[]): Lang[];
@@ -1,4 +1,4 @@
1
- import type { Lang, TextSizes, Theme } from '@diplodoc/components';
1
+ import type { AvailableLangs, Lang, TextSizes, Theme } from '@diplodoc/components';
2
2
  import React from 'react';
3
3
  type OnChangeCallback = (value: any) => void;
4
4
  export type Props = {
@@ -14,6 +14,7 @@ export type Props = {
14
14
  lang: Lang | `${Lang}`;
15
15
  langs: (Lang | `${Lang}`)[];
16
16
  onChangeLang?: (lang: `${Lang}` | Lang) => void;
17
+ availableLangs?: AvailableLangs;
17
18
  };
18
19
  export declare const HeaderControls: React.NamedExoticComponent<Props>;
19
20
  export {};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import './Page.scss';
3
+ export declare const Page: React.FC;
@@ -1,6 +1,12 @@
1
+ import type { ReactElement } from 'react';
1
2
  import type { SearchConfig, SearchData, WorkerApi, WorkerConfig } from './types';
3
+ import React from 'react';
2
4
  export type { SearchConfig, WorkerConfig, WorkerApi };
3
- export declare const SearchContext: import("react").Context<SearchData | SearchConfig | null | undefined>;
4
- export declare const SearchProvider: import("react").Provider<SearchData | SearchConfig | null | undefined>;
5
- export { Search } from './Search';
5
+ export declare const SearchContext: React.Context<SearchData | SearchConfig | null | undefined>;
6
+ export declare const SearchProvider: React.Provider<SearchData | SearchConfig | null | undefined>;
7
+ export interface SearchProps {
8
+ data: SearchConfig;
9
+ url: URL;
10
+ }
11
+ export declare function Search(props: SearchProps): ReactElement;
6
12
  export declare function useSearch(): SearchData | SearchConfig | null | undefined;