Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build/bazel-generated-file-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ platform/jewel/int-ui/int-ui-standalone
platform/jewel/int-ui/int-ui-standalone-tests
platform/jewel/markdown/core
platform/jewel/markdown/extensions/autolink
platform/jewel/markdown/extensions/front-matter
platform/jewel/markdown/extensions/gfm-alerts
platform/jewel/markdown/extensions/gfm-strikethrough
platform/jewel/markdown/extensions/gfm-tables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ object CommunityModuleSets {
module("intellij.platform.jewel.markdown.extensions.gfmAlerts")
module("intellij.platform.jewel.markdown.extensions.gfmTables")
module("intellij.platform.jewel.markdown.extensions.gfmStrikethrough")
module("intellij.platform.jewel.markdown.extensions.frontMatter")
module("intellij.platform.jewel.markdown.extensions.images")
module("intellij.platform.jewel.markdown.core")
}
Expand Down
5 changes: 5 additions & 0 deletions platform/compose/markdown/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jvm_library(
"//platform/jewel/markdown/extensions/autolink",
"//platform/jewel/markdown/extensions/gfm-alerts",
"//platform/jewel/markdown/extensions/gfm-strikethrough",
"//platform/jewel/markdown/extensions/front-matter",
"//platform/jewel/markdown/extensions/gfm-tables",
"//platform/jewel/markdown/extensions/images",
"//platform/jewel/markdown/ide-laf-bridge-styling",
Expand All @@ -28,6 +29,7 @@ jvm_library(
"//platform/jewel/markdown/extensions/autolink",
"//platform/jewel/markdown/extensions/gfm-alerts",
"//platform/jewel/markdown/extensions/gfm-strikethrough",
"//platform/jewel/markdown/extensions/front-matter",
"//platform/jewel/markdown/extensions/gfm-tables",
"//platform/jewel/markdown/extensions/images",
"//platform/jewel/markdown/ide-laf-bridge-styling",
Expand All @@ -51,6 +53,8 @@ jvm_library(
"//platform/jewel/markdown/extensions/gfm-alerts:gfm-alerts_test_lib",
"//platform/jewel/markdown/extensions/gfm-strikethrough",
"//platform/jewel/markdown/extensions/gfm-strikethrough:gfm-strikethrough_test_lib",
"//platform/jewel/markdown/extensions/front-matter",
"//platform/jewel/markdown/extensions/front-matter:front-matter_test_lib",
"//platform/jewel/markdown/extensions/gfm-tables",
"//platform/jewel/markdown/extensions/gfm-tables:gfm-tables_test_lib",
"//platform/jewel/markdown/extensions/images",
Expand All @@ -65,6 +69,7 @@ jvm_library(
"//platform/jewel/markdown/extensions/autolink:autolink_test_lib",
"//platform/jewel/markdown/extensions/gfm-alerts:gfm-alerts_test_lib",
"//platform/jewel/markdown/extensions/gfm-strikethrough:gfm-strikethrough_test_lib",
"//platform/jewel/markdown/extensions/front-matter:front-matter_test_lib",
"//platform/jewel/markdown/extensions/gfm-tables:gfm-tables_test_lib",
"//platform/jewel/markdown/extensions/images:images_test_lib",
"//platform/jewel/markdown/ide-laf-bridge-styling:ide-laf-bridge-styling_test_lib",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<orderEntry type="module" module-name="intellij.platform.jewel.markdown.extensions.autolink" exported="" />
<orderEntry type="module" module-name="intellij.platform.jewel.markdown.extensions.gfmAlerts" exported="" />
<orderEntry type="module" module-name="intellij.platform.jewel.markdown.extensions.gfmStrikethrough" exported="" />
<orderEntry type="module" module-name="intellij.platform.jewel.markdown.extensions.frontMatter" exported="" />
<orderEntry type="module" module-name="intellij.platform.jewel.markdown.extensions.gfmTables" exported="" />
<orderEntry type="module" module-name="intellij.platform.jewel.markdown.extensions.images" exported="" />
<orderEntry type="module" module-name="intellij.platform.jewel.markdown.ideLafBridgeStyling" exported="" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<module name="intellij.platform.jewel.markdown.extensions.autolink" />
<module name="intellij.platform.jewel.markdown.extensions.images" />
<module name="intellij.platform.jewel.markdown.extensions.gfmAlerts" />
<module name="intellij.platform.jewel.markdown.extensions.frontMatter" />
<module name="intellij.platform.jewel.markdown.extensions.gfmTables" />
<module name="intellij.platform.jewel.markdown.extensions.gfmStrikethrough" />
</dependencies>
Expand Down
1 change: 1 addition & 0 deletions platform/jewel/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ commonmark-core = { module = "org.commonmark:commonmark", version.ref = "commonm
commonmark-ext-autolink = { module = "org.commonmark:commonmark-ext-autolink", version.ref = "commonmark" }
commonmark-ext-gfm-strikethrough = { module = "org.commonmark:commonmark-ext-gfm-strikethrough", version.ref = "commonmark" }
commonmark-ext-gfm-tables = { module = "org.commonmark:commonmark-ext-gfm-tables", version.ref = "commonmark" }
commonmark-ext-yaml-front-matter = { module = "org.commonmark:commonmark-ext-yaml-front-matter", version.ref = "commonmark" }
detekt-api = { module = "io.gitlab.arturbosch.detekt:detekt-api", version.ref = "detekt" }
detekt-core = { module = "io.gitlab.arturbosch.detekt:detekt-core", version.ref = "detekt" }
detekt-test = { module = "io.gitlab.arturbosch.detekt:detekt-test", version.ref = "detekt" }
Expand Down
83 changes: 83 additions & 0 deletions platform/jewel/markdown/extensions/front-matter/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
### auto-generated section `build intellij.platform.jewel.markdown.extensions.frontMatter` start
load("//build:compiler-options.bzl", "create_kotlinc_options")
load("@rules_jvm//:jvm.bzl", "jvm_library", "resourcegroup")

create_kotlinc_options(
name = "custom_front-matter",
opt_in = [
"androidx.compose.ui.ExperimentalComposeUiApi",
"androidx.compose.foundation.ExperimentalFoundationApi",
"org.jetbrains.jewel.foundation.ExperimentalJewelApi",
"org.jetbrains.jewel.foundation.InternalJewelApi",
],
x_context_parameters = True,
x_explicit_api_mode = "strict"
)

resourcegroup(
name = "front-matter_resources",
srcs = glob(["src/main/resources/**/*"]),
strip_prefix = "src/main/resources"
)

jvm_library(
name = "front-matter",
module_name = "intellij.platform.jewel.markdown.extensions.frontMatter",
visibility = ["//visibility:public"],
srcs = glob(["src/main/kotlin/**/*.kt", "src/main/kotlin/**/*.java", "src/main/kotlin/**/*.form"], allow_empty = True),
resources = [":front-matter_resources"],
kotlinc_opts = ":custom_front-matter",
deps = [
"@lib//:kotlin-stdlib",
"//libraries/kotlinx/coroutines/core",
"@lib//:jetbrains-annotations",
"//platform/jewel/markdown/core",
"//platform/jewel/markdown/extensions/gfm-tables",
"//platform/jewel/ui",
"//platform/jewel/foundation",
"//libraries/compose-foundation-desktop",
"//libraries/compose-runtime-desktop",
],
plugins = ["@lib//:compose-plugin"]
)

jvm_library(
name = "front-matter_test_lib",
visibility = ["//visibility:public"],
srcs = glob(["src/test/kotlin/**/*.kt", "src/test/kotlin/**/*.java", "src/test/kotlin/**/*.form"], allow_empty = True),
kotlinc_opts = ":custom_front-matter",
associates = [":front-matter"],
deps = [
"@lib//:kotlin-stdlib",
"//libraries/kotlinx/coroutines/core",
"//libraries/kotlinx/coroutines/core:core_test_lib",
"@lib//:jetbrains-annotations",
"//platform/jewel/markdown/core",
"//platform/jewel/markdown/core:core_test_lib",
"//platform/jewel/markdown/extensions/gfm-tables",
"//platform/jewel/markdown/extensions/gfm-tables:gfm-tables_test_lib",
"//platform/jewel/ui",
"//platform/jewel/ui:ui_test_lib",
"//platform/jewel/foundation",
"//platform/jewel/foundation:foundation_test_lib",
"//libraries/compose-foundation-desktop",
"//libraries/compose-foundation-desktop:compose-foundation-desktop_test_lib",
"//libraries/compose-runtime-desktop",
"//libraries/compose-runtime-desktop:compose-runtime-desktop_test_lib",
"//libraries/compose-foundation-desktop-junit",
"//libraries/compose-foundation-desktop-junit:compose-foundation-desktop-junit_test_lib",
"//libraries/junit4",
"//libraries/junit4:junit4_test_lib",
],
plugins = ["@lib//:compose-plugin"]
)
### auto-generated section `build intellij.platform.jewel.markdown.extensions.frontMatter` end

### auto-generated section `test intellij.platform.jewel.markdown.extensions.frontMatter` start
load("@community//build:tests-options.bzl", "jps_test")

jps_test(
name = "front-matter_test",
runtime_deps = [":front-matter_test_lib"]
)
### auto-generated section `test intellij.platform.jewel.markdown.extensions.frontMatter` end
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*f:org.jetbrains.jewel.markdown.extensions.frontmatter.FrontMatterProcessorExtension
- org.jetbrains.jewel.markdown.extensions.MarkdownProcessorExtension
- sf:$stable:I
- sf:INSTANCE:org.jetbrains.jewel.markdown.extensions.frontmatter.FrontMatterProcessorExtension
- getBlockProcessorExtension():org.jetbrains.jewel.markdown.extensions.MarkdownBlockProcessorExtension
- getParserExtension():org.commonmark.parser.Parser$ParserExtension
- getTextRendererExtension():org.commonmark.renderer.text.TextContentRenderer$TextContentRendererExtension
Empty file.
21 changes: 21 additions & 0 deletions platform/jewel/markdown/extensions/front-matter/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeFeatureFlag

plugins {
jewel
`jewel-check-public-api`
alias(libs.plugins.composeDesktop)
alias(libs.plugins.compose.compiler)
}

dependencies {
implementation(projects.markdown.core)
implementation(projects.markdown.extensions.gfmTables)

testImplementation(compose.desktop.uiTestJUnit4)
}

publicApiValidation {
excludedClassRegexes = setOf("org.jetbrains.jewel.markdown.extensions.frontmatter.*")
}

composeCompiler { featureFlags.add(ComposeFeatureFlag.OptimizeNonSkippingGroups) }
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org/commonmark/**
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="kotlin-language" name="Kotlin">
<configuration version="5" platform="JVM 21" allPlatforms="JVM [21]" useProjectSettings="false">
<compilerSettings>
<option name="additionalArguments" value="-Xjvm-default=all -opt-in=androidx.compose.ui.ExperimentalComposeUiApi -Xcontext-parameters -opt-in=androidx.compose.foundation.ExperimentalFoundationApi -opt-in=org.jetbrains.jewel.foundation.ExperimentalJewelApi -opt-in=org.jetbrains.jewel.foundation.InternalJewelApi -Xexplicit-api=strict -XXLanguage:+AllowEagerSupertypeAccessibilityChecks -progressive" />
</compilerSettings>
<compilerArguments>
<stringArguments>
<stringArg name="jvmTarget" arg="21" />
<stringArg name="apiVersion" arg="2.3" />
<stringArg name="languageVersion" arg="2.3" />
</stringArguments>
<arrayArguments>
<arrayArg name="pluginClasspaths">
<args>$MAVEN_REPOSITORY$/org/jetbrains/kotlin/kotlin-compose-compiler-plugin/2.3.10-RC/kotlin-compose-compiler-plugin-2.3.10-RC.jar</args>
</arrayArg>
</arrayArguments>
</compilerArguments>
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/kotlin" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/kotlin" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/bin" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="module" module-name="intellij.libraries.kotlinx.coroutines.core" />
<orderEntry type="library" name="jetbrains-annotations" level="project" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="intellij.platform.jewel.markdown.core" />
<orderEntry type="module" module-name="intellij.platform.jewel.markdown.extensions.gfmTables" />
<orderEntry type="module" module-name="intellij.platform.jewel.ui" />
<orderEntry type="module" module-name="intellij.platform.jewel.foundation" />
<orderEntry type="module" module-name="intellij.libraries.compose.foundation.desktop" />
<orderEntry type="module" module-name="intellij.libraries.compose.runtime.desktop" />
<orderEntry type="module" module-name="intellij.libraries.compose.foundation.desktop.junit" scope="TEST" />
<orderEntry type="module" module-name="intellij.libraries.junit4" scope="TEST" />
</component>
</module>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Signature format: 4.0
package org.jetbrains.jewel.markdown.extensions.frontmatter {

@SuppressCompatibility @org.jetbrains.annotations.ApiStatus.Experimental @org.jetbrains.jewel.foundation.ExperimentalJewelApi public final class FrontMatterProcessorExtension implements org.jetbrains.jewel.markdown.extensions.MarkdownProcessorExtension {
property public org.jetbrains.jewel.markdown.extensions.MarkdownBlockProcessorExtension blockProcessorExtension;
property public org.commonmark.parser.Parser.ParserExtension parserExtension;
property public org.commonmark.renderer.text.TextContentRenderer.TextContentRendererExtension textRendererExtension;
field public static final org.jetbrains.jewel.markdown.extensions.frontmatter.FrontMatterProcessorExtension INSTANCE;
}

}

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Signature format: 4.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- name: dist.all/lib/intellij.platform.jewel.markdown.extensions.frontMatter.jar
modules:
- name: intellij.platform.jewel.markdown.extensions.frontMatter
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package org.jetbrains.jewel.markdown.extensions.frontmatter

import org.commonmark.node.CustomBlock

internal class FrontMatterBlock : CustomBlock()
Loading
Loading