diff --git a/.gitignore b/.gitignore
index ad44a20f4..abc58aa1c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -234,3 +234,4 @@ bgw-gui/src/jvmMain/kotlin/tools/aqua/bgw/application/Config.kt
bgw-docs/website/public/bgw/bgw-gui.js
bgw-docs/website/public/bgw/bgwSamples.json
bgw-docs/website/public/bgw/cleanedStructure.json
+bgw-docs/build/
diff --git a/bgw-docs/parser/.gitignore b/bgw-docs/parser/.gitignore
index 67f4f277f..bb5e76b8e 100644
--- a/bgw-docs/parser/.gitignore
+++ b/bgw-docs/parser/.gitignore
@@ -1,4 +1,5 @@
/node_modules/
/example/
/output/
+/build/
package-lock.json
\ No newline at end of file
diff --git a/bgw-docs/parser/app.js b/bgw-docs/parser/app.js
index 7b724d76f..2d6d99df9 100644
--- a/bgw-docs/parser/app.js
+++ b/bgw-docs/parser/app.js
@@ -11,9 +11,9 @@ const {
let rootDir = "./example/htmlPartial";
-function loadPackageList() {
+function loadPackageList(filename) {
const packageList = fs.readFileSync(
- "./example/htmlPartial/package-list",
+ "./example/htmlPartial/" + filename,
"utf8"
);
@@ -23,7 +23,15 @@ function loadPackageList() {
return lines;
}
-let validPackages = loadPackageList();
+function loadAllPackages() {
+ const bgwGui = loadPackageList("package-list");
+ const bgwClient = loadPackageList("package-list-client");
+ const bgwCommon = loadPackageList("package-list-common");
+
+ return [...bgwGui, ...bgwClient, ...bgwCommon];
+}
+
+let validPackages = loadAllPackages();
function getDirectoryStructure(dir) {
let results = {};
diff --git a/bgw-docs/parser/build.gradle.kts b/bgw-docs/parser/build.gradle.kts
index 34e2ce902..81d2dca9b 100644
--- a/bgw-docs/parser/build.gradle.kts
+++ b/bgw-docs/parser/build.gradle.kts
@@ -76,7 +76,10 @@ tasks.register("buildAndCopySamples") {
}
tasks.register("buildAndCopyDokkaHtml") {
- dependsOn(":bgw-gui:dokkaHtmlPartial")
+ dependsOn(
+ rootProject.project(":bgw-gui").tasks.named("dokkaHtmlPartial"),
+ rootProject.project(":bgw-net:bgw-net-client").tasks.named("dokkaHtmlPartial"),
+ rootProject.project(":bgw-net:bgw-net-common").tasks.named("dokkaHtmlPartial"))
this.group = "build"
doLast {
val sourceDir = project(":bgw-gui").buildDir.resolve("dokka/htmlPartial")
@@ -86,6 +89,26 @@ tasks.register("buildAndCopyDokkaHtml") {
from(sourceDir)
into(destinationDir)
}
+
+ val sourceDir2 =
+ rootProject.project(":bgw-net:bgw-net-client").buildDir.resolve("dokka/htmlPartial")
+ val destinationDir2 = projectDir.resolve("example/htmlPartial")
+ println("Copying files from $sourceDir2 to $destinationDir2")
+ copy {
+ from(sourceDir2)
+ into(destinationDir2)
+ rename("package-list", "package-list-client")
+ }
+
+ val sourceDir3 =
+ rootProject.project(":bgw-net:bgw-net-common").buildDir.resolve("dokka/htmlPartial")
+ val destinationDir3 = projectDir.resolve("example/htmlPartial")
+ println("Copying files from $sourceDir3 to $destinationDir3")
+ copy {
+ from(sourceDir3)
+ into(destinationDir3)
+ rename("package-list", "package-list-common")
+ }
}
}
diff --git a/bgw-docs/website/src/lib/utils.ts b/bgw-docs/website/src/lib/utils.ts
index c0475ef9f..e865b35b0 100644
--- a/bgw-docs/website/src/lib/utils.ts
+++ b/bgw-docs/website/src/lib/utils.ts
@@ -334,12 +334,14 @@ export const layoutMap = {
description: "Animations are a powerful tool to bring your app to life.",
icon: "motion_play",
package: "tools.aqua.bgw.animation",
+ module: "bgw-gui",
},
components: {
title: "Components",
description: "Components are the building blocks of your BGW app.",
icon: "shapes",
package: "tools.aqua.bgw.components",
+ module: "bgw-gui",
},
container: {
title: "Container",
@@ -347,54 +349,63 @@ export const layoutMap = {
"Containers are used to layout and align your game components.",
icon: "stacks",
package: "tools.aqua.bgw.components.container",
+ module: "bgw-gui",
},
gamecomponentviews: {
title: "GameComponentViews",
description: "GameComponentViews are used to display your game components.",
icon: "playing_cards",
package: "tools.aqua.bgw.components.gamecomponentviews",
+ module: "bgw-gui",
},
layoutviews: {
title: "LayoutViews",
description: "LayoutViews are used to layout and align your ui components.",
icon: "view_carousel",
package: "tools.aqua.bgw.components.layoutviews",
+ module: "bgw-gui",
},
uicomponents: {
title: "UIComponents",
description: "UIComponents are used to build your UI.",
icon: "buttons_alt",
package: "tools.aqua.bgw.components.uicomponents",
+ module: "bgw-gui",
},
core: {
title: "Core",
description: "Includes core classes, functions and constants.",
icon: "token",
package: "tools.aqua.bgw.core",
+ module: "bgw-gui",
},
dialog: {
title: "Dialog",
description: "Dialogs are popups that can be used to display information.",
icon: "wysiwyg",
package: "tools.aqua.bgw.dialog",
+ module: "bgw-gui",
},
event: {
title: "Event",
description: "Events are used to handle user interactions.",
icon: "web_traffic",
package: "tools.aqua.bgw.event",
+ module: "bgw-gui",
},
io: {
title: "IO",
description: "IO classes are used to read and write files.",
icon: "save",
package: "tools.aqua.bgw.io",
+ module: "bgw-gui",
},
observable: {
title: "Observable",
description: "Observables are used to listen for changes in your data.",
icon: "visibility",
package: "tools.aqua.bgw.observable",
+ module: "bgw-gui",
},
lists: {
title: "Lists",
@@ -402,30 +413,87 @@ export const layoutMap = {
"Observable lists are used to store data as a list and observe changes.",
icon: "format_list_numbered",
package: "tools.aqua.bgw.observable.lists",
+ module: "bgw-gui",
},
properties: {
title: "Properties",
description: "Properties are used to store data and observe changes.",
icon: "123",
package: "tools.aqua.bgw.observable.properties",
+ module: "bgw-gui",
},
style: {
title: "Style",
description: "Style classes are used to style your components.",
icon: "style",
package: "tools.aqua.bgw.style",
+ module: "bgw-gui",
},
util: {
title: "Util",
description: "Util classes are used to perform common tasks.",
icon: "function",
package: "tools.aqua.bgw.util",
+ module: "bgw-gui",
},
visual: {
title: "Visual",
description: "Visual classes are used to give your components color.",
icon: "colors",
package: "tools.aqua.bgw.visual",
+ module: "bgw-gui",
+ },
+ annotations: {
+ title: "Annotations",
+ description:
+ "Network annotations are used to annotate network message receivers.",
+ icon: "alternate_email",
+ package: "tools.aqua.bgw.net.common.annotations",
+ module: "bgw-net",
+ },
+ client: {
+ title: "Client",
+ description: "The client is used to communicate with the BGW-Net server.",
+ icon: "cast",
+ package: "tools.aqua.bgw.net.client",
+ module: "bgw-net",
+ },
+ common: {
+ title: "Common",
+ description: "Common classes are used to define network messages.",
+ icon: "device_hub",
+ package: "tools.aqua.bgw.net.common",
+ module: "bgw-net",
+ },
+ message: {
+ title: "Message",
+ description:
+ "Messages are used to send custom game messages between clients.",
+ icon: "message",
+ package: "tools.aqua.bgw.net.common.message",
+ module: "bgw-net",
+ },
+ notification: {
+ title: "Notification",
+ description: "Notifications are used to send alerts between clients.",
+ icon: "mark_chat_unread",
+ package: "tools.aqua.bgw.net.common.notification",
+ module: "bgw-net",
+ },
+ request: {
+ title: "Request",
+ description:
+ "Requests are used to send predefined framework messages to clients.",
+ icon: "keyboard_double_arrow_right",
+ package: "tools.aqua.bgw.net.common.request",
+ module: "bgw-net",
+ },
+ response: {
+ title: "Response",
+ description: "Responses are used to receive data from clients.",
+ icon: "keyboard_double_arrow_left",
+ package: "tools.aqua.bgw.net.common.response",
+ module: "bgw-net",
},
};
diff --git a/bgw-docs/website/src/pages/BGWDocsLayout.tsx b/bgw-docs/website/src/pages/BGWDocsLayout.tsx
index 3e37588ad..1ffac80a0 100644
--- a/bgw-docs/website/src/pages/BGWDocsLayout.tsx
+++ b/bgw-docs/website/src/pages/BGWDocsLayout.tsx
@@ -324,76 +324,167 @@ function BGWDocsLayout() {
{buildTopSidebar(loc)}