@life-exe/wiki-engine 0.1.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/LICENSE +21 -0
- package/README.md +180 -0
- package/dist/analytics/index.d.ts +10 -0
- package/dist/chunks/abnfDiagram-VCTEODGH-DyAP6Aua.js +87 -0
- package/dist/chunks/arc-OroUeRL_.js +83 -0
- package/dist/chunks/architectureDiagram-5GKGNRK7-FjmrDCl4.js +4784 -0
- package/dist/chunks/blockDiagram-I7D4REHJ-BF3oIDlI.js +1416 -0
- package/dist/chunks/c4Diagram-7LVT6UL2-Cmdq0LZr.js +1511 -0
- package/dist/chunks/channel-Bdy1QZHo.js +5 -0
- package/dist/chunks/chunk-2Q5K7J3B-BwxRSEKd.js +15 -0
- package/dist/chunks/chunk-5VM5RSS4-BtHwUU4T.js +19 -0
- package/dist/chunks/chunk-F27PBJKO-DF4TGftR.js +68 -0
- package/dist/chunks/chunk-IMKFNOWR-DkBQ-1aV.js +1421 -0
- package/dist/chunks/chunk-JWPE2WC7-BIokdAUW.js +9 -0
- package/dist/chunks/chunk-POPQ4Y6H-CcjOsf9X.js +20 -0
- package/dist/chunks/chunk-SHT3W25Y-lYp5BdEg.js +1695 -0
- package/dist/chunks/chunk-SVP7TREG-DN-ravNt.js +664 -0
- package/dist/chunks/chunk-TICWLB2K-CtTJ0xaY.js +1534 -0
- package/dist/chunks/chunk-XXDRQBXY-BovkWFC0.js +8 -0
- package/dist/chunks/classDiagram-ZZMXUADV-CMYS0pHw.js +16 -0
- package/dist/chunks/classDiagram-v2-VYDZK3BY-CMYS0pHw.js +16 -0
- package/dist/chunks/common-BJ4q25wy.js +12633 -0
- package/dist/chunks/cose-bilkent-JH36ORCC-CaMqpJY7.js +2608 -0
- package/dist/chunks/cynefin-OW5HDTMX-Bzjecpt-.js +23853 -0
- package/dist/chunks/cynefinDiagram-5FMLGOSQ-C0NuKLt0.js +299 -0
- package/dist/chunks/cytoscape.esm-DmPrb1GM.js +18787 -0
- package/dist/chunks/dagre-GXQ25YYZ-Ds09_NdN.js +461 -0
- package/dist/chunks/defaultLocale-BgPVtth8.js +171 -0
- package/dist/chunks/diagram-S7CK7UJ4-IvSazk1O.js +349 -0
- package/dist/chunks/diagram-UQ7AKVKN-58epdx5V.js +223 -0
- package/dist/chunks/diagram-VSXAHHWV-BrzRGMeV.js +466 -0
- package/dist/chunks/diagram-VX7I27RA-DPL0Nw6d.js +530 -0
- package/dist/chunks/diagram-Z3DM3KII-8VWVu0I5.js +143 -0
- package/dist/chunks/ebnfDiagram-PWID7BFC-DeByR_ze.js +109 -0
- package/dist/chunks/erDiagram-RLTQ6QDP-C9uo9iE1.js +1060 -0
- package/dist/chunks/flowDiagram-HODETNUW-BpoY3OMp.js +7 -0
- package/dist/chunks/ganttDiagram-EL5Y4UJY-psdwnC-T.js +2711 -0
- package/dist/chunks/gitGraphDiagram-WWUBYQGX-vsDfkn_Q.js +828 -0
- package/dist/chunks/index-f7Uzykhj.js +38262 -0
- package/dist/chunks/infoDiagram-27XIBGKW-8K-eQZiU.js +24 -0
- package/dist/chunks/init-DjUOC4st.js +16 -0
- package/dist/chunks/ishikawaDiagram-5VMMS53U-CuqR1k5i.js +622 -0
- package/dist/chunks/journeyDiagram-3NMN7TZE-BPW1nmwZ.js +834 -0
- package/dist/chunks/kanban-definition-UXKFOSKX-iY6-d6jO.js +726 -0
- package/dist/chunks/katex-jHfnQmlp.js +11682 -0
- package/dist/chunks/layout-CgV9vOdp.js +1704 -0
- package/dist/chunks/linear-BzcaSMTS.js +259 -0
- package/dist/chunks/mindmap-definition-YA3MSWOX-CaLfHyv0.js +831 -0
- package/dist/chunks/ordinal-DfAQgscy.js +61 -0
- package/dist/chunks/pegDiagram-XKGWAZYB-6Y28VvVh.js +95 -0
- package/dist/chunks/pieDiagram-E7YTZNPT-OrjeRxhs.js +209 -0
- package/dist/chunks/quadrantDiagram-AXDQQJYC-rgw2lV2J.js +1025 -0
- package/dist/chunks/railroadDiagram-O6MQD6OU-D6QNO5r1.js +77 -0
- package/dist/chunks/requirementDiagram-BXWQKSXE-a8tNRSuE.js +884 -0
- package/dist/chunks/sankeyDiagram-P5KCCOFB-CdaC8rLw.js +847 -0
- package/dist/chunks/sequenceDiagram-WJ2MYXX4-CGLi38Hj.js +2898 -0
- package/dist/chunks/sizeCapture-INFHLROL-g5RJXnik.js +47 -0
- package/dist/chunks/stateDiagram-D77RDMKH-Cou0eVl1.js +262 -0
- package/dist/chunks/stateDiagram-v2-MP3YSRHH-BHQspnUg.js +16 -0
- package/dist/chunks/swimlanes-42K2YHIH-BU7S1WgJ.js +5239 -0
- package/dist/chunks/swimlanesDiagram-VR7AAH4N-BsEplbno.js +13 -0
- package/dist/chunks/timeline-definition-24CTP7MA-BB-IyxWL.js +1066 -0
- package/dist/chunks/vennDiagram-4TSXK5OY-BToYolPI.js +1585 -0
- package/dist/chunks/wardleyDiagram-VM6X3IG4-BgoueOw_.js +684 -0
- package/dist/chunks/xychartDiagram-S5SC5T6Z-CF0fWv-W.js +1492 -0
- package/dist/components/CodeBlock.d.ts +5 -0
- package/dist/components/CommunityLinks.d.ts +21 -0
- package/dist/components/CookieConsent.d.ts +2 -0
- package/dist/components/DocLinkCard.d.ts +6 -0
- package/dist/components/LecturePageView.d.ts +3 -0
- package/dist/components/MermaidDiagram.d.ts +3 -0
- package/dist/components/SearchPopup.d.ts +6 -0
- package/dist/components/WikiApp.d.ts +9 -0
- package/dist/components/WikiLayout.d.ts +2 -0
- package/dist/components/WikiPageView.d.ts +6 -0
- package/dist/components/ZoomableImage.d.ts +2 -0
- package/dist/context/LangContext.d.ts +2 -0
- package/dist/context/WikiContext.d.ts +18 -0
- package/dist/data.d.ts +8 -0
- package/dist/hooks/useLanguage.d.ts +4 -0
- package/dist/hooks/useTheme.d.ts +5 -0
- package/dist/hooks/useWiki.d.ts +2 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +45 -0
- package/dist/languages/ue-cpp.d.ts +7 -0
- package/dist/languages/ue-cpp.js +21 -0
- package/dist/types.d.ts +119 -0
- package/dist/wiki-engine.css +1 -0
- package/package.json +76 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export declare function YoutubeIcon(): import("react").JSX.Element;
|
|
3
|
+
export declare function GithubIcon(): import("react").JSX.Element;
|
|
4
|
+
export declare function TelegramIcon(): import("react").JSX.Element;
|
|
5
|
+
export declare function ItchIcon(): import("react").JSX.Element;
|
|
6
|
+
export declare function XIcon(): import("react").JSX.Element;
|
|
7
|
+
export declare function PatreonIcon(): import("react").JSX.Element;
|
|
8
|
+
export declare function BoostyIcon(): import("react").JSX.Element;
|
|
9
|
+
export declare function MediumIcon(): import("react").JSX.Element;
|
|
10
|
+
export declare function UdemyIcon(): import("react").JSX.Element;
|
|
11
|
+
export interface CommunityLinkItem {
|
|
12
|
+
name: string;
|
|
13
|
+
url: string;
|
|
14
|
+
icon: ReactNode;
|
|
15
|
+
tag: string;
|
|
16
|
+
desc: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const defaultCommunityLinks: CommunityLinkItem[];
|
|
19
|
+
export declare function CommunityLinks({ links }: {
|
|
20
|
+
links?: CommunityLinkItem[];
|
|
21
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WikiConfig, WikiData } from "../types";
|
|
2
|
+
export interface WikiAppProps {
|
|
3
|
+
config: WikiConfig;
|
|
4
|
+
data: WikiData;
|
|
5
|
+
basename?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function WikiRoutes(): import("react").JSX.Element;
|
|
8
|
+
export declare function WikiApp({ config, data, basename }: WikiAppProps): import("react").JSX.Element;
|
|
9
|
+
export default WikiApp;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { WikiConfig, WikiData } from "../types";
|
|
3
|
+
import { type Theme } from "../hooks/useTheme";
|
|
4
|
+
export interface WikiContextValue {
|
|
5
|
+
config: WikiConfig;
|
|
6
|
+
data: WikiData;
|
|
7
|
+
lang: string;
|
|
8
|
+
setLang: (lang: string) => void;
|
|
9
|
+
theme: Theme;
|
|
10
|
+
toggleTheme: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const WikiContext: import("react").Context<WikiContextValue | null>;
|
|
13
|
+
export declare function useWiki(): WikiContextValue;
|
|
14
|
+
export declare function WikiProvider({ config, data, children, }: {
|
|
15
|
+
config: WikiConfig;
|
|
16
|
+
data: WikiData;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}): import("react").JSX.Element;
|
package/dist/data.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RawWikiSources, WikiData, Lecture, LecturePage } from "./types";
|
|
2
|
+
export declare function parseTitle(content: string): string;
|
|
3
|
+
export declare function stripFrontmatter(content: string): string;
|
|
4
|
+
export declare function hasProseLines(content: string): boolean;
|
|
5
|
+
export declare function isSidebarStub(ruContent: string, enContent: string): boolean;
|
|
6
|
+
export declare function fileSlug(filePath: string): string;
|
|
7
|
+
export declare function parseLectures(sectionSlug: string, content: string, contentEn: string | null, lectureByNum: Map<string, LecturePage>): Lecture[];
|
|
8
|
+
export declare function createWikiData(sources: RawWikiSources): WikiData;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { WikiApp, WikiRoutes } from "./components/WikiApp";
|
|
2
|
+
export type { WikiAppProps } from "./components/WikiApp";
|
|
3
|
+
export { WikiLayout } from "./components/WikiLayout";
|
|
4
|
+
export { WikiPageView } from "./components/WikiPageView";
|
|
5
|
+
export { LecturePageView } from "./components/LecturePageView";
|
|
6
|
+
export { SearchPopup } from "./components/SearchPopup";
|
|
7
|
+
export { CodeBlockPre } from "./components/CodeBlock";
|
|
8
|
+
export { MermaidDiagram } from "./components/MermaidDiagram";
|
|
9
|
+
export { ZoomableImage } from "./components/ZoomableImage";
|
|
10
|
+
export { DocLinkCard, extractDocUrls } from "./components/DocLinkCard";
|
|
11
|
+
export { CommunityLinks, defaultCommunityLinks, YoutubeIcon, GithubIcon, TelegramIcon, ItchIcon, XIcon, PatreonIcon, BoostyIcon, MediumIcon, UdemyIcon, } from "./components/CommunityLinks";
|
|
12
|
+
export type { CommunityLinkItem } from "./components/CommunityLinks";
|
|
13
|
+
export { CookieConsent } from "./components/CookieConsent";
|
|
14
|
+
export { WikiProvider, WikiContext, useWiki } from "./context/WikiContext";
|
|
15
|
+
export type { WikiContextValue } from "./context/WikiContext";
|
|
16
|
+
export { LangContext, useLang } from "./context/LangContext";
|
|
17
|
+
export { useLanguage } from "./hooks/useLanguage";
|
|
18
|
+
export { useTheme } from "./hooks/useTheme";
|
|
19
|
+
export type { Theme } from "./hooks/useTheme";
|
|
20
|
+
export { initGA, updateConsentState, trackPageView, AnalyticsTracker } from "./analytics";
|
|
21
|
+
export { createWikiData, parseTitle, stripFrontmatter, hasProseLines, isSidebarStub, fileSlug, parseLectures, } from "./data";
|
|
22
|
+
import type { WikiConfig } from "./types";
|
|
23
|
+
export declare function defineWikiConfig(config: WikiConfig): WikiConfig;
|
|
24
|
+
export type { LecturePage, Lecture, WikiPage, RawWikiSources, WikiData, WikiBrandConfig, WikiCategoryConfig, WikiSocialLink, WikiAnalyticsConfig, WikiCookieConsentConfig, WikiConfig, } from "./types";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { cc as s, cd as e, ce as i, cf as o, cg as t, ch as n, ci as r, cj as u, ck as k, cl as m, cm as g, cn as I, co as d, cp as C, cq as L, cr as l, cs as p, ct as P, cu as W, cv as y, cw as f, cx as h, cy as b, cz as x, cA as D, cB as S, cC as w, cD as A, cE as T, cF as B, cG as G, cH as M, cI as V, cJ as v, cK as F, cL as R, cM as U, cN as j, cO as q, cP as z, cQ as E, cR as H } from "./chunks/index-f7Uzykhj.js";
|
|
2
|
+
export {
|
|
3
|
+
s as AnalyticsTracker,
|
|
4
|
+
e as BoostyIcon,
|
|
5
|
+
i as CodeBlockPre,
|
|
6
|
+
o as CommunityLinks,
|
|
7
|
+
t as CookieConsent,
|
|
8
|
+
n as DocLinkCard,
|
|
9
|
+
r as GithubIcon,
|
|
10
|
+
u as ItchIcon,
|
|
11
|
+
k as LangContext,
|
|
12
|
+
m as LecturePageView,
|
|
13
|
+
g as MediumIcon,
|
|
14
|
+
I as MermaidDiagram,
|
|
15
|
+
d as PatreonIcon,
|
|
16
|
+
C as SearchPopup,
|
|
17
|
+
L as TelegramIcon,
|
|
18
|
+
l as UdemyIcon,
|
|
19
|
+
p as WikiApp,
|
|
20
|
+
P as WikiContext,
|
|
21
|
+
W as WikiLayout,
|
|
22
|
+
y as WikiPageView,
|
|
23
|
+
f as WikiProvider,
|
|
24
|
+
h as WikiRoutes,
|
|
25
|
+
b as XIcon,
|
|
26
|
+
x as YoutubeIcon,
|
|
27
|
+
D as ZoomableImage,
|
|
28
|
+
S as createWikiData,
|
|
29
|
+
w as defaultCommunityLinks,
|
|
30
|
+
A as defineWikiConfig,
|
|
31
|
+
T as extractDocUrls,
|
|
32
|
+
B as fileSlug,
|
|
33
|
+
G as hasProseLines,
|
|
34
|
+
M as initGA,
|
|
35
|
+
V as isSidebarStub,
|
|
36
|
+
v as parseLectures,
|
|
37
|
+
F as parseTitle,
|
|
38
|
+
R as stripFrontmatter,
|
|
39
|
+
U as trackPageView,
|
|
40
|
+
j as updateConsentState,
|
|
41
|
+
q as useLang,
|
|
42
|
+
z as useLanguage,
|
|
43
|
+
E as useTheme,
|
|
44
|
+
H as useWiki
|
|
45
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HLJSApi, Language } from "highlight.js";
|
|
2
|
+
export declare const ueC: (hljs: HLJSApi) => Language;
|
|
3
|
+
export declare const ueCpp: (hljs: HLJSApi) => Language;
|
|
4
|
+
export declare const ueLangs: {
|
|
5
|
+
c: (hljs: HLJSApi) => Language;
|
|
6
|
+
cpp: (hljs: HLJSApi) => Language;
|
|
7
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { g as o } from "../chunks/common-BJ4q25wy.js";
|
|
2
|
+
const s = "public protected private virtual override final UCLASS UPROPERTY UFUNCTION UPARAM UINTERFACE UENUM USTRUCT GENERATED_BODY GENERATED_UCLASS_BODY GENERATED_UINTERFACE_BODY GENERATED_USTRUCT_BODY DECLARE_DELEGATE DECLARE_DELEGATE_OneParam DECLARE_DELEGATE_TwoParams DECLARE_MULTICAST_DELEGATE DECLARE_MULTICAST_DELEGATE_OneParam DECLARE_DYNAMIC_MULTICAST_DELEGATE DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam DECLARE_DYNAMIC_DELEGATE DECLARE_DYNAMIC_DELEGATE_RetVal TEXT LOCTEXT NSLOCTEXT", C = "int8 int16 int32 int64 uint8 uint16 uint32 uint64 FString FName FText FStringView FVector FVector2D FVector4 FIntVector FIntPoint FRotator FQuat FTransform FMatrix FColor FLinearColor FHitResult FActorSpawnParameters FTimerHandle FTimerDelegate TArray TMap TSet TMultiMap TQueue TOptional TPair TSharedPtr TSharedRef TWeakPtr TUniquePtr TObjectPtr TWeakObjectPtr TSoftObjectPtr TSoftClassPtr TSubclassOf TEnumAsByte TDelegate TMulticastDelegate AActor UObject UActorComponent USceneComponent APawn ACharacter AController APlayerController APlayerState AGameMode AGameModeBase AGameState AGameStateBase UWorld ULevel UGameInstance ULocalPlayer UUserWidget UWidgetComponent UTextBlock UImage UButton UStaticMeshComponent USkeletalMeshComponent UCameraComponent UCharacterMovementComponent UCapsuleComponent", c = s.trim().split(/\s+/), E = C.trim().split(/\s+/), a = [...c, ...E];
|
|
3
|
+
function T(t, r) {
|
|
4
|
+
Array.isArray(t) && t.push(...r);
|
|
5
|
+
}
|
|
6
|
+
function A(t, r) {
|
|
7
|
+
if (!t)
|
|
8
|
+
return { keywords: { keyword: a, type: E }, contains: [] };
|
|
9
|
+
const e = t(r);
|
|
10
|
+
if (e.keywords && typeof e.keywords == "object" && !Array.isArray(e.keywords)) {
|
|
11
|
+
const n = e.keywords;
|
|
12
|
+
T(n.keyword, a), T(n.type, E);
|
|
13
|
+
}
|
|
14
|
+
return e;
|
|
15
|
+
}
|
|
16
|
+
const i = o.c, U = o.cpp, D = (t) => A(i, t), _ = (t) => A(U, t), l = { ...o, c: D, cpp: _ };
|
|
17
|
+
export {
|
|
18
|
+
D as ueC,
|
|
19
|
+
_ as ueCpp,
|
|
20
|
+
l as ueLangs
|
|
21
|
+
};
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type { ReactNode, ComponentType } from "react";
|
|
2
|
+
export interface LecturePage {
|
|
3
|
+
sectionSlug: string;
|
|
4
|
+
slug: string;
|
|
5
|
+
title: string;
|
|
6
|
+
titleEn: string;
|
|
7
|
+
content: string;
|
|
8
|
+
contentEn: string | null;
|
|
9
|
+
}
|
|
10
|
+
export interface Lecture {
|
|
11
|
+
number: string;
|
|
12
|
+
title: string;
|
|
13
|
+
titleEn: string;
|
|
14
|
+
anchorSlug: string;
|
|
15
|
+
page: LecturePage | null;
|
|
16
|
+
}
|
|
17
|
+
export interface WikiPage {
|
|
18
|
+
slug: string;
|
|
19
|
+
title: string;
|
|
20
|
+
titleEn: string;
|
|
21
|
+
content: string;
|
|
22
|
+
contentEn: string | null;
|
|
23
|
+
lectures: Lecture[];
|
|
24
|
+
}
|
|
25
|
+
export interface RawWikiSources {
|
|
26
|
+
/** Map of RU section file paths to content (e.g. from import.meta.glob) */
|
|
27
|
+
sectionsRu?: Record<string, string>;
|
|
28
|
+
/** Map of EN section file paths to content */
|
|
29
|
+
sectionsEn?: Record<string, string>;
|
|
30
|
+
/** Map of RU lecture file paths to content */
|
|
31
|
+
lecturesRu?: Record<string, string>;
|
|
32
|
+
/** Map of EN lecture file paths to content */
|
|
33
|
+
lecturesEn?: Record<string, string>;
|
|
34
|
+
/** Map of image paths to resolved URLs */
|
|
35
|
+
images?: Record<string, string>;
|
|
36
|
+
/**
|
|
37
|
+
* Alternatively, a unified glob of all markdown files.
|
|
38
|
+
* e.g. import.meta.glob("./wiki/**\/*.md", { query: "?raw", import: "default", eager: true })
|
|
39
|
+
*/
|
|
40
|
+
rawDocs?: Record<string, string>;
|
|
41
|
+
}
|
|
42
|
+
export interface WikiData {
|
|
43
|
+
wikiPages: WikiPage[];
|
|
44
|
+
wikiIndex?: WikiPage;
|
|
45
|
+
wikiSections: WikiPage[];
|
|
46
|
+
lecturePages: Map<string, LecturePage>;
|
|
47
|
+
lectureByNum: Map<string, LecturePage>;
|
|
48
|
+
wikiImages: Record<string, string>;
|
|
49
|
+
getLecturePage: (sectionSlug: string, lectureSlug: string) => LecturePage | undefined;
|
|
50
|
+
}
|
|
51
|
+
export interface WikiBrandConfig {
|
|
52
|
+
/**
|
|
53
|
+
* Title displayed in the sidebar header.
|
|
54
|
+
* Can be a string, a localized object { ru, en }, or a render function.
|
|
55
|
+
*/
|
|
56
|
+
title: ReactNode | {
|
|
57
|
+
ru?: ReactNode;
|
|
58
|
+
en?: ReactNode;
|
|
59
|
+
[key: string]: ReactNode;
|
|
60
|
+
};
|
|
61
|
+
/** Subtitle or second line if applicable */
|
|
62
|
+
subtitle?: ReactNode | {
|
|
63
|
+
ru?: ReactNode;
|
|
64
|
+
en?: ReactNode;
|
|
65
|
+
[key: string]: ReactNode;
|
|
66
|
+
};
|
|
67
|
+
/** Custom logo */
|
|
68
|
+
logo?: ReactNode;
|
|
69
|
+
/** Link when clicking header title. Default is "/" */
|
|
70
|
+
homeLink?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface WikiCategoryConfig {
|
|
73
|
+
id?: string;
|
|
74
|
+
label: string | {
|
|
75
|
+
ru?: string;
|
|
76
|
+
en?: string;
|
|
77
|
+
[key: string]: string | undefined;
|
|
78
|
+
};
|
|
79
|
+
/** Range of numeric section prefixes (e.g. from "01" to "01", from "02" to "12") */
|
|
80
|
+
from?: string;
|
|
81
|
+
to?: string;
|
|
82
|
+
/** Regex pattern to match section slugs */
|
|
83
|
+
pattern?: RegExp;
|
|
84
|
+
/** Custom filter function */
|
|
85
|
+
filter?: (page: WikiPage) => boolean;
|
|
86
|
+
}
|
|
87
|
+
export interface WikiSocialLink {
|
|
88
|
+
name: string;
|
|
89
|
+
url: string;
|
|
90
|
+
icon?: ReactNode;
|
|
91
|
+
}
|
|
92
|
+
export interface WikiAnalyticsConfig {
|
|
93
|
+
googleAnalyticsId?: string;
|
|
94
|
+
linkerDomains?: string[];
|
|
95
|
+
}
|
|
96
|
+
export interface WikiCookieConsentConfig {
|
|
97
|
+
enabled?: boolean;
|
|
98
|
+
privacyPolicyUrl?: string;
|
|
99
|
+
message?: {
|
|
100
|
+
ru?: string;
|
|
101
|
+
en?: string;
|
|
102
|
+
};
|
|
103
|
+
onConsentChange?: (granted: boolean) => void;
|
|
104
|
+
}
|
|
105
|
+
export interface WikiConfig {
|
|
106
|
+
brand: WikiBrandConfig;
|
|
107
|
+
defaultLanguage?: "ru" | "en" | string;
|
|
108
|
+
supportedLanguages?: ("ru" | "en" | string)[];
|
|
109
|
+
categories?: WikiCategoryConfig[];
|
|
110
|
+
socialLinks?: WikiSocialLink[];
|
|
111
|
+
/** Custom components for markdown rendering (e.g. <community-links />) */
|
|
112
|
+
customComponents?: Record<string, ComponentType<any>>;
|
|
113
|
+
/** Custom syntax highlighting languages for lowlight / highlight.js */
|
|
114
|
+
syntaxLanguages?: Record<string, any>;
|
|
115
|
+
analytics?: WikiAnalyticsConfig;
|
|
116
|
+
cookieConsent?: WikiCookieConsentConfig;
|
|
117
|
+
enableSearch?: boolean;
|
|
118
|
+
enableThemeToggle?: boolean;
|
|
119
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#1e1e1e;color:#dcdcdc}.hljs-keyword,.hljs-literal,.hljs-symbol,.hljs-name{color:#569cd6}.hljs-link{color:#569cd6;text-decoration:underline}.hljs-built_in,.hljs-type{color:#4ec9b0}.hljs-number,.hljs-class{color:#b8d7a3}.hljs-string,.hljs-meta .hljs-string{color:#d69d85}.hljs-regexp,.hljs-template-tag{color:#9a5334}.hljs-subst,.hljs-function,.hljs-title,.hljs-params,.hljs-formula{color:#dcdcdc}.hljs-comment,.hljs-quote{color:#57a64a;font-style:italic}.hljs-doctag{color:#608b4e}.hljs-meta,.hljs-meta .hljs-keyword,.hljs-tag{color:#9b9b9b}.hljs-variable,.hljs-template-variable{color:#bd63c5}.hljs-attr,.hljs-attribute{color:#9cdcfe}.hljs-section{color:gold}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-bullet,.hljs-selector-tag,.hljs-selector-id,.hljs-selector-class,.hljs-selector-attr,.hljs-selector-pseudo{color:#d7ba7d}.hljs-addition{background-color:#144212;display:inline-block;width:100%}.hljs-deletion{background-color:#600;display:inline-block;width:100%}
|
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@life-exe/wiki-engine",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Modern, multilingual documentation and wiki engine built with React, Vite, and Tailwind CSS",
|
|
6
|
+
"author": "Yuri Popov <life-exe>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"wiki",
|
|
10
|
+
"documentation",
|
|
11
|
+
"docs",
|
|
12
|
+
"markdown",
|
|
13
|
+
"react",
|
|
14
|
+
"vite",
|
|
15
|
+
"multilingual",
|
|
16
|
+
"search",
|
|
17
|
+
"knowledge-base"
|
|
18
|
+
],
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/life-exe/wiki-engine.git"
|
|
22
|
+
},
|
|
23
|
+
"main": "./dist/index.js",
|
|
24
|
+
"module": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"import": "./dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./languages/ue-cpp": {
|
|
32
|
+
"types": "./dist/languages/ue-cpp.d.ts",
|
|
33
|
+
"import": "./dist/languages/ue-cpp.js"
|
|
34
|
+
},
|
|
35
|
+
"./style.css": "./dist/wiki-engine.css",
|
|
36
|
+
"./wiki-engine.css": "./dist/wiki-engine.css"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist"
|
|
40
|
+
],
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"react": ">=18.0.0",
|
|
43
|
+
"react-dom": ">=18.0.0",
|
|
44
|
+
"react-router-dom": ">=6.0.0"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"clsx": "^2.1.1",
|
|
48
|
+
"highlight.js": "^11.11.1",
|
|
49
|
+
"lowlight": "^3.3.0",
|
|
50
|
+
"lucide-react": "^0.475.0",
|
|
51
|
+
"mermaid": "^11.15.0",
|
|
52
|
+
"react-markdown": "^10.1.0",
|
|
53
|
+
"rehype-highlight": "^7.0.2",
|
|
54
|
+
"rehype-raw": "^7.0.0",
|
|
55
|
+
"remark-gfm": "^4.0.1",
|
|
56
|
+
"tailwind-merge": "^3.0.1"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@types/hast": "^3.0.4",
|
|
60
|
+
"@types/node": "^25.3.1",
|
|
61
|
+
"@types/react": "^19.2.14",
|
|
62
|
+
"@types/react-dom": "^19.2.3",
|
|
63
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
64
|
+
"react": "^19.0.0",
|
|
65
|
+
"react-dom": "^19.0.0",
|
|
66
|
+
"react-router-dom": "^7.14.2",
|
|
67
|
+
"typescript": "~5.7.2",
|
|
68
|
+
"vite": "^6.0.5"
|
|
69
|
+
},
|
|
70
|
+
"scripts": {
|
|
71
|
+
"dev": "vite",
|
|
72
|
+
"build": "vite build && tsc --emitDeclarationOnly",
|
|
73
|
+
"typecheck": "tsc --noEmit",
|
|
74
|
+
"lint": "tsc --noEmit"
|
|
75
|
+
}
|
|
76
|
+
}
|