From 0f0d0d49ab3a72875cef612d13ecd73fd1f7e681 Mon Sep 17 00:00:00 2001 From: Sebastiano Poggi Date: Wed, 11 Dec 2024 20:39:57 +0100 Subject: [PATCH 01/10] Implement BasicTableLayout, use it in the Markdown renderer BasicTableLayout is a simple table layout that lives in foundation. It does not have styling (that'll be implemented in the ui layer) but does all we need for Markdown, and other similar basic scenarios. It is not lazy and its performances can surely be improved, but it works. --- .idea/inspectionProfiles/Project_Default.xml | 5 + .idea/ktlint-plugin.xml | 8 - .../jewel/foundation/BasicTableLayout.kt | 211 ++++++++++++++++++ gradle/libs.versions.toml | 1 + markdown/core/api/core.api | 5 + markdown/core/build.gradle.kts | 1 - .../markdown/processing/ProcessingUtil.kt | 9 +- .../rendering/DefaultMarkdownBlockRenderer.kt | 17 +- .../rendering/MarkdownBlockRenderer.kt | 15 ++ .../extension/gfm-alerts/build.gradle.kts | 1 - .../extension/gfm-tables/api/gfm-tables.api | 23 ++ .../extension/gfm-tables/build.gradle.kts | 28 +++ .../github/tables/GitHubTableBlockRenderer.kt | 158 +++++++++++++ .../tables/GitHubTableProcessorExtension.kt | 167 ++++++++++++++ samples/standalone/build.gradle.kts | 1 + .../view/markdown/MarkdownEditor.kt | 9 +- .../view/markdown/MarkdownPreview.kt | 23 +- settings.gradle.kts | 4 + 18 files changed, 658 insertions(+), 28 deletions(-) create mode 100644 foundation/src/main/kotlin/org/jetbrains/jewel/foundation/BasicTableLayout.kt create mode 100644 markdown/extension/gfm-tables/api/gfm-tables.api create mode 100644 markdown/extension/gfm-tables/build.gradle.kts create mode 100644 markdown/extension/gfm-tables/src/main/kotlin/org/jetbrains/jewel/markdown/extensions/github/tables/GitHubTableBlockRenderer.kt create mode 100644 markdown/extension/gfm-tables/src/main/kotlin/org/jetbrains/jewel/markdown/extensions/github/tables/GitHubTableProcessorExtension.kt diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 65ea4fd049..79208c5912 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -3,6 +3,11 @@