├── .circleci
└── config.yml
├── .github
└── workflows
│ └── build.yml
├── .gitignore
├── .idea
└── codeStyles
│ ├── Project.xml
│ └── codeStyleConfig.xml
├── CHANGELOG.md
├── LICENSE
├── README.md
├── benchmark
├── build.gradle.kts
└── src
│ ├── commonMain
│ └── kotlin
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ └── benchmark
│ │ ├── KotlinHtml.kt
│ │ ├── Platform.kt
│ │ └── SimpleBenchmark.kt
│ ├── jvmMain
│ └── kotlin
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ └── benchmark
│ │ ├── KotlinxHtml.kt
│ │ ├── Platform.kt
│ │ ├── SimpleBenchmarkMain.kt
│ │ ├── ThreadedBenchmark.kt
│ │ └── ThreadedBenchmarkMain.kt
│ ├── linuxX64Main
│ └── kotlin
│ │ ├── BenchmarkNativeMain.kt
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ └── benchmark
│ │ └── Platform.kt
│ └── macosX64Main
│ └── kotlin
│ ├── BenchmarkNativeMain.kt
│ └── dev
│ └── scottpierce
│ └── html
│ └── benchmark
│ └── Platform.kt
├── build.gradle.kts
├── buildSrc
├── build.gradle.kts
└── src
│ └── main
│ └── kotlin
│ └── Deps.kt
├── codecov.yml
├── gradle.properties
├── gradle
├── ktlint.gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── kotlin-html-generator
├── build.gradle.kts
└── src
│ └── main
│ └── kotlin
│ └── dev
│ └── scottpierce
│ └── html
│ └── generate
│ ├── GenerateMain.kt
│ ├── model
│ ├── ClassName.kt
│ ├── Constants.kt
│ ├── GeneratedElement.kt
│ ├── GeneratedStyleProperty.kt
│ └── Util.kt
│ └── task
│ ├── GenerateElementDslTask.kt
│ ├── GenerateElementTestsTask.kt
│ ├── GenerateStyleBuilderDslTask.kt
│ └── GenerateStylePropertiesTask.kt
├── kotlin-html-ktor
├── build.gradle.kts
├── gradle.properties
└── src
│ └── main
│ └── kotlin
│ └── dev
│ └── scottpierce
│ └── html
│ └── ktor
│ └── RespondHtml.kt
├── kotlin-html-style-builder-desktop
├── build.gradle.kts
├── gradle.properties
└── src
│ ├── commonMain
│ └── kotlin
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ └── stylebuilder
│ │ └── DesktopStyleBuilder.kt
│ └── commonTest
│ └── kotlin
│ └── dev
│ └── scottpierce
│ └── html
│ └── stylebuilder
│ ├── DesktopStyleBuilderTest.kt
│ └── TestUtil.kt
├── kotlin-html-style-builder-phone
├── build.gradle.kts
├── gradle.properties
└── src
│ ├── commonMain
│ └── kotlin
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ └── stylebuilder
│ │ └── PhoneStyleBuilder.kt
│ └── commonTest
│ └── kotlin
│ └── dev
│ └── scottpierce
│ └── html
│ └── stylebuilder
│ ├── PhoneStyleBuilderTest.kt
│ └── TestUtil.kt
├── kotlin-html-style-builder-tablet
├── build.gradle.kts
├── gradle.properties
└── src
│ ├── commonMain
│ └── kotlin
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ └── stylebuilder
│ │ └── TabletStyleBuilder.kt
│ └── commonTest
│ └── kotlin
│ └── dev
│ └── scottpierce
│ └── html
│ └── stylebuilder
│ ├── TabletStyleBuilderTest.kt
│ └── TestUtil.kt
├── kotlin-html-style-builder
├── build.gradle.kts
├── gradle.properties
└── src
│ ├── commonMain
│ └── kotlin
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ └── stylebuilder
│ │ ├── StyleBuilder.kt
│ │ ├── StyleBuilderInsertionContext.kt
│ │ └── StyleBuilderState.kt
│ ├── commonTest
│ └── kotlin
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ └── stylebuilder
│ │ ├── StyleBuilderTests.kt
│ │ ├── TestUtil.kt
│ │ └── WriteOnceTests.kt
│ └── genMain
│ └── kotlin
│ └── dev
│ └── scottpierce
│ └── html
│ └── writer
│ └── element
│ ├── AStyleBuilderDsl.kt
│ ├── ArticleStyleBuilderDsl.kt
│ ├── AsideStyleBuilderDsl.kt
│ ├── BodyStyleBuilderDsl.kt
│ ├── ButtonStyleBuilderDsl.kt
│ ├── CaptionStyleBuilderDsl.kt
│ ├── DetailsStyleBuilderDsl.kt
│ ├── DivStyleBuilderDsl.kt
│ ├── FigcaptionStyleBuilderDsl.kt
│ ├── FigureStyleBuilderDsl.kt
│ ├── FooterStyleBuilderDsl.kt
│ ├── H1StyleBuilderDsl.kt
│ ├── H2StyleBuilderDsl.kt
│ ├── H3StyleBuilderDsl.kt
│ ├── H4StyleBuilderDsl.kt
│ ├── H5StyleBuilderDsl.kt
│ ├── H6StyleBuilderDsl.kt
│ ├── HeadStyleBuilderDsl.kt
│ ├── HeaderStyleBuilderDsl.kt
│ ├── IStyleBuilderDsl.kt
│ ├── InputStyleBuilderDsl.kt
│ ├── LabelStyleBuilderDsl.kt
│ ├── LiStyleBuilderDsl.kt
│ ├── MainStyleBuilderDsl.kt
│ ├── MarkStyleBuilderDsl.kt
│ ├── NavStyleBuilderDsl.kt
│ ├── OptionStyleBuilderDsl.kt
│ ├── PStyleBuilderDsl.kt
│ ├── SectionStyleBuilderDsl.kt
│ ├── SelectStyleBuilderDsl.kt
│ ├── SpanStyleBuilderDsl.kt
│ ├── SummaryStyleBuilderDsl.kt
│ ├── TableStyleBuilderDsl.kt
│ ├── TbodyStyleBuilderDsl.kt
│ ├── TdStyleBuilderDsl.kt
│ ├── TfootStyleBuilderDsl.kt
│ ├── ThStyleBuilderDsl.kt
│ ├── TheadStyleBuilderDsl.kt
│ ├── TimeStyleBuilderDsl.kt
│ ├── TrStyleBuilderDsl.kt
│ ├── UlStyleBuilderDsl.kt
│ └── VideoStyleBuilderDsl.kt
├── kotlin-html-writer
├── build.gradle.kts
├── gradle.properties
└── src
│ ├── commonMain
│ └── kotlin
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ └── writer
│ │ ├── Contexts.kt
│ │ ├── HtmlOutput.kt
│ │ ├── HtmlWriter.kt
│ │ ├── PlatformWriter.kt
│ │ ├── element
│ │ ├── DocType.kt
│ │ ├── ElementUtil.kt
│ │ ├── HeadContextUtil.kt
│ │ ├── Html.kt
│ │ ├── MetaUtil.kt
│ │ ├── RawElementUtil.kt
│ │ ├── Script.kt
│ │ └── Title.kt
│ │ └── style
│ │ ├── BoxShadow.kt
│ │ ├── Color.kt
│ │ ├── Dimension.kt
│ │ ├── HighStyleProperties.kt
│ │ ├── PropertiesExt.kt
│ │ ├── PropertyModels.kt
│ │ ├── StylePropertyUtils.kt
│ │ └── StyleWriterUtils.kt
│ ├── commonTest
│ └── kotlin
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ └── writer
│ │ ├── AttributeTest.kt
│ │ ├── ContentTest.kt
│ │ ├── HeaderStyleTest.kt
│ │ ├── HtmlTest.kt
│ │ ├── element
│ │ ├── BrTest.kt
│ │ ├── DivTest.kt
│ │ ├── MetaUtilTest.kt
│ │ ├── MoreSelectTests.kt
│ │ ├── ScriptTest.kt
│ │ ├── TestUtil.kt
│ │ └── TitleTest.kt
│ │ ├── style
│ │ ├── ColorTests.kt
│ │ ├── FlexGrowTests.kt
│ │ ├── LineHeightTests.kt
│ │ ├── ListStyleTest.kt
│ │ ├── MediaQueryTest.kt
│ │ └── StyleTest.kt
│ │ └── util
│ │ └── HtmlWriterTestUtil.kt
│ ├── genMain
│ └── kotlin
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ └── writer
│ │ ├── element
│ │ ├── ADsl.kt
│ │ ├── ArticleDsl.kt
│ │ ├── AsideDsl.kt
│ │ ├── BDsl.kt
│ │ ├── BodyDsl.kt
│ │ ├── BrDsl.kt
│ │ ├── ButtonDsl.kt
│ │ ├── CaptionDsl.kt
│ │ ├── ColDsl.kt
│ │ ├── ColgroupDsl.kt
│ │ ├── DetailsDsl.kt
│ │ ├── DivDsl.kt
│ │ ├── EmDsl.kt
│ │ ├── FigcaptionDsl.kt
│ │ ├── FigureDsl.kt
│ │ ├── FooterDsl.kt
│ │ ├── H1Dsl.kt
│ │ ├── H2Dsl.kt
│ │ ├── H3Dsl.kt
│ │ ├── H4Dsl.kt
│ │ ├── H5Dsl.kt
│ │ ├── H6Dsl.kt
│ │ ├── HeadDsl.kt
│ │ ├── HeaderDsl.kt
│ │ ├── HrDsl.kt
│ │ ├── IDsl.kt
│ │ ├── ImgDsl.kt
│ │ ├── InputDsl.kt
│ │ ├── LabelDsl.kt
│ │ ├── LiDsl.kt
│ │ ├── LinkDsl.kt
│ │ ├── MainDsl.kt
│ │ ├── MarkDsl.kt
│ │ ├── MetaBodyDsl.kt
│ │ ├── MetaDsl.kt
│ │ ├── NavDsl.kt
│ │ ├── OptionDsl.kt
│ │ ├── PDsl.kt
│ │ ├── ScriptDsl.kt
│ │ ├── SectionDsl.kt
│ │ ├── SelectDsl.kt
│ │ ├── SourceDsl.kt
│ │ ├── SpanDsl.kt
│ │ ├── StrongDsl.kt
│ │ ├── SummaryDsl.kt
│ │ ├── TableDsl.kt
│ │ ├── TbodyDsl.kt
│ │ ├── TdDsl.kt
│ │ ├── TfootDsl.kt
│ │ ├── ThDsl.kt
│ │ ├── TheadDsl.kt
│ │ ├── TimeDsl.kt
│ │ ├── TrDsl.kt
│ │ ├── UlDsl.kt
│ │ └── VideoDsl.kt
│ │ └── style
│ │ ├── AlignItemsStyles.kt
│ │ ├── AlignSelfStyles.kt
│ │ ├── AnimationDurationStyles.kt
│ │ ├── AnimationNameStyles.kt
│ │ ├── BackgroundAttachmentStyles.kt
│ │ ├── BackgroundClipStyles.kt
│ │ ├── BackgroundColorStyles.kt
│ │ ├── BackgroundImageStyles.kt
│ │ ├── BackgroundOriginStyles.kt
│ │ ├── BackgroundPositionStyles.kt
│ │ ├── BackgroundRepeatStyles.kt
│ │ ├── BackgroundSizeStyles.kt
│ │ ├── BackgroundStyles.kt
│ │ ├── BorderBottomColorStyles.kt
│ │ ├── BorderBottomLeftRadiusStyles.kt
│ │ ├── BorderBottomRightRadiusStyles.kt
│ │ ├── BorderBottomStyleStyles.kt
│ │ ├── BorderBottomStyles.kt
│ │ ├── BorderBottomWidthStyles.kt
│ │ ├── BorderCollapseStyles.kt
│ │ ├── BorderLeftColorStyles.kt
│ │ ├── BorderLeftStyleStyles.kt
│ │ ├── BorderLeftStyles.kt
│ │ ├── BorderLeftWidthStyles.kt
│ │ ├── BorderRadiusStyles.kt
│ │ ├── BorderRightColorStyles.kt
│ │ ├── BorderRightStyleStyles.kt
│ │ ├── BorderRightStyles.kt
│ │ ├── BorderRightWidthStyles.kt
│ │ ├── BorderSpacingStyles.kt
│ │ ├── BorderStyleStyles.kt
│ │ ├── BorderStyles.kt
│ │ ├── BorderTopColorStyles.kt
│ │ ├── BorderTopLeftRadiusStyles.kt
│ │ ├── BorderTopRightRadiusStyles.kt
│ │ ├── BorderTopStyleStyles.kt
│ │ ├── BorderTopStyles.kt
│ │ ├── BorderTopWidthStyles.kt
│ │ ├── BorderWidthStyles.kt
│ │ ├── BottomStyles.kt
│ │ ├── BoxShadowStyles.kt
│ │ ├── CaptionStyles.kt
│ │ ├── ColorStyles.kt
│ │ ├── ContentStyles.kt
│ │ ├── CursorStyles.kt
│ │ ├── DisplayStyles.kt
│ │ ├── FillStyles.kt
│ │ ├── FlexBasisStyles.kt
│ │ ├── FlexDirectionStyles.kt
│ │ ├── FlexGrowStyles.kt
│ │ ├── FlexShrinkStyles.kt
│ │ ├── FlexStyles.kt
│ │ ├── FlexWrapStyles.kt
│ │ ├── FloatStyles.kt
│ │ ├── FontFamilyStyles.kt
│ │ ├── FontSizeStyles.kt
│ │ ├── FontWeightStyles.kt
│ │ ├── HeightStyles.kt
│ │ ├── JustifyContentStyles.kt
│ │ ├── LeftStyles.kt
│ │ ├── LetterSpacingStyles.kt
│ │ ├── LineHeightStyles.kt
│ │ ├── ListStyleImageStyles.kt
│ │ ├── ListStylePositionStyles.kt
│ │ ├── ListStyleStyles.kt
│ │ ├── ListStyleTypeStyles.kt
│ │ ├── MarginBottomStyles.kt
│ │ ├── MarginLeftStyles.kt
│ │ ├── MarginRightStyles.kt
│ │ ├── MarginStyles.kt
│ │ ├── MarginTopStyles.kt
│ │ ├── MaxHeightStyles.kt
│ │ ├── MaxWidthStyles.kt
│ │ ├── MinHeightStyles.kt
│ │ ├── MinWidthStyles.kt
│ │ ├── OutlineColorStyles.kt
│ │ ├── OutlineOffsetStyles.kt
│ │ ├── OutlineStyleStyles.kt
│ │ ├── OutlineStyles.kt
│ │ ├── OutlineWidthStyles.kt
│ │ ├── OverflowStyles.kt
│ │ ├── OverflowXStyles.kt
│ │ ├── OverflowYStyles.kt
│ │ ├── PaddingBottomStyles.kt
│ │ ├── PaddingLeftStyles.kt
│ │ ├── PaddingRightStyles.kt
│ │ ├── PaddingStyles.kt
│ │ ├── PaddingTopStyles.kt
│ │ ├── PositionStyles.kt
│ │ ├── RightStyles.kt
│ │ ├── TextAlignStyles.kt
│ │ ├── TextDecorationColorStyles.kt
│ │ ├── TextDecorationLineStyles.kt
│ │ ├── TextDecorationStyleStyles.kt
│ │ ├── TextDecorationStyles.kt
│ │ ├── TextTransformStyles.kt
│ │ ├── TopStyles.kt
│ │ ├── TransitionPropertyStyles.kt
│ │ ├── TransitionStyles.kt
│ │ ├── TransitionTimingFunctionStyles.kt
│ │ ├── VisibilityStyles.kt
│ │ ├── WidthStyles.kt
│ │ └── ZIndexStyles.kt
│ ├── genTest
│ └── kotlin
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ └── writer
│ │ └── element
│ │ ├── ATest.kt
│ │ ├── ArticleTest.kt
│ │ ├── AsideTest.kt
│ │ ├── BodyTest.kt
│ │ ├── ButtonTest.kt
│ │ ├── CaptionTest.kt
│ │ ├── ColTest.kt
│ │ ├── DetailsTest.kt
│ │ ├── FigcaptionTest.kt
│ │ ├── FigureTest.kt
│ │ ├── FooterTest.kt
│ │ ├── H1Test.kt
│ │ ├── H2Test.kt
│ │ ├── H3Test.kt
│ │ ├── H4Test.kt
│ │ ├── H5Test.kt
│ │ ├── H6Test.kt
│ │ ├── HeadTest.kt
│ │ ├── HeaderTest.kt
│ │ ├── HrTest.kt
│ │ ├── ITest.kt
│ │ ├── ImgTest.kt
│ │ ├── InputTest.kt
│ │ ├── LabelTest.kt
│ │ ├── LiTest.kt
│ │ ├── MainTest.kt
│ │ ├── MarkTest.kt
│ │ ├── NavTest.kt
│ │ ├── OptionTest.kt
│ │ ├── PTest.kt
│ │ ├── SectionTest.kt
│ │ ├── SelectTest.kt
│ │ ├── SpanTest.kt
│ │ ├── SummaryTest.kt
│ │ ├── TableTest.kt
│ │ ├── TbodyTest.kt
│ │ ├── TdTest.kt
│ │ ├── TfootTest.kt
│ │ ├── ThTest.kt
│ │ ├── TheadTest.kt
│ │ ├── TimeTest.kt
│ │ ├── TrTest.kt
│ │ ├── UlTest.kt
│ │ └── VideoTest.kt
│ ├── jsMain
│ └── kotlin
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ └── writer
│ │ └── PlatformWriter.kt
│ ├── jvmMain
│ └── kotlin
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ ├── FileCache.kt
│ │ └── writer
│ │ ├── PlatformWriter.kt
│ │ └── element
│ │ ├── ContextUtil.kt
│ │ ├── InlineScript.kt
│ │ └── InlineStyleSheet.kt
│ ├── jvmTest
│ └── kotlin
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ └── writer
│ │ └── element
│ │ └── InlineFileTest.kt
│ ├── linuxX64Main
│ └── kotlin
│ │ └── dev
│ │ └── scottpierce
│ │ └── html
│ │ └── writer
│ │ └── PlatformWriter.kt
│ └── macosX64Main
│ └── kotlin
│ └── dev
│ └── scottpierce
│ └── html
│ └── writer
│ └── PlatformWriter.kt
├── kotlin-js-store
└── yarn.lock
├── scripts
└── git-commit-if-changes.sh
├── settings.gradle.kts
└── test-files
└── example.js
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: Build
2 |
3 | on:
4 | pull_request:
5 |
6 | jobs:
7 | code-style:
8 | name: Code Style
9 | runs-on: ubuntu-latest
10 | container:
11 | image: openjdk:11-slim
12 |
13 | permissions:
14 | contents: write
15 |
16 | steps:
17 | - name: Checkout code
18 | uses: actions/checkout@v2
19 |
20 | - name: Kotlin Code Style
21 | run: ./gradlew ktlint
22 |
23 | build:
24 | name: Build
25 | runs-on: ubuntu-latest
26 | container:
27 | image: openjdk:17-slim
28 |
29 | steps:
30 | - name: Checkout code
31 | uses: actions/checkout@v2
32 |
33 | - name: Build
34 | run: ./gradlew :kotlin-html-writer:assemble :kotlin-html-ktor:assemble --stacktrace
35 |
36 | test:
37 | name: Test
38 | runs-on: ubuntu-latest
39 | container:
40 | image: markhobson/maven-chrome:jdk-17
41 |
42 | steps:
43 | - name: Checkout code
44 | uses: actions/checkout@v2
45 |
46 | - name: Test
47 | run: ./gradlew :kotlin-html-writer:jvmTest :kotlin-html-writer:jvmCodeCoverageReport --stacktrace
48 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OS
2 | .DS_Store
3 |
4 | # Build folders
5 | build/
6 | out/
7 | .gradle
8 |
9 | /.idea/*
10 | !/.idea/codeStyles
11 | local.properties
12 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ## 0.8.0
4 | * Deploy to maven central
5 | * Update to Kotlin 1.6.10
6 |
7 | ## 0.7.0
8 | * `styleBuilder` is renamed to `insertStyleBuilder`.
9 |
10 | ## 0.6.0
11 | * `HtmlWriter` has been trimmed down to just the write methods, and it's name has been changed to `HtmlOutput`.
12 | `HtmlWriter`, is instead used for something else.
13 | * Added the ability for `HtmlWriter`s to split into named sub-writers.
14 | * Added a new artifact - Style Builder. Style Builder can be used to write to a single stylesheet in the `head` of your
15 | document from anywhere in your document. It can also be used to write to various media queries with a much nicer syntax
16 | than CSS provides.
17 | * Contexts were all moved to the `dev.scottpierce.html.writer` package.
18 | * `FileContext` was removed, and the `docType` was added as a parameter to the `html` functions.
19 |
20 | ## 0.5.0
21 | * Complete overhaul fo the style system, with a switch from properties to functions for styles.
22 | * Several css properties have had their type safety dramatically improved.
23 |
24 | ## 0.4.0
25 | * `Context` renamed to `HtmlWriterContext`
26 | * `link` and `script` moved to `BaseHtmlContext`
27 |
28 | ## 0.3.0
29 | * Package changed from `dev.scottpierce.html` to `dev.scottpierce.html.writer`
30 | * Remove style read API and turn it into a pure streaming API.
31 | * Make all `Context`s, `inline class`es.
32 | * Change `Dimension` from a readable object to an `inline class`.
--------------------------------------------------------------------------------
/benchmark/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | }
4 |
5 | kotlin {
6 | jvm()
7 | macosX64 {
8 | binaries {
9 | executable {
10 | }
11 | }
12 | }
13 | // linuxX64 {
14 | // binaries {
15 | // executable {
16 | // }
17 | // }
18 | // }
19 |
20 | @Suppress("UNUSED_VARIABLE")
21 | sourceSets {
22 | val commonMain by getting {
23 | dependencies {
24 | implementation(project(":kotlin-html-writer"))
25 | implementation(Deps.kotlin.stdlib.common)
26 | }
27 | }
28 |
29 | val jvmMain by getting {
30 | dependencies {
31 | implementation(Deps.kotlin.stdlib.jvm)
32 | implementation(Deps.kotlinx.html)
33 | }
34 | }
35 |
36 | val jvmTest by getting {
37 | dependencies {
38 | implementation(Deps.kotlin.test.jvm)
39 | }
40 | }
41 |
42 | // val macosX64Main by getting {
43 | // }
44 | //
45 | // val linuxX64Main by getting {
46 | // }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/benchmark/src/commonMain/kotlin/dev/scottpierce/html/benchmark/Platform.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.benchmark
2 |
3 | expect object Platform {
4 | val currentTime: Long
5 | }
6 |
--------------------------------------------------------------------------------
/benchmark/src/commonMain/kotlin/dev/scottpierce/html/benchmark/SimpleBenchmark.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.benchmark
2 |
3 | object SimpleBenchmark {
4 | fun run(print: Boolean) {
5 | val results = mutableListOf()
6 |
7 | val benchmarkStart = Platform.currentTime
8 |
9 | repeat(50) {
10 | var count = 0
11 |
12 | val startTime = Platform.currentTime
13 |
14 | // Build a simple website 20,000 times
15 | for (i in 0 until 20_000) {
16 | val result = kotlinHtmlPage()
17 | count += result.length
18 | }
19 |
20 | val benchmarkTime = Platform.currentTime - startTime
21 | results += benchmarkTime
22 |
23 | if (print) {
24 | println("Iteration Took $benchmarkTime millis. Count: $count")
25 | }
26 | }
27 |
28 | val benchmarkTotalMillis = Platform.currentTime - benchmarkStart
29 |
30 | if (print) {
31 | println("Benchmark Completed. Benchmark Total Millis: $benchmarkTotalMillis, Average iteration was ${results.average()} millis")
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/benchmark/src/jvmMain/kotlin/dev/scottpierce/html/benchmark/Platform.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.benchmark
2 |
3 | actual object Platform {
4 | actual val currentTime: Long
5 | get() = System.currentTimeMillis()
6 | }
7 |
--------------------------------------------------------------------------------
/benchmark/src/jvmMain/kotlin/dev/scottpierce/html/benchmark/SimpleBenchmarkMain.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.benchmark
2 |
3 | fun main() {
4 | // Warm-up
5 | SimpleBenchmark.run(false)
6 | SimpleBenchmark.run(false)
7 |
8 | // Run
9 | SimpleBenchmark.run(true)
10 | }
11 |
--------------------------------------------------------------------------------
/benchmark/src/jvmMain/kotlin/dev/scottpierce/html/benchmark/ThreadedBenchmarkMain.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.benchmark
2 |
3 | fun main() {
4 | ThreadedBenchmark.runBenchmark()
5 | }
6 |
--------------------------------------------------------------------------------
/benchmark/src/linuxX64Main/kotlin/BenchmarkNativeMain.kt:
--------------------------------------------------------------------------------
1 | import dev.scottpierce.html.benchmark.SimpleBenchmark
2 |
3 | fun main() {
4 | SimpleBenchmark.run(true)
5 | }
6 |
--------------------------------------------------------------------------------
/benchmark/src/linuxX64Main/kotlin/dev/scottpierce/html/benchmark/Platform.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.benchmark
2 |
3 | actual object Platform {
4 | actual val currentTime: Long
5 | get() = kotlin.system.getTimeMillis()
6 | }
7 |
--------------------------------------------------------------------------------
/benchmark/src/macosX64Main/kotlin/BenchmarkNativeMain.kt:
--------------------------------------------------------------------------------
1 | import dev.scottpierce.html.benchmark.SimpleBenchmark
2 |
3 | fun main() {
4 | SimpleBenchmark.run(true)
5 | }
6 |
--------------------------------------------------------------------------------
/benchmark/src/macosX64Main/kotlin/dev/scottpierce/html/benchmark/Platform.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.benchmark
2 |
3 | actual object Platform {
4 | actual val currentTime: Long
5 | get() = kotlin.system.getTimeMillis()
6 | }
7 |
--------------------------------------------------------------------------------
/buildSrc/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | `kotlin-dsl`
3 | `maven-publish`
4 | }
5 |
6 | repositories {
7 | mavenCentral()
8 | }
9 |
--------------------------------------------------------------------------------
/buildSrc/src/main/kotlin/Deps.kt:
--------------------------------------------------------------------------------
1 | object Versions {
2 | const val kotlin = "1.7.21"
3 | const val ktor = "1.6.7"
4 | }
5 |
6 | object Plugins {
7 | const val kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
8 | const val gradleMavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.19.0"
9 | }
10 |
11 | object Deps {
12 | val kotlin = KotlinDeps()
13 | val kotlinx = KotlinxDeps()
14 | val kotlinPoet = "com.squareup:kotlinpoet:1.4.3"
15 | val ktorServerCore = "io.ktor:ktor-server-core:${Versions.ktor}"
16 | val okio = "com.squareup.okio:okio:2.2.2"
17 | }
18 |
19 | class KotlinDeps internal constructor() {
20 | val stdlib = KotlinStdLibLibs()
21 | val test = KotlinTestLibs()
22 | }
23 |
24 | class KotlinStdLibLibs internal constructor() {
25 | val common = "org.jetbrains.kotlin:kotlin-stdlib-common:${Versions.kotlin}"
26 | val jvm = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${Versions.kotlin}"
27 | val js = "org.jetbrains.kotlin:kotlin-stdlib-js:${Versions.kotlin}"
28 | }
29 |
30 | class KotlinTestLibs internal constructor() {
31 | val common: List = listOf(
32 | "org.jetbrains.kotlin:kotlin-test-common:${Versions.kotlin}",
33 | "org.jetbrains.kotlin:kotlin-test-annotations-common:${Versions.kotlin}"
34 | )
35 |
36 | val jvm = "org.jetbrains.kotlin:kotlin-test-junit:${Versions.kotlin}"
37 | val js = "org.jetbrains.kotlin:kotlin-test-js:${Versions.kotlin}"
38 | }
39 |
40 | class KotlinxDeps internal constructor() {
41 | val coroutines = CoroutineDeps()
42 | val html = "org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.3"
43 | }
44 |
45 | class CoroutineDeps internal constructor() {
46 | val jvm = "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"
47 | }
48 |
--------------------------------------------------------------------------------
/codecov.yml:
--------------------------------------------------------------------------------
1 | codecov:
2 | branch: master
3 | max_report_age: off
4 |
5 | # Documentation for this at https://docs.codecov.io/docs/commit-status
6 | coverage:
7 | status:
8 | project:
9 | default:
10 | target: auto
11 | threshold: 0.5%
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Build Params
2 | org.gradle.jvmargs=-Xmx3g -Xms1g
3 | org.gradle.parallel=true
4 | org.gradle.caching=true
5 | org.gradle.configureondemand=false
6 |
7 | # Kotlin
8 | kotlin.code.style=official
9 | kotlin.parallel.tasks.in.project=true
10 |
11 |
12 | # POM
13 | GROUP=io.github.scottpierce
14 | POM_ARTIFACT_ID=mylibrary-runtime
15 |
16 | POM_NAME=kotlin-html
17 | POM_DESCRIPTION=HTML and CSS DSL for Kotlin client and server
18 | POM_INCEPTION_YEAR=2019
19 | POM_URL=https://github.com/ScottPierce/kotlin-html
20 |
21 | POM_LICENSE_NAME=The Apache Software License, Version 2.0
22 | POM_LICENSE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt
23 | POM_LICENSE_DIST=repo
24 |
25 | POM_SCM_URL=https://github.com/ScottPierce/kotlin-html/
26 | POM_SCM_CONNECTION=scm:git:git://github.com/ScottPierce/kotlin-html.git
27 | POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/ScottPierce/kotlin-html.git
28 |
29 | POM_DEVELOPER_ID=ScottPierce
30 | POM_DEVELOPER_NAME=Scott Pierce
31 | POM_DEVELOPER_URL=https://github.com/ScottPierce/
--------------------------------------------------------------------------------
/gradle/ktlint.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'java'
2 |
3 | repositories {
4 | mavenCentral()
5 | }
6 |
7 | configurations {
8 | ktlint
9 | }
10 |
11 | dependencies {
12 | ktlint("com.pinterest:ktlint:0.44.0") {
13 | attributes {
14 | attribute(Bundling.BUNDLING_ATTRIBUTE, getObjects().named(Bundling, Bundling.EXTERNAL))
15 | }
16 | }
17 | // additional 3rd party ruleset(s) can be specified here
18 | // just add them to the classpath (e.g. ktlint 'groupId:artifactId:version') and
19 | // ktlint will pick them up
20 | }
21 |
22 | task ktlint(type: JavaExec, group: "verification") {
23 | description = "Check Kotlin code style."
24 | classpath = configurations.ktlint
25 | mainClass.set("com.pinterest.ktlint.Main")
26 | args "-F", "**/src/**/*.kt", "!**/genMain/**", "!**/genTest/**"
27 | // to generate report in checkstyle format prepend following args:
28 | // "--reporter=plain", "--reporter=checkstyle,output=${buildDir}/ktlint.xml"
29 | // to add a baseline to check against prepend following args:
30 | // "--baseline=ktlint-baseline.xml"
31 | // see https://github.com/pinterest/ktlint#usage for more
32 | }
33 | check.dependsOn ktlint
34 |
35 | task ktlintFormat(type: JavaExec, group: "formatting") {
36 | description = "Fix Kotlin code style deviations."
37 | classpath = configurations.ktlint
38 | mainClass.set("com.pinterest.ktlint.Main")
39 | args "-F", "**/src/**/*.kt", "!**/genMain/**", "!**/genTest/**"
40 | }
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ScottPierce/kotlin-html/61233e9a7c9deb78441aaf7903b04860f981b993/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/kotlin-html-generator/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("org.jetbrains.kotlin.jvm")
3 | }
4 |
5 | dependencies {
6 | implementation(Deps.kotlin.stdlib.jvm)
7 | implementation(Deps.kotlinPoet)
8 | implementation(Deps.kotlinx.coroutines.jvm)
9 | }
10 |
--------------------------------------------------------------------------------
/kotlin-html-generator/src/main/kotlin/dev/scottpierce/html/generate/GenerateMain.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.generate
2 |
3 | import dev.scottpierce.html.generate.task.GenerateElementDslTask
4 | import dev.scottpierce.html.generate.task.GenerateElementTestsTask
5 | import dev.scottpierce.html.generate.task.GenerateStyleBuilderDslTask
6 | import dev.scottpierce.html.generate.task.GenerateStylePropertiesTask
7 | import kotlinx.coroutines.GlobalScope
8 | import kotlinx.coroutines.launch
9 | import kotlinx.coroutines.runBlocking
10 | import kotlin.system.measureTimeMillis
11 |
12 | fun main() {
13 | // Generation tasks
14 | val tasks: List = listOf(
15 | GenerateElementDslTask(),
16 | GenerateStyleBuilderDslTask(),
17 | GenerateElementTestsTask(),
18 | GenerateStylePropertiesTask()
19 | )
20 |
21 | val job = GlobalScope.launch {
22 | // Run the actual tasks
23 | for (task in tasks) {
24 | launch {
25 | println("Starting Task: ${task.name}")
26 | val millis = measureTimeMillis {
27 | task.execute()
28 | }
29 | println("Completed Task: ${task.name}, took $millis millis.")
30 | }
31 | }
32 | }
33 |
34 | // Await until all tasks are done and then exit the process
35 | runBlocking {
36 | job.join()
37 | }
38 | }
39 |
40 | interface Task {
41 | val name: String
42 | suspend fun execute()
43 | }
44 |
--------------------------------------------------------------------------------
/kotlin-html-generator/src/main/kotlin/dev/scottpierce/html/generate/model/Constants.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.generate.model
2 |
3 | import java.io.File
4 |
5 | object Constants {
6 | const val ELEMENT_PACKAGE = "dev.scottpierce.html.writer.element"
7 | const val STYLE_PACKAGE = "dev.scottpierce.html.writer.style"
8 | const val STYLE_BUILDER_PACKAGE = "dev.scottpierce.html.stylebuilder"
9 | const val GENERATED_FILE_COMMENT = "This file was generated using the `kotlin-html-generator` module. Instead of modifying it, " +
10 | "modify the\n`html-builder-generator` and run it again."
11 | val BASE_GEN_DIR = File("kotlin-html-writer/src/genMain/kotlin")
12 | val STYLE_BUILDER_GEN_DIR = File("kotlin-html-style-builder/src/genMain/kotlin")
13 | val BASE_GEN_TEST_DIR = File("kotlin-html-writer/src/genTest/kotlin")
14 | }
15 |
--------------------------------------------------------------------------------
/kotlin-html-generator/src/main/kotlin/dev/scottpierce/html/generate/model/Util.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.generate.model
2 |
3 | fun String.snakeCaseToCamelCase(): String {
4 | val sb = StringBuilder()
5 |
6 | var isFirst = true
7 | for (part in split("-")) {
8 | if (isFirst) {
9 | isFirst = false
10 | sb.append(part)
11 | } else {
12 | sb.append(part.capitalize())
13 | }
14 | }
15 |
16 | return sb.toString()
17 | }
18 |
--------------------------------------------------------------------------------
/kotlin-html-ktor/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("org.jetbrains.kotlin.jvm")
3 | `maven-publish`
4 | }
5 |
6 | dependencies {
7 | implementation(project(":kotlin-html-writer"))
8 |
9 | implementation(Deps.kotlin.stdlib.jvm)
10 | implementation(Deps.ktorServerCore)
11 | }
12 |
13 | val sourcesJar by tasks.creating(Jar::class) {
14 | archiveClassifier.set("sources")
15 | from(sourceSets.getByName("main").allSource)
16 | }
17 |
--------------------------------------------------------------------------------
/kotlin-html-ktor/gradle.properties:
--------------------------------------------------------------------------------
1 | POM_ARTIFACT_ID=kotlin-html-ktor
--------------------------------------------------------------------------------
/kotlin-html-style-builder-desktop/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | `maven-publish`
4 | }
5 |
6 | kotlin {
7 | jvm {
8 | compilations.all {
9 | kotlinOptions.jvmTarget = "1.8"
10 | }
11 | }
12 | js {
13 | browser {
14 | testTask {
15 | useKarma {
16 | useChrome()
17 | }
18 | }
19 | }
20 | nodejs()
21 | }
22 |
23 | @Suppress("UNUSED_VARIABLE")
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | api(project(":kotlin-html-style-builder"))
28 | implementation(Deps.kotlin.stdlib.common)
29 | }
30 | }
31 |
32 | val commonTest by getting {
33 | dependencies {
34 | for (lib in Deps.kotlin.test.common) {
35 | implementation(lib)
36 | }
37 | }
38 | }
39 |
40 | val jvmMain by getting {
41 | dependencies {
42 | implementation(Deps.kotlin.stdlib.jvm)
43 | }
44 | }
45 |
46 | val jvmTest by getting {
47 | dependencies {
48 | implementation(Deps.kotlin.test.jvm)
49 | }
50 | }
51 |
52 | val jsMain by getting {
53 | dependencies {
54 | implementation(Deps.kotlin.stdlib.js)
55 | }
56 | }
57 |
58 | val jsTest by getting {
59 | dependencies {
60 | implementation(Deps.kotlin.test.js)
61 | }
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder-desktop/gradle.properties:
--------------------------------------------------------------------------------
1 | POM_ARTIFACT_ID=kotlin-html-style-builder-desktop
--------------------------------------------------------------------------------
/kotlin-html-style-builder-desktop/src/commonMain/kotlin/dev/scottpierce/html/stylebuilder/DesktopStyleBuilder.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.stylebuilder
2 |
3 | import dev.scottpierce.html.writer.HtmlDsl
4 | import dev.scottpierce.html.writer.StyleLambda
5 |
6 | private val DESKTOP_ID = StyleBuilderId("StyleBuilder-phone")
7 |
8 | @Suppress("unused")
9 | val StyleBuilder.DESKTOP: StyleBuilderId
10 | get() = DESKTOP_ID
11 |
12 | @HtmlDsl
13 | inline fun StyleBuilderContext.desktop(func: StyleLambda) {
14 | media(StyleBuilder.DESKTOP, func)
15 | }
16 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder-desktop/src/commonTest/kotlin/dev/scottpierce/html/stylebuilder/DesktopStyleBuilderTest.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.stylebuilder
2 |
3 | import dev.scottpierce.html.writer.element.body
4 | import dev.scottpierce.html.writer.element.head
5 | import dev.scottpierce.html.writer.element.html
6 | import dev.scottpierce.html.writer.style.backgroundColor
7 | import kotlin.test.Test
8 |
9 | class DesktopStyleBuilderTest {
10 | @Test
11 | fun dslTest() {
12 | testWriter {
13 | html {
14 | head {
15 | insertStyleBuilder {
16 | media(StyleBuilder.DESKTOP, "(minWidth < 400px)")
17 | }
18 | }
19 | body {
20 | style("body") {
21 | backgroundColor(0, 0, 0)
22 |
23 | desktop {
24 | backgroundColor(255, 255, 255)
25 | }
26 | }
27 |
28 | +"Blam"
29 | }
30 | }
31 | } assertEquals {
32 | """
33 |
34 |
35 |
45 |
46 |
47 | Blam
48 |
49 |
50 | """.trimIndent()
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder-desktop/src/commonTest/kotlin/dev/scottpierce/html/stylebuilder/TestUtil.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.stylebuilder
2 |
3 | import dev.scottpierce.html.writer.StringHtmlOutput
4 | import dev.scottpierce.html.writer.WriteOptions
5 |
6 | fun testWriter(
7 | options: WriteOptions = WriteOptions.readable.copy(indent = " "),
8 | func: StringHtmlOutput.() -> Unit
9 | ): StringHtmlOutput {
10 | return StringHtmlOutput(options).apply(func)
11 | }
12 |
13 | infix fun StringHtmlOutput.assertEquals(expected: () -> String) {
14 | kotlin.test.assertEquals(expected(), this.toString())
15 | }
16 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder-phone/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | `maven-publish`
4 | }
5 |
6 | kotlin {
7 | jvm {
8 | compilations.all {
9 | kotlinOptions.jvmTarget = "1.8"
10 | }
11 | }
12 | js {
13 | browser {
14 | testTask {
15 | useKarma {
16 | useChrome()
17 | }
18 | }
19 | }
20 | nodejs()
21 | }
22 |
23 | @Suppress("UNUSED_VARIABLE")
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | api(project(":kotlin-html-style-builder"))
28 | implementation(Deps.kotlin.stdlib.common)
29 | }
30 | }
31 |
32 | val commonTest by getting {
33 | dependencies {
34 | for (lib in Deps.kotlin.test.common) {
35 | implementation(lib)
36 | }
37 | }
38 | }
39 |
40 | val jvmMain by getting {
41 | dependencies {
42 | implementation(Deps.kotlin.stdlib.jvm)
43 | }
44 | }
45 |
46 | val jvmTest by getting {
47 | dependencies {
48 | implementation(Deps.kotlin.test.jvm)
49 | }
50 | }
51 |
52 | val jsMain by getting {
53 | dependencies {
54 | implementation(Deps.kotlin.stdlib.js)
55 | }
56 | }
57 |
58 | val jsTest by getting {
59 | dependencies {
60 | implementation(Deps.kotlin.test.js)
61 | }
62 | }
63 | }
64 | }
65 |
66 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder-phone/gradle.properties:
--------------------------------------------------------------------------------
1 | POM_ARTIFACT_ID=kotlin-html-style-builder-phone
--------------------------------------------------------------------------------
/kotlin-html-style-builder-phone/src/commonMain/kotlin/dev/scottpierce/html/stylebuilder/PhoneStyleBuilder.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.stylebuilder
2 |
3 | import dev.scottpierce.html.writer.HtmlDsl
4 | import dev.scottpierce.html.writer.StyleLambda
5 |
6 | private val PHONE_ID = StyleBuilderId("StyleBuilder-phone")
7 |
8 | @Suppress("unused")
9 | val StyleBuilder.PHONE: StyleBuilderId
10 | get() = PHONE_ID
11 |
12 | @HtmlDsl
13 | inline fun StyleBuilderContext.phone(func: StyleLambda) {
14 | media(StyleBuilder.PHONE, func)
15 | }
16 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder-phone/src/commonTest/kotlin/dev/scottpierce/html/stylebuilder/PhoneStyleBuilderTest.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.stylebuilder
2 |
3 | import dev.scottpierce.html.writer.element.body
4 | import dev.scottpierce.html.writer.element.head
5 | import dev.scottpierce.html.writer.element.html
6 | import dev.scottpierce.html.writer.style.backgroundColor
7 | import kotlin.test.Test
8 |
9 | class PhoneStyleBuilderTest {
10 | @Test
11 | fun dslTest() {
12 | testWriter {
13 | html {
14 | head {
15 | insertStyleBuilder {
16 | media(StyleBuilder.PHONE, "(minWidth < 400px)")
17 | }
18 | }
19 | body {
20 | style("body") {
21 | backgroundColor(0, 0, 0)
22 |
23 | phone {
24 | backgroundColor(255, 255, 255)
25 | }
26 | }
27 |
28 | +"Blam"
29 | }
30 | }
31 | } assertEquals {
32 | """
33 |
34 |
35 |
45 |
46 |
47 | Blam
48 |
49 |
50 | """.trimIndent()
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder-phone/src/commonTest/kotlin/dev/scottpierce/html/stylebuilder/TestUtil.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.stylebuilder
2 |
3 | import dev.scottpierce.html.writer.StringHtmlOutput
4 | import dev.scottpierce.html.writer.WriteOptions
5 |
6 | fun testWriter(
7 | options: WriteOptions = WriteOptions.readable.copy(indent = " "),
8 | func: StringHtmlOutput.() -> Unit
9 | ): StringHtmlOutput {
10 | return StringHtmlOutput(options).apply(func)
11 | }
12 |
13 | infix fun StringHtmlOutput.assertEquals(expected: () -> String) {
14 | kotlin.test.assertEquals(expected(), this.toString())
15 | }
16 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder-tablet/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | `maven-publish`
4 | }
5 |
6 | kotlin {
7 | jvm {
8 | compilations.all {
9 | kotlinOptions.jvmTarget = "1.8"
10 | }
11 | }
12 | js {
13 | browser {
14 | testTask {
15 | useKarma {
16 | useChrome()
17 | }
18 | }
19 | }
20 | nodejs()
21 | }
22 |
23 | @Suppress("UNUSED_VARIABLE")
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | api(project(":kotlin-html-style-builder"))
28 | implementation(Deps.kotlin.stdlib.common)
29 | }
30 | }
31 |
32 | val commonTest by getting {
33 | dependencies {
34 | for (lib in Deps.kotlin.test.common) {
35 | implementation(lib)
36 | }
37 | }
38 | }
39 |
40 | val jvmMain by getting {
41 | dependencies {
42 | implementation(Deps.kotlin.stdlib.jvm)
43 | }
44 | }
45 |
46 | val jvmTest by getting {
47 | dependencies {
48 | implementation(Deps.kotlin.test.jvm)
49 | }
50 | }
51 |
52 | val jsMain by getting {
53 | dependencies {
54 | implementation(Deps.kotlin.stdlib.js)
55 | }
56 | }
57 |
58 | val jsTest by getting {
59 | dependencies {
60 | implementation(Deps.kotlin.test.js)
61 | }
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder-tablet/gradle.properties:
--------------------------------------------------------------------------------
1 | POM_ARTIFACT_ID=kotlin-html-style-tablet
--------------------------------------------------------------------------------
/kotlin-html-style-builder-tablet/src/commonMain/kotlin/dev/scottpierce/html/stylebuilder/TabletStyleBuilder.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.stylebuilder
2 |
3 | import dev.scottpierce.html.writer.HtmlDsl
4 | import dev.scottpierce.html.writer.StyleLambda
5 |
6 | private val TABLET_ID = StyleBuilderId("StyleBuilder-phone")
7 |
8 | @Suppress("unused")
9 | val StyleBuilder.TABLET: StyleBuilderId
10 | get() = TABLET_ID
11 |
12 | @HtmlDsl
13 | inline fun StyleBuilderContext.tablet(func: StyleLambda) {
14 | media(StyleBuilder.TABLET, func)
15 | }
16 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder-tablet/src/commonTest/kotlin/dev/scottpierce/html/stylebuilder/TabletStyleBuilderTest.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.stylebuilder
2 |
3 | import dev.scottpierce.html.writer.element.body
4 | import dev.scottpierce.html.writer.element.head
5 | import dev.scottpierce.html.writer.element.html
6 | import dev.scottpierce.html.writer.style.backgroundColor
7 | import kotlin.test.Test
8 |
9 | class TabletStyleBuilderTest {
10 | @Test
11 | fun dslTest() {
12 | testWriter {
13 | html {
14 | head {
15 | insertStyleBuilder {
16 | media(StyleBuilder.TABLET, "(minWidth < 400px)")
17 | }
18 | }
19 | body {
20 | style("body") {
21 | backgroundColor(0, 0, 0)
22 |
23 | tablet {
24 | backgroundColor(255, 255, 255)
25 | }
26 | }
27 |
28 | +"Blam"
29 | }
30 | }
31 | } assertEquals {
32 | """
33 |
34 |
35 |
45 |
46 |
47 | Blam
48 |
49 |
50 | """.trimIndent()
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder-tablet/src/commonTest/kotlin/dev/scottpierce/html/stylebuilder/TestUtil.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.stylebuilder
2 |
3 | import dev.scottpierce.html.writer.StringHtmlOutput
4 | import dev.scottpierce.html.writer.WriteOptions
5 |
6 | fun testWriter(
7 | options: WriteOptions = WriteOptions.readable.copy(indent = " "),
8 | func: StringHtmlOutput.() -> Unit
9 | ): StringHtmlOutput {
10 | return StringHtmlOutput(options).apply(func)
11 | }
12 |
13 | infix fun StringHtmlOutput.assertEquals(expected: () -> String) {
14 | kotlin.test.assertEquals(expected(), this.toString())
15 | }
16 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/gradle.properties:
--------------------------------------------------------------------------------
1 | POM_ARTIFACT_ID=kotlin-html-style-builder
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/commonMain/kotlin/dev/scottpierce/html/stylebuilder/StyleBuilderInsertionContext.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.stylebuilder
2 |
3 | import dev.scottpierce.html.writer.BaseHtmlContext
4 | import dev.scottpierce.html.writer.HtmlDsl
5 | import dev.scottpierce.html.writer.StyleSheetContext
6 | import dev.scottpierce.html.writer.insertWriter
7 | import dev.scottpierce.html.writer.style.media
8 | import dev.scottpierce.html.writer.style.styleSheet
9 | import kotlin.jvm.JvmInline
10 |
11 | @HtmlDsl
12 | inline fun BaseHtmlContext.insertStyleBuilder(func: StyleBuilderInsertionContext.() -> Unit) {
13 | styleSheet {
14 | insertWriter(StyleBuilder.NORMAL.writerId)
15 | StyleBuilderInsertionContext(this).func()
16 | }
17 | }
18 |
19 | @HtmlDsl
20 | @JvmInline
21 | value class StyleBuilderInsertionContext(private val baseContext: StyleSheetContext) {
22 | fun media(id: StyleBuilderId, querySelector: String) {
23 | baseContext.media(querySelector) {
24 | insertWriter(id.writerId)
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/commonMain/kotlin/dev/scottpierce/html/stylebuilder/StyleBuilderState.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.stylebuilder
2 |
3 | import dev.scottpierce.html.writer.HtmlWriter
4 | import dev.scottpierce.html.writer.getStateOrPut
5 |
6 | internal const val STATE_WRITE_ONCE = "StyleBuilder-WriteOnce"
7 |
8 | @Suppress("UNCHECKED_CAST")
9 | internal val HtmlWriter.styleBuilderWriteOnceState: MutableSet
10 | get() = getStateOrPut(STATE_WRITE_ONCE) { mutableSetOf() } as MutableSet
11 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/commonTest/kotlin/dev/scottpierce/html/stylebuilder/TestUtil.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.stylebuilder
2 |
3 | import dev.scottpierce.html.writer.StringHtmlOutput
4 | import dev.scottpierce.html.writer.WriteOptions
5 |
6 | fun testWriter(
7 | options: WriteOptions = WriteOptions.readable.copy(indent = " "),
8 | func: StringHtmlOutput.() -> Unit
9 | ): StringHtmlOutput {
10 | return StringHtmlOutput(options).apply(func)
11 | }
12 |
13 | infix fun StringHtmlOutput.assertEquals(expected: () -> String) {
14 | kotlin.test.assertEquals(expected(), this.toString())
15 | }
16 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/ArticleStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.article(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | article(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.article(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | article(attrs = attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.article(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | article(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/AsideStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.aside(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | aside(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.aside(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | aside(attrs = attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.aside(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | aside(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/BodyStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlContext
9 | import dev.scottpierce.html.writer.HtmlDsl
10 | import kotlin.Pair
11 | import kotlin.String
12 | import kotlin.Unit
13 | import kotlin.collections.List
14 |
15 | @HtmlDsl
16 | inline fun HtmlContext.body(
17 | id: String,
18 | classes: String? = null,
19 | noinline styleBuilder: StyleBuilderLambda,
20 | func: BodyContext.() -> Unit = {}
21 | ) {
22 | style("#$id", styleBuilder)
23 | body(id = id, classes = classes, style = null, func = func)
24 | }
25 |
26 | @HtmlDsl
27 | inline fun HtmlContext.body(
28 | vararg attrs: Pair,
29 | id: String,
30 | classes: String? = null,
31 | noinline styleBuilder: StyleBuilderLambda,
32 | func: BodyContext.() -> Unit = {}
33 | ) {
34 | style("#$id", styleBuilder)
35 | body(attrs = attrs, id = id, classes = classes, style = null, func = func)
36 | }
37 |
38 | @HtmlDsl
39 | inline fun HtmlContext.body(
40 | attrs: List>,
41 | id: String,
42 | classes: String? = null,
43 | noinline styleBuilder: StyleBuilderLambda,
44 | func: BodyContext.() -> Unit = {}
45 | ) {
46 | style("#$id", styleBuilder)
47 | body(attrs = attrs, id = id, classes = classes, style = null, func = func)
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/CaptionStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import dev.scottpierce.html.writer.TableContext
10 | import kotlin.Pair
11 | import kotlin.String
12 | import kotlin.Unit
13 | import kotlin.collections.List
14 |
15 | @HtmlDsl
16 | inline fun TableContext.caption(
17 | id: String,
18 | classes: String? = null,
19 | noinline styleBuilder: StyleBuilderLambda,
20 | func: BodyContext.() -> Unit = {}
21 | ) {
22 | style("#$id", styleBuilder)
23 | caption(id = id, classes = classes, style = null, func = func)
24 | }
25 |
26 | @HtmlDsl
27 | inline fun TableContext.caption(
28 | vararg attrs: Pair,
29 | id: String,
30 | classes: String? = null,
31 | noinline styleBuilder: StyleBuilderLambda,
32 | func: BodyContext.() -> Unit = {}
33 | ) {
34 | style("#$id", styleBuilder)
35 | caption(attrs = *attrs, id = id, classes = classes, style = null, func = func)
36 | }
37 |
38 | @HtmlDsl
39 | inline fun TableContext.caption(
40 | attrs: List>,
41 | id: String,
42 | classes: String? = null,
43 | noinline styleBuilder: StyleBuilderLambda,
44 | func: BodyContext.() -> Unit = {}
45 | ) {
46 | style("#$id", styleBuilder)
47 | caption(attrs = attrs, id = id, classes = classes, style = null, func = func)
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/DetailsStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.details(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | details(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.details(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | details(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.details(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | details(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/DivStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.div(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | div(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.div(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | div(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.div(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | div(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/FigcaptionStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.figcaption(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | figcaption(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.figcaption(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | figcaption(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.figcaption(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | figcaption(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/FigureStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.figure(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | figure(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.figure(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | figure(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.figure(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | figure(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/FooterStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.footer(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | footer(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.footer(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | footer(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.footer(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | footer(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/H1StyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.h1(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | h1(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.h1(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | h1(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.h1(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | h1(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/H2StyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.h2(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | h2(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.h2(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | h2(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.h2(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | h2(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/H3StyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.h3(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | h3(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.h3(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | h3(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.h3(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | h3(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/H4StyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.h4(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | h4(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.h4(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | h4(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.h4(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | h4(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/H5StyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.h5(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | h5(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.h5(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | h5(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.h5(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | h5(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/H6StyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.h6(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | h6(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.h6(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | h6(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.h6(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | h6(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/HeadStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.HeadContext
8 | import dev.scottpierce.html.writer.HtmlContext
9 | import dev.scottpierce.html.writer.HtmlDsl
10 | import kotlin.Pair
11 | import kotlin.String
12 | import kotlin.Unit
13 | import kotlin.collections.List
14 |
15 | @HtmlDsl
16 | inline fun HtmlContext.head(
17 | id: String,
18 | classes: String? = null,
19 | noinline styleBuilder: StyleBuilderLambda,
20 | func: HeadContext.() -> Unit = {}
21 | ) {
22 | style("#$id", styleBuilder)
23 | head(id = id, classes = classes, style = null, func = func)
24 | }
25 |
26 | @HtmlDsl
27 | inline fun HtmlContext.head(
28 | vararg attrs: Pair,
29 | id: String,
30 | classes: String? = null,
31 | noinline styleBuilder: StyleBuilderLambda,
32 | func: HeadContext.() -> Unit = {}
33 | ) {
34 | style("#$id", styleBuilder)
35 | head(attrs = *attrs, id = id, classes = classes, style = null, func = func)
36 | }
37 |
38 | @HtmlDsl
39 | inline fun HtmlContext.head(
40 | attrs: List>,
41 | id: String,
42 | classes: String? = null,
43 | noinline styleBuilder: StyleBuilderLambda,
44 | func: HeadContext.() -> Unit = {}
45 | ) {
46 | style("#$id", styleBuilder)
47 | head(attrs = attrs, id = id, classes = classes, style = null, func = func)
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/HeaderStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.header(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | header(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.header(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | header(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.header(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | header(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/IStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.i(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | i(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.i(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | i(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.i(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | i(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/MainStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.main(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | main(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.main(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | main(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.main(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | main(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/MarkStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.mark(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | mark(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.mark(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | mark(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.mark(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | mark(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/NavStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.nav(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | nav(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.nav(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | nav(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.nav(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | nav(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/PStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.p(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | p(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.p(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | p(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.p(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | p(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/SectionStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.section(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | section(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.section(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | section(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.section(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | section(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/SelectStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import dev.scottpierce.html.writer.SelectContext
10 | import kotlin.Pair
11 | import kotlin.String
12 | import kotlin.Unit
13 | import kotlin.collections.List
14 |
15 | @HtmlDsl
16 | inline fun BodyContext.select(
17 | id: String,
18 | classes: String? = null,
19 | noinline styleBuilder: StyleBuilderLambda,
20 | func: SelectContext.() -> Unit = {}
21 | ) {
22 | style("#$id", styleBuilder)
23 | select(id = id, classes = classes, style = null, func = func)
24 | }
25 |
26 | @HtmlDsl
27 | inline fun BodyContext.select(
28 | vararg attrs: Pair,
29 | id: String,
30 | classes: String? = null,
31 | noinline styleBuilder: StyleBuilderLambda,
32 | func: SelectContext.() -> Unit = {}
33 | ) {
34 | style("#$id", styleBuilder)
35 | select(attrs = *attrs, id = id, classes = classes, style = null, func = func)
36 | }
37 |
38 | @HtmlDsl
39 | inline fun BodyContext.select(
40 | attrs: List>,
41 | id: String,
42 | classes: String? = null,
43 | noinline styleBuilder: StyleBuilderLambda,
44 | func: SelectContext.() -> Unit = {}
45 | ) {
46 | style("#$id", styleBuilder)
47 | select(attrs = attrs, id = id, classes = classes, style = null, func = func)
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/SpanStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.span(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | span(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.span(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | span(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.span(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | span(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/SummaryStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun BodyContext.summary(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: BodyContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | summary(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun BodyContext.summary(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: BodyContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | summary(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun BodyContext.summary(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: BodyContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | summary(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/TableStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import dev.scottpierce.html.writer.TableContext
10 | import kotlin.Pair
11 | import kotlin.String
12 | import kotlin.Unit
13 | import kotlin.collections.List
14 |
15 | @HtmlDsl
16 | inline fun BodyContext.table(
17 | id: String,
18 | classes: String? = null,
19 | noinline styleBuilder: StyleBuilderLambda,
20 | func: TableContext.() -> Unit = {}
21 | ) {
22 | style("#$id", styleBuilder)
23 | table(id = id, classes = classes, style = null, func = func)
24 | }
25 |
26 | @HtmlDsl
27 | inline fun BodyContext.table(
28 | vararg attrs: Pair,
29 | id: String,
30 | classes: String? = null,
31 | noinline styleBuilder: StyleBuilderLambda,
32 | func: TableContext.() -> Unit = {}
33 | ) {
34 | style("#$id", styleBuilder)
35 | table(attrs = *attrs, id = id, classes = classes, style = null, func = func)
36 | }
37 |
38 | @HtmlDsl
39 | inline fun BodyContext.table(
40 | attrs: List>,
41 | id: String,
42 | classes: String? = null,
43 | noinline styleBuilder: StyleBuilderLambda,
44 | func: TableContext.() -> Unit = {}
45 | ) {
46 | style("#$id", styleBuilder)
47 | table(attrs = attrs, id = id, classes = classes, style = null, func = func)
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/TbodyStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.HtmlDsl
8 | import dev.scottpierce.html.writer.TableContext
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun TableContext.tbody(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: TableContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | tbody(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun TableContext.tbody(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: TableContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | tbody(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun TableContext.tbody(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: TableContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | tbody(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/TfootStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.HtmlDsl
8 | import dev.scottpierce.html.writer.TableContext
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun TableContext.tfoot(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: TableContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | tfoot(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun TableContext.tfoot(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: TableContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | tfoot(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun TableContext.tfoot(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: TableContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | tfoot(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/TheadStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.HtmlDsl
8 | import dev.scottpierce.html.writer.TableContext
9 | import kotlin.Pair
10 | import kotlin.String
11 | import kotlin.Unit
12 | import kotlin.collections.List
13 |
14 | @HtmlDsl
15 | inline fun TableContext.thead(
16 | id: String,
17 | classes: String? = null,
18 | noinline styleBuilder: StyleBuilderLambda,
19 | func: TableContext.() -> Unit = {}
20 | ) {
21 | style("#$id", styleBuilder)
22 | thead(id = id, classes = classes, style = null, func = func)
23 | }
24 |
25 | @HtmlDsl
26 | inline fun TableContext.thead(
27 | vararg attrs: Pair,
28 | id: String,
29 | classes: String? = null,
30 | noinline styleBuilder: StyleBuilderLambda,
31 | func: TableContext.() -> Unit = {}
32 | ) {
33 | style("#$id", styleBuilder)
34 | thead(attrs = *attrs, id = id, classes = classes, style = null, func = func)
35 | }
36 |
37 | @HtmlDsl
38 | inline fun TableContext.thead(
39 | attrs: List>,
40 | id: String,
41 | classes: String? = null,
42 | noinline styleBuilder: StyleBuilderLambda,
43 | func: TableContext.() -> Unit = {}
44 | ) {
45 | style("#$id", styleBuilder)
46 | thead(attrs = attrs, id = id, classes = classes, style = null, func = func)
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/TrStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.HtmlDsl
8 | import dev.scottpierce.html.writer.TableContext
9 | import dev.scottpierce.html.writer.TableRowContext
10 | import kotlin.Pair
11 | import kotlin.String
12 | import kotlin.Unit
13 | import kotlin.collections.List
14 |
15 | @HtmlDsl
16 | inline fun TableContext.tr(
17 | id: String,
18 | classes: String? = null,
19 | noinline styleBuilder: StyleBuilderLambda,
20 | func: TableRowContext.() -> Unit = {}
21 | ) {
22 | style("#$id", styleBuilder)
23 | tr(id = id, classes = classes, style = null, func = func)
24 | }
25 |
26 | @HtmlDsl
27 | inline fun TableContext.tr(
28 | vararg attrs: Pair,
29 | id: String,
30 | classes: String? = null,
31 | noinline styleBuilder: StyleBuilderLambda,
32 | func: TableRowContext.() -> Unit = {}
33 | ) {
34 | style("#$id", styleBuilder)
35 | tr(attrs = *attrs, id = id, classes = classes, style = null, func = func)
36 | }
37 |
38 | @HtmlDsl
39 | inline fun TableContext.tr(
40 | attrs: List>,
41 | id: String,
42 | classes: String? = null,
43 | noinline styleBuilder: StyleBuilderLambda,
44 | func: TableRowContext.() -> Unit = {}
45 | ) {
46 | style("#$id", styleBuilder)
47 | tr(attrs = attrs, id = id, classes = classes, style = null, func = func)
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-style-builder/src/genMain/kotlin/dev/scottpierce/html/writer/element/UlStyleBuilderDsl.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | package dev.scottpierce.html.writer.element
4 |
5 | import dev.scottpierce.html.stylebuilder.StyleBuilderLambda
6 | import dev.scottpierce.html.stylebuilder.style
7 | import dev.scottpierce.html.writer.BodyContext
8 | import dev.scottpierce.html.writer.HtmlDsl
9 | import dev.scottpierce.html.writer.UlContext
10 | import kotlin.Pair
11 | import kotlin.String
12 | import kotlin.Unit
13 | import kotlin.collections.List
14 |
15 | @HtmlDsl
16 | inline fun BodyContext.ul(
17 | id: String,
18 | classes: String? = null,
19 | noinline styleBuilder: StyleBuilderLambda,
20 | func: UlContext.() -> Unit = {}
21 | ) {
22 | style("#$id", styleBuilder)
23 | ul(id = id, classes = classes, style = null, func = func)
24 | }
25 |
26 | @HtmlDsl
27 | inline fun BodyContext.ul(
28 | vararg attrs: Pair,
29 | id: String,
30 | classes: String? = null,
31 | noinline styleBuilder: StyleBuilderLambda,
32 | func: UlContext.() -> Unit = {}
33 | ) {
34 | style("#$id", styleBuilder)
35 | ul(attrs = *attrs, id = id, classes = classes, style = null, func = func)
36 | }
37 |
38 | @HtmlDsl
39 | inline fun BodyContext.ul(
40 | attrs: List>,
41 | id: String,
42 | classes: String? = null,
43 | noinline styleBuilder: StyleBuilderLambda,
44 | func: UlContext.() -> Unit = {}
45 | ) {
46 | style("#$id", styleBuilder)
47 | ul(attrs = attrs, id = id, classes = classes, style = null, func = func)
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-writer/gradle.properties:
--------------------------------------------------------------------------------
1 | POM_ARTIFACT_ID=kotlin-html-writer
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonMain/kotlin/dev/scottpierce/html/writer/HtmlOutput.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer
2 |
3 | @HtmlDsl
4 | interface HtmlOutput {
5 | val options: WriteOptions
6 | fun write(c: Char)
7 | fun write(code: CharSequence)
8 | }
9 |
10 | class StringHtmlOutput(
11 | override val options: WriteOptions = WriteOptions.default,
12 | initialCapacity: Int = 128
13 | ) : HtmlOutput {
14 | private val sb = StringBuilder(initialCapacity)
15 |
16 | /**
17 | * A [CharSequence] of everything that's been written to this [HtmlOutput].
18 | *
19 | * This is exposed to save the underlying data from having to be converted to a [String], especially since the
20 | * html written can be quite large.
21 | */
22 | val charSequence: CharSequence
23 | get() = sb
24 |
25 | override fun write(c: Char) {
26 | sb.append(c)
27 | }
28 |
29 | override fun write(code: CharSequence) {
30 | sb.append(code)
31 | }
32 |
33 | override fun toString(): String = sb.toString()
34 | }
35 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonMain/kotlin/dev/scottpierce/html/writer/PlatformWriter.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer
2 |
3 | internal expect object PlatformWriter {
4 | val lineSeparator: String
5 | }
6 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonMain/kotlin/dev/scottpierce/html/writer/element/DocType.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.element
2 |
3 | sealed class DocType(val type: String?) {
4 | object Html : DocType("html")
5 | class Custom(type: String) : DocType(type)
6 | }
7 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonMain/kotlin/dev/scottpierce/html/writer/element/HeadContextUtil.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.element
2 |
3 | import dev.scottpierce.html.writer.HeadContext
4 | import dev.scottpierce.html.writer.HtmlDsl
5 |
6 | @HtmlDsl
7 | fun HeadContext.linkStyleSheet(href: String) {
8 | writer.write("")
9 | }
10 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonMain/kotlin/dev/scottpierce/html/writer/element/MetaUtil.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.element
2 |
3 | import dev.scottpierce.html.writer.HeadContext
4 | import dev.scottpierce.html.writer.HtmlDsl
5 | import dev.scottpierce.html.writer.HtmlOutput
6 | import dev.scottpierce.html.writer.writer
7 |
8 | @HtmlDsl
9 | fun HtmlOutput.metaTitle(title: String) {
10 | writer {
11 | HeadContext(this).metaTitle(title)
12 | }
13 | }
14 |
15 | @HtmlDsl
16 | fun HeadContext.metaTitle(title: String) {
17 | meta(name = "title", content = title)
18 | }
19 |
20 | @HtmlDsl
21 | fun HtmlOutput.metaDescription(description: String) {
22 | writer {
23 | HeadContext(this).metaDescription(description)
24 | }
25 | }
26 |
27 | @HtmlDsl
28 | fun HeadContext.metaDescription(description: String) {
29 | meta(name = "description", content = description)
30 | }
31 |
32 | @HtmlDsl
33 | fun HtmlOutput.metaCharset(charset: String) {
34 | writer {
35 | HeadContext(this).metaCharset(charset)
36 | }
37 | }
38 |
39 | @HtmlDsl
40 | fun HeadContext.metaCharset(charset: String) {
41 | meta(charset = charset)
42 | }
43 |
44 | @HtmlDsl
45 | fun HtmlOutput.metaViewport(viewport: String) {
46 | writer {
47 | HeadContext(this).metaViewport(viewport)
48 | }
49 | }
50 |
51 | @HtmlDsl
52 | fun HeadContext.metaViewport(viewport: String) {
53 | meta(name = "viewport", content = viewport)
54 | }
55 |
56 | @HtmlDsl
57 | fun HtmlOutput.metaCharsetUtf8() {
58 | writer {
59 | HeadContext(this).metaCharsetUtf8()
60 | }
61 | }
62 |
63 | @HtmlDsl
64 | fun HeadContext.metaCharsetUtf8() {
65 | metaCharset("utf-8")
66 | }
67 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonMain/kotlin/dev/scottpierce/html/writer/element/Title.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.element
2 |
3 | import dev.scottpierce.html.writer.HeadContext
4 | import dev.scottpierce.html.writer.HtmlDsl
5 | import dev.scottpierce.html.writer.HtmlOutput
6 | import dev.scottpierce.html.writer.writer
7 |
8 | @HtmlDsl
9 | fun HtmlOutput.title(title: String) {
10 | writer {
11 | HeadContext(this).title(title)
12 | }
13 | }
14 |
15 | @HtmlDsl
16 | fun HeadContext.title(title: String) {
17 | writer.newLine()
18 | writer.write("").write(title).write("")
19 | }
20 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonMain/kotlin/dev/scottpierce/html/writer/style/BoxShadow.kt:
--------------------------------------------------------------------------------
1 | @file:Suppress("FunctionName")
2 |
3 | package dev.scottpierce.html.writer.style
4 |
5 | import kotlin.jvm.JvmInline
6 |
7 | interface BoxShadow {
8 | companion object {
9 | val NONE: BoxShadow = BoxShadowString("none")
10 | val INITIAL: BoxShadow = BoxShadowString("initial")
11 | val INHERIT: BoxShadow = BoxShadowString("inherit")
12 | }
13 | }
14 |
15 | @JvmInline
16 | private value class BoxShadowString(val styleString: String) : BoxShadow {
17 | override fun toString(): String = styleString
18 | }
19 |
20 | fun BoxShadow(
21 | hOffset: Dimension,
22 | vOffset: Dimension,
23 | color: Color? = null,
24 | inset: Boolean = false
25 | ): BoxShadow = BoxShadowString("$hOffset $vOffset $color${if (inset) " inset" else ""}")
26 |
27 | fun BoxShadow(
28 | hOffset: Dimension,
29 | vOffset: Dimension,
30 | blur: Dimension,
31 | spread: Dimension? = null,
32 | color: Color? = null,
33 | inset: Boolean = false
34 | ): BoxShadow {
35 | return BoxShadowString(
36 | "$hOffset $vOffset $blur" +
37 | (if (spread == null) "" else " $spread") +
38 | (if (color == null) "" else " $color") +
39 | (if (inset) " inset" else "")
40 | )
41 | }
42 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonMain/kotlin/dev/scottpierce/html/writer/style/HighStyleProperties.kt:
--------------------------------------------------------------------------------
1 | @file:Suppress("unused")
2 |
3 | package dev.scottpierce.html.writer.style
4 |
5 | import dev.scottpierce.html.writer.BaseStyleContext
6 | import dev.scottpierce.html.writer.InlineStyleContext
7 | import dev.scottpierce.html.writer.StyleContext
8 |
9 | fun BaseStyleContext.marginX(value: Dimension) {
10 | marginLeft(value)
11 | marginRight(value)
12 | }
13 |
14 | fun StyleContext.marginX(value: Dimension) {
15 | marginLeft(value)
16 | marginRight(value)
17 | }
18 |
19 | fun InlineStyleContext.marginX(value: Dimension) {
20 | marginLeft(value)
21 | marginRight(value)
22 | }
23 |
24 | fun BaseStyleContext.marginY(value: Dimension) {
25 | marginTop(value)
26 | marginBottom(value)
27 | }
28 |
29 | fun StyleContext.marginY(value: Dimension) {
30 | marginTop(value)
31 | marginBottom(value)
32 | }
33 |
34 | fun InlineStyleContext.marginY(value: Dimension) {
35 | marginTop(value)
36 | marginBottom(value)
37 | }
38 |
39 | fun BaseStyleContext.paddingX(value: Dimension) {
40 | paddingLeft(value)
41 | paddingRight(value)
42 | }
43 |
44 | fun StyleContext.paddingX(value: Dimension) {
45 | paddingLeft(value)
46 | paddingRight(value)
47 | }
48 |
49 | fun InlineStyleContext.paddingX(value: Dimension) {
50 | paddingLeft(value)
51 | paddingRight(value)
52 | }
53 |
54 | fun BaseStyleContext.paddingY(value: Dimension) {
55 | paddingTop(value)
56 | paddingBottom(value)
57 | }
58 |
59 | fun StyleContext.paddingY(value: Dimension) {
60 | paddingTop(value)
61 | paddingBottom(value)
62 | }
63 |
64 | fun InlineStyleContext.paddingY(value: Dimension) {
65 | paddingTop(value)
66 | paddingBottom(value)
67 | }
68 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonMain/kotlin/dev/scottpierce/html/writer/style/StylePropertyUtils.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.style
2 |
3 | import kotlin.time.Duration
4 | import kotlin.time.DurationUnit
5 | import kotlin.time.ExperimentalTime
6 |
7 | fun Duration.toCssString(): String {
8 | val seconds = toDouble(DurationUnit.SECONDS)
9 | val secondsInt = seconds.toInt()
10 | return if (seconds == secondsInt.toDouble()) {
11 | "${seconds.toInt()}s"
12 | } else {
13 | "${inWholeMilliseconds}ms"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonTest/kotlin/dev/scottpierce/html/writer/ContentTest.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer
2 |
3 | import dev.scottpierce.html.writer.element.body
4 | import dev.scottpierce.html.writer.element.br
5 | import dev.scottpierce.html.writer.element.html
6 | import dev.scottpierce.html.writer.util.assertEquals
7 | import dev.scottpierce.html.writer.util.write
8 | import kotlin.test.Test
9 |
10 | class ContentTest {
11 | @Test
12 | fun basic() {
13 | write {
14 | html {
15 | body {
16 | +"Test"
17 | }
18 | }
19 | } assertEquals {
20 | """
21 |
22 |
23 | Test
24 |
25 |
26 | """.trimIndent()
27 | }
28 | }
29 |
30 | @Test
31 | fun brTest() {
32 | write {
33 | html {
34 | body {
35 | br()
36 | }
37 | }
38 | } assertEquals {
39 | """
40 |
41 |
42 |
43 |
44 |
45 | """.trimIndent()
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonTest/kotlin/dev/scottpierce/html/writer/element/MetaUtilTest.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.element
2 |
3 | import dev.scottpierce.html.writer.util.write
4 | import kotlin.test.Test
5 |
6 | class MetaUtilTest {
7 | @Test
8 | fun description() {
9 | write {
10 | head {
11 | metaDescription("test")
12 | }
13 | } assertEquals {
14 | """
15 |
16 |
17 |
18 | """.trimIndent()
19 | }
20 | }
21 |
22 | @Test
23 | fun title() {
24 | write {
25 | head {
26 | metaTitle("test")
27 | }
28 | } assertEquals {
29 | """
30 |
31 |
32 |
33 | """.trimIndent()
34 | }
35 | }
36 |
37 | @Test
38 | fun charset() {
39 | write {
40 | head {
41 | metaCharset("utf-8")
42 | }
43 | } assertEquals {
44 | """
45 |
46 |
47 |
48 | """.trimIndent()
49 | }
50 | }
51 |
52 | @Test
53 | fun charsetUtf8() {
54 | write {
55 | head {
56 | metaCharsetUtf8()
57 | }
58 | } assertEquals {
59 | """
60 |
61 |
62 |
63 | """.trimIndent()
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonTest/kotlin/dev/scottpierce/html/writer/element/MoreSelectTests.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.element
2 |
3 | import kotlin.test.Test
4 |
5 | class MoreSelectTests {
6 | @Test
7 | fun default() {
8 | createWriter().apply {
9 | select(classes = "selectClass") {
10 | option(id = "optionId", value = "testValue") {
11 | span { +"Test" }
12 | }
13 | }
14 | } assertEquals {
15 | """
16 |
23 | """.trimIndent()
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonTest/kotlin/dev/scottpierce/html/writer/element/ScriptTest.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.element
2 |
3 | import kotlin.test.Test
4 |
5 | class ScriptTest {
6 | @Test
7 | fun basic() {
8 | createWriter().apply {
9 | script(async = true, defer = true, src = "test")
10 | } assertEquals {
11 | """
12 |
13 | """.trimIndent()
14 | }
15 | }
16 |
17 | @Test
18 | fun context() {
19 | createWriter().apply {
20 | html {
21 | head {
22 | script(async = true, src = "test")
23 | }
24 | }
25 | } assertEquals {
26 | """
27 |
28 |
29 |
30 |
31 |
32 | """.trimIndent()
33 | }
34 | }
35 |
36 | @Test
37 | fun dynamic() {
38 | createWriter().apply {
39 | html {
40 | head {
41 | script(async = true) {
42 | +"console.log('test');"
43 | }
44 | }
45 | }
46 | } assertEquals {
47 | """
48 |
49 |
50 |
53 |
54 |
55 | """.trimIndent()
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonTest/kotlin/dev/scottpierce/html/writer/element/TestUtil.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.element
2 |
3 | import dev.scottpierce.html.writer.StringHtmlOutput
4 | import dev.scottpierce.html.writer.WriteOptions
5 |
6 | fun createWriter(): StringHtmlOutput {
7 | return StringHtmlOutput(WriteOptions.readable.copy(indent = " "))
8 | }
9 |
10 | infix fun StringHtmlOutput.assertEquals(expected: () -> String) {
11 | kotlin.test.assertEquals(expected(), this.toString())
12 | }
13 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonTest/kotlin/dev/scottpierce/html/writer/element/TitleTest.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.element
2 |
3 | import kotlin.test.Test
4 |
5 | class TitleTest {
6 | @Test
7 | fun title() {
8 | createWriter().apply {
9 | head {
10 | title("Test Title")
11 | }
12 | } assertEquals {
13 | """
14 |
15 | Test Title
16 |
17 | """.trimIndent()
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonTest/kotlin/dev/scottpierce/html/writer/style/FlexGrowTests.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.style
2 |
3 | import dev.scottpierce.html.writer.util.assertEquals
4 | import dev.scottpierce.html.writer.util.writeStyle
5 | import kotlin.test.Test
6 |
7 | class FlexGrowTests {
8 | @Test
9 | fun basic() {
10 | writeStyle {
11 | flexGrow(1)
12 | } assertEquals {
13 | "flex-grow: 1;"
14 | }
15 | }
16 |
17 | @Test
18 | fun inherit() {
19 | writeStyle {
20 | flexGrow(CssValue.INHERIT)
21 | } assertEquals {
22 | "flex-grow: inherit;"
23 | }
24 | }
25 |
26 | @Test
27 | fun initial() {
28 | writeStyle {
29 | flexGrow(CssValue.INITIAL)
30 | } assertEquals {
31 | "flex-grow: initial;"
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonTest/kotlin/dev/scottpierce/html/writer/style/LineHeightTests.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.style
2 |
3 | import dev.scottpierce.html.writer.WriteOptions
4 | import dev.scottpierce.html.writer.util.assertEquals
5 | import dev.scottpierce.html.writer.util.writeStyle
6 | import kotlin.test.Test
7 |
8 | class LineHeightTests {
9 | @Test
10 | fun multiplier() {
11 | writeStyle {
12 | lineHeight(2)
13 | } assertEquals {
14 | """line-height: 2;"""
15 | }
16 | }
17 |
18 | @Test
19 | fun dimension() {
20 | writeStyle {
21 | lineHeight(2.px)
22 | } assertEquals {
23 | """line-height: 2px;"""
24 | }
25 | }
26 |
27 | @Test
28 | fun inherit() {
29 | writeStyle {
30 | lineHeight(LineHeight.INHERIT)
31 | } assertEquals {
32 | """line-height: inherit;"""
33 | }
34 | }
35 |
36 | @Test
37 | fun normal() {
38 | writeStyle {
39 | lineHeight(LineHeight.NORMAL)
40 | } assertEquals {
41 | """line-height: normal;"""
42 | }
43 | }
44 |
45 | @Test
46 | fun minimal() {
47 | writeStyle(WriteOptions.minified) {
48 | lineHeight(2.px)
49 | } assertEquals {
50 | """line-height:2px;"""
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonTest/kotlin/dev/scottpierce/html/writer/style/ListStyleTest.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.style
2 |
3 | import dev.scottpierce.html.writer.util.assertEquals
4 | import dev.scottpierce.html.writer.util.writeStyle
5 | import kotlin.test.Test
6 | import kotlin.test.assertEquals
7 |
8 | class ListStyleTest {
9 | @Test
10 | fun write() {
11 | writeStyle {
12 | listStyle(ListStyleType.DISC)
13 | } assertEquals {
14 | """list-style: disc;"""
15 | }
16 |
17 | writeStyle {
18 | listStyle(ListStyleType.DISC, ListStylePosition.INSIDE)
19 | } assertEquals {
20 | """list-style: disc inside;"""
21 | }
22 |
23 | writeStyle {
24 | listStyle(ListStyleType.DISC, ListStylePosition.INSIDE, ListStyleImage.INHERIT)
25 | } assertEquals {
26 | """list-style: disc inside inherit;"""
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonTest/kotlin/dev/scottpierce/html/writer/style/MediaQueryTest.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.style
2 |
3 | import dev.scottpierce.html.writer.util.assertEquals
4 | import dev.scottpierce.html.writer.util.writeStyleSheet
5 | import kotlin.test.Test
6 |
7 | class MediaQueryTest {
8 | @Test
9 | fun basic() {
10 | writeStyleSheet {
11 | media("(max-width: 300px)") {
12 | style(".test") {
13 | display(Display.NONE)
14 | }
15 | }
16 | } assertEquals {
17 | """
18 |
25 | """.trimIndent()
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/commonTest/kotlin/dev/scottpierce/html/writer/style/StyleTest.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.style
2 |
3 | import dev.scottpierce.html.writer.WriteOptions
4 | import dev.scottpierce.html.writer.util.assertEquals
5 | import dev.scottpierce.html.writer.util.writeStyle
6 | import kotlin.test.Test
7 |
8 | class StyleTest {
9 | @Test
10 | fun basic() {
11 | writeStyle {
12 | marginX(10.px)
13 | } assertEquals {
14 | """
15 | margin-left: 10px;
16 | margin-right: 10px;
17 | """.trimIndent()
18 | }
19 | }
20 |
21 | @Test
22 | fun basicMinified() {
23 | writeStyle(options = WriteOptions(minifyStyles = true)) {
24 | marginX(10.px)
25 | } assertEquals {
26 | """
27 | margin-left:10px;
28 | margin-right:10px;
29 | """.trimIndent()
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/AlignItemsStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.alignItems(value: AlignItems, important: Boolean = false) {
15 | writeStyleProperty("align-items", value, important)
16 | }
17 |
18 | fun StyleContext.alignItems(value: AlignItems, important: Boolean = false) {
19 | writeStyleProperty("align-items", value, important)
20 | }
21 |
22 | fun InlineStyleContext.alignItems(value: AlignItems, important: Boolean = false) {
23 | writeStyleProperty("align-items", value, important)
24 | }
25 |
26 | enum class AlignItems(
27 | val value: String
28 | ) {
29 | BASELINE("baseline"),
30 |
31 | CENTER("center"),
32 |
33 | FLEX_START("flex-start"),
34 |
35 | FLEX_END("flex-end"),
36 |
37 | STRETCH("stretch"),
38 |
39 | INITIAL("initial"),
40 |
41 | INHERIT("inherit");
42 |
43 | override fun toString() = value
44 | }
45 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/AlignSelfStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.alignSelf(value: AlignSelf, important: Boolean = false) {
15 | writeStyleProperty("align-self", value, important)
16 | }
17 |
18 | fun StyleContext.alignSelf(value: AlignSelf, important: Boolean = false) {
19 | writeStyleProperty("align-self", value, important)
20 | }
21 |
22 | fun InlineStyleContext.alignSelf(value: AlignSelf, important: Boolean = false) {
23 | writeStyleProperty("align-self", value, important)
24 | }
25 |
26 | enum class AlignSelf(
27 | val value: String
28 | ) {
29 | AUTO("auto"),
30 |
31 | BASELINE("baseline"),
32 |
33 | CENTER("center"),
34 |
35 | END("end"),
36 |
37 | FLEX_END("flex-end"),
38 |
39 | FLEX_START("flex-start"),
40 |
41 | START("start"),
42 |
43 | INITIAL("initial"),
44 |
45 | INHERIT("inherit");
46 |
47 | override fun toString() = value
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/AnimationDurationStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.animationDuration(value: String, important: Boolean = false) {
15 | writeStyleProperty("animation-duration", value, important)
16 | }
17 |
18 | fun BaseStyleContext.animationDuration(value: CssValue, important: Boolean = false) {
19 | writeStyleProperty("animation-duration", value, important)
20 | }
21 |
22 | fun StyleContext.animationDuration(value: String, important: Boolean = false) {
23 | writeStyleProperty("animation-duration", value, important)
24 | }
25 |
26 | fun StyleContext.animationDuration(value: CssValue, important: Boolean = false) {
27 | writeStyleProperty("animation-duration", value, important)
28 | }
29 |
30 | fun InlineStyleContext.animationDuration(value: String, important: Boolean = false) {
31 | writeStyleProperty("animation-duration", value, important)
32 | }
33 |
34 | fun InlineStyleContext.animationDuration(value: CssValue, important: Boolean = false) {
35 | writeStyleProperty("animation-duration", value, important)
36 | }
37 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/AnimationNameStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.animationName(value: String, important: Boolean = false) {
15 | writeStyleProperty("animation-name", value, important)
16 | }
17 |
18 | fun BaseStyleContext.animationName(value: AnimationName, important: Boolean = false) {
19 | writeStyleProperty("animation-name", value, important)
20 | }
21 |
22 | fun StyleContext.animationName(value: String, important: Boolean = false) {
23 | writeStyleProperty("animation-name", value, important)
24 | }
25 |
26 | fun StyleContext.animationName(value: AnimationName, important: Boolean = false) {
27 | writeStyleProperty("animation-name", value, important)
28 | }
29 |
30 | fun InlineStyleContext.animationName(value: String, important: Boolean = false) {
31 | writeStyleProperty("animation-name", value, important)
32 | }
33 |
34 | fun InlineStyleContext.animationName(value: AnimationName, important: Boolean = false) {
35 | writeStyleProperty("animation-name", value, important)
36 | }
37 |
38 | enum class AnimationName(
39 | val value: String
40 | ) {
41 | NONE("none"),
42 |
43 | INITIAL("initial"),
44 |
45 | INHERIT("inherit");
46 |
47 | override fun toString() = value
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BackgroundAttachmentStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.backgroundAttachment(value: BackgroundAttachment, important: Boolean = false) {
15 | writeStyleProperty("background-attachment", value, important)
16 | }
17 |
18 | fun StyleContext.backgroundAttachment(value: BackgroundAttachment, important: Boolean = false) {
19 | writeStyleProperty("background-attachment", value, important)
20 | }
21 |
22 | fun InlineStyleContext.backgroundAttachment(value: BackgroundAttachment, important: Boolean =
23 | false) {
24 | writeStyleProperty("background-attachment", value, important)
25 | }
26 |
27 | enum class BackgroundAttachment(
28 | val value: String
29 | ) {
30 | SCROLL("scroll"),
31 |
32 | FIXED("fixed"),
33 |
34 | LOCAL("local"),
35 |
36 | INITIAL("initial"),
37 |
38 | INHERIT("inherit");
39 |
40 | override fun toString() = value
41 | }
42 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BackgroundClipStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.backgroundClip(value: BackgroundClip, important: Boolean = false) {
15 | writeStyleProperty("background-clip", value, important)
16 | }
17 |
18 | fun StyleContext.backgroundClip(value: BackgroundClip, important: Boolean = false) {
19 | writeStyleProperty("background-clip", value, important)
20 | }
21 |
22 | fun InlineStyleContext.backgroundClip(value: BackgroundClip, important: Boolean = false) {
23 | writeStyleProperty("background-clip", value, important)
24 | }
25 |
26 | enum class BackgroundClip(
27 | val value: String
28 | ) {
29 | BORDER_BOX("border-box"),
30 |
31 | PADDING_BOX("padding-box"),
32 |
33 | CONTENT_BOX("content-box"),
34 |
35 | INITIAL("initial"),
36 |
37 | INHERIT("inherit");
38 |
39 | override fun toString() = value
40 | }
41 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BackgroundOriginStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.backgroundOrigin(value: BackgroundOrigin, important: Boolean = false) {
15 | writeStyleProperty("background-origin", value, important)
16 | }
17 |
18 | fun StyleContext.backgroundOrigin(value: BackgroundOrigin, important: Boolean = false) {
19 | writeStyleProperty("background-origin", value, important)
20 | }
21 |
22 | fun InlineStyleContext.backgroundOrigin(value: BackgroundOrigin, important: Boolean = false) {
23 | writeStyleProperty("background-origin", value, important)
24 | }
25 |
26 | enum class BackgroundOrigin(
27 | val value: String
28 | ) {
29 | PADDING_BOX("padding-box"),
30 |
31 | BORDER_BOX("border-box"),
32 |
33 | CONTENT_BOX("content-box"),
34 |
35 | INITIAL("initial"),
36 |
37 | INHERIT("inherit");
38 |
39 | override fun toString() = value
40 | }
41 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BackgroundRepeatStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.backgroundRepeat(value: BackgroundRepeat, important: Boolean = false) {
15 | writeStyleProperty("background-repeat", value, important)
16 | }
17 |
18 | fun StyleContext.backgroundRepeat(value: BackgroundRepeat, important: Boolean = false) {
19 | writeStyleProperty("background-repeat", value, important)
20 | }
21 |
22 | fun InlineStyleContext.backgroundRepeat(value: BackgroundRepeat, important: Boolean = false) {
23 | writeStyleProperty("background-repeat", value, important)
24 | }
25 |
26 | enum class BackgroundRepeat(
27 | val value: String
28 | ) {
29 | REPEAT("repeat"),
30 |
31 | REPEAT_X("repeat-x"),
32 |
33 | REPEAT_Y("repeat-y"),
34 |
35 | NO_REPEAT("no-repeat"),
36 |
37 | SPACE("space"),
38 |
39 | ROUND("round"),
40 |
41 | INITIAL("initial"),
42 |
43 | INHERIT("inherit");
44 |
45 | override fun toString() = value
46 | }
47 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderBottomLeftRadiusStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.borderBottomLeftRadius(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("border-bottom-left-radius", value, important)
15 | }
16 |
17 | fun StyleContext.borderBottomLeftRadius(value: Dimension, important: Boolean = false) {
18 | writeStyleProperty("border-bottom-left-radius", value, important)
19 | }
20 |
21 | fun InlineStyleContext.borderBottomLeftRadius(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("border-bottom-left-radius", value, important)
23 | }
24 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderBottomRightRadiusStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.borderBottomRightRadius(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("border-bottom-right-radius", value, important)
15 | }
16 |
17 | fun StyleContext.borderBottomRightRadius(value: Dimension, important: Boolean = false) {
18 | writeStyleProperty("border-bottom-right-radius", value, important)
19 | }
20 |
21 | fun InlineStyleContext.borderBottomRightRadius(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("border-bottom-right-radius", value, important)
23 | }
24 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderBottomStyleStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.borderBottomStyle(value: BorderStyle, important: Boolean = false) {
14 | writeStyleProperty("border-bottom-style", value, important)
15 | }
16 |
17 | fun StyleContext.borderBottomStyle(value: BorderStyle, important: Boolean = false) {
18 | writeStyleProperty("border-bottom-style", value, important)
19 | }
20 |
21 | fun InlineStyleContext.borderBottomStyle(value: BorderStyle, important: Boolean = false) {
22 | writeStyleProperty("border-bottom-style", value, important)
23 | }
24 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderBottomWidthStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.borderBottomWidth(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("border-bottom-width", value, important)
15 | }
16 |
17 | fun BaseStyleContext.borderBottomWidth(value: BorderStyle, important: Boolean = false) {
18 | writeStyleProperty("border-bottom-width", value, important)
19 | }
20 |
21 | fun StyleContext.borderBottomWidth(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("border-bottom-width", value, important)
23 | }
24 |
25 | fun StyleContext.borderBottomWidth(value: BorderStyle, important: Boolean = false) {
26 | writeStyleProperty("border-bottom-width", value, important)
27 | }
28 |
29 | fun InlineStyleContext.borderBottomWidth(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("border-bottom-width", value, important)
31 | }
32 |
33 | fun InlineStyleContext.borderBottomWidth(value: BorderStyle, important: Boolean = false) {
34 | writeStyleProperty("border-bottom-width", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderCollapseStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.borderCollapse(value: BorderCollapse, important: Boolean = false) {
15 | writeStyleProperty("border-collapse", value, important)
16 | }
17 |
18 | fun StyleContext.borderCollapse(value: BorderCollapse, important: Boolean = false) {
19 | writeStyleProperty("border-collapse", value, important)
20 | }
21 |
22 | fun InlineStyleContext.borderCollapse(value: BorderCollapse, important: Boolean = false) {
23 | writeStyleProperty("border-collapse", value, important)
24 | }
25 |
26 | enum class BorderCollapse(
27 | val value: String
28 | ) {
29 | SEPARATE("separate"),
30 |
31 | COLLAPSE("collapse"),
32 |
33 | INITIAL("initial"),
34 |
35 | INHERIT("inherit");
36 |
37 | override fun toString() = value
38 | }
39 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderLeftStyleStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.borderLeftStyle(value: BorderStyle, important: Boolean = false) {
14 | writeStyleProperty("border-left-style", value, important)
15 | }
16 |
17 | fun StyleContext.borderLeftStyle(value: BorderStyle, important: Boolean = false) {
18 | writeStyleProperty("border-left-style", value, important)
19 | }
20 |
21 | fun InlineStyleContext.borderLeftStyle(value: BorderStyle, important: Boolean = false) {
22 | writeStyleProperty("border-left-style", value, important)
23 | }
24 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderLeftWidthStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.borderLeftWidth(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("border-left-width", value, important)
15 | }
16 |
17 | fun BaseStyleContext.borderLeftWidth(value: BorderStyle, important: Boolean = false) {
18 | writeStyleProperty("border-left-width", value, important)
19 | }
20 |
21 | fun StyleContext.borderLeftWidth(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("border-left-width", value, important)
23 | }
24 |
25 | fun StyleContext.borderLeftWidth(value: BorderStyle, important: Boolean = false) {
26 | writeStyleProperty("border-left-width", value, important)
27 | }
28 |
29 | fun InlineStyleContext.borderLeftWidth(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("border-left-width", value, important)
31 | }
32 |
33 | fun InlineStyleContext.borderLeftWidth(value: BorderStyle, important: Boolean = false) {
34 | writeStyleProperty("border-left-width", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderRightStyleStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.borderRightStyle(value: BorderStyle, important: Boolean = false) {
14 | writeStyleProperty("border-right-style", value, important)
15 | }
16 |
17 | fun StyleContext.borderRightStyle(value: BorderStyle, important: Boolean = false) {
18 | writeStyleProperty("border-right-style", value, important)
19 | }
20 |
21 | fun InlineStyleContext.borderRightStyle(value: BorderStyle, important: Boolean = false) {
22 | writeStyleProperty("border-right-style", value, important)
23 | }
24 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderRightWidthStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.borderRightWidth(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("border-right-width", value, important)
15 | }
16 |
17 | fun BaseStyleContext.borderRightWidth(value: BorderStyle, important: Boolean = false) {
18 | writeStyleProperty("border-right-width", value, important)
19 | }
20 |
21 | fun StyleContext.borderRightWidth(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("border-right-width", value, important)
23 | }
24 |
25 | fun StyleContext.borderRightWidth(value: BorderStyle, important: Boolean = false) {
26 | writeStyleProperty("border-right-width", value, important)
27 | }
28 |
29 | fun InlineStyleContext.borderRightWidth(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("border-right-width", value, important)
31 | }
32 |
33 | fun InlineStyleContext.borderRightWidth(value: BorderStyle, important: Boolean = false) {
34 | writeStyleProperty("border-right-width", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderSpacingStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.borderSpacing(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("border-spacing", value, important)
15 | }
16 |
17 | fun StyleContext.borderSpacing(value: Dimension, important: Boolean = false) {
18 | writeStyleProperty("border-spacing", value, important)
19 | }
20 |
21 | fun InlineStyleContext.borderSpacing(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("border-spacing", value, important)
23 | }
24 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderStyleStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.borderStyle(value: BorderStyle, important: Boolean = false) {
15 | writeStyleProperty("border-style", value, important)
16 | }
17 |
18 | fun StyleContext.borderStyle(value: BorderStyle, important: Boolean = false) {
19 | writeStyleProperty("border-style", value, important)
20 | }
21 |
22 | fun InlineStyleContext.borderStyle(value: BorderStyle, important: Boolean = false) {
23 | writeStyleProperty("border-style", value, important)
24 | }
25 |
26 | enum class BorderStyle(
27 | val value: String
28 | ) {
29 | NONE("none"),
30 |
31 | HIDDEN("hidden"),
32 |
33 | DOTTED("dotted"),
34 |
35 | DASHED("dashed"),
36 |
37 | SOLID("solid"),
38 |
39 | DOUBLE("double"),
40 |
41 | GROOVE("groove"),
42 |
43 | RIDGE("ridge"),
44 |
45 | INSET("inset"),
46 |
47 | OUTSET("outset"),
48 |
49 | INITIAL("initial"),
50 |
51 | INHERIT("inherit");
52 |
53 | override fun toString() = value
54 | }
55 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderTopLeftRadiusStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.borderTopLeftRadius(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("border-top-left-radius", value, important)
15 | }
16 |
17 | fun StyleContext.borderTopLeftRadius(value: Dimension, important: Boolean = false) {
18 | writeStyleProperty("border-top-left-radius", value, important)
19 | }
20 |
21 | fun InlineStyleContext.borderTopLeftRadius(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("border-top-left-radius", value, important)
23 | }
24 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderTopRightRadiusStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.borderTopRightRadius(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("border-top-right-radius", value, important)
15 | }
16 |
17 | fun StyleContext.borderTopRightRadius(value: Dimension, important: Boolean = false) {
18 | writeStyleProperty("border-top-right-radius", value, important)
19 | }
20 |
21 | fun InlineStyleContext.borderTopRightRadius(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("border-top-right-radius", value, important)
23 | }
24 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderTopStyleStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.borderTopStyle(value: BorderStyle, important: Boolean = false) {
14 | writeStyleProperty("border-top-style", value, important)
15 | }
16 |
17 | fun StyleContext.borderTopStyle(value: BorderStyle, important: Boolean = false) {
18 | writeStyleProperty("border-top-style", value, important)
19 | }
20 |
21 | fun InlineStyleContext.borderTopStyle(value: BorderStyle, important: Boolean = false) {
22 | writeStyleProperty("border-top-style", value, important)
23 | }
24 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderTopWidthStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.borderTopWidth(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("border-top-width", value, important)
15 | }
16 |
17 | fun BaseStyleContext.borderTopWidth(value: BorderStyle, important: Boolean = false) {
18 | writeStyleProperty("border-top-width", value, important)
19 | }
20 |
21 | fun StyleContext.borderTopWidth(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("border-top-width", value, important)
23 | }
24 |
25 | fun StyleContext.borderTopWidth(value: BorderStyle, important: Boolean = false) {
26 | writeStyleProperty("border-top-width", value, important)
27 | }
28 |
29 | fun InlineStyleContext.borderTopWidth(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("border-top-width", value, important)
31 | }
32 |
33 | fun InlineStyleContext.borderTopWidth(value: BorderStyle, important: Boolean = false) {
34 | writeStyleProperty("border-top-width", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BorderWidthStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.borderWidth(value: Dimension, important: Boolean = false) {
15 | writeStyleProperty("border-width", value, important)
16 | }
17 |
18 | fun BaseStyleContext.borderWidth(value: BorderWidth, important: Boolean = false) {
19 | writeStyleProperty("border-width", value, important)
20 | }
21 |
22 | fun StyleContext.borderWidth(value: Dimension, important: Boolean = false) {
23 | writeStyleProperty("border-width", value, important)
24 | }
25 |
26 | fun StyleContext.borderWidth(value: BorderWidth, important: Boolean = false) {
27 | writeStyleProperty("border-width", value, important)
28 | }
29 |
30 | fun InlineStyleContext.borderWidth(value: Dimension, important: Boolean = false) {
31 | writeStyleProperty("border-width", value, important)
32 | }
33 |
34 | fun InlineStyleContext.borderWidth(value: BorderWidth, important: Boolean = false) {
35 | writeStyleProperty("border-width", value, important)
36 | }
37 |
38 | enum class BorderWidth(
39 | val value: String
40 | ) {
41 | MEDIUM("medium"),
42 |
43 | THIN("thin"),
44 |
45 | THICK("thick"),
46 |
47 | INITIAL("initial"),
48 |
49 | INHERIT("inherit");
50 |
51 | override fun toString() = value
52 | }
53 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/BottomStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.bottom(value: Dimension, important: Boolean = false) {
15 | writeStyleProperty("bottom", value, important)
16 | }
17 |
18 | fun BaseStyleContext.bottom(value: Bottom, important: Boolean = false) {
19 | writeStyleProperty("bottom", value, important)
20 | }
21 |
22 | fun StyleContext.bottom(value: Dimension, important: Boolean = false) {
23 | writeStyleProperty("bottom", value, important)
24 | }
25 |
26 | fun StyleContext.bottom(value: Bottom, important: Boolean = false) {
27 | writeStyleProperty("bottom", value, important)
28 | }
29 |
30 | fun InlineStyleContext.bottom(value: Dimension, important: Boolean = false) {
31 | writeStyleProperty("bottom", value, important)
32 | }
33 |
34 | fun InlineStyleContext.bottom(value: Bottom, important: Boolean = false) {
35 | writeStyleProperty("bottom", value, important)
36 | }
37 |
38 | enum class Bottom(
39 | val value: String
40 | ) {
41 | AUTO("auto"),
42 |
43 | INITIAL("initial"),
44 |
45 | INHERIT("inherit");
46 |
47 | override fun toString() = value
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/CaptionStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.caption(value: Caption, important: Boolean = false) {
15 | writeStyleProperty("caption", value, important)
16 | }
17 |
18 | fun StyleContext.caption(value: Caption, important: Boolean = false) {
19 | writeStyleProperty("caption", value, important)
20 | }
21 |
22 | fun InlineStyleContext.caption(value: Caption, important: Boolean = false) {
23 | writeStyleProperty("caption", value, important)
24 | }
25 |
26 | enum class Caption(
27 | val value: String
28 | ) {
29 | TOP("top"),
30 |
31 | BOTTOM("bottom"),
32 |
33 | INITIAL("initial"),
34 |
35 | INHERIT("inherit");
36 |
37 | override fun toString() = value
38 | }
39 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/FlexBasisStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.flexBasis(value: Dimension, important: Boolean = false) {
15 | writeStyleProperty("flex-basis", value, important)
16 | }
17 |
18 | fun BaseStyleContext.flexBasis(value: FlexBasis, important: Boolean = false) {
19 | writeStyleProperty("flex-basis", value, important)
20 | }
21 |
22 | fun StyleContext.flexBasis(value: Dimension, important: Boolean = false) {
23 | writeStyleProperty("flex-basis", value, important)
24 | }
25 |
26 | fun StyleContext.flexBasis(value: FlexBasis, important: Boolean = false) {
27 | writeStyleProperty("flex-basis", value, important)
28 | }
29 |
30 | fun InlineStyleContext.flexBasis(value: Dimension, important: Boolean = false) {
31 | writeStyleProperty("flex-basis", value, important)
32 | }
33 |
34 | fun InlineStyleContext.flexBasis(value: FlexBasis, important: Boolean = false) {
35 | writeStyleProperty("flex-basis", value, important)
36 | }
37 |
38 | enum class FlexBasis(
39 | val value: String
40 | ) {
41 | AUTO("auto"),
42 |
43 | INITIAL("initial"),
44 |
45 | INHERIT("inherit");
46 |
47 | override fun toString() = value
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/FlexDirectionStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.flexDirection(value: FlexDirection, important: Boolean = false) {
15 | writeStyleProperty("flex-direction", value, important)
16 | }
17 |
18 | fun StyleContext.flexDirection(value: FlexDirection, important: Boolean = false) {
19 | writeStyleProperty("flex-direction", value, important)
20 | }
21 |
22 | fun InlineStyleContext.flexDirection(value: FlexDirection, important: Boolean = false) {
23 | writeStyleProperty("flex-direction", value, important)
24 | }
25 |
26 | enum class FlexDirection(
27 | val value: String
28 | ) {
29 | COLUMN("column"),
30 |
31 | COLUMN_REVERSE("column-reverse"),
32 |
33 | ROW_REVERSE("row-reverse"),
34 |
35 | ROW("row"),
36 |
37 | INITIAL("initial"),
38 |
39 | INHERIT("inherit");
40 |
41 | override fun toString() = value
42 | }
43 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/FlexGrowStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Number
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.flexGrow(value: Number, important: Boolean = false) {
15 | writeStyleProperty("flex-grow", value, important)
16 | }
17 |
18 | fun BaseStyleContext.flexGrow(value: CssValue, important: Boolean = false) {
19 | writeStyleProperty("flex-grow", value, important)
20 | }
21 |
22 | fun StyleContext.flexGrow(value: Number, important: Boolean = false) {
23 | writeStyleProperty("flex-grow", value, important)
24 | }
25 |
26 | fun StyleContext.flexGrow(value: CssValue, important: Boolean = false) {
27 | writeStyleProperty("flex-grow", value, important)
28 | }
29 |
30 | fun InlineStyleContext.flexGrow(value: Number, important: Boolean = false) {
31 | writeStyleProperty("flex-grow", value, important)
32 | }
33 |
34 | fun InlineStyleContext.flexGrow(value: CssValue, important: Boolean = false) {
35 | writeStyleProperty("flex-grow", value, important)
36 | }
37 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/FlexShrinkStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Number
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.flexShrink(value: Number, important: Boolean = false) {
15 | writeStyleProperty("flex-shrink", value, important)
16 | }
17 |
18 | fun BaseStyleContext.flexShrink(value: CssValue, important: Boolean = false) {
19 | writeStyleProperty("flex-shrink", value, important)
20 | }
21 |
22 | fun StyleContext.flexShrink(value: Number, important: Boolean = false) {
23 | writeStyleProperty("flex-shrink", value, important)
24 | }
25 |
26 | fun StyleContext.flexShrink(value: CssValue, important: Boolean = false) {
27 | writeStyleProperty("flex-shrink", value, important)
28 | }
29 |
30 | fun InlineStyleContext.flexShrink(value: Number, important: Boolean = false) {
31 | writeStyleProperty("flex-shrink", value, important)
32 | }
33 |
34 | fun InlineStyleContext.flexShrink(value: CssValue, important: Boolean = false) {
35 | writeStyleProperty("flex-shrink", value, important)
36 | }
37 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/FlexWrapStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.flexWrap(value: FlexWrap, important: Boolean = false) {
15 | writeStyleProperty("flex-wrap", value, important)
16 | }
17 |
18 | fun StyleContext.flexWrap(value: FlexWrap, important: Boolean = false) {
19 | writeStyleProperty("flex-wrap", value, important)
20 | }
21 |
22 | fun InlineStyleContext.flexWrap(value: FlexWrap, important: Boolean = false) {
23 | writeStyleProperty("flex-wrap", value, important)
24 | }
25 |
26 | enum class FlexWrap(
27 | val value: String
28 | ) {
29 | NOWRAP("nowrap"),
30 |
31 | WRAP("wrap"),
32 |
33 | WRAP_REVERSE("wrap-reverse"),
34 |
35 | INITIAL("initial"),
36 |
37 | INHERIT("inherit");
38 |
39 | override fun toString() = value
40 | }
41 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/FloatStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.float(value: FloatDirection, important: Boolean = false) {
14 | writeStyleProperty("float", value, important)
15 | }
16 |
17 | fun StyleContext.float(value: FloatDirection, important: Boolean = false) {
18 | writeStyleProperty("float", value, important)
19 | }
20 |
21 | fun InlineStyleContext.float(value: FloatDirection, important: Boolean = false) {
22 | writeStyleProperty("float", value, important)
23 | }
24 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/FontFamilyStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.fontFamily(value: String, important: Boolean = false) {
15 | writeStyleProperty("font-family", value, important)
16 | }
17 |
18 | fun BaseStyleContext.fontFamily(value: CssValue, important: Boolean = false) {
19 | writeStyleProperty("font-family", value, important)
20 | }
21 |
22 | fun StyleContext.fontFamily(value: String, important: Boolean = false) {
23 | writeStyleProperty("font-family", value, important)
24 | }
25 |
26 | fun StyleContext.fontFamily(value: CssValue, important: Boolean = false) {
27 | writeStyleProperty("font-family", value, important)
28 | }
29 |
30 | fun InlineStyleContext.fontFamily(value: String, important: Boolean = false) {
31 | writeStyleProperty("font-family", value, important)
32 | }
33 |
34 | fun InlineStyleContext.fontFamily(value: CssValue, important: Boolean = false) {
35 | writeStyleProperty("font-family", value, important)
36 | }
37 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/FontWeightStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Int
12 | import kotlin.String
13 | import kotlin.Suppress
14 |
15 | fun BaseStyleContext.fontWeight(value: Int, important: Boolean = false) {
16 | writeStyleProperty("font-weight", value, important)
17 | }
18 |
19 | fun BaseStyleContext.fontWeight(value: FontWeight, important: Boolean = false) {
20 | writeStyleProperty("font-weight", value, important)
21 | }
22 |
23 | fun StyleContext.fontWeight(value: Int, important: Boolean = false) {
24 | writeStyleProperty("font-weight", value, important)
25 | }
26 |
27 | fun StyleContext.fontWeight(value: FontWeight, important: Boolean = false) {
28 | writeStyleProperty("font-weight", value, important)
29 | }
30 |
31 | fun InlineStyleContext.fontWeight(value: Int, important: Boolean = false) {
32 | writeStyleProperty("font-weight", value, important)
33 | }
34 |
35 | fun InlineStyleContext.fontWeight(value: FontWeight, important: Boolean = false) {
36 | writeStyleProperty("font-weight", value, important)
37 | }
38 |
39 | enum class FontWeight(
40 | val value: String
41 | ) {
42 | NORMAL("normal"),
43 |
44 | BOLD("bold"),
45 |
46 | BOLDER("bolder"),
47 |
48 | LIGHTER("lighter"),
49 |
50 | INHERIT("inherit"),
51 |
52 | INITIAL("initial");
53 |
54 | override fun toString() = value
55 | }
56 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/HeightStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.height(value: Dimension, important: Boolean = false) {
15 | writeStyleProperty("height", value, important)
16 | }
17 |
18 | fun BaseStyleContext.height(value: Height, important: Boolean = false) {
19 | writeStyleProperty("height", value, important)
20 | }
21 |
22 | fun StyleContext.height(value: Dimension, important: Boolean = false) {
23 | writeStyleProperty("height", value, important)
24 | }
25 |
26 | fun StyleContext.height(value: Height, important: Boolean = false) {
27 | writeStyleProperty("height", value, important)
28 | }
29 |
30 | fun InlineStyleContext.height(value: Dimension, important: Boolean = false) {
31 | writeStyleProperty("height", value, important)
32 | }
33 |
34 | fun InlineStyleContext.height(value: Height, important: Boolean = false) {
35 | writeStyleProperty("height", value, important)
36 | }
37 |
38 | enum class Height(
39 | val value: String
40 | ) {
41 | AUTO("auto"),
42 |
43 | INITIAL("initial"),
44 |
45 | INHERIT("inherit");
46 |
47 | override fun toString() = value
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/JustifyContentStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.justifyContent(value: JustifyContent, important: Boolean = false) {
15 | writeStyleProperty("justify-content", value, important)
16 | }
17 |
18 | fun StyleContext.justifyContent(value: JustifyContent, important: Boolean = false) {
19 | writeStyleProperty("justify-content", value, important)
20 | }
21 |
22 | fun InlineStyleContext.justifyContent(value: JustifyContent, important: Boolean = false) {
23 | writeStyleProperty("justify-content", value, important)
24 | }
25 |
26 | enum class JustifyContent(
27 | val value: String
28 | ) {
29 | CENTER("center"),
30 |
31 | FLEX_END("flex-end"),
32 |
33 | FLEX_START("flex-start"),
34 |
35 | SPACE_AROUND("space-around"),
36 |
37 | SPACE_BETWEEN("space-between"),
38 |
39 | SPACE_EVENLY("space-evenly"),
40 |
41 | INITIAL("initial"),
42 |
43 | INHERIT("inherit");
44 |
45 | override fun toString() = value
46 | }
47 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/LeftStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.left(value: Dimension, important: Boolean = false) {
15 | writeStyleProperty("left", value, important)
16 | }
17 |
18 | fun BaseStyleContext.left(value: Left, important: Boolean = false) {
19 | writeStyleProperty("left", value, important)
20 | }
21 |
22 | fun StyleContext.left(value: Dimension, important: Boolean = false) {
23 | writeStyleProperty("left", value, important)
24 | }
25 |
26 | fun StyleContext.left(value: Left, important: Boolean = false) {
27 | writeStyleProperty("left", value, important)
28 | }
29 |
30 | fun InlineStyleContext.left(value: Dimension, important: Boolean = false) {
31 | writeStyleProperty("left", value, important)
32 | }
33 |
34 | fun InlineStyleContext.left(value: Left, important: Boolean = false) {
35 | writeStyleProperty("left", value, important)
36 | }
37 |
38 | enum class Left(
39 | val value: String
40 | ) {
41 | AUTO("auto"),
42 |
43 | INITIAL("initial"),
44 |
45 | INHERIT("inherit");
46 |
47 | override fun toString() = value
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/LetterSpacingStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.letterSpacing(value: Dimension, important: Boolean = false) {
15 | writeStyleProperty("letter-spacing", value, important)
16 | }
17 |
18 | fun BaseStyleContext.letterSpacing(value: LetterSpacing, important: Boolean = false) {
19 | writeStyleProperty("letter-spacing", value, important)
20 | }
21 |
22 | fun StyleContext.letterSpacing(value: Dimension, important: Boolean = false) {
23 | writeStyleProperty("letter-spacing", value, important)
24 | }
25 |
26 | fun StyleContext.letterSpacing(value: LetterSpacing, important: Boolean = false) {
27 | writeStyleProperty("letter-spacing", value, important)
28 | }
29 |
30 | fun InlineStyleContext.letterSpacing(value: Dimension, important: Boolean = false) {
31 | writeStyleProperty("letter-spacing", value, important)
32 | }
33 |
34 | fun InlineStyleContext.letterSpacing(value: LetterSpacing, important: Boolean = false) {
35 | writeStyleProperty("letter-spacing", value, important)
36 | }
37 |
38 | enum class LetterSpacing(
39 | val value: String
40 | ) {
41 | NORMAL("normal"),
42 |
43 | INITIAL("initial"),
44 |
45 | INHERIT("inherit");
46 |
47 | override fun toString() = value
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/ListStylePositionStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.listStylePosition(value: ListStylePosition, important: Boolean = false) {
15 | writeStyleProperty("list-style-position", value, important)
16 | }
17 |
18 | fun StyleContext.listStylePosition(value: ListStylePosition, important: Boolean = false) {
19 | writeStyleProperty("list-style-position", value, important)
20 | }
21 |
22 | fun InlineStyleContext.listStylePosition(value: ListStylePosition, important: Boolean = false) {
23 | writeStyleProperty("list-style-position", value, important)
24 | }
25 |
26 | enum class ListStylePosition(
27 | val value: String
28 | ) {
29 | INSIDE("inside"),
30 |
31 | OUTSIDE("outside"),
32 |
33 | INITIAL("initial"),
34 |
35 | INHERIT("inherit");
36 |
37 | override fun toString() = value
38 | }
39 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/MarginBottomStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.marginBottom(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("margin-bottom", value, important)
15 | }
16 |
17 | fun BaseStyleContext.marginBottom(value: CssValue, important: Boolean = false) {
18 | writeStyleProperty("margin-bottom", value, important)
19 | }
20 |
21 | fun StyleContext.marginBottom(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("margin-bottom", value, important)
23 | }
24 |
25 | fun StyleContext.marginBottom(value: CssValue, important: Boolean = false) {
26 | writeStyleProperty("margin-bottom", value, important)
27 | }
28 |
29 | fun InlineStyleContext.marginBottom(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("margin-bottom", value, important)
31 | }
32 |
33 | fun InlineStyleContext.marginBottom(value: CssValue, important: Boolean = false) {
34 | writeStyleProperty("margin-bottom", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/MarginLeftStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.marginLeft(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("margin-left", value, important)
15 | }
16 |
17 | fun BaseStyleContext.marginLeft(value: CssValue, important: Boolean = false) {
18 | writeStyleProperty("margin-left", value, important)
19 | }
20 |
21 | fun StyleContext.marginLeft(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("margin-left", value, important)
23 | }
24 |
25 | fun StyleContext.marginLeft(value: CssValue, important: Boolean = false) {
26 | writeStyleProperty("margin-left", value, important)
27 | }
28 |
29 | fun InlineStyleContext.marginLeft(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("margin-left", value, important)
31 | }
32 |
33 | fun InlineStyleContext.marginLeft(value: CssValue, important: Boolean = false) {
34 | writeStyleProperty("margin-left", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/MarginRightStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.marginRight(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("margin-right", value, important)
15 | }
16 |
17 | fun BaseStyleContext.marginRight(value: CssValue, important: Boolean = false) {
18 | writeStyleProperty("margin-right", value, important)
19 | }
20 |
21 | fun StyleContext.marginRight(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("margin-right", value, important)
23 | }
24 |
25 | fun StyleContext.marginRight(value: CssValue, important: Boolean = false) {
26 | writeStyleProperty("margin-right", value, important)
27 | }
28 |
29 | fun InlineStyleContext.marginRight(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("margin-right", value, important)
31 | }
32 |
33 | fun InlineStyleContext.marginRight(value: CssValue, important: Boolean = false) {
34 | writeStyleProperty("margin-right", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/MarginTopStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.marginTop(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("margin-top", value, important)
15 | }
16 |
17 | fun BaseStyleContext.marginTop(value: CssValue, important: Boolean = false) {
18 | writeStyleProperty("margin-top", value, important)
19 | }
20 |
21 | fun StyleContext.marginTop(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("margin-top", value, important)
23 | }
24 |
25 | fun StyleContext.marginTop(value: CssValue, important: Boolean = false) {
26 | writeStyleProperty("margin-top", value, important)
27 | }
28 |
29 | fun InlineStyleContext.marginTop(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("margin-top", value, important)
31 | }
32 |
33 | fun InlineStyleContext.marginTop(value: CssValue, important: Boolean = false) {
34 | writeStyleProperty("margin-top", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/MaxHeightStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.maxHeight(value: Dimension, important: Boolean = false) {
15 | writeStyleProperty("max-height", value, important)
16 | }
17 |
18 | fun BaseStyleContext.maxHeight(value: MaxHeight, important: Boolean = false) {
19 | writeStyleProperty("max-height", value, important)
20 | }
21 |
22 | fun StyleContext.maxHeight(value: Dimension, important: Boolean = false) {
23 | writeStyleProperty("max-height", value, important)
24 | }
25 |
26 | fun StyleContext.maxHeight(value: MaxHeight, important: Boolean = false) {
27 | writeStyleProperty("max-height", value, important)
28 | }
29 |
30 | fun InlineStyleContext.maxHeight(value: Dimension, important: Boolean = false) {
31 | writeStyleProperty("max-height", value, important)
32 | }
33 |
34 | fun InlineStyleContext.maxHeight(value: MaxHeight, important: Boolean = false) {
35 | writeStyleProperty("max-height", value, important)
36 | }
37 |
38 | enum class MaxHeight(
39 | val value: String
40 | ) {
41 | NONE("none"),
42 |
43 | INITIAL("initial"),
44 |
45 | INHERIT("inherit");
46 |
47 | override fun toString() = value
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/MaxWidthStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.maxWidth(value: Dimension, important: Boolean = false) {
15 | writeStyleProperty("max-width", value, important)
16 | }
17 |
18 | fun BaseStyleContext.maxWidth(value: MaxWidth, important: Boolean = false) {
19 | writeStyleProperty("max-width", value, important)
20 | }
21 |
22 | fun StyleContext.maxWidth(value: Dimension, important: Boolean = false) {
23 | writeStyleProperty("max-width", value, important)
24 | }
25 |
26 | fun StyleContext.maxWidth(value: MaxWidth, important: Boolean = false) {
27 | writeStyleProperty("max-width", value, important)
28 | }
29 |
30 | fun InlineStyleContext.maxWidth(value: Dimension, important: Boolean = false) {
31 | writeStyleProperty("max-width", value, important)
32 | }
33 |
34 | fun InlineStyleContext.maxWidth(value: MaxWidth, important: Boolean = false) {
35 | writeStyleProperty("max-width", value, important)
36 | }
37 |
38 | enum class MaxWidth(
39 | val value: String
40 | ) {
41 | NONE("none"),
42 |
43 | INITIAL("initial"),
44 |
45 | INHERIT("inherit");
46 |
47 | override fun toString() = value
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/MinHeightStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.minHeight(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("min-height", value, important)
15 | }
16 |
17 | fun BaseStyleContext.minHeight(value: CssValue, important: Boolean = false) {
18 | writeStyleProperty("min-height", value, important)
19 | }
20 |
21 | fun StyleContext.minHeight(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("min-height", value, important)
23 | }
24 |
25 | fun StyleContext.minHeight(value: CssValue, important: Boolean = false) {
26 | writeStyleProperty("min-height", value, important)
27 | }
28 |
29 | fun InlineStyleContext.minHeight(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("min-height", value, important)
31 | }
32 |
33 | fun InlineStyleContext.minHeight(value: CssValue, important: Boolean = false) {
34 | writeStyleProperty("min-height", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/MinWidthStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.minWidth(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("min-width", value, important)
15 | }
16 |
17 | fun BaseStyleContext.minWidth(value: CssValue, important: Boolean = false) {
18 | writeStyleProperty("min-width", value, important)
19 | }
20 |
21 | fun StyleContext.minWidth(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("min-width", value, important)
23 | }
24 |
25 | fun StyleContext.minWidth(value: CssValue, important: Boolean = false) {
26 | writeStyleProperty("min-width", value, important)
27 | }
28 |
29 | fun InlineStyleContext.minWidth(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("min-width", value, important)
31 | }
32 |
33 | fun InlineStyleContext.minWidth(value: CssValue, important: Boolean = false) {
34 | writeStyleProperty("min-width", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/OutlineOffsetStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.outlineOffset(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("outline-offset", value, important)
15 | }
16 |
17 | fun BaseStyleContext.outlineOffset(value: CssValue, important: Boolean = false) {
18 | writeStyleProperty("outline-offset", value, important)
19 | }
20 |
21 | fun StyleContext.outlineOffset(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("outline-offset", value, important)
23 | }
24 |
25 | fun StyleContext.outlineOffset(value: CssValue, important: Boolean = false) {
26 | writeStyleProperty("outline-offset", value, important)
27 | }
28 |
29 | fun InlineStyleContext.outlineOffset(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("outline-offset", value, important)
31 | }
32 |
33 | fun InlineStyleContext.outlineOffset(value: CssValue, important: Boolean = false) {
34 | writeStyleProperty("outline-offset", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/OutlineStyleStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.outlineStyle(value: OutlineStyle, important: Boolean = false) {
15 | writeStyleProperty("outline-style", value, important)
16 | }
17 |
18 | fun StyleContext.outlineStyle(value: OutlineStyle, important: Boolean = false) {
19 | writeStyleProperty("outline-style", value, important)
20 | }
21 |
22 | fun InlineStyleContext.outlineStyle(value: OutlineStyle, important: Boolean = false) {
23 | writeStyleProperty("outline-style", value, important)
24 | }
25 |
26 | enum class OutlineStyle(
27 | val value: String
28 | ) {
29 | NONE("none"),
30 |
31 | HIDDEN("hidden"),
32 |
33 | DOTTED("dotted"),
34 |
35 | DASHED("dashed"),
36 |
37 | SOLID("solid"),
38 |
39 | DOUBLE("double"),
40 |
41 | GROOVE("groove"),
42 |
43 | RIDGE("ridge"),
44 |
45 | INSET("inset"),
46 |
47 | OUTSET("outset"),
48 |
49 | INITIAL("initial"),
50 |
51 | INHERIT("inherit");
52 |
53 | override fun toString() = value
54 | }
55 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/OutlineWidthStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.outlineWidth(value: Dimension, important: Boolean = false) {
15 | writeStyleProperty("outline-width", value, important)
16 | }
17 |
18 | fun BaseStyleContext.outlineWidth(value: OutlineWidth, important: Boolean = false) {
19 | writeStyleProperty("outline-width", value, important)
20 | }
21 |
22 | fun StyleContext.outlineWidth(value: Dimension, important: Boolean = false) {
23 | writeStyleProperty("outline-width", value, important)
24 | }
25 |
26 | fun StyleContext.outlineWidth(value: OutlineWidth, important: Boolean = false) {
27 | writeStyleProperty("outline-width", value, important)
28 | }
29 |
30 | fun InlineStyleContext.outlineWidth(value: Dimension, important: Boolean = false) {
31 | writeStyleProperty("outline-width", value, important)
32 | }
33 |
34 | fun InlineStyleContext.outlineWidth(value: OutlineWidth, important: Boolean = false) {
35 | writeStyleProperty("outline-width", value, important)
36 | }
37 |
38 | enum class OutlineWidth(
39 | val value: String
40 | ) {
41 | MEDIUM("medium"),
42 |
43 | THIN("thin"),
44 |
45 | THICK("thick"),
46 |
47 | INITIAL("initial"),
48 |
49 | INHERIT("inherit");
50 |
51 | override fun toString() = value
52 | }
53 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/OverflowStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.overflow(value: Dimension, important: Boolean = false) {
15 | writeStyleProperty("overflow", value, important)
16 | }
17 |
18 | fun BaseStyleContext.overflow(value: Overflow, important: Boolean = false) {
19 | writeStyleProperty("overflow", value, important)
20 | }
21 |
22 | fun StyleContext.overflow(value: Dimension, important: Boolean = false) {
23 | writeStyleProperty("overflow", value, important)
24 | }
25 |
26 | fun StyleContext.overflow(value: Overflow, important: Boolean = false) {
27 | writeStyleProperty("overflow", value, important)
28 | }
29 |
30 | fun InlineStyleContext.overflow(value: Dimension, important: Boolean = false) {
31 | writeStyleProperty("overflow", value, important)
32 | }
33 |
34 | fun InlineStyleContext.overflow(value: Overflow, important: Boolean = false) {
35 | writeStyleProperty("overflow", value, important)
36 | }
37 |
38 | enum class Overflow(
39 | val value: String
40 | ) {
41 | VISIBLE("visible"),
42 |
43 | HIDDEN("hidden"),
44 |
45 | SCROLL("scroll"),
46 |
47 | AUTO("auto"),
48 |
49 | INITIAL("initial"),
50 |
51 | INHERIT("inherit");
52 |
53 | override fun toString() = value
54 | }
55 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/OverflowXStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.overflowX(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("overflow-x", value, important)
15 | }
16 |
17 | fun BaseStyleContext.overflowX(value: Overflow, important: Boolean = false) {
18 | writeStyleProperty("overflow-x", value, important)
19 | }
20 |
21 | fun StyleContext.overflowX(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("overflow-x", value, important)
23 | }
24 |
25 | fun StyleContext.overflowX(value: Overflow, important: Boolean = false) {
26 | writeStyleProperty("overflow-x", value, important)
27 | }
28 |
29 | fun InlineStyleContext.overflowX(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("overflow-x", value, important)
31 | }
32 |
33 | fun InlineStyleContext.overflowX(value: Overflow, important: Boolean = false) {
34 | writeStyleProperty("overflow-x", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/OverflowYStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.overflowY(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("overflow-y", value, important)
15 | }
16 |
17 | fun BaseStyleContext.overflowY(value: Overflow, important: Boolean = false) {
18 | writeStyleProperty("overflow-y", value, important)
19 | }
20 |
21 | fun StyleContext.overflowY(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("overflow-y", value, important)
23 | }
24 |
25 | fun StyleContext.overflowY(value: Overflow, important: Boolean = false) {
26 | writeStyleProperty("overflow-y", value, important)
27 | }
28 |
29 | fun InlineStyleContext.overflowY(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("overflow-y", value, important)
31 | }
32 |
33 | fun InlineStyleContext.overflowY(value: Overflow, important: Boolean = false) {
34 | writeStyleProperty("overflow-y", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/PaddingBottomStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.paddingBottom(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("padding-bottom", value, important)
15 | }
16 |
17 | fun BaseStyleContext.paddingBottom(value: CssValue, important: Boolean = false) {
18 | writeStyleProperty("padding-bottom", value, important)
19 | }
20 |
21 | fun StyleContext.paddingBottom(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("padding-bottom", value, important)
23 | }
24 |
25 | fun StyleContext.paddingBottom(value: CssValue, important: Boolean = false) {
26 | writeStyleProperty("padding-bottom", value, important)
27 | }
28 |
29 | fun InlineStyleContext.paddingBottom(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("padding-bottom", value, important)
31 | }
32 |
33 | fun InlineStyleContext.paddingBottom(value: CssValue, important: Boolean = false) {
34 | writeStyleProperty("padding-bottom", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/PaddingLeftStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.paddingLeft(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("padding-left", value, important)
15 | }
16 |
17 | fun BaseStyleContext.paddingLeft(value: CssValue, important: Boolean = false) {
18 | writeStyleProperty("padding-left", value, important)
19 | }
20 |
21 | fun StyleContext.paddingLeft(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("padding-left", value, important)
23 | }
24 |
25 | fun StyleContext.paddingLeft(value: CssValue, important: Boolean = false) {
26 | writeStyleProperty("padding-left", value, important)
27 | }
28 |
29 | fun InlineStyleContext.paddingLeft(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("padding-left", value, important)
31 | }
32 |
33 | fun InlineStyleContext.paddingLeft(value: CssValue, important: Boolean = false) {
34 | writeStyleProperty("padding-left", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/PaddingRightStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.paddingRight(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("padding-right", value, important)
15 | }
16 |
17 | fun BaseStyleContext.paddingRight(value: CssValue, important: Boolean = false) {
18 | writeStyleProperty("padding-right", value, important)
19 | }
20 |
21 | fun StyleContext.paddingRight(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("padding-right", value, important)
23 | }
24 |
25 | fun StyleContext.paddingRight(value: CssValue, important: Boolean = false) {
26 | writeStyleProperty("padding-right", value, important)
27 | }
28 |
29 | fun InlineStyleContext.paddingRight(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("padding-right", value, important)
31 | }
32 |
33 | fun InlineStyleContext.paddingRight(value: CssValue, important: Boolean = false) {
34 | writeStyleProperty("padding-right", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/PaddingTopStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Suppress
12 |
13 | fun BaseStyleContext.paddingTop(value: Dimension, important: Boolean = false) {
14 | writeStyleProperty("padding-top", value, important)
15 | }
16 |
17 | fun BaseStyleContext.paddingTop(value: CssValue, important: Boolean = false) {
18 | writeStyleProperty("padding-top", value, important)
19 | }
20 |
21 | fun StyleContext.paddingTop(value: Dimension, important: Boolean = false) {
22 | writeStyleProperty("padding-top", value, important)
23 | }
24 |
25 | fun StyleContext.paddingTop(value: CssValue, important: Boolean = false) {
26 | writeStyleProperty("padding-top", value, important)
27 | }
28 |
29 | fun InlineStyleContext.paddingTop(value: Dimension, important: Boolean = false) {
30 | writeStyleProperty("padding-top", value, important)
31 | }
32 |
33 | fun InlineStyleContext.paddingTop(value: CssValue, important: Boolean = false) {
34 | writeStyleProperty("padding-top", value, important)
35 | }
36 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/PositionStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.position(value: Position, important: Boolean = false) {
15 | writeStyleProperty("position", value, important)
16 | }
17 |
18 | fun StyleContext.position(value: Position, important: Boolean = false) {
19 | writeStyleProperty("position", value, important)
20 | }
21 |
22 | fun InlineStyleContext.position(value: Position, important: Boolean = false) {
23 | writeStyleProperty("position", value, important)
24 | }
25 |
26 | enum class Position(
27 | val value: String
28 | ) {
29 | STATIC("static"),
30 |
31 | RELATIVE("relative"),
32 |
33 | FIXED("fixed"),
34 |
35 | ABSOLUTE("absolute"),
36 |
37 | STICKY("sticky"),
38 |
39 | INITIAL("initial"),
40 |
41 | INHERIT("inherit");
42 |
43 | override fun toString() = value
44 | }
45 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/RightStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.right(value: Dimension, important: Boolean = false) {
15 | writeStyleProperty("right", value, important)
16 | }
17 |
18 | fun BaseStyleContext.right(value: Right, important: Boolean = false) {
19 | writeStyleProperty("right", value, important)
20 | }
21 |
22 | fun StyleContext.right(value: Dimension, important: Boolean = false) {
23 | writeStyleProperty("right", value, important)
24 | }
25 |
26 | fun StyleContext.right(value: Right, important: Boolean = false) {
27 | writeStyleProperty("right", value, important)
28 | }
29 |
30 | fun InlineStyleContext.right(value: Dimension, important: Boolean = false) {
31 | writeStyleProperty("right", value, important)
32 | }
33 |
34 | fun InlineStyleContext.right(value: Right, important: Boolean = false) {
35 | writeStyleProperty("right", value, important)
36 | }
37 |
38 | enum class Right(
39 | val value: String
40 | ) {
41 | AUTO("auto"),
42 |
43 | INITIAL("initial"),
44 |
45 | INHERIT("inherit");
46 |
47 | override fun toString() = value
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/TextAlignStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.textAlign(value: TextAlign, important: Boolean = false) {
15 | writeStyleProperty("text-align", value, important)
16 | }
17 |
18 | fun StyleContext.textAlign(value: TextAlign, important: Boolean = false) {
19 | writeStyleProperty("text-align", value, important)
20 | }
21 |
22 | fun InlineStyleContext.textAlign(value: TextAlign, important: Boolean = false) {
23 | writeStyleProperty("text-align", value, important)
24 | }
25 |
26 | enum class TextAlign(
27 | val value: String
28 | ) {
29 | LEFT("left"),
30 |
31 | RIGHT("right"),
32 |
33 | CENTER("center"),
34 |
35 | JUSTIFY("justify"),
36 |
37 | INITIAL("initial"),
38 |
39 | INHERIT("inherit");
40 |
41 | override fun toString() = value
42 | }
43 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/TextDecorationStyleStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.textDecorationStyle(value: TextDecorationStyle, important: Boolean = false) {
15 | writeStyleProperty("text-decoration-style", value, important)
16 | }
17 |
18 | fun StyleContext.textDecorationStyle(value: TextDecorationStyle, important: Boolean = false) {
19 | writeStyleProperty("text-decoration-style", value, important)
20 | }
21 |
22 | fun InlineStyleContext.textDecorationStyle(value: TextDecorationStyle, important: Boolean = false) {
23 | writeStyleProperty("text-decoration-style", value, important)
24 | }
25 |
26 | enum class TextDecorationStyle(
27 | val value: String
28 | ) {
29 | SOLID("solid"),
30 |
31 | DOUBLE("double"),
32 |
33 | DOTTED("dotted"),
34 |
35 | DASHED("dashed"),
36 |
37 | WAVY("wavy"),
38 |
39 | INITIAL("initial"),
40 |
41 | INHERIT("inherit");
42 |
43 | override fun toString() = value
44 | }
45 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/TextTransformStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.textTransform(value: TextTransform, important: Boolean = false) {
15 | writeStyleProperty("text-transform", value, important)
16 | }
17 |
18 | fun StyleContext.textTransform(value: TextTransform, important: Boolean = false) {
19 | writeStyleProperty("text-transform", value, important)
20 | }
21 |
22 | fun InlineStyleContext.textTransform(value: TextTransform, important: Boolean = false) {
23 | writeStyleProperty("text-transform", value, important)
24 | }
25 |
26 | enum class TextTransform(
27 | val value: String
28 | ) {
29 | NONE("none"),
30 |
31 | CAPITALIZE("capitalize"),
32 |
33 | UPPERCASE("uppercase"),
34 |
35 | LOWERCASE("lowercase"),
36 |
37 | INITIAL("initial"),
38 |
39 | INHERIT("inherit");
40 |
41 | override fun toString() = value
42 | }
43 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/TopStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.top(value: Dimension, important: Boolean = false) {
15 | writeStyleProperty("top", value, important)
16 | }
17 |
18 | fun BaseStyleContext.top(value: Top, important: Boolean = false) {
19 | writeStyleProperty("top", value, important)
20 | }
21 |
22 | fun StyleContext.top(value: Dimension, important: Boolean = false) {
23 | writeStyleProperty("top", value, important)
24 | }
25 |
26 | fun StyleContext.top(value: Top, important: Boolean = false) {
27 | writeStyleProperty("top", value, important)
28 | }
29 |
30 | fun InlineStyleContext.top(value: Dimension, important: Boolean = false) {
31 | writeStyleProperty("top", value, important)
32 | }
33 |
34 | fun InlineStyleContext.top(value: Top, important: Boolean = false) {
35 | writeStyleProperty("top", value, important)
36 | }
37 |
38 | enum class Top(
39 | val value: String
40 | ) {
41 | AUTO("auto"),
42 |
43 | INITIAL("initial"),
44 |
45 | INHERIT("inherit");
46 |
47 | override fun toString() = value
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/TransitionTimingFunctionStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.transitionTimingFunction(value: TransitionTimingFunction, important: Boolean =
15 | false) {
16 | writeStyleProperty("transition-timing-function", value, important)
17 | }
18 |
19 | fun StyleContext.transitionTimingFunction(value: TransitionTimingFunction, important: Boolean =
20 | false) {
21 | writeStyleProperty("transition-timing-function", value, important)
22 | }
23 |
24 | fun InlineStyleContext.transitionTimingFunction(value: TransitionTimingFunction, important: Boolean
25 | = false) {
26 | writeStyleProperty("transition-timing-function", value, important)
27 | }
28 |
29 | enum class TransitionTimingFunction(
30 | val value: String
31 | ) {
32 | LINEAR("linear"),
33 |
34 | EASE("ease"),
35 |
36 | EASE_IN("ease-in"),
37 |
38 | EASE_OUT("ease-out"),
39 |
40 | EASE_IN_OUT("ease-in-out"),
41 |
42 | INITIAL("initial"),
43 |
44 | INHERIT("inherit");
45 |
46 | override fun toString() = value
47 | }
48 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/VisibilityStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.visibility(value: Visibility, important: Boolean = false) {
15 | writeStyleProperty("visibility", value, important)
16 | }
17 |
18 | fun StyleContext.visibility(value: Visibility, important: Boolean = false) {
19 | writeStyleProperty("visibility", value, important)
20 | }
21 |
22 | fun InlineStyleContext.visibility(value: Visibility, important: Boolean = false) {
23 | writeStyleProperty("visibility", value, important)
24 | }
25 |
26 | enum class Visibility(
27 | val value: String
28 | ) {
29 | VISIBLE("visible"),
30 |
31 | HIDDEN("hidden"),
32 |
33 | COLLAPSE("collapse"),
34 |
35 | INITIAL("initial"),
36 |
37 | INHERIT("inherit");
38 |
39 | override fun toString() = value
40 | }
41 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/WidthStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.String
12 | import kotlin.Suppress
13 |
14 | fun BaseStyleContext.width(value: Dimension, important: Boolean = false) {
15 | writeStyleProperty("width", value, important)
16 | }
17 |
18 | fun BaseStyleContext.width(value: Width, important: Boolean = false) {
19 | writeStyleProperty("width", value, important)
20 | }
21 |
22 | fun StyleContext.width(value: Dimension, important: Boolean = false) {
23 | writeStyleProperty("width", value, important)
24 | }
25 |
26 | fun StyleContext.width(value: Width, important: Boolean = false) {
27 | writeStyleProperty("width", value, important)
28 | }
29 |
30 | fun InlineStyleContext.width(value: Dimension, important: Boolean = false) {
31 | writeStyleProperty("width", value, important)
32 | }
33 |
34 | fun InlineStyleContext.width(value: Width, important: Boolean = false) {
35 | writeStyleProperty("width", value, important)
36 | }
37 |
38 | enum class Width(
39 | val value: String
40 | ) {
41 | AUTO("auto"),
42 |
43 | INITIAL("initial"),
44 |
45 | INHERIT("inherit");
46 |
47 | override fun toString() = value
48 | }
49 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/genMain/kotlin/dev/scottpierce/html/writer/style/ZIndexStyles.kt:
--------------------------------------------------------------------------------
1 | // This file was generated using the `kotlin-html-generator` module. Instead of modifying it, modify the
2 | // `html-builder-generator` and run it again.
3 | @file:Suppress("unused")
4 |
5 | package dev.scottpierce.html.writer.style
6 |
7 | import dev.scottpierce.html.writer.BaseStyleContext
8 | import dev.scottpierce.html.writer.InlineStyleContext
9 | import dev.scottpierce.html.writer.StyleContext
10 | import kotlin.Boolean
11 | import kotlin.Int
12 | import kotlin.String
13 | import kotlin.Suppress
14 |
15 | fun BaseStyleContext.zIndex(value: Int, important: Boolean = false) {
16 | writeStyleProperty("z-index", value, important)
17 | }
18 |
19 | fun BaseStyleContext.zIndex(value: ZIndex, important: Boolean = false) {
20 | writeStyleProperty("z-index", value, important)
21 | }
22 |
23 | fun StyleContext.zIndex(value: Int, important: Boolean = false) {
24 | writeStyleProperty("z-index", value, important)
25 | }
26 |
27 | fun StyleContext.zIndex(value: ZIndex, important: Boolean = false) {
28 | writeStyleProperty("z-index", value, important)
29 | }
30 |
31 | fun InlineStyleContext.zIndex(value: Int, important: Boolean = false) {
32 | writeStyleProperty("z-index", value, important)
33 | }
34 |
35 | fun InlineStyleContext.zIndex(value: ZIndex, important: Boolean = false) {
36 | writeStyleProperty("z-index", value, important)
37 | }
38 |
39 | enum class ZIndex(
40 | val value: String
41 | ) {
42 | AUTO("auto"),
43 |
44 | INITIAL("initial"),
45 |
46 | INHERIT("inherit");
47 |
48 | override fun toString() = value
49 | }
50 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/jsMain/kotlin/dev/scottpierce/html/writer/PlatformWriter.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer
2 |
3 | internal actual object PlatformWriter {
4 | actual val lineSeparator: String = "\n"
5 | }
6 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/jvmMain/kotlin/dev/scottpierce/html/FileCache.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html
2 |
3 | import java.io.File
4 | import java.io.FileNotFoundException
5 | import java.util.LinkedHashMap
6 | import java.util.concurrent.ConcurrentHashMap
7 |
8 | object FileCache {
9 | var devMode = false
10 |
11 | private val cache = ConcurrentHashMap>(100)
12 |
13 | fun get(file: File): List {
14 | var fileText = if (devMode) null else synchronized(cache) { cache[file] }
15 |
16 | if (fileText == null) {
17 | try {
18 | fileText = file.bufferedReader().readLines()
19 | cache[file] = fileText
20 | } catch (e: FileNotFoundException) {
21 | throw FileNotFoundException(
22 | e.message?.replace(file.toString(), file.absolutePath)
23 | ?: "File Not found: ${file.absolutePath}"
24 | )
25 | }
26 | }
27 |
28 | return fileText
29 | }
30 | }
31 |
32 | class LruCache(
33 | private val maxSize: Int
34 | ) : LinkedHashMap(maxSize, 0.75f, true) {
35 | override fun removeEldestEntry(eldest: MutableMap.MutableEntry?): Boolean {
36 | return size > maxSize
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/jvmMain/kotlin/dev/scottpierce/html/writer/PlatformWriter.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer
2 |
3 | internal actual object PlatformWriter {
4 | actual val lineSeparator: String
5 | get() = System.lineSeparator()
6 | }
7 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/jvmMain/kotlin/dev/scottpierce/html/writer/element/ContextUtil.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.element
2 |
3 | import dev.scottpierce.html.FileCache
4 | import dev.scottpierce.html.writer.HtmlContext
5 | import dev.scottpierce.html.writer.HtmlOutput
6 | import dev.scottpierce.html.writer.HtmlWriterContext
7 | import dev.scottpierce.html.writer.PlatformWriter
8 | import dev.scottpierce.html.writer.writer
9 | import java.io.File
10 |
11 | fun HtmlOutput.inlineFile(
12 | file: File
13 | ) {
14 | writer {
15 | HtmlContext(this).inlineFile(file)
16 | }
17 | }
18 |
19 | fun HtmlWriterContext.inlineFile(file: File) {
20 | val fileLines = FileCache.get(file)
21 |
22 | val writerUsesLineSeparator = writer.options.newLine == System.lineSeparator()
23 | val lastIndex = fileLines.lastIndex
24 |
25 | writer.newLine()
26 |
27 | for (i in fileLines.indices) {
28 | val line = fileLines[i]
29 |
30 | writer.write(line)
31 |
32 | if (i != lastIndex) {
33 | if (writerUsesLineSeparator) {
34 | writer.newLine()
35 | } else {
36 | writer.write(PlatformWriter.lineSeparator)
37 | }
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/jvmMain/kotlin/dev/scottpierce/html/writer/element/InlineStyleSheet.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.element
2 |
3 | import dev.scottpierce.html.writer.HtmlContext
4 | import dev.scottpierce.html.writer.HtmlOutput
5 | import dev.scottpierce.html.writer.HtmlWriterContext
6 | import dev.scottpierce.html.writer.writer
7 | import java.io.File
8 |
9 | fun HtmlOutput.inlineStyleSheet(file: File) {
10 | writer {
11 | HtmlContext(this).inlineStyleSheet(file)
12 | }
13 | }
14 |
15 | fun HtmlWriterContext.inlineStyleSheet(file: File) {
16 | writer.apply {
17 | writeTag("style")
18 | write('>')
19 | indent()
20 | inlineFile(file)
21 | writeNormalElementEnd("style")
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/jvmTest/kotlin/dev/scottpierce/html/writer/element/InlineFileTest.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer.element
2 |
3 | import org.junit.Test
4 | import java.io.File
5 |
6 | class InlineFileTest {
7 | @Test
8 | fun basic() {
9 | createWriter().apply {
10 | html {
11 | head {
12 | script {
13 | inlineFile(File("../test-files/example.js"))
14 | }
15 | }
16 | }
17 | } assertEquals {
18 | """
19 |
20 |
21 |
26 |
27 |
28 | """.trimIndent()
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/linuxX64Main/kotlin/dev/scottpierce/html/writer/PlatformWriter.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer
2 |
3 | internal actual object PlatformWriter {
4 | actual val lineSeparator: String = "\n"
5 | }
6 |
--------------------------------------------------------------------------------
/kotlin-html-writer/src/macosX64Main/kotlin/dev/scottpierce/html/writer/PlatformWriter.kt:
--------------------------------------------------------------------------------
1 | package dev.scottpierce.html.writer
2 |
3 | internal actual object PlatformWriter {
4 | actual val lineSeparator: String = "\n"
5 | }
6 |
--------------------------------------------------------------------------------
/scripts/git-commit-if-changes.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Commits all changes to your current branch if there are uncommitted changes.
3 | # Uses the first parameter as the commit message
4 |
5 | COMMIT_MESSAGE=$1
6 |
7 | clean=$(git status | grep "nothing to commit")
8 |
9 | if [[ -z "$clean" ]]; then
10 | echo There are uncommitted changes. Commiting and pushing them with message: ${COMMIT_MESSAGE}
11 | git add -A
12 | git commit -m "$COMMIT_MESSAGE"
13 | git push
14 | else
15 | echo There are no uncommited changes.
16 | fi
17 |
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | rootProject.name = "kotlin-html"
2 |
3 | include(
4 | ":kotlin-html-writer",
5 | ":kotlin-html-ktor",
6 | ":kotlin-html-style-builder",
7 | ":kotlin-html-style-builder-phone",
8 | ":kotlin-html-style-builder-tablet",
9 | ":kotlin-html-style-builder-desktop",
10 | ":kotlin-html-generator",
11 | ":benchmark"
12 | )
13 |
--------------------------------------------------------------------------------
/test-files/example.js:
--------------------------------------------------------------------------------
1 | function myFunction(p1, p2) {
2 | return p1 * p2; // The function returns the product of p1 and p2
3 | }
4 |
--------------------------------------------------------------------------------