@terrafirmagreg-team/kit 0.1.0 → 1.2.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.
Files changed (81) hide show
  1. package/package.json +15 -27
  2. package/src/components/blocks/nav-title.tsx +22 -25
  3. package/src/components/outline/dropdown.tsx +3 -2
  4. package/src/components/outline/index.ts +2 -1
  5. package/src/components/outline/list.tsx +3 -2
  6. package/src/components/outline/outline.tsx +4 -3
  7. package/src/components/outline/popover.tsx +3 -2
  8. package/src/components/page-actions.tsx +10 -9
  9. package/src/components/relative-link.tsx +1 -0
  10. package/src/components/toc/base.tsx +2 -1
  11. package/src/components/toc/block.tsx +1 -0
  12. package/src/components/toc/clerk.tsx +2 -1
  13. package/src/components/toc/default.tsx +3 -2
  14. package/src/components/version-menu.tsx +19 -17
  15. package/src/components/views/dataset.tsx +11 -2
  16. package/src/components/views/section.tsx +88 -44
  17. package/src/components/workspace/content.tsx +1 -0
  18. package/src/components/workspace/index.ts +1 -0
  19. package/src/components/workspace/pagination.tsx +2 -1
  20. package/src/components/workspace/workspace.tsx +1 -0
  21. package/src/hooks/use-catalog.ts +1 -0
  22. package/src/hooks/use-current-dataset.ts +15 -5
  23. package/src/hooks/use-dataset-accent.ts +1 -0
  24. package/src/hooks/use-nav-options.ts +20 -17
  25. package/src/hooks/use-section-names.ts +40 -0
  26. package/src/hooks/{toc.ts → use-toc.ts} +1 -0
  27. package/src/hooks/use-version-pref.ts +1 -0
  28. package/src/hooks/use-versioned-dataset.ts +21 -0
  29. package/src/lib/breadcrumb.ts +3 -16
  30. package/src/lib/config.ts +30 -28
  31. package/src/lib/dataset-links.ts +1 -0
  32. package/src/lib/datasets.ts +98 -68
  33. package/src/lib/landing.ts +4 -2
  34. package/src/lib/layout.ts +1 -0
  35. package/src/lib/locale/renderer.ts +49 -0
  36. package/src/lib/order.ts +1 -0
  37. package/src/lib/page.ts +3 -2
  38. package/src/lib/pin-tree.ts +11 -8
  39. package/src/lib/preview/lookup.ts +8 -5
  40. package/src/lib/section/schema.ts +2 -6
  41. package/src/lib/section/source.ts +59 -22
  42. package/src/lib/sources.ts +1 -0
  43. package/src/lib/tree.ts +1 -0
  44. package/src/lib/urls.ts +1 -0
  45. package/src/locales/en_us.json +7 -10
  46. package/src/locales/ru_ru.json +7 -10
  47. package/src/locales.ts +1 -0
  48. package/src/types/embeds.ts +54 -0
  49. package/src/types/index.ts +13 -9
  50. package/src/{components/outline/types.ts → types/outline.ts} +1 -0
  51. package/src/components/docs-image.tsx +0 -49
  52. package/src/components/search/dialog.tsx +0 -145
  53. package/src/lib/legacy.ts +0 -18
  54. package/src/lib/location.ts +0 -63
  55. package/src/lib/markdown/dom.ts +0 -90
  56. package/src/lib/markdown/index.ts +0 -13
  57. package/src/lib/markdown/providers.ts +0 -25
  58. package/src/lib/mdx/accordions.ts +0 -93
  59. package/src/lib/mdx/banner.ts +0 -52
  60. package/src/lib/mdx/directive-utils.ts +0 -125
  61. package/src/lib/mdx/directives.ts +0 -141
  62. package/src/lib/mdx/game-export.ts +0 -44
  63. package/src/lib/mdx/html-style.ts +0 -135
  64. package/src/lib/mdx/preview.ts +0 -252
  65. package/src/lib/mdx/references.ts +0 -56
  66. package/src/lib/mdx/tabs.ts +0 -80
  67. package/src/lib/mdx-components.tsx +0 -139
  68. package/src/lib/pack-assets.ts +0 -45
  69. package/src/lib/preview/index.ts +0 -8
  70. package/src/lib/preview/og.tsx +0 -115
  71. package/src/lib/preview/resolvers.ts +0 -98
  72. package/src/lib/search/config.ts +0 -13
  73. package/src/lib/search/filters.ts +0 -22
  74. package/src/lib/search/index.ts +0 -19
  75. package/src/lib/search/indexes.ts +0 -43
  76. package/src/lib/search/merge.ts +0 -22
  77. package/src/lib/search/server.ts +0 -18
  78. package/src/lib/search/sources.ts +0 -19
  79. package/src/lib/search/structured.ts +0 -23
  80. package/src/types/mdx.ts +0 -55
  81. package/src/types/turndown-plugin-gfm.d.ts +0 -9
@@ -1,19 +0,0 @@
1
- import type { SearchClient } from 'fumadocs-core/search/client';
2
-
3
- export type SearchClientSourceCtx = {
4
- refs: string[];
5
- locale: string;
6
- tag?: string | string[];
7
- };
8
-
9
- export type SearchClientSource = (ctx: SearchClientSourceCtx) => SearchClient;
10
-
11
- const sources: SearchClientSource[] = [];
12
-
13
- export function registerSearchClientSource(source: SearchClientSource): void {
14
- sources.push(source);
15
- }
16
-
17
- export function getSearchClientSources(): readonly SearchClientSource[] {
18
- return sources;
19
- }
@@ -1,23 +0,0 @@
1
- import type { StructuredData } from 'fumadocs-core/mdx-plugins';
2
-
3
- type StructuredPageData = Record<string, unknown>;
4
-
5
- export async function pageStructuredData(
6
- data: StructuredPageData,
7
- ): Promise<StructuredData> {
8
- const raw = data.structuredData;
9
- if (typeof raw === 'function') {
10
- return (raw as () => Promise<StructuredData> | StructuredData)();
11
- }
12
- if (typeof data.load === 'function') {
13
- const loaded = await (
14
- data.load as () => Promise<{ structuredData?: StructuredData }>
15
- )();
16
- if (!loaded.structuredData) {
17
- throw new Error('Cannot find structured data from page');
18
- }
19
- return loaded.structuredData;
20
- }
21
- if (!raw) throw new Error('Cannot find structured data from page');
22
- return raw as StructuredData;
23
- }
package/src/types/mdx.ts DELETED
@@ -1,55 +0,0 @@
1
- import type { ComponentProps } from 'react';
2
-
3
-
4
- export interface MdastNode {
5
- type: string;
6
- data?: Record<string, unknown>;
7
- children?: MdastNode[];
8
- [key: string]: unknown;
9
- }
10
-
11
- export interface DirectiveNode extends MdastNode {
12
- type: 'containerDirective' | 'leafDirective' | 'textDirective';
13
- name: string;
14
- attributes?: Record<string, string | boolean | undefined>;
15
- }
16
-
17
- export type JsxAttributeValue =
18
- | string
19
- | boolean
20
- | {
21
- type: 'mdxJsxAttributeValueExpression';
22
- value: string;
23
- data?: { estree?: Record<string, unknown> };
24
- };
25
-
26
- export interface JsxAttribute {
27
- type: 'mdxJsxAttribute';
28
- name: string;
29
- value: JsxAttributeValue;
30
- }
31
-
32
- export interface JsxElement {
33
- type: 'mdxJsxFlowElement';
34
- name: string;
35
- attributes: JsxAttribute[];
36
- children: MdastNode[];
37
- }
38
-
39
- export type DocsImageProps = {
40
-
41
- src?: string;
42
-
43
- pack?: string;
44
-
45
- mod?: string;
46
-
47
- path?: string;
48
- alt?: string;
49
- width?: number;
50
- height?: number;
51
- className?: string;
52
- caption?: string;
53
-
54
- defaultPack?: string;
55
- } & Omit<ComponentProps<'img'>, 'src' | 'alt' | 'width' | 'height' | 'className'>;
@@ -1,9 +0,0 @@
1
- declare module 'turndown-plugin-gfm' {
2
- import type { Plugin } from 'turndown';
3
-
4
- export const gfm: Plugin;
5
- export const highlightedCodeBlock: Plugin;
6
- export const strikethrough: Plugin;
7
- export const tables: Plugin;
8
- export const taskListItems: Plugin;
9
- }