diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 00000000..87f5f4dc --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,7 @@ +coverage: + range: 50..80 + round: down + precision: 2 + +comment: + layout: diff, files \ No newline at end of file diff --git a/.github/componentbox.gif b/.github/componentbox.gif deleted file mode 100644 index 20d50a15..00000000 Binary files a/.github/componentbox.gif and /dev/null differ diff --git a/.github/scripts/checksum.sh b/.github/scripts/checksum.sh deleted file mode 100644 index 5ed46012..00000000 --- a/.github/scripts/checksum.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -RESULT_FILE=$1 - -if [[ -f ${RESULT_FILE} ]]; then - rm ${RESULT_FILE} -fi -touch ${RESULT_FILE} - -checksum_file() { - echo $(openssl md5 $1 | awk '{print $2}') -} - -FILES=() -while read -r -d ''; do - FILES+=("$REPLY") -done < <(find ../.. -type f \( -name "build.gradle*" -o -name "settings.gradle*" -o -name "gradle-wrapper.properties" \) -print0) - -# Loop through files and append MD5 to result file -for FILE in ${FILES[@]}; do - echo $(checksum_file ${FILE}) >> ${RESULT_FILE} -done -# Now sort the file so that it is idempotent. -sort ${RESULT_FILE} -o ${RESULT_FILE} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index f0045b93..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: CI - -on: - push: - branches: - - master - pull_request: - -env: - GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx2g -Dorg.gradle.daemon=false -Dkotlin.incremental=false" - -jobs: - build: - name: Build and Test - runs-on: 'ubuntu-latest' - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Gradle Wrapper Validation - uses: gradle/wrapper-validation-action@v1 - - - name: Make checksum.sh Executable - run: chmod +x .github/scripts/checksum.sh - - - name: Make gradlew Executable - run: chmod +x ./gradlew - - - name: Generate Cache Key - run: .github/scripts/checksum.sh checksum.txt - - - uses: actions/cache@v2 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('checksum.txt') }} - restore-keys: | - ${{ runner.os }}-gradle - - - name: Install JDK 11 - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: 11 - - publish: - name: Publish - runs-on: ubuntu-latest - if: github.repository == 'dropbox/componentbox' && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' - needs: [ build ] - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Install JDK 11 - uses: actions/setup-java@v2 - with: - distribution: 'zulu' - java-version: 11 - - - name: Upload Snapshot - run: ./gradlew :componentbox:publish --no-daemon --no-parallel - env: - ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }} - ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }} - ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }} - ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} - - - name: Retrieve Version - run: echo "VERSION_NAME=$(./gradlew -q printVersionName)" >> $GITHUB_ENV - - - name: Publish Release - run: ./gradlew closeAndReleaseRepository --no-daemon --no-parallel - if: success() && !endsWith(env.VERSION_NAME, '-SNAPSHOT') - env: - ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }} - ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }} \ No newline at end of file diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 48b1b6b1..00000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Coverage - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v2 - with: - java-version: '11' - distribution: 'adopt' - cache: gradle - - name: Permissions - run: chmod +x gradlew - - name: Verify coverage - run: ./gradlew koverVerify \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..0e61fd2c --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,38 @@ +name: Publish + +on: + push: + branches: [ master ] + +jobs: + Publish: + runs-on: ubuntu-latest + if: github.repository == 'dropbox/componentbox' && github.ref == 'refs/heads/master' + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up JDK env + uses: actions/setup-java@v2 + with: + distribution: zulu + java-version: 11 + + - name: Upload Artifacts + run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel + env: + ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }} + ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }} + ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }} + ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} + + - name: Retrieve version + run: | + echo "VERSION_NAME=$(cat gradle.properties | grep -w "VERSION_NAME" | cut -d'=' -f2)" >> $GITHUB_ENV + - name: Publish release + run: ./gradlew closeAndReleaseRepository --no-daemon --no-parallel + if: "!endsWith(env.VERSION_NAME, '-SNAPSHOT')" + env: + ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }} + ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }} \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000..93095890 --- /dev/null +++ b/build.gradle @@ -0,0 +1,57 @@ +buildscript { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:7.3.1' + classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10' + classpath 'org.jetbrains.kotlin:kotlin-serialization:1.7.10' + classpath 'com.vanniktech:gradle-maven-publish-plugin:0.22.0' + classpath 'org.jetbrains.kotlinx:kover:0.6.0' + classpath 'org.jetbrains.kotlinx:kotlinx-cli:0.3.4' + classpath 'com.rickclephas.kmp:kmp-nativecoroutines-gradle-plugin:0.12.6-new-mm' + classpath 'app.cash.zipline:zipline-gradle-plugin:0.9.4' + classpath 'com.squareup.anvil:gradle-plugin:2.4.2' + } +} + +plugins { + id 'org.jetbrains.kotlin.multiplatform' version '1.7.10' + id 'org.jetbrains.dokka' version '1.7.10' + id 'org.jetbrains.kotlinx.kover' version '0.6.0' +} +apply plugin: 'com.vanniktech.maven.publish.base' +apply plugin: 'com.android.library' + +allprojects { + version = project.property("VERSION_NAME") as String + + repositories { + google() + mavenCentral() + + maven { + url 'https://maven.pkg.jetbrains.space/public/p/compose/dev' + } + + maven { + url 'https://oss.sonatype.org/content/repositories/snapshots/' + } + } +} + +android { + compileSdkVersion 33 + defaultConfig { + minSdkVersion 24 + targetSdkVersion 33 + versionCode 1 + versionName '0.2.0-alpha01' + } +} + +kotlin { + android("android") +} diff --git a/build.gradle.kts b/build.gradle.kts deleted file mode 100644 index dba50fb2..00000000 --- a/build.gradle.kts +++ /dev/null @@ -1,117 +0,0 @@ -import com.vanniktech.maven.publish.MavenPublishBaseExtension -import com.vanniktech.maven.publish.SonatypeHost -import kotlinx.kover.tasks.KoverMergedHtmlReportTask -import kotlinx.kover.tasks.KoverMergedXmlReportTask - -plugins { - kotlin("jvm") version Version.baseKotlin - id("org.jetbrains.dokka") version Version.baseKotlin - id("org.jetbrains.kotlinx.kover") version "0.5.0" -} -@Suppress("JcenterRepositoryObsolete") buildscript { - repositories { - gradlePluginPortal() - google() - mavenCentral() - jcenter() - } - dependencies { - classpath("com.android.tools.build:gradle:7.0.4") - classpath(Deps.Kotlin.gradlePlugin) - classpath(Deps.Kotlin.serializationCore) - classpath("com.google.dagger:hilt-android-gradle-plugin:2.42") - classpath("com.vanniktech:gradle-maven-publish-plugin:0.18.0") - classpath("org.jetbrains.kotlinx:kover:0.5.0") - classpath("org.jetbrains.kotlinx:kotlinx-cli:0.3.4") - classpath("com.rickclephas.kmp:kmp-nativecoroutines-gradle-plugin:0.12.6-new-mm") - classpath("app.cash.zipline:zipline-gradle-plugin:0.9.1") - } -} - -apply(plugin = "com.vanniktech.maven.publish.base") - -allprojects { - version = project.property("VERSION_NAME") as String - - repositories { - google() - mavenCentral() - maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") - maven("https://oss.sonatype.org/content/repositories/snapshots/") - } - - - plugins.withId("com.vanniktech.maven.publish.base") { - configure { - publishToMavenCentral(SonatypeHost.S01) - signAllPublications() - pom { - description.set("A Kotlin multiplatform library for building dynamic server-driven UI") - name.set(project.name) - url.set("https://github.com/dropbox/componentbox/") - licenses { - license { - name.set("The Apache Software License, Version 2.0") - url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") - distribution.set("repo") - } - } - scm { - url.set("https://github.com/dropbox/componentbox/") - connection.set("scm:git:git://github.com/dropbox/componentbox.git") - developerConnection.set("scm:git:ssh://git@github.com/dropbox/componentbox.git") - } - developers { - developer { - id.set("dropbox") - name.set("Dropbox, Inc.") - } - } - } - } - } -} - -tasks.withType().configureEach { - isEnabled = true -} -tasks.withType().configureEach { - isEnabled = true -} - -tasks.register("printVersionName") { - doLast { - val VERSION_NAME: String by project - println(VERSION_NAME) - } -} - -val included = listOf( - "com.dropbox.componentbox.models.*" -) -val excluded = listOf( - "com.dropbox.componentbox.discovery.*", - "com.dropbox.componentbox.samples.*", - "com.dropbox.componentbox.desktop.*" -) - -tasks.koverMergedVerify { - includes = included - excludes = excluded - - rule { - // TODO(mramotar) 80% - name = "0% Coverage" - bound { - minValue = 0 - } - } -} - -tasks.koverMergedHtmlReport { - isEnabled = true - htmlReportDir.set(layout.buildDirectory.dir("generated/kover")) - - includes = included - excludes = excluded -} diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts deleted file mode 100644 index b22ed732..00000000 --- a/buildSrc/build.gradle.kts +++ /dev/null @@ -1,7 +0,0 @@ -plugins { - `kotlin-dsl` -} - -repositories { - mavenCentral() -} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/Deps.kt b/buildSrc/src/main/kotlin/Deps.kt deleted file mode 100644 index c65054e0..00000000 --- a/buildSrc/src/main/kotlin/Deps.kt +++ /dev/null @@ -1,84 +0,0 @@ -object Deps { - object Airbnb { - const val lottieCompose = "com.airbnb.android:lottie-compose:${Version.lottie}" - } - - object Android { - const val material = "com.google.android.material:material:${Version.material}" - } - - object AndroidX { - const val lifecycleRuntimeKtx = "androidx.lifecycle:lifecycle-runtime-ktx:${Version.lifecycleRuntimeKtx}" - const val lifecycleViewmodelKtx = "androidx.lifecycle:lifecycle-viewmodel-ktx:${Version.lifecycleViewmodelKtx}" - const val activityCompose = "androidx.activity:activity-compose:${Version.activityCompose}" - const val appCompat = "androidx.appcompat:appcompat:1.4.1" - const val coreKtx = "androidx.core:core-ktx:1.7.0" - } - - object Cash { - object Zipline { - const val zipline = "app.cash.zipline:zipline:${Version.zipline}" - const val ziplineSnapshot = "app.cash.zipline:zipline:${Version.ziplineSnapshot}" - const val ziplineLoader = "app.cash.zipline:zipline:${Version.zipline}" - const val pluginSnapshot = "app.cash.zipline:zipline-kotlin-plugin:${Version.ziplineSnapshot}" - const val plugin = "app.cash.zipline:zipline-kotlin-plugin:${Version.zipline}" - const val ziplineGradlePlugin = "app.cash.zipline:zipline-gradle-plugin:${Version.zipline}" - } - - const val okhttp = "com.squareup.okhttp3:okhttp:4.9.2" - - object SqlDelight { - const val gradlePlugin = "com.squareup.sqldelight:gradle-plugin:${Version.sqlDelight}" - const val driverAndroid = "com.squareup.sqldelight:android-driver:${Version.sqlDelight}" - const val driverNative = "com.squareup.sqldelight:native-driver:${Version.sqlDelight}" - const val driverSqlite = "com.squareup.sqldelight:sqlite-driver:${Version.sqlDelight}" - const val runtime = "com.squareup.sqldelight:runtime:${Version.sqlDelight}" - } - } - - object Compose { - const val compiler = "androidx.compose.compiler:compiler:${Version.composeCompiler}" - const val ui = "androidx.compose.ui:ui:${Version.composeUi}" - const val uiGraphics = "androidx.compose.ui:ui-graphics:${Version.composeUi}" - const val uiTooling = "androidx.compose.ui:ui-tooling:${Version.composeUi}" - const val foundationLayout = "androidx.compose.foundation:foundation-layout:${Version.composeUi}" - const val material = "androidx.compose.material:material:${Version.composeMaterial}" - const val navigation = "androidx.navigation:navigation-compose:${Version.navCompose}" - - const val coilCompose = "io.coil-kt:coil-compose:1.3.2" - const val accompanistNavigationAnimation = - "com.google.accompanist:accompanist-navigation-animation:${Version.accompanist}" - } - - object Dropbox { - const val store = "com.dropbox.mobile.store:store4:4.0.5" - } - - object Kotlin { - const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Version.baseKotlin}" - const val serializationCore = "org.jetbrains.kotlin:kotlin-serialization:${Version.baseKotlin}" - const val reflect = "org.jetbrains.kotlin:kotlin-reflect:${Version.baseKotlin}" - } - - object Kotlinx { - const val serializationCore = "org.jetbrains.kotlinx:kotlinx-serialization-core:${Version.kotlinxSerialization}" - const val serializationJson = "org.jetbrains.kotlinx:kotlinx-serialization-json:${Version.kotlinxSerialization}" - const val coroutinesAndroid = "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Version.kotlinxCoroutines}" - const val coroutinesCore = "org.jetbrains.kotlinx:kotlinx-coroutines-core:${Version.kotlinxCoroutines}" - const val coroutinesTest = "org.jetbrains.kotlinx:kotlinx-coroutines-test:${Version.kotlinxCoroutines}" - } - - - object Ktor { - const val clientCore = "io.ktor:ktor-client-core:${Version.ktor}" - const val clientSerialization = "io.ktor:ktor-client-serialization:${Version.ktor}" - const val clientContentNegotiation = "io.ktor:ktor-client-content-negotiation:${Version.ktor}" - const val serializationKotlinxJson = "io.ktor:ktor-serialization-kotlinx-json:${Version.ktor}" - const val clientLogging = "io.ktor:ktor-client-logging:${Version.ktor}" - const val clientIos = "io.ktor:ktor-client-ios:${Version.ktor}" - } - - object Mavericks { - const val mavericksCompose = "com.airbnb.android:mavericks-compose:${Version.mavericksCompose}" - } -} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/Version.kt b/buildSrc/src/main/kotlin/Version.kt deleted file mode 100644 index 534bfb6c..00000000 --- a/buildSrc/src/main/kotlin/Version.kt +++ /dev/null @@ -1,28 +0,0 @@ -object Version { - const val accompanist = "0.22.0-rc" - const val activityCompose = "1.4.0-beta01" - const val androidMinSdk = 24 - const val androidCompileSdk = 31 - const val androidTargetSdk = androidCompileSdk - const val baseKotlin = "1.7.10" - const val compose = "1.3.0-alpha03" - const val composeUi = "1.3.0-alpha03" - const val composeMaterial = "1.3.0-alpha03" - const val composeCompiler = "1.3.0" - const val composeMultiplatform = "1.2.0-alpha01-dev755" - const val kotlinCoroutines = "1.6.4" - const val kotlinxCoroutines = "1.6.4" - const val kotlinxSerialization = "1.4.0" - const val kotlinxHtmlJs = "0.7.3" - const val ktor = "2.1.0" - const val lifecycleKtx = "2.4.0-rc01" - const val lifecycleRuntimeKtx = lifecycleKtx - const val lifecycleViewmodelKtx = lifecycleKtx - const val lottie = "5.2.0" - const val material = "1.4.0" - const val mavericksCompose = "2.5.1" - const val navCompose = "2.4.0-rc01" - const val sqlDelight = "1.5.3" - const val zipline = "0.9.1" - const val ziplineSnapshot = "1.0.0-SNAPSHOT" -} \ No newline at end of file diff --git a/componentbox/build.gradle.kts b/componentbox/build.gradle.kts index 20807a44..5e43485a 100644 --- a/componentbox/build.gradle.kts +++ b/componentbox/build.gradle.kts @@ -1,30 +1,16 @@ -import com.vanniktech.maven.publish.JavadocJar.Dokka -import com.vanniktech.maven.publish.KotlinMultiplatform -import com.vanniktech.maven.publish.MavenPublishBaseExtension +@file:Suppress("UnstableApiUsage") + import org.jetbrains.dokka.gradle.DokkaTask -import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework plugins { kotlin("multiplatform") kotlin("plugin.serialization") id("com.android.library") - id("org.jetbrains.compose") version Version.composeMultiplatform id("com.vanniktech.maven.publish.base") id("org.jetbrains.dokka") - id("org.jetbrains.kotlin.native.cocoapods") - id("com.rickclephas.kmp.nativecoroutines") - id("com.chromaticnoise.multiplatform-swiftpackage") version "2.0.3" - id("kotlin-android-extensions") - id("app.cash.zipline") -} - -multiplatformSwiftPackage { - packageName("ComponentBox") - swiftToolsVersion("5.3") - targetPlatforms { - iOS { v("14") } - } - outputDirectory(File(projectDir, "package")) + id("co.touchlab.faktory.kmmbridge") + `maven-publish` + kotlin("native.cocoapods") } group = "com.dropbox.componentbox" @@ -36,118 +22,49 @@ kotlin { browser() binaries.executable() } - - val xcf = XCFramework("componentbox") - listOf(iosX64(), iosArm64(), iosSimulatorArm64()).forEach { - it.binaries.framework { - baseName = "componentbox" - xcf.add(this) - } - } + ios() cocoapods { summary = "ComponentBox" homepage = "https://github.com/dropbox/componentbox" + ios.deploymentTarget = "13" + version = "0.2.0-alpha01" } sourceSets { val commonMain by getting { dependencies { - - with(Deps.Kotlinx) { - api(serializationCore) - api(serializationJson) - } - - with(Deps.Cash.Zipline) { - implementation(zipline) - } - - with(Deps.Ktor){ - implementation(clientCore) - implementation(clientSerialization) - implementation(clientContentNegotiation) - implementation(serializationKotlinxJson) - implementation(clientLogging) - } + api(libs.kotlinx.serialization.core) + api(libs.kotlinx.serialization.json) } } val jvmMain by getting { - dependencies { - api(compose.runtime) - api(compose.material) - api(compose.ui) - api(compose.foundation) - implementation(Deps.Compose.coilCompose) - } } val androidMain by getting { dependencies { - - with(Deps.AndroidX) { - api(appCompat) - api(coreKtx) - } - - api(compose.runtime) - api(compose.material) - api(compose.ui) - api(compose.foundation) - implementation(Deps.Compose.coilCompose) - - with(Deps.Mavericks) { - implementation(mavericksCompose) - } - - with(Deps.Cash) { - implementation(okhttp) - } - - implementation(Deps.Airbnb.lottieCompose) - } } val jsMain by getting { dependencies { - api(compose.runtime) } } - val iosX64Main by getting - val iosArm64Main by getting - val iosSimulatorArm64Main by getting - val iosMain by creating { - dependsOn(commonMain) - - dependencies { - implementation(Deps.Ktor.clientIos) - } - - iosX64Main.dependsOn(this) - iosArm64Main.dependsOn(this) - iosSimulatorArm64Main.dependsOn(this) - } + val iosMain by getting } } android { - compileSdkVersion(Version.androidCompileSdk) - lintOptions { - disable += "ComposableModifierFactory" - disable += "ModifierFactoryExtensionFunction" - disable += "ModifierFactoryReturnType" - disable += "ModifierFactoryUnreferencedReceiver" - } + compileSdk = 33 composeOptions { - kotlinCompilerExtensionVersion = Version.composeCompiler - kotlinCompilerVersion = Version.baseKotlin + kotlinCompilerExtensionVersion = libs.versions.compose.compiler.get() } + sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") } tasks.withType().configureEach { @@ -158,8 +75,16 @@ tasks.withType().configureEach { } } -configure { - configure( - KotlinMultiplatform(javadocJar = Dokka("dokkaGfm")) - ) -} \ No newline at end of file +addGithubPackagesRepository() +kmmbridge { + githubReleaseArtifacts() + githubReleaseVersions() + versionPrefix.set("0.2.0-alpha0") + spm() +} + +mavenPublishing { + publishToMavenCentral(com.vanniktech.maven.publish.SonatypeHost.S01) + signAllPublications() +} + diff --git a/componentbox/componentbox.podspec b/componentbox/componentbox.podspec deleted file mode 100644 index f121b379..00000000 --- a/componentbox/componentbox.podspec +++ /dev/null @@ -1,39 +0,0 @@ -Pod::Spec.new do |spec| - spec.name = 'componentbox' - spec.version = '1.0.0-SNAPSHOT' - spec.homepage = 'https://github.com/dropbox/componentbox' - spec.source = { :http=> ''} - spec.authors = '' - spec.license = '' - spec.summary = 'ComponentBox' - spec.vendored_frameworks = 'build/cocoapods/framework/componentbox.framework' - spec.libraries = 'c++' - - - - spec.pod_target_xcconfig = { - 'KOTLIN_PROJECT_PATH' => ':componentbox', - 'PRODUCT_MODULE_NAME' => 'componentbox', - } - - spec.script_phases = [ - { - :name => 'Build componentbox', - :execution_position => :before_compile, - :shell_path => '/bin/sh', - :script => <<-SCRIPT - if [ "YES" = "$COCOAPODS_SKIP_KOTLIN_BUILD" ]; then - echo "Skipping Gradle build task invocation due to COCOAPODS_SKIP_KOTLIN_BUILD environment variable set to \"YES\"" - exit 0 - fi - set -ev - REPO_ROOT="$PODS_TARGET_SRCROOT" - "$REPO_ROOT/../gradlew" -p "$REPO_ROOT" $KOTLIN_PROJECT_PATH:syncFramework \ - -Pkotlin.native.cocoapods.platform=$PLATFORM_NAME \ - -Pkotlin.native.cocoapods.archs="$ARCHS" \ - -Pkotlin.native.cocoapods.configuration="$CONFIGURATION" - SCRIPT - } - ] - -end \ No newline at end of file diff --git a/componentbox/gradle.properties b/componentbox/gradle.properties new file mode 100644 index 00000000..43845356 --- /dev/null +++ b/componentbox/gradle.properties @@ -0,0 +1,3 @@ +POM_NAME=com.dropbox.componentbox +POM_ARTIFACT_ID=componentbox +POM_PACKAGING=jar \ No newline at end of file diff --git a/componentbox/package/ComponentBox-1.0.0-SNAPSHOT.zip b/componentbox/package/ComponentBox-1.0.0-SNAPSHOT.zip deleted file mode 100644 index 32297f3a..00000000 Binary files a/componentbox/package/ComponentBox-1.0.0-SNAPSHOT.zip and /dev/null differ diff --git a/componentbox/package/ComponentBox.xcframework/Info.plist b/componentbox/package/ComponentBox.xcframework/Info.plist deleted file mode 100644 index 5bf166bf..00000000 --- a/componentbox/package/ComponentBox.xcframework/Info.plist +++ /dev/null @@ -1,39 +0,0 @@ - - - - - AvailableLibraries - - - LibraryIdentifier - ios-x86_64-simulator - LibraryPath - componentbox.framework - SupportedArchitectures - - x86_64 - - SupportedPlatform - ios - SupportedPlatformVariant - simulator - - - LibraryIdentifier - ios-arm64 - LibraryPath - componentbox.framework - SupportedArchitectures - - arm64 - - SupportedPlatform - ios - - - CFBundlePackageType - XFWK - XCFrameworkFormatVersion - 1.0 - - diff --git a/componentbox/package/ComponentBox.xcframework/ios-arm64/componentbox.framework/Headers/componentbox.h b/componentbox/package/ComponentBox.xcframework/ios-arm64/componentbox.framework/Headers/componentbox.h deleted file mode 100644 index a9a29493..00000000 --- a/componentbox/package/ComponentBox.xcframework/ios-arm64/componentbox.framework/Headers/componentbox.h +++ /dev/null @@ -1,3205 +0,0 @@ -#import -#import -#import -#import -#import -#import -#import - -@class ComponentboxComponentBoxClient, ComponentboxComponentBox, ComponentboxKotlinUnit, NSError, ComponentboxComponentBoxScreen, ComponentboxKtor_client_coreHttpClient, ComponentboxComponentBoxViewModelCompanion, ComponentboxComponentBoxViewModel, ComponentboxKotlinArray, ComponentboxComponentBoxType, ComponentboxComponentBoxBanner, ComponentboxComponentBoxModal, ComponentboxKotlinEnumCompanion, ComponentboxKotlinEnum, ComponentboxAlignmentCompanion, ComponentboxAlignment, ComponentboxArrangementCompanion, ComponentboxArrangement, ComponentboxColor, ComponentboxBorderStrokeCompanion, ComponentboxBorderStroke, ComponentboxDestination, ComponentboxBottomTab, ComponentboxButtonVariantCompanion, ComponentboxButtonVariant, ComponentboxColorCompanion, ComponentboxKotlinx_serialization_jsonJsonElement, ComponentboxKotlinx_serialization_jsonJsonTransformingSerializer, ComponentboxColorSerializer, ComponentboxComponentCompanion, ComponentboxComponent, ComponentboxModifier, ComponentboxComponentBox_Companion, ComponentboxComponentBox_, ComponentboxComponentButtonCompanion, ComponentboxComponentButton, ComponentboxComponentColumnCompanion, ComponentboxComponentColumn, ComponentboxContentScale, ComponentboxComponentDrawableCompanion, ComponentboxComponentDrawable, ComponentboxComponentRowCompanion, ComponentboxComponentRow, ComponentboxShape, ComponentboxComponentSurfaceCompanion, ComponentboxComponentSurface, ComponentboxComponentSwitchCompanion, ComponentboxComponentSwitch, ComponentboxComponentTextCompanion, ComponentboxComponentText, ComponentboxComponentVectorCompanion, ComponentboxComponentVector, ComponentboxComponentBoxCompanion, ComponentboxComponentBoxBannerCompanion, ComponentboxComponentBoxModalCompanion, ComponentboxComponentBoxScreenCompanion, ComponentboxComponentBoxTypeCompanion, ComponentboxComponentTypeCompanion, ComponentboxComponentType, ComponentboxContentScaleCompanion, ComponentboxThemer, ComponentboxContext, ComponentboxIcon, ComponentboxIconType, ComponentboxImageType, ComponentboxMarginCompanion, ComponentboxMargin, ComponentboxPadding, ComponentboxModifierCompanion, ComponentboxPaddingCompanion, ComponentboxShapeCompanion, ComponentboxKotlinThrowable, ComponentboxKotlinException, ComponentboxKotlinRuntimeException, ComponentboxKotlinIllegalStateException, ComponentboxKtor_client_coreHttpClientEngineConfig, ComponentboxKtor_client_coreHttpClientConfig, ComponentboxKtor_eventsEvents, ComponentboxKtor_client_coreHttpReceivePipeline, ComponentboxKtor_client_coreHttpRequestPipeline, ComponentboxKtor_client_coreHttpResponsePipeline, ComponentboxKtor_client_coreHttpSendPipeline, ComponentboxKotlinx_serialization_coreSerializersModule, ComponentboxKotlinx_serialization_coreSerialKind, ComponentboxKotlinNothing, ComponentboxKotlinx_serialization_jsonJsonElementCompanion, ComponentboxKtor_client_coreHttpRequestData, ComponentboxKtor_client_coreHttpResponseData, ComponentboxKotlinx_coroutines_coreCoroutineDispatcher, ComponentboxKtor_client_coreProxyConfig, ComponentboxKtor_utilsAttributeKey, ComponentboxKtor_eventsEventDefinition, ComponentboxKtor_utilsPipelinePhase, ComponentboxKtor_utilsPipeline, ComponentboxKtor_client_coreHttpReceivePipelinePhases, ComponentboxKtor_client_coreHttpResponse, ComponentboxKtor_client_coreHttpRequestPipelinePhases, ComponentboxKtor_client_coreHttpRequestBuilder, ComponentboxKtor_client_coreHttpResponsePipelinePhases, ComponentboxKtor_client_coreHttpResponseContainer, ComponentboxKtor_client_coreHttpClientCall, ComponentboxKtor_client_coreHttpSendPipelinePhases, ComponentboxKtor_httpUrl, ComponentboxKtor_httpHttpMethod, ComponentboxKtor_httpOutgoingContent, ComponentboxKtor_httpHttpStatusCode, ComponentboxKtor_utilsGMTDate, ComponentboxKtor_httpHttpProtocolVersion, ComponentboxKotlinAbstractCoroutineContextElement, ComponentboxKotlinx_coroutines_coreCoroutineDispatcherKey, ComponentboxKtor_httpHeadersBuilder, ComponentboxKtor_client_coreHttpRequestBuilderCompanion, ComponentboxKtor_httpURLBuilder, ComponentboxKtor_utilsTypeInfo, ComponentboxKtor_client_coreHttpClientCallCompanion, ComponentboxKtor_httpUrlCompanion, ComponentboxKtor_httpURLProtocol, ComponentboxKtor_httpHttpMethodCompanion, ComponentboxKtor_httpContentType, ComponentboxKotlinCancellationException, ComponentboxKtor_httpHttpStatusCodeCompanion, ComponentboxKtor_utilsGMTDateCompanion, ComponentboxKtor_utilsWeekDay, ComponentboxKtor_utilsMonth, ComponentboxKtor_httpHttpProtocolVersionCompanion, ComponentboxKotlinAbstractCoroutineContextKey, ComponentboxKtor_ioMemory, ComponentboxKtor_ioChunkBuffer, ComponentboxKotlinByteArray, ComponentboxKtor_ioByteReadPacket, ComponentboxKtor_utilsStringValuesBuilderImpl, ComponentboxKtor_httpURLBuilderCompanion, ComponentboxKtor_httpURLProtocolCompanion, ComponentboxKtor_httpHeaderValueParam, ComponentboxKtor_httpHeaderValueWithParametersCompanion, ComponentboxKtor_httpHeaderValueWithParameters, ComponentboxKtor_httpContentTypeCompanion, ComponentboxKtor_utilsWeekDayCompanion, ComponentboxKtor_utilsMonthCompanion, ComponentboxKtor_ioMemoryCompanion, ComponentboxKtor_ioBufferCompanion, ComponentboxKtor_ioBuffer, ComponentboxKtor_ioChunkBufferCompanion, ComponentboxKotlinByteIterator, ComponentboxKtor_ioInputCompanion, ComponentboxKtor_ioInput, ComponentboxKtor_ioByteReadPacketCompanion, ComponentboxKotlinKTypeProjection, ComponentboxKotlinx_coroutines_coreAtomicDesc, ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodePrepareOp, ComponentboxKotlinKVariance, ComponentboxKotlinKTypeProjectionCompanion, ComponentboxKotlinx_coroutines_coreAtomicOp<__contravariant T>, ComponentboxKotlinx_coroutines_coreOpDescriptor, ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode, ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAbstractAtomicDesc, ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAddLastDesc, ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeRemoveFirstDesc; - -@protocol ComponentboxKotlinx_serialization_coreKSerializer, ComponentboxKotlinx_coroutines_coreFlow, ComponentboxZiplineZiplineService, ComponentboxKotlinComparable, ComponentboxStringRes, ComponentboxVectorRes, ComponentboxKotlinx_serialization_coreEncoder, ComponentboxKotlinx_serialization_coreSerialDescriptor, ComponentboxKotlinx_serialization_coreSerializationStrategy, ComponentboxKotlinx_serialization_coreDecoder, ComponentboxKotlinx_serialization_coreDeserializationStrategy, ComponentboxInflater, ComponentboxManager, ComponentboxImage, ComponentboxTextStyle, ComponentboxKotlinCoroutineContext, ComponentboxKotlinx_coroutines_coreCoroutineScope, ComponentboxKtor_ioCloseable, ComponentboxKtor_client_coreHttpClientEngine, ComponentboxKtor_client_coreHttpClientEngineCapability, ComponentboxKtor_utilsAttributes, ComponentboxKotlinIterator, ComponentboxKotlinx_coroutines_coreFlowCollector, ComponentboxKotlinx_serialization_coreCompositeEncoder, ComponentboxKotlinAnnotation, ComponentboxKotlinx_serialization_coreCompositeDecoder, ComponentboxKotlinCoroutineContextElement, ComponentboxKotlinCoroutineContextKey, ComponentboxKtor_client_coreHttpClientPlugin, ComponentboxKotlinx_coroutines_coreDisposableHandle, ComponentboxKotlinSuspendFunction2, ComponentboxKotlinx_serialization_coreSerializersModuleCollector, ComponentboxKotlinKClass, ComponentboxKtor_httpHeaders, ComponentboxKotlinx_coroutines_coreJob, ComponentboxKotlinContinuation, ComponentboxKotlinContinuationInterceptor, ComponentboxKotlinx_coroutines_coreRunnable, ComponentboxKotlinFunction, ComponentboxKtor_httpHttpMessage, ComponentboxKtor_ioByteReadChannel, ComponentboxKtor_httpHttpMessageBuilder, ComponentboxKtor_client_coreHttpRequest, ComponentboxKotlinKDeclarationContainer, ComponentboxKotlinKAnnotatedElement, ComponentboxKotlinKClassifier, ComponentboxKtor_httpParameters, ComponentboxKotlinMapEntry, ComponentboxKtor_utilsStringValues, ComponentboxKotlinx_coroutines_coreChildHandle, ComponentboxKotlinx_coroutines_coreChildJob, ComponentboxKotlinSequence, ComponentboxKotlinx_coroutines_coreSelectClause0, ComponentboxKtor_ioReadSession, ComponentboxKotlinSuspendFunction1, ComponentboxKotlinAppendable, ComponentboxKtor_utilsStringValuesBuilder, ComponentboxKtor_httpParametersBuilder, ComponentboxKotlinKType, ComponentboxKotlinx_coroutines_coreParentJob, ComponentboxKotlinx_coroutines_coreSelectInstance, ComponentboxKotlinSuspendFunction0, ComponentboxKtor_ioObjectPool; - -NS_ASSUME_NONNULL_BEGIN -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunknown-warning-option" -#pragma clang diagnostic ignored "-Wincompatible-property-type" -#pragma clang diagnostic ignored "-Wnullability" - -#pragma push_macro("_Nullable_result") -#if !__has_feature(nullability_nullable_result) -#undef _Nullable_result -#define _Nullable_result _Nullable -#endif - -__attribute__((swift_name("KotlinBase"))) -@interface ComponentboxBase : NSObject -- (instancetype)init __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -+ (void)initialize __attribute__((objc_requires_super)); -@end; - -@interface ComponentboxBase (ComponentboxBaseCopying) -@end; - -__attribute__((swift_name("KotlinMutableSet"))) -@interface ComponentboxMutableSet : NSMutableSet -@end; - -__attribute__((swift_name("KotlinMutableDictionary"))) -@interface ComponentboxMutableDictionary : NSMutableDictionary -@end; - -@interface NSError (NSErrorComponentboxKotlinException) -@property (readonly) id _Nullable kotlinException; -@end; - -__attribute__((swift_name("KotlinNumber"))) -@interface ComponentboxNumber : NSNumber -- (instancetype)initWithChar:(char)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedChar:(unsigned char)value __attribute__((unavailable)); -- (instancetype)initWithShort:(short)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedShort:(unsigned short)value __attribute__((unavailable)); -- (instancetype)initWithInt:(int)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedInt:(unsigned int)value __attribute__((unavailable)); -- (instancetype)initWithLong:(long)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedLong:(unsigned long)value __attribute__((unavailable)); -- (instancetype)initWithLongLong:(long long)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedLongLong:(unsigned long long)value __attribute__((unavailable)); -- (instancetype)initWithFloat:(float)value __attribute__((unavailable)); -- (instancetype)initWithDouble:(double)value __attribute__((unavailable)); -- (instancetype)initWithBool:(BOOL)value __attribute__((unavailable)); -- (instancetype)initWithInteger:(NSInteger)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedInteger:(NSUInteger)value __attribute__((unavailable)); -+ (instancetype)numberWithChar:(char)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedChar:(unsigned char)value __attribute__((unavailable)); -+ (instancetype)numberWithShort:(short)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedShort:(unsigned short)value __attribute__((unavailable)); -+ (instancetype)numberWithInt:(int)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedInt:(unsigned int)value __attribute__((unavailable)); -+ (instancetype)numberWithLong:(long)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedLong:(unsigned long)value __attribute__((unavailable)); -+ (instancetype)numberWithLongLong:(long long)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedLongLong:(unsigned long long)value __attribute__((unavailable)); -+ (instancetype)numberWithFloat:(float)value __attribute__((unavailable)); -+ (instancetype)numberWithDouble:(double)value __attribute__((unavailable)); -+ (instancetype)numberWithBool:(BOOL)value __attribute__((unavailable)); -+ (instancetype)numberWithInteger:(NSInteger)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedInteger:(NSUInteger)value __attribute__((unavailable)); -@end; - -__attribute__((swift_name("KotlinByte"))) -@interface ComponentboxByte : ComponentboxNumber -- (instancetype)initWithChar:(char)value; -+ (instancetype)numberWithChar:(char)value; -@end; - -__attribute__((swift_name("KotlinUByte"))) -@interface ComponentboxUByte : ComponentboxNumber -- (instancetype)initWithUnsignedChar:(unsigned char)value; -+ (instancetype)numberWithUnsignedChar:(unsigned char)value; -@end; - -__attribute__((swift_name("KotlinShort"))) -@interface ComponentboxShort : ComponentboxNumber -- (instancetype)initWithShort:(short)value; -+ (instancetype)numberWithShort:(short)value; -@end; - -__attribute__((swift_name("KotlinUShort"))) -@interface ComponentboxUShort : ComponentboxNumber -- (instancetype)initWithUnsignedShort:(unsigned short)value; -+ (instancetype)numberWithUnsignedShort:(unsigned short)value; -@end; - -__attribute__((swift_name("KotlinInt"))) -@interface ComponentboxInt : ComponentboxNumber -- (instancetype)initWithInt:(int)value; -+ (instancetype)numberWithInt:(int)value; -@end; - -__attribute__((swift_name("KotlinUInt"))) -@interface ComponentboxUInt : ComponentboxNumber -- (instancetype)initWithUnsignedInt:(unsigned int)value; -+ (instancetype)numberWithUnsignedInt:(unsigned int)value; -@end; - -__attribute__((swift_name("KotlinLong"))) -@interface ComponentboxLong : ComponentboxNumber -- (instancetype)initWithLongLong:(long long)value; -+ (instancetype)numberWithLongLong:(long long)value; -@end; - -__attribute__((swift_name("KotlinULong"))) -@interface ComponentboxULong : ComponentboxNumber -- (instancetype)initWithUnsignedLongLong:(unsigned long long)value; -+ (instancetype)numberWithUnsignedLongLong:(unsigned long long)value; -@end; - -__attribute__((swift_name("KotlinFloat"))) -@interface ComponentboxFloat : ComponentboxNumber -- (instancetype)initWithFloat:(float)value; -+ (instancetype)numberWithFloat:(float)value; -@end; - -__attribute__((swift_name("KotlinDouble"))) -@interface ComponentboxDouble : ComponentboxNumber -- (instancetype)initWithDouble:(double)value; -+ (instancetype)numberWithDouble:(double)value; -@end; - -__attribute__((swift_name("KotlinBoolean"))) -@interface ComponentboxBoolean : ComponentboxNumber -- (instancetype)initWithBool:(BOOL)value; -+ (instancetype)numberWithBool:(BOOL)value; -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBoxClient"))) -@interface ComponentboxComponentBoxClient : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)componentBoxClient __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBoxClient *shared __attribute__((swift_name("shared"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)fetchComponentBoxUrl:(NSString *)url completionHandler:(void (^)(ComponentboxComponentBox * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("fetchComponentBox(url:completionHandler:)"))); -- (ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxComponentBox *, ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError *, ComponentboxKotlinUnit *)))(void))fetchComponentBoxNativeUrl:(NSString *)url __attribute__((swift_name("fetchComponentBoxNative(url:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)fetchScreenUrl:(NSString *)url completionHandler:(void (^)(ComponentboxComponentBoxScreen * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("fetchScreen(url:completionHandler:)"))); -- (ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxComponentBoxScreen *, ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError *, ComponentboxKotlinUnit *)))(void))fetchScreenNativeUrl:(NSString *)url __attribute__((swift_name("fetchScreenNative(url:)"))); -@property (readonly) ComponentboxKtor_client_coreHttpClient *client __attribute__((swift_name("client"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBoxViewModel"))) -@interface ComponentboxComponentBoxViewModel : ComponentboxBase -- (instancetype)initWithRoot:(C _Nullable)root __attribute__((swift_name("init(root:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxComponentBoxViewModelCompanion *companion __attribute__((swift_name("companion"))); -- (C _Nullable)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxComponentBoxViewModel *)doCopyRoot:(C _Nullable)root __attribute__((swift_name("doCopy(root:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) C _Nullable root __attribute__((swift_name("root"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBoxViewModelCompanion"))) -@interface ComponentboxComponentBoxViewModelCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBoxViewModelCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializerTypeParamsSerializers:(ComponentboxKotlinArray> *)typeParamsSerializers __attribute__((swift_name("serializer(typeParamsSerializers:)"))); -- (id)serializerTypeSerial0:(id)typeSerial0 __attribute__((swift_name("serializer(typeSerial0:)"))); -@end; - -__attribute__((swift_name("ZiplineZiplineService"))) -@protocol ComponentboxZiplineZiplineService -@required -- (void)close __attribute__((swift_name("close()"))); -@end; - -__attribute__((swift_name("ComponentBoxZiplineService"))) -@protocol ComponentboxComponentBoxZiplineService -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)produceModelsInBannerType:(ComponentboxComponentBoxType *)type url:(NSString *)url headers:(NSDictionary *)headers completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("produceModelsInBanner(type:url:headers:completionHandler:)"))); -- (ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxComponentBoxViewModel *, ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError * _Nullable, ComponentboxKotlinUnit *)))(void), ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError *, ComponentboxKotlinUnit *)))(void))produceModelsInBannerNativeType:(ComponentboxComponentBoxType *)type url:(NSString *)url headers:(NSDictionary *)headers __attribute__((swift_name("produceModelsInBannerNative(type:url:headers:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)produceModelsInModalType:(ComponentboxComponentBoxType *)type url:(NSString *)url headers:(NSDictionary *)headers completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("produceModelsInModal(type:url:headers:completionHandler:)"))); -- (ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxComponentBoxViewModel *, ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError * _Nullable, ComponentboxKotlinUnit *)))(void), ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError *, ComponentboxKotlinUnit *)))(void))produceModelsInModalNativeType:(ComponentboxComponentBoxType *)type url:(NSString *)url headers:(NSDictionary *)headers __attribute__((swift_name("produceModelsInModalNative(type:url:headers:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)produceModelsInScreenType:(ComponentboxComponentBoxType *)type url:(NSString *)url headers:(NSDictionary *)headers completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("produceModelsInScreen(type:url:headers:completionHandler:)"))); -- (ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxComponentBoxViewModel *, ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError * _Nullable, ComponentboxKotlinUnit *)))(void), ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError *, ComponentboxKotlinUnit *)))(void))produceModelsInScreenNativeType:(ComponentboxComponentBoxType *)type url:(NSString *)url headers:(NSDictionary *)headers __attribute__((swift_name("produceModelsInScreenNative(type:url:headers:)"))); -@end; - -__attribute__((swift_name("HostApi"))) -@protocol ComponentboxHostApi -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)httpCallUrl:(NSString *)url headers:(NSDictionary *)headers completionHandler:(void (^)(NSString * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("httpCall(url:headers:completionHandler:)"))); -- (ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(NSString *, ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError *, ComponentboxKotlinUnit *)))(void))httpCallNativeUrl:(NSString *)url headers:(NSDictionary *)headers __attribute__((swift_name("httpCallNative(url:headers:)"))); -@end; - -__attribute__((swift_name("KotlinComparable"))) -@protocol ComponentboxKotlinComparable -@required -- (int32_t)compareToOther:(id _Nullable)other __attribute__((swift_name("compareTo(other:)"))); -@end; - -__attribute__((swift_name("KotlinEnum"))) -@interface ComponentboxKotlinEnum : ComponentboxBase -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKotlinEnumCompanion *companion __attribute__((swift_name("companion"))); -- (int32_t)compareToOther:(E)other __attribute__((swift_name("compareTo(other:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@property (readonly) int32_t ordinal __attribute__((swift_name("ordinal"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Alignment"))) -@interface ComponentboxAlignment : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxAlignmentCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxAlignment *topstart __attribute__((swift_name("topstart"))); -@property (class, readonly) ComponentboxAlignment *topcenter __attribute__((swift_name("topcenter"))); -@property (class, readonly) ComponentboxAlignment *topend __attribute__((swift_name("topend"))); -@property (class, readonly) ComponentboxAlignment *centerstart __attribute__((swift_name("centerstart"))); -@property (class, readonly) ComponentboxAlignment *center __attribute__((swift_name("center"))); -@property (class, readonly) ComponentboxAlignment *centerend __attribute__((swift_name("centerend"))); -@property (class, readonly) ComponentboxAlignment *bottomstart __attribute__((swift_name("bottomstart"))); -@property (class, readonly) ComponentboxAlignment *bottomcenter __attribute__((swift_name("bottomcenter"))); -@property (class, readonly) ComponentboxAlignment *bottomend __attribute__((swift_name("bottomend"))); -@property (class, readonly) ComponentboxAlignment *top __attribute__((swift_name("top"))); -@property (class, readonly) ComponentboxAlignment *centervertically __attribute__((swift_name("centervertically"))); -@property (class, readonly) ComponentboxAlignment *bottom __attribute__((swift_name("bottom"))); -@property (class, readonly) ComponentboxAlignment *start __attribute__((swift_name("start"))); -@property (class, readonly) ComponentboxAlignment *centerhorizontally __attribute__((swift_name("centerhorizontally"))); -@property (class, readonly) ComponentboxAlignment *end __attribute__((swift_name("end"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Alignment.Companion"))) -@interface ComponentboxAlignmentCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxAlignmentCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Arrangement"))) -@interface ComponentboxArrangement : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxArrangementCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxArrangement *start __attribute__((swift_name("start"))); -@property (class, readonly) ComponentboxArrangement *end __attribute__((swift_name("end"))); -@property (class, readonly) ComponentboxArrangement *top __attribute__((swift_name("top"))); -@property (class, readonly) ComponentboxArrangement *bottom __attribute__((swift_name("bottom"))); -@property (class, readonly) ComponentboxArrangement *center __attribute__((swift_name("center"))); -@property (class, readonly) ComponentboxArrangement *spaceevenly __attribute__((swift_name("spaceevenly"))); -@property (class, readonly) ComponentboxArrangement *spacebetween __attribute__((swift_name("spacebetween"))); -@property (class, readonly) ComponentboxArrangement *spacearound __attribute__((swift_name("spacearound"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Arrangement.Companion"))) -@interface ComponentboxArrangementCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxArrangementCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("BorderStroke"))) -@interface ComponentboxBorderStroke : ComponentboxBase -- (instancetype)initWithWidth:(int32_t)width color:(ComponentboxColor *)color __attribute__((swift_name("init(width:color:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxBorderStrokeCompanion *companion __attribute__((swift_name("companion"))); -- (int32_t)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxColor *)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxBorderStroke *)doCopyWidth:(int32_t)width color:(ComponentboxColor *)color __attribute__((swift_name("doCopy(width:color:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxColor *color __attribute__((swift_name("color"))); -@property (readonly) int32_t width __attribute__((swift_name("width"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("BorderStroke.Companion"))) -@interface ComponentboxBorderStrokeCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxBorderStrokeCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("BottomTab"))) -@interface ComponentboxBottomTab : ComponentboxBase -- (instancetype)initWithId:(ComponentboxDestination *)id title:(id)title iconSelected:(id)iconSelected iconNotSelected:(id)iconNotSelected __attribute__((swift_name("init(id:title:iconSelected:iconNotSelected:)"))) __attribute__((objc_designated_initializer)); -- (ComponentboxDestination *)component1 __attribute__((swift_name("component1()"))); -- (id)component2 __attribute__((swift_name("component2()"))); -- (id)component3 __attribute__((swift_name("component3()"))); -- (id)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxBottomTab *)doCopyId:(ComponentboxDestination *)id title:(id)title iconSelected:(id)iconSelected iconNotSelected:(id)iconNotSelected __attribute__((swift_name("doCopy(id:title:iconSelected:iconNotSelected:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id iconNotSelected __attribute__((swift_name("iconNotSelected"))); -@property (readonly) id iconSelected __attribute__((swift_name("iconSelected"))); -@property (readonly) ComponentboxDestination *id __attribute__((swift_name("id"))); -@property (readonly) id title __attribute__((swift_name("title"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ButtonVariant"))) -@interface ComponentboxButtonVariant : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxButtonVariantCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxButtonVariant *contained __attribute__((swift_name("contained"))); -@property (class, readonly) ComponentboxButtonVariant *text __attribute__((swift_name("text"))); -@property (class, readonly) ComponentboxButtonVariant *outlined __attribute__((swift_name("outlined"))); -@property (class, readonly) ComponentboxButtonVariant *icon __attribute__((swift_name("icon"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ButtonVariant.Companion"))) -@interface ComponentboxButtonVariantCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxButtonVariantCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Color"))) -@interface ComponentboxColor : ComponentboxBase -- (instancetype)initWithTitle:(NSString *)title light:(int64_t)light dark:(int64_t)dark __attribute__((swift_name("init(title:light:dark:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxColorCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (int64_t)component2 __attribute__((swift_name("component2()"))); -- (int64_t)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxColor *)doCopyTitle:(NSString *)title light:(int64_t)light dark:(int64_t)dark __attribute__((swift_name("doCopy(title:light:dark:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int64_t dark __attribute__((swift_name("dark"))); -@property (readonly) int64_t light __attribute__((swift_name("light"))); -@property (readonly) NSString *title __attribute__((swift_name("title"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Color.Companion"))) -@interface ComponentboxColorCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxColorCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreSerializationStrategy"))) -@protocol ComponentboxKotlinx_serialization_coreSerializationStrategy -@required -- (void)serializeEncoder:(id)encoder value:(id _Nullable)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreDeserializationStrategy"))) -@protocol ComponentboxKotlinx_serialization_coreDeserializationStrategy -@required -- (id _Nullable)deserializeDecoder:(id)decoder __attribute__((swift_name("deserialize(decoder:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreKSerializer"))) -@protocol ComponentboxKotlinx_serialization_coreKSerializer -@required -@end; - -__attribute__((swift_name("Kotlinx_serialization_jsonJsonTransformingSerializer"))) -@interface ComponentboxKotlinx_serialization_jsonJsonTransformingSerializer : ComponentboxBase -- (instancetype)initWithTSerializer:(id)tSerializer __attribute__((swift_name("init(tSerializer:)"))) __attribute__((objc_designated_initializer)); -- (T)deserializeDecoder:(id)decoder __attribute__((swift_name("deserialize(decoder:)"))); -- (void)serializeEncoder:(id)encoder value:(T)value __attribute__((swift_name("serialize(encoder:value:)"))); -- (ComponentboxKotlinx_serialization_jsonJsonElement *)transformDeserializeElement:(ComponentboxKotlinx_serialization_jsonJsonElement *)element __attribute__((swift_name("transformDeserialize(element:)"))); -- (ComponentboxKotlinx_serialization_jsonJsonElement *)transformSerializeElement:(ComponentboxKotlinx_serialization_jsonJsonElement *)element __attribute__((swift_name("transformSerialize(element:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ColorSerializer"))) -@interface ComponentboxColorSerializer : ComponentboxKotlinx_serialization_jsonJsonTransformingSerializer -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithTSerializer:(id)tSerializer __attribute__((swift_name("init(tSerializer:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)colorSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxColorSerializer *shared __attribute__((swift_name("shared"))); -- (ComponentboxKotlinx_serialization_jsonJsonElement *)transformDeserializeElement:(ComponentboxKotlinx_serialization_jsonJsonElement *)element __attribute__((swift_name("transformDeserialize(element:)"))); -@end; - -__attribute__((swift_name("Colors"))) -@protocol ComponentboxColors -@required -- (NSMutableArray *)list __attribute__((swift_name("list()"))); -@property (readonly) ComponentboxColor *background __attribute__((swift_name("background"))); -@property (readonly) ComponentboxColor *error __attribute__((swift_name("error"))); -@property (readonly) ComponentboxColor *onBackground __attribute__((swift_name("onBackground"))); -@property (readonly) ComponentboxColor *onError __attribute__((swift_name("onError"))); -@property (readonly) ComponentboxColor *onPrimary __attribute__((swift_name("onPrimary"))); -@property (readonly) ComponentboxColor *onSecondary __attribute__((swift_name("onSecondary"))); -@property (readonly) ComponentboxColor *onSurface __attribute__((swift_name("onSurface"))); -@property (readonly) ComponentboxColor *primary __attribute__((swift_name("primary"))); -@property (readonly) ComponentboxColor *primaryVariant __attribute__((swift_name("primaryVariant"))); -@property (readonly) ComponentboxColor *secondary __attribute__((swift_name("secondary"))); -@property (readonly) ComponentboxColor *secondaryVariant __attribute__((swift_name("secondaryVariant"))); -@property (readonly) ComponentboxColor *surface __attribute__((swift_name("surface"))); -@end; - -__attribute__((swift_name("Component"))) -@interface ComponentboxComponent : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property (class, readonly, getter=companion) ComponentboxComponentCompanion *companion __attribute__((swift_name("companion"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Box"))) -@interface ComponentboxComponentBox_ : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier horizontalArrangement:(ComponentboxArrangement * _Nullable)horizontalArrangement verticalAlignment:(ComponentboxAlignment * _Nullable)verticalAlignment action:(NSString * _Nullable)action __attribute__((swift_name("init(id:components:modifier:horizontalArrangement:verticalAlignment:action:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentBox_Companion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (NSMutableArray * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxModifier * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxArrangement * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxAlignment * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (NSString * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxComponentBox_ *)doCopyId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier horizontalArrangement:(ComponentboxArrangement * _Nullable)horizontalArrangement verticalAlignment:(ComponentboxAlignment * _Nullable)verticalAlignment action:(NSString * _Nullable)action __attribute__((swift_name("doCopy(id:components:modifier:horizontalArrangement:verticalAlignment:action:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property NSString * _Nullable action __attribute__((swift_name("action"))); -@property NSMutableArray * _Nullable components __attribute__((swift_name("components"))); -@property ComponentboxArrangement * _Nullable horizontalArrangement __attribute__((swift_name("horizontalArrangement"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property ComponentboxAlignment * _Nullable verticalAlignment __attribute__((swift_name("verticalAlignment"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.BoxCompanion"))) -@interface ComponentboxComponentBox_Companion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBox_Companion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Button"))) -@interface ComponentboxComponentButton : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier isEnabled:(ComponentboxBoolean * _Nullable)isEnabled action:(NSString * _Nullable)action variant:(NSString * _Nullable)variant __attribute__((swift_name("init(id:components:modifier:isEnabled:action:variant:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentButtonCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (NSMutableArray * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxModifier * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxBoolean * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (NSString * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (NSString * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxComponentButton *)doCopyId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier isEnabled:(ComponentboxBoolean * _Nullable)isEnabled action:(NSString * _Nullable)action variant:(NSString * _Nullable)variant __attribute__((swift_name("doCopy(id:components:modifier:isEnabled:action:variant:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property NSString * _Nullable action __attribute__((swift_name("action"))); -@property NSMutableArray * _Nullable components __attribute__((swift_name("components"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxBoolean * _Nullable isEnabled __attribute__((swift_name("isEnabled"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property NSString * _Nullable variant __attribute__((swift_name("variant"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.ButtonCompanion"))) -@interface ComponentboxComponentButtonCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentButtonCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Column"))) -@interface ComponentboxComponentColumn : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier verticalArrangement:(ComponentboxArrangement * _Nullable)verticalArrangement horizontalAlignment:(ComponentboxAlignment * _Nullable)horizontalAlignment isLazy:(ComponentboxBoolean * _Nullable)isLazy isTable:(ComponentboxBoolean * _Nullable)isTable action:(NSString * _Nullable)action __attribute__((swift_name("init(id:components:modifier:verticalArrangement:horizontalAlignment:isLazy:isTable:action:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentColumnCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (NSMutableArray * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxModifier * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxArrangement * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxAlignment * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (ComponentboxBoolean * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxBoolean * _Nullable)component7 __attribute__((swift_name("component7()"))); -- (NSString * _Nullable)component8 __attribute__((swift_name("component8()"))); -- (ComponentboxComponentColumn *)doCopyId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier verticalArrangement:(ComponentboxArrangement * _Nullable)verticalArrangement horizontalAlignment:(ComponentboxAlignment * _Nullable)horizontalAlignment isLazy:(ComponentboxBoolean * _Nullable)isLazy isTable:(ComponentboxBoolean * _Nullable)isTable action:(NSString * _Nullable)action __attribute__((swift_name("doCopy(id:components:modifier:verticalArrangement:horizontalAlignment:isLazy:isTable:action:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property NSString * _Nullable action __attribute__((swift_name("action"))); -@property NSMutableArray * _Nullable components __attribute__((swift_name("components"))); -@property ComponentboxAlignment * _Nullable horizontalAlignment __attribute__((swift_name("horizontalAlignment"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxBoolean * _Nullable isLazy __attribute__((swift_name("isLazy"))); -@property ComponentboxBoolean * _Nullable isTable __attribute__((swift_name("isTable"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property ComponentboxArrangement * _Nullable verticalArrangement __attribute__((swift_name("verticalArrangement"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.ColumnCompanion"))) -@interface ComponentboxComponentColumnCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentColumnCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Companion"))) -@interface ComponentboxComponentCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -- (id)serializerTypeParamsSerializers:(ComponentboxKotlinArray> *)typeParamsSerializers __attribute__((swift_name("serializer(typeParamsSerializers:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Drawable"))) -@interface ComponentboxComponentDrawable : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id name:(NSString * _Nullable)name url:(NSString * _Nullable)url contentDescription:(NSString * _Nullable)contentDescription modifier:(ComponentboxModifier * _Nullable)modifier alignment:(ComponentboxAlignment * _Nullable)alignment contentScale:(ComponentboxContentScale * _Nullable)contentScale __attribute__((swift_name("init(id:name:url:contentDescription:modifier:alignment:contentScale:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentDrawableCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (NSString * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (NSString * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (NSString * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxModifier * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (ComponentboxAlignment * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxContentScale * _Nullable)component7 __attribute__((swift_name("component7()"))); -- (ComponentboxComponentDrawable *)doCopyId:(NSString *)id name:(NSString * _Nullable)name url:(NSString * _Nullable)url contentDescription:(NSString * _Nullable)contentDescription modifier:(ComponentboxModifier * _Nullable)modifier alignment:(ComponentboxAlignment * _Nullable)alignment contentScale:(ComponentboxContentScale * _Nullable)contentScale __attribute__((swift_name("doCopy(id:name:url:contentDescription:modifier:alignment:contentScale:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property ComponentboxAlignment * _Nullable alignment __attribute__((swift_name("alignment"))); -@property (readonly) NSString * _Nullable contentDescription __attribute__((swift_name("contentDescription"))); -@property ComponentboxContentScale * _Nullable contentScale __attribute__((swift_name("contentScale"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property NSString * _Nullable name __attribute__((swift_name("name"))); -@property NSString * _Nullable url __attribute__((swift_name("url"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.DrawableCompanion"))) -@interface ComponentboxComponentDrawableCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentDrawableCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Row"))) -@interface ComponentboxComponentRow : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier horizontalArrangement:(ComponentboxArrangement * _Nullable)horizontalArrangement verticalAlignment:(ComponentboxAlignment * _Nullable)verticalAlignment action:(NSString * _Nullable)action isLazy:(ComponentboxBoolean * _Nullable)isLazy __attribute__((swift_name("init(id:components:modifier:horizontalArrangement:verticalAlignment:action:isLazy:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentRowCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (NSMutableArray * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxModifier * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxArrangement * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxAlignment * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (NSString * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxBoolean * _Nullable)component7 __attribute__((swift_name("component7()"))); -- (ComponentboxComponentRow *)doCopyId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier horizontalArrangement:(ComponentboxArrangement * _Nullable)horizontalArrangement verticalAlignment:(ComponentboxAlignment * _Nullable)verticalAlignment action:(NSString * _Nullable)action isLazy:(ComponentboxBoolean * _Nullable)isLazy __attribute__((swift_name("doCopy(id:components:modifier:horizontalArrangement:verticalAlignment:action:isLazy:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property NSString * _Nullable action __attribute__((swift_name("action"))); -@property NSMutableArray * _Nullable components __attribute__((swift_name("components"))); -@property ComponentboxArrangement * _Nullable horizontalArrangement __attribute__((swift_name("horizontalArrangement"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxBoolean * _Nullable isLazy __attribute__((swift_name("isLazy"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property ComponentboxAlignment * _Nullable verticalAlignment __attribute__((swift_name("verticalAlignment"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.RowCompanion"))) -@interface ComponentboxComponentRowCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentRowCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Surface"))) -@interface ComponentboxComponentSurface : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id modifier:(ComponentboxModifier * _Nullable)modifier shape:(ComponentboxShape * _Nullable)shape color:(ComponentboxColor * _Nullable)color contentColor:(ComponentboxColor * _Nullable)contentColor borderStroke:(ComponentboxBorderStroke * _Nullable)borderStroke elevation:(ComponentboxInt * _Nullable)elevation components:(NSMutableArray * _Nullable)components __attribute__((swift_name("init(id:modifier:shape:color:contentColor:borderStroke:elevation:components:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentSurfaceCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxModifier * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxShape * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxColor * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxColor * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (ComponentboxBorderStroke * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxInt * _Nullable)component7 __attribute__((swift_name("component7()"))); -- (NSMutableArray * _Nullable)component8 __attribute__((swift_name("component8()"))); -- (ComponentboxComponentSurface *)doCopyId:(NSString *)id modifier:(ComponentboxModifier * _Nullable)modifier shape:(ComponentboxShape * _Nullable)shape color:(ComponentboxColor * _Nullable)color contentColor:(ComponentboxColor * _Nullable)contentColor borderStroke:(ComponentboxBorderStroke * _Nullable)borderStroke elevation:(ComponentboxInt * _Nullable)elevation components:(NSMutableArray * _Nullable)components __attribute__((swift_name("doCopy(id:modifier:shape:color:contentColor:borderStroke:elevation:components:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property ComponentboxBorderStroke * _Nullable borderStroke __attribute__((swift_name("borderStroke"))); -@property ComponentboxColor * _Nullable color __attribute__((swift_name("color"))); -@property NSMutableArray * _Nullable components __attribute__((swift_name("components"))); -@property ComponentboxColor * _Nullable contentColor __attribute__((swift_name("contentColor"))); -@property ComponentboxInt * _Nullable elevation __attribute__((swift_name("elevation"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property ComponentboxShape * _Nullable shape __attribute__((swift_name("shape"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.SurfaceCompanion"))) -@interface ComponentboxComponentSurfaceCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentSurfaceCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Switch"))) -@interface ComponentboxComponentSwitch : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id isChecked:(ComponentboxBoolean * _Nullable)isChecked modifier:(ComponentboxModifier * _Nullable)modifier action:(NSString * _Nullable)action __attribute__((swift_name("init(id:isChecked:modifier:action:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentSwitchCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxBoolean * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxModifier * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (NSString * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxComponentSwitch *)doCopyId:(NSString *)id isChecked:(ComponentboxBoolean * _Nullable)isChecked modifier:(ComponentboxModifier * _Nullable)modifier action:(NSString * _Nullable)action __attribute__((swift_name("doCopy(id:isChecked:modifier:action:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property NSString * _Nullable action __attribute__((swift_name("action"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxBoolean * _Nullable isChecked __attribute__((swift_name("isChecked"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.SwitchCompanion"))) -@interface ComponentboxComponentSwitchCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentSwitchCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Text"))) -@interface ComponentboxComponentText : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id modifier:(ComponentboxModifier * _Nullable)modifier text:(NSString * _Nullable)text color:(ComponentboxColor * _Nullable)color textStyle:(NSString * _Nullable)textStyle __attribute__((swift_name("init(id:modifier:text:color:textStyle:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentTextCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxModifier * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (NSString * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxColor * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (NSString * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (ComponentboxComponentText *)doCopyId:(NSString *)id modifier:(ComponentboxModifier * _Nullable)modifier text:(NSString * _Nullable)text color:(ComponentboxColor * _Nullable)color textStyle:(NSString * _Nullable)textStyle __attribute__((swift_name("doCopy(id:modifier:text:color:textStyle:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property ComponentboxColor * _Nullable color __attribute__((swift_name("color"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property NSString * _Nullable text __attribute__((swift_name("text"))); -@property NSString * _Nullable textStyle __attribute__((swift_name("textStyle"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.TextCompanion"))) -@interface ComponentboxComponentTextCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentTextCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Vector"))) -@interface ComponentboxComponentVector : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id name:(NSString * _Nullable)name modifier:(ComponentboxModifier * _Nullable)modifier alignment:(ComponentboxAlignment * _Nullable)alignment contentScale:(ComponentboxContentScale * _Nullable)contentScale color:(ComponentboxColor * _Nullable)color __attribute__((swift_name("init(id:name:modifier:alignment:contentScale:color:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentVectorCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (NSString * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxModifier * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxAlignment * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxContentScale * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (ComponentboxColor * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxComponentVector *)doCopyId:(NSString *)id name:(NSString * _Nullable)name modifier:(ComponentboxModifier * _Nullable)modifier alignment:(ComponentboxAlignment * _Nullable)alignment contentScale:(ComponentboxContentScale * _Nullable)contentScale color:(ComponentboxColor * _Nullable)color __attribute__((swift_name("doCopy(id:name:modifier:alignment:contentScale:color:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property ComponentboxAlignment * _Nullable alignment __attribute__((swift_name("alignment"))); -@property ComponentboxColor * _Nullable color __attribute__((swift_name("color"))); -@property ComponentboxContentScale * _Nullable contentScale __attribute__((swift_name("contentScale"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property NSString * _Nullable name __attribute__((swift_name("name"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.VectorCompanion"))) -@interface ComponentboxComponentVectorCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentVectorCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((swift_name("ComponentBox"))) -@interface ComponentboxComponentBox : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property (class, readonly, getter=companion) ComponentboxComponentBoxCompanion *companion __attribute__((swift_name("companion"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBox.Banner"))) -@interface ComponentboxComponentBoxBanner : ComponentboxComponentBox -- (instancetype)initWithVerticalArrangement:(ComponentboxArrangement *)verticalArrangement horizontalAlignment:(ComponentboxAlignment *)horizontalAlignment components:(NSArray *)components __attribute__((swift_name("init(verticalArrangement:horizontalAlignment:components:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentBoxBannerCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxArrangement *)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxAlignment *)component2 __attribute__((swift_name("component2()"))); -- (NSArray *)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxComponentBoxBanner *)doCopyVerticalArrangement:(ComponentboxArrangement *)verticalArrangement horizontalAlignment:(ComponentboxAlignment *)horizontalAlignment components:(NSArray *)components __attribute__((swift_name("doCopy(verticalArrangement:horizontalAlignment:components:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSArray *components __attribute__((swift_name("components"))); -@property (readonly) ComponentboxAlignment *horizontalAlignment __attribute__((swift_name("horizontalAlignment"))); -@property (readonly) ComponentboxArrangement *verticalArrangement __attribute__((swift_name("verticalArrangement"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBox.BannerCompanion"))) -@interface ComponentboxComponentBoxBannerCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBoxBannerCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBox.Companion"))) -@interface ComponentboxComponentBoxCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBoxCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -- (id)serializerTypeParamsSerializers:(ComponentboxKotlinArray> *)typeParamsSerializers __attribute__((swift_name("serializer(typeParamsSerializers:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBox.Modal"))) -@interface ComponentboxComponentBoxModal : ComponentboxComponentBox -- (instancetype)initWithVerticalArrangement:(ComponentboxArrangement *)verticalArrangement horizontalAlignment:(ComponentboxAlignment *)horizontalAlignment components:(NSArray *)components __attribute__((swift_name("init(verticalArrangement:horizontalAlignment:components:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentBoxModalCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxArrangement *)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxAlignment *)component2 __attribute__((swift_name("component2()"))); -- (NSArray *)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxComponentBoxModal *)doCopyVerticalArrangement:(ComponentboxArrangement *)verticalArrangement horizontalAlignment:(ComponentboxAlignment *)horizontalAlignment components:(NSArray *)components __attribute__((swift_name("doCopy(verticalArrangement:horizontalAlignment:components:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSArray *components __attribute__((swift_name("components"))); -@property (readonly) ComponentboxAlignment *horizontalAlignment __attribute__((swift_name("horizontalAlignment"))); -@property (readonly) ComponentboxArrangement *verticalArrangement __attribute__((swift_name("verticalArrangement"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBox.ModalCompanion"))) -@interface ComponentboxComponentBoxModalCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBoxModalCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBox.Screen"))) -@interface ComponentboxComponentBoxScreen : ComponentboxComponentBox -- (instancetype)initWithTitle:(NSString * _Nullable)title verticalArrangement:(ComponentboxArrangement *)verticalArrangement horizontalAlignment:(ComponentboxAlignment *)horizontalAlignment components:(NSArray *)components __attribute__((swift_name("init(title:verticalArrangement:horizontalAlignment:components:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentBoxScreenCompanion *companion __attribute__((swift_name("companion"))); -- (NSString * _Nullable)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxArrangement *)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxAlignment *)component3 __attribute__((swift_name("component3()"))); -- (NSArray *)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxComponentBoxScreen *)doCopyTitle:(NSString * _Nullable)title verticalArrangement:(ComponentboxArrangement *)verticalArrangement horizontalAlignment:(ComponentboxAlignment *)horizontalAlignment components:(NSArray *)components __attribute__((swift_name("doCopy(title:verticalArrangement:horizontalAlignment:components:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSArray *components __attribute__((swift_name("components"))); -@property (readonly) ComponentboxAlignment *horizontalAlignment __attribute__((swift_name("horizontalAlignment"))); -@property (readonly) NSString * _Nullable title __attribute__((swift_name("title"))); -@property (readonly) ComponentboxArrangement *verticalArrangement __attribute__((swift_name("verticalArrangement"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBox.ScreenCompanion"))) -@interface ComponentboxComponentBoxScreenCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBoxScreenCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBoxType"))) -@interface ComponentboxComponentBoxType : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentBoxTypeCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxComponentBoxType *screen __attribute__((swift_name("screen"))); -@property (class, readonly) ComponentboxComponentBoxType *modal __attribute__((swift_name("modal"))); -@property (class, readonly) ComponentboxComponentBoxType *banner __attribute__((swift_name("banner"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBoxType.Companion"))) -@interface ComponentboxComponentBoxTypeCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBoxTypeCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentType"))) -@interface ComponentboxComponentType : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentTypeCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxComponentType *box __attribute__((swift_name("box"))); -@property (class, readonly) ComponentboxComponentType *button __attribute__((swift_name("button"))); -@property (class, readonly) ComponentboxComponentType *column __attribute__((swift_name("column"))); -@property (class, readonly) ComponentboxComponentType *drawable __attribute__((swift_name("drawable"))); -@property (class, readonly) ComponentboxComponentType *lazycolumn __attribute__((swift_name("lazycolumn"))); -@property (class, readonly) ComponentboxComponentType *lazyrow __attribute__((swift_name("lazyrow"))); -@property (class, readonly) ComponentboxComponentType *row __attribute__((swift_name("row"))); -@property (class, readonly) ComponentboxComponentType *switch_ __attribute__((swift_name("switch_"))); -@property (class, readonly) ComponentboxComponentType *table __attribute__((swift_name("table"))); -@property (class, readonly) ComponentboxComponentType *text __attribute__((swift_name("text"))); -@property (class, readonly) ComponentboxComponentType *vector __attribute__((swift_name("vector"))); -@property (class, readonly) ComponentboxComponentType *surface __attribute__((swift_name("surface"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentType.Companion"))) -@interface ComponentboxComponentTypeCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentTypeCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ContentScale"))) -@interface ComponentboxContentScale : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxContentScaleCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxContentScale *crop __attribute__((swift_name("crop"))); -@property (class, readonly) ComponentboxContentScale *fit __attribute__((swift_name("fit"))); -@property (class, readonly) ComponentboxContentScale *fillheight __attribute__((swift_name("fillheight"))); -@property (class, readonly) ComponentboxContentScale *fillwidth __attribute__((swift_name("fillwidth"))); -@property (class, readonly) ComponentboxContentScale *inside __attribute__((swift_name("inside"))); -@property (class, readonly) ComponentboxContentScale *none __attribute__((swift_name("none"))); -@property (class, readonly) ComponentboxContentScale *fillbounds __attribute__((swift_name("fillbounds"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ContentScale.Companion"))) -@interface ComponentboxContentScaleCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxContentScaleCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Context"))) -@interface ComponentboxContext : ComponentboxBase -- (instancetype)initWithInflater:(id _Nullable)inflater themer:(ComponentboxThemer * _Nullable)themer manager:(id _Nullable)manager __attribute__((swift_name("init(inflater:themer:manager:)"))) __attribute__((objc_designated_initializer)); -- (id _Nullable)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxThemer * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (id _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxContext *)doCopyInflater:(id _Nullable)inflater themer:(ComponentboxThemer * _Nullable)themer manager:(id _Nullable)manager __attribute__((swift_name("doCopy(inflater:themer:manager:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id _Nullable inflater __attribute__((swift_name("inflater"))); -@property (readonly) id _Nullable manager __attribute__((swift_name("manager"))); -@property (readonly) ComponentboxThemer * _Nullable themer __attribute__((swift_name("themer"))); -@end; - -__attribute__((swift_name("Destination"))) -@interface ComponentboxDestination : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@end; - -__attribute__((swift_name("DrawableRes"))) -@protocol ComponentboxDrawableRes -@required -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Icon"))) -@interface ComponentboxIcon : ComponentboxBase -- (instancetype)initWithLine:(id)line fill:(id _Nullable)fill pictogram:(id _Nullable)pictogram spot:(id _Nullable)spot __attribute__((swift_name("init(line:fill:pictogram:spot:)"))) __attribute__((objc_designated_initializer)); -- (id)component1 __attribute__((swift_name("component1()"))); -- (id _Nullable)component2 __attribute__((swift_name("component2()"))); -- (id _Nullable)component3 __attribute__((swift_name("component3()"))); -- (id _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxIcon *)doCopyLine:(id)line fill:(id _Nullable)fill pictogram:(id _Nullable)pictogram spot:(id _Nullable)spot __attribute__((swift_name("doCopy(line:fill:pictogram:spot:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id _Nullable fill __attribute__((swift_name("fill"))); -@property (readonly) id line __attribute__((swift_name("line"))); -@property (readonly) id _Nullable pictogram __attribute__((swift_name("pictogram"))); -@property (readonly) id _Nullable spot __attribute__((swift_name("spot"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("IconType"))) -@interface ComponentboxIconType : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) ComponentboxIconType *line __attribute__((swift_name("line"))); -@property (class, readonly) ComponentboxIconType *fill __attribute__((swift_name("fill"))); -@property (class, readonly) ComponentboxIconType *pictogram __attribute__((swift_name("pictogram"))); -@property (class, readonly) ComponentboxIconType *spot __attribute__((swift_name("spot"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((swift_name("Icons"))) -@protocol ComponentboxIcons -@required -- (NSMutableArray *)list __attribute__((swift_name("list()"))); -@end; - -__attribute__((swift_name("Image"))) -@protocol ComponentboxImage -@required -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ImageType"))) -@interface ComponentboxImageType : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) ComponentboxImageType *light __attribute__((swift_name("light"))); -@property (class, readonly) ComponentboxImageType *dark __attribute__((swift_name("dark"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((swift_name("Images"))) -@protocol ComponentboxImages -@required -- (NSMutableArray> *)list __attribute__((swift_name("list()"))); -@end; - -__attribute__((swift_name("Inflater"))) -@protocol ComponentboxInflater -@required -@end; - -__attribute__((swift_name("Manager"))) -@protocol ComponentboxManager -@required -- (void)runAction:(NSString * _Nullable)action __attribute__((swift_name("run(action:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Margin"))) -@interface ComponentboxMargin : ComponentboxBase -- (instancetype)initWithStart:(ComponentboxInt * _Nullable)start top:(ComponentboxInt * _Nullable)top end:(ComponentboxInt * _Nullable)end bottom:(ComponentboxInt * _Nullable)bottom __attribute__((swift_name("init(start:top:end:bottom:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxMarginCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxInt * _Nullable)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxInt * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxInt * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxInt * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxMargin *)doCopyStart:(ComponentboxInt * _Nullable)start top:(ComponentboxInt * _Nullable)top end:(ComponentboxInt * _Nullable)end bottom:(ComponentboxInt * _Nullable)bottom __attribute__((swift_name("doCopy(start:top:end:bottom:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxInt * _Nullable bottom __attribute__((swift_name("bottom"))); -@property (readonly) ComponentboxInt * _Nullable end __attribute__((swift_name("end"))); -@property (readonly) ComponentboxInt * _Nullable start __attribute__((swift_name("start"))); -@property (readonly) ComponentboxInt * _Nullable top __attribute__((swift_name("top"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Margin.Companion"))) -@interface ComponentboxMarginCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxMarginCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Modifier"))) -@interface ComponentboxModifier : ComponentboxBase -- (instancetype)initWithFillMaxSize:(ComponentboxBoolean * _Nullable)fillMaxSize fillMaxHeight:(ComponentboxBoolean * _Nullable)fillMaxHeight fillMaxWidth:(ComponentboxBoolean * _Nullable)fillMaxWidth height:(ComponentboxInt * _Nullable)height width:(ComponentboxInt * _Nullable)width padding:(ComponentboxPadding * _Nullable)padding margin:(ComponentboxMargin * _Nullable)margin background:(ComponentboxColor * _Nullable)background weight:(ComponentboxFloat * _Nullable)weight __attribute__((swift_name("init(fillMaxSize:fillMaxHeight:fillMaxWidth:height:width:padding:margin:background:weight:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxModifierCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxBoolean * _Nullable)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxBoolean * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxBoolean * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxInt * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxInt * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (ComponentboxPadding * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxMargin * _Nullable)component7 __attribute__((swift_name("component7()"))); -- (ComponentboxColor * _Nullable)component8 __attribute__((swift_name("component8()"))); -- (ComponentboxFloat * _Nullable)component9 __attribute__((swift_name("component9()"))); -- (ComponentboxModifier *)doCopyFillMaxSize:(ComponentboxBoolean * _Nullable)fillMaxSize fillMaxHeight:(ComponentboxBoolean * _Nullable)fillMaxHeight fillMaxWidth:(ComponentboxBoolean * _Nullable)fillMaxWidth height:(ComponentboxInt * _Nullable)height width:(ComponentboxInt * _Nullable)width padding:(ComponentboxPadding * _Nullable)padding margin:(ComponentboxMargin * _Nullable)margin background:(ComponentboxColor * _Nullable)background weight:(ComponentboxFloat * _Nullable)weight __attribute__((swift_name("doCopy(fillMaxSize:fillMaxHeight:fillMaxWidth:height:width:padding:margin:background:weight:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property ComponentboxColor * _Nullable background __attribute__((swift_name("background"))); -@property ComponentboxBoolean * _Nullable fillMaxHeight __attribute__((swift_name("fillMaxHeight"))); -@property ComponentboxBoolean * _Nullable fillMaxSize __attribute__((swift_name("fillMaxSize"))); -@property ComponentboxBoolean * _Nullable fillMaxWidth __attribute__((swift_name("fillMaxWidth"))); -@property ComponentboxInt * _Nullable height __attribute__((swift_name("height"))); -@property ComponentboxMargin * _Nullable margin __attribute__((swift_name("margin"))); -@property ComponentboxPadding * _Nullable padding __attribute__((swift_name("padding"))); -@property ComponentboxFloat * _Nullable weight __attribute__((swift_name("weight"))); -@property ComponentboxInt * _Nullable width __attribute__((swift_name("width"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Modifier.Companion"))) -@interface ComponentboxModifierCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxModifierCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((swift_name("MultiplatformRes"))) -@protocol ComponentboxMultiplatformRes -@required -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Padding"))) -@interface ComponentboxPadding : ComponentboxBase -- (instancetype)initWithStart:(ComponentboxInt * _Nullable)start top:(ComponentboxInt * _Nullable)top end:(ComponentboxInt * _Nullable)end bottom:(ComponentboxInt * _Nullable)bottom __attribute__((swift_name("init(start:top:end:bottom:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxPaddingCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxInt * _Nullable)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxInt * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxInt * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxInt * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxPadding *)doCopyStart:(ComponentboxInt * _Nullable)start top:(ComponentboxInt * _Nullable)top end:(ComponentboxInt * _Nullable)end bottom:(ComponentboxInt * _Nullable)bottom __attribute__((swift_name("doCopy(start:top:end:bottom:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxInt * _Nullable bottom __attribute__((swift_name("bottom"))); -@property (readonly) ComponentboxInt * _Nullable end __attribute__((swift_name("end"))); -@property (readonly) ComponentboxInt * _Nullable start __attribute__((swift_name("start"))); -@property (readonly) ComponentboxInt * _Nullable top __attribute__((swift_name("top"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Padding.Companion"))) -@interface ComponentboxPaddingCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxPaddingCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Shape"))) -@interface ComponentboxShape : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxShapeCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxShape *rectangleshape __attribute__((swift_name("rectangleshape"))); -@property (class, readonly) ComponentboxShape *roundedcornershape __attribute__((swift_name("roundedcornershape"))); -@property (class, readonly) ComponentboxShape *circleshape __attribute__((swift_name("circleshape"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Shape.Companion"))) -@interface ComponentboxShapeCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxShapeCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((swift_name("StringRes"))) -@protocol ComponentboxStringRes -@required -@end; - -__attribute__((swift_name("TextStyle"))) -@protocol ComponentboxTextStyle -@required -@end; - -__attribute__((swift_name("Themer"))) -@interface ComponentboxThemer : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@end; - -__attribute__((swift_name("Typography"))) -@protocol ComponentboxTypography -@required -- (NSMutableArray> *)list __attribute__((swift_name("list()"))); -@property (readonly) id body1 __attribute__((swift_name("body1"))); -@property (readonly) id body2 __attribute__((swift_name("body2"))); -@property (readonly) id button __attribute__((swift_name("button"))); -@property (readonly) id caption __attribute__((swift_name("caption"))); -@property (readonly) id h1 __attribute__((swift_name("h1"))); -@property (readonly) id h2 __attribute__((swift_name("h2"))); -@property (readonly) id h3 __attribute__((swift_name("h3"))); -@property (readonly) id h4 __attribute__((swift_name("h4"))); -@property (readonly) id h5 __attribute__((swift_name("h5"))); -@property (readonly) id h6 __attribute__((swift_name("h6"))); -@end; - -__attribute__((swift_name("VectorRes"))) -@protocol ComponentboxVectorRes -@required -@end; - -@interface ComponentboxComponentBoxClient (Extensions) -- (ComponentboxComponentBoxClient *)freeze __attribute__((swift_name("freeze()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBoxClientKt"))) -@interface ComponentboxComponentBoxClientKt : ComponentboxBase -+ (id _Nullable)freeze:(id _Nullable)receiver __attribute__((swift_name("freeze(_:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ConstantsKt"))) -@interface ComponentboxConstantsKt : ComponentboxBase -@property (class, readonly) NSString *COMPONENT_BOX_FALLBACK_DRAWABLE_URL __attribute__((swift_name("COMPONENT_BOX_FALLBACK_DRAWABLE_URL"))); -@property (class, readonly) NSString *COMPONENT_BOX_ZIPLINE_SERVICE __attribute__((swift_name("COMPONENT_BOX_ZIPLINE_SERVICE"))); -@end; - -__attribute__((swift_name("KotlinThrowable"))) -@interface ComponentboxKotlinThrowable : ComponentboxBase -- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -- (ComponentboxKotlinArray *)getStackTrace __attribute__((swift_name("getStackTrace()"))); -- (void)printStackTrace __attribute__((swift_name("printStackTrace()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxKotlinThrowable * _Nullable cause __attribute__((swift_name("cause"))); -@property (readonly) NSString * _Nullable message __attribute__((swift_name("message"))); -- (NSError *)asError __attribute__((swift_name("asError()"))); -@end; - -__attribute__((swift_name("KotlinException"))) -@interface ComponentboxKotlinException : ComponentboxKotlinThrowable -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); -@end; - -__attribute__((swift_name("KotlinRuntimeException"))) -@interface ComponentboxKotlinRuntimeException : ComponentboxKotlinException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); -@end; - -__attribute__((swift_name("KotlinIllegalStateException"))) -@interface ComponentboxKotlinIllegalStateException : ComponentboxKotlinRuntimeException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); -@end; - -__attribute__((swift_name("KotlinCancellationException"))) -@interface ComponentboxKotlinCancellationException : ComponentboxKotlinIllegalStateException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinUnit"))) -@interface ComponentboxKotlinUnit : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)unit __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKotlinUnit *shared __attribute__((swift_name("shared"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreCoroutineScope"))) -@protocol ComponentboxKotlinx_coroutines_coreCoroutineScope -@required -@property (readonly) id coroutineContext __attribute__((swift_name("coroutineContext"))); -@end; - -__attribute__((swift_name("Ktor_ioCloseable"))) -@protocol ComponentboxKtor_ioCloseable -@required -- (void)close __attribute__((swift_name("close()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpClient"))) -@interface ComponentboxKtor_client_coreHttpClient : ComponentboxBase -- (instancetype)initWithEngine:(id)engine userConfig:(ComponentboxKtor_client_coreHttpClientConfig *)userConfig __attribute__((swift_name("init(engine:userConfig:)"))) __attribute__((objc_designated_initializer)); -- (void)close __attribute__((swift_name("close()"))); -- (ComponentboxKtor_client_coreHttpClient *)configBlock:(void (^)(ComponentboxKtor_client_coreHttpClientConfig *))block __attribute__((swift_name("config(block:)"))); -- (BOOL)isSupportedCapability:(id)capability __attribute__((swift_name("isSupported(capability:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id attributes __attribute__((swift_name("attributes"))); -@property (readonly) id coroutineContext __attribute__((swift_name("coroutineContext"))); -@property (readonly) id engine __attribute__((swift_name("engine"))); -@property (readonly) ComponentboxKtor_client_coreHttpClientEngineConfig *engineConfig __attribute__((swift_name("engineConfig"))); -@property (readonly) ComponentboxKtor_eventsEvents *monitor __attribute__((swift_name("monitor"))); -@property (readonly) ComponentboxKtor_client_coreHttpReceivePipeline *receivePipeline __attribute__((swift_name("receivePipeline"))); -@property (readonly) ComponentboxKtor_client_coreHttpRequestPipeline *requestPipeline __attribute__((swift_name("requestPipeline"))); -@property (readonly) ComponentboxKtor_client_coreHttpResponsePipeline *responsePipeline __attribute__((swift_name("responsePipeline"))); -@property (readonly) ComponentboxKtor_client_coreHttpSendPipeline *sendPipeline __attribute__((swift_name("sendPipeline"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinArray"))) -@interface ComponentboxKotlinArray : ComponentboxBase -+ (instancetype)arrayWithSize:(int32_t)size init:(T _Nullable (^)(ComponentboxInt *))init __attribute__((swift_name("init(size:init:)"))); -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); -- (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreFlow"))) -@protocol ComponentboxKotlinx_coroutines_coreFlow -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)collectCollector:(id)collector completionHandler:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("collect(collector:completionHandler:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinEnumCompanion"))) -@interface ComponentboxKotlinEnumCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKotlinEnumCompanion *shared __attribute__((swift_name("shared"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreEncoder"))) -@protocol ComponentboxKotlinx_serialization_coreEncoder -@required -- (id)beginCollectionDescriptor:(id)descriptor collectionSize:(int32_t)collectionSize __attribute__((swift_name("beginCollection(descriptor:collectionSize:)"))); -- (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); -- (void)encodeBooleanValue:(BOOL)value __attribute__((swift_name("encodeBoolean(value:)"))); -- (void)encodeByteValue:(int8_t)value __attribute__((swift_name("encodeByte(value:)"))); -- (void)encodeCharValue:(unichar)value __attribute__((swift_name("encodeChar(value:)"))); -- (void)encodeDoubleValue:(double)value __attribute__((swift_name("encodeDouble(value:)"))); -- (void)encodeEnumEnumDescriptor:(id)enumDescriptor index:(int32_t)index __attribute__((swift_name("encodeEnum(enumDescriptor:index:)"))); -- (void)encodeFloatValue:(float)value __attribute__((swift_name("encodeFloat(value:)"))); -- (id)encodeInlineInlineDescriptor:(id)inlineDescriptor __attribute__((swift_name("encodeInline(inlineDescriptor:)"))); -- (void)encodeIntValue:(int32_t)value __attribute__((swift_name("encodeInt(value:)"))); -- (void)encodeLongValue:(int64_t)value __attribute__((swift_name("encodeLong(value:)"))); -- (void)encodeNotNullMark __attribute__((swift_name("encodeNotNullMark()"))); -- (void)encodeNull __attribute__((swift_name("encodeNull()"))); -- (void)encodeNullableSerializableValueSerializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeNullableSerializableValue(serializer:value:)"))); -- (void)encodeSerializableValueSerializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeSerializableValue(serializer:value:)"))); -- (void)encodeShortValue:(int16_t)value __attribute__((swift_name("encodeShort(value:)"))); -- (void)encodeStringValue:(NSString *)value __attribute__((swift_name("encodeString(value:)"))); -@property (readonly) ComponentboxKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreSerialDescriptor"))) -@protocol ComponentboxKotlinx_serialization_coreSerialDescriptor -@required -- (NSArray> *)getElementAnnotationsIndex:(int32_t)index __attribute__((swift_name("getElementAnnotations(index:)"))); -- (id)getElementDescriptorIndex:(int32_t)index __attribute__((swift_name("getElementDescriptor(index:)"))); -- (int32_t)getElementIndexName:(NSString *)name __attribute__((swift_name("getElementIndex(name:)"))); -- (NSString *)getElementNameIndex:(int32_t)index __attribute__((swift_name("getElementName(index:)"))); -- (BOOL)isElementOptionalIndex:(int32_t)index __attribute__((swift_name("isElementOptional(index:)"))); -@property (readonly) NSArray> *annotations __attribute__((swift_name("annotations"))); -@property (readonly) int32_t elementsCount __attribute__((swift_name("elementsCount"))); -@property (readonly) BOOL isInline __attribute__((swift_name("isInline"))); -@property (readonly) BOOL isNullable __attribute__((swift_name("isNullable"))); -@property (readonly) ComponentboxKotlinx_serialization_coreSerialKind *kind __attribute__((swift_name("kind"))); -@property (readonly) NSString *serialName __attribute__((swift_name("serialName"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreDecoder"))) -@protocol ComponentboxKotlinx_serialization_coreDecoder -@required -- (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); -- (BOOL)decodeBoolean __attribute__((swift_name("decodeBoolean()"))); -- (int8_t)decodeByte __attribute__((swift_name("decodeByte()"))); -- (unichar)decodeChar __attribute__((swift_name("decodeChar()"))); -- (double)decodeDouble __attribute__((swift_name("decodeDouble()"))); -- (int32_t)decodeEnumEnumDescriptor:(id)enumDescriptor __attribute__((swift_name("decodeEnum(enumDescriptor:)"))); -- (float)decodeFloat __attribute__((swift_name("decodeFloat()"))); -- (id)decodeInlineInlineDescriptor:(id)inlineDescriptor __attribute__((swift_name("decodeInline(inlineDescriptor:)"))); -- (int32_t)decodeInt __attribute__((swift_name("decodeInt()"))); -- (int64_t)decodeLong __attribute__((swift_name("decodeLong()"))); -- (BOOL)decodeNotNullMark __attribute__((swift_name("decodeNotNullMark()"))); -- (ComponentboxKotlinNothing * _Nullable)decodeNull __attribute__((swift_name("decodeNull()"))); -- (id _Nullable)decodeNullableSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeNullableSerializableValue(deserializer:)"))); -- (id _Nullable)decodeSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeSerializableValue(deserializer:)"))); -- (int16_t)decodeShort __attribute__((swift_name("decodeShort()"))); -- (NSString *)decodeString __attribute__((swift_name("decodeString()"))); -@property (readonly) ComponentboxKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_jsonJsonElement"))) -@interface ComponentboxKotlinx_serialization_jsonJsonElement : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property (class, readonly, getter=companion) ComponentboxKotlinx_serialization_jsonJsonElementCompanion *companion __attribute__((swift_name("companion"))); -@end; - -__attribute__((swift_name("KotlinCoroutineContext"))) -@protocol ComponentboxKotlinCoroutineContext -@required -- (id _Nullable)foldInitial:(id _Nullable)initial operation:(id _Nullable (^)(id _Nullable, id))operation __attribute__((swift_name("fold(initial:operation:)"))); -- (id _Nullable)getKey:(id)key __attribute__((swift_name("get(key:)"))); -- (id)minusKeyKey:(id)key __attribute__((swift_name("minusKey(key:)"))); -- (id)plusContext:(id)context __attribute__((swift_name("plus(context:)"))); -@end; - -__attribute__((swift_name("Ktor_client_coreHttpClientEngine"))) -@protocol ComponentboxKtor_client_coreHttpClientEngine -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)executeData:(ComponentboxKtor_client_coreHttpRequestData *)data completionHandler:(void (^)(ComponentboxKtor_client_coreHttpResponseData * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(data:completionHandler:)"))); -- (void)installClient:(ComponentboxKtor_client_coreHttpClient *)client __attribute__((swift_name("install(client:)"))); -@property (readonly) ComponentboxKtor_client_coreHttpClientEngineConfig *config __attribute__((swift_name("config"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreCoroutineDispatcher *dispatcher __attribute__((swift_name("dispatcher"))); -@property (readonly) NSSet> *supportedCapabilities __attribute__((swift_name("supportedCapabilities"))); -@end; - -__attribute__((swift_name("Ktor_client_coreHttpClientEngineConfig"))) -@interface ComponentboxKtor_client_coreHttpClientEngineConfig : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property BOOL pipelining __attribute__((swift_name("pipelining"))); -@property ComponentboxKtor_client_coreProxyConfig * _Nullable proxy __attribute__((swift_name("proxy"))); -@property int32_t threadsCount __attribute__((swift_name("threadsCount"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpClientConfig"))) -@interface ComponentboxKtor_client_coreHttpClientConfig : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (ComponentboxKtor_client_coreHttpClientConfig *)clone __attribute__((swift_name("clone()"))); -- (void)engineBlock:(void (^)(T))block __attribute__((swift_name("engine(block:)"))); -- (void)installClient:(ComponentboxKtor_client_coreHttpClient *)client __attribute__((swift_name("install(client:)"))); -- (void)installPlugin:(id)plugin configure:(void (^)(id))configure __attribute__((swift_name("install(plugin:configure:)"))); -- (void)installKey:(NSString *)key block:(void (^)(ComponentboxKtor_client_coreHttpClient *))block __attribute__((swift_name("install(key:block:)"))); -- (void)plusAssignOther:(ComponentboxKtor_client_coreHttpClientConfig *)other __attribute__((swift_name("plusAssign(other:)"))); -@property BOOL developmentMode __attribute__((swift_name("developmentMode"))); -@property BOOL expectSuccess __attribute__((swift_name("expectSuccess"))); -@property BOOL followRedirects __attribute__((swift_name("followRedirects"))); -@property BOOL useDefaultTransformers __attribute__((swift_name("useDefaultTransformers"))); -@end; - -__attribute__((swift_name("Ktor_client_coreHttpClientEngineCapability"))) -@protocol ComponentboxKtor_client_coreHttpClientEngineCapability -@required -@end; - -__attribute__((swift_name("Ktor_utilsAttributes"))) -@protocol ComponentboxKtor_utilsAttributes -@required -- (id)computeIfAbsentKey:(ComponentboxKtor_utilsAttributeKey *)key block:(id (^)(void))block __attribute__((swift_name("computeIfAbsent(key:block:)"))); -- (BOOL)containsKey:(ComponentboxKtor_utilsAttributeKey *)key __attribute__((swift_name("contains(key:)"))); -- (id)getKey_:(ComponentboxKtor_utilsAttributeKey *)key __attribute__((swift_name("get(key_:)"))); -- (id _Nullable)getOrNullKey:(ComponentboxKtor_utilsAttributeKey *)key __attribute__((swift_name("getOrNull(key:)"))); -- (void)putKey:(ComponentboxKtor_utilsAttributeKey *)key value:(id)value __attribute__((swift_name("put(key:value:)"))); -- (void)removeKey:(ComponentboxKtor_utilsAttributeKey *)key __attribute__((swift_name("remove(key:)"))); -- (id)takeKey:(ComponentboxKtor_utilsAttributeKey *)key __attribute__((swift_name("take(key:)"))); -- (id _Nullable)takeOrNullKey:(ComponentboxKtor_utilsAttributeKey *)key __attribute__((swift_name("takeOrNull(key:)"))); -@property (readonly) NSArray *> *allKeys __attribute__((swift_name("allKeys"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_eventsEvents"))) -@interface ComponentboxKtor_eventsEvents : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)raiseDefinition:(ComponentboxKtor_eventsEventDefinition *)definition value:(id _Nullable)value __attribute__((swift_name("raise(definition:value:)"))); -- (id)subscribeDefinition:(ComponentboxKtor_eventsEventDefinition *)definition handler:(void (^)(id _Nullable))handler __attribute__((swift_name("subscribe(definition:handler:)"))); -- (void)unsubscribeDefinition:(ComponentboxKtor_eventsEventDefinition *)definition handler:(void (^)(id _Nullable))handler __attribute__((swift_name("unsubscribe(definition:handler:)"))); -@end; - -__attribute__((swift_name("Ktor_utilsPipeline"))) -@interface ComponentboxKtor_utilsPipeline : ComponentboxBase -- (instancetype)initWithPhase:(ComponentboxKtor_utilsPipelinePhase *)phase interceptors:(NSArray> *)interceptors __attribute__((swift_name("init(phase:interceptors:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithPhases:(ComponentboxKotlinArray *)phases __attribute__((swift_name("init(phases:)"))) __attribute__((objc_designated_initializer)); -- (void)addPhasePhase:(ComponentboxKtor_utilsPipelinePhase *)phase __attribute__((swift_name("addPhase(phase:)"))); -- (void)afterIntercepted __attribute__((swift_name("afterIntercepted()"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)executeContext:(TContext)context subject:(TSubject)subject completionHandler:(void (^)(TSubject _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(context:subject:completionHandler:)"))); -- (void)insertPhaseAfterReference:(ComponentboxKtor_utilsPipelinePhase *)reference phase:(ComponentboxKtor_utilsPipelinePhase *)phase __attribute__((swift_name("insertPhaseAfter(reference:phase:)"))); -- (void)insertPhaseBeforeReference:(ComponentboxKtor_utilsPipelinePhase *)reference phase:(ComponentboxKtor_utilsPipelinePhase *)phase __attribute__((swift_name("insertPhaseBefore(reference:phase:)"))); -- (void)interceptPhase:(ComponentboxKtor_utilsPipelinePhase *)phase block:(id)block __attribute__((swift_name("intercept(phase:block:)"))); -- (NSArray> *)interceptorsForPhasePhase:(ComponentboxKtor_utilsPipelinePhase *)phase __attribute__((swift_name("interceptorsForPhase(phase:)"))); -- (void)mergeFrom:(ComponentboxKtor_utilsPipeline *)from __attribute__((swift_name("merge(from:)"))); -- (void)mergePhasesFrom:(ComponentboxKtor_utilsPipeline *)from __attribute__((swift_name("mergePhases(from:)"))); -@property (readonly) id attributes __attribute__((swift_name("attributes"))); -@property (readonly) BOOL developmentMode __attribute__((swift_name("developmentMode"))); -@property (readonly) BOOL isEmpty __attribute__((swift_name("isEmpty"))); -@property (readonly) NSArray *items __attribute__((swift_name("items"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpReceivePipeline"))) -@interface ComponentboxKtor_client_coreHttpReceivePipeline : ComponentboxKtor_utilsPipeline -- (instancetype)initWithDevelopmentMode:(BOOL)developmentMode __attribute__((swift_name("init(developmentMode:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithPhase:(ComponentboxKtor_utilsPipelinePhase *)phase interceptors:(NSArray> *)interceptors __attribute__((swift_name("init(phase:interceptors:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -- (instancetype)initWithPhases:(ComponentboxKotlinArray *)phases __attribute__((swift_name("init(phases:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_client_coreHttpReceivePipelinePhases *companion __attribute__((swift_name("companion"))); -@property (readonly) BOOL developmentMode __attribute__((swift_name("developmentMode"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpRequestPipeline"))) -@interface ComponentboxKtor_client_coreHttpRequestPipeline : ComponentboxKtor_utilsPipeline -- (instancetype)initWithDevelopmentMode:(BOOL)developmentMode __attribute__((swift_name("init(developmentMode:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithPhase:(ComponentboxKtor_utilsPipelinePhase *)phase interceptors:(NSArray> *)interceptors __attribute__((swift_name("init(phase:interceptors:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -- (instancetype)initWithPhases:(ComponentboxKotlinArray *)phases __attribute__((swift_name("init(phases:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_client_coreHttpRequestPipelinePhases *companion __attribute__((swift_name("companion"))); -@property (readonly) BOOL developmentMode __attribute__((swift_name("developmentMode"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpResponsePipeline"))) -@interface ComponentboxKtor_client_coreHttpResponsePipeline : ComponentboxKtor_utilsPipeline -- (instancetype)initWithDevelopmentMode:(BOOL)developmentMode __attribute__((swift_name("init(developmentMode:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithPhase:(ComponentboxKtor_utilsPipelinePhase *)phase interceptors:(NSArray> *)interceptors __attribute__((swift_name("init(phase:interceptors:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -- (instancetype)initWithPhases:(ComponentboxKotlinArray *)phases __attribute__((swift_name("init(phases:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_client_coreHttpResponsePipelinePhases *companion __attribute__((swift_name("companion"))); -@property (readonly) BOOL developmentMode __attribute__((swift_name("developmentMode"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpSendPipeline"))) -@interface ComponentboxKtor_client_coreHttpSendPipeline : ComponentboxKtor_utilsPipeline -- (instancetype)initWithDevelopmentMode:(BOOL)developmentMode __attribute__((swift_name("init(developmentMode:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithPhase:(ComponentboxKtor_utilsPipelinePhase *)phase interceptors:(NSArray> *)interceptors __attribute__((swift_name("init(phase:interceptors:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -- (instancetype)initWithPhases:(ComponentboxKotlinArray *)phases __attribute__((swift_name("init(phases:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_client_coreHttpSendPipelinePhases *companion __attribute__((swift_name("companion"))); -@property (readonly) BOOL developmentMode __attribute__((swift_name("developmentMode"))); -@end; - -__attribute__((swift_name("KotlinIterator"))) -@protocol ComponentboxKotlinIterator -@required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreFlowCollector"))) -@protocol ComponentboxKotlinx_coroutines_coreFlowCollector -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)emitValue:(id _Nullable)value completionHandler:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("emit(value:completionHandler:)"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreCompositeEncoder"))) -@protocol ComponentboxKotlinx_serialization_coreCompositeEncoder -@required -- (void)encodeBooleanElementDescriptor:(id)descriptor index:(int32_t)index value:(BOOL)value __attribute__((swift_name("encodeBooleanElement(descriptor:index:value:)"))); -- (void)encodeByteElementDescriptor:(id)descriptor index:(int32_t)index value:(int8_t)value __attribute__((swift_name("encodeByteElement(descriptor:index:value:)"))); -- (void)encodeCharElementDescriptor:(id)descriptor index:(int32_t)index value:(unichar)value __attribute__((swift_name("encodeCharElement(descriptor:index:value:)"))); -- (void)encodeDoubleElementDescriptor:(id)descriptor index:(int32_t)index value:(double)value __attribute__((swift_name("encodeDoubleElement(descriptor:index:value:)"))); -- (void)encodeFloatElementDescriptor:(id)descriptor index:(int32_t)index value:(float)value __attribute__((swift_name("encodeFloatElement(descriptor:index:value:)"))); -- (id)encodeInlineElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("encodeInlineElement(descriptor:index:)"))); -- (void)encodeIntElementDescriptor:(id)descriptor index:(int32_t)index value:(int32_t)value __attribute__((swift_name("encodeIntElement(descriptor:index:value:)"))); -- (void)encodeLongElementDescriptor:(id)descriptor index:(int32_t)index value:(int64_t)value __attribute__((swift_name("encodeLongElement(descriptor:index:value:)"))); -- (void)encodeNullableSerializableElementDescriptor:(id)descriptor index:(int32_t)index serializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeNullableSerializableElement(descriptor:index:serializer:value:)"))); -- (void)encodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index serializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeSerializableElement(descriptor:index:serializer:value:)"))); -- (void)encodeShortElementDescriptor:(id)descriptor index:(int32_t)index value:(int16_t)value __attribute__((swift_name("encodeShortElement(descriptor:index:value:)"))); -- (void)encodeStringElementDescriptor:(id)descriptor index:(int32_t)index value:(NSString *)value __attribute__((swift_name("encodeStringElement(descriptor:index:value:)"))); -- (void)endStructureDescriptor:(id)descriptor __attribute__((swift_name("endStructure(descriptor:)"))); -- (BOOL)shouldEncodeElementDefaultDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("shouldEncodeElementDefault(descriptor:index:)"))); -@property (readonly) ComponentboxKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreSerializersModule"))) -@interface ComponentboxKotlinx_serialization_coreSerializersModule : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)dumpToCollector:(id)collector __attribute__((swift_name("dumpTo(collector:)"))); -- (id _Nullable)getContextualKClass:(id)kClass typeArgumentsSerializers:(NSArray> *)typeArgumentsSerializers __attribute__((swift_name("getContextual(kClass:typeArgumentsSerializers:)"))); -- (id _Nullable)getPolymorphicBaseClass:(id)baseClass value:(id)value __attribute__((swift_name("getPolymorphic(baseClass:value:)"))); -- (id _Nullable)getPolymorphicBaseClass:(id)baseClass serializedClassName:(NSString * _Nullable)serializedClassName __attribute__((swift_name("getPolymorphic(baseClass:serializedClassName:)"))); -@end; - -__attribute__((swift_name("KotlinAnnotation"))) -@protocol ComponentboxKotlinAnnotation -@required -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreSerialKind"))) -@interface ComponentboxKotlinx_serialization_coreSerialKind : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreCompositeDecoder"))) -@protocol ComponentboxKotlinx_serialization_coreCompositeDecoder -@required -- (BOOL)decodeBooleanElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeBooleanElement(descriptor:index:)"))); -- (int8_t)decodeByteElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeByteElement(descriptor:index:)"))); -- (unichar)decodeCharElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeCharElement(descriptor:index:)"))); -- (int32_t)decodeCollectionSizeDescriptor:(id)descriptor __attribute__((swift_name("decodeCollectionSize(descriptor:)"))); -- (double)decodeDoubleElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeDoubleElement(descriptor:index:)"))); -- (int32_t)decodeElementIndexDescriptor:(id)descriptor __attribute__((swift_name("decodeElementIndex(descriptor:)"))); -- (float)decodeFloatElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeFloatElement(descriptor:index:)"))); -- (id)decodeInlineElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeInlineElement(descriptor:index:)"))); -- (int32_t)decodeIntElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeIntElement(descriptor:index:)"))); -- (int64_t)decodeLongElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeLongElement(descriptor:index:)"))); -- (id _Nullable)decodeNullableSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeNullableSerializableElement(descriptor:index:deserializer:previousValue:)"))); -- (BOOL)decodeSequentially __attribute__((swift_name("decodeSequentially()"))); -- (id _Nullable)decodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeSerializableElement(descriptor:index:deserializer:previousValue:)"))); -- (int16_t)decodeShortElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeShortElement(descriptor:index:)"))); -- (NSString *)decodeStringElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeStringElement(descriptor:index:)"))); -- (void)endStructureDescriptor:(id)descriptor __attribute__((swift_name("endStructure(descriptor:)"))); -@property (readonly) ComponentboxKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinNothing"))) -@interface ComponentboxKotlinNothing : ComponentboxBase -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Kotlinx_serialization_jsonJsonElement.Companion"))) -@interface ComponentboxKotlinx_serialization_jsonJsonElementCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKotlinx_serialization_jsonJsonElementCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((swift_name("KotlinCoroutineContextElement"))) -@protocol ComponentboxKotlinCoroutineContextElement -@required -@property (readonly) id key __attribute__((swift_name("key"))); -@end; - -__attribute__((swift_name("KotlinCoroutineContextKey"))) -@protocol ComponentboxKotlinCoroutineContextKey -@required -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpRequestData"))) -@interface ComponentboxKtor_client_coreHttpRequestData : ComponentboxBase -- (instancetype)initWithUrl:(ComponentboxKtor_httpUrl *)url method:(ComponentboxKtor_httpHttpMethod *)method headers:(id)headers body:(ComponentboxKtor_httpOutgoingContent *)body executionContext:(id)executionContext attributes:(id)attributes __attribute__((swift_name("init(url:method:headers:body:executionContext:attributes:)"))) __attribute__((objc_designated_initializer)); -- (id _Nullable)getCapabilityOrNullKey:(id)key __attribute__((swift_name("getCapabilityOrNull(key:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id attributes __attribute__((swift_name("attributes"))); -@property (readonly) ComponentboxKtor_httpOutgoingContent *body __attribute__((swift_name("body"))); -@property (readonly) id executionContext __attribute__((swift_name("executionContext"))); -@property (readonly) id headers __attribute__((swift_name("headers"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *method __attribute__((swift_name("method"))); -@property (readonly) ComponentboxKtor_httpUrl *url __attribute__((swift_name("url"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpResponseData"))) -@interface ComponentboxKtor_client_coreHttpResponseData : ComponentboxBase -- (instancetype)initWithStatusCode:(ComponentboxKtor_httpHttpStatusCode *)statusCode requestTime:(ComponentboxKtor_utilsGMTDate *)requestTime headers:(id)headers version:(ComponentboxKtor_httpHttpProtocolVersion *)version body:(id)body callContext:(id)callContext __attribute__((swift_name("init(statusCode:requestTime:headers:version:body:callContext:)"))) __attribute__((objc_designated_initializer)); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id body __attribute__((swift_name("body"))); -@property (readonly) id callContext __attribute__((swift_name("callContext"))); -@property (readonly) id headers __attribute__((swift_name("headers"))); -@property (readonly) ComponentboxKtor_utilsGMTDate *requestTime __attribute__((swift_name("requestTime"))); -@property (readonly) ComponentboxKtor_utilsGMTDate *responseTime __attribute__((swift_name("responseTime"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *statusCode __attribute__((swift_name("statusCode"))); -@property (readonly) ComponentboxKtor_httpHttpProtocolVersion *version __attribute__((swift_name("version"))); -@end; - -__attribute__((swift_name("KotlinAbstractCoroutineContextElement"))) -@interface ComponentboxKotlinAbstractCoroutineContextElement : ComponentboxBase -- (instancetype)initWithKey:(id)key __attribute__((swift_name("init(key:)"))) __attribute__((objc_designated_initializer)); -@property (readonly) id key __attribute__((swift_name("key"))); -@end; - -__attribute__((swift_name("KotlinContinuationInterceptor"))) -@protocol ComponentboxKotlinContinuationInterceptor -@required -- (id)interceptContinuationContinuation:(id)continuation __attribute__((swift_name("interceptContinuation(continuation:)"))); -- (void)releaseInterceptedContinuationContinuation:(id)continuation __attribute__((swift_name("releaseInterceptedContinuation(continuation:)"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreCoroutineDispatcher"))) -@interface ComponentboxKotlinx_coroutines_coreCoroutineDispatcher : ComponentboxKotlinAbstractCoroutineContextElement -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithKey:(id)key __attribute__((swift_name("init(key:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKotlinx_coroutines_coreCoroutineDispatcherKey *companion __attribute__((swift_name("companion"))); -- (void)dispatchContext:(id)context block:(id)block __attribute__((swift_name("dispatch(context:block:)"))); -- (void)dispatchYieldContext:(id)context block:(id)block __attribute__((swift_name("dispatchYield(context:block:)"))); -- (id)interceptContinuationContinuation:(id)continuation __attribute__((swift_name("interceptContinuation(continuation:)"))); -- (BOOL)isDispatchNeededContext:(id)context __attribute__((swift_name("isDispatchNeeded(context:)"))); -- (ComponentboxKotlinx_coroutines_coreCoroutineDispatcher *)limitedParallelismParallelism:(int32_t)parallelism __attribute__((swift_name("limitedParallelism(parallelism:)"))); -- (ComponentboxKotlinx_coroutines_coreCoroutineDispatcher *)plusOther:(ComponentboxKotlinx_coroutines_coreCoroutineDispatcher *)other __attribute__((swift_name("plus(other:)"))) __attribute__((unavailable("Operator '+' on two CoroutineDispatcher objects is meaningless. CoroutineDispatcher is a coroutine context element and `+` is a set-sum operator for coroutine contexts. The dispatcher to the right of `+` just replaces the dispatcher to the left."))); -- (void)releaseInterceptedContinuationContinuation:(id)continuation __attribute__((swift_name("releaseInterceptedContinuation(continuation:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreProxyConfig"))) -@interface ComponentboxKtor_client_coreProxyConfig : ComponentboxBase -- (instancetype)initWithUrl:(ComponentboxKtor_httpUrl *)url __attribute__((swift_name("init(url:)"))) __attribute__((objc_designated_initializer)); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxKtor_httpUrl *url __attribute__((swift_name("url"))); -@end; - -__attribute__((swift_name("Ktor_client_coreHttpClientPlugin"))) -@protocol ComponentboxKtor_client_coreHttpClientPlugin -@required -- (void)installPlugin:(id)plugin scope:(ComponentboxKtor_client_coreHttpClient *)scope __attribute__((swift_name("install(plugin:scope:)"))); -- (id)prepareBlock:(void (^)(id))block __attribute__((swift_name("prepare(block:)"))); -@property (readonly) ComponentboxKtor_utilsAttributeKey *key __attribute__((swift_name("key"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsAttributeKey"))) -@interface ComponentboxKtor_utilsAttributeKey : ComponentboxBase -- (instancetype)initWithName:(NSString *)name __attribute__((swift_name("init(name:)"))) __attribute__((objc_designated_initializer)); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@end; - -__attribute__((swift_name("Ktor_eventsEventDefinition"))) -@interface ComponentboxKtor_eventsEventDefinition : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreDisposableHandle"))) -@protocol ComponentboxKotlinx_coroutines_coreDisposableHandle -@required -- (void)dispose __attribute__((swift_name("dispose()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsPipelinePhase"))) -@interface ComponentboxKtor_utilsPipelinePhase : ComponentboxBase -- (instancetype)initWithName:(NSString *)name __attribute__((swift_name("init(name:)"))) __attribute__((objc_designated_initializer)); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@end; - -__attribute__((swift_name("KotlinFunction"))) -@protocol ComponentboxKotlinFunction -@required -@end; - -__attribute__((swift_name("KotlinSuspendFunction2"))) -@protocol ComponentboxKotlinSuspendFunction2 -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)invokeP1:(id _Nullable)p1 p2:(id _Nullable)p2 completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke(p1:p2:completionHandler:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpReceivePipeline.Phases"))) -@interface ComponentboxKtor_client_coreHttpReceivePipelinePhases : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)phases __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_client_coreHttpReceivePipelinePhases *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *After __attribute__((swift_name("After"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Before __attribute__((swift_name("Before"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *State __attribute__((swift_name("State"))); -@end; - -__attribute__((swift_name("Ktor_httpHttpMessage"))) -@protocol ComponentboxKtor_httpHttpMessage -@required -@property (readonly) id headers __attribute__((swift_name("headers"))); -@end; - -__attribute__((swift_name("Ktor_client_coreHttpResponse"))) -@interface ComponentboxKtor_client_coreHttpResponse : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxKtor_client_coreHttpClientCall *call __attribute__((swift_name("call"))); -@property (readonly) id content __attribute__((swift_name("content"))); -@property (readonly) ComponentboxKtor_utilsGMTDate *requestTime __attribute__((swift_name("requestTime"))); -@property (readonly) ComponentboxKtor_utilsGMTDate *responseTime __attribute__((swift_name("responseTime"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *status __attribute__((swift_name("status"))); -@property (readonly) ComponentboxKtor_httpHttpProtocolVersion *version __attribute__((swift_name("version"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpRequestPipeline.Phases"))) -@interface ComponentboxKtor_client_coreHttpRequestPipelinePhases : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)phases __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_client_coreHttpRequestPipelinePhases *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Before __attribute__((swift_name("Before"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Render __attribute__((swift_name("Render"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Send __attribute__((swift_name("Send"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *State __attribute__((swift_name("State"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Transform __attribute__((swift_name("Transform"))); -@end; - -__attribute__((swift_name("Ktor_httpHttpMessageBuilder"))) -@protocol ComponentboxKtor_httpHttpMessageBuilder -@required -@property (readonly) ComponentboxKtor_httpHeadersBuilder *headers __attribute__((swift_name("headers"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpRequestBuilder"))) -@interface ComponentboxKtor_client_coreHttpRequestBuilder : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property (class, readonly, getter=companion) ComponentboxKtor_client_coreHttpRequestBuilderCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxKtor_client_coreHttpRequestData *)build __attribute__((swift_name("build()"))); -- (id _Nullable)getCapabilityOrNullKey:(id)key __attribute__((swift_name("getCapabilityOrNull(key:)"))); -- (void)setAttributesBlock:(void (^)(id))block __attribute__((swift_name("setAttributes(block:)"))); -- (void)setCapabilityKey:(id)key capability:(id)capability __attribute__((swift_name("setCapability(key:capability:)"))); -- (ComponentboxKtor_client_coreHttpRequestBuilder *)takeFromBuilder:(ComponentboxKtor_client_coreHttpRequestBuilder *)builder __attribute__((swift_name("takeFrom(builder:)"))); -- (ComponentboxKtor_client_coreHttpRequestBuilder *)takeFromWithExecutionContextBuilder:(ComponentboxKtor_client_coreHttpRequestBuilder *)builder __attribute__((swift_name("takeFromWithExecutionContext(builder:)"))); -- (void)urlBlock:(void (^)(ComponentboxKtor_httpURLBuilder *, ComponentboxKtor_httpURLBuilder *))block __attribute__((swift_name("url(block:)"))); -@property (readonly) id attributes __attribute__((swift_name("attributes"))); -@property id body __attribute__((swift_name("body"))); -@property ComponentboxKtor_utilsTypeInfo * _Nullable bodyType __attribute__((swift_name("bodyType"))); -@property (readonly) id executionContext __attribute__((swift_name("executionContext"))); -@property (readonly) ComponentboxKtor_httpHeadersBuilder *headers __attribute__((swift_name("headers"))); -@property ComponentboxKtor_httpHttpMethod *method __attribute__((swift_name("method"))); -@property (readonly) ComponentboxKtor_httpURLBuilder *url __attribute__((swift_name("url"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpResponsePipeline.Phases"))) -@interface ComponentboxKtor_client_coreHttpResponsePipelinePhases : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)phases __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_client_coreHttpResponsePipelinePhases *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *After __attribute__((swift_name("After"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Parse __attribute__((swift_name("Parse"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Receive __attribute__((swift_name("Receive"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *State __attribute__((swift_name("State"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Transform __attribute__((swift_name("Transform"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpResponseContainer"))) -@interface ComponentboxKtor_client_coreHttpResponseContainer : ComponentboxBase -- (instancetype)initWithExpectedType:(ComponentboxKtor_utilsTypeInfo *)expectedType response:(id)response __attribute__((swift_name("init(expectedType:response:)"))) __attribute__((objc_designated_initializer)); -- (ComponentboxKtor_utilsTypeInfo *)component1 __attribute__((swift_name("component1()"))); -- (id)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxKtor_client_coreHttpResponseContainer *)doCopyExpectedType:(ComponentboxKtor_utilsTypeInfo *)expectedType response:(id)response __attribute__((swift_name("doCopy(expectedType:response:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxKtor_utilsTypeInfo *expectedType __attribute__((swift_name("expectedType"))); -@property (readonly) id response __attribute__((swift_name("response"))); -@end; - -__attribute__((swift_name("Ktor_client_coreHttpClientCall"))) -@interface ComponentboxKtor_client_coreHttpClientCall : ComponentboxBase -@property (class, readonly, getter=companion) ComponentboxKtor_client_coreHttpClientCallCompanion *companion __attribute__((swift_name("companion"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)bodyInfo:(ComponentboxKtor_utilsTypeInfo *)info completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("body(info:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)getResponseContentWithCompletionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("getResponseContent(completionHandler:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) BOOL allowDoubleReceive __attribute__((swift_name("allowDoubleReceive"))); -@property (readonly) id attributes __attribute__((swift_name("attributes"))); -@property (readonly) ComponentboxKtor_client_coreHttpClient * _Nullable client __attribute__((swift_name("client"))); -@property (readonly) id coroutineContext __attribute__((swift_name("coroutineContext"))); -@property (readonly) id request __attribute__((swift_name("request"))); -@property (readonly) ComponentboxKtor_client_coreHttpResponse *response __attribute__((swift_name("response"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpSendPipeline.Phases"))) -@interface ComponentboxKtor_client_coreHttpSendPipelinePhases : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)phases __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_client_coreHttpSendPipelinePhases *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Before __attribute__((swift_name("Before"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Engine __attribute__((swift_name("Engine"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Monitoring __attribute__((swift_name("Monitoring"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Receive __attribute__((swift_name("Receive"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *State __attribute__((swift_name("State"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreSerializersModuleCollector"))) -@protocol ComponentboxKotlinx_serialization_coreSerializersModuleCollector -@required -- (void)contextualKClass:(id)kClass provider:(id (^)(NSArray> *))provider __attribute__((swift_name("contextual(kClass:provider:)"))); -- (void)contextualKClass:(id)kClass serializer:(id)serializer __attribute__((swift_name("contextual(kClass:serializer:)"))); -- (void)polymorphicBaseClass:(id)baseClass actualClass:(id)actualClass actualSerializer:(id)actualSerializer __attribute__((swift_name("polymorphic(baseClass:actualClass:actualSerializer:)"))); -- (void)polymorphicDefaultBaseClass:(id)baseClass defaultDeserializerProvider:(id _Nullable (^)(NSString * _Nullable))defaultDeserializerProvider __attribute__((swift_name("polymorphicDefault(baseClass:defaultDeserializerProvider:)"))); -- (void)polymorphicDefaultDeserializerBaseClass:(id)baseClass defaultDeserializerProvider:(id _Nullable (^)(NSString * _Nullable))defaultDeserializerProvider __attribute__((swift_name("polymorphicDefaultDeserializer(baseClass:defaultDeserializerProvider:)"))); -- (void)polymorphicDefaultSerializerBaseClass:(id)baseClass defaultSerializerProvider:(id _Nullable (^)(id))defaultSerializerProvider __attribute__((swift_name("polymorphicDefaultSerializer(baseClass:defaultSerializerProvider:)"))); -@end; - -__attribute__((swift_name("KotlinKDeclarationContainer"))) -@protocol ComponentboxKotlinKDeclarationContainer -@required -@end; - -__attribute__((swift_name("KotlinKAnnotatedElement"))) -@protocol ComponentboxKotlinKAnnotatedElement -@required -@end; - -__attribute__((swift_name("KotlinKClassifier"))) -@protocol ComponentboxKotlinKClassifier -@required -@end; - -__attribute__((swift_name("KotlinKClass"))) -@protocol ComponentboxKotlinKClass -@required -- (BOOL)isInstanceValue:(id _Nullable)value __attribute__((swift_name("isInstance(value:)"))); -@property (readonly) NSString * _Nullable qualifiedName __attribute__((swift_name("qualifiedName"))); -@property (readonly) NSString * _Nullable simpleName __attribute__((swift_name("simpleName"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpUrl"))) -@interface ComponentboxKtor_httpUrl : ComponentboxBase -@property (class, readonly, getter=companion) ComponentboxKtor_httpUrlCompanion *companion __attribute__((swift_name("companion"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *encodedFragment __attribute__((swift_name("encodedFragment"))); -@property (readonly) NSString * _Nullable encodedPassword __attribute__((swift_name("encodedPassword"))); -@property (readonly) NSString *encodedPath __attribute__((swift_name("encodedPath"))); -@property (readonly) NSString *encodedPathAndQuery __attribute__((swift_name("encodedPathAndQuery"))); -@property (readonly) NSString *encodedQuery __attribute__((swift_name("encodedQuery"))); -@property (readonly) NSString * _Nullable encodedUser __attribute__((swift_name("encodedUser"))); -@property (readonly) NSString *fragment __attribute__((swift_name("fragment"))); -@property (readonly) NSString *host __attribute__((swift_name("host"))); -@property (readonly) id parameters __attribute__((swift_name("parameters"))); -@property (readonly) NSString * _Nullable password __attribute__((swift_name("password"))); -@property (readonly) NSArray *pathSegments __attribute__((swift_name("pathSegments"))); -@property (readonly) int32_t port __attribute__((swift_name("port"))); -@property (readonly) ComponentboxKtor_httpURLProtocol *protocol __attribute__((swift_name("protocol"))); -@property (readonly) int32_t specifiedPort __attribute__((swift_name("specifiedPort"))); -@property (readonly) BOOL trailingQuery __attribute__((swift_name("trailingQuery"))); -@property (readonly) NSString * _Nullable user __attribute__((swift_name("user"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHttpMethod"))) -@interface ComponentboxKtor_httpHttpMethod : ComponentboxBase -- (instancetype)initWithValue:(NSString *)value __attribute__((swift_name("init(value:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_httpHttpMethodCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxKtor_httpHttpMethod *)doCopyValue:(NSString *)value __attribute__((swift_name("doCopy(value:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *value __attribute__((swift_name("value"))); -@end; - -__attribute__((swift_name("Ktor_utilsStringValues"))) -@protocol ComponentboxKtor_utilsStringValues -@required -- (BOOL)containsName:(NSString *)name __attribute__((swift_name("contains(name:)"))); -- (BOOL)containsName:(NSString *)name value:(NSString *)value __attribute__((swift_name("contains(name:value:)"))); -- (NSSet> *)entries __attribute__((swift_name("entries()"))); -- (void)forEachBody:(void (^)(NSString *, NSArray *))body __attribute__((swift_name("forEach(body:)"))); -- (NSString * _Nullable)getName:(NSString *)name __attribute__((swift_name("get(name:)"))); -- (NSArray * _Nullable)getAllName:(NSString *)name __attribute__((swift_name("getAll(name:)"))); -- (BOOL)isEmpty_ __attribute__((swift_name("isEmpty()"))); -- (NSSet *)names __attribute__((swift_name("names()"))); -@property (readonly) BOOL caseInsensitiveName __attribute__((swift_name("caseInsensitiveName"))); -@end; - -__attribute__((swift_name("Ktor_httpHeaders"))) -@protocol ComponentboxKtor_httpHeaders -@required -@end; - -__attribute__((swift_name("Ktor_httpOutgoingContent"))) -@interface ComponentboxKtor_httpOutgoingContent : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (id _Nullable)getPropertyKey:(ComponentboxKtor_utilsAttributeKey *)key __attribute__((swift_name("getProperty(key:)"))); -- (void)setPropertyKey:(ComponentboxKtor_utilsAttributeKey *)key value:(id _Nullable)value __attribute__((swift_name("setProperty(key:value:)"))); -- (id _Nullable)trailers __attribute__((swift_name("trailers()"))); -@property (readonly) ComponentboxLong * _Nullable contentLength __attribute__((swift_name("contentLength"))); -@property (readonly) ComponentboxKtor_httpContentType * _Nullable contentType __attribute__((swift_name("contentType"))); -@property (readonly) id headers __attribute__((swift_name("headers"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode * _Nullable status __attribute__((swift_name("status"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreJob"))) -@protocol ComponentboxKotlinx_coroutines_coreJob -@required -- (id)attachChildChild:(id)child __attribute__((swift_name("attachChild(child:)"))); -- (void)cancelCause:(ComponentboxKotlinCancellationException * _Nullable)cause __attribute__((swift_name("cancel(cause:)"))); -- (ComponentboxKotlinCancellationException *)getCancellationException __attribute__((swift_name("getCancellationException()"))); -- (id)invokeOnCompletionOnCancelling:(BOOL)onCancelling invokeImmediately:(BOOL)invokeImmediately handler:(void (^)(ComponentboxKotlinThrowable * _Nullable))handler __attribute__((swift_name("invokeOnCompletion(onCancelling:invokeImmediately:handler:)"))); -- (id)invokeOnCompletionHandler:(void (^)(ComponentboxKotlinThrowable * _Nullable))handler __attribute__((swift_name("invokeOnCompletion(handler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)joinWithCompletionHandler:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("join(completionHandler:)"))); -- (id)plusOther_:(id)other __attribute__((swift_name("plus(other_:)"))) __attribute__((unavailable("Operator '+' on two Job objects is meaningless. Job is a coroutine context element and `+` is a set-sum operator for coroutine contexts. The job to the right of `+` just replaces the job the left of `+`."))); -- (BOOL)start __attribute__((swift_name("start()"))); -@property (readonly) id children __attribute__((swift_name("children"))); -@property (readonly) BOOL isActive __attribute__((swift_name("isActive"))); -@property (readonly) BOOL isCancelled __attribute__((swift_name("isCancelled"))); -@property (readonly) BOOL isCompleted __attribute__((swift_name("isCompleted"))); -@property (readonly) id onJoin __attribute__((swift_name("onJoin"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHttpStatusCode"))) -@interface ComponentboxKtor_httpHttpStatusCode : ComponentboxBase -- (instancetype)initWithValue:(int32_t)value description:(NSString *)description __attribute__((swift_name("init(value:description:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_httpHttpStatusCodeCompanion *companion __attribute__((swift_name("companion"))); -- (int32_t)component1 __attribute__((swift_name("component1()"))); -- (NSString *)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxKtor_httpHttpStatusCode *)doCopyValue:(int32_t)value description:(NSString *)description __attribute__((swift_name("doCopy(value:description:)"))); -- (ComponentboxKtor_httpHttpStatusCode *)descriptionValue:(NSString *)value __attribute__((swift_name("description(value:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *description_ __attribute__((swift_name("description_"))); -@property (readonly) int32_t value __attribute__((swift_name("value"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsGMTDate"))) -@interface ComponentboxKtor_utilsGMTDate : ComponentboxBase -@property (class, readonly, getter=companion) ComponentboxKtor_utilsGMTDateCompanion *companion __attribute__((swift_name("companion"))); -- (int32_t)compareToOther:(ComponentboxKtor_utilsGMTDate *)other __attribute__((swift_name("compareTo(other:)"))); -- (int32_t)component1 __attribute__((swift_name("component1()"))); -- (int32_t)component2 __attribute__((swift_name("component2()"))); -- (int32_t)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxKtor_utilsWeekDay *)component4 __attribute__((swift_name("component4()"))); -- (int32_t)component5 __attribute__((swift_name("component5()"))); -- (int32_t)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxKtor_utilsMonth *)component7 __attribute__((swift_name("component7()"))); -- (int32_t)component8 __attribute__((swift_name("component8()"))); -- (int64_t)component9 __attribute__((swift_name("component9()"))); -- (ComponentboxKtor_utilsGMTDate *)doCopySeconds:(int32_t)seconds minutes:(int32_t)minutes hours:(int32_t)hours dayOfWeek:(ComponentboxKtor_utilsWeekDay *)dayOfWeek dayOfMonth:(int32_t)dayOfMonth dayOfYear:(int32_t)dayOfYear month:(ComponentboxKtor_utilsMonth *)month year:(int32_t)year timestamp:(int64_t)timestamp __attribute__((swift_name("doCopy(seconds:minutes:hours:dayOfWeek:dayOfMonth:dayOfYear:month:year:timestamp:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t dayOfMonth __attribute__((swift_name("dayOfMonth"))); -@property (readonly) ComponentboxKtor_utilsWeekDay *dayOfWeek __attribute__((swift_name("dayOfWeek"))); -@property (readonly) int32_t dayOfYear __attribute__((swift_name("dayOfYear"))); -@property (readonly) int32_t hours __attribute__((swift_name("hours"))); -@property (readonly) int32_t minutes __attribute__((swift_name("minutes"))); -@property (readonly) ComponentboxKtor_utilsMonth *month __attribute__((swift_name("month"))); -@property (readonly) int32_t seconds __attribute__((swift_name("seconds"))); -@property (readonly) int64_t timestamp __attribute__((swift_name("timestamp"))); -@property (readonly) int32_t year __attribute__((swift_name("year"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHttpProtocolVersion"))) -@interface ComponentboxKtor_httpHttpProtocolVersion : ComponentboxBase -- (instancetype)initWithName:(NSString *)name major:(int32_t)major minor:(int32_t)minor __attribute__((swift_name("init(name:major:minor:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_httpHttpProtocolVersionCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (int32_t)component2 __attribute__((swift_name("component2()"))); -- (int32_t)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxKtor_httpHttpProtocolVersion *)doCopyName:(NSString *)name major:(int32_t)major minor:(int32_t)minor __attribute__((swift_name("doCopy(name:major:minor:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t major __attribute__((swift_name("major"))); -@property (readonly) int32_t minor __attribute__((swift_name("minor"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@end; - -__attribute__((swift_name("KotlinContinuation"))) -@protocol ComponentboxKotlinContinuation -@required -- (void)resumeWithResult:(id _Nullable)result __attribute__((swift_name("resumeWith(result:)"))); -@property (readonly) id context __attribute__((swift_name("context"))); -@end; - -__attribute__((swift_name("KotlinAbstractCoroutineContextKey"))) -@interface ComponentboxKotlinAbstractCoroutineContextKey : ComponentboxBase -- (instancetype)initWithBaseKey:(id)baseKey safeCast:(E _Nullable (^)(id))safeCast __attribute__((swift_name("init(baseKey:safeCast:)"))) __attribute__((objc_designated_initializer)); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Kotlinx_coroutines_coreCoroutineDispatcher.Key"))) -@interface ComponentboxKotlinx_coroutines_coreCoroutineDispatcherKey : ComponentboxKotlinAbstractCoroutineContextKey, ComponentboxKotlinx_coroutines_coreCoroutineDispatcher *> -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithBaseKey:(id)baseKey safeCast:(id _Nullable (^)(id))safeCast __attribute__((swift_name("init(baseKey:safeCast:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)key __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKotlinx_coroutines_coreCoroutineDispatcherKey *shared __attribute__((swift_name("shared"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreRunnable"))) -@protocol ComponentboxKotlinx_coroutines_coreRunnable -@required -- (void)run __attribute__((swift_name("run()"))); -@end; - -__attribute__((swift_name("Ktor_ioByteReadChannel"))) -@protocol ComponentboxKtor_ioByteReadChannel -@required -- (BOOL)cancelCause_:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("cancel(cause_:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)discardMax:(int64_t)max completionHandler:(void (^)(ComponentboxLong * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("discard(max:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)peekToDestination:(ComponentboxKtor_ioMemory *)destination destinationOffset:(int64_t)destinationOffset offset:(int64_t)offset min:(int64_t)min max:(int64_t)max completionHandler:(void (^)(ComponentboxLong * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("peekTo(destination:destinationOffset:offset:min:max:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readAvailableDst:(ComponentboxKtor_ioChunkBuffer *)dst completionHandler:(void (^)(ComponentboxInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readAvailable(dst:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readAvailableDst:(ComponentboxKotlinByteArray *)dst offset:(int32_t)offset length:(int32_t)length completionHandler:(void (^)(ComponentboxInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readAvailable(dst:offset:length:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readAvailableDst:(void *)dst offset:(int32_t)offset length:(int32_t)length completionHandler_:(void (^)(ComponentboxInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readAvailable(dst:offset:length:completionHandler_:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readAvailableDst:(void *)dst offset:(int64_t)offset length:(int64_t)length completionHandler__:(void (^)(ComponentboxInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readAvailable(dst:offset:length:completionHandler__:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readBooleanWithCompletionHandler:(void (^)(ComponentboxBoolean * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readBoolean(completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readByteWithCompletionHandler:(void (^)(ComponentboxByte * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readByte(completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readDoubleWithCompletionHandler:(void (^)(ComponentboxDouble * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readDouble(completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readFloatWithCompletionHandler:(void (^)(ComponentboxFloat * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readFloat(completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readFullyDst:(ComponentboxKtor_ioChunkBuffer *)dst n:(int32_t)n completionHandler:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readFully(dst:n:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readFullyDst:(ComponentboxKotlinByteArray *)dst offset:(int32_t)offset length:(int32_t)length completionHandler:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readFully(dst:offset:length:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readFullyDst:(void *)dst offset:(int32_t)offset length:(int32_t)length completionHandler_:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readFully(dst:offset:length:completionHandler_:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readFullyDst:(void *)dst offset:(int64_t)offset length:(int64_t)length completionHandler__:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readFully(dst:offset:length:completionHandler__:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readIntWithCompletionHandler:(void (^)(ComponentboxInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readInt(completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readLongWithCompletionHandler:(void (^)(ComponentboxLong * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readLong(completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readPacketSize:(int32_t)size headerSizeHint:(int32_t)headerSizeHint completionHandler:(void (^)(ComponentboxKtor_ioByteReadPacket * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readPacket(size:headerSizeHint:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readRemainingLimit:(int64_t)limit headerSizeHint:(int32_t)headerSizeHint completionHandler:(void (^)(ComponentboxKtor_ioByteReadPacket * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readRemaining(limit:headerSizeHint:completionHandler:)"))); -- (void)readSessionConsumer:(void (^)(id))consumer __attribute__((swift_name("readSession(consumer:)"))) __attribute__((deprecated("Use read { } instead."))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readShortWithCompletionHandler:(void (^)(ComponentboxShort * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readShort(completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readSuspendableSessionConsumer:(id)consumer completionHandler:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readSuspendableSession(consumer:completionHandler:)"))) __attribute__((deprecated("Use read { } instead."))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readUTF8LineLimit:(int32_t)limit completionHandler:(void (^)(NSString * _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("readUTF8Line(limit:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readUTF8LineToOut:(id)out limit:(int32_t)limit completionHandler:(void (^)(ComponentboxBoolean * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readUTF8LineTo(out:limit:completionHandler:)"))); -@property (readonly) int32_t availableForRead __attribute__((swift_name("availableForRead"))); -@property (readonly) ComponentboxKotlinThrowable * _Nullable closedCause __attribute__((swift_name("closedCause"))); -@property (readonly) BOOL isClosedForRead __attribute__((swift_name("isClosedForRead"))); -@property (readonly) BOOL isClosedForWrite __attribute__((swift_name("isClosedForWrite"))); -@property (readonly) int64_t totalBytesRead __attribute__((swift_name("totalBytesRead"))); -@end; - -__attribute__((swift_name("Ktor_utilsStringValuesBuilder"))) -@protocol ComponentboxKtor_utilsStringValuesBuilder -@required -- (void)appendName:(NSString *)name value:(NSString *)value __attribute__((swift_name("append(name:value:)"))); -- (void)appendAllStringValues:(id)stringValues __attribute__((swift_name("appendAll(stringValues:)"))); -- (void)appendAllName:(NSString *)name values:(id)values __attribute__((swift_name("appendAll(name:values:)"))); -- (void)appendMissingStringValues:(id)stringValues __attribute__((swift_name("appendMissing(stringValues:)"))); -- (void)appendMissingName:(NSString *)name values:(id)values __attribute__((swift_name("appendMissing(name:values:)"))); -- (id)build __attribute__((swift_name("build()"))); -- (void)clear __attribute__((swift_name("clear()"))); -- (BOOL)containsName:(NSString *)name __attribute__((swift_name("contains(name:)"))); -- (BOOL)containsName:(NSString *)name value:(NSString *)value __attribute__((swift_name("contains(name:value:)"))); -- (NSSet> *)entries __attribute__((swift_name("entries()"))); -- (NSString * _Nullable)getName:(NSString *)name __attribute__((swift_name("get(name:)"))); -- (NSArray * _Nullable)getAllName:(NSString *)name __attribute__((swift_name("getAll(name:)"))); -- (BOOL)isEmpty_ __attribute__((swift_name("isEmpty()"))); -- (NSSet *)names __attribute__((swift_name("names()"))); -- (void)removeName:(NSString *)name __attribute__((swift_name("remove(name:)"))); -- (BOOL)removeName:(NSString *)name value:(NSString *)value __attribute__((swift_name("remove(name:value:)"))); -- (void)removeKeysWithNoEntries __attribute__((swift_name("removeKeysWithNoEntries()"))); -- (void)setName:(NSString *)name value:(NSString *)value __attribute__((swift_name("set(name:value:)"))); -@property (readonly) BOOL caseInsensitiveName __attribute__((swift_name("caseInsensitiveName"))); -@end; - -__attribute__((swift_name("Ktor_utilsStringValuesBuilderImpl"))) -@interface ComponentboxKtor_utilsStringValuesBuilderImpl : ComponentboxBase -- (instancetype)initWithCaseInsensitiveName:(BOOL)caseInsensitiveName size:(int32_t)size __attribute__((swift_name("init(caseInsensitiveName:size:)"))) __attribute__((objc_designated_initializer)); -- (void)appendName:(NSString *)name value:(NSString *)value __attribute__((swift_name("append(name:value:)"))); -- (void)appendAllStringValues:(id)stringValues __attribute__((swift_name("appendAll(stringValues:)"))); -- (void)appendAllName:(NSString *)name values:(id)values __attribute__((swift_name("appendAll(name:values:)"))); -- (void)appendMissingStringValues:(id)stringValues __attribute__((swift_name("appendMissing(stringValues:)"))); -- (void)appendMissingName:(NSString *)name values:(id)values __attribute__((swift_name("appendMissing(name:values:)"))); -- (id)build __attribute__((swift_name("build()"))); -- (void)clear __attribute__((swift_name("clear()"))); -- (BOOL)containsName:(NSString *)name __attribute__((swift_name("contains(name:)"))); -- (BOOL)containsName:(NSString *)name value:(NSString *)value __attribute__((swift_name("contains(name:value:)"))); -- (NSSet> *)entries __attribute__((swift_name("entries()"))); -- (NSString * _Nullable)getName:(NSString *)name __attribute__((swift_name("get(name:)"))); -- (NSArray * _Nullable)getAllName:(NSString *)name __attribute__((swift_name("getAll(name:)"))); -- (BOOL)isEmpty_ __attribute__((swift_name("isEmpty()"))); -- (NSSet *)names __attribute__((swift_name("names()"))); -- (void)removeName:(NSString *)name __attribute__((swift_name("remove(name:)"))); -- (BOOL)removeName:(NSString *)name value:(NSString *)value __attribute__((swift_name("remove(name:value:)"))); -- (void)removeKeysWithNoEntries __attribute__((swift_name("removeKeysWithNoEntries()"))); -- (void)setName:(NSString *)name value:(NSString *)value __attribute__((swift_name("set(name:value:)"))); -- (void)validateNameName:(NSString *)name __attribute__((swift_name("validateName(name:)"))); -- (void)validateValueValue:(NSString *)value __attribute__((swift_name("validateValue(value:)"))); -@property (readonly) BOOL caseInsensitiveName __attribute__((swift_name("caseInsensitiveName"))); -@property (readonly) ComponentboxMutableDictionary *> *values __attribute__((swift_name("values"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHeadersBuilder"))) -@interface ComponentboxKtor_httpHeadersBuilder : ComponentboxKtor_utilsStringValuesBuilderImpl -- (instancetype)initWithSize:(int32_t)size __attribute__((swift_name("init(size:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCaseInsensitiveName:(BOOL)caseInsensitiveName size:(int32_t)size __attribute__((swift_name("init(caseInsensitiveName:size:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -- (id)build __attribute__((swift_name("build()"))); -- (void)validateNameName:(NSString *)name __attribute__((swift_name("validateName(name:)"))); -- (void)validateValueValue:(NSString *)value __attribute__((swift_name("validateValue(value:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpRequestBuilder.Companion"))) -@interface ComponentboxKtor_client_coreHttpRequestBuilderCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_client_coreHttpRequestBuilderCompanion *shared __attribute__((swift_name("shared"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpURLBuilder"))) -@interface ComponentboxKtor_httpURLBuilder : ComponentboxBase -- (instancetype)initWithProtocol:(ComponentboxKtor_httpURLProtocol *)protocol host:(NSString *)host port:(int32_t)port user:(NSString * _Nullable)user password:(NSString * _Nullable)password pathSegments:(NSArray *)pathSegments parameters:(id)parameters fragment:(NSString *)fragment trailingQuery:(BOOL)trailingQuery __attribute__((swift_name("init(protocol:host:port:user:password:pathSegments:parameters:fragment:trailingQuery:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_httpURLBuilderCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxKtor_httpUrl *)build __attribute__((swift_name("build()"))); -- (NSString *)buildString __attribute__((swift_name("buildString()"))); -@property NSString *encodedFragment __attribute__((swift_name("encodedFragment"))); -@property id encodedParameters __attribute__((swift_name("encodedParameters"))); -@property NSString * _Nullable encodedPassword __attribute__((swift_name("encodedPassword"))); -@property NSArray *encodedPathSegments __attribute__((swift_name("encodedPathSegments"))); -@property NSString * _Nullable encodedUser __attribute__((swift_name("encodedUser"))); -@property NSString *fragment __attribute__((swift_name("fragment"))); -@property NSString *host __attribute__((swift_name("host"))); -@property (readonly) id parameters __attribute__((swift_name("parameters"))); -@property NSString * _Nullable password __attribute__((swift_name("password"))); -@property NSArray *pathSegments __attribute__((swift_name("pathSegments"))); -@property int32_t port __attribute__((swift_name("port"))); -@property ComponentboxKtor_httpURLProtocol *protocol __attribute__((swift_name("protocol"))); -@property BOOL trailingQuery __attribute__((swift_name("trailingQuery"))); -@property NSString * _Nullable user __attribute__((swift_name("user"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsTypeInfo"))) -@interface ComponentboxKtor_utilsTypeInfo : ComponentboxBase -- (instancetype)initWithType:(id)type reifiedType:(id)reifiedType kotlinType:(id _Nullable)kotlinType __attribute__((swift_name("init(type:reifiedType:kotlinType:)"))) __attribute__((objc_designated_initializer)); -- (id)component1 __attribute__((swift_name("component1()"))); -- (id)component2 __attribute__((swift_name("component2()"))); -- (id _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxKtor_utilsTypeInfo *)doCopyType:(id)type reifiedType:(id)reifiedType kotlinType:(id _Nullable)kotlinType __attribute__((swift_name("doCopy(type:reifiedType:kotlinType:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id _Nullable kotlinType __attribute__((swift_name("kotlinType"))); -@property (readonly) id reifiedType __attribute__((swift_name("reifiedType"))); -@property (readonly) id type __attribute__((swift_name("type"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpClientCall.Companion"))) -@interface ComponentboxKtor_client_coreHttpClientCallCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_client_coreHttpClientCallCompanion *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_utilsAttributeKey *CustomResponse __attribute__((swift_name("CustomResponse"))) __attribute__((unavailable("This is going to be removed. Please file a ticket with clarification why and what for do you need it."))); -@end; - -__attribute__((swift_name("Ktor_client_coreHttpRequest"))) -@protocol ComponentboxKtor_client_coreHttpRequest -@required -@property (readonly) id attributes __attribute__((swift_name("attributes"))); -@property (readonly) ComponentboxKtor_client_coreHttpClientCall *call __attribute__((swift_name("call"))); -@property (readonly) ComponentboxKtor_httpOutgoingContent *content __attribute__((swift_name("content"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *method __attribute__((swift_name("method"))); -@property (readonly) ComponentboxKtor_httpUrl *url __attribute__((swift_name("url"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpUrl.Companion"))) -@interface ComponentboxKtor_httpUrlCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpUrlCompanion *shared __attribute__((swift_name("shared"))); -@end; - -__attribute__((swift_name("Ktor_httpParameters"))) -@protocol ComponentboxKtor_httpParameters -@required -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpURLProtocol"))) -@interface ComponentboxKtor_httpURLProtocol : ComponentboxBase -- (instancetype)initWithName:(NSString *)name defaultPort:(int32_t)defaultPort __attribute__((swift_name("init(name:defaultPort:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_httpURLProtocolCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (int32_t)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxKtor_httpURLProtocol *)doCopyName:(NSString *)name defaultPort:(int32_t)defaultPort __attribute__((swift_name("doCopy(name:defaultPort:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t defaultPort __attribute__((swift_name("defaultPort"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHttpMethod.Companion"))) -@interface ComponentboxKtor_httpHttpMethodCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpHttpMethodCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKtor_httpHttpMethod *)parseMethod:(NSString *)method __attribute__((swift_name("parse(method:)"))); -@property (readonly) NSArray *DefaultMethods __attribute__((swift_name("DefaultMethods"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *Delete __attribute__((swift_name("Delete"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *Get __attribute__((swift_name("Get"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *Head __attribute__((swift_name("Head"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *Options __attribute__((swift_name("Options"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *Patch __attribute__((swift_name("Patch"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *Post __attribute__((swift_name("Post"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *Put __attribute__((swift_name("Put"))); -@end; - -__attribute__((swift_name("KotlinMapEntry"))) -@protocol ComponentboxKotlinMapEntry -@required -@property (readonly) id _Nullable key __attribute__((swift_name("key"))); -@property (readonly) id _Nullable value __attribute__((swift_name("value"))); -@end; - -__attribute__((swift_name("Ktor_httpHeaderValueWithParameters"))) -@interface ComponentboxKtor_httpHeaderValueWithParameters : ComponentboxBase -- (instancetype)initWithContent:(NSString *)content parameters:(NSArray *)parameters __attribute__((swift_name("init(content:parameters:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_httpHeaderValueWithParametersCompanion *companion __attribute__((swift_name("companion"))); -- (NSString * _Nullable)parameterName:(NSString *)name __attribute__((swift_name("parameter(name:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *content __attribute__((swift_name("content"))); -@property (readonly) NSArray *parameters __attribute__((swift_name("parameters"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpContentType"))) -@interface ComponentboxKtor_httpContentType : ComponentboxKtor_httpHeaderValueWithParameters -- (instancetype)initWithContentType:(NSString *)contentType contentSubtype:(NSString *)contentSubtype parameters:(NSArray *)parameters __attribute__((swift_name("init(contentType:contentSubtype:parameters:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithContent:(NSString *)content parameters:(NSArray *)parameters __attribute__((swift_name("init(content:parameters:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_httpContentTypeCompanion *companion __attribute__((swift_name("companion"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (BOOL)matchPattern:(ComponentboxKtor_httpContentType *)pattern __attribute__((swift_name("match(pattern:)"))); -- (BOOL)matchPattern_:(NSString *)pattern __attribute__((swift_name("match(pattern_:)"))); -- (ComponentboxKtor_httpContentType *)withParameterName:(NSString *)name value:(NSString *)value __attribute__((swift_name("withParameter(name:value:)"))); -- (ComponentboxKtor_httpContentType *)withoutParameters __attribute__((swift_name("withoutParameters()"))); -@property (readonly) NSString *contentSubtype __attribute__((swift_name("contentSubtype"))); -@property (readonly) NSString *contentType __attribute__((swift_name("contentType"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreChildHandle"))) -@protocol ComponentboxKotlinx_coroutines_coreChildHandle -@required -- (BOOL)childCancelledCause:(ComponentboxKotlinThrowable *)cause __attribute__((swift_name("childCancelled(cause:)"))); -@property (readonly) id _Nullable parent __attribute__((swift_name("parent"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreChildJob"))) -@protocol ComponentboxKotlinx_coroutines_coreChildJob -@required -- (void)parentCancelledParentJob:(id)parentJob __attribute__((swift_name("parentCancelled(parentJob:)"))); -@end; - -__attribute__((swift_name("KotlinSequence"))) -@protocol ComponentboxKotlinSequence -@required -- (id)iterator __attribute__((swift_name("iterator()"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreSelectClause0"))) -@protocol ComponentboxKotlinx_coroutines_coreSelectClause0 -@required -- (void)registerSelectClause0Select:(id)select block:(id)block __attribute__((swift_name("registerSelectClause0(select:block:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHttpStatusCode.Companion"))) -@interface ComponentboxKtor_httpHttpStatusCodeCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpHttpStatusCodeCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKtor_httpHttpStatusCode *)fromValueValue:(int32_t)value __attribute__((swift_name("fromValue(value:)"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Accepted __attribute__((swift_name("Accepted"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *BadGateway __attribute__((swift_name("BadGateway"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *BadRequest __attribute__((swift_name("BadRequest"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Conflict __attribute__((swift_name("Conflict"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Continue __attribute__((swift_name("Continue"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Created __attribute__((swift_name("Created"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *ExpectationFailed __attribute__((swift_name("ExpectationFailed"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *FailedDependency __attribute__((swift_name("FailedDependency"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Forbidden __attribute__((swift_name("Forbidden"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Found __attribute__((swift_name("Found"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *GatewayTimeout __attribute__((swift_name("GatewayTimeout"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Gone __attribute__((swift_name("Gone"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *InsufficientStorage __attribute__((swift_name("InsufficientStorage"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *InternalServerError __attribute__((swift_name("InternalServerError"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *LengthRequired __attribute__((swift_name("LengthRequired"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Locked __attribute__((swift_name("Locked"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *MethodNotAllowed __attribute__((swift_name("MethodNotAllowed"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *MovedPermanently __attribute__((swift_name("MovedPermanently"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *MultiStatus __attribute__((swift_name("MultiStatus"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *MultipleChoices __attribute__((swift_name("MultipleChoices"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *NoContent __attribute__((swift_name("NoContent"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *NonAuthoritativeInformation __attribute__((swift_name("NonAuthoritativeInformation"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *NotAcceptable __attribute__((swift_name("NotAcceptable"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *NotFound __attribute__((swift_name("NotFound"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *NotImplemented __attribute__((swift_name("NotImplemented"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *NotModified __attribute__((swift_name("NotModified"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *OK __attribute__((swift_name("OK"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *PartialContent __attribute__((swift_name("PartialContent"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *PayloadTooLarge __attribute__((swift_name("PayloadTooLarge"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *PaymentRequired __attribute__((swift_name("PaymentRequired"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *PermanentRedirect __attribute__((swift_name("PermanentRedirect"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *PreconditionFailed __attribute__((swift_name("PreconditionFailed"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Processing __attribute__((swift_name("Processing"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *ProxyAuthenticationRequired __attribute__((swift_name("ProxyAuthenticationRequired"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *RequestHeaderFieldTooLarge __attribute__((swift_name("RequestHeaderFieldTooLarge"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *RequestTimeout __attribute__((swift_name("RequestTimeout"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *RequestURITooLong __attribute__((swift_name("RequestURITooLong"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *RequestedRangeNotSatisfiable __attribute__((swift_name("RequestedRangeNotSatisfiable"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *ResetContent __attribute__((swift_name("ResetContent"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *SeeOther __attribute__((swift_name("SeeOther"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *ServiceUnavailable __attribute__((swift_name("ServiceUnavailable"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *SwitchProxy __attribute__((swift_name("SwitchProxy"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *SwitchingProtocols __attribute__((swift_name("SwitchingProtocols"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *TemporaryRedirect __attribute__((swift_name("TemporaryRedirect"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *TooManyRequests __attribute__((swift_name("TooManyRequests"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Unauthorized __attribute__((swift_name("Unauthorized"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *UnprocessableEntity __attribute__((swift_name("UnprocessableEntity"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *UnsupportedMediaType __attribute__((swift_name("UnsupportedMediaType"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *UpgradeRequired __attribute__((swift_name("UpgradeRequired"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *UseProxy __attribute__((swift_name("UseProxy"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *VariantAlsoNegotiates __attribute__((swift_name("VariantAlsoNegotiates"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *VersionNotSupported __attribute__((swift_name("VersionNotSupported"))); -@property (readonly) NSArray *allStatusCodes __attribute__((swift_name("allStatusCodes"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsGMTDate.Companion"))) -@interface ComponentboxKtor_utilsGMTDateCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_utilsGMTDateCompanion *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_utilsGMTDate *START __attribute__((swift_name("START"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsWeekDay"))) -@interface ComponentboxKtor_utilsWeekDay : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_utilsWeekDayCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxKtor_utilsWeekDay *monday __attribute__((swift_name("monday"))); -@property (class, readonly) ComponentboxKtor_utilsWeekDay *tuesday __attribute__((swift_name("tuesday"))); -@property (class, readonly) ComponentboxKtor_utilsWeekDay *wednesday __attribute__((swift_name("wednesday"))); -@property (class, readonly) ComponentboxKtor_utilsWeekDay *thursday __attribute__((swift_name("thursday"))); -@property (class, readonly) ComponentboxKtor_utilsWeekDay *friday __attribute__((swift_name("friday"))); -@property (class, readonly) ComponentboxKtor_utilsWeekDay *saturday __attribute__((swift_name("saturday"))); -@property (class, readonly) ComponentboxKtor_utilsWeekDay *sunday __attribute__((swift_name("sunday"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@property (readonly) NSString *value __attribute__((swift_name("value"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsMonth"))) -@interface ComponentboxKtor_utilsMonth : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_utilsMonthCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *january __attribute__((swift_name("january"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *february __attribute__((swift_name("february"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *march __attribute__((swift_name("march"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *april __attribute__((swift_name("april"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *may __attribute__((swift_name("may"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *june __attribute__((swift_name("june"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *july __attribute__((swift_name("july"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *august __attribute__((swift_name("august"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *september __attribute__((swift_name("september"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *october __attribute__((swift_name("october"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *november __attribute__((swift_name("november"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *december __attribute__((swift_name("december"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@property (readonly) NSString *value __attribute__((swift_name("value"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHttpProtocolVersion.Companion"))) -@interface ComponentboxKtor_httpHttpProtocolVersionCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpHttpProtocolVersionCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKtor_httpHttpProtocolVersion *)fromValueName:(NSString *)name major:(int32_t)major minor:(int32_t)minor __attribute__((swift_name("fromValue(name:major:minor:)"))); -- (ComponentboxKtor_httpHttpProtocolVersion *)parseValue:(id)value __attribute__((swift_name("parse(value:)"))); -@property (readonly) ComponentboxKtor_httpHttpProtocolVersion *HTTP_1_0 __attribute__((swift_name("HTTP_1_0"))); -@property (readonly) ComponentboxKtor_httpHttpProtocolVersion *HTTP_1_1 __attribute__((swift_name("HTTP_1_1"))); -@property (readonly) ComponentboxKtor_httpHttpProtocolVersion *HTTP_2_0 __attribute__((swift_name("HTTP_2_0"))); -@property (readonly) ComponentboxKtor_httpHttpProtocolVersion *QUIC __attribute__((swift_name("QUIC"))); -@property (readonly) ComponentboxKtor_httpHttpProtocolVersion *SPDY_3 __attribute__((swift_name("SPDY_3"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_ioMemory"))) -@interface ComponentboxKtor_ioMemory : ComponentboxBase -- (instancetype)initWithPointer:(void *)pointer size:(int64_t)size __attribute__((swift_name("init(pointer:size:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_ioMemoryCompanion *companion __attribute__((swift_name("companion"))); -- (void)doCopyToDestination:(ComponentboxKtor_ioMemory *)destination offset:(int32_t)offset length:(int32_t)length destinationOffset:(int32_t)destinationOffset __attribute__((swift_name("doCopyTo(destination:offset:length:destinationOffset:)"))); -- (void)doCopyToDestination:(ComponentboxKtor_ioMemory *)destination offset:(int64_t)offset length:(int64_t)length destinationOffset_:(int64_t)destinationOffset __attribute__((swift_name("doCopyTo(destination:offset:length:destinationOffset_:)"))); -- (int8_t)loadAtIndex:(int32_t)index __attribute__((swift_name("loadAt(index:)"))); -- (int8_t)loadAtIndex_:(int64_t)index __attribute__((swift_name("loadAt(index_:)"))); -- (ComponentboxKtor_ioMemory *)sliceOffset:(int32_t)offset length:(int32_t)length __attribute__((swift_name("slice(offset:length:)"))); -- (ComponentboxKtor_ioMemory *)sliceOffset:(int64_t)offset length_:(int64_t)length __attribute__((swift_name("slice(offset:length_:)"))); -- (void)storeAtIndex:(int32_t)index value:(int8_t)value __attribute__((swift_name("storeAt(index:value:)"))); -- (void)storeAtIndex:(int64_t)index value_:(int8_t)value __attribute__((swift_name("storeAt(index:value_:)"))); -@property (readonly) void *pointer __attribute__((swift_name("pointer"))); -@property (readonly) int64_t size __attribute__((swift_name("size"))); -@property (readonly) int32_t size32 __attribute__((swift_name("size32"))); -@end; - -__attribute__((swift_name("Ktor_ioBuffer"))) -@interface ComponentboxKtor_ioBuffer : ComponentboxBase -- (instancetype)initWithMemory:(ComponentboxKtor_ioMemory *)memory __attribute__((swift_name("init(memory:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_ioBufferCompanion *companion __attribute__((swift_name("companion"))); -- (void)commitWrittenCount:(int32_t)count __attribute__((swift_name("commitWritten(count:)"))); -- (void)discardExactCount:(int32_t)count __attribute__((swift_name("discardExact(count:)"))); -- (ComponentboxKtor_ioBuffer *)duplicate __attribute__((swift_name("duplicate()"))); -- (void)duplicateToCopy:(ComponentboxKtor_ioBuffer *)copy __attribute__((swift_name("duplicateTo(copy:)"))); -- (int8_t)readByte __attribute__((swift_name("readByte()"))); -- (void)reserveEndGapEndGap:(int32_t)endGap __attribute__((swift_name("reserveEndGap(endGap:)"))); -- (void)reserveStartGapStartGap:(int32_t)startGap __attribute__((swift_name("reserveStartGap(startGap:)"))); -- (void)reset __attribute__((swift_name("reset()"))); -- (void)resetForRead __attribute__((swift_name("resetForRead()"))); -- (void)resetForWrite __attribute__((swift_name("resetForWrite()"))); -- (void)resetForWriteLimit:(int32_t)limit __attribute__((swift_name("resetForWrite(limit:)"))); -- (void)rewindCount:(int32_t)count __attribute__((swift_name("rewind(count:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -- (int32_t)tryPeekByte __attribute__((swift_name("tryPeekByte()"))); -- (int32_t)tryReadByte __attribute__((swift_name("tryReadByte()"))); -- (void)writeByteValue:(int8_t)value __attribute__((swift_name("writeByte(value:)"))); -@property id _Nullable attachment __attribute__((swift_name("attachment"))) __attribute__((unavailable("Will be removed. Inherit Buffer and add required fields instead."))); -@property (readonly) int32_t capacity __attribute__((swift_name("capacity"))); -@property (readonly) int32_t endGap __attribute__((swift_name("endGap"))); -@property (readonly) int32_t limit __attribute__((swift_name("limit"))); -@property (readonly) ComponentboxKtor_ioMemory *memory __attribute__((swift_name("memory"))); -@property (readonly) int32_t readPosition __attribute__((swift_name("readPosition"))); -@property (readonly) int32_t readRemaining __attribute__((swift_name("readRemaining"))); -@property (readonly) int32_t startGap __attribute__((swift_name("startGap"))); -@property (readonly) int32_t writePosition __attribute__((swift_name("writePosition"))); -@property (readonly) int32_t writeRemaining __attribute__((swift_name("writeRemaining"))); -@end; - -__attribute__((swift_name("Ktor_ioChunkBuffer"))) -@interface ComponentboxKtor_ioChunkBuffer : ComponentboxKtor_ioBuffer -- (instancetype)initWithMemory:(ComponentboxKtor_ioMemory *)memory origin:(ComponentboxKtor_ioChunkBuffer * _Nullable)origin parentPool:(id _Nullable)parentPool __attribute__((swift_name("init(memory:origin:parentPool:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithMemory:(ComponentboxKtor_ioMemory *)memory __attribute__((swift_name("init(memory:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_ioChunkBufferCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxKtor_ioChunkBuffer * _Nullable)cleanNext __attribute__((swift_name("cleanNext()"))); -- (ComponentboxKtor_ioChunkBuffer *)duplicate __attribute__((swift_name("duplicate()"))); -- (void)releasePool:(id)pool __attribute__((swift_name("release(pool:)"))); -- (void)reset __attribute__((swift_name("reset()"))); -@property (getter=next_) ComponentboxKtor_ioChunkBuffer * _Nullable next __attribute__((swift_name("next"))); -@property (readonly) ComponentboxKtor_ioChunkBuffer * _Nullable origin __attribute__((swift_name("origin"))); -@property (readonly) int32_t referenceCount __attribute__((swift_name("referenceCount"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinByteArray"))) -@interface ComponentboxKotlinByteArray : ComponentboxBase -+ (instancetype)arrayWithSize:(int32_t)size __attribute__((swift_name("init(size:)"))); -+ (instancetype)arrayWithSize:(int32_t)size init:(ComponentboxByte *(^)(ComponentboxInt *))init __attribute__((swift_name("init(size:init:)"))); -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (int8_t)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (ComponentboxKotlinByteIterator *)iterator __attribute__((swift_name("iterator()"))); -- (void)setIndex:(int32_t)index value:(int8_t)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); -@end; - -__attribute__((swift_name("Ktor_ioInput"))) -@interface ComponentboxKtor_ioInput : ComponentboxBase -- (instancetype)initWithHead:(ComponentboxKtor_ioChunkBuffer *)head remaining:(int64_t)remaining pool:(id)pool __attribute__((swift_name("init(head:remaining:pool:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_ioInputCompanion *companion __attribute__((swift_name("companion"))); -- (BOOL)canRead __attribute__((swift_name("canRead()"))); -- (void)close __attribute__((swift_name("close()"))); -- (void)closeSource __attribute__((swift_name("closeSource()"))); -- (int32_t)discardN:(int32_t)n __attribute__((swift_name("discard(n:)"))); -- (int64_t)discardN_:(int64_t)n __attribute__((swift_name("discard(n_:)"))); -- (void)discardExactN:(int32_t)n __attribute__((swift_name("discardExact(n:)"))); -- (ComponentboxKtor_ioChunkBuffer * _Nullable)fill __attribute__((swift_name("fill()"))); -- (int32_t)fillDestination:(ComponentboxKtor_ioMemory *)destination offset:(int32_t)offset length:(int32_t)length __attribute__((swift_name("fill(destination:offset:length:)"))); -- (BOOL)hasBytesN:(int32_t)n __attribute__((swift_name("hasBytes(n:)"))); -- (void)markNoMoreChunksAvailable __attribute__((swift_name("markNoMoreChunksAvailable()"))); -- (int64_t)peekToDestination:(ComponentboxKtor_ioMemory *)destination destinationOffset:(int64_t)destinationOffset offset:(int64_t)offset min:(int64_t)min max:(int64_t)max __attribute__((swift_name("peekTo(destination:destinationOffset:offset:min:max:)"))); -- (int32_t)peekToBuffer:(ComponentboxKtor_ioChunkBuffer *)buffer __attribute__((swift_name("peekTo(buffer:)"))); -- (int8_t)readByte __attribute__((swift_name("readByte()"))); -- (NSString *)readTextMin:(int32_t)min max:(int32_t)max __attribute__((swift_name("readText(min:max:)"))); -- (int32_t)readTextOut:(id)out min:(int32_t)min max:(int32_t)max __attribute__((swift_name("readText(out:min:max:)"))); -- (NSString *)readTextExactExactCharacters:(int32_t)exactCharacters __attribute__((swift_name("readTextExact(exactCharacters:)"))); -- (void)readTextExactOut:(id)out exactCharacters:(int32_t)exactCharacters __attribute__((swift_name("readTextExact(out:exactCharacters:)"))); -- (void)release_ __attribute__((swift_name("release()"))); -- (int32_t)tryPeek __attribute__((swift_name("tryPeek()"))); -@property (readonly) BOOL endOfInput __attribute__((swift_name("endOfInput"))); -@property (readonly) id pool __attribute__((swift_name("pool"))); -@property (readonly) int64_t remaining __attribute__((swift_name("remaining"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_ioByteReadPacket"))) -@interface ComponentboxKtor_ioByteReadPacket : ComponentboxKtor_ioInput -- (instancetype)initWithHead:(ComponentboxKtor_ioChunkBuffer *)head pool:(id)pool __attribute__((swift_name("init(head:pool:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithHead:(ComponentboxKtor_ioChunkBuffer *)head remaining:(int64_t)remaining pool:(id)pool __attribute__((swift_name("init(head:remaining:pool:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_ioByteReadPacketCompanion *companion __attribute__((swift_name("companion"))); -- (void)closeSource __attribute__((swift_name("closeSource()"))); -- (ComponentboxKtor_ioByteReadPacket *)doCopy __attribute__((swift_name("doCopy()"))); -- (ComponentboxKtor_ioChunkBuffer * _Nullable)fill __attribute__((swift_name("fill()"))); -- (int32_t)fillDestination:(ComponentboxKtor_ioMemory *)destination offset:(int32_t)offset length:(int32_t)length __attribute__((swift_name("fill(destination:offset:length:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@end; - -__attribute__((swift_name("Ktor_ioReadSession"))) -@protocol ComponentboxKtor_ioReadSession -@required -- (int32_t)discardN:(int32_t)n __attribute__((swift_name("discard(n:)"))); -- (ComponentboxKtor_ioChunkBuffer * _Nullable)requestAtLeast:(int32_t)atLeast __attribute__((swift_name("request(atLeast:)"))); -@property (readonly) int32_t availableForRead __attribute__((swift_name("availableForRead"))); -@end; - -__attribute__((swift_name("KotlinSuspendFunction1"))) -@protocol ComponentboxKotlinSuspendFunction1 -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)invokeP1:(id _Nullable)p1 completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke(p1:completionHandler:)"))); -@end; - -__attribute__((swift_name("KotlinAppendable"))) -@protocol ComponentboxKotlinAppendable -@required -- (id)appendValue:(unichar)value __attribute__((swift_name("append(value:)"))); -- (id)appendValue_:(id _Nullable)value __attribute__((swift_name("append(value_:)"))); -- (id)appendValue:(id _Nullable)value startIndex:(int32_t)startIndex endIndex:(int32_t)endIndex __attribute__((swift_name("append(value:startIndex:endIndex:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpURLBuilder.Companion"))) -@interface ComponentboxKtor_httpURLBuilderCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpURLBuilderCompanion *shared __attribute__((swift_name("shared"))); -@end; - -__attribute__((swift_name("Ktor_httpParametersBuilder"))) -@protocol ComponentboxKtor_httpParametersBuilder -@required -@end; - -__attribute__((swift_name("KotlinKType"))) -@protocol ComponentboxKotlinKType -@required -@property (readonly) NSArray *arguments __attribute__((swift_name("arguments"))); -@property (readonly) id _Nullable classifier __attribute__((swift_name("classifier"))); -@property (readonly) BOOL isMarkedNullable __attribute__((swift_name("isMarkedNullable"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpURLProtocol.Companion"))) -@interface ComponentboxKtor_httpURLProtocolCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpURLProtocolCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKtor_httpURLProtocol *)createOrDefaultName:(NSString *)name __attribute__((swift_name("createOrDefault(name:)"))); -@property (readonly) ComponentboxKtor_httpURLProtocol *HTTP __attribute__((swift_name("HTTP"))); -@property (readonly) ComponentboxKtor_httpURLProtocol *HTTPS __attribute__((swift_name("HTTPS"))); -@property (readonly) ComponentboxKtor_httpURLProtocol *SOCKS __attribute__((swift_name("SOCKS"))); -@property (readonly) ComponentboxKtor_httpURLProtocol *WS __attribute__((swift_name("WS"))); -@property (readonly) ComponentboxKtor_httpURLProtocol *WSS __attribute__((swift_name("WSS"))); -@property (readonly) NSDictionary *byName __attribute__((swift_name("byName"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHeaderValueParam"))) -@interface ComponentboxKtor_httpHeaderValueParam : ComponentboxBase -- (instancetype)initWithName:(NSString *)name value:(NSString *)value __attribute__((swift_name("init(name:value:)"))) __attribute__((objc_designated_initializer)); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (NSString *)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxKtor_httpHeaderValueParam *)doCopyName:(NSString *)name value:(NSString *)value __attribute__((swift_name("doCopy(name:value:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@property (readonly) NSString *value __attribute__((swift_name("value"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHeaderValueWithParameters.Companion"))) -@interface ComponentboxKtor_httpHeaderValueWithParametersCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpHeaderValueWithParametersCompanion *shared __attribute__((swift_name("shared"))); -- (id _Nullable)parseValue:(NSString *)value init:(id _Nullable (^)(NSString *, NSArray *))init __attribute__((swift_name("parse(value:init:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpContentType.Companion"))) -@interface ComponentboxKtor_httpContentTypeCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpContentTypeCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKtor_httpContentType *)parseValue:(NSString *)value __attribute__((swift_name("parse(value:)"))); -@property (readonly) ComponentboxKtor_httpContentType *Any __attribute__((swift_name("Any"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreParentJob"))) -@protocol ComponentboxKotlinx_coroutines_coreParentJob -@required -- (ComponentboxKotlinCancellationException *)getChildJobCancellationCause __attribute__((swift_name("getChildJobCancellationCause()"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreSelectInstance"))) -@protocol ComponentboxKotlinx_coroutines_coreSelectInstance -@required -- (void)disposeOnSelectHandle:(id)handle __attribute__((swift_name("disposeOnSelect(handle:)"))); -- (id _Nullable)performAtomicTrySelectDesc:(ComponentboxKotlinx_coroutines_coreAtomicDesc *)desc __attribute__((swift_name("performAtomicTrySelect(desc:)"))); -- (void)resumeSelectWithExceptionException:(ComponentboxKotlinThrowable *)exception __attribute__((swift_name("resumeSelectWithException(exception:)"))); -- (BOOL)trySelect __attribute__((swift_name("trySelect()"))); -- (id _Nullable)trySelectOtherOtherOp:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodePrepareOp * _Nullable)otherOp __attribute__((swift_name("trySelectOther(otherOp:)"))); -@property (readonly) id completion __attribute__((swift_name("completion"))); -@property (readonly) BOOL isSelected __attribute__((swift_name("isSelected"))); -@end; - -__attribute__((swift_name("KotlinSuspendFunction0"))) -@protocol ComponentboxKotlinSuspendFunction0 -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)invokeWithCompletionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke(completionHandler:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsWeekDay.Companion"))) -@interface ComponentboxKtor_utilsWeekDayCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_utilsWeekDayCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKtor_utilsWeekDay *)fromOrdinal:(int32_t)ordinal __attribute__((swift_name("from(ordinal:)"))); -- (ComponentboxKtor_utilsWeekDay *)fromValue:(NSString *)value __attribute__((swift_name("from(value:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsMonth.Companion"))) -@interface ComponentboxKtor_utilsMonthCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_utilsMonthCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKtor_utilsMonth *)fromOrdinal:(int32_t)ordinal __attribute__((swift_name("from(ordinal:)"))); -- (ComponentboxKtor_utilsMonth *)fromValue:(NSString *)value __attribute__((swift_name("from(value:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_ioMemory.Companion"))) -@interface ComponentboxKtor_ioMemoryCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_ioMemoryCompanion *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_ioMemory *Empty __attribute__((swift_name("Empty"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_ioBuffer.Companion"))) -@interface ComponentboxKtor_ioBufferCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_ioBufferCompanion *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_ioBuffer *Empty __attribute__((swift_name("Empty"))); -@property (readonly) int32_t ReservedSize __attribute__((swift_name("ReservedSize"))); -@end; - -__attribute__((swift_name("Ktor_ioObjectPool"))) -@protocol ComponentboxKtor_ioObjectPool -@required -- (id)borrow __attribute__((swift_name("borrow()"))); -- (void)dispose __attribute__((swift_name("dispose()"))); -- (void)recycleInstance:(id)instance __attribute__((swift_name("recycle(instance:)"))); -@property (readonly) int32_t capacity __attribute__((swift_name("capacity"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_ioChunkBuffer.Companion"))) -@interface ComponentboxKtor_ioChunkBufferCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_ioChunkBufferCompanion *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_ioChunkBuffer *Empty __attribute__((swift_name("Empty"))); -@property (readonly) id EmptyPool __attribute__((swift_name("EmptyPool"))); -@property (readonly) id Pool __attribute__((swift_name("Pool"))); -@end; - -__attribute__((swift_name("KotlinByteIterator"))) -@interface ComponentboxKotlinByteIterator : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (ComponentboxByte *)next __attribute__((swift_name("next()"))); -- (int8_t)nextByte __attribute__((swift_name("nextByte()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_ioInput.Companion"))) -@interface ComponentboxKtor_ioInputCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_ioInputCompanion *shared __attribute__((swift_name("shared"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_ioByteReadPacket.Companion"))) -@interface ComponentboxKtor_ioByteReadPacketCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_ioByteReadPacketCompanion *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_ioByteReadPacket *Empty __attribute__((swift_name("Empty"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinKTypeProjection"))) -@interface ComponentboxKotlinKTypeProjection : ComponentboxBase -- (instancetype)initWithVariance:(ComponentboxKotlinKVariance * _Nullable)variance type:(id _Nullable)type __attribute__((swift_name("init(variance:type:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKotlinKTypeProjectionCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxKotlinKVariance * _Nullable)component1 __attribute__((swift_name("component1()"))); -- (id _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxKotlinKTypeProjection *)doCopyVariance:(ComponentboxKotlinKVariance * _Nullable)variance type:(id _Nullable)type __attribute__((swift_name("doCopy(variance:type:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id _Nullable type __attribute__((swift_name("type"))); -@property (readonly) ComponentboxKotlinKVariance * _Nullable variance __attribute__((swift_name("variance"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreAtomicDesc"))) -@interface ComponentboxKotlinx_coroutines_coreAtomicDesc : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)completeOp:(ComponentboxKotlinx_coroutines_coreAtomicOp *)op failure:(id _Nullable)failure __attribute__((swift_name("complete(op:failure:)"))); -- (id _Nullable)prepareOp:(ComponentboxKotlinx_coroutines_coreAtomicOp *)op __attribute__((swift_name("prepare(op:)"))); -@property ComponentboxKotlinx_coroutines_coreAtomicOp *atomicOp __attribute__((swift_name("atomicOp"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreOpDescriptor"))) -@interface ComponentboxKotlinx_coroutines_coreOpDescriptor : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (BOOL)isEarlierThanThat:(ComponentboxKotlinx_coroutines_coreOpDescriptor *)that __attribute__((swift_name("isEarlierThan(that:)"))); -- (id _Nullable)performAffected:(id _Nullable)affected __attribute__((swift_name("perform(affected:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreAtomicOp * _Nullable atomicOp __attribute__((swift_name("atomicOp"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Kotlinx_coroutines_coreLockFreeLinkedListNode.PrepareOp"))) -@interface ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodePrepareOp : ComponentboxKotlinx_coroutines_coreOpDescriptor -- (instancetype)initWithAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)next desc:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAbstractAtomicDesc *)desc __attribute__((swift_name("init(affected:next:desc:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -- (void)finishPrepare __attribute__((swift_name("finishPrepare()"))); -- (id _Nullable)performAffected:(id _Nullable)affected __attribute__((swift_name("perform(affected:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *affected __attribute__((swift_name("affected"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreAtomicOp *atomicOp __attribute__((swift_name("atomicOp"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAbstractAtomicDesc *desc __attribute__((swift_name("desc"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *next __attribute__((swift_name("next"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinKVariance"))) -@interface ComponentboxKotlinKVariance : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) ComponentboxKotlinKVariance *invariant __attribute__((swift_name("invariant"))); -@property (class, readonly) ComponentboxKotlinKVariance *in __attribute__((swift_name("in"))); -@property (class, readonly) ComponentboxKotlinKVariance *out __attribute__((swift_name("out"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinKTypeProjection.Companion"))) -@interface ComponentboxKotlinKTypeProjectionCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKotlinKTypeProjectionCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKotlinKTypeProjection *)contravariantType:(id)type __attribute__((swift_name("contravariant(type:)"))); -- (ComponentboxKotlinKTypeProjection *)covariantType:(id)type __attribute__((swift_name("covariant(type:)"))); -- (ComponentboxKotlinKTypeProjection *)invariantType:(id)type __attribute__((swift_name("invariant(type:)"))); -@property (readonly) ComponentboxKotlinKTypeProjection *STAR __attribute__((swift_name("STAR"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreAtomicOp"))) -@interface ComponentboxKotlinx_coroutines_coreAtomicOp<__contravariant T> : ComponentboxKotlinx_coroutines_coreOpDescriptor -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)completeAffected:(T _Nullable)affected failure:(id _Nullable)failure __attribute__((swift_name("complete(affected:failure:)"))); -- (id _Nullable)decideDecision:(id _Nullable)decision __attribute__((swift_name("decide(decision:)"))); -- (id _Nullable)performAffected:(id _Nullable)affected __attribute__((swift_name("perform(affected:)"))); -- (id _Nullable)prepareAffected:(T _Nullable)affected __attribute__((swift_name("prepare(affected:)"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreAtomicOp *atomicOp __attribute__((swift_name("atomicOp"))); -@property (readonly) id _Nullable consensus __attribute__((swift_name("consensus"))); -@property (readonly) BOOL isDecided __attribute__((swift_name("isDecided"))); -@property (readonly) int64_t opSequence __attribute__((swift_name("opSequence"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreLockFreeLinkedListNode"))) -@interface ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)addLastNode:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)node __attribute__((swift_name("addLast(node:)"))); -- (BOOL)addLastIfNode:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)node condition:(ComponentboxBoolean *(^)(void))condition __attribute__((swift_name("addLastIf(node:condition:)"))); -- (BOOL)addLastIfPrevNode:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)node predicate:(ComponentboxBoolean *(^)(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *))predicate __attribute__((swift_name("addLastIfPrev(node:predicate:)"))); -- (BOOL)addLastIfPrevAndIfNode:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)node predicate:(ComponentboxBoolean *(^)(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *))predicate condition:(ComponentboxBoolean *(^)(void))condition __attribute__((swift_name("addLastIfPrevAndIf(node:predicate:condition:)"))); -- (BOOL)addOneIfEmptyNode:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)node __attribute__((swift_name("addOneIfEmpty(node:)"))); -- (ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAddLastDesc *)describeAddLastNode:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)node __attribute__((swift_name("describeAddLast(node:)"))); -- (ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeRemoveFirstDesc *)describeRemoveFirst __attribute__((swift_name("describeRemoveFirst()"))); -- (void)helpRemove __attribute__((swift_name("helpRemove()"))); -- (ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable)nextIfRemoved __attribute__((swift_name("nextIfRemoved()"))); -- (BOOL)remove __attribute__((swift_name("remove()"))); -- (id _Nullable)removeFirstIfIsInstanceOfOrPeekIfPredicate:(ComponentboxBoolean *(^)(id _Nullable))predicate __attribute__((swift_name("removeFirstIfIsInstanceOfOrPeekIf(predicate:)"))); -- (ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable)removeFirstOrNull __attribute__((swift_name("removeFirstOrNull()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) BOOL isRemoved __attribute__((swift_name("isRemoved"))); -@property (readonly, getter=next_) id _Nullable next __attribute__((swift_name("next"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *nextNode __attribute__((swift_name("nextNode"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *prevNode __attribute__((swift_name("prevNode"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreLockFreeLinkedListNode.AbstractAtomicDesc"))) -@interface ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAbstractAtomicDesc : ComponentboxKotlinx_coroutines_coreAtomicDesc -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)completeOp:(ComponentboxKotlinx_coroutines_coreAtomicOp *)op failure:(id _Nullable)failure __attribute__((swift_name("complete(op:failure:)"))); -- (id _Nullable)failureAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable)affected __attribute__((swift_name("failure(affected:)"))); -- (void)finishOnSuccessAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)next __attribute__((swift_name("finishOnSuccess(affected:next:)"))); -- (void)finishPreparePrepareOp:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodePrepareOp *)prepareOp __attribute__((swift_name("finishPrepare(prepareOp:)"))); -- (id _Nullable)onPreparePrepareOp:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodePrepareOp *)prepareOp __attribute__((swift_name("onPrepare(prepareOp:)"))); -- (void)onRemovedAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected __attribute__((swift_name("onRemoved(affected:)"))); -- (id _Nullable)prepareOp:(ComponentboxKotlinx_coroutines_coreAtomicOp *)op __attribute__((swift_name("prepare(op:)"))); -- (BOOL)retryAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(id)next __attribute__((swift_name("retry(affected:next:)"))); -- (ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable)takeAffectedNodeOp:(ComponentboxKotlinx_coroutines_coreOpDescriptor *)op __attribute__((swift_name("takeAffectedNode(op:)"))); -- (id)updatedNextAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)next __attribute__((swift_name("updatedNext(affected:next:)"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable affectedNode __attribute__((swift_name("affectedNode"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable originalNext __attribute__((swift_name("originalNext"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreLockFreeLinkedListNodeAddLastDesc"))) -@interface ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAddLastDesc : ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAbstractAtomicDesc -- (instancetype)initWithQueue:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)queue node:(T)node __attribute__((swift_name("init(queue:node:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -- (void)finishOnSuccessAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)next __attribute__((swift_name("finishOnSuccess(affected:next:)"))); -- (void)finishPreparePrepareOp:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodePrepareOp *)prepareOp __attribute__((swift_name("finishPrepare(prepareOp:)"))); -- (BOOL)retryAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(id)next __attribute__((swift_name("retry(affected:next:)"))); -- (ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable)takeAffectedNodeOp:(ComponentboxKotlinx_coroutines_coreOpDescriptor *)op __attribute__((swift_name("takeAffectedNode(op:)"))); -- (id)updatedNextAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)next __attribute__((swift_name("updatedNext(affected:next:)"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable affectedNode __attribute__((swift_name("affectedNode"))); -@property (readonly) T node __attribute__((swift_name("node"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *originalNext __attribute__((swift_name("originalNext"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *queue __attribute__((swift_name("queue"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreLockFreeLinkedListNodeRemoveFirstDesc"))) -@interface ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeRemoveFirstDesc : ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAbstractAtomicDesc -- (instancetype)initWithQueue:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)queue __attribute__((swift_name("init(queue:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -- (id _Nullable)failureAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable)affected __attribute__((swift_name("failure(affected:)"))); -- (void)finishOnSuccessAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)next __attribute__((swift_name("finishOnSuccess(affected:next:)"))); -- (void)finishPreparePrepareOp:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodePrepareOp *)prepareOp __attribute__((swift_name("finishPrepare(prepareOp:)"))); -- (BOOL)retryAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(id)next __attribute__((swift_name("retry(affected:next:)"))); -- (ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable)takeAffectedNodeOp:(ComponentboxKotlinx_coroutines_coreOpDescriptor *)op __attribute__((swift_name("takeAffectedNode(op:)"))); -- (id)updatedNextAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)next __attribute__((swift_name("updatedNext(affected:next:)"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable affectedNode __attribute__((swift_name("affectedNode"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable originalNext __attribute__((swift_name("originalNext"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *queue __attribute__((swift_name("queue"))); -@property (readonly) T _Nullable result __attribute__((swift_name("result"))); -@end; - -#pragma pop_macro("_Nullable_result") -#pragma clang diagnostic pop -NS_ASSUME_NONNULL_END diff --git a/componentbox/package/ComponentBox.xcframework/ios-arm64/componentbox.framework/Info.plist b/componentbox/package/ComponentBox.xcframework/ios-arm64/componentbox.framework/Info.plist deleted file mode 100644 index 331d7fce..00000000 --- a/componentbox/package/ComponentBox.xcframework/ios-arm64/componentbox.framework/Info.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - CFBundleExecutable - componentbox - CFBundleIdentifier - com.dropbox.componentbox.componentbox - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - componentbox - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSupportedPlatforms - - iPhoneOS - - CFBundleVersion - 1 - MinimumOSVersion - 9.0 - UIDeviceFamily - - 1 - 2 - - UIRequiredDeviceCapabilities - - arm64 - - - \ No newline at end of file diff --git a/componentbox/package/ComponentBox.xcframework/ios-arm64/componentbox.framework/Modules/module.modulemap b/componentbox/package/ComponentBox.xcframework/ios-arm64/componentbox.framework/Modules/module.modulemap deleted file mode 100644 index ca14082c..00000000 --- a/componentbox/package/ComponentBox.xcframework/ios-arm64/componentbox.framework/Modules/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module componentbox { - umbrella header "componentbox.h" - - export * - module * { export * } -} \ No newline at end of file diff --git a/componentbox/package/ComponentBox.xcframework/ios-arm64/componentbox.framework/componentbox b/componentbox/package/ComponentBox.xcframework/ios-arm64/componentbox.framework/componentbox deleted file mode 100644 index a9d2f77c..00000000 Binary files a/componentbox/package/ComponentBox.xcframework/ios-arm64/componentbox.framework/componentbox and /dev/null differ diff --git a/componentbox/package/ComponentBox.xcframework/ios-x86_64-simulator/componentbox.framework/Headers/componentbox.h b/componentbox/package/ComponentBox.xcframework/ios-x86_64-simulator/componentbox.framework/Headers/componentbox.h deleted file mode 100644 index a9a29493..00000000 --- a/componentbox/package/ComponentBox.xcframework/ios-x86_64-simulator/componentbox.framework/Headers/componentbox.h +++ /dev/null @@ -1,3205 +0,0 @@ -#import -#import -#import -#import -#import -#import -#import - -@class ComponentboxComponentBoxClient, ComponentboxComponentBox, ComponentboxKotlinUnit, NSError, ComponentboxComponentBoxScreen, ComponentboxKtor_client_coreHttpClient, ComponentboxComponentBoxViewModelCompanion, ComponentboxComponentBoxViewModel, ComponentboxKotlinArray, ComponentboxComponentBoxType, ComponentboxComponentBoxBanner, ComponentboxComponentBoxModal, ComponentboxKotlinEnumCompanion, ComponentboxKotlinEnum, ComponentboxAlignmentCompanion, ComponentboxAlignment, ComponentboxArrangementCompanion, ComponentboxArrangement, ComponentboxColor, ComponentboxBorderStrokeCompanion, ComponentboxBorderStroke, ComponentboxDestination, ComponentboxBottomTab, ComponentboxButtonVariantCompanion, ComponentboxButtonVariant, ComponentboxColorCompanion, ComponentboxKotlinx_serialization_jsonJsonElement, ComponentboxKotlinx_serialization_jsonJsonTransformingSerializer, ComponentboxColorSerializer, ComponentboxComponentCompanion, ComponentboxComponent, ComponentboxModifier, ComponentboxComponentBox_Companion, ComponentboxComponentBox_, ComponentboxComponentButtonCompanion, ComponentboxComponentButton, ComponentboxComponentColumnCompanion, ComponentboxComponentColumn, ComponentboxContentScale, ComponentboxComponentDrawableCompanion, ComponentboxComponentDrawable, ComponentboxComponentRowCompanion, ComponentboxComponentRow, ComponentboxShape, ComponentboxComponentSurfaceCompanion, ComponentboxComponentSurface, ComponentboxComponentSwitchCompanion, ComponentboxComponentSwitch, ComponentboxComponentTextCompanion, ComponentboxComponentText, ComponentboxComponentVectorCompanion, ComponentboxComponentVector, ComponentboxComponentBoxCompanion, ComponentboxComponentBoxBannerCompanion, ComponentboxComponentBoxModalCompanion, ComponentboxComponentBoxScreenCompanion, ComponentboxComponentBoxTypeCompanion, ComponentboxComponentTypeCompanion, ComponentboxComponentType, ComponentboxContentScaleCompanion, ComponentboxThemer, ComponentboxContext, ComponentboxIcon, ComponentboxIconType, ComponentboxImageType, ComponentboxMarginCompanion, ComponentboxMargin, ComponentboxPadding, ComponentboxModifierCompanion, ComponentboxPaddingCompanion, ComponentboxShapeCompanion, ComponentboxKotlinThrowable, ComponentboxKotlinException, ComponentboxKotlinRuntimeException, ComponentboxKotlinIllegalStateException, ComponentboxKtor_client_coreHttpClientEngineConfig, ComponentboxKtor_client_coreHttpClientConfig, ComponentboxKtor_eventsEvents, ComponentboxKtor_client_coreHttpReceivePipeline, ComponentboxKtor_client_coreHttpRequestPipeline, ComponentboxKtor_client_coreHttpResponsePipeline, ComponentboxKtor_client_coreHttpSendPipeline, ComponentboxKotlinx_serialization_coreSerializersModule, ComponentboxKotlinx_serialization_coreSerialKind, ComponentboxKotlinNothing, ComponentboxKotlinx_serialization_jsonJsonElementCompanion, ComponentboxKtor_client_coreHttpRequestData, ComponentboxKtor_client_coreHttpResponseData, ComponentboxKotlinx_coroutines_coreCoroutineDispatcher, ComponentboxKtor_client_coreProxyConfig, ComponentboxKtor_utilsAttributeKey, ComponentboxKtor_eventsEventDefinition, ComponentboxKtor_utilsPipelinePhase, ComponentboxKtor_utilsPipeline, ComponentboxKtor_client_coreHttpReceivePipelinePhases, ComponentboxKtor_client_coreHttpResponse, ComponentboxKtor_client_coreHttpRequestPipelinePhases, ComponentboxKtor_client_coreHttpRequestBuilder, ComponentboxKtor_client_coreHttpResponsePipelinePhases, ComponentboxKtor_client_coreHttpResponseContainer, ComponentboxKtor_client_coreHttpClientCall, ComponentboxKtor_client_coreHttpSendPipelinePhases, ComponentboxKtor_httpUrl, ComponentboxKtor_httpHttpMethod, ComponentboxKtor_httpOutgoingContent, ComponentboxKtor_httpHttpStatusCode, ComponentboxKtor_utilsGMTDate, ComponentboxKtor_httpHttpProtocolVersion, ComponentboxKotlinAbstractCoroutineContextElement, ComponentboxKotlinx_coroutines_coreCoroutineDispatcherKey, ComponentboxKtor_httpHeadersBuilder, ComponentboxKtor_client_coreHttpRequestBuilderCompanion, ComponentboxKtor_httpURLBuilder, ComponentboxKtor_utilsTypeInfo, ComponentboxKtor_client_coreHttpClientCallCompanion, ComponentboxKtor_httpUrlCompanion, ComponentboxKtor_httpURLProtocol, ComponentboxKtor_httpHttpMethodCompanion, ComponentboxKtor_httpContentType, ComponentboxKotlinCancellationException, ComponentboxKtor_httpHttpStatusCodeCompanion, ComponentboxKtor_utilsGMTDateCompanion, ComponentboxKtor_utilsWeekDay, ComponentboxKtor_utilsMonth, ComponentboxKtor_httpHttpProtocolVersionCompanion, ComponentboxKotlinAbstractCoroutineContextKey, ComponentboxKtor_ioMemory, ComponentboxKtor_ioChunkBuffer, ComponentboxKotlinByteArray, ComponentboxKtor_ioByteReadPacket, ComponentboxKtor_utilsStringValuesBuilderImpl, ComponentboxKtor_httpURLBuilderCompanion, ComponentboxKtor_httpURLProtocolCompanion, ComponentboxKtor_httpHeaderValueParam, ComponentboxKtor_httpHeaderValueWithParametersCompanion, ComponentboxKtor_httpHeaderValueWithParameters, ComponentboxKtor_httpContentTypeCompanion, ComponentboxKtor_utilsWeekDayCompanion, ComponentboxKtor_utilsMonthCompanion, ComponentboxKtor_ioMemoryCompanion, ComponentboxKtor_ioBufferCompanion, ComponentboxKtor_ioBuffer, ComponentboxKtor_ioChunkBufferCompanion, ComponentboxKotlinByteIterator, ComponentboxKtor_ioInputCompanion, ComponentboxKtor_ioInput, ComponentboxKtor_ioByteReadPacketCompanion, ComponentboxKotlinKTypeProjection, ComponentboxKotlinx_coroutines_coreAtomicDesc, ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodePrepareOp, ComponentboxKotlinKVariance, ComponentboxKotlinKTypeProjectionCompanion, ComponentboxKotlinx_coroutines_coreAtomicOp<__contravariant T>, ComponentboxKotlinx_coroutines_coreOpDescriptor, ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode, ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAbstractAtomicDesc, ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAddLastDesc, ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeRemoveFirstDesc; - -@protocol ComponentboxKotlinx_serialization_coreKSerializer, ComponentboxKotlinx_coroutines_coreFlow, ComponentboxZiplineZiplineService, ComponentboxKotlinComparable, ComponentboxStringRes, ComponentboxVectorRes, ComponentboxKotlinx_serialization_coreEncoder, ComponentboxKotlinx_serialization_coreSerialDescriptor, ComponentboxKotlinx_serialization_coreSerializationStrategy, ComponentboxKotlinx_serialization_coreDecoder, ComponentboxKotlinx_serialization_coreDeserializationStrategy, ComponentboxInflater, ComponentboxManager, ComponentboxImage, ComponentboxTextStyle, ComponentboxKotlinCoroutineContext, ComponentboxKotlinx_coroutines_coreCoroutineScope, ComponentboxKtor_ioCloseable, ComponentboxKtor_client_coreHttpClientEngine, ComponentboxKtor_client_coreHttpClientEngineCapability, ComponentboxKtor_utilsAttributes, ComponentboxKotlinIterator, ComponentboxKotlinx_coroutines_coreFlowCollector, ComponentboxKotlinx_serialization_coreCompositeEncoder, ComponentboxKotlinAnnotation, ComponentboxKotlinx_serialization_coreCompositeDecoder, ComponentboxKotlinCoroutineContextElement, ComponentboxKotlinCoroutineContextKey, ComponentboxKtor_client_coreHttpClientPlugin, ComponentboxKotlinx_coroutines_coreDisposableHandle, ComponentboxKotlinSuspendFunction2, ComponentboxKotlinx_serialization_coreSerializersModuleCollector, ComponentboxKotlinKClass, ComponentboxKtor_httpHeaders, ComponentboxKotlinx_coroutines_coreJob, ComponentboxKotlinContinuation, ComponentboxKotlinContinuationInterceptor, ComponentboxKotlinx_coroutines_coreRunnable, ComponentboxKotlinFunction, ComponentboxKtor_httpHttpMessage, ComponentboxKtor_ioByteReadChannel, ComponentboxKtor_httpHttpMessageBuilder, ComponentboxKtor_client_coreHttpRequest, ComponentboxKotlinKDeclarationContainer, ComponentboxKotlinKAnnotatedElement, ComponentboxKotlinKClassifier, ComponentboxKtor_httpParameters, ComponentboxKotlinMapEntry, ComponentboxKtor_utilsStringValues, ComponentboxKotlinx_coroutines_coreChildHandle, ComponentboxKotlinx_coroutines_coreChildJob, ComponentboxKotlinSequence, ComponentboxKotlinx_coroutines_coreSelectClause0, ComponentboxKtor_ioReadSession, ComponentboxKotlinSuspendFunction1, ComponentboxKotlinAppendable, ComponentboxKtor_utilsStringValuesBuilder, ComponentboxKtor_httpParametersBuilder, ComponentboxKotlinKType, ComponentboxKotlinx_coroutines_coreParentJob, ComponentboxKotlinx_coroutines_coreSelectInstance, ComponentboxKotlinSuspendFunction0, ComponentboxKtor_ioObjectPool; - -NS_ASSUME_NONNULL_BEGIN -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wunknown-warning-option" -#pragma clang diagnostic ignored "-Wincompatible-property-type" -#pragma clang diagnostic ignored "-Wnullability" - -#pragma push_macro("_Nullable_result") -#if !__has_feature(nullability_nullable_result) -#undef _Nullable_result -#define _Nullable_result _Nullable -#endif - -__attribute__((swift_name("KotlinBase"))) -@interface ComponentboxBase : NSObject -- (instancetype)init __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -+ (void)initialize __attribute__((objc_requires_super)); -@end; - -@interface ComponentboxBase (ComponentboxBaseCopying) -@end; - -__attribute__((swift_name("KotlinMutableSet"))) -@interface ComponentboxMutableSet : NSMutableSet -@end; - -__attribute__((swift_name("KotlinMutableDictionary"))) -@interface ComponentboxMutableDictionary : NSMutableDictionary -@end; - -@interface NSError (NSErrorComponentboxKotlinException) -@property (readonly) id _Nullable kotlinException; -@end; - -__attribute__((swift_name("KotlinNumber"))) -@interface ComponentboxNumber : NSNumber -- (instancetype)initWithChar:(char)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedChar:(unsigned char)value __attribute__((unavailable)); -- (instancetype)initWithShort:(short)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedShort:(unsigned short)value __attribute__((unavailable)); -- (instancetype)initWithInt:(int)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedInt:(unsigned int)value __attribute__((unavailable)); -- (instancetype)initWithLong:(long)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedLong:(unsigned long)value __attribute__((unavailable)); -- (instancetype)initWithLongLong:(long long)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedLongLong:(unsigned long long)value __attribute__((unavailable)); -- (instancetype)initWithFloat:(float)value __attribute__((unavailable)); -- (instancetype)initWithDouble:(double)value __attribute__((unavailable)); -- (instancetype)initWithBool:(BOOL)value __attribute__((unavailable)); -- (instancetype)initWithInteger:(NSInteger)value __attribute__((unavailable)); -- (instancetype)initWithUnsignedInteger:(NSUInteger)value __attribute__((unavailable)); -+ (instancetype)numberWithChar:(char)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedChar:(unsigned char)value __attribute__((unavailable)); -+ (instancetype)numberWithShort:(short)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedShort:(unsigned short)value __attribute__((unavailable)); -+ (instancetype)numberWithInt:(int)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedInt:(unsigned int)value __attribute__((unavailable)); -+ (instancetype)numberWithLong:(long)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedLong:(unsigned long)value __attribute__((unavailable)); -+ (instancetype)numberWithLongLong:(long long)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedLongLong:(unsigned long long)value __attribute__((unavailable)); -+ (instancetype)numberWithFloat:(float)value __attribute__((unavailable)); -+ (instancetype)numberWithDouble:(double)value __attribute__((unavailable)); -+ (instancetype)numberWithBool:(BOOL)value __attribute__((unavailable)); -+ (instancetype)numberWithInteger:(NSInteger)value __attribute__((unavailable)); -+ (instancetype)numberWithUnsignedInteger:(NSUInteger)value __attribute__((unavailable)); -@end; - -__attribute__((swift_name("KotlinByte"))) -@interface ComponentboxByte : ComponentboxNumber -- (instancetype)initWithChar:(char)value; -+ (instancetype)numberWithChar:(char)value; -@end; - -__attribute__((swift_name("KotlinUByte"))) -@interface ComponentboxUByte : ComponentboxNumber -- (instancetype)initWithUnsignedChar:(unsigned char)value; -+ (instancetype)numberWithUnsignedChar:(unsigned char)value; -@end; - -__attribute__((swift_name("KotlinShort"))) -@interface ComponentboxShort : ComponentboxNumber -- (instancetype)initWithShort:(short)value; -+ (instancetype)numberWithShort:(short)value; -@end; - -__attribute__((swift_name("KotlinUShort"))) -@interface ComponentboxUShort : ComponentboxNumber -- (instancetype)initWithUnsignedShort:(unsigned short)value; -+ (instancetype)numberWithUnsignedShort:(unsigned short)value; -@end; - -__attribute__((swift_name("KotlinInt"))) -@interface ComponentboxInt : ComponentboxNumber -- (instancetype)initWithInt:(int)value; -+ (instancetype)numberWithInt:(int)value; -@end; - -__attribute__((swift_name("KotlinUInt"))) -@interface ComponentboxUInt : ComponentboxNumber -- (instancetype)initWithUnsignedInt:(unsigned int)value; -+ (instancetype)numberWithUnsignedInt:(unsigned int)value; -@end; - -__attribute__((swift_name("KotlinLong"))) -@interface ComponentboxLong : ComponentboxNumber -- (instancetype)initWithLongLong:(long long)value; -+ (instancetype)numberWithLongLong:(long long)value; -@end; - -__attribute__((swift_name("KotlinULong"))) -@interface ComponentboxULong : ComponentboxNumber -- (instancetype)initWithUnsignedLongLong:(unsigned long long)value; -+ (instancetype)numberWithUnsignedLongLong:(unsigned long long)value; -@end; - -__attribute__((swift_name("KotlinFloat"))) -@interface ComponentboxFloat : ComponentboxNumber -- (instancetype)initWithFloat:(float)value; -+ (instancetype)numberWithFloat:(float)value; -@end; - -__attribute__((swift_name("KotlinDouble"))) -@interface ComponentboxDouble : ComponentboxNumber -- (instancetype)initWithDouble:(double)value; -+ (instancetype)numberWithDouble:(double)value; -@end; - -__attribute__((swift_name("KotlinBoolean"))) -@interface ComponentboxBoolean : ComponentboxNumber -- (instancetype)initWithBool:(BOOL)value; -+ (instancetype)numberWithBool:(BOOL)value; -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBoxClient"))) -@interface ComponentboxComponentBoxClient : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)componentBoxClient __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBoxClient *shared __attribute__((swift_name("shared"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)fetchComponentBoxUrl:(NSString *)url completionHandler:(void (^)(ComponentboxComponentBox * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("fetchComponentBox(url:completionHandler:)"))); -- (ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxComponentBox *, ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError *, ComponentboxKotlinUnit *)))(void))fetchComponentBoxNativeUrl:(NSString *)url __attribute__((swift_name("fetchComponentBoxNative(url:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)fetchScreenUrl:(NSString *)url completionHandler:(void (^)(ComponentboxComponentBoxScreen * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("fetchScreen(url:completionHandler:)"))); -- (ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxComponentBoxScreen *, ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError *, ComponentboxKotlinUnit *)))(void))fetchScreenNativeUrl:(NSString *)url __attribute__((swift_name("fetchScreenNative(url:)"))); -@property (readonly) ComponentboxKtor_client_coreHttpClient *client __attribute__((swift_name("client"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBoxViewModel"))) -@interface ComponentboxComponentBoxViewModel : ComponentboxBase -- (instancetype)initWithRoot:(C _Nullable)root __attribute__((swift_name("init(root:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxComponentBoxViewModelCompanion *companion __attribute__((swift_name("companion"))); -- (C _Nullable)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxComponentBoxViewModel *)doCopyRoot:(C _Nullable)root __attribute__((swift_name("doCopy(root:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) C _Nullable root __attribute__((swift_name("root"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBoxViewModelCompanion"))) -@interface ComponentboxComponentBoxViewModelCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBoxViewModelCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializerTypeParamsSerializers:(ComponentboxKotlinArray> *)typeParamsSerializers __attribute__((swift_name("serializer(typeParamsSerializers:)"))); -- (id)serializerTypeSerial0:(id)typeSerial0 __attribute__((swift_name("serializer(typeSerial0:)"))); -@end; - -__attribute__((swift_name("ZiplineZiplineService"))) -@protocol ComponentboxZiplineZiplineService -@required -- (void)close __attribute__((swift_name("close()"))); -@end; - -__attribute__((swift_name("ComponentBoxZiplineService"))) -@protocol ComponentboxComponentBoxZiplineService -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)produceModelsInBannerType:(ComponentboxComponentBoxType *)type url:(NSString *)url headers:(NSDictionary *)headers completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("produceModelsInBanner(type:url:headers:completionHandler:)"))); -- (ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxComponentBoxViewModel *, ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError * _Nullable, ComponentboxKotlinUnit *)))(void), ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError *, ComponentboxKotlinUnit *)))(void))produceModelsInBannerNativeType:(ComponentboxComponentBoxType *)type url:(NSString *)url headers:(NSDictionary *)headers __attribute__((swift_name("produceModelsInBannerNative(type:url:headers:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)produceModelsInModalType:(ComponentboxComponentBoxType *)type url:(NSString *)url headers:(NSDictionary *)headers completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("produceModelsInModal(type:url:headers:completionHandler:)"))); -- (ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxComponentBoxViewModel *, ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError * _Nullable, ComponentboxKotlinUnit *)))(void), ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError *, ComponentboxKotlinUnit *)))(void))produceModelsInModalNativeType:(ComponentboxComponentBoxType *)type url:(NSString *)url headers:(NSDictionary *)headers __attribute__((swift_name("produceModelsInModalNative(type:url:headers:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)produceModelsInScreenType:(ComponentboxComponentBoxType *)type url:(NSString *)url headers:(NSDictionary *)headers completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("produceModelsInScreen(type:url:headers:completionHandler:)"))); -- (ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(ComponentboxComponentBoxViewModel *, ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError * _Nullable, ComponentboxKotlinUnit *)))(void), ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError *, ComponentboxKotlinUnit *)))(void))produceModelsInScreenNativeType:(ComponentboxComponentBoxType *)type url:(NSString *)url headers:(NSDictionary *)headers __attribute__((swift_name("produceModelsInScreenNative(type:url:headers:)"))); -@end; - -__attribute__((swift_name("HostApi"))) -@protocol ComponentboxHostApi -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)httpCallUrl:(NSString *)url headers:(NSDictionary *)headers completionHandler:(void (^)(NSString * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("httpCall(url:headers:completionHandler:)"))); -- (ComponentboxKotlinUnit *(^(^)(ComponentboxKotlinUnit *(^)(NSString *, ComponentboxKotlinUnit *), ComponentboxKotlinUnit *(^)(NSError *, ComponentboxKotlinUnit *)))(void))httpCallNativeUrl:(NSString *)url headers:(NSDictionary *)headers __attribute__((swift_name("httpCallNative(url:headers:)"))); -@end; - -__attribute__((swift_name("KotlinComparable"))) -@protocol ComponentboxKotlinComparable -@required -- (int32_t)compareToOther:(id _Nullable)other __attribute__((swift_name("compareTo(other:)"))); -@end; - -__attribute__((swift_name("KotlinEnum"))) -@interface ComponentboxKotlinEnum : ComponentboxBase -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKotlinEnumCompanion *companion __attribute__((swift_name("companion"))); -- (int32_t)compareToOther:(E)other __attribute__((swift_name("compareTo(other:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@property (readonly) int32_t ordinal __attribute__((swift_name("ordinal"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Alignment"))) -@interface ComponentboxAlignment : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxAlignmentCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxAlignment *topstart __attribute__((swift_name("topstart"))); -@property (class, readonly) ComponentboxAlignment *topcenter __attribute__((swift_name("topcenter"))); -@property (class, readonly) ComponentboxAlignment *topend __attribute__((swift_name("topend"))); -@property (class, readonly) ComponentboxAlignment *centerstart __attribute__((swift_name("centerstart"))); -@property (class, readonly) ComponentboxAlignment *center __attribute__((swift_name("center"))); -@property (class, readonly) ComponentboxAlignment *centerend __attribute__((swift_name("centerend"))); -@property (class, readonly) ComponentboxAlignment *bottomstart __attribute__((swift_name("bottomstart"))); -@property (class, readonly) ComponentboxAlignment *bottomcenter __attribute__((swift_name("bottomcenter"))); -@property (class, readonly) ComponentboxAlignment *bottomend __attribute__((swift_name("bottomend"))); -@property (class, readonly) ComponentboxAlignment *top __attribute__((swift_name("top"))); -@property (class, readonly) ComponentboxAlignment *centervertically __attribute__((swift_name("centervertically"))); -@property (class, readonly) ComponentboxAlignment *bottom __attribute__((swift_name("bottom"))); -@property (class, readonly) ComponentboxAlignment *start __attribute__((swift_name("start"))); -@property (class, readonly) ComponentboxAlignment *centerhorizontally __attribute__((swift_name("centerhorizontally"))); -@property (class, readonly) ComponentboxAlignment *end __attribute__((swift_name("end"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Alignment.Companion"))) -@interface ComponentboxAlignmentCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxAlignmentCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Arrangement"))) -@interface ComponentboxArrangement : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxArrangementCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxArrangement *start __attribute__((swift_name("start"))); -@property (class, readonly) ComponentboxArrangement *end __attribute__((swift_name("end"))); -@property (class, readonly) ComponentboxArrangement *top __attribute__((swift_name("top"))); -@property (class, readonly) ComponentboxArrangement *bottom __attribute__((swift_name("bottom"))); -@property (class, readonly) ComponentboxArrangement *center __attribute__((swift_name("center"))); -@property (class, readonly) ComponentboxArrangement *spaceevenly __attribute__((swift_name("spaceevenly"))); -@property (class, readonly) ComponentboxArrangement *spacebetween __attribute__((swift_name("spacebetween"))); -@property (class, readonly) ComponentboxArrangement *spacearound __attribute__((swift_name("spacearound"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Arrangement.Companion"))) -@interface ComponentboxArrangementCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxArrangementCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("BorderStroke"))) -@interface ComponentboxBorderStroke : ComponentboxBase -- (instancetype)initWithWidth:(int32_t)width color:(ComponentboxColor *)color __attribute__((swift_name("init(width:color:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxBorderStrokeCompanion *companion __attribute__((swift_name("companion"))); -- (int32_t)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxColor *)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxBorderStroke *)doCopyWidth:(int32_t)width color:(ComponentboxColor *)color __attribute__((swift_name("doCopy(width:color:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxColor *color __attribute__((swift_name("color"))); -@property (readonly) int32_t width __attribute__((swift_name("width"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("BorderStroke.Companion"))) -@interface ComponentboxBorderStrokeCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxBorderStrokeCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("BottomTab"))) -@interface ComponentboxBottomTab : ComponentboxBase -- (instancetype)initWithId:(ComponentboxDestination *)id title:(id)title iconSelected:(id)iconSelected iconNotSelected:(id)iconNotSelected __attribute__((swift_name("init(id:title:iconSelected:iconNotSelected:)"))) __attribute__((objc_designated_initializer)); -- (ComponentboxDestination *)component1 __attribute__((swift_name("component1()"))); -- (id)component2 __attribute__((swift_name("component2()"))); -- (id)component3 __attribute__((swift_name("component3()"))); -- (id)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxBottomTab *)doCopyId:(ComponentboxDestination *)id title:(id)title iconSelected:(id)iconSelected iconNotSelected:(id)iconNotSelected __attribute__((swift_name("doCopy(id:title:iconSelected:iconNotSelected:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id iconNotSelected __attribute__((swift_name("iconNotSelected"))); -@property (readonly) id iconSelected __attribute__((swift_name("iconSelected"))); -@property (readonly) ComponentboxDestination *id __attribute__((swift_name("id"))); -@property (readonly) id title __attribute__((swift_name("title"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ButtonVariant"))) -@interface ComponentboxButtonVariant : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxButtonVariantCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxButtonVariant *contained __attribute__((swift_name("contained"))); -@property (class, readonly) ComponentboxButtonVariant *text __attribute__((swift_name("text"))); -@property (class, readonly) ComponentboxButtonVariant *outlined __attribute__((swift_name("outlined"))); -@property (class, readonly) ComponentboxButtonVariant *icon __attribute__((swift_name("icon"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ButtonVariant.Companion"))) -@interface ComponentboxButtonVariantCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxButtonVariantCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Color"))) -@interface ComponentboxColor : ComponentboxBase -- (instancetype)initWithTitle:(NSString *)title light:(int64_t)light dark:(int64_t)dark __attribute__((swift_name("init(title:light:dark:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxColorCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (int64_t)component2 __attribute__((swift_name("component2()"))); -- (int64_t)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxColor *)doCopyTitle:(NSString *)title light:(int64_t)light dark:(int64_t)dark __attribute__((swift_name("doCopy(title:light:dark:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int64_t dark __attribute__((swift_name("dark"))); -@property (readonly) int64_t light __attribute__((swift_name("light"))); -@property (readonly) NSString *title __attribute__((swift_name("title"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Color.Companion"))) -@interface ComponentboxColorCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxColorCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreSerializationStrategy"))) -@protocol ComponentboxKotlinx_serialization_coreSerializationStrategy -@required -- (void)serializeEncoder:(id)encoder value:(id _Nullable)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreDeserializationStrategy"))) -@protocol ComponentboxKotlinx_serialization_coreDeserializationStrategy -@required -- (id _Nullable)deserializeDecoder:(id)decoder __attribute__((swift_name("deserialize(decoder:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreKSerializer"))) -@protocol ComponentboxKotlinx_serialization_coreKSerializer -@required -@end; - -__attribute__((swift_name("Kotlinx_serialization_jsonJsonTransformingSerializer"))) -@interface ComponentboxKotlinx_serialization_jsonJsonTransformingSerializer : ComponentboxBase -- (instancetype)initWithTSerializer:(id)tSerializer __attribute__((swift_name("init(tSerializer:)"))) __attribute__((objc_designated_initializer)); -- (T)deserializeDecoder:(id)decoder __attribute__((swift_name("deserialize(decoder:)"))); -- (void)serializeEncoder:(id)encoder value:(T)value __attribute__((swift_name("serialize(encoder:value:)"))); -- (ComponentboxKotlinx_serialization_jsonJsonElement *)transformDeserializeElement:(ComponentboxKotlinx_serialization_jsonJsonElement *)element __attribute__((swift_name("transformDeserialize(element:)"))); -- (ComponentboxKotlinx_serialization_jsonJsonElement *)transformSerializeElement:(ComponentboxKotlinx_serialization_jsonJsonElement *)element __attribute__((swift_name("transformSerialize(element:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ColorSerializer"))) -@interface ComponentboxColorSerializer : ComponentboxKotlinx_serialization_jsonJsonTransformingSerializer -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithTSerializer:(id)tSerializer __attribute__((swift_name("init(tSerializer:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)colorSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxColorSerializer *shared __attribute__((swift_name("shared"))); -- (ComponentboxKotlinx_serialization_jsonJsonElement *)transformDeserializeElement:(ComponentboxKotlinx_serialization_jsonJsonElement *)element __attribute__((swift_name("transformDeserialize(element:)"))); -@end; - -__attribute__((swift_name("Colors"))) -@protocol ComponentboxColors -@required -- (NSMutableArray *)list __attribute__((swift_name("list()"))); -@property (readonly) ComponentboxColor *background __attribute__((swift_name("background"))); -@property (readonly) ComponentboxColor *error __attribute__((swift_name("error"))); -@property (readonly) ComponentboxColor *onBackground __attribute__((swift_name("onBackground"))); -@property (readonly) ComponentboxColor *onError __attribute__((swift_name("onError"))); -@property (readonly) ComponentboxColor *onPrimary __attribute__((swift_name("onPrimary"))); -@property (readonly) ComponentboxColor *onSecondary __attribute__((swift_name("onSecondary"))); -@property (readonly) ComponentboxColor *onSurface __attribute__((swift_name("onSurface"))); -@property (readonly) ComponentboxColor *primary __attribute__((swift_name("primary"))); -@property (readonly) ComponentboxColor *primaryVariant __attribute__((swift_name("primaryVariant"))); -@property (readonly) ComponentboxColor *secondary __attribute__((swift_name("secondary"))); -@property (readonly) ComponentboxColor *secondaryVariant __attribute__((swift_name("secondaryVariant"))); -@property (readonly) ComponentboxColor *surface __attribute__((swift_name("surface"))); -@end; - -__attribute__((swift_name("Component"))) -@interface ComponentboxComponent : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property (class, readonly, getter=companion) ComponentboxComponentCompanion *companion __attribute__((swift_name("companion"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Box"))) -@interface ComponentboxComponentBox_ : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier horizontalArrangement:(ComponentboxArrangement * _Nullable)horizontalArrangement verticalAlignment:(ComponentboxAlignment * _Nullable)verticalAlignment action:(NSString * _Nullable)action __attribute__((swift_name("init(id:components:modifier:horizontalArrangement:verticalAlignment:action:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentBox_Companion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (NSMutableArray * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxModifier * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxArrangement * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxAlignment * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (NSString * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxComponentBox_ *)doCopyId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier horizontalArrangement:(ComponentboxArrangement * _Nullable)horizontalArrangement verticalAlignment:(ComponentboxAlignment * _Nullable)verticalAlignment action:(NSString * _Nullable)action __attribute__((swift_name("doCopy(id:components:modifier:horizontalArrangement:verticalAlignment:action:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property NSString * _Nullable action __attribute__((swift_name("action"))); -@property NSMutableArray * _Nullable components __attribute__((swift_name("components"))); -@property ComponentboxArrangement * _Nullable horizontalArrangement __attribute__((swift_name("horizontalArrangement"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property ComponentboxAlignment * _Nullable verticalAlignment __attribute__((swift_name("verticalAlignment"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.BoxCompanion"))) -@interface ComponentboxComponentBox_Companion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBox_Companion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Button"))) -@interface ComponentboxComponentButton : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier isEnabled:(ComponentboxBoolean * _Nullable)isEnabled action:(NSString * _Nullable)action variant:(NSString * _Nullable)variant __attribute__((swift_name("init(id:components:modifier:isEnabled:action:variant:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentButtonCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (NSMutableArray * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxModifier * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxBoolean * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (NSString * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (NSString * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxComponentButton *)doCopyId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier isEnabled:(ComponentboxBoolean * _Nullable)isEnabled action:(NSString * _Nullable)action variant:(NSString * _Nullable)variant __attribute__((swift_name("doCopy(id:components:modifier:isEnabled:action:variant:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property NSString * _Nullable action __attribute__((swift_name("action"))); -@property NSMutableArray * _Nullable components __attribute__((swift_name("components"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxBoolean * _Nullable isEnabled __attribute__((swift_name("isEnabled"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property NSString * _Nullable variant __attribute__((swift_name("variant"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.ButtonCompanion"))) -@interface ComponentboxComponentButtonCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentButtonCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Column"))) -@interface ComponentboxComponentColumn : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier verticalArrangement:(ComponentboxArrangement * _Nullable)verticalArrangement horizontalAlignment:(ComponentboxAlignment * _Nullable)horizontalAlignment isLazy:(ComponentboxBoolean * _Nullable)isLazy isTable:(ComponentboxBoolean * _Nullable)isTable action:(NSString * _Nullable)action __attribute__((swift_name("init(id:components:modifier:verticalArrangement:horizontalAlignment:isLazy:isTable:action:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentColumnCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (NSMutableArray * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxModifier * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxArrangement * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxAlignment * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (ComponentboxBoolean * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxBoolean * _Nullable)component7 __attribute__((swift_name("component7()"))); -- (NSString * _Nullable)component8 __attribute__((swift_name("component8()"))); -- (ComponentboxComponentColumn *)doCopyId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier verticalArrangement:(ComponentboxArrangement * _Nullable)verticalArrangement horizontalAlignment:(ComponentboxAlignment * _Nullable)horizontalAlignment isLazy:(ComponentboxBoolean * _Nullable)isLazy isTable:(ComponentboxBoolean * _Nullable)isTable action:(NSString * _Nullable)action __attribute__((swift_name("doCopy(id:components:modifier:verticalArrangement:horizontalAlignment:isLazy:isTable:action:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property NSString * _Nullable action __attribute__((swift_name("action"))); -@property NSMutableArray * _Nullable components __attribute__((swift_name("components"))); -@property ComponentboxAlignment * _Nullable horizontalAlignment __attribute__((swift_name("horizontalAlignment"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxBoolean * _Nullable isLazy __attribute__((swift_name("isLazy"))); -@property ComponentboxBoolean * _Nullable isTable __attribute__((swift_name("isTable"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property ComponentboxArrangement * _Nullable verticalArrangement __attribute__((swift_name("verticalArrangement"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.ColumnCompanion"))) -@interface ComponentboxComponentColumnCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentColumnCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Companion"))) -@interface ComponentboxComponentCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -- (id)serializerTypeParamsSerializers:(ComponentboxKotlinArray> *)typeParamsSerializers __attribute__((swift_name("serializer(typeParamsSerializers:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Drawable"))) -@interface ComponentboxComponentDrawable : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id name:(NSString * _Nullable)name url:(NSString * _Nullable)url contentDescription:(NSString * _Nullable)contentDescription modifier:(ComponentboxModifier * _Nullable)modifier alignment:(ComponentboxAlignment * _Nullable)alignment contentScale:(ComponentboxContentScale * _Nullable)contentScale __attribute__((swift_name("init(id:name:url:contentDescription:modifier:alignment:contentScale:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentDrawableCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (NSString * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (NSString * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (NSString * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxModifier * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (ComponentboxAlignment * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxContentScale * _Nullable)component7 __attribute__((swift_name("component7()"))); -- (ComponentboxComponentDrawable *)doCopyId:(NSString *)id name:(NSString * _Nullable)name url:(NSString * _Nullable)url contentDescription:(NSString * _Nullable)contentDescription modifier:(ComponentboxModifier * _Nullable)modifier alignment:(ComponentboxAlignment * _Nullable)alignment contentScale:(ComponentboxContentScale * _Nullable)contentScale __attribute__((swift_name("doCopy(id:name:url:contentDescription:modifier:alignment:contentScale:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property ComponentboxAlignment * _Nullable alignment __attribute__((swift_name("alignment"))); -@property (readonly) NSString * _Nullable contentDescription __attribute__((swift_name("contentDescription"))); -@property ComponentboxContentScale * _Nullable contentScale __attribute__((swift_name("contentScale"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property NSString * _Nullable name __attribute__((swift_name("name"))); -@property NSString * _Nullable url __attribute__((swift_name("url"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.DrawableCompanion"))) -@interface ComponentboxComponentDrawableCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentDrawableCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Row"))) -@interface ComponentboxComponentRow : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier horizontalArrangement:(ComponentboxArrangement * _Nullable)horizontalArrangement verticalAlignment:(ComponentboxAlignment * _Nullable)verticalAlignment action:(NSString * _Nullable)action isLazy:(ComponentboxBoolean * _Nullable)isLazy __attribute__((swift_name("init(id:components:modifier:horizontalArrangement:verticalAlignment:action:isLazy:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentRowCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (NSMutableArray * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxModifier * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxArrangement * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxAlignment * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (NSString * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxBoolean * _Nullable)component7 __attribute__((swift_name("component7()"))); -- (ComponentboxComponentRow *)doCopyId:(NSString *)id components:(NSMutableArray * _Nullable)components modifier:(ComponentboxModifier * _Nullable)modifier horizontalArrangement:(ComponentboxArrangement * _Nullable)horizontalArrangement verticalAlignment:(ComponentboxAlignment * _Nullable)verticalAlignment action:(NSString * _Nullable)action isLazy:(ComponentboxBoolean * _Nullable)isLazy __attribute__((swift_name("doCopy(id:components:modifier:horizontalArrangement:verticalAlignment:action:isLazy:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property NSString * _Nullable action __attribute__((swift_name("action"))); -@property NSMutableArray * _Nullable components __attribute__((swift_name("components"))); -@property ComponentboxArrangement * _Nullable horizontalArrangement __attribute__((swift_name("horizontalArrangement"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxBoolean * _Nullable isLazy __attribute__((swift_name("isLazy"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property ComponentboxAlignment * _Nullable verticalAlignment __attribute__((swift_name("verticalAlignment"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.RowCompanion"))) -@interface ComponentboxComponentRowCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentRowCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Surface"))) -@interface ComponentboxComponentSurface : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id modifier:(ComponentboxModifier * _Nullable)modifier shape:(ComponentboxShape * _Nullable)shape color:(ComponentboxColor * _Nullable)color contentColor:(ComponentboxColor * _Nullable)contentColor borderStroke:(ComponentboxBorderStroke * _Nullable)borderStroke elevation:(ComponentboxInt * _Nullable)elevation components:(NSMutableArray * _Nullable)components __attribute__((swift_name("init(id:modifier:shape:color:contentColor:borderStroke:elevation:components:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentSurfaceCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxModifier * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxShape * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxColor * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxColor * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (ComponentboxBorderStroke * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxInt * _Nullable)component7 __attribute__((swift_name("component7()"))); -- (NSMutableArray * _Nullable)component8 __attribute__((swift_name("component8()"))); -- (ComponentboxComponentSurface *)doCopyId:(NSString *)id modifier:(ComponentboxModifier * _Nullable)modifier shape:(ComponentboxShape * _Nullable)shape color:(ComponentboxColor * _Nullable)color contentColor:(ComponentboxColor * _Nullable)contentColor borderStroke:(ComponentboxBorderStroke * _Nullable)borderStroke elevation:(ComponentboxInt * _Nullable)elevation components:(NSMutableArray * _Nullable)components __attribute__((swift_name("doCopy(id:modifier:shape:color:contentColor:borderStroke:elevation:components:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property ComponentboxBorderStroke * _Nullable borderStroke __attribute__((swift_name("borderStroke"))); -@property ComponentboxColor * _Nullable color __attribute__((swift_name("color"))); -@property NSMutableArray * _Nullable components __attribute__((swift_name("components"))); -@property ComponentboxColor * _Nullable contentColor __attribute__((swift_name("contentColor"))); -@property ComponentboxInt * _Nullable elevation __attribute__((swift_name("elevation"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property ComponentboxShape * _Nullable shape __attribute__((swift_name("shape"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.SurfaceCompanion"))) -@interface ComponentboxComponentSurfaceCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentSurfaceCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Switch"))) -@interface ComponentboxComponentSwitch : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id isChecked:(ComponentboxBoolean * _Nullable)isChecked modifier:(ComponentboxModifier * _Nullable)modifier action:(NSString * _Nullable)action __attribute__((swift_name("init(id:isChecked:modifier:action:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentSwitchCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxBoolean * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxModifier * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (NSString * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxComponentSwitch *)doCopyId:(NSString *)id isChecked:(ComponentboxBoolean * _Nullable)isChecked modifier:(ComponentboxModifier * _Nullable)modifier action:(NSString * _Nullable)action __attribute__((swift_name("doCopy(id:isChecked:modifier:action:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property NSString * _Nullable action __attribute__((swift_name("action"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxBoolean * _Nullable isChecked __attribute__((swift_name("isChecked"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.SwitchCompanion"))) -@interface ComponentboxComponentSwitchCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentSwitchCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Text"))) -@interface ComponentboxComponentText : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id modifier:(ComponentboxModifier * _Nullable)modifier text:(NSString * _Nullable)text color:(ComponentboxColor * _Nullable)color textStyle:(NSString * _Nullable)textStyle __attribute__((swift_name("init(id:modifier:text:color:textStyle:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentTextCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxModifier * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (NSString * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxColor * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (NSString * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (ComponentboxComponentText *)doCopyId:(NSString *)id modifier:(ComponentboxModifier * _Nullable)modifier text:(NSString * _Nullable)text color:(ComponentboxColor * _Nullable)color textStyle:(NSString * _Nullable)textStyle __attribute__((swift_name("doCopy(id:modifier:text:color:textStyle:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property ComponentboxColor * _Nullable color __attribute__((swift_name("color"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property NSString * _Nullable text __attribute__((swift_name("text"))); -@property NSString * _Nullable textStyle __attribute__((swift_name("textStyle"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.TextCompanion"))) -@interface ComponentboxComponentTextCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentTextCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.Vector"))) -@interface ComponentboxComponentVector : ComponentboxComponent -- (instancetype)initWithId:(NSString *)id name:(NSString * _Nullable)name modifier:(ComponentboxModifier * _Nullable)modifier alignment:(ComponentboxAlignment * _Nullable)alignment contentScale:(ComponentboxContentScale * _Nullable)contentScale color:(ComponentboxColor * _Nullable)color __attribute__((swift_name("init(id:name:modifier:alignment:contentScale:color:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentVectorCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (NSString * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxModifier * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxAlignment * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxContentScale * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (ComponentboxColor * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxComponentVector *)doCopyId:(NSString *)id name:(NSString * _Nullable)name modifier:(ComponentboxModifier * _Nullable)modifier alignment:(ComponentboxAlignment * _Nullable)alignment contentScale:(ComponentboxContentScale * _Nullable)contentScale color:(ComponentboxColor * _Nullable)color __attribute__((swift_name("doCopy(id:name:modifier:alignment:contentScale:color:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property ComponentboxAlignment * _Nullable alignment __attribute__((swift_name("alignment"))); -@property ComponentboxColor * _Nullable color __attribute__((swift_name("color"))); -@property ComponentboxContentScale * _Nullable contentScale __attribute__((swift_name("contentScale"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property ComponentboxModifier * _Nullable modifier __attribute__((swift_name("modifier"))); -@property NSString * _Nullable name __attribute__((swift_name("name"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Component.VectorCompanion"))) -@interface ComponentboxComponentVectorCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentVectorCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((swift_name("ComponentBox"))) -@interface ComponentboxComponentBox : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property (class, readonly, getter=companion) ComponentboxComponentBoxCompanion *companion __attribute__((swift_name("companion"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBox.Banner"))) -@interface ComponentboxComponentBoxBanner : ComponentboxComponentBox -- (instancetype)initWithVerticalArrangement:(ComponentboxArrangement *)verticalArrangement horizontalAlignment:(ComponentboxAlignment *)horizontalAlignment components:(NSArray *)components __attribute__((swift_name("init(verticalArrangement:horizontalAlignment:components:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentBoxBannerCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxArrangement *)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxAlignment *)component2 __attribute__((swift_name("component2()"))); -- (NSArray *)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxComponentBoxBanner *)doCopyVerticalArrangement:(ComponentboxArrangement *)verticalArrangement horizontalAlignment:(ComponentboxAlignment *)horizontalAlignment components:(NSArray *)components __attribute__((swift_name("doCopy(verticalArrangement:horizontalAlignment:components:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSArray *components __attribute__((swift_name("components"))); -@property (readonly) ComponentboxAlignment *horizontalAlignment __attribute__((swift_name("horizontalAlignment"))); -@property (readonly) ComponentboxArrangement *verticalArrangement __attribute__((swift_name("verticalArrangement"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBox.BannerCompanion"))) -@interface ComponentboxComponentBoxBannerCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBoxBannerCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBox.Companion"))) -@interface ComponentboxComponentBoxCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBoxCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -- (id)serializerTypeParamsSerializers:(ComponentboxKotlinArray> *)typeParamsSerializers __attribute__((swift_name("serializer(typeParamsSerializers:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBox.Modal"))) -@interface ComponentboxComponentBoxModal : ComponentboxComponentBox -- (instancetype)initWithVerticalArrangement:(ComponentboxArrangement *)verticalArrangement horizontalAlignment:(ComponentboxAlignment *)horizontalAlignment components:(NSArray *)components __attribute__((swift_name("init(verticalArrangement:horizontalAlignment:components:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentBoxModalCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxArrangement *)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxAlignment *)component2 __attribute__((swift_name("component2()"))); -- (NSArray *)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxComponentBoxModal *)doCopyVerticalArrangement:(ComponentboxArrangement *)verticalArrangement horizontalAlignment:(ComponentboxAlignment *)horizontalAlignment components:(NSArray *)components __attribute__((swift_name("doCopy(verticalArrangement:horizontalAlignment:components:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSArray *components __attribute__((swift_name("components"))); -@property (readonly) ComponentboxAlignment *horizontalAlignment __attribute__((swift_name("horizontalAlignment"))); -@property (readonly) ComponentboxArrangement *verticalArrangement __attribute__((swift_name("verticalArrangement"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBox.ModalCompanion"))) -@interface ComponentboxComponentBoxModalCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBoxModalCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBox.Screen"))) -@interface ComponentboxComponentBoxScreen : ComponentboxComponentBox -- (instancetype)initWithTitle:(NSString * _Nullable)title verticalArrangement:(ComponentboxArrangement *)verticalArrangement horizontalAlignment:(ComponentboxAlignment *)horizontalAlignment components:(NSArray *)components __attribute__((swift_name("init(title:verticalArrangement:horizontalAlignment:components:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentBoxScreenCompanion *companion __attribute__((swift_name("companion"))); -- (NSString * _Nullable)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxArrangement *)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxAlignment *)component3 __attribute__((swift_name("component3()"))); -- (NSArray *)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxComponentBoxScreen *)doCopyTitle:(NSString * _Nullable)title verticalArrangement:(ComponentboxArrangement *)verticalArrangement horizontalAlignment:(ComponentboxAlignment *)horizontalAlignment components:(NSArray *)components __attribute__((swift_name("doCopy(title:verticalArrangement:horizontalAlignment:components:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSArray *components __attribute__((swift_name("components"))); -@property (readonly) ComponentboxAlignment *horizontalAlignment __attribute__((swift_name("horizontalAlignment"))); -@property (readonly) NSString * _Nullable title __attribute__((swift_name("title"))); -@property (readonly) ComponentboxArrangement *verticalArrangement __attribute__((swift_name("verticalArrangement"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBox.ScreenCompanion"))) -@interface ComponentboxComponentBoxScreenCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBoxScreenCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBoxType"))) -@interface ComponentboxComponentBoxType : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentBoxTypeCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxComponentBoxType *screen __attribute__((swift_name("screen"))); -@property (class, readonly) ComponentboxComponentBoxType *modal __attribute__((swift_name("modal"))); -@property (class, readonly) ComponentboxComponentBoxType *banner __attribute__((swift_name("banner"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBoxType.Companion"))) -@interface ComponentboxComponentBoxTypeCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentBoxTypeCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentType"))) -@interface ComponentboxComponentType : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxComponentTypeCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxComponentType *box __attribute__((swift_name("box"))); -@property (class, readonly) ComponentboxComponentType *button __attribute__((swift_name("button"))); -@property (class, readonly) ComponentboxComponentType *column __attribute__((swift_name("column"))); -@property (class, readonly) ComponentboxComponentType *drawable __attribute__((swift_name("drawable"))); -@property (class, readonly) ComponentboxComponentType *lazycolumn __attribute__((swift_name("lazycolumn"))); -@property (class, readonly) ComponentboxComponentType *lazyrow __attribute__((swift_name("lazyrow"))); -@property (class, readonly) ComponentboxComponentType *row __attribute__((swift_name("row"))); -@property (class, readonly) ComponentboxComponentType *switch_ __attribute__((swift_name("switch_"))); -@property (class, readonly) ComponentboxComponentType *table __attribute__((swift_name("table"))); -@property (class, readonly) ComponentboxComponentType *text __attribute__((swift_name("text"))); -@property (class, readonly) ComponentboxComponentType *vector __attribute__((swift_name("vector"))); -@property (class, readonly) ComponentboxComponentType *surface __attribute__((swift_name("surface"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentType.Companion"))) -@interface ComponentboxComponentTypeCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxComponentTypeCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ContentScale"))) -@interface ComponentboxContentScale : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxContentScaleCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxContentScale *crop __attribute__((swift_name("crop"))); -@property (class, readonly) ComponentboxContentScale *fit __attribute__((swift_name("fit"))); -@property (class, readonly) ComponentboxContentScale *fillheight __attribute__((swift_name("fillheight"))); -@property (class, readonly) ComponentboxContentScale *fillwidth __attribute__((swift_name("fillwidth"))); -@property (class, readonly) ComponentboxContentScale *inside __attribute__((swift_name("inside"))); -@property (class, readonly) ComponentboxContentScale *none __attribute__((swift_name("none"))); -@property (class, readonly) ComponentboxContentScale *fillbounds __attribute__((swift_name("fillbounds"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ContentScale.Companion"))) -@interface ComponentboxContentScaleCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxContentScaleCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Context"))) -@interface ComponentboxContext : ComponentboxBase -- (instancetype)initWithInflater:(id _Nullable)inflater themer:(ComponentboxThemer * _Nullable)themer manager:(id _Nullable)manager __attribute__((swift_name("init(inflater:themer:manager:)"))) __attribute__((objc_designated_initializer)); -- (id _Nullable)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxThemer * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (id _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxContext *)doCopyInflater:(id _Nullable)inflater themer:(ComponentboxThemer * _Nullable)themer manager:(id _Nullable)manager __attribute__((swift_name("doCopy(inflater:themer:manager:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id _Nullable inflater __attribute__((swift_name("inflater"))); -@property (readonly) id _Nullable manager __attribute__((swift_name("manager"))); -@property (readonly) ComponentboxThemer * _Nullable themer __attribute__((swift_name("themer"))); -@end; - -__attribute__((swift_name("Destination"))) -@interface ComponentboxDestination : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@end; - -__attribute__((swift_name("DrawableRes"))) -@protocol ComponentboxDrawableRes -@required -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Icon"))) -@interface ComponentboxIcon : ComponentboxBase -- (instancetype)initWithLine:(id)line fill:(id _Nullable)fill pictogram:(id _Nullable)pictogram spot:(id _Nullable)spot __attribute__((swift_name("init(line:fill:pictogram:spot:)"))) __attribute__((objc_designated_initializer)); -- (id)component1 __attribute__((swift_name("component1()"))); -- (id _Nullable)component2 __attribute__((swift_name("component2()"))); -- (id _Nullable)component3 __attribute__((swift_name("component3()"))); -- (id _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxIcon *)doCopyLine:(id)line fill:(id _Nullable)fill pictogram:(id _Nullable)pictogram spot:(id _Nullable)spot __attribute__((swift_name("doCopy(line:fill:pictogram:spot:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id _Nullable fill __attribute__((swift_name("fill"))); -@property (readonly) id line __attribute__((swift_name("line"))); -@property (readonly) id _Nullable pictogram __attribute__((swift_name("pictogram"))); -@property (readonly) id _Nullable spot __attribute__((swift_name("spot"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("IconType"))) -@interface ComponentboxIconType : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) ComponentboxIconType *line __attribute__((swift_name("line"))); -@property (class, readonly) ComponentboxIconType *fill __attribute__((swift_name("fill"))); -@property (class, readonly) ComponentboxIconType *pictogram __attribute__((swift_name("pictogram"))); -@property (class, readonly) ComponentboxIconType *spot __attribute__((swift_name("spot"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((swift_name("Icons"))) -@protocol ComponentboxIcons -@required -- (NSMutableArray *)list __attribute__((swift_name("list()"))); -@end; - -__attribute__((swift_name("Image"))) -@protocol ComponentboxImage -@required -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ImageType"))) -@interface ComponentboxImageType : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) ComponentboxImageType *light __attribute__((swift_name("light"))); -@property (class, readonly) ComponentboxImageType *dark __attribute__((swift_name("dark"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((swift_name("Images"))) -@protocol ComponentboxImages -@required -- (NSMutableArray> *)list __attribute__((swift_name("list()"))); -@end; - -__attribute__((swift_name("Inflater"))) -@protocol ComponentboxInflater -@required -@end; - -__attribute__((swift_name("Manager"))) -@protocol ComponentboxManager -@required -- (void)runAction:(NSString * _Nullable)action __attribute__((swift_name("run(action:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Margin"))) -@interface ComponentboxMargin : ComponentboxBase -- (instancetype)initWithStart:(ComponentboxInt * _Nullable)start top:(ComponentboxInt * _Nullable)top end:(ComponentboxInt * _Nullable)end bottom:(ComponentboxInt * _Nullable)bottom __attribute__((swift_name("init(start:top:end:bottom:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxMarginCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxInt * _Nullable)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxInt * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxInt * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxInt * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxMargin *)doCopyStart:(ComponentboxInt * _Nullable)start top:(ComponentboxInt * _Nullable)top end:(ComponentboxInt * _Nullable)end bottom:(ComponentboxInt * _Nullable)bottom __attribute__((swift_name("doCopy(start:top:end:bottom:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxInt * _Nullable bottom __attribute__((swift_name("bottom"))); -@property (readonly) ComponentboxInt * _Nullable end __attribute__((swift_name("end"))); -@property (readonly) ComponentboxInt * _Nullable start __attribute__((swift_name("start"))); -@property (readonly) ComponentboxInt * _Nullable top __attribute__((swift_name("top"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Margin.Companion"))) -@interface ComponentboxMarginCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxMarginCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Modifier"))) -@interface ComponentboxModifier : ComponentboxBase -- (instancetype)initWithFillMaxSize:(ComponentboxBoolean * _Nullable)fillMaxSize fillMaxHeight:(ComponentboxBoolean * _Nullable)fillMaxHeight fillMaxWidth:(ComponentboxBoolean * _Nullable)fillMaxWidth height:(ComponentboxInt * _Nullable)height width:(ComponentboxInt * _Nullable)width padding:(ComponentboxPadding * _Nullable)padding margin:(ComponentboxMargin * _Nullable)margin background:(ComponentboxColor * _Nullable)background weight:(ComponentboxFloat * _Nullable)weight __attribute__((swift_name("init(fillMaxSize:fillMaxHeight:fillMaxWidth:height:width:padding:margin:background:weight:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxModifierCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxBoolean * _Nullable)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxBoolean * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxBoolean * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxInt * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxInt * _Nullable)component5 __attribute__((swift_name("component5()"))); -- (ComponentboxPadding * _Nullable)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxMargin * _Nullable)component7 __attribute__((swift_name("component7()"))); -- (ComponentboxColor * _Nullable)component8 __attribute__((swift_name("component8()"))); -- (ComponentboxFloat * _Nullable)component9 __attribute__((swift_name("component9()"))); -- (ComponentboxModifier *)doCopyFillMaxSize:(ComponentboxBoolean * _Nullable)fillMaxSize fillMaxHeight:(ComponentboxBoolean * _Nullable)fillMaxHeight fillMaxWidth:(ComponentboxBoolean * _Nullable)fillMaxWidth height:(ComponentboxInt * _Nullable)height width:(ComponentboxInt * _Nullable)width padding:(ComponentboxPadding * _Nullable)padding margin:(ComponentboxMargin * _Nullable)margin background:(ComponentboxColor * _Nullable)background weight:(ComponentboxFloat * _Nullable)weight __attribute__((swift_name("doCopy(fillMaxSize:fillMaxHeight:fillMaxWidth:height:width:padding:margin:background:weight:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property ComponentboxColor * _Nullable background __attribute__((swift_name("background"))); -@property ComponentboxBoolean * _Nullable fillMaxHeight __attribute__((swift_name("fillMaxHeight"))); -@property ComponentboxBoolean * _Nullable fillMaxSize __attribute__((swift_name("fillMaxSize"))); -@property ComponentboxBoolean * _Nullable fillMaxWidth __attribute__((swift_name("fillMaxWidth"))); -@property ComponentboxInt * _Nullable height __attribute__((swift_name("height"))); -@property ComponentboxMargin * _Nullable margin __attribute__((swift_name("margin"))); -@property ComponentboxPadding * _Nullable padding __attribute__((swift_name("padding"))); -@property ComponentboxFloat * _Nullable weight __attribute__((swift_name("weight"))); -@property ComponentboxInt * _Nullable width __attribute__((swift_name("width"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Modifier.Companion"))) -@interface ComponentboxModifierCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxModifierCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((swift_name("MultiplatformRes"))) -@protocol ComponentboxMultiplatformRes -@required -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Padding"))) -@interface ComponentboxPadding : ComponentboxBase -- (instancetype)initWithStart:(ComponentboxInt * _Nullable)start top:(ComponentboxInt * _Nullable)top end:(ComponentboxInt * _Nullable)end bottom:(ComponentboxInt * _Nullable)bottom __attribute__((swift_name("init(start:top:end:bottom:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxPaddingCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxInt * _Nullable)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxInt * _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxInt * _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxInt * _Nullable)component4 __attribute__((swift_name("component4()"))); -- (ComponentboxPadding *)doCopyStart:(ComponentboxInt * _Nullable)start top:(ComponentboxInt * _Nullable)top end:(ComponentboxInt * _Nullable)end bottom:(ComponentboxInt * _Nullable)bottom __attribute__((swift_name("doCopy(start:top:end:bottom:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxInt * _Nullable bottom __attribute__((swift_name("bottom"))); -@property (readonly) ComponentboxInt * _Nullable end __attribute__((swift_name("end"))); -@property (readonly) ComponentboxInt * _Nullable start __attribute__((swift_name("start"))); -@property (readonly) ComponentboxInt * _Nullable top __attribute__((swift_name("top"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Padding.Companion"))) -@interface ComponentboxPaddingCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxPaddingCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Shape"))) -@interface ComponentboxShape : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxShapeCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxShape *rectangleshape __attribute__((swift_name("rectangleshape"))); -@property (class, readonly) ComponentboxShape *roundedcornershape __attribute__((swift_name("roundedcornershape"))); -@property (class, readonly) ComponentboxShape *circleshape __attribute__((swift_name("circleshape"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Shape.Companion"))) -@interface ComponentboxShapeCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxShapeCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((swift_name("StringRes"))) -@protocol ComponentboxStringRes -@required -@end; - -__attribute__((swift_name("TextStyle"))) -@protocol ComponentboxTextStyle -@required -@end; - -__attribute__((swift_name("Themer"))) -@interface ComponentboxThemer : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@end; - -__attribute__((swift_name("Typography"))) -@protocol ComponentboxTypography -@required -- (NSMutableArray> *)list __attribute__((swift_name("list()"))); -@property (readonly) id body1 __attribute__((swift_name("body1"))); -@property (readonly) id body2 __attribute__((swift_name("body2"))); -@property (readonly) id button __attribute__((swift_name("button"))); -@property (readonly) id caption __attribute__((swift_name("caption"))); -@property (readonly) id h1 __attribute__((swift_name("h1"))); -@property (readonly) id h2 __attribute__((swift_name("h2"))); -@property (readonly) id h3 __attribute__((swift_name("h3"))); -@property (readonly) id h4 __attribute__((swift_name("h4"))); -@property (readonly) id h5 __attribute__((swift_name("h5"))); -@property (readonly) id h6 __attribute__((swift_name("h6"))); -@end; - -__attribute__((swift_name("VectorRes"))) -@protocol ComponentboxVectorRes -@required -@end; - -@interface ComponentboxComponentBoxClient (Extensions) -- (ComponentboxComponentBoxClient *)freeze __attribute__((swift_name("freeze()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ComponentBoxClientKt"))) -@interface ComponentboxComponentBoxClientKt : ComponentboxBase -+ (id _Nullable)freeze:(id _Nullable)receiver __attribute__((swift_name("freeze(_:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("ConstantsKt"))) -@interface ComponentboxConstantsKt : ComponentboxBase -@property (class, readonly) NSString *COMPONENT_BOX_FALLBACK_DRAWABLE_URL __attribute__((swift_name("COMPONENT_BOX_FALLBACK_DRAWABLE_URL"))); -@property (class, readonly) NSString *COMPONENT_BOX_ZIPLINE_SERVICE __attribute__((swift_name("COMPONENT_BOX_ZIPLINE_SERVICE"))); -@end; - -__attribute__((swift_name("KotlinThrowable"))) -@interface ComponentboxKotlinThrowable : ComponentboxBase -- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -- (ComponentboxKotlinArray *)getStackTrace __attribute__((swift_name("getStackTrace()"))); -- (void)printStackTrace __attribute__((swift_name("printStackTrace()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxKotlinThrowable * _Nullable cause __attribute__((swift_name("cause"))); -@property (readonly) NSString * _Nullable message __attribute__((swift_name("message"))); -- (NSError *)asError __attribute__((swift_name("asError()"))); -@end; - -__attribute__((swift_name("KotlinException"))) -@interface ComponentboxKotlinException : ComponentboxKotlinThrowable -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); -@end; - -__attribute__((swift_name("KotlinRuntimeException"))) -@interface ComponentboxKotlinRuntimeException : ComponentboxKotlinException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); -@end; - -__attribute__((swift_name("KotlinIllegalStateException"))) -@interface ComponentboxKotlinIllegalStateException : ComponentboxKotlinRuntimeException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); -@end; - -__attribute__((swift_name("KotlinCancellationException"))) -@interface ComponentboxKotlinCancellationException : ComponentboxKotlinIllegalStateException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithMessage:(NSString * _Nullable)message cause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCause:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinUnit"))) -@interface ComponentboxKotlinUnit : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)unit __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKotlinUnit *shared __attribute__((swift_name("shared"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreCoroutineScope"))) -@protocol ComponentboxKotlinx_coroutines_coreCoroutineScope -@required -@property (readonly) id coroutineContext __attribute__((swift_name("coroutineContext"))); -@end; - -__attribute__((swift_name("Ktor_ioCloseable"))) -@protocol ComponentboxKtor_ioCloseable -@required -- (void)close __attribute__((swift_name("close()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpClient"))) -@interface ComponentboxKtor_client_coreHttpClient : ComponentboxBase -- (instancetype)initWithEngine:(id)engine userConfig:(ComponentboxKtor_client_coreHttpClientConfig *)userConfig __attribute__((swift_name("init(engine:userConfig:)"))) __attribute__((objc_designated_initializer)); -- (void)close __attribute__((swift_name("close()"))); -- (ComponentboxKtor_client_coreHttpClient *)configBlock:(void (^)(ComponentboxKtor_client_coreHttpClientConfig *))block __attribute__((swift_name("config(block:)"))); -- (BOOL)isSupportedCapability:(id)capability __attribute__((swift_name("isSupported(capability:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id attributes __attribute__((swift_name("attributes"))); -@property (readonly) id coroutineContext __attribute__((swift_name("coroutineContext"))); -@property (readonly) id engine __attribute__((swift_name("engine"))); -@property (readonly) ComponentboxKtor_client_coreHttpClientEngineConfig *engineConfig __attribute__((swift_name("engineConfig"))); -@property (readonly) ComponentboxKtor_eventsEvents *monitor __attribute__((swift_name("monitor"))); -@property (readonly) ComponentboxKtor_client_coreHttpReceivePipeline *receivePipeline __attribute__((swift_name("receivePipeline"))); -@property (readonly) ComponentboxKtor_client_coreHttpRequestPipeline *requestPipeline __attribute__((swift_name("requestPipeline"))); -@property (readonly) ComponentboxKtor_client_coreHttpResponsePipeline *responsePipeline __attribute__((swift_name("responsePipeline"))); -@property (readonly) ComponentboxKtor_client_coreHttpSendPipeline *sendPipeline __attribute__((swift_name("sendPipeline"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinArray"))) -@interface ComponentboxKotlinArray : ComponentboxBase -+ (instancetype)arrayWithSize:(int32_t)size init:(T _Nullable (^)(ComponentboxInt *))init __attribute__((swift_name("init(size:init:)"))); -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); -- (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreFlow"))) -@protocol ComponentboxKotlinx_coroutines_coreFlow -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)collectCollector:(id)collector completionHandler:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("collect(collector:completionHandler:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinEnumCompanion"))) -@interface ComponentboxKotlinEnumCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKotlinEnumCompanion *shared __attribute__((swift_name("shared"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreEncoder"))) -@protocol ComponentboxKotlinx_serialization_coreEncoder -@required -- (id)beginCollectionDescriptor:(id)descriptor collectionSize:(int32_t)collectionSize __attribute__((swift_name("beginCollection(descriptor:collectionSize:)"))); -- (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); -- (void)encodeBooleanValue:(BOOL)value __attribute__((swift_name("encodeBoolean(value:)"))); -- (void)encodeByteValue:(int8_t)value __attribute__((swift_name("encodeByte(value:)"))); -- (void)encodeCharValue:(unichar)value __attribute__((swift_name("encodeChar(value:)"))); -- (void)encodeDoubleValue:(double)value __attribute__((swift_name("encodeDouble(value:)"))); -- (void)encodeEnumEnumDescriptor:(id)enumDescriptor index:(int32_t)index __attribute__((swift_name("encodeEnum(enumDescriptor:index:)"))); -- (void)encodeFloatValue:(float)value __attribute__((swift_name("encodeFloat(value:)"))); -- (id)encodeInlineInlineDescriptor:(id)inlineDescriptor __attribute__((swift_name("encodeInline(inlineDescriptor:)"))); -- (void)encodeIntValue:(int32_t)value __attribute__((swift_name("encodeInt(value:)"))); -- (void)encodeLongValue:(int64_t)value __attribute__((swift_name("encodeLong(value:)"))); -- (void)encodeNotNullMark __attribute__((swift_name("encodeNotNullMark()"))); -- (void)encodeNull __attribute__((swift_name("encodeNull()"))); -- (void)encodeNullableSerializableValueSerializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeNullableSerializableValue(serializer:value:)"))); -- (void)encodeSerializableValueSerializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeSerializableValue(serializer:value:)"))); -- (void)encodeShortValue:(int16_t)value __attribute__((swift_name("encodeShort(value:)"))); -- (void)encodeStringValue:(NSString *)value __attribute__((swift_name("encodeString(value:)"))); -@property (readonly) ComponentboxKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreSerialDescriptor"))) -@protocol ComponentboxKotlinx_serialization_coreSerialDescriptor -@required -- (NSArray> *)getElementAnnotationsIndex:(int32_t)index __attribute__((swift_name("getElementAnnotations(index:)"))); -- (id)getElementDescriptorIndex:(int32_t)index __attribute__((swift_name("getElementDescriptor(index:)"))); -- (int32_t)getElementIndexName:(NSString *)name __attribute__((swift_name("getElementIndex(name:)"))); -- (NSString *)getElementNameIndex:(int32_t)index __attribute__((swift_name("getElementName(index:)"))); -- (BOOL)isElementOptionalIndex:(int32_t)index __attribute__((swift_name("isElementOptional(index:)"))); -@property (readonly) NSArray> *annotations __attribute__((swift_name("annotations"))); -@property (readonly) int32_t elementsCount __attribute__((swift_name("elementsCount"))); -@property (readonly) BOOL isInline __attribute__((swift_name("isInline"))); -@property (readonly) BOOL isNullable __attribute__((swift_name("isNullable"))); -@property (readonly) ComponentboxKotlinx_serialization_coreSerialKind *kind __attribute__((swift_name("kind"))); -@property (readonly) NSString *serialName __attribute__((swift_name("serialName"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreDecoder"))) -@protocol ComponentboxKotlinx_serialization_coreDecoder -@required -- (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); -- (BOOL)decodeBoolean __attribute__((swift_name("decodeBoolean()"))); -- (int8_t)decodeByte __attribute__((swift_name("decodeByte()"))); -- (unichar)decodeChar __attribute__((swift_name("decodeChar()"))); -- (double)decodeDouble __attribute__((swift_name("decodeDouble()"))); -- (int32_t)decodeEnumEnumDescriptor:(id)enumDescriptor __attribute__((swift_name("decodeEnum(enumDescriptor:)"))); -- (float)decodeFloat __attribute__((swift_name("decodeFloat()"))); -- (id)decodeInlineInlineDescriptor:(id)inlineDescriptor __attribute__((swift_name("decodeInline(inlineDescriptor:)"))); -- (int32_t)decodeInt __attribute__((swift_name("decodeInt()"))); -- (int64_t)decodeLong __attribute__((swift_name("decodeLong()"))); -- (BOOL)decodeNotNullMark __attribute__((swift_name("decodeNotNullMark()"))); -- (ComponentboxKotlinNothing * _Nullable)decodeNull __attribute__((swift_name("decodeNull()"))); -- (id _Nullable)decodeNullableSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeNullableSerializableValue(deserializer:)"))); -- (id _Nullable)decodeSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeSerializableValue(deserializer:)"))); -- (int16_t)decodeShort __attribute__((swift_name("decodeShort()"))); -- (NSString *)decodeString __attribute__((swift_name("decodeString()"))); -@property (readonly) ComponentboxKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_jsonJsonElement"))) -@interface ComponentboxKotlinx_serialization_jsonJsonElement : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property (class, readonly, getter=companion) ComponentboxKotlinx_serialization_jsonJsonElementCompanion *companion __attribute__((swift_name("companion"))); -@end; - -__attribute__((swift_name("KotlinCoroutineContext"))) -@protocol ComponentboxKotlinCoroutineContext -@required -- (id _Nullable)foldInitial:(id _Nullable)initial operation:(id _Nullable (^)(id _Nullable, id))operation __attribute__((swift_name("fold(initial:operation:)"))); -- (id _Nullable)getKey:(id)key __attribute__((swift_name("get(key:)"))); -- (id)minusKeyKey:(id)key __attribute__((swift_name("minusKey(key:)"))); -- (id)plusContext:(id)context __attribute__((swift_name("plus(context:)"))); -@end; - -__attribute__((swift_name("Ktor_client_coreHttpClientEngine"))) -@protocol ComponentboxKtor_client_coreHttpClientEngine -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)executeData:(ComponentboxKtor_client_coreHttpRequestData *)data completionHandler:(void (^)(ComponentboxKtor_client_coreHttpResponseData * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(data:completionHandler:)"))); -- (void)installClient:(ComponentboxKtor_client_coreHttpClient *)client __attribute__((swift_name("install(client:)"))); -@property (readonly) ComponentboxKtor_client_coreHttpClientEngineConfig *config __attribute__((swift_name("config"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreCoroutineDispatcher *dispatcher __attribute__((swift_name("dispatcher"))); -@property (readonly) NSSet> *supportedCapabilities __attribute__((swift_name("supportedCapabilities"))); -@end; - -__attribute__((swift_name("Ktor_client_coreHttpClientEngineConfig"))) -@interface ComponentboxKtor_client_coreHttpClientEngineConfig : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property BOOL pipelining __attribute__((swift_name("pipelining"))); -@property ComponentboxKtor_client_coreProxyConfig * _Nullable proxy __attribute__((swift_name("proxy"))); -@property int32_t threadsCount __attribute__((swift_name("threadsCount"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpClientConfig"))) -@interface ComponentboxKtor_client_coreHttpClientConfig : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (ComponentboxKtor_client_coreHttpClientConfig *)clone __attribute__((swift_name("clone()"))); -- (void)engineBlock:(void (^)(T))block __attribute__((swift_name("engine(block:)"))); -- (void)installClient:(ComponentboxKtor_client_coreHttpClient *)client __attribute__((swift_name("install(client:)"))); -- (void)installPlugin:(id)plugin configure:(void (^)(id))configure __attribute__((swift_name("install(plugin:configure:)"))); -- (void)installKey:(NSString *)key block:(void (^)(ComponentboxKtor_client_coreHttpClient *))block __attribute__((swift_name("install(key:block:)"))); -- (void)plusAssignOther:(ComponentboxKtor_client_coreHttpClientConfig *)other __attribute__((swift_name("plusAssign(other:)"))); -@property BOOL developmentMode __attribute__((swift_name("developmentMode"))); -@property BOOL expectSuccess __attribute__((swift_name("expectSuccess"))); -@property BOOL followRedirects __attribute__((swift_name("followRedirects"))); -@property BOOL useDefaultTransformers __attribute__((swift_name("useDefaultTransformers"))); -@end; - -__attribute__((swift_name("Ktor_client_coreHttpClientEngineCapability"))) -@protocol ComponentboxKtor_client_coreHttpClientEngineCapability -@required -@end; - -__attribute__((swift_name("Ktor_utilsAttributes"))) -@protocol ComponentboxKtor_utilsAttributes -@required -- (id)computeIfAbsentKey:(ComponentboxKtor_utilsAttributeKey *)key block:(id (^)(void))block __attribute__((swift_name("computeIfAbsent(key:block:)"))); -- (BOOL)containsKey:(ComponentboxKtor_utilsAttributeKey *)key __attribute__((swift_name("contains(key:)"))); -- (id)getKey_:(ComponentboxKtor_utilsAttributeKey *)key __attribute__((swift_name("get(key_:)"))); -- (id _Nullable)getOrNullKey:(ComponentboxKtor_utilsAttributeKey *)key __attribute__((swift_name("getOrNull(key:)"))); -- (void)putKey:(ComponentboxKtor_utilsAttributeKey *)key value:(id)value __attribute__((swift_name("put(key:value:)"))); -- (void)removeKey:(ComponentboxKtor_utilsAttributeKey *)key __attribute__((swift_name("remove(key:)"))); -- (id)takeKey:(ComponentboxKtor_utilsAttributeKey *)key __attribute__((swift_name("take(key:)"))); -- (id _Nullable)takeOrNullKey:(ComponentboxKtor_utilsAttributeKey *)key __attribute__((swift_name("takeOrNull(key:)"))); -@property (readonly) NSArray *> *allKeys __attribute__((swift_name("allKeys"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_eventsEvents"))) -@interface ComponentboxKtor_eventsEvents : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)raiseDefinition:(ComponentboxKtor_eventsEventDefinition *)definition value:(id _Nullable)value __attribute__((swift_name("raise(definition:value:)"))); -- (id)subscribeDefinition:(ComponentboxKtor_eventsEventDefinition *)definition handler:(void (^)(id _Nullable))handler __attribute__((swift_name("subscribe(definition:handler:)"))); -- (void)unsubscribeDefinition:(ComponentboxKtor_eventsEventDefinition *)definition handler:(void (^)(id _Nullable))handler __attribute__((swift_name("unsubscribe(definition:handler:)"))); -@end; - -__attribute__((swift_name("Ktor_utilsPipeline"))) -@interface ComponentboxKtor_utilsPipeline : ComponentboxBase -- (instancetype)initWithPhase:(ComponentboxKtor_utilsPipelinePhase *)phase interceptors:(NSArray> *)interceptors __attribute__((swift_name("init(phase:interceptors:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithPhases:(ComponentboxKotlinArray *)phases __attribute__((swift_name("init(phases:)"))) __attribute__((objc_designated_initializer)); -- (void)addPhasePhase:(ComponentboxKtor_utilsPipelinePhase *)phase __attribute__((swift_name("addPhase(phase:)"))); -- (void)afterIntercepted __attribute__((swift_name("afterIntercepted()"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)executeContext:(TContext)context subject:(TSubject)subject completionHandler:(void (^)(TSubject _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("execute(context:subject:completionHandler:)"))); -- (void)insertPhaseAfterReference:(ComponentboxKtor_utilsPipelinePhase *)reference phase:(ComponentboxKtor_utilsPipelinePhase *)phase __attribute__((swift_name("insertPhaseAfter(reference:phase:)"))); -- (void)insertPhaseBeforeReference:(ComponentboxKtor_utilsPipelinePhase *)reference phase:(ComponentboxKtor_utilsPipelinePhase *)phase __attribute__((swift_name("insertPhaseBefore(reference:phase:)"))); -- (void)interceptPhase:(ComponentboxKtor_utilsPipelinePhase *)phase block:(id)block __attribute__((swift_name("intercept(phase:block:)"))); -- (NSArray> *)interceptorsForPhasePhase:(ComponentboxKtor_utilsPipelinePhase *)phase __attribute__((swift_name("interceptorsForPhase(phase:)"))); -- (void)mergeFrom:(ComponentboxKtor_utilsPipeline *)from __attribute__((swift_name("merge(from:)"))); -- (void)mergePhasesFrom:(ComponentboxKtor_utilsPipeline *)from __attribute__((swift_name("mergePhases(from:)"))); -@property (readonly) id attributes __attribute__((swift_name("attributes"))); -@property (readonly) BOOL developmentMode __attribute__((swift_name("developmentMode"))); -@property (readonly) BOOL isEmpty __attribute__((swift_name("isEmpty"))); -@property (readonly) NSArray *items __attribute__((swift_name("items"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpReceivePipeline"))) -@interface ComponentboxKtor_client_coreHttpReceivePipeline : ComponentboxKtor_utilsPipeline -- (instancetype)initWithDevelopmentMode:(BOOL)developmentMode __attribute__((swift_name("init(developmentMode:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithPhase:(ComponentboxKtor_utilsPipelinePhase *)phase interceptors:(NSArray> *)interceptors __attribute__((swift_name("init(phase:interceptors:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -- (instancetype)initWithPhases:(ComponentboxKotlinArray *)phases __attribute__((swift_name("init(phases:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_client_coreHttpReceivePipelinePhases *companion __attribute__((swift_name("companion"))); -@property (readonly) BOOL developmentMode __attribute__((swift_name("developmentMode"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpRequestPipeline"))) -@interface ComponentboxKtor_client_coreHttpRequestPipeline : ComponentboxKtor_utilsPipeline -- (instancetype)initWithDevelopmentMode:(BOOL)developmentMode __attribute__((swift_name("init(developmentMode:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithPhase:(ComponentboxKtor_utilsPipelinePhase *)phase interceptors:(NSArray> *)interceptors __attribute__((swift_name("init(phase:interceptors:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -- (instancetype)initWithPhases:(ComponentboxKotlinArray *)phases __attribute__((swift_name("init(phases:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_client_coreHttpRequestPipelinePhases *companion __attribute__((swift_name("companion"))); -@property (readonly) BOOL developmentMode __attribute__((swift_name("developmentMode"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpResponsePipeline"))) -@interface ComponentboxKtor_client_coreHttpResponsePipeline : ComponentboxKtor_utilsPipeline -- (instancetype)initWithDevelopmentMode:(BOOL)developmentMode __attribute__((swift_name("init(developmentMode:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithPhase:(ComponentboxKtor_utilsPipelinePhase *)phase interceptors:(NSArray> *)interceptors __attribute__((swift_name("init(phase:interceptors:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -- (instancetype)initWithPhases:(ComponentboxKotlinArray *)phases __attribute__((swift_name("init(phases:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_client_coreHttpResponsePipelinePhases *companion __attribute__((swift_name("companion"))); -@property (readonly) BOOL developmentMode __attribute__((swift_name("developmentMode"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpSendPipeline"))) -@interface ComponentboxKtor_client_coreHttpSendPipeline : ComponentboxKtor_utilsPipeline -- (instancetype)initWithDevelopmentMode:(BOOL)developmentMode __attribute__((swift_name("init(developmentMode:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithPhase:(ComponentboxKtor_utilsPipelinePhase *)phase interceptors:(NSArray> *)interceptors __attribute__((swift_name("init(phase:interceptors:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -- (instancetype)initWithPhases:(ComponentboxKotlinArray *)phases __attribute__((swift_name("init(phases:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_client_coreHttpSendPipelinePhases *companion __attribute__((swift_name("companion"))); -@property (readonly) BOOL developmentMode __attribute__((swift_name("developmentMode"))); -@end; - -__attribute__((swift_name("KotlinIterator"))) -@protocol ComponentboxKotlinIterator -@required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreFlowCollector"))) -@protocol ComponentboxKotlinx_coroutines_coreFlowCollector -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)emitValue:(id _Nullable)value completionHandler:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("emit(value:completionHandler:)"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreCompositeEncoder"))) -@protocol ComponentboxKotlinx_serialization_coreCompositeEncoder -@required -- (void)encodeBooleanElementDescriptor:(id)descriptor index:(int32_t)index value:(BOOL)value __attribute__((swift_name("encodeBooleanElement(descriptor:index:value:)"))); -- (void)encodeByteElementDescriptor:(id)descriptor index:(int32_t)index value:(int8_t)value __attribute__((swift_name("encodeByteElement(descriptor:index:value:)"))); -- (void)encodeCharElementDescriptor:(id)descriptor index:(int32_t)index value:(unichar)value __attribute__((swift_name("encodeCharElement(descriptor:index:value:)"))); -- (void)encodeDoubleElementDescriptor:(id)descriptor index:(int32_t)index value:(double)value __attribute__((swift_name("encodeDoubleElement(descriptor:index:value:)"))); -- (void)encodeFloatElementDescriptor:(id)descriptor index:(int32_t)index value:(float)value __attribute__((swift_name("encodeFloatElement(descriptor:index:value:)"))); -- (id)encodeInlineElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("encodeInlineElement(descriptor:index:)"))); -- (void)encodeIntElementDescriptor:(id)descriptor index:(int32_t)index value:(int32_t)value __attribute__((swift_name("encodeIntElement(descriptor:index:value:)"))); -- (void)encodeLongElementDescriptor:(id)descriptor index:(int32_t)index value:(int64_t)value __attribute__((swift_name("encodeLongElement(descriptor:index:value:)"))); -- (void)encodeNullableSerializableElementDescriptor:(id)descriptor index:(int32_t)index serializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeNullableSerializableElement(descriptor:index:serializer:value:)"))); -- (void)encodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index serializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeSerializableElement(descriptor:index:serializer:value:)"))); -- (void)encodeShortElementDescriptor:(id)descriptor index:(int32_t)index value:(int16_t)value __attribute__((swift_name("encodeShortElement(descriptor:index:value:)"))); -- (void)encodeStringElementDescriptor:(id)descriptor index:(int32_t)index value:(NSString *)value __attribute__((swift_name("encodeStringElement(descriptor:index:value:)"))); -- (void)endStructureDescriptor:(id)descriptor __attribute__((swift_name("endStructure(descriptor:)"))); -- (BOOL)shouldEncodeElementDefaultDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("shouldEncodeElementDefault(descriptor:index:)"))); -@property (readonly) ComponentboxKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreSerializersModule"))) -@interface ComponentboxKotlinx_serialization_coreSerializersModule : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)dumpToCollector:(id)collector __attribute__((swift_name("dumpTo(collector:)"))); -- (id _Nullable)getContextualKClass:(id)kClass typeArgumentsSerializers:(NSArray> *)typeArgumentsSerializers __attribute__((swift_name("getContextual(kClass:typeArgumentsSerializers:)"))); -- (id _Nullable)getPolymorphicBaseClass:(id)baseClass value:(id)value __attribute__((swift_name("getPolymorphic(baseClass:value:)"))); -- (id _Nullable)getPolymorphicBaseClass:(id)baseClass serializedClassName:(NSString * _Nullable)serializedClassName __attribute__((swift_name("getPolymorphic(baseClass:serializedClassName:)"))); -@end; - -__attribute__((swift_name("KotlinAnnotation"))) -@protocol ComponentboxKotlinAnnotation -@required -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreSerialKind"))) -@interface ComponentboxKotlinx_serialization_coreSerialKind : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreCompositeDecoder"))) -@protocol ComponentboxKotlinx_serialization_coreCompositeDecoder -@required -- (BOOL)decodeBooleanElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeBooleanElement(descriptor:index:)"))); -- (int8_t)decodeByteElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeByteElement(descriptor:index:)"))); -- (unichar)decodeCharElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeCharElement(descriptor:index:)"))); -- (int32_t)decodeCollectionSizeDescriptor:(id)descriptor __attribute__((swift_name("decodeCollectionSize(descriptor:)"))); -- (double)decodeDoubleElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeDoubleElement(descriptor:index:)"))); -- (int32_t)decodeElementIndexDescriptor:(id)descriptor __attribute__((swift_name("decodeElementIndex(descriptor:)"))); -- (float)decodeFloatElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeFloatElement(descriptor:index:)"))); -- (id)decodeInlineElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeInlineElement(descriptor:index:)"))); -- (int32_t)decodeIntElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeIntElement(descriptor:index:)"))); -- (int64_t)decodeLongElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeLongElement(descriptor:index:)"))); -- (id _Nullable)decodeNullableSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeNullableSerializableElement(descriptor:index:deserializer:previousValue:)"))); -- (BOOL)decodeSequentially __attribute__((swift_name("decodeSequentially()"))); -- (id _Nullable)decodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeSerializableElement(descriptor:index:deserializer:previousValue:)"))); -- (int16_t)decodeShortElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeShortElement(descriptor:index:)"))); -- (NSString *)decodeStringElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeStringElement(descriptor:index:)"))); -- (void)endStructureDescriptor:(id)descriptor __attribute__((swift_name("endStructure(descriptor:)"))); -@property (readonly) ComponentboxKotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinNothing"))) -@interface ComponentboxKotlinNothing : ComponentboxBase -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Kotlinx_serialization_jsonJsonElement.Companion"))) -@interface ComponentboxKotlinx_serialization_jsonJsonElementCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKotlinx_serialization_jsonJsonElementCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); -@end; - -__attribute__((swift_name("KotlinCoroutineContextElement"))) -@protocol ComponentboxKotlinCoroutineContextElement -@required -@property (readonly) id key __attribute__((swift_name("key"))); -@end; - -__attribute__((swift_name("KotlinCoroutineContextKey"))) -@protocol ComponentboxKotlinCoroutineContextKey -@required -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpRequestData"))) -@interface ComponentboxKtor_client_coreHttpRequestData : ComponentboxBase -- (instancetype)initWithUrl:(ComponentboxKtor_httpUrl *)url method:(ComponentboxKtor_httpHttpMethod *)method headers:(id)headers body:(ComponentboxKtor_httpOutgoingContent *)body executionContext:(id)executionContext attributes:(id)attributes __attribute__((swift_name("init(url:method:headers:body:executionContext:attributes:)"))) __attribute__((objc_designated_initializer)); -- (id _Nullable)getCapabilityOrNullKey:(id)key __attribute__((swift_name("getCapabilityOrNull(key:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id attributes __attribute__((swift_name("attributes"))); -@property (readonly) ComponentboxKtor_httpOutgoingContent *body __attribute__((swift_name("body"))); -@property (readonly) id executionContext __attribute__((swift_name("executionContext"))); -@property (readonly) id headers __attribute__((swift_name("headers"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *method __attribute__((swift_name("method"))); -@property (readonly) ComponentboxKtor_httpUrl *url __attribute__((swift_name("url"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpResponseData"))) -@interface ComponentboxKtor_client_coreHttpResponseData : ComponentboxBase -- (instancetype)initWithStatusCode:(ComponentboxKtor_httpHttpStatusCode *)statusCode requestTime:(ComponentboxKtor_utilsGMTDate *)requestTime headers:(id)headers version:(ComponentboxKtor_httpHttpProtocolVersion *)version body:(id)body callContext:(id)callContext __attribute__((swift_name("init(statusCode:requestTime:headers:version:body:callContext:)"))) __attribute__((objc_designated_initializer)); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id body __attribute__((swift_name("body"))); -@property (readonly) id callContext __attribute__((swift_name("callContext"))); -@property (readonly) id headers __attribute__((swift_name("headers"))); -@property (readonly) ComponentboxKtor_utilsGMTDate *requestTime __attribute__((swift_name("requestTime"))); -@property (readonly) ComponentboxKtor_utilsGMTDate *responseTime __attribute__((swift_name("responseTime"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *statusCode __attribute__((swift_name("statusCode"))); -@property (readonly) ComponentboxKtor_httpHttpProtocolVersion *version __attribute__((swift_name("version"))); -@end; - -__attribute__((swift_name("KotlinAbstractCoroutineContextElement"))) -@interface ComponentboxKotlinAbstractCoroutineContextElement : ComponentboxBase -- (instancetype)initWithKey:(id)key __attribute__((swift_name("init(key:)"))) __attribute__((objc_designated_initializer)); -@property (readonly) id key __attribute__((swift_name("key"))); -@end; - -__attribute__((swift_name("KotlinContinuationInterceptor"))) -@protocol ComponentboxKotlinContinuationInterceptor -@required -- (id)interceptContinuationContinuation:(id)continuation __attribute__((swift_name("interceptContinuation(continuation:)"))); -- (void)releaseInterceptedContinuationContinuation:(id)continuation __attribute__((swift_name("releaseInterceptedContinuation(continuation:)"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreCoroutineDispatcher"))) -@interface ComponentboxKotlinx_coroutines_coreCoroutineDispatcher : ComponentboxKotlinAbstractCoroutineContextElement -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (instancetype)initWithKey:(id)key __attribute__((swift_name("init(key:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKotlinx_coroutines_coreCoroutineDispatcherKey *companion __attribute__((swift_name("companion"))); -- (void)dispatchContext:(id)context block:(id)block __attribute__((swift_name("dispatch(context:block:)"))); -- (void)dispatchYieldContext:(id)context block:(id)block __attribute__((swift_name("dispatchYield(context:block:)"))); -- (id)interceptContinuationContinuation:(id)continuation __attribute__((swift_name("interceptContinuation(continuation:)"))); -- (BOOL)isDispatchNeededContext:(id)context __attribute__((swift_name("isDispatchNeeded(context:)"))); -- (ComponentboxKotlinx_coroutines_coreCoroutineDispatcher *)limitedParallelismParallelism:(int32_t)parallelism __attribute__((swift_name("limitedParallelism(parallelism:)"))); -- (ComponentboxKotlinx_coroutines_coreCoroutineDispatcher *)plusOther:(ComponentboxKotlinx_coroutines_coreCoroutineDispatcher *)other __attribute__((swift_name("plus(other:)"))) __attribute__((unavailable("Operator '+' on two CoroutineDispatcher objects is meaningless. CoroutineDispatcher is a coroutine context element and `+` is a set-sum operator for coroutine contexts. The dispatcher to the right of `+` just replaces the dispatcher to the left."))); -- (void)releaseInterceptedContinuationContinuation:(id)continuation __attribute__((swift_name("releaseInterceptedContinuation(continuation:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreProxyConfig"))) -@interface ComponentboxKtor_client_coreProxyConfig : ComponentboxBase -- (instancetype)initWithUrl:(ComponentboxKtor_httpUrl *)url __attribute__((swift_name("init(url:)"))) __attribute__((objc_designated_initializer)); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxKtor_httpUrl *url __attribute__((swift_name("url"))); -@end; - -__attribute__((swift_name("Ktor_client_coreHttpClientPlugin"))) -@protocol ComponentboxKtor_client_coreHttpClientPlugin -@required -- (void)installPlugin:(id)plugin scope:(ComponentboxKtor_client_coreHttpClient *)scope __attribute__((swift_name("install(plugin:scope:)"))); -- (id)prepareBlock:(void (^)(id))block __attribute__((swift_name("prepare(block:)"))); -@property (readonly) ComponentboxKtor_utilsAttributeKey *key __attribute__((swift_name("key"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsAttributeKey"))) -@interface ComponentboxKtor_utilsAttributeKey : ComponentboxBase -- (instancetype)initWithName:(NSString *)name __attribute__((swift_name("init(name:)"))) __attribute__((objc_designated_initializer)); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@end; - -__attribute__((swift_name("Ktor_eventsEventDefinition"))) -@interface ComponentboxKtor_eventsEventDefinition : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreDisposableHandle"))) -@protocol ComponentboxKotlinx_coroutines_coreDisposableHandle -@required -- (void)dispose __attribute__((swift_name("dispose()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsPipelinePhase"))) -@interface ComponentboxKtor_utilsPipelinePhase : ComponentboxBase -- (instancetype)initWithName:(NSString *)name __attribute__((swift_name("init(name:)"))) __attribute__((objc_designated_initializer)); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@end; - -__attribute__((swift_name("KotlinFunction"))) -@protocol ComponentboxKotlinFunction -@required -@end; - -__attribute__((swift_name("KotlinSuspendFunction2"))) -@protocol ComponentboxKotlinSuspendFunction2 -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)invokeP1:(id _Nullable)p1 p2:(id _Nullable)p2 completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke(p1:p2:completionHandler:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpReceivePipeline.Phases"))) -@interface ComponentboxKtor_client_coreHttpReceivePipelinePhases : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)phases __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_client_coreHttpReceivePipelinePhases *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *After __attribute__((swift_name("After"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Before __attribute__((swift_name("Before"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *State __attribute__((swift_name("State"))); -@end; - -__attribute__((swift_name("Ktor_httpHttpMessage"))) -@protocol ComponentboxKtor_httpHttpMessage -@required -@property (readonly) id headers __attribute__((swift_name("headers"))); -@end; - -__attribute__((swift_name("Ktor_client_coreHttpResponse"))) -@interface ComponentboxKtor_client_coreHttpResponse : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxKtor_client_coreHttpClientCall *call __attribute__((swift_name("call"))); -@property (readonly) id content __attribute__((swift_name("content"))); -@property (readonly) ComponentboxKtor_utilsGMTDate *requestTime __attribute__((swift_name("requestTime"))); -@property (readonly) ComponentboxKtor_utilsGMTDate *responseTime __attribute__((swift_name("responseTime"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *status __attribute__((swift_name("status"))); -@property (readonly) ComponentboxKtor_httpHttpProtocolVersion *version __attribute__((swift_name("version"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpRequestPipeline.Phases"))) -@interface ComponentboxKtor_client_coreHttpRequestPipelinePhases : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)phases __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_client_coreHttpRequestPipelinePhases *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Before __attribute__((swift_name("Before"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Render __attribute__((swift_name("Render"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Send __attribute__((swift_name("Send"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *State __attribute__((swift_name("State"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Transform __attribute__((swift_name("Transform"))); -@end; - -__attribute__((swift_name("Ktor_httpHttpMessageBuilder"))) -@protocol ComponentboxKtor_httpHttpMessageBuilder -@required -@property (readonly) ComponentboxKtor_httpHeadersBuilder *headers __attribute__((swift_name("headers"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpRequestBuilder"))) -@interface ComponentboxKtor_client_coreHttpRequestBuilder : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property (class, readonly, getter=companion) ComponentboxKtor_client_coreHttpRequestBuilderCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxKtor_client_coreHttpRequestData *)build __attribute__((swift_name("build()"))); -- (id _Nullable)getCapabilityOrNullKey:(id)key __attribute__((swift_name("getCapabilityOrNull(key:)"))); -- (void)setAttributesBlock:(void (^)(id))block __attribute__((swift_name("setAttributes(block:)"))); -- (void)setCapabilityKey:(id)key capability:(id)capability __attribute__((swift_name("setCapability(key:capability:)"))); -- (ComponentboxKtor_client_coreHttpRequestBuilder *)takeFromBuilder:(ComponentboxKtor_client_coreHttpRequestBuilder *)builder __attribute__((swift_name("takeFrom(builder:)"))); -- (ComponentboxKtor_client_coreHttpRequestBuilder *)takeFromWithExecutionContextBuilder:(ComponentboxKtor_client_coreHttpRequestBuilder *)builder __attribute__((swift_name("takeFromWithExecutionContext(builder:)"))); -- (void)urlBlock:(void (^)(ComponentboxKtor_httpURLBuilder *, ComponentboxKtor_httpURLBuilder *))block __attribute__((swift_name("url(block:)"))); -@property (readonly) id attributes __attribute__((swift_name("attributes"))); -@property id body __attribute__((swift_name("body"))); -@property ComponentboxKtor_utilsTypeInfo * _Nullable bodyType __attribute__((swift_name("bodyType"))); -@property (readonly) id executionContext __attribute__((swift_name("executionContext"))); -@property (readonly) ComponentboxKtor_httpHeadersBuilder *headers __attribute__((swift_name("headers"))); -@property ComponentboxKtor_httpHttpMethod *method __attribute__((swift_name("method"))); -@property (readonly) ComponentboxKtor_httpURLBuilder *url __attribute__((swift_name("url"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpResponsePipeline.Phases"))) -@interface ComponentboxKtor_client_coreHttpResponsePipelinePhases : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)phases __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_client_coreHttpResponsePipelinePhases *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *After __attribute__((swift_name("After"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Parse __attribute__((swift_name("Parse"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Receive __attribute__((swift_name("Receive"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *State __attribute__((swift_name("State"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Transform __attribute__((swift_name("Transform"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpResponseContainer"))) -@interface ComponentboxKtor_client_coreHttpResponseContainer : ComponentboxBase -- (instancetype)initWithExpectedType:(ComponentboxKtor_utilsTypeInfo *)expectedType response:(id)response __attribute__((swift_name("init(expectedType:response:)"))) __attribute__((objc_designated_initializer)); -- (ComponentboxKtor_utilsTypeInfo *)component1 __attribute__((swift_name("component1()"))); -- (id)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxKtor_client_coreHttpResponseContainer *)doCopyExpectedType:(ComponentboxKtor_utilsTypeInfo *)expectedType response:(id)response __attribute__((swift_name("doCopy(expectedType:response:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxKtor_utilsTypeInfo *expectedType __attribute__((swift_name("expectedType"))); -@property (readonly) id response __attribute__((swift_name("response"))); -@end; - -__attribute__((swift_name("Ktor_client_coreHttpClientCall"))) -@interface ComponentboxKtor_client_coreHttpClientCall : ComponentboxBase -@property (class, readonly, getter=companion) ComponentboxKtor_client_coreHttpClientCallCompanion *companion __attribute__((swift_name("companion"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)bodyInfo:(ComponentboxKtor_utilsTypeInfo *)info completionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("body(info:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)getResponseContentWithCompletionHandler:(void (^)(id _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("getResponseContent(completionHandler:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) BOOL allowDoubleReceive __attribute__((swift_name("allowDoubleReceive"))); -@property (readonly) id attributes __attribute__((swift_name("attributes"))); -@property (readonly) ComponentboxKtor_client_coreHttpClient * _Nullable client __attribute__((swift_name("client"))); -@property (readonly) id coroutineContext __attribute__((swift_name("coroutineContext"))); -@property (readonly) id request __attribute__((swift_name("request"))); -@property (readonly) ComponentboxKtor_client_coreHttpResponse *response __attribute__((swift_name("response"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpSendPipeline.Phases"))) -@interface ComponentboxKtor_client_coreHttpSendPipelinePhases : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)phases __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_client_coreHttpSendPipelinePhases *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Before __attribute__((swift_name("Before"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Engine __attribute__((swift_name("Engine"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Monitoring __attribute__((swift_name("Monitoring"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *Receive __attribute__((swift_name("Receive"))); -@property (readonly) ComponentboxKtor_utilsPipelinePhase *State __attribute__((swift_name("State"))); -@end; - -__attribute__((swift_name("Kotlinx_serialization_coreSerializersModuleCollector"))) -@protocol ComponentboxKotlinx_serialization_coreSerializersModuleCollector -@required -- (void)contextualKClass:(id)kClass provider:(id (^)(NSArray> *))provider __attribute__((swift_name("contextual(kClass:provider:)"))); -- (void)contextualKClass:(id)kClass serializer:(id)serializer __attribute__((swift_name("contextual(kClass:serializer:)"))); -- (void)polymorphicBaseClass:(id)baseClass actualClass:(id)actualClass actualSerializer:(id)actualSerializer __attribute__((swift_name("polymorphic(baseClass:actualClass:actualSerializer:)"))); -- (void)polymorphicDefaultBaseClass:(id)baseClass defaultDeserializerProvider:(id _Nullable (^)(NSString * _Nullable))defaultDeserializerProvider __attribute__((swift_name("polymorphicDefault(baseClass:defaultDeserializerProvider:)"))); -- (void)polymorphicDefaultDeserializerBaseClass:(id)baseClass defaultDeserializerProvider:(id _Nullable (^)(NSString * _Nullable))defaultDeserializerProvider __attribute__((swift_name("polymorphicDefaultDeserializer(baseClass:defaultDeserializerProvider:)"))); -- (void)polymorphicDefaultSerializerBaseClass:(id)baseClass defaultSerializerProvider:(id _Nullable (^)(id))defaultSerializerProvider __attribute__((swift_name("polymorphicDefaultSerializer(baseClass:defaultSerializerProvider:)"))); -@end; - -__attribute__((swift_name("KotlinKDeclarationContainer"))) -@protocol ComponentboxKotlinKDeclarationContainer -@required -@end; - -__attribute__((swift_name("KotlinKAnnotatedElement"))) -@protocol ComponentboxKotlinKAnnotatedElement -@required -@end; - -__attribute__((swift_name("KotlinKClassifier"))) -@protocol ComponentboxKotlinKClassifier -@required -@end; - -__attribute__((swift_name("KotlinKClass"))) -@protocol ComponentboxKotlinKClass -@required -- (BOOL)isInstanceValue:(id _Nullable)value __attribute__((swift_name("isInstance(value:)"))); -@property (readonly) NSString * _Nullable qualifiedName __attribute__((swift_name("qualifiedName"))); -@property (readonly) NSString * _Nullable simpleName __attribute__((swift_name("simpleName"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpUrl"))) -@interface ComponentboxKtor_httpUrl : ComponentboxBase -@property (class, readonly, getter=companion) ComponentboxKtor_httpUrlCompanion *companion __attribute__((swift_name("companion"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *encodedFragment __attribute__((swift_name("encodedFragment"))); -@property (readonly) NSString * _Nullable encodedPassword __attribute__((swift_name("encodedPassword"))); -@property (readonly) NSString *encodedPath __attribute__((swift_name("encodedPath"))); -@property (readonly) NSString *encodedPathAndQuery __attribute__((swift_name("encodedPathAndQuery"))); -@property (readonly) NSString *encodedQuery __attribute__((swift_name("encodedQuery"))); -@property (readonly) NSString * _Nullable encodedUser __attribute__((swift_name("encodedUser"))); -@property (readonly) NSString *fragment __attribute__((swift_name("fragment"))); -@property (readonly) NSString *host __attribute__((swift_name("host"))); -@property (readonly) id parameters __attribute__((swift_name("parameters"))); -@property (readonly) NSString * _Nullable password __attribute__((swift_name("password"))); -@property (readonly) NSArray *pathSegments __attribute__((swift_name("pathSegments"))); -@property (readonly) int32_t port __attribute__((swift_name("port"))); -@property (readonly) ComponentboxKtor_httpURLProtocol *protocol __attribute__((swift_name("protocol"))); -@property (readonly) int32_t specifiedPort __attribute__((swift_name("specifiedPort"))); -@property (readonly) BOOL trailingQuery __attribute__((swift_name("trailingQuery"))); -@property (readonly) NSString * _Nullable user __attribute__((swift_name("user"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHttpMethod"))) -@interface ComponentboxKtor_httpHttpMethod : ComponentboxBase -- (instancetype)initWithValue:(NSString *)value __attribute__((swift_name("init(value:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_httpHttpMethodCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (ComponentboxKtor_httpHttpMethod *)doCopyValue:(NSString *)value __attribute__((swift_name("doCopy(value:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *value __attribute__((swift_name("value"))); -@end; - -__attribute__((swift_name("Ktor_utilsStringValues"))) -@protocol ComponentboxKtor_utilsStringValues -@required -- (BOOL)containsName:(NSString *)name __attribute__((swift_name("contains(name:)"))); -- (BOOL)containsName:(NSString *)name value:(NSString *)value __attribute__((swift_name("contains(name:value:)"))); -- (NSSet> *)entries __attribute__((swift_name("entries()"))); -- (void)forEachBody:(void (^)(NSString *, NSArray *))body __attribute__((swift_name("forEach(body:)"))); -- (NSString * _Nullable)getName:(NSString *)name __attribute__((swift_name("get(name:)"))); -- (NSArray * _Nullable)getAllName:(NSString *)name __attribute__((swift_name("getAll(name:)"))); -- (BOOL)isEmpty_ __attribute__((swift_name("isEmpty()"))); -- (NSSet *)names __attribute__((swift_name("names()"))); -@property (readonly) BOOL caseInsensitiveName __attribute__((swift_name("caseInsensitiveName"))); -@end; - -__attribute__((swift_name("Ktor_httpHeaders"))) -@protocol ComponentboxKtor_httpHeaders -@required -@end; - -__attribute__((swift_name("Ktor_httpOutgoingContent"))) -@interface ComponentboxKtor_httpOutgoingContent : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (id _Nullable)getPropertyKey:(ComponentboxKtor_utilsAttributeKey *)key __attribute__((swift_name("getProperty(key:)"))); -- (void)setPropertyKey:(ComponentboxKtor_utilsAttributeKey *)key value:(id _Nullable)value __attribute__((swift_name("setProperty(key:value:)"))); -- (id _Nullable)trailers __attribute__((swift_name("trailers()"))); -@property (readonly) ComponentboxLong * _Nullable contentLength __attribute__((swift_name("contentLength"))); -@property (readonly) ComponentboxKtor_httpContentType * _Nullable contentType __attribute__((swift_name("contentType"))); -@property (readonly) id headers __attribute__((swift_name("headers"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode * _Nullable status __attribute__((swift_name("status"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreJob"))) -@protocol ComponentboxKotlinx_coroutines_coreJob -@required -- (id)attachChildChild:(id)child __attribute__((swift_name("attachChild(child:)"))); -- (void)cancelCause:(ComponentboxKotlinCancellationException * _Nullable)cause __attribute__((swift_name("cancel(cause:)"))); -- (ComponentboxKotlinCancellationException *)getCancellationException __attribute__((swift_name("getCancellationException()"))); -- (id)invokeOnCompletionOnCancelling:(BOOL)onCancelling invokeImmediately:(BOOL)invokeImmediately handler:(void (^)(ComponentboxKotlinThrowable * _Nullable))handler __attribute__((swift_name("invokeOnCompletion(onCancelling:invokeImmediately:handler:)"))); -- (id)invokeOnCompletionHandler:(void (^)(ComponentboxKotlinThrowable * _Nullable))handler __attribute__((swift_name("invokeOnCompletion(handler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)joinWithCompletionHandler:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("join(completionHandler:)"))); -- (id)plusOther_:(id)other __attribute__((swift_name("plus(other_:)"))) __attribute__((unavailable("Operator '+' on two Job objects is meaningless. Job is a coroutine context element and `+` is a set-sum operator for coroutine contexts. The job to the right of `+` just replaces the job the left of `+`."))); -- (BOOL)start __attribute__((swift_name("start()"))); -@property (readonly) id children __attribute__((swift_name("children"))); -@property (readonly) BOOL isActive __attribute__((swift_name("isActive"))); -@property (readonly) BOOL isCancelled __attribute__((swift_name("isCancelled"))); -@property (readonly) BOOL isCompleted __attribute__((swift_name("isCompleted"))); -@property (readonly) id onJoin __attribute__((swift_name("onJoin"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHttpStatusCode"))) -@interface ComponentboxKtor_httpHttpStatusCode : ComponentboxBase -- (instancetype)initWithValue:(int32_t)value description:(NSString *)description __attribute__((swift_name("init(value:description:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_httpHttpStatusCodeCompanion *companion __attribute__((swift_name("companion"))); -- (int32_t)component1 __attribute__((swift_name("component1()"))); -- (NSString *)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxKtor_httpHttpStatusCode *)doCopyValue:(int32_t)value description:(NSString *)description __attribute__((swift_name("doCopy(value:description:)"))); -- (ComponentboxKtor_httpHttpStatusCode *)descriptionValue:(NSString *)value __attribute__((swift_name("description(value:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *description_ __attribute__((swift_name("description_"))); -@property (readonly) int32_t value __attribute__((swift_name("value"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsGMTDate"))) -@interface ComponentboxKtor_utilsGMTDate : ComponentboxBase -@property (class, readonly, getter=companion) ComponentboxKtor_utilsGMTDateCompanion *companion __attribute__((swift_name("companion"))); -- (int32_t)compareToOther:(ComponentboxKtor_utilsGMTDate *)other __attribute__((swift_name("compareTo(other:)"))); -- (int32_t)component1 __attribute__((swift_name("component1()"))); -- (int32_t)component2 __attribute__((swift_name("component2()"))); -- (int32_t)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxKtor_utilsWeekDay *)component4 __attribute__((swift_name("component4()"))); -- (int32_t)component5 __attribute__((swift_name("component5()"))); -- (int32_t)component6 __attribute__((swift_name("component6()"))); -- (ComponentboxKtor_utilsMonth *)component7 __attribute__((swift_name("component7()"))); -- (int32_t)component8 __attribute__((swift_name("component8()"))); -- (int64_t)component9 __attribute__((swift_name("component9()"))); -- (ComponentboxKtor_utilsGMTDate *)doCopySeconds:(int32_t)seconds minutes:(int32_t)minutes hours:(int32_t)hours dayOfWeek:(ComponentboxKtor_utilsWeekDay *)dayOfWeek dayOfMonth:(int32_t)dayOfMonth dayOfYear:(int32_t)dayOfYear month:(ComponentboxKtor_utilsMonth *)month year:(int32_t)year timestamp:(int64_t)timestamp __attribute__((swift_name("doCopy(seconds:minutes:hours:dayOfWeek:dayOfMonth:dayOfYear:month:year:timestamp:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t dayOfMonth __attribute__((swift_name("dayOfMonth"))); -@property (readonly) ComponentboxKtor_utilsWeekDay *dayOfWeek __attribute__((swift_name("dayOfWeek"))); -@property (readonly) int32_t dayOfYear __attribute__((swift_name("dayOfYear"))); -@property (readonly) int32_t hours __attribute__((swift_name("hours"))); -@property (readonly) int32_t minutes __attribute__((swift_name("minutes"))); -@property (readonly) ComponentboxKtor_utilsMonth *month __attribute__((swift_name("month"))); -@property (readonly) int32_t seconds __attribute__((swift_name("seconds"))); -@property (readonly) int64_t timestamp __attribute__((swift_name("timestamp"))); -@property (readonly) int32_t year __attribute__((swift_name("year"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHttpProtocolVersion"))) -@interface ComponentboxKtor_httpHttpProtocolVersion : ComponentboxBase -- (instancetype)initWithName:(NSString *)name major:(int32_t)major minor:(int32_t)minor __attribute__((swift_name("init(name:major:minor:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_httpHttpProtocolVersionCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (int32_t)component2 __attribute__((swift_name("component2()"))); -- (int32_t)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxKtor_httpHttpProtocolVersion *)doCopyName:(NSString *)name major:(int32_t)major minor:(int32_t)minor __attribute__((swift_name("doCopy(name:major:minor:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t major __attribute__((swift_name("major"))); -@property (readonly) int32_t minor __attribute__((swift_name("minor"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@end; - -__attribute__((swift_name("KotlinContinuation"))) -@protocol ComponentboxKotlinContinuation -@required -- (void)resumeWithResult:(id _Nullable)result __attribute__((swift_name("resumeWith(result:)"))); -@property (readonly) id context __attribute__((swift_name("context"))); -@end; - -__attribute__((swift_name("KotlinAbstractCoroutineContextKey"))) -@interface ComponentboxKotlinAbstractCoroutineContextKey : ComponentboxBase -- (instancetype)initWithBaseKey:(id)baseKey safeCast:(E _Nullable (^)(id))safeCast __attribute__((swift_name("init(baseKey:safeCast:)"))) __attribute__((objc_designated_initializer)); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Kotlinx_coroutines_coreCoroutineDispatcher.Key"))) -@interface ComponentboxKotlinx_coroutines_coreCoroutineDispatcherKey : ComponentboxKotlinAbstractCoroutineContextKey, ComponentboxKotlinx_coroutines_coreCoroutineDispatcher *> -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithBaseKey:(id)baseKey safeCast:(id _Nullable (^)(id))safeCast __attribute__((swift_name("init(baseKey:safeCast:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)key __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKotlinx_coroutines_coreCoroutineDispatcherKey *shared __attribute__((swift_name("shared"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreRunnable"))) -@protocol ComponentboxKotlinx_coroutines_coreRunnable -@required -- (void)run __attribute__((swift_name("run()"))); -@end; - -__attribute__((swift_name("Ktor_ioByteReadChannel"))) -@protocol ComponentboxKtor_ioByteReadChannel -@required -- (BOOL)cancelCause_:(ComponentboxKotlinThrowable * _Nullable)cause __attribute__((swift_name("cancel(cause_:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)discardMax:(int64_t)max completionHandler:(void (^)(ComponentboxLong * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("discard(max:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)peekToDestination:(ComponentboxKtor_ioMemory *)destination destinationOffset:(int64_t)destinationOffset offset:(int64_t)offset min:(int64_t)min max:(int64_t)max completionHandler:(void (^)(ComponentboxLong * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("peekTo(destination:destinationOffset:offset:min:max:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readAvailableDst:(ComponentboxKtor_ioChunkBuffer *)dst completionHandler:(void (^)(ComponentboxInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readAvailable(dst:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readAvailableDst:(ComponentboxKotlinByteArray *)dst offset:(int32_t)offset length:(int32_t)length completionHandler:(void (^)(ComponentboxInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readAvailable(dst:offset:length:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readAvailableDst:(void *)dst offset:(int32_t)offset length:(int32_t)length completionHandler_:(void (^)(ComponentboxInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readAvailable(dst:offset:length:completionHandler_:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readAvailableDst:(void *)dst offset:(int64_t)offset length:(int64_t)length completionHandler__:(void (^)(ComponentboxInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readAvailable(dst:offset:length:completionHandler__:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readBooleanWithCompletionHandler:(void (^)(ComponentboxBoolean * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readBoolean(completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readByteWithCompletionHandler:(void (^)(ComponentboxByte * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readByte(completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readDoubleWithCompletionHandler:(void (^)(ComponentboxDouble * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readDouble(completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readFloatWithCompletionHandler:(void (^)(ComponentboxFloat * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readFloat(completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readFullyDst:(ComponentboxKtor_ioChunkBuffer *)dst n:(int32_t)n completionHandler:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readFully(dst:n:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readFullyDst:(ComponentboxKotlinByteArray *)dst offset:(int32_t)offset length:(int32_t)length completionHandler:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readFully(dst:offset:length:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readFullyDst:(void *)dst offset:(int32_t)offset length:(int32_t)length completionHandler_:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readFully(dst:offset:length:completionHandler_:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readFullyDst:(void *)dst offset:(int64_t)offset length:(int64_t)length completionHandler__:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readFully(dst:offset:length:completionHandler__:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readIntWithCompletionHandler:(void (^)(ComponentboxInt * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readInt(completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readLongWithCompletionHandler:(void (^)(ComponentboxLong * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readLong(completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readPacketSize:(int32_t)size headerSizeHint:(int32_t)headerSizeHint completionHandler:(void (^)(ComponentboxKtor_ioByteReadPacket * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readPacket(size:headerSizeHint:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readRemainingLimit:(int64_t)limit headerSizeHint:(int32_t)headerSizeHint completionHandler:(void (^)(ComponentboxKtor_ioByteReadPacket * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readRemaining(limit:headerSizeHint:completionHandler:)"))); -- (void)readSessionConsumer:(void (^)(id))consumer __attribute__((swift_name("readSession(consumer:)"))) __attribute__((deprecated("Use read { } instead."))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readShortWithCompletionHandler:(void (^)(ComponentboxShort * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readShort(completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readSuspendableSessionConsumer:(id)consumer completionHandler:(void (^)(ComponentboxKotlinUnit * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readSuspendableSession(consumer:completionHandler:)"))) __attribute__((deprecated("Use read { } instead."))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readUTF8LineLimit:(int32_t)limit completionHandler:(void (^)(NSString * _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("readUTF8Line(limit:completionHandler:)"))); - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)readUTF8LineToOut:(id)out limit:(int32_t)limit completionHandler:(void (^)(ComponentboxBoolean * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("readUTF8LineTo(out:limit:completionHandler:)"))); -@property (readonly) int32_t availableForRead __attribute__((swift_name("availableForRead"))); -@property (readonly) ComponentboxKotlinThrowable * _Nullable closedCause __attribute__((swift_name("closedCause"))); -@property (readonly) BOOL isClosedForRead __attribute__((swift_name("isClosedForRead"))); -@property (readonly) BOOL isClosedForWrite __attribute__((swift_name("isClosedForWrite"))); -@property (readonly) int64_t totalBytesRead __attribute__((swift_name("totalBytesRead"))); -@end; - -__attribute__((swift_name("Ktor_utilsStringValuesBuilder"))) -@protocol ComponentboxKtor_utilsStringValuesBuilder -@required -- (void)appendName:(NSString *)name value:(NSString *)value __attribute__((swift_name("append(name:value:)"))); -- (void)appendAllStringValues:(id)stringValues __attribute__((swift_name("appendAll(stringValues:)"))); -- (void)appendAllName:(NSString *)name values:(id)values __attribute__((swift_name("appendAll(name:values:)"))); -- (void)appendMissingStringValues:(id)stringValues __attribute__((swift_name("appendMissing(stringValues:)"))); -- (void)appendMissingName:(NSString *)name values:(id)values __attribute__((swift_name("appendMissing(name:values:)"))); -- (id)build __attribute__((swift_name("build()"))); -- (void)clear __attribute__((swift_name("clear()"))); -- (BOOL)containsName:(NSString *)name __attribute__((swift_name("contains(name:)"))); -- (BOOL)containsName:(NSString *)name value:(NSString *)value __attribute__((swift_name("contains(name:value:)"))); -- (NSSet> *)entries __attribute__((swift_name("entries()"))); -- (NSString * _Nullable)getName:(NSString *)name __attribute__((swift_name("get(name:)"))); -- (NSArray * _Nullable)getAllName:(NSString *)name __attribute__((swift_name("getAll(name:)"))); -- (BOOL)isEmpty_ __attribute__((swift_name("isEmpty()"))); -- (NSSet *)names __attribute__((swift_name("names()"))); -- (void)removeName:(NSString *)name __attribute__((swift_name("remove(name:)"))); -- (BOOL)removeName:(NSString *)name value:(NSString *)value __attribute__((swift_name("remove(name:value:)"))); -- (void)removeKeysWithNoEntries __attribute__((swift_name("removeKeysWithNoEntries()"))); -- (void)setName:(NSString *)name value:(NSString *)value __attribute__((swift_name("set(name:value:)"))); -@property (readonly) BOOL caseInsensitiveName __attribute__((swift_name("caseInsensitiveName"))); -@end; - -__attribute__((swift_name("Ktor_utilsStringValuesBuilderImpl"))) -@interface ComponentboxKtor_utilsStringValuesBuilderImpl : ComponentboxBase -- (instancetype)initWithCaseInsensitiveName:(BOOL)caseInsensitiveName size:(int32_t)size __attribute__((swift_name("init(caseInsensitiveName:size:)"))) __attribute__((objc_designated_initializer)); -- (void)appendName:(NSString *)name value:(NSString *)value __attribute__((swift_name("append(name:value:)"))); -- (void)appendAllStringValues:(id)stringValues __attribute__((swift_name("appendAll(stringValues:)"))); -- (void)appendAllName:(NSString *)name values:(id)values __attribute__((swift_name("appendAll(name:values:)"))); -- (void)appendMissingStringValues:(id)stringValues __attribute__((swift_name("appendMissing(stringValues:)"))); -- (void)appendMissingName:(NSString *)name values:(id)values __attribute__((swift_name("appendMissing(name:values:)"))); -- (id)build __attribute__((swift_name("build()"))); -- (void)clear __attribute__((swift_name("clear()"))); -- (BOOL)containsName:(NSString *)name __attribute__((swift_name("contains(name:)"))); -- (BOOL)containsName:(NSString *)name value:(NSString *)value __attribute__((swift_name("contains(name:value:)"))); -- (NSSet> *)entries __attribute__((swift_name("entries()"))); -- (NSString * _Nullable)getName:(NSString *)name __attribute__((swift_name("get(name:)"))); -- (NSArray * _Nullable)getAllName:(NSString *)name __attribute__((swift_name("getAll(name:)"))); -- (BOOL)isEmpty_ __attribute__((swift_name("isEmpty()"))); -- (NSSet *)names __attribute__((swift_name("names()"))); -- (void)removeName:(NSString *)name __attribute__((swift_name("remove(name:)"))); -- (BOOL)removeName:(NSString *)name value:(NSString *)value __attribute__((swift_name("remove(name:value:)"))); -- (void)removeKeysWithNoEntries __attribute__((swift_name("removeKeysWithNoEntries()"))); -- (void)setName:(NSString *)name value:(NSString *)value __attribute__((swift_name("set(name:value:)"))); -- (void)validateNameName:(NSString *)name __attribute__((swift_name("validateName(name:)"))); -- (void)validateValueValue:(NSString *)value __attribute__((swift_name("validateValue(value:)"))); -@property (readonly) BOOL caseInsensitiveName __attribute__((swift_name("caseInsensitiveName"))); -@property (readonly) ComponentboxMutableDictionary *> *values __attribute__((swift_name("values"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHeadersBuilder"))) -@interface ComponentboxKtor_httpHeadersBuilder : ComponentboxKtor_utilsStringValuesBuilderImpl -- (instancetype)initWithSize:(int32_t)size __attribute__((swift_name("init(size:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithCaseInsensitiveName:(BOOL)caseInsensitiveName size:(int32_t)size __attribute__((swift_name("init(caseInsensitiveName:size:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -- (id)build __attribute__((swift_name("build()"))); -- (void)validateNameName:(NSString *)name __attribute__((swift_name("validateName(name:)"))); -- (void)validateValueValue:(NSString *)value __attribute__((swift_name("validateValue(value:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpRequestBuilder.Companion"))) -@interface ComponentboxKtor_client_coreHttpRequestBuilderCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_client_coreHttpRequestBuilderCompanion *shared __attribute__((swift_name("shared"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpURLBuilder"))) -@interface ComponentboxKtor_httpURLBuilder : ComponentboxBase -- (instancetype)initWithProtocol:(ComponentboxKtor_httpURLProtocol *)protocol host:(NSString *)host port:(int32_t)port user:(NSString * _Nullable)user password:(NSString * _Nullable)password pathSegments:(NSArray *)pathSegments parameters:(id)parameters fragment:(NSString *)fragment trailingQuery:(BOOL)trailingQuery __attribute__((swift_name("init(protocol:host:port:user:password:pathSegments:parameters:fragment:trailingQuery:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_httpURLBuilderCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxKtor_httpUrl *)build __attribute__((swift_name("build()"))); -- (NSString *)buildString __attribute__((swift_name("buildString()"))); -@property NSString *encodedFragment __attribute__((swift_name("encodedFragment"))); -@property id encodedParameters __attribute__((swift_name("encodedParameters"))); -@property NSString * _Nullable encodedPassword __attribute__((swift_name("encodedPassword"))); -@property NSArray *encodedPathSegments __attribute__((swift_name("encodedPathSegments"))); -@property NSString * _Nullable encodedUser __attribute__((swift_name("encodedUser"))); -@property NSString *fragment __attribute__((swift_name("fragment"))); -@property NSString *host __attribute__((swift_name("host"))); -@property (readonly) id parameters __attribute__((swift_name("parameters"))); -@property NSString * _Nullable password __attribute__((swift_name("password"))); -@property NSArray *pathSegments __attribute__((swift_name("pathSegments"))); -@property int32_t port __attribute__((swift_name("port"))); -@property ComponentboxKtor_httpURLProtocol *protocol __attribute__((swift_name("protocol"))); -@property BOOL trailingQuery __attribute__((swift_name("trailingQuery"))); -@property NSString * _Nullable user __attribute__((swift_name("user"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsTypeInfo"))) -@interface ComponentboxKtor_utilsTypeInfo : ComponentboxBase -- (instancetype)initWithType:(id)type reifiedType:(id)reifiedType kotlinType:(id _Nullable)kotlinType __attribute__((swift_name("init(type:reifiedType:kotlinType:)"))) __attribute__((objc_designated_initializer)); -- (id)component1 __attribute__((swift_name("component1()"))); -- (id)component2 __attribute__((swift_name("component2()"))); -- (id _Nullable)component3 __attribute__((swift_name("component3()"))); -- (ComponentboxKtor_utilsTypeInfo *)doCopyType:(id)type reifiedType:(id)reifiedType kotlinType:(id _Nullable)kotlinType __attribute__((swift_name("doCopy(type:reifiedType:kotlinType:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id _Nullable kotlinType __attribute__((swift_name("kotlinType"))); -@property (readonly) id reifiedType __attribute__((swift_name("reifiedType"))); -@property (readonly) id type __attribute__((swift_name("type"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_client_coreHttpClientCall.Companion"))) -@interface ComponentboxKtor_client_coreHttpClientCallCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_client_coreHttpClientCallCompanion *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_utilsAttributeKey *CustomResponse __attribute__((swift_name("CustomResponse"))) __attribute__((unavailable("This is going to be removed. Please file a ticket with clarification why and what for do you need it."))); -@end; - -__attribute__((swift_name("Ktor_client_coreHttpRequest"))) -@protocol ComponentboxKtor_client_coreHttpRequest -@required -@property (readonly) id attributes __attribute__((swift_name("attributes"))); -@property (readonly) ComponentboxKtor_client_coreHttpClientCall *call __attribute__((swift_name("call"))); -@property (readonly) ComponentboxKtor_httpOutgoingContent *content __attribute__((swift_name("content"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *method __attribute__((swift_name("method"))); -@property (readonly) ComponentboxKtor_httpUrl *url __attribute__((swift_name("url"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpUrl.Companion"))) -@interface ComponentboxKtor_httpUrlCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpUrlCompanion *shared __attribute__((swift_name("shared"))); -@end; - -__attribute__((swift_name("Ktor_httpParameters"))) -@protocol ComponentboxKtor_httpParameters -@required -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpURLProtocol"))) -@interface ComponentboxKtor_httpURLProtocol : ComponentboxBase -- (instancetype)initWithName:(NSString *)name defaultPort:(int32_t)defaultPort __attribute__((swift_name("init(name:defaultPort:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_httpURLProtocolCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (int32_t)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxKtor_httpURLProtocol *)doCopyName:(NSString *)name defaultPort:(int32_t)defaultPort __attribute__((swift_name("doCopy(name:defaultPort:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t defaultPort __attribute__((swift_name("defaultPort"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHttpMethod.Companion"))) -@interface ComponentboxKtor_httpHttpMethodCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpHttpMethodCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKtor_httpHttpMethod *)parseMethod:(NSString *)method __attribute__((swift_name("parse(method:)"))); -@property (readonly) NSArray *DefaultMethods __attribute__((swift_name("DefaultMethods"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *Delete __attribute__((swift_name("Delete"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *Get __attribute__((swift_name("Get"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *Head __attribute__((swift_name("Head"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *Options __attribute__((swift_name("Options"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *Patch __attribute__((swift_name("Patch"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *Post __attribute__((swift_name("Post"))); -@property (readonly) ComponentboxKtor_httpHttpMethod *Put __attribute__((swift_name("Put"))); -@end; - -__attribute__((swift_name("KotlinMapEntry"))) -@protocol ComponentboxKotlinMapEntry -@required -@property (readonly) id _Nullable key __attribute__((swift_name("key"))); -@property (readonly) id _Nullable value __attribute__((swift_name("value"))); -@end; - -__attribute__((swift_name("Ktor_httpHeaderValueWithParameters"))) -@interface ComponentboxKtor_httpHeaderValueWithParameters : ComponentboxBase -- (instancetype)initWithContent:(NSString *)content parameters:(NSArray *)parameters __attribute__((swift_name("init(content:parameters:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_httpHeaderValueWithParametersCompanion *companion __attribute__((swift_name("companion"))); -- (NSString * _Nullable)parameterName:(NSString *)name __attribute__((swift_name("parameter(name:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *content __attribute__((swift_name("content"))); -@property (readonly) NSArray *parameters __attribute__((swift_name("parameters"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpContentType"))) -@interface ComponentboxKtor_httpContentType : ComponentboxKtor_httpHeaderValueWithParameters -- (instancetype)initWithContentType:(NSString *)contentType contentSubtype:(NSString *)contentSubtype parameters:(NSArray *)parameters __attribute__((swift_name("init(contentType:contentSubtype:parameters:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithContent:(NSString *)content parameters:(NSArray *)parameters __attribute__((swift_name("init(content:parameters:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_httpContentTypeCompanion *companion __attribute__((swift_name("companion"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (BOOL)matchPattern:(ComponentboxKtor_httpContentType *)pattern __attribute__((swift_name("match(pattern:)"))); -- (BOOL)matchPattern_:(NSString *)pattern __attribute__((swift_name("match(pattern_:)"))); -- (ComponentboxKtor_httpContentType *)withParameterName:(NSString *)name value:(NSString *)value __attribute__((swift_name("withParameter(name:value:)"))); -- (ComponentboxKtor_httpContentType *)withoutParameters __attribute__((swift_name("withoutParameters()"))); -@property (readonly) NSString *contentSubtype __attribute__((swift_name("contentSubtype"))); -@property (readonly) NSString *contentType __attribute__((swift_name("contentType"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreChildHandle"))) -@protocol ComponentboxKotlinx_coroutines_coreChildHandle -@required -- (BOOL)childCancelledCause:(ComponentboxKotlinThrowable *)cause __attribute__((swift_name("childCancelled(cause:)"))); -@property (readonly) id _Nullable parent __attribute__((swift_name("parent"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreChildJob"))) -@protocol ComponentboxKotlinx_coroutines_coreChildJob -@required -- (void)parentCancelledParentJob:(id)parentJob __attribute__((swift_name("parentCancelled(parentJob:)"))); -@end; - -__attribute__((swift_name("KotlinSequence"))) -@protocol ComponentboxKotlinSequence -@required -- (id)iterator __attribute__((swift_name("iterator()"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreSelectClause0"))) -@protocol ComponentboxKotlinx_coroutines_coreSelectClause0 -@required -- (void)registerSelectClause0Select:(id)select block:(id)block __attribute__((swift_name("registerSelectClause0(select:block:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHttpStatusCode.Companion"))) -@interface ComponentboxKtor_httpHttpStatusCodeCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpHttpStatusCodeCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKtor_httpHttpStatusCode *)fromValueValue:(int32_t)value __attribute__((swift_name("fromValue(value:)"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Accepted __attribute__((swift_name("Accepted"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *BadGateway __attribute__((swift_name("BadGateway"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *BadRequest __attribute__((swift_name("BadRequest"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Conflict __attribute__((swift_name("Conflict"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Continue __attribute__((swift_name("Continue"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Created __attribute__((swift_name("Created"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *ExpectationFailed __attribute__((swift_name("ExpectationFailed"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *FailedDependency __attribute__((swift_name("FailedDependency"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Forbidden __attribute__((swift_name("Forbidden"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Found __attribute__((swift_name("Found"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *GatewayTimeout __attribute__((swift_name("GatewayTimeout"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Gone __attribute__((swift_name("Gone"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *InsufficientStorage __attribute__((swift_name("InsufficientStorage"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *InternalServerError __attribute__((swift_name("InternalServerError"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *LengthRequired __attribute__((swift_name("LengthRequired"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Locked __attribute__((swift_name("Locked"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *MethodNotAllowed __attribute__((swift_name("MethodNotAllowed"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *MovedPermanently __attribute__((swift_name("MovedPermanently"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *MultiStatus __attribute__((swift_name("MultiStatus"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *MultipleChoices __attribute__((swift_name("MultipleChoices"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *NoContent __attribute__((swift_name("NoContent"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *NonAuthoritativeInformation __attribute__((swift_name("NonAuthoritativeInformation"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *NotAcceptable __attribute__((swift_name("NotAcceptable"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *NotFound __attribute__((swift_name("NotFound"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *NotImplemented __attribute__((swift_name("NotImplemented"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *NotModified __attribute__((swift_name("NotModified"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *OK __attribute__((swift_name("OK"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *PartialContent __attribute__((swift_name("PartialContent"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *PayloadTooLarge __attribute__((swift_name("PayloadTooLarge"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *PaymentRequired __attribute__((swift_name("PaymentRequired"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *PermanentRedirect __attribute__((swift_name("PermanentRedirect"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *PreconditionFailed __attribute__((swift_name("PreconditionFailed"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Processing __attribute__((swift_name("Processing"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *ProxyAuthenticationRequired __attribute__((swift_name("ProxyAuthenticationRequired"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *RequestHeaderFieldTooLarge __attribute__((swift_name("RequestHeaderFieldTooLarge"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *RequestTimeout __attribute__((swift_name("RequestTimeout"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *RequestURITooLong __attribute__((swift_name("RequestURITooLong"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *RequestedRangeNotSatisfiable __attribute__((swift_name("RequestedRangeNotSatisfiable"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *ResetContent __attribute__((swift_name("ResetContent"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *SeeOther __attribute__((swift_name("SeeOther"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *ServiceUnavailable __attribute__((swift_name("ServiceUnavailable"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *SwitchProxy __attribute__((swift_name("SwitchProxy"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *SwitchingProtocols __attribute__((swift_name("SwitchingProtocols"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *TemporaryRedirect __attribute__((swift_name("TemporaryRedirect"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *TooManyRequests __attribute__((swift_name("TooManyRequests"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *Unauthorized __attribute__((swift_name("Unauthorized"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *UnprocessableEntity __attribute__((swift_name("UnprocessableEntity"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *UnsupportedMediaType __attribute__((swift_name("UnsupportedMediaType"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *UpgradeRequired __attribute__((swift_name("UpgradeRequired"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *UseProxy __attribute__((swift_name("UseProxy"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *VariantAlsoNegotiates __attribute__((swift_name("VariantAlsoNegotiates"))); -@property (readonly) ComponentboxKtor_httpHttpStatusCode *VersionNotSupported __attribute__((swift_name("VersionNotSupported"))); -@property (readonly) NSArray *allStatusCodes __attribute__((swift_name("allStatusCodes"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsGMTDate.Companion"))) -@interface ComponentboxKtor_utilsGMTDateCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_utilsGMTDateCompanion *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_utilsGMTDate *START __attribute__((swift_name("START"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsWeekDay"))) -@interface ComponentboxKtor_utilsWeekDay : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_utilsWeekDayCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxKtor_utilsWeekDay *monday __attribute__((swift_name("monday"))); -@property (class, readonly) ComponentboxKtor_utilsWeekDay *tuesday __attribute__((swift_name("tuesday"))); -@property (class, readonly) ComponentboxKtor_utilsWeekDay *wednesday __attribute__((swift_name("wednesday"))); -@property (class, readonly) ComponentboxKtor_utilsWeekDay *thursday __attribute__((swift_name("thursday"))); -@property (class, readonly) ComponentboxKtor_utilsWeekDay *friday __attribute__((swift_name("friday"))); -@property (class, readonly) ComponentboxKtor_utilsWeekDay *saturday __attribute__((swift_name("saturday"))); -@property (class, readonly) ComponentboxKtor_utilsWeekDay *sunday __attribute__((swift_name("sunday"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@property (readonly) NSString *value __attribute__((swift_name("value"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsMonth"))) -@interface ComponentboxKtor_utilsMonth : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_utilsMonthCompanion *companion __attribute__((swift_name("companion"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *january __attribute__((swift_name("january"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *february __attribute__((swift_name("february"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *march __attribute__((swift_name("march"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *april __attribute__((swift_name("april"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *may __attribute__((swift_name("may"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *june __attribute__((swift_name("june"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *july __attribute__((swift_name("july"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *august __attribute__((swift_name("august"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *september __attribute__((swift_name("september"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *october __attribute__((swift_name("october"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *november __attribute__((swift_name("november"))); -@property (class, readonly) ComponentboxKtor_utilsMonth *december __attribute__((swift_name("december"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@property (readonly) NSString *value __attribute__((swift_name("value"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHttpProtocolVersion.Companion"))) -@interface ComponentboxKtor_httpHttpProtocolVersionCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpHttpProtocolVersionCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKtor_httpHttpProtocolVersion *)fromValueName:(NSString *)name major:(int32_t)major minor:(int32_t)minor __attribute__((swift_name("fromValue(name:major:minor:)"))); -- (ComponentboxKtor_httpHttpProtocolVersion *)parseValue:(id)value __attribute__((swift_name("parse(value:)"))); -@property (readonly) ComponentboxKtor_httpHttpProtocolVersion *HTTP_1_0 __attribute__((swift_name("HTTP_1_0"))); -@property (readonly) ComponentboxKtor_httpHttpProtocolVersion *HTTP_1_1 __attribute__((swift_name("HTTP_1_1"))); -@property (readonly) ComponentboxKtor_httpHttpProtocolVersion *HTTP_2_0 __attribute__((swift_name("HTTP_2_0"))); -@property (readonly) ComponentboxKtor_httpHttpProtocolVersion *QUIC __attribute__((swift_name("QUIC"))); -@property (readonly) ComponentboxKtor_httpHttpProtocolVersion *SPDY_3 __attribute__((swift_name("SPDY_3"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_ioMemory"))) -@interface ComponentboxKtor_ioMemory : ComponentboxBase -- (instancetype)initWithPointer:(void *)pointer size:(int64_t)size __attribute__((swift_name("init(pointer:size:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_ioMemoryCompanion *companion __attribute__((swift_name("companion"))); -- (void)doCopyToDestination:(ComponentboxKtor_ioMemory *)destination offset:(int32_t)offset length:(int32_t)length destinationOffset:(int32_t)destinationOffset __attribute__((swift_name("doCopyTo(destination:offset:length:destinationOffset:)"))); -- (void)doCopyToDestination:(ComponentboxKtor_ioMemory *)destination offset:(int64_t)offset length:(int64_t)length destinationOffset_:(int64_t)destinationOffset __attribute__((swift_name("doCopyTo(destination:offset:length:destinationOffset_:)"))); -- (int8_t)loadAtIndex:(int32_t)index __attribute__((swift_name("loadAt(index:)"))); -- (int8_t)loadAtIndex_:(int64_t)index __attribute__((swift_name("loadAt(index_:)"))); -- (ComponentboxKtor_ioMemory *)sliceOffset:(int32_t)offset length:(int32_t)length __attribute__((swift_name("slice(offset:length:)"))); -- (ComponentboxKtor_ioMemory *)sliceOffset:(int64_t)offset length_:(int64_t)length __attribute__((swift_name("slice(offset:length_:)"))); -- (void)storeAtIndex:(int32_t)index value:(int8_t)value __attribute__((swift_name("storeAt(index:value:)"))); -- (void)storeAtIndex:(int64_t)index value_:(int8_t)value __attribute__((swift_name("storeAt(index:value_:)"))); -@property (readonly) void *pointer __attribute__((swift_name("pointer"))); -@property (readonly) int64_t size __attribute__((swift_name("size"))); -@property (readonly) int32_t size32 __attribute__((swift_name("size32"))); -@end; - -__attribute__((swift_name("Ktor_ioBuffer"))) -@interface ComponentboxKtor_ioBuffer : ComponentboxBase -- (instancetype)initWithMemory:(ComponentboxKtor_ioMemory *)memory __attribute__((swift_name("init(memory:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_ioBufferCompanion *companion __attribute__((swift_name("companion"))); -- (void)commitWrittenCount:(int32_t)count __attribute__((swift_name("commitWritten(count:)"))); -- (void)discardExactCount:(int32_t)count __attribute__((swift_name("discardExact(count:)"))); -- (ComponentboxKtor_ioBuffer *)duplicate __attribute__((swift_name("duplicate()"))); -- (void)duplicateToCopy:(ComponentboxKtor_ioBuffer *)copy __attribute__((swift_name("duplicateTo(copy:)"))); -- (int8_t)readByte __attribute__((swift_name("readByte()"))); -- (void)reserveEndGapEndGap:(int32_t)endGap __attribute__((swift_name("reserveEndGap(endGap:)"))); -- (void)reserveStartGapStartGap:(int32_t)startGap __attribute__((swift_name("reserveStartGap(startGap:)"))); -- (void)reset __attribute__((swift_name("reset()"))); -- (void)resetForRead __attribute__((swift_name("resetForRead()"))); -- (void)resetForWrite __attribute__((swift_name("resetForWrite()"))); -- (void)resetForWriteLimit:(int32_t)limit __attribute__((swift_name("resetForWrite(limit:)"))); -- (void)rewindCount:(int32_t)count __attribute__((swift_name("rewind(count:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -- (int32_t)tryPeekByte __attribute__((swift_name("tryPeekByte()"))); -- (int32_t)tryReadByte __attribute__((swift_name("tryReadByte()"))); -- (void)writeByteValue:(int8_t)value __attribute__((swift_name("writeByte(value:)"))); -@property id _Nullable attachment __attribute__((swift_name("attachment"))) __attribute__((unavailable("Will be removed. Inherit Buffer and add required fields instead."))); -@property (readonly) int32_t capacity __attribute__((swift_name("capacity"))); -@property (readonly) int32_t endGap __attribute__((swift_name("endGap"))); -@property (readonly) int32_t limit __attribute__((swift_name("limit"))); -@property (readonly) ComponentboxKtor_ioMemory *memory __attribute__((swift_name("memory"))); -@property (readonly) int32_t readPosition __attribute__((swift_name("readPosition"))); -@property (readonly) int32_t readRemaining __attribute__((swift_name("readRemaining"))); -@property (readonly) int32_t startGap __attribute__((swift_name("startGap"))); -@property (readonly) int32_t writePosition __attribute__((swift_name("writePosition"))); -@property (readonly) int32_t writeRemaining __attribute__((swift_name("writeRemaining"))); -@end; - -__attribute__((swift_name("Ktor_ioChunkBuffer"))) -@interface ComponentboxKtor_ioChunkBuffer : ComponentboxKtor_ioBuffer -- (instancetype)initWithMemory:(ComponentboxKtor_ioMemory *)memory origin:(ComponentboxKtor_ioChunkBuffer * _Nullable)origin parentPool:(id _Nullable)parentPool __attribute__((swift_name("init(memory:origin:parentPool:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithMemory:(ComponentboxKtor_ioMemory *)memory __attribute__((swift_name("init(memory:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_ioChunkBufferCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxKtor_ioChunkBuffer * _Nullable)cleanNext __attribute__((swift_name("cleanNext()"))); -- (ComponentboxKtor_ioChunkBuffer *)duplicate __attribute__((swift_name("duplicate()"))); -- (void)releasePool:(id)pool __attribute__((swift_name("release(pool:)"))); -- (void)reset __attribute__((swift_name("reset()"))); -@property (getter=next_) ComponentboxKtor_ioChunkBuffer * _Nullable next __attribute__((swift_name("next"))); -@property (readonly) ComponentboxKtor_ioChunkBuffer * _Nullable origin __attribute__((swift_name("origin"))); -@property (readonly) int32_t referenceCount __attribute__((swift_name("referenceCount"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinByteArray"))) -@interface ComponentboxKotlinByteArray : ComponentboxBase -+ (instancetype)arrayWithSize:(int32_t)size __attribute__((swift_name("init(size:)"))); -+ (instancetype)arrayWithSize:(int32_t)size init:(ComponentboxByte *(^)(ComponentboxInt *))init __attribute__((swift_name("init(size:init:)"))); -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (int8_t)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (ComponentboxKotlinByteIterator *)iterator __attribute__((swift_name("iterator()"))); -- (void)setIndex:(int32_t)index value:(int8_t)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); -@end; - -__attribute__((swift_name("Ktor_ioInput"))) -@interface ComponentboxKtor_ioInput : ComponentboxBase -- (instancetype)initWithHead:(ComponentboxKtor_ioChunkBuffer *)head remaining:(int64_t)remaining pool:(id)pool __attribute__((swift_name("init(head:remaining:pool:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKtor_ioInputCompanion *companion __attribute__((swift_name("companion"))); -- (BOOL)canRead __attribute__((swift_name("canRead()"))); -- (void)close __attribute__((swift_name("close()"))); -- (void)closeSource __attribute__((swift_name("closeSource()"))); -- (int32_t)discardN:(int32_t)n __attribute__((swift_name("discard(n:)"))); -- (int64_t)discardN_:(int64_t)n __attribute__((swift_name("discard(n_:)"))); -- (void)discardExactN:(int32_t)n __attribute__((swift_name("discardExact(n:)"))); -- (ComponentboxKtor_ioChunkBuffer * _Nullable)fill __attribute__((swift_name("fill()"))); -- (int32_t)fillDestination:(ComponentboxKtor_ioMemory *)destination offset:(int32_t)offset length:(int32_t)length __attribute__((swift_name("fill(destination:offset:length:)"))); -- (BOOL)hasBytesN:(int32_t)n __attribute__((swift_name("hasBytes(n:)"))); -- (void)markNoMoreChunksAvailable __attribute__((swift_name("markNoMoreChunksAvailable()"))); -- (int64_t)peekToDestination:(ComponentboxKtor_ioMemory *)destination destinationOffset:(int64_t)destinationOffset offset:(int64_t)offset min:(int64_t)min max:(int64_t)max __attribute__((swift_name("peekTo(destination:destinationOffset:offset:min:max:)"))); -- (int32_t)peekToBuffer:(ComponentboxKtor_ioChunkBuffer *)buffer __attribute__((swift_name("peekTo(buffer:)"))); -- (int8_t)readByte __attribute__((swift_name("readByte()"))); -- (NSString *)readTextMin:(int32_t)min max:(int32_t)max __attribute__((swift_name("readText(min:max:)"))); -- (int32_t)readTextOut:(id)out min:(int32_t)min max:(int32_t)max __attribute__((swift_name("readText(out:min:max:)"))); -- (NSString *)readTextExactExactCharacters:(int32_t)exactCharacters __attribute__((swift_name("readTextExact(exactCharacters:)"))); -- (void)readTextExactOut:(id)out exactCharacters:(int32_t)exactCharacters __attribute__((swift_name("readTextExact(out:exactCharacters:)"))); -- (void)release_ __attribute__((swift_name("release()"))); -- (int32_t)tryPeek __attribute__((swift_name("tryPeek()"))); -@property (readonly) BOOL endOfInput __attribute__((swift_name("endOfInput"))); -@property (readonly) id pool __attribute__((swift_name("pool"))); -@property (readonly) int64_t remaining __attribute__((swift_name("remaining"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_ioByteReadPacket"))) -@interface ComponentboxKtor_ioByteReadPacket : ComponentboxKtor_ioInput -- (instancetype)initWithHead:(ComponentboxKtor_ioChunkBuffer *)head pool:(id)pool __attribute__((swift_name("init(head:pool:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)initWithHead:(ComponentboxKtor_ioChunkBuffer *)head remaining:(int64_t)remaining pool:(id)pool __attribute__((swift_name("init(head:remaining:pool:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) ComponentboxKtor_ioByteReadPacketCompanion *companion __attribute__((swift_name("companion"))); -- (void)closeSource __attribute__((swift_name("closeSource()"))); -- (ComponentboxKtor_ioByteReadPacket *)doCopy __attribute__((swift_name("doCopy()"))); -- (ComponentboxKtor_ioChunkBuffer * _Nullable)fill __attribute__((swift_name("fill()"))); -- (int32_t)fillDestination:(ComponentboxKtor_ioMemory *)destination offset:(int32_t)offset length:(int32_t)length __attribute__((swift_name("fill(destination:offset:length:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@end; - -__attribute__((swift_name("Ktor_ioReadSession"))) -@protocol ComponentboxKtor_ioReadSession -@required -- (int32_t)discardN:(int32_t)n __attribute__((swift_name("discard(n:)"))); -- (ComponentboxKtor_ioChunkBuffer * _Nullable)requestAtLeast:(int32_t)atLeast __attribute__((swift_name("request(atLeast:)"))); -@property (readonly) int32_t availableForRead __attribute__((swift_name("availableForRead"))); -@end; - -__attribute__((swift_name("KotlinSuspendFunction1"))) -@protocol ComponentboxKotlinSuspendFunction1 -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)invokeP1:(id _Nullable)p1 completionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke(p1:completionHandler:)"))); -@end; - -__attribute__((swift_name("KotlinAppendable"))) -@protocol ComponentboxKotlinAppendable -@required -- (id)appendValue:(unichar)value __attribute__((swift_name("append(value:)"))); -- (id)appendValue_:(id _Nullable)value __attribute__((swift_name("append(value_:)"))); -- (id)appendValue:(id _Nullable)value startIndex:(int32_t)startIndex endIndex:(int32_t)endIndex __attribute__((swift_name("append(value:startIndex:endIndex:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpURLBuilder.Companion"))) -@interface ComponentboxKtor_httpURLBuilderCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpURLBuilderCompanion *shared __attribute__((swift_name("shared"))); -@end; - -__attribute__((swift_name("Ktor_httpParametersBuilder"))) -@protocol ComponentboxKtor_httpParametersBuilder -@required -@end; - -__attribute__((swift_name("KotlinKType"))) -@protocol ComponentboxKotlinKType -@required -@property (readonly) NSArray *arguments __attribute__((swift_name("arguments"))); -@property (readonly) id _Nullable classifier __attribute__((swift_name("classifier"))); -@property (readonly) BOOL isMarkedNullable __attribute__((swift_name("isMarkedNullable"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpURLProtocol.Companion"))) -@interface ComponentboxKtor_httpURLProtocolCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpURLProtocolCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKtor_httpURLProtocol *)createOrDefaultName:(NSString *)name __attribute__((swift_name("createOrDefault(name:)"))); -@property (readonly) ComponentboxKtor_httpURLProtocol *HTTP __attribute__((swift_name("HTTP"))); -@property (readonly) ComponentboxKtor_httpURLProtocol *HTTPS __attribute__((swift_name("HTTPS"))); -@property (readonly) ComponentboxKtor_httpURLProtocol *SOCKS __attribute__((swift_name("SOCKS"))); -@property (readonly) ComponentboxKtor_httpURLProtocol *WS __attribute__((swift_name("WS"))); -@property (readonly) ComponentboxKtor_httpURLProtocol *WSS __attribute__((swift_name("WSS"))); -@property (readonly) NSDictionary *byName __attribute__((swift_name("byName"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHeaderValueParam"))) -@interface ComponentboxKtor_httpHeaderValueParam : ComponentboxBase -- (instancetype)initWithName:(NSString *)name value:(NSString *)value __attribute__((swift_name("init(name:value:)"))) __attribute__((objc_designated_initializer)); -- (NSString *)component1 __attribute__((swift_name("component1()"))); -- (NSString *)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxKtor_httpHeaderValueParam *)doCopyName:(NSString *)name value:(NSString *)value __attribute__((swift_name("doCopy(name:value:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@property (readonly) NSString *value __attribute__((swift_name("value"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpHeaderValueWithParameters.Companion"))) -@interface ComponentboxKtor_httpHeaderValueWithParametersCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpHeaderValueWithParametersCompanion *shared __attribute__((swift_name("shared"))); -- (id _Nullable)parseValue:(NSString *)value init:(id _Nullable (^)(NSString *, NSArray *))init __attribute__((swift_name("parse(value:init:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_httpContentType.Companion"))) -@interface ComponentboxKtor_httpContentTypeCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_httpContentTypeCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKtor_httpContentType *)parseValue:(NSString *)value __attribute__((swift_name("parse(value:)"))); -@property (readonly) ComponentboxKtor_httpContentType *Any __attribute__((swift_name("Any"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreParentJob"))) -@protocol ComponentboxKotlinx_coroutines_coreParentJob -@required -- (ComponentboxKotlinCancellationException *)getChildJobCancellationCause __attribute__((swift_name("getChildJobCancellationCause()"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreSelectInstance"))) -@protocol ComponentboxKotlinx_coroutines_coreSelectInstance -@required -- (void)disposeOnSelectHandle:(id)handle __attribute__((swift_name("disposeOnSelect(handle:)"))); -- (id _Nullable)performAtomicTrySelectDesc:(ComponentboxKotlinx_coroutines_coreAtomicDesc *)desc __attribute__((swift_name("performAtomicTrySelect(desc:)"))); -- (void)resumeSelectWithExceptionException:(ComponentboxKotlinThrowable *)exception __attribute__((swift_name("resumeSelectWithException(exception:)"))); -- (BOOL)trySelect __attribute__((swift_name("trySelect()"))); -- (id _Nullable)trySelectOtherOtherOp:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodePrepareOp * _Nullable)otherOp __attribute__((swift_name("trySelectOther(otherOp:)"))); -@property (readonly) id completion __attribute__((swift_name("completion"))); -@property (readonly) BOOL isSelected __attribute__((swift_name("isSelected"))); -@end; - -__attribute__((swift_name("KotlinSuspendFunction0"))) -@protocol ComponentboxKotlinSuspendFunction0 -@required - -/** - @note This method converts instances of CancellationException to errors. - Other uncaught Kotlin exceptions are fatal. -*/ -- (void)invokeWithCompletionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("invoke(completionHandler:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsWeekDay.Companion"))) -@interface ComponentboxKtor_utilsWeekDayCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_utilsWeekDayCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKtor_utilsWeekDay *)fromOrdinal:(int32_t)ordinal __attribute__((swift_name("from(ordinal:)"))); -- (ComponentboxKtor_utilsWeekDay *)fromValue:(NSString *)value __attribute__((swift_name("from(value:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_utilsMonth.Companion"))) -@interface ComponentboxKtor_utilsMonthCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_utilsMonthCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKtor_utilsMonth *)fromOrdinal:(int32_t)ordinal __attribute__((swift_name("from(ordinal:)"))); -- (ComponentboxKtor_utilsMonth *)fromValue:(NSString *)value __attribute__((swift_name("from(value:)"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_ioMemory.Companion"))) -@interface ComponentboxKtor_ioMemoryCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_ioMemoryCompanion *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_ioMemory *Empty __attribute__((swift_name("Empty"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_ioBuffer.Companion"))) -@interface ComponentboxKtor_ioBufferCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_ioBufferCompanion *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_ioBuffer *Empty __attribute__((swift_name("Empty"))); -@property (readonly) int32_t ReservedSize __attribute__((swift_name("ReservedSize"))); -@end; - -__attribute__((swift_name("Ktor_ioObjectPool"))) -@protocol ComponentboxKtor_ioObjectPool -@required -- (id)borrow __attribute__((swift_name("borrow()"))); -- (void)dispose __attribute__((swift_name("dispose()"))); -- (void)recycleInstance:(id)instance __attribute__((swift_name("recycle(instance:)"))); -@property (readonly) int32_t capacity __attribute__((swift_name("capacity"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_ioChunkBuffer.Companion"))) -@interface ComponentboxKtor_ioChunkBufferCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_ioChunkBufferCompanion *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_ioChunkBuffer *Empty __attribute__((swift_name("Empty"))); -@property (readonly) id EmptyPool __attribute__((swift_name("EmptyPool"))); -@property (readonly) id Pool __attribute__((swift_name("Pool"))); -@end; - -__attribute__((swift_name("KotlinByteIterator"))) -@interface ComponentboxKotlinByteIterator : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (ComponentboxByte *)next __attribute__((swift_name("next()"))); -- (int8_t)nextByte __attribute__((swift_name("nextByte()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_ioInput.Companion"))) -@interface ComponentboxKtor_ioInputCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_ioInputCompanion *shared __attribute__((swift_name("shared"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Ktor_ioByteReadPacket.Companion"))) -@interface ComponentboxKtor_ioByteReadPacketCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKtor_ioByteReadPacketCompanion *shared __attribute__((swift_name("shared"))); -@property (readonly) ComponentboxKtor_ioByteReadPacket *Empty __attribute__((swift_name("Empty"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinKTypeProjection"))) -@interface ComponentboxKotlinKTypeProjection : ComponentboxBase -- (instancetype)initWithVariance:(ComponentboxKotlinKVariance * _Nullable)variance type:(id _Nullable)type __attribute__((swift_name("init(variance:type:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) ComponentboxKotlinKTypeProjectionCompanion *companion __attribute__((swift_name("companion"))); -- (ComponentboxKotlinKVariance * _Nullable)component1 __attribute__((swift_name("component1()"))); -- (id _Nullable)component2 __attribute__((swift_name("component2()"))); -- (ComponentboxKotlinKTypeProjection *)doCopyVariance:(ComponentboxKotlinKVariance * _Nullable)variance type:(id _Nullable)type __attribute__((swift_name("doCopy(variance:type:)"))); -- (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id _Nullable type __attribute__((swift_name("type"))); -@property (readonly) ComponentboxKotlinKVariance * _Nullable variance __attribute__((swift_name("variance"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreAtomicDesc"))) -@interface ComponentboxKotlinx_coroutines_coreAtomicDesc : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)completeOp:(ComponentboxKotlinx_coroutines_coreAtomicOp *)op failure:(id _Nullable)failure __attribute__((swift_name("complete(op:failure:)"))); -- (id _Nullable)prepareOp:(ComponentboxKotlinx_coroutines_coreAtomicOp *)op __attribute__((swift_name("prepare(op:)"))); -@property ComponentboxKotlinx_coroutines_coreAtomicOp *atomicOp __attribute__((swift_name("atomicOp"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreOpDescriptor"))) -@interface ComponentboxKotlinx_coroutines_coreOpDescriptor : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (BOOL)isEarlierThanThat:(ComponentboxKotlinx_coroutines_coreOpDescriptor *)that __attribute__((swift_name("isEarlierThan(that:)"))); -- (id _Nullable)performAffected:(id _Nullable)affected __attribute__((swift_name("perform(affected:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreAtomicOp * _Nullable atomicOp __attribute__((swift_name("atomicOp"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("Kotlinx_coroutines_coreLockFreeLinkedListNode.PrepareOp"))) -@interface ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodePrepareOp : ComponentboxKotlinx_coroutines_coreOpDescriptor -- (instancetype)initWithAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)next desc:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAbstractAtomicDesc *)desc __attribute__((swift_name("init(affected:next:desc:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -- (void)finishPrepare __attribute__((swift_name("finishPrepare()"))); -- (id _Nullable)performAffected:(id _Nullable)affected __attribute__((swift_name("perform(affected:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *affected __attribute__((swift_name("affected"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreAtomicOp *atomicOp __attribute__((swift_name("atomicOp"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAbstractAtomicDesc *desc __attribute__((swift_name("desc"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *next __attribute__((swift_name("next"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinKVariance"))) -@interface ComponentboxKotlinKVariance : ComponentboxKotlinEnum -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) ComponentboxKotlinKVariance *invariant __attribute__((swift_name("invariant"))); -@property (class, readonly) ComponentboxKotlinKVariance *in __attribute__((swift_name("in"))); -@property (class, readonly) ComponentboxKotlinKVariance *out __attribute__((swift_name("out"))); -+ (ComponentboxKotlinArray *)values __attribute__((swift_name("values()"))); -@end; - -__attribute__((objc_subclassing_restricted)) -__attribute__((swift_name("KotlinKTypeProjection.Companion"))) -@interface ComponentboxKotlinKTypeProjectionCompanion : ComponentboxBase -+ (instancetype)alloc __attribute__((unavailable)); -+ (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -+ (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ComponentboxKotlinKTypeProjectionCompanion *shared __attribute__((swift_name("shared"))); -- (ComponentboxKotlinKTypeProjection *)contravariantType:(id)type __attribute__((swift_name("contravariant(type:)"))); -- (ComponentboxKotlinKTypeProjection *)covariantType:(id)type __attribute__((swift_name("covariant(type:)"))); -- (ComponentboxKotlinKTypeProjection *)invariantType:(id)type __attribute__((swift_name("invariant(type:)"))); -@property (readonly) ComponentboxKotlinKTypeProjection *STAR __attribute__((swift_name("STAR"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreAtomicOp"))) -@interface ComponentboxKotlinx_coroutines_coreAtomicOp<__contravariant T> : ComponentboxKotlinx_coroutines_coreOpDescriptor -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)completeAffected:(T _Nullable)affected failure:(id _Nullable)failure __attribute__((swift_name("complete(affected:failure:)"))); -- (id _Nullable)decideDecision:(id _Nullable)decision __attribute__((swift_name("decide(decision:)"))); -- (id _Nullable)performAffected:(id _Nullable)affected __attribute__((swift_name("perform(affected:)"))); -- (id _Nullable)prepareAffected:(T _Nullable)affected __attribute__((swift_name("prepare(affected:)"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreAtomicOp *atomicOp __attribute__((swift_name("atomicOp"))); -@property (readonly) id _Nullable consensus __attribute__((swift_name("consensus"))); -@property (readonly) BOOL isDecided __attribute__((swift_name("isDecided"))); -@property (readonly) int64_t opSequence __attribute__((swift_name("opSequence"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreLockFreeLinkedListNode"))) -@interface ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode : ComponentboxBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)addLastNode:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)node __attribute__((swift_name("addLast(node:)"))); -- (BOOL)addLastIfNode:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)node condition:(ComponentboxBoolean *(^)(void))condition __attribute__((swift_name("addLastIf(node:condition:)"))); -- (BOOL)addLastIfPrevNode:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)node predicate:(ComponentboxBoolean *(^)(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *))predicate __attribute__((swift_name("addLastIfPrev(node:predicate:)"))); -- (BOOL)addLastIfPrevAndIfNode:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)node predicate:(ComponentboxBoolean *(^)(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *))predicate condition:(ComponentboxBoolean *(^)(void))condition __attribute__((swift_name("addLastIfPrevAndIf(node:predicate:condition:)"))); -- (BOOL)addOneIfEmptyNode:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)node __attribute__((swift_name("addOneIfEmpty(node:)"))); -- (ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAddLastDesc *)describeAddLastNode:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)node __attribute__((swift_name("describeAddLast(node:)"))); -- (ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeRemoveFirstDesc *)describeRemoveFirst __attribute__((swift_name("describeRemoveFirst()"))); -- (void)helpRemove __attribute__((swift_name("helpRemove()"))); -- (ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable)nextIfRemoved __attribute__((swift_name("nextIfRemoved()"))); -- (BOOL)remove __attribute__((swift_name("remove()"))); -- (id _Nullable)removeFirstIfIsInstanceOfOrPeekIfPredicate:(ComponentboxBoolean *(^)(id _Nullable))predicate __attribute__((swift_name("removeFirstIfIsInstanceOfOrPeekIf(predicate:)"))); -- (ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable)removeFirstOrNull __attribute__((swift_name("removeFirstOrNull()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) BOOL isRemoved __attribute__((swift_name("isRemoved"))); -@property (readonly, getter=next_) id _Nullable next __attribute__((swift_name("next"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *nextNode __attribute__((swift_name("nextNode"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *prevNode __attribute__((swift_name("prevNode"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreLockFreeLinkedListNode.AbstractAtomicDesc"))) -@interface ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAbstractAtomicDesc : ComponentboxKotlinx_coroutines_coreAtomicDesc -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); -+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)completeOp:(ComponentboxKotlinx_coroutines_coreAtomicOp *)op failure:(id _Nullable)failure __attribute__((swift_name("complete(op:failure:)"))); -- (id _Nullable)failureAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable)affected __attribute__((swift_name("failure(affected:)"))); -- (void)finishOnSuccessAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)next __attribute__((swift_name("finishOnSuccess(affected:next:)"))); -- (void)finishPreparePrepareOp:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodePrepareOp *)prepareOp __attribute__((swift_name("finishPrepare(prepareOp:)"))); -- (id _Nullable)onPreparePrepareOp:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodePrepareOp *)prepareOp __attribute__((swift_name("onPrepare(prepareOp:)"))); -- (void)onRemovedAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected __attribute__((swift_name("onRemoved(affected:)"))); -- (id _Nullable)prepareOp:(ComponentboxKotlinx_coroutines_coreAtomicOp *)op __attribute__((swift_name("prepare(op:)"))); -- (BOOL)retryAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(id)next __attribute__((swift_name("retry(affected:next:)"))); -- (ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable)takeAffectedNodeOp:(ComponentboxKotlinx_coroutines_coreOpDescriptor *)op __attribute__((swift_name("takeAffectedNode(op:)"))); -- (id)updatedNextAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)next __attribute__((swift_name("updatedNext(affected:next:)"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable affectedNode __attribute__((swift_name("affectedNode"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable originalNext __attribute__((swift_name("originalNext"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreLockFreeLinkedListNodeAddLastDesc"))) -@interface ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAddLastDesc : ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAbstractAtomicDesc -- (instancetype)initWithQueue:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)queue node:(T)node __attribute__((swift_name("init(queue:node:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -- (void)finishOnSuccessAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)next __attribute__((swift_name("finishOnSuccess(affected:next:)"))); -- (void)finishPreparePrepareOp:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodePrepareOp *)prepareOp __attribute__((swift_name("finishPrepare(prepareOp:)"))); -- (BOOL)retryAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(id)next __attribute__((swift_name("retry(affected:next:)"))); -- (ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable)takeAffectedNodeOp:(ComponentboxKotlinx_coroutines_coreOpDescriptor *)op __attribute__((swift_name("takeAffectedNode(op:)"))); -- (id)updatedNextAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)next __attribute__((swift_name("updatedNext(affected:next:)"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable affectedNode __attribute__((swift_name("affectedNode"))); -@property (readonly) T node __attribute__((swift_name("node"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *originalNext __attribute__((swift_name("originalNext"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *queue __attribute__((swift_name("queue"))); -@end; - -__attribute__((swift_name("Kotlinx_coroutines_coreLockFreeLinkedListNodeRemoveFirstDesc"))) -@interface ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeRemoveFirstDesc : ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodeAbstractAtomicDesc -- (instancetype)initWithQueue:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)queue __attribute__((swift_name("init(queue:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -+ (instancetype)new __attribute__((unavailable)); -- (id _Nullable)failureAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable)affected __attribute__((swift_name("failure(affected:)"))); -- (void)finishOnSuccessAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)next __attribute__((swift_name("finishOnSuccess(affected:next:)"))); -- (void)finishPreparePrepareOp:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNodePrepareOp *)prepareOp __attribute__((swift_name("finishPrepare(prepareOp:)"))); -- (BOOL)retryAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(id)next __attribute__((swift_name("retry(affected:next:)"))); -- (ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable)takeAffectedNodeOp:(ComponentboxKotlinx_coroutines_coreOpDescriptor *)op __attribute__((swift_name("takeAffectedNode(op:)"))); -- (id)updatedNextAffected:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)affected next:(ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *)next __attribute__((swift_name("updatedNext(affected:next:)"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable affectedNode __attribute__((swift_name("affectedNode"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode * _Nullable originalNext __attribute__((swift_name("originalNext"))); -@property (readonly) ComponentboxKotlinx_coroutines_coreLockFreeLinkedListNode *queue __attribute__((swift_name("queue"))); -@property (readonly) T _Nullable result __attribute__((swift_name("result"))); -@end; - -#pragma pop_macro("_Nullable_result") -#pragma clang diagnostic pop -NS_ASSUME_NONNULL_END diff --git a/componentbox/package/ComponentBox.xcframework/ios-x86_64-simulator/componentbox.framework/Info.plist b/componentbox/package/ComponentBox.xcframework/ios-x86_64-simulator/componentbox.framework/Info.plist deleted file mode 100644 index 3f95e7da..00000000 --- a/componentbox/package/ComponentBox.xcframework/ios-x86_64-simulator/componentbox.framework/Info.plist +++ /dev/null @@ -1,31 +0,0 @@ - - - - - CFBundleExecutable - componentbox - CFBundleIdentifier - com.dropbox.componentbox.componentbox - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - componentbox - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSupportedPlatforms - - iPhoneSimulator - - CFBundleVersion - 1 - MinimumOSVersion - 9.0 - UIDeviceFamily - - 1 - 2 - - - \ No newline at end of file diff --git a/componentbox/package/ComponentBox.xcframework/ios-x86_64-simulator/componentbox.framework/Modules/module.modulemap b/componentbox/package/ComponentBox.xcframework/ios-x86_64-simulator/componentbox.framework/Modules/module.modulemap deleted file mode 100644 index ca14082c..00000000 --- a/componentbox/package/ComponentBox.xcframework/ios-x86_64-simulator/componentbox.framework/Modules/module.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module componentbox { - umbrella header "componentbox.h" - - export * - module * { export * } -} \ No newline at end of file diff --git a/componentbox/package/ComponentBox.xcframework/ios-x86_64-simulator/componentbox.framework/componentbox b/componentbox/package/ComponentBox.xcframework/ios-x86_64-simulator/componentbox.framework/componentbox deleted file mode 100644 index 85edf4ed..00000000 Binary files a/componentbox/package/ComponentBox.xcframework/ios-x86_64-simulator/componentbox.framework/componentbox and /dev/null differ diff --git a/componentbox/package/Package.swift b/componentbox/package/Package.swift deleted file mode 100644 index 6382905f..00000000 --- a/componentbox/package/Package.swift +++ /dev/null @@ -1,21 +0,0 @@ -// swift-tools-version:5.3 -import PackageDescription - -let package = Package( - name: "ComponentBox", - platforms: [ - .iOS(.v14) - ], - products: [ - .library( - name: "ComponentBox", - targets: ["ComponentBox"] - ), - ], - targets: [ - .binaryTarget( - name: "ComponentBox", - path: "./ComponentBox.xcframework" - ), - ] -) diff --git a/componentbox/src/androidMain/AndroidManifest.xml b/componentbox/src/androidMain/AndroidManifest.xml new file mode 100644 index 00000000..b5a27d55 --- /dev/null +++ b/componentbox/src/androidMain/AndroidManifest.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/Icons.kt b/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/Icons.kt deleted file mode 100644 index 032c8006..00000000 --- a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/Icons.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface Icons { - actual fun list(): MutableList -} \ No newline at end of file diff --git a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/Image.kt b/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/Image.kt deleted file mode 100644 index 8cf04b11..00000000 --- a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/Image.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface Image : DrawableRes - -data class RealImage( - override val name: String, - override val resId: Int -) : Image \ No newline at end of file diff --git a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/Inflater.kt b/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/Inflater.kt deleted file mode 100644 index 1a2bc406..00000000 --- a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/Inflater.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.dropbox.componentbox.foundation - -import androidx.compose.runtime.Composable - -actual interface Inflater { - @Composable - fun Inflate(component: Component) - - @Composable - fun bottomTabs(): List -} \ No newline at end of file diff --git a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/IsPassable.kt b/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/IsPassable.kt deleted file mode 100644 index 9aa495a7..00000000 --- a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/IsPassable.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual typealias IsPassable = kotlinx.android.parcel.Parcelize diff --git a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/Passable.kt b/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/Passable.kt deleted file mode 100644 index ec512a38..00000000 --- a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/Passable.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual typealias Passable = android.os.Parcelable \ No newline at end of file diff --git a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/ResourceProvider.kt b/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/ResourceProvider.kt deleted file mode 100644 index d75f6996..00000000 --- a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/ResourceProvider.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.dropbox.componentbox.foundation - -import androidx.compose.runtime.Composable - -interface ResourceProvider { - @Composable - fun icons(): Icons - - @Composable - fun images(): Images - - @Composable - fun typography(): Typography - - @Composable - fun colors(): Colors -} \ No newline at end of file diff --git a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/TextStyle.kt b/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/TextStyle.kt deleted file mode 100644 index fd879efb..00000000 --- a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/TextStyle.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.dropbox.componentbox.foundation - -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.TextUnit - -actual interface TextStyle { - val name: String - val fontFamily: FontFamily - val fontWeight: FontWeight - val fontSize: TextUnit -} - -data class RealTextStyle( - override val name: String, - override val fontFamily: FontFamily, - override val fontWeight: FontWeight, - override val fontSize: TextUnit -) : TextStyle \ No newline at end of file diff --git a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/Themer.kt b/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/Themer.kt deleted file mode 100644 index a4289f4a..00000000 --- a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/Themer.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.dropbox.componentbox.foundation - -import androidx.annotation.DrawableRes -import androidx.compose.runtime.Composable -import androidx.compose.ui.text.TextStyle - -actual abstract class Themer { - @Composable - abstract fun Theme(isNightMode: Boolean, content: @Composable () -> Unit) - - @Composable - @DrawableRes - abstract fun getDrawableResId(name: String?): Int? - - @Composable - abstract fun getTextStyle(name: String?): TextStyle? -} \ No newline at end of file diff --git a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/res.kt b/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/res.kt deleted file mode 100644 index a2acc556..00000000 --- a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/foundation/res.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface MultiplatformRes { - val name: String - val resId: Int -} - -actual interface DrawableRes : MultiplatformRes - -data class RealMultiplatformRes( - override val name: String, - override val resId: Int -) : MultiplatformRes - -data class RealDrawableRes( - override val name: String, - override val resId: Int -) : DrawableRes - -actual interface StringRes { - val resId: Int -} - -data class RealStringRes( - override val resId: Int -) : StringRes - -actual interface VectorRes : MultiplatformRes - -data class RealVectorRes( - override val name: String, - override val resId: Int -) : VectorRes \ No newline at end of file diff --git a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/presentation/ComponentBoxPresenter.kt b/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/presentation/ComponentBoxPresenter.kt deleted file mode 100644 index 2600c4e1..00000000 --- a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/presentation/ComponentBoxPresenter.kt +++ /dev/null @@ -1,82 +0,0 @@ -@file:Suppress("UNCHECKED_CAST") - -package com.dropbox.componentbox.presentation - -import com.airbnb.mvrx.MavericksViewModel -import com.dropbox.componentbox.foundation.ComponentBox -import com.dropbox.componentbox.foundation.ComponentBoxType -import com.dropbox.componentbox.zipline.ComponentBoxZipline -import kotlinx.coroutines.flow.MutableStateFlow - -abstract class ComponentBoxPresenter>( - initialState: S, - viewModel: V, - val zipline: ComponentBoxZipline, - type: ComponentBoxType, - componentBoxUrl: String -) : MavericksViewModel(initialState) { - val models = MutableStateFlow(viewModel) - - init { - when (type) { - ComponentBoxType.Screen -> zipline.produceModelsIn( - componentBoxUrl, - viewModelScope, - models as MutableStateFlow> - ) - ComponentBoxType.Modal -> zipline.produceModelsIn( - componentBoxUrl, - viewModelScope, - models as MutableStateFlow> - ) - ComponentBoxType.Banner -> zipline.produceModelsIn( - componentBoxUrl, - viewModelScope, - models as MutableStateFlow> - ) - } - } - - inline fun load(componentBoxUrl: String) { - if (isLoading()) return - - when (C::class) { - ComponentBox.Banner::class -> zipline.produceModelsIn( - componentBoxUrl, - viewModelScope, - models as MutableStateFlow> - ) - ComponentBox.Modal::class -> zipline.produceModelsIn( - componentBoxUrl, - viewModelScope, - models as MutableStateFlow> - ) - ComponentBox.Screen::class -> zipline.produceModelsIn( - componentBoxUrl, - viewModelScope, - models as MutableStateFlow> - ) - } - - setState(RealComponentBoxState(ComponentBoxViewState.Loading)) - } - - fun setState(nextState: ComponentBoxState) { - setState { - nextState as S - } - } - - fun isLoading(): Boolean { - var isLoading = true - withState { state -> - isLoading = state.viewState is ComponentBoxViewState.Loading - } - return isLoading - } - - private fun MutableStateFlow.isInitialized() = this.value.root != null -} - - - diff --git a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/presentation/ComponentBoxState.kt b/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/presentation/ComponentBoxState.kt deleted file mode 100644 index c69dccc6..00000000 --- a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/presentation/ComponentBoxState.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.dropbox.componentbox.presentation - -import com.airbnb.mvrx.MavericksState - -interface ComponentBoxState : MavericksState { - val viewState: ComponentBoxViewState -} - -data class RealComponentBoxState( - override val viewState: ComponentBoxViewState -) : ComponentBoxState \ No newline at end of file diff --git a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/presentation/ComponentBoxViewState.kt b/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/presentation/ComponentBoxViewState.kt deleted file mode 100644 index bcc9f777..00000000 --- a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/presentation/ComponentBoxViewState.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.dropbox.componentbox.presentation - -sealed class ComponentBoxViewState { - object Initialized: ComponentBoxViewState() - object Loading : ComponentBoxViewState() - object Failure : ComponentBoxViewState() - object Success: ComponentBoxViewState() -} \ No newline at end of file diff --git a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/zipline/ComponentBoxZipline.kt b/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/zipline/ComponentBoxZipline.kt deleted file mode 100644 index 6ce5d558..00000000 --- a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/zipline/ComponentBoxZipline.kt +++ /dev/null @@ -1,77 +0,0 @@ -@file:Suppress("UNCHECKED_CAST") - -package com.dropbox.componentbox.zipline - -import app.cash.zipline.Zipline -import com.dropbox.componentbox.foundation.COMPONENT_BOX_ZIPLINE_SERVICE -import com.dropbox.componentbox.foundation.ComponentBox -import com.dropbox.componentbox.foundation.ComponentBoxType -import com.dropbox.componentbox.presentation.ComponentBoxViewModel -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.asCoroutineDispatcher -import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.MutableStateFlow -import kotlinx.coroutines.flow.emitAll -import kotlinx.coroutines.launch -import okhttp3.OkHttpClient -import java.util.concurrent.Executors -import kotlin.coroutines.EmptyCoroutineContext - -class ComponentBoxZipline( - val ziplineUrl: String, - val script: String, - val headers: Map = mapOf(), -) { - val executorService = Executors.newSingleThreadExecutor { Thread(it, "Zipline") } - val dispatcher = executorService.asCoroutineDispatcher() - val zipline = Zipline.create(dispatcher) - val client = OkHttpClient() - val hostApi = RealHostApi(client) - - inline fun produceModelsIn( - componentBoxUrl: String, - coroutineScope: CoroutineScope, - modelsStateFlow: MutableStateFlow> - ) { - val job = coroutineScope.launch(dispatcher) { - val componentBoxJs = hostApi.httpCall(ziplineUrl, mapOf()) - zipline.loadJsModule(componentBoxJs, MODULE_NAME) - zipline.bind("hostApi", hostApi) - zipline.quickJs.evaluate(script) - - val presenter: ComponentBoxZiplineService = zipline.take(COMPONENT_BOX_ZIPLINE_SERVICE) - - val modelsFlow: Flow>? = when (C::class) { - ComponentBox.Banner::class -> presenter.produceModelsInBanner( - ComponentBoxType.Banner, - componentBoxUrl, - headers - ) as Flow> - ComponentBox.Modal::class -> presenter.produceModelsInModal( - ComponentBoxType.Modal, - componentBoxUrl, - headers - ) as Flow> - ComponentBox.Screen::class -> presenter.produceModelsInScreen( - ComponentBoxType.Screen, - componentBoxUrl, - headers - ) as Flow> - else -> null - } - - if (modelsFlow != null) { - modelsStateFlow.emitAll(modelsFlow) - } - } - - job.invokeOnCompletion { - dispatcher.dispatch(EmptyCoroutineContext) { zipline.close() } - executorService.shutdown() - } - } - - companion object { - const val MODULE_NAME = "zipline" - } -} \ No newline at end of file diff --git a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/zipline/RealHostApi.kt b/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/zipline/RealHostApi.kt deleted file mode 100644 index 0681f155..00000000 --- a/componentbox/src/androidMain/kotlin/com/dropbox/componentbox/zipline/RealHostApi.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.dropbox.componentbox.zipline - -import kotlinx.coroutines.suspendCancellableCoroutine -import okhttp3.* -import okhttp3.Headers.Companion.toHeaders -import java.io.IOException - -class RealHostApi( - private val client: OkHttpClient -) : HostApi { - override suspend fun httpCall(url: String, headers: Map): String { - return suspendCancellableCoroutine { continuation -> - val call = client.newCall( - Request.Builder() - .url(url) - .headers(headers.toHeaders()) - .build() - ) - call.enqueue(object : Callback { - override fun onFailure(call: Call, e: IOException) { - continuation.resumeWith(Result.failure(e)) - } - - override fun onResponse(call: Call, response: Response) { - val responseString = response.body!!.string() - continuation.resumeWith(Result.success(responseString)) - } - }) - } - } -} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/ComponentBox.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/ComponentBox.kt new file mode 100644 index 00000000..c0e856b0 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/ComponentBox.kt @@ -0,0 +1,12 @@ +package com.dropbox.componentbox + +import com.dropbox.componentbox.component.Component +import com.dropbox.componentbox.impl.ComponentBoxComponentBox + +interface ComponentBox { + val root: Component.Box + + companion object { + fun of(root: Component.Box): ComponentBox = ComponentBoxComponentBox(root) + } +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/ComponentBoxClient.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/ComponentBoxClient.kt deleted file mode 100644 index 5fc43ed4..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/ComponentBoxClient.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.dropbox.componentbox - -import com.dropbox.componentbox.foundation.ComponentBox -import io.ktor.client.HttpClient -import io.ktor.client.call.body -import io.ktor.client.plugins.ContentNegotiation -import io.ktor.client.plugins.logging.DEFAULT -import io.ktor.client.plugins.logging.LogLevel -import io.ktor.client.plugins.logging.Logger -import io.ktor.client.plugins.logging.Logging -import io.ktor.client.request.get -import io.ktor.serialization.kotlinx.json.json -import kotlinx.serialization.json.Json -import kotlin.native.concurrent.ThreadLocal - -@ThreadLocal -public object ComponentBoxClient { - private val safeJson = Json { isLenient = true; ignoreUnknownKeys = true } - - val client: HttpClient = HttpClient { - install(ContentNegotiation) { - json(safeJson) - } - - install(Logging) { - logger = Logger.DEFAULT - level = LogLevel.ALL - } - } - - suspend fun fetchScreen(url: String): ComponentBox.Screen = client.get(url).body() - - suspend inline fun fetchComponentBox(url: String): C = client.get(url).body() -} - -fun T.freeze(): T = this.freeze() \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Asset.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Asset.kt new file mode 100644 index 00000000..45702176 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Asset.kt @@ -0,0 +1,3 @@ +package com.dropbox.componentbox.component + +sealed interface Asset : Component \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Button.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Button.kt new file mode 100644 index 00000000..a37c28ce --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Button.kt @@ -0,0 +1,6 @@ +package com.dropbox.componentbox.component + +sealed interface Button : Component { + var components: MutableList? + var disabled: Boolean? +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Column.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Column.kt new file mode 100644 index 00000000..aeea664f --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Column.kt @@ -0,0 +1,28 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Arrangement +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.impl.ComponentBoxColumn + +interface Column : Component.Box { + var verticalArrangement: Arrangement.Vertical? + var horizontalAlignment: Alignment.Horizontal? + + companion object { + fun of( + modifier: Modifier? = null, + actions: Actions? = null, + components: MutableList? = null, + verticalArrangement: Arrangement.Vertical? = null, + horizontalAlignment: Alignment.Horizontal? = null + ): Column = ComponentBoxColumn( + modifier = modifier, + actions = actions, + components = components, + verticalArrangement = verticalArrangement, + horizontalAlignment = horizontalAlignment + ) + } +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Component.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Component.kt new file mode 100644 index 00000000..b3f27aa8 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Component.kt @@ -0,0 +1,13 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Modifier + +sealed interface Component { + var modifier: Modifier? + var actions: Actions? + + sealed interface Box : Component { + val components: MutableList? + } +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/ContainedButton.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/ContainedButton.kt new file mode 100644 index 00000000..9e71849c --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/ContainedButton.kt @@ -0,0 +1,21 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.impl.ComponentBoxContainedButton + +interface ContainedButton : Button { + companion object { + fun of( + components: MutableList? = null, + disabled: Boolean? = false, + modifier: Modifier? = null, + actions: Actions? = null + ): ContainedButton = ComponentBoxContainedButton( + components = components, + disabled = disabled, + modifier = modifier, + actions = actions + ) + } +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/ContentScale.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/ContentScale.kt new file mode 100644 index 00000000..30b51dd2 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/ContentScale.kt @@ -0,0 +1,3 @@ +package com.dropbox.componentbox.component + +interface ContentScale \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Icon.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Icon.kt new file mode 100644 index 00000000..f3848dfd --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Icon.kt @@ -0,0 +1,22 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Color +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.impl.ComponentBoxIcon + +interface Icon : Asset { + var id: Id + var color: Color? + val contentDescription: String? + + companion object { + fun of( + id: Id, + modifier: Modifier? = null, + actions: Actions? = null, + color: Color? = null, + contentDescription: String? = null + ): Icon = ComponentBoxIcon(id, modifier, actions, color, contentDescription) + } +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Image.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Image.kt new file mode 100644 index 00000000..42ab237e --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Image.kt @@ -0,0 +1,9 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.Alignment + +sealed interface Image : Asset { + val contentDescription: String? + var alignment: Alignment? + var contentScale: ContentScale? +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/LazyColumn.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/LazyColumn.kt new file mode 100644 index 00000000..9b425340 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/LazyColumn.kt @@ -0,0 +1,25 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Arrangement +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.impl.ComponentBoxLazyColumn + +interface LazyColumn : Column { + companion object { + fun of( + modifier: Modifier? = null, + actions: Actions? = null, + components: MutableList? = null, + verticalArrangement: Arrangement.Vertical? = null, + horizontalAlignment: Alignment.Horizontal? = null + ): LazyColumn = ComponentBoxLazyColumn( + modifier = modifier, + actions = actions, + components = components, + verticalArrangement = verticalArrangement, + horizontalAlignment = horizontalAlignment + ) + } +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/LazyRow.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/LazyRow.kt new file mode 100644 index 00000000..27917b85 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/LazyRow.kt @@ -0,0 +1,26 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Arrangement +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.impl.ComponentBoxLazyRow + +interface LazyRow : Row { + companion object { + fun of( + modifier: Modifier? = null, + actions: Actions? = null, + components: MutableList? = null, + horizontalArrangement: Arrangement.Horizontal? = null, + verticalAlignment: Alignment.Vertical? = null + ): LazyRow = ComponentBoxLazyRow( + modifier = modifier, + actions = actions, + components = components, + horizontalArrangement = horizontalArrangement, + verticalAlignment = verticalAlignment + ) + } + +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/LocalImage.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/LocalImage.kt new file mode 100644 index 00000000..921fbdda --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/LocalImage.kt @@ -0,0 +1,72 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.impl.ComponentBoxDrawable +import com.dropbox.componentbox.impl.ComponentBoxRaw +import com.dropbox.componentbox.impl.ComponentBoxVector + +interface LocalImage : Image { + var id: Id + + interface Drawable : LocalImage { + companion object { + fun of( + id: Id, + modifier: Modifier? = null, + actions: Actions? = null, + contentDescription: String? = null, + alignment: Alignment? = null, + contentScale: ContentScale? = null, + ): Drawable = ComponentBoxDrawable( + id = id, + modifier = modifier, + actions = actions, + contentDescription = contentDescription, + alignment = alignment, + contentScale = contentScale, + ) + } + } + + interface Vector : LocalImage { + companion object { + fun of( + id: Id, + modifier: Modifier? = null, + actions: Actions? = null, + contentDescription: String? = null, + alignment: Alignment? = null, + contentScale: ContentScale? = null, + ): Vector = ComponentBoxVector( + id = id, + modifier = modifier, + actions = actions, + contentDescription = contentDescription, + alignment = alignment, + contentScale = contentScale, + ) + } + } + + interface Raw : LocalImage { + companion object { + fun of( + id: Id, + modifier: Modifier? = null, + actions: Actions? = null, + contentDescription: String? = null, + alignment: Alignment? = null, + contentScale: ContentScale? = null, + ): Raw = ComponentBoxRaw( + id = id, + modifier = modifier, + actions = actions, + contentDescription = contentDescription, + alignment = alignment, + contentScale = contentScale, + ) + } + } +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/NetworkImage.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/NetworkImage.kt new file mode 100644 index 00000000..720895f1 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/NetworkImage.kt @@ -0,0 +1,34 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.impl.ComponentBoxNetworkImage + +interface NetworkImage : Image { + var lightUrl: String + var darkUrl: String + var fallback: LocalImage? + + companion object { + fun of( + lightUrl: String, + darkUrl: String, + modifier: Modifier? = null, + actions: Actions? = null, + contentDescription: String? = null, + alignment: Alignment? = null, + contentScale: ContentScale? = null, + fallback: LocalImage? = null, + ): NetworkImage = ComponentBoxNetworkImage( + lightUrl = lightUrl, + darkUrl = darkUrl, + modifier = modifier, + actions = actions, + contentDescription = contentDescription, + alignment = alignment, + contentScale = contentScale, + fallback = fallback, + ) + } +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/OutlinedButton.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/OutlinedButton.kt new file mode 100644 index 00000000..c2537941 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/OutlinedButton.kt @@ -0,0 +1,21 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.impl.ComponentBoxOutlinedButton + +interface OutlinedButton : Button { + companion object { + fun of( + components: MutableList? = null, + disabled: Boolean? = false, + modifier: Modifier? = null, + actions: Actions? = null + ): OutlinedButton = ComponentBoxOutlinedButton( + components = components, + disabled = disabled, + modifier = modifier, + actions = actions + ) + } +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Row.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Row.kt new file mode 100644 index 00000000..813cd883 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Row.kt @@ -0,0 +1,28 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Arrangement +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.impl.ComponentBoxRow + +interface Row : Component.Box { + var horizontalArrangement: Arrangement.Horizontal? + var verticalAlignment: Alignment.Vertical? + + companion object { + fun of( + modifier: Modifier? = null, + actions: Actions? = null, + components: MutableList? = null, + horizontalArrangement: Arrangement.Horizontal? = null, + verticalAlignment: Alignment.Vertical? = null + ): Row = ComponentBoxRow( + modifier = modifier, + actions = actions, + components = components, + horizontalArrangement = horizontalArrangement, + verticalAlignment = verticalAlignment + ) + } +} diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Stack.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Stack.kt new file mode 100644 index 00000000..e815a97e --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Stack.kt @@ -0,0 +1,28 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Arrangement +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.impl.ComponentBoxStack + +interface Stack : Component.Box { + var horizontalArrangement: Arrangement.Horizontal? + var verticalAlignment: Alignment.Vertical? + + companion object { + fun of( + modifier: Modifier? = null, + actions: Actions? = null, + components: MutableList? = null, + horizontalArrangement: Arrangement.Horizontal? = null, + verticalAlignment: Alignment.Vertical? = null + ): Stack = ComponentBoxStack( + modifier = modifier, + actions = actions, + components = components, + horizontalArrangement = horizontalArrangement, + verticalAlignment = verticalAlignment + ) + } +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Surface.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Surface.kt new file mode 100644 index 00000000..085e2cb8 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Surface.kt @@ -0,0 +1,33 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.BorderStroke +import com.dropbox.componentbox.foundation.Color +import com.dropbox.componentbox.foundation.Shape +import com.dropbox.componentbox.impl.ComponentBoxSurface + +interface Surface { + var shape: Shape? + var color: Color? + var contentColor: Color? + var borderStroke: BorderStroke? + var elevation: Int? + val components: List? + + companion object { + fun of( + shape: Shape? = null, + color: Color? = null, + contentColor: Color? = null, + borderStroke: BorderStroke? = null, + elevation: Int? = null, + components: List? = null, + ): Surface = ComponentBoxSurface( + shape = shape, + color = color, + contentColor = contentColor, + borderStroke = borderStroke, + elevation = elevation, + components = components, + ) + } +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Switch.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Switch.kt new file mode 100644 index 00000000..d2c4db61 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Switch.kt @@ -0,0 +1,21 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.impl.ComponentBoxSwitch + +interface Switch : Component { + var checked: Boolean? + + companion object { + fun of( + modifier: Modifier? = null, + actions: Actions? = null, + checked: Boolean? = null, + ): Switch = ComponentBoxSwitch( + modifier = modifier, + actions = actions, + checked = checked, + ) + } +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Text.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Text.kt new file mode 100644 index 00000000..03ffdbd9 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/Text.kt @@ -0,0 +1,29 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Color +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.foundation.TextStyle +import com.dropbox.componentbox.impl.ComponentBoxText + +interface Text : Component { + var text: String? + val color: Color? + val textStyle: TextStyle? + + companion object { + fun of( + modifier: Modifier? = null, + actions: Actions? = null, + text: String? = null, + color: Color? = null, + textStyle: TextStyle? = null, + ): Text = ComponentBoxText( + modifier = modifier, + actions = actions, + text = text, + color = color, + textStyle = textStyle, + ) + } +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/TextButton.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/TextButton.kt new file mode 100644 index 00000000..07ae1ca6 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/component/TextButton.kt @@ -0,0 +1,21 @@ +package com.dropbox.componentbox.component + +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.impl.ComponentBoxTextButton + +interface TextButton : Button { + companion object { + fun of( + components: MutableList? = null, + disabled: Boolean? = false, + modifier: Modifier? = null, + actions: Actions? = null + ): TextButton = ComponentBoxTextButton( + components = components, + disabled = disabled, + modifier = modifier, + actions = actions + ) + } +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Actions.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Actions.kt new file mode 100644 index 00000000..317fd9f0 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Actions.kt @@ -0,0 +1,6 @@ +package com.dropbox.componentbox.foundation + +interface Actions { + val onClick: ComponentBoxAction? + val onCheckedChange: ComponentBoxAction? +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Alignment.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Alignment.kt new file mode 100644 index 00000000..499a1b6c --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Alignment.kt @@ -0,0 +1,6 @@ +package com.dropbox.componentbox.foundation + +interface Alignment { + interface Horizontal + interface Vertical +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Arrangement.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Arrangement.kt new file mode 100644 index 00000000..9ace8953 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Arrangement.kt @@ -0,0 +1,6 @@ +package com.dropbox.componentbox.foundation + +interface Arrangement { + interface Horizontal + interface Vertical +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/BorderStroke.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/BorderStroke.kt index 91dd9e5d..1cb47c6a 100644 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/BorderStroke.kt +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/BorderStroke.kt @@ -1,10 +1,3 @@ package com.dropbox.componentbox.foundation -import kotlinx.serialization.Serializable - -@IsPassable -@Serializable -data class BorderStroke( - val width: Int, - val color: Color -): Passable \ No newline at end of file +interface BorderStroke \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/ButtonVariant.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/ButtonVariant.kt deleted file mode 100644 index c5191070..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/ButtonVariant.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.dropbox.componentbox.foundation - -import kotlinx.serialization.Serializable - -@IsPassable -@Serializable -enum class ButtonVariant: Passable { - Contained, - Text, - Outlined, - Icon -} \ No newline at end of file diff --git a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/Image.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Color.kt similarity index 67% rename from componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/Image.kt rename to componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Color.kt index 20dfa62d..fa287ffe 100644 --- a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/Image.kt +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Color.kt @@ -1,3 +1,3 @@ package com.dropbox.componentbox.foundation -actual interface Image \ No newline at end of file +interface Color \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Component.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Component.kt deleted file mode 100644 index 2e6a8d58..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Component.kt +++ /dev/null @@ -1,110 +0,0 @@ -package com.dropbox.componentbox.foundation - -import kotlinx.serialization.Serializable - -@Serializable -sealed class Component: Passable { - - @IsPassable - @Serializable - data class Box( - val id: String, - var components: MutableList? = null, - var modifier: Modifier? = null, - var horizontalArrangement: Arrangement? = null, - var verticalAlignment: Alignment? = null, - var action: String? = null, - ) : Component(), Passable - - @IsPassable - @Serializable - data class Row( - val id: String, - var components: MutableList? = null, - var modifier: Modifier? = null, - var horizontalArrangement: Arrangement? = null, - var verticalAlignment: Alignment? = null, - var action: String? = null, - var isLazy: Boolean? = null - ) : Component(), Passable - - @IsPassable - @Serializable - data class Column( - val id: String, - var components: MutableList? = null, - var modifier: Modifier? = null, - var verticalArrangement: Arrangement? = null, - var horizontalAlignment: Alignment? = null, - var isLazy: Boolean? = null, - var isTable: Boolean? = null, - var action: String? = null - ) : Component(), Passable - - @IsPassable - @Serializable - data class Text( - val id: String, - var modifier: Modifier? = null, - var text: String? = null, - var color: Color? = null, - var textStyle: String? = null - ) : Component(), Passable - - @IsPassable - @Serializable - data class Button( - val id: String, - var components: MutableList? = null, - var modifier: Modifier? = null, - var isEnabled: Boolean? = null, - var action: String? = null, - var variant: String? = null, - ) : Component(), Passable - - @IsPassable - @Serializable - data class Switch( - val id: String, - var isChecked: Boolean? = null, - var modifier: Modifier? = null, - var action: String? = null, - ) : Component(), Passable - - @IsPassable - @Serializable - data class Drawable( - val id: String, - var name: String? = null, - var url: String? = null, - val contentDescription: String? = null, - var modifier: Modifier? = null, - var alignment: Alignment? = null, - var contentScale: ContentScale? = null - ) : Component(), Passable - - @IsPassable - @Serializable - data class Vector( - val id: String, - var name: String? = null, - var modifier: Modifier? = null, - var alignment: Alignment? = null, - var contentScale: ContentScale? = null, - var color: Color? = null - ) : Component(), Passable - - @IsPassable - @Serializable - data class Surface( - val id: String, - var modifier: Modifier? = null, - var shape: Shape? = null, - var color: Color? = null, - var contentColor: Color? = null, - var borderStroke: BorderStroke? = null, - var elevation: Int? = null, - var components: MutableList? = null, - ) : Component(), Passable -} - diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/ComponentBox.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/ComponentBox.kt deleted file mode 100644 index becdb66e..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/ComponentBox.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.dropbox.componentbox.foundation - -import kotlinx.serialization.Serializable - -@Serializable -sealed class ComponentBox: Passable { - @IsPassable - @Serializable - data class Screen( - val title: String?, - val verticalArrangement: Arrangement, - val horizontalAlignment: Alignment, - val components: List - ) : ComponentBox(), Passable - - @IsPassable - @Serializable - data class Modal( - val verticalArrangement: Arrangement, - val horizontalAlignment: Alignment, - val components: List - ) : ComponentBox(), Passable - - @IsPassable - @Serializable - data class Banner( - val verticalArrangement: Arrangement, - val horizontalAlignment: Alignment, - val components: List - ) : ComponentBox(), Passable -} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Inflater.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/ComponentBoxAction.kt similarity index 61% rename from componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Inflater.kt rename to componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/ComponentBoxAction.kt index b55df89b..0f6b7793 100644 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Inflater.kt +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/ComponentBoxAction.kt @@ -1,3 +1,3 @@ package com.dropbox.componentbox.foundation -expect interface Inflater \ No newline at end of file +interface ComponentBoxAction \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/ComponentBoxType.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/ComponentBoxType.kt deleted file mode 100644 index 3920c1ff..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/ComponentBoxType.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.dropbox.componentbox.foundation - -import kotlinx.serialization.Serializable - -@IsPassable -@Serializable -enum class ComponentBoxType: Passable { - Screen, - Modal, - Banner -} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/ComponentType.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/ComponentType.kt deleted file mode 100644 index c1ef60c4..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/ComponentType.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.dropbox.componentbox.foundation - -import kotlinx.serialization.Serializable - -@IsPassable -@Serializable -enum class ComponentType: Passable { - Box, - Button, - Column, - Drawable, - LazyColumn, - LazyRow, - Row, - Switch, - Table, - Text, - Vector, - Surface -} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Context.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Context.kt deleted file mode 100644 index f669f6f6..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Context.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.dropbox.componentbox.foundation - -data class Context( - val inflater: Inflater? = null, - val themer: Themer? = null, - val manager: Manager? = null, -) \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/IsPassable.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/IsPassable.kt deleted file mode 100644 index 5fc7600c..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/IsPassable.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.dropbox.componentbox.foundation - -@OptIn(ExperimentalMultiplatform::class) -@OptionalExpectation -@Target(AnnotationTarget.CLASS) -@Retention(AnnotationRetention.BINARY) -expect annotation class IsPassable() diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Manager.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Manager.kt deleted file mode 100644 index b4d097c6..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Manager.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.dropbox.componentbox.foundation - -interface Manager { - fun run(action: String?) -} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Margin.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Margin.kt new file mode 100644 index 00000000..4ccd7d9f --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Margin.kt @@ -0,0 +1,8 @@ +package com.dropbox.componentbox.foundation + +interface Margin { + var start: Int? + var top: Int? + var end: Int? + var bottom: Int? +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Modifier.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Modifier.kt new file mode 100644 index 00000000..a5d165fd --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Modifier.kt @@ -0,0 +1,49 @@ +package com.dropbox.componentbox.foundation + +import com.dropbox.componentbox.impl.ComponentBoxModifier + +interface Modifier { + var fillMaxSize: Boolean? + var fillMaxHeight: Boolean? + var fillMaxWidth: Boolean? + var height: Int? + var width: Int? + var padding: Padding? + var margin: Margin? + var background: Color? + var weight: Float? + + companion object { + fun of( + fillMaxSize: Boolean? = null, + fillMaxHeight: Boolean? = null, + fillMaxWidth: Boolean? = null, + height: Int? = null, + width: Int? = null, + padding: Padding? = null, + margin: Margin? = null, + background: Color? = null, + weight: Float? = null, + ): Modifier = ComponentBoxModifier( + fillMaxSize = fillMaxSize, + fillMaxHeight = fillMaxHeight, + fillMaxWidth = fillMaxWidth, + height = height, + width = width, + padding = padding, + margin = margin, + background = background, + weight = weight + ) + } +} + +fun Modifier.fillMaxSize(value: Boolean) = apply { fillMaxSize = value } +fun Modifier.fillMaxHeight(value: Boolean) = apply { fillMaxHeight = value } +fun Modifier.fillMaxWidth(value: Boolean) = apply { fillMaxWidth = value } +fun Modifier.height(value: Int) = apply { height = value } +fun Modifier.width(value: Int) = apply { width = value } +fun Modifier.padding(value: Padding) = apply { padding = value } +fun Modifier.margin(value: Margin) = apply { margin = value } +fun Modifier.background(value: Color) = apply { background = value } +fun Modifier.weight(value: Float) = apply { weight = value } diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Padding.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Padding.kt new file mode 100644 index 00000000..394f6782 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Padding.kt @@ -0,0 +1,8 @@ +package com.dropbox.componentbox.foundation + +interface Padding { + var start: Int? + var top: Int? + var end: Int? + var bottom: Int? +} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Passable.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Passable.kt deleted file mode 100644 index 4cbbf011..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Passable.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.foundation - -expect interface Passable \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Shape.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Shape.kt index 5c9feddf..085aadf6 100644 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Shape.kt +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Shape.kt @@ -1,11 +1,3 @@ package com.dropbox.componentbox.foundation -import kotlinx.serialization.Serializable - -@IsPassable -@Serializable -enum class Shape: Passable { - RectangleShape, - RoundedCornerShape, - CircleShape -} \ No newline at end of file +interface Shape \ No newline at end of file diff --git a/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/Image.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/TextStyle.kt similarity index 67% rename from componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/Image.kt rename to componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/TextStyle.kt index 20dfa62d..c860a393 100644 --- a/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/Image.kt +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/TextStyle.kt @@ -1,3 +1,3 @@ package com.dropbox.componentbox.foundation -actual interface Image \ No newline at end of file +interface TextStyle \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Themer.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Themer.kt deleted file mode 100644 index e41a46ec..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/Themer.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.foundation - -expect abstract class Themer \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/color.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/color.kt deleted file mode 100644 index 17f838be..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/color.kt +++ /dev/null @@ -1,39 +0,0 @@ -package com.dropbox.componentbox.foundation - -import kotlinx.serialization.Serializable -import kotlinx.serialization.builtins.serializer -import kotlinx.serialization.json.JsonElement -import kotlinx.serialization.json.JsonPrimitive -import kotlinx.serialization.json.JsonTransformingSerializer -import kotlinx.serialization.json.jsonPrimitive - -@IsPassable -@Serializable -data class Color( - val title: String, - val light: Long, - val dark: Long -): Passable - -interface Colors { - val primary: Color - val primaryVariant: Color - val secondary: Color - val secondaryVariant: Color - val background: Color - val surface: Color - val error: Color - val onPrimary: Color - val onSecondary: Color - val onBackground: Color - val onSurface: Color - val onError: Color - fun list(): MutableList -} - - -object ColorSerializer :JsonTransformingSerializer(Long.serializer()) { - override fun transformDeserialize(element: JsonElement): JsonElement { - return JsonPrimitive(element.jsonPrimitive.content.toLong()) - } -} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/constants.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/constants.kt deleted file mode 100644 index 5d840dfc..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/constants.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.dropbox.componentbox.foundation - -const val COMPONENT_BOX_ZIPLINE_SERVICE = "COMPONENT_BOX_ZIPLINE_SERVICE" - -// TODO(mramotar) Use Dropbox image -const val COMPONENT_BOX_FALLBACK_DRAWABLE_URL = "https://picsum.photos/600" \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/icon.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/icon.kt deleted file mode 100644 index 938edeec..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/icon.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.dropbox.componentbox.foundation - -data class Icon( - val line: VectorRes, - val fill: VectorRes? = null, - val pictogram: VectorRes? = null, - val spot: VectorRes? = null -) - -expect interface Icons { - fun list(): MutableList -} - -enum class IconType { - Line, - Fill, - Pictogram, - Spot -} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/image.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/image.kt deleted file mode 100644 index 5ddc0cbc..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/image.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.dropbox.componentbox.foundation - -expect interface Image - -interface Images { - fun list(): MutableList -} - -enum class ImageType { - Light, - Dark -} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/layout.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/layout.kt deleted file mode 100644 index db6a944d..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/layout.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.dropbox.componentbox.foundation - -import kotlinx.serialization.Serializable - -@IsPassable -@Serializable -enum class Alignment: Passable { - TopStart, - TopCenter, - TopEnd, - CenterStart, - Center, - CenterEnd, - BottomStart, - BottomCenter, - BottomEnd, - Top, - CenterVertically, - Bottom, - Start, - CenterHorizontally, - End -} - -@IsPassable -@Serializable -enum class Arrangement: Passable { - Start, - End, - Top, - Bottom, - Center, - SpaceEvenly, - SpaceBetween, - SpaceAround -} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/modifier.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/modifier.kt deleted file mode 100644 index 85a16f89..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/modifier.kt +++ /dev/null @@ -1,46 +0,0 @@ -package com.dropbox.componentbox.foundation - -import kotlinx.serialization.Serializable - -@IsPassable -@Serializable -data class Modifier( - var fillMaxSize: Boolean? = null, - var fillMaxHeight: Boolean? = null, - var fillMaxWidth: Boolean? = null, - var height: Int? = null, - var width: Int? = null, - var padding: Padding? = null, - var margin: Margin? = null, - var background: Color? = null, - var weight: Float? = null -): Passable - -@IsPassable -@Serializable -data class Margin( - val start: Int? = null, - val top: Int? = null, - val end: Int? = null, - val bottom: Int? = null -): Passable - -@IsPassable -@Serializable -data class Padding( - val start: Int? = null, - val top: Int? = null, - val end: Int? = null, - val bottom: Int? = null -): Passable - -@IsPassable -@Serializable -enum class ContentScale: Passable { - Crop, - Fit, - FillHeight, - FillWidth,Inside, - None, - FillBounds -} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/navigation.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/navigation.kt deleted file mode 100644 index c8797110..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/navigation.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.dropbox.componentbox.foundation - -open class Destination - -data class BottomTab( - val id: Destination, - val title: StringRes, - val iconSelected: VectorRes, - val iconNotSelected: VectorRes -) \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/res.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/res.kt deleted file mode 100644 index 3c1ccedf..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/res.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.dropbox.componentbox.foundation - -expect interface MultiplatformRes -expect interface VectorRes -expect interface DrawableRes -expect interface StringRes \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/type.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/type.kt deleted file mode 100644 index 380d549a..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/foundation/type.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.dropbox.componentbox.foundation - -expect interface TextStyle - -interface Typography { - val h1: TextStyle - val h2: TextStyle - val h3: TextStyle - val h4: TextStyle - val h5: TextStyle - val h6: TextStyle - val body1: TextStyle - val body2: TextStyle - val button: TextStyle - val caption: TextStyle - fun list(): MutableList -} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxColumn.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxColumn.kt new file mode 100644 index 00000000..fe0d86f5 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxColumn.kt @@ -0,0 +1,16 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.component.Column +import com.dropbox.componentbox.component.Component +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Arrangement +import com.dropbox.componentbox.foundation.Modifier + +internal class ComponentBoxColumn( + override var verticalArrangement: Arrangement.Vertical? = null, + override var horizontalAlignment: Alignment.Horizontal? = null, + override var modifier: Modifier? = null, + override var actions: Actions? = null, + override val components: MutableList? = null, +) : Column \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxComponentBox.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxComponentBox.kt new file mode 100644 index 00000000..65b05600 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxComponentBox.kt @@ -0,0 +1,8 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.ComponentBox +import com.dropbox.componentbox.component.Component + +internal class ComponentBoxComponentBox( + override val root: Component.Box +) : ComponentBox \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxContainedButton.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxContainedButton.kt new file mode 100644 index 00000000..fd655578 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxContainedButton.kt @@ -0,0 +1,13 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.component.Component +import com.dropbox.componentbox.component.ContainedButton +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Modifier + +internal class ComponentBoxContainedButton( + override var components: MutableList? = null, + override var disabled: Boolean? = null, + override var modifier: Modifier? = null, + override var actions: Actions? = null, +) : ContainedButton \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxDrawable.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxDrawable.kt new file mode 100644 index 00000000..235802f6 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxDrawable.kt @@ -0,0 +1,16 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.component.ContentScale +import com.dropbox.componentbox.component.LocalImage +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Modifier + +internal class ComponentBoxDrawable( + override var id: Id, + override var modifier: Modifier? = null, + override var actions: Actions? = null, + override val contentDescription: String? = null, + override var alignment: Alignment? = null, + override var contentScale: ContentScale? = null, +) : LocalImage.Drawable \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxIcon.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxIcon.kt new file mode 100644 index 00000000..222e3b3c --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxIcon.kt @@ -0,0 +1,14 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.component.Icon +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Color +import com.dropbox.componentbox.foundation.Modifier + +internal class ComponentBoxIcon( + override var id: Id, + override var modifier: Modifier? = null, + override var actions: Actions? = null, + override var color: Color? = null, + override val contentDescription: String?, +) : Icon \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxLazyColumn.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxLazyColumn.kt new file mode 100644 index 00000000..78385c15 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxLazyColumn.kt @@ -0,0 +1,16 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.component.Component +import com.dropbox.componentbox.component.LazyColumn +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Arrangement +import com.dropbox.componentbox.foundation.Modifier + +internal class ComponentBoxLazyColumn( + override var verticalArrangement: Arrangement.Vertical? = null, + override var horizontalAlignment: Alignment.Horizontal? = null, + override var modifier: Modifier? = null, + override var actions: Actions? = null, + override val components: MutableList? = null, +) : LazyColumn \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxLazyRow.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxLazyRow.kt new file mode 100644 index 00000000..eb1cf9e2 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxLazyRow.kt @@ -0,0 +1,16 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.component.Component +import com.dropbox.componentbox.component.LazyRow +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Arrangement +import com.dropbox.componentbox.foundation.Modifier + +internal class ComponentBoxLazyRow( + override var modifier: Modifier? = null, + override var actions: Actions? = null, + override val components: MutableList? = null, + override var horizontalArrangement: Arrangement.Horizontal? = null, + override var verticalAlignment: Alignment.Vertical? = null, +) : LazyRow \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxModifier.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxModifier.kt new file mode 100644 index 00000000..541cf804 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxModifier.kt @@ -0,0 +1,20 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.foundation.Color +import com.dropbox.componentbox.foundation.Margin +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.foundation.Padding + +internal class ComponentBoxModifier( + override var fillMaxSize: Boolean? = null, + override var fillMaxHeight: Boolean? = null, + override var fillMaxWidth: Boolean? = null, + override var height: Int? = null, + override var width: Int? = null, + override var padding: Padding? = null, + override var margin: Margin? = null, + override var background: Color? = null, + override var weight: Float? = null +) : Modifier + + diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxNetworkImage.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxNetworkImage.kt new file mode 100644 index 00000000..dcc92e3c --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxNetworkImage.kt @@ -0,0 +1,19 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.component.ContentScale +import com.dropbox.componentbox.component.LocalImage +import com.dropbox.componentbox.component.NetworkImage +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Modifier + +internal class ComponentBoxNetworkImage( + override var lightUrl: String, + override var darkUrl: String, + override var modifier: Modifier? = null, + override var actions: Actions? = null, + override val contentDescription: String? = null, + override var alignment: Alignment? = null, + override var contentScale: ContentScale? = null, + override var fallback: LocalImage? = null, +) : NetworkImage \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxOutlinedButton.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxOutlinedButton.kt new file mode 100644 index 00000000..05092646 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxOutlinedButton.kt @@ -0,0 +1,13 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.component.Component +import com.dropbox.componentbox.component.OutlinedButton +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Modifier + +internal class ComponentBoxOutlinedButton( + override var components: MutableList? = null, + override var disabled: Boolean? = null, + override var modifier: Modifier? = null, + override var actions: Actions? = null, +) : OutlinedButton \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxRaw.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxRaw.kt new file mode 100644 index 00000000..ebbd5887 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxRaw.kt @@ -0,0 +1,17 @@ +package com.dropbox.componentbox.impl + + +import com.dropbox.componentbox.component.ContentScale +import com.dropbox.componentbox.component.LocalImage +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Modifier + +internal class ComponentBoxRaw( + override var id: Id, + override var modifier: Modifier? = null, + override var actions: Actions? = null, + override val contentDescription: String? = null, + override var alignment: Alignment? = null, + override var contentScale: ContentScale? = null, +) : LocalImage.Raw \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxRow.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxRow.kt new file mode 100644 index 00000000..b1b03fde --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxRow.kt @@ -0,0 +1,16 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.component.Component +import com.dropbox.componentbox.component.Row +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Arrangement +import com.dropbox.componentbox.foundation.Modifier + +internal class ComponentBoxRow( + override var modifier: Modifier? = null, + override var actions: Actions? = null, + override val components: MutableList? = null, + override var horizontalArrangement: Arrangement.Horizontal? = null, + override var verticalAlignment: Alignment.Vertical? = null, +) : Row \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxStack.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxStack.kt new file mode 100644 index 00000000..99b7deb8 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxStack.kt @@ -0,0 +1,16 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.component.Component +import com.dropbox.componentbox.component.Stack +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Arrangement +import com.dropbox.componentbox.foundation.Modifier + +internal class ComponentBoxStack( + override var modifier: Modifier? = null, + override var actions: Actions? = null, + override val components: MutableList? = null, + override var horizontalArrangement: Arrangement.Horizontal? = null, + override var verticalAlignment: Alignment.Vertical? = null +) : Stack \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxSurface.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxSurface.kt new file mode 100644 index 00000000..6bddaffa --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxSurface.kt @@ -0,0 +1,16 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.component.Component +import com.dropbox.componentbox.component.Surface +import com.dropbox.componentbox.foundation.BorderStroke +import com.dropbox.componentbox.foundation.Color +import com.dropbox.componentbox.foundation.Shape + +internal class ComponentBoxSurface( + override var shape: Shape? = null, + override var color: Color? = null, + override var contentColor: Color? = null, + override var borderStroke: BorderStroke? = null, + override var elevation: Int? = null, + override val components: List? = null, +) : Surface \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxSwitch.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxSwitch.kt new file mode 100644 index 00000000..33e456e6 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxSwitch.kt @@ -0,0 +1,11 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.component.Switch +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Modifier + +internal class ComponentBoxSwitch( + override var modifier: Modifier? = null, + override var actions: Actions? = null, + override var checked: Boolean? = null, +) : Switch \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxText.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxText.kt new file mode 100644 index 00000000..517f6ef7 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxText.kt @@ -0,0 +1,15 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.component.Text +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Color +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.foundation.TextStyle + +internal class ComponentBoxText( + override var modifier: Modifier? = null, + override var actions: Actions? = null, + override var text: String? = null, + override var color: Color? = null, + override var textStyle: TextStyle? = null, +): Text \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxTextButton.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxTextButton.kt new file mode 100644 index 00000000..d811b2eb --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxTextButton.kt @@ -0,0 +1,13 @@ +package com.dropbox.componentbox.impl + +import com.dropbox.componentbox.component.Component +import com.dropbox.componentbox.component.TextButton +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Modifier + +internal class ComponentBoxTextButton( + override var components: MutableList? = null, + override var disabled: Boolean? = null, + override var modifier: Modifier? = null, + override var actions: Actions? = null, +) : TextButton \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxVector.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxVector.kt new file mode 100644 index 00000000..ba1fce68 --- /dev/null +++ b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/impl/ComponentBoxVector.kt @@ -0,0 +1,17 @@ +package com.dropbox.componentbox.impl + + +import com.dropbox.componentbox.component.ContentScale +import com.dropbox.componentbox.component.LocalImage +import com.dropbox.componentbox.foundation.Actions +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Modifier + +internal class ComponentBoxVector( + override var id: Id, + override var modifier: Modifier? = null, + override var actions: Actions? = null, + override val contentDescription: String? = null, + override var alignment: Alignment? = null, + override var contentScale: ContentScale? = null, +) : LocalImage.Vector \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/presentation/ComponentBoxViewModel.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/presentation/ComponentBoxViewModel.kt deleted file mode 100644 index e7e8383b..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/presentation/ComponentBoxViewModel.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.dropbox.componentbox.presentation - -import com.dropbox.componentbox.foundation.ComponentBox -import com.dropbox.componentbox.foundation.Passable -import com.dropbox.componentbox.foundation.IsPassable -import kotlinx.serialization.Serializable - -@IsPassable -@Serializable -data class ComponentBoxViewModel( - val root: C? = null -) : Passable - - - - diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/zipline/ComponentBoxZiplineService.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/zipline/ComponentBoxZiplineService.kt deleted file mode 100644 index e2df4f92..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/zipline/ComponentBoxZiplineService.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.dropbox.componentbox.zipline - -import app.cash.zipline.ZiplineService -import com.dropbox.componentbox.foundation.ComponentBox -import com.dropbox.componentbox.foundation.ComponentBoxType -import com.dropbox.componentbox.presentation.ComponentBoxViewModel -import kotlinx.coroutines.flow.Flow - -interface ComponentBoxZiplineService : ZiplineService { - suspend fun produceModelsInBanner( - type: ComponentBoxType, - url: String, - headers: Map = mapOf() - ): Flow> - - suspend fun produceModelsInModal( - type: ComponentBoxType, - url: String, - headers: Map = mapOf() - ): Flow> - - suspend fun produceModelsInScreen( - type: ComponentBoxType, - url: String, - headers: Map = mapOf() - ): Flow> -} \ No newline at end of file diff --git a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/zipline/HostApi.kt b/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/zipline/HostApi.kt deleted file mode 100644 index 568a1209..00000000 --- a/componentbox/src/commonMain/kotlin/com/dropbox/componentbox/zipline/HostApi.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.dropbox.componentbox.zipline - -import app.cash.zipline.ZiplineService - -interface HostApi : ZiplineService { - suspend fun httpCall(url: String, headers: Map): String -} \ No newline at end of file diff --git a/componentbox/src/iosArm64Main/kotlin/com/dropbox/componentbox/foundation/Passable.kt b/componentbox/src/iosArm64Main/kotlin/com/dropbox/componentbox/foundation/Passable.kt deleted file mode 100644 index 9a937499..00000000 --- a/componentbox/src/iosArm64Main/kotlin/com/dropbox/componentbox/foundation/Passable.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface Passable \ No newline at end of file diff --git a/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/Icons.kt b/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/Icons.kt deleted file mode 100644 index 032c8006..00000000 --- a/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/Icons.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface Icons { - actual fun list(): MutableList -} \ No newline at end of file diff --git a/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/Inflater.kt b/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/Inflater.kt deleted file mode 100644 index fc95520f..00000000 --- a/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/Inflater.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface Inflater \ No newline at end of file diff --git a/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/MultiplatformRes.kt b/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/MultiplatformRes.kt deleted file mode 100644 index eb962808..00000000 --- a/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/MultiplatformRes.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface MultiplatformRes -actual interface VectorRes -actual interface DrawableRes -actual interface StringRes \ No newline at end of file diff --git a/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/TextStyle.kt b/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/TextStyle.kt deleted file mode 100644 index d39b95d8..00000000 --- a/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/TextStyle.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface TextStyle \ No newline at end of file diff --git a/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/Themer.kt b/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/Themer.kt deleted file mode 100644 index f4f63ec0..00000000 --- a/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/Themer.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual abstract class Themer \ No newline at end of file diff --git a/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/freeze.kt b/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/freeze.kt deleted file mode 100644 index 2f7d6971..00000000 --- a/componentbox/src/iosMain/kotlin/com/dropbox/componentbox/foundation/freeze.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.dropbox.componentbox.foundation - -import com.dropbox.componentbox.ComponentBoxClient -import kotlin.native.concurrent.freeze - -fun ComponentBoxClient.freeze() = this.freeze() \ No newline at end of file diff --git a/componentbox/src/iosSimulatorArm64Main/kotlin/com/dropbox/componentbox/foundation/Passable.kt b/componentbox/src/iosSimulatorArm64Main/kotlin/com/dropbox/componentbox/foundation/Passable.kt deleted file mode 100644 index 9a937499..00000000 --- a/componentbox/src/iosSimulatorArm64Main/kotlin/com/dropbox/componentbox/foundation/Passable.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface Passable \ No newline at end of file diff --git a/componentbox/src/iosX64Main/kotlin/com/dropbox/componentbox/foundation/Passable.kt b/componentbox/src/iosX64Main/kotlin/com/dropbox/componentbox/foundation/Passable.kt deleted file mode 100644 index 9a937499..00000000 --- a/componentbox/src/iosX64Main/kotlin/com/dropbox/componentbox/foundation/Passable.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface Passable \ No newline at end of file diff --git a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/Icons.kt b/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/Icons.kt deleted file mode 100644 index 032c8006..00000000 --- a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/Icons.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface Icons { - actual fun list(): MutableList -} \ No newline at end of file diff --git a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/Inflater.kt b/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/Inflater.kt deleted file mode 100644 index fc95520f..00000000 --- a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/Inflater.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface Inflater \ No newline at end of file diff --git a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/Passable.kt b/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/Passable.kt deleted file mode 100644 index 9a937499..00000000 --- a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/Passable.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface Passable \ No newline at end of file diff --git a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/TextStyle.kt b/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/TextStyle.kt deleted file mode 100644 index d39b95d8..00000000 --- a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/TextStyle.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface TextStyle \ No newline at end of file diff --git a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/Themer.kt b/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/Themer.kt deleted file mode 100644 index f4f63ec0..00000000 --- a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/Themer.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual abstract class Themer \ No newline at end of file diff --git a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/res.kt b/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/res.kt deleted file mode 100644 index 79b6d5b4..00000000 --- a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/foundation/res.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface MultiplatformRes -actual interface DrawableRes -actual interface StringRes -actual interface VectorRes \ No newline at end of file diff --git a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/zipline/ComponentBoxPresenter.kt b/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/zipline/ComponentBoxPresenter.kt deleted file mode 100644 index f192118b..00000000 --- a/componentbox/src/jsMain/kotlin/com/dropbox/componentbox/zipline/ComponentBoxPresenter.kt +++ /dev/null @@ -1,64 +0,0 @@ -@file:Suppress("UNCHECKED_CAST") - -package com.dropbox.componentbox.zipline - -import com.dropbox.componentbox.foundation.ComponentBox -import com.dropbox.componentbox.foundation.ComponentBoxType -import com.dropbox.componentbox.presentation.ComponentBoxViewModel -import kotlinx.coroutines.coroutineScope -import kotlinx.coroutines.flow.Flow -import kotlinx.coroutines.flow.channelFlow -import kotlinx.serialization.decodeFromString -import kotlinx.serialization.json.Json - -abstract class ComponentBoxPresenter(private val hostApi: HostApi) : ComponentBoxZiplineService { - override suspend fun produceModelsInBanner( - type: ComponentBoxType, - url: String, - headers: Map - ): Flow> { - return coroutineScope { - channelFlow { - send(loadComponentBox(type, url, headers)) - } - } - } - - override suspend fun produceModelsInModal( - type: ComponentBoxType, - url: String, - headers: Map - ): Flow> { - return coroutineScope { - channelFlow { - send(loadComponentBox(type, url, headers)) - } - } - } - - override suspend fun produceModelsInScreen( - type: ComponentBoxType, - url: String, - headers: Map - ): Flow> { - return coroutineScope { - channelFlow { - send(loadComponentBox(type, url, headers)) - } - } - } - - private suspend fun loadComponentBox( - type: ComponentBoxType, - url: String, - headers: Map = mapOf() - ): ComponentBoxViewModel { - val response = hostApi.httpCall(url, headers) - val root = when (type) { - ComponentBoxType.Banner -> Json.decodeFromString(response) - ComponentBoxType.Modal -> Json.decodeFromString(response) - ComponentBoxType.Screen -> Json.decodeFromString(response) - } - return ComponentBoxViewModel(root as C) - } -} \ No newline at end of file diff --git a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/Icons.kt b/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/Icons.kt deleted file mode 100644 index c8450f03..00000000 --- a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/Icons.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface Icons { - actual fun list(): MutableList - fun resPaths(): MutableList -} \ No newline at end of file diff --git a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/Image.kt b/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/Image.kt deleted file mode 100644 index 5768c39d..00000000 --- a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/Image.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface Image: DrawableRes - -data class RealImage( - override val name: String, - override val light: MultiplatformRes, - override val dark: MultiplatformRes -) : Image \ No newline at end of file diff --git a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/Inflater.kt b/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/Inflater.kt deleted file mode 100644 index 1a2bc406..00000000 --- a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/Inflater.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.dropbox.componentbox.foundation - -import androidx.compose.runtime.Composable - -actual interface Inflater { - @Composable - fun Inflate(component: Component) - - @Composable - fun bottomTabs(): List -} \ No newline at end of file diff --git a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/Passable.kt b/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/Passable.kt deleted file mode 100644 index 58dc0819..00000000 --- a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/Passable.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.dropbox.componentbox.foundation - -import java.io.Serializable - -actual typealias Passable = Serializable \ No newline at end of file diff --git a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/ResourceProvider.kt b/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/ResourceProvider.kt deleted file mode 100644 index d75f6996..00000000 --- a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/ResourceProvider.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.dropbox.componentbox.foundation - -import androidx.compose.runtime.Composable - -interface ResourceProvider { - @Composable - fun icons(): Icons - - @Composable - fun images(): Images - - @Composable - fun typography(): Typography - - @Composable - fun colors(): Colors -} \ No newline at end of file diff --git a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/TextStyle.kt b/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/TextStyle.kt deleted file mode 100644 index fd879efb..00000000 --- a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/TextStyle.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.dropbox.componentbox.foundation - -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.TextUnit - -actual interface TextStyle { - val name: String - val fontFamily: FontFamily - val fontWeight: FontWeight - val fontSize: TextUnit -} - -data class RealTextStyle( - override val name: String, - override val fontFamily: FontFamily, - override val fontWeight: FontWeight, - override val fontSize: TextUnit -) : TextStyle \ No newline at end of file diff --git a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/Themer.kt b/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/Themer.kt deleted file mode 100644 index 883fb9c1..00000000 --- a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/Themer.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.dropbox.componentbox.foundation - -import androidx.compose.runtime.Composable -import androidx.compose.ui.text.TextStyle - -actual abstract class Themer { - @Composable - abstract fun Theme(isNightMode: Boolean, content: @Composable () -> Unit) - - @Composable - abstract fun getDrawableResPath(name: String?): String? - - @Composable - abstract fun getTextStyle(name: String?): TextStyle? -} \ No newline at end of file diff --git a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/res.kt b/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/res.kt deleted file mode 100644 index c12fd64a..00000000 --- a/componentbox/src/jvmMain/kotlin/com/dropbox/componentbox/foundation/res.kt +++ /dev/null @@ -1,38 +0,0 @@ -package com.dropbox.componentbox.foundation - -actual interface MultiplatformRes { - val name: String - val resPath: String -} - -data class RealMultiplatformRes( - override val name: String, - override val resPath: String -) : MultiplatformRes - -actual interface DrawableRes { - val name: String - val light: MultiplatformRes - val dark: MultiplatformRes -} - -data class RealDrawableRes( - override val name: String, - override val light: MultiplatformRes, - override val dark: MultiplatformRes -) : DrawableRes - -actual interface StringRes { - val value: String -} - -data class RealStringRes( - override val value: String -) : StringRes - -actual interface VectorRes : MultiplatformRes - -data class RealVectorRes( - override val name: String, - override val resPath: String -) : VectorRes \ No newline at end of file diff --git a/componentbox/src/main/AndroidManifest.xml b/componentbox/src/main/AndroidManifest.xml deleted file mode 100644 index 1a163005..00000000 --- a/componentbox/src/main/AndroidManifest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/componentbox/src/main/res/raw/loading.json b/componentbox/src/main/res/raw/loading.json deleted file mode 100644 index 0ac2d43e..00000000 --- a/componentbox/src/main/res/raw/loading.json +++ /dev/null @@ -1 +0,0 @@ -{"v":"5.5.7","meta":{"g":"LottieFiles AE 0.1.20","a":"","k":"","d":"","tc":""},"fr":30,"ip":0,"op":60,"w":1080,"h":1080,"nm":"Dropbox Icon","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"Scale","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[540.426,540,0],"ix":2},"a":{"a":0,"k":[390.318,315.488,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":3,"s":[0,0,100]},{"t":23,"s":[900,900,100]}],"ix":6,"x":"var $bm_rt;\nfunction easeandwizz_outBack(t, b, c, d) {\n var s = 1.70158;\n return $bm_sum($bm_mul(c, $bm_sum($bm_mul($bm_mul(t = t / d - 1, t), $bm_sum($bm_mul($bm_sum(s, 1), t), s)), 1)), b);\n}\nfunction easeAndWizz() {\n var t, d, sX, eX, sY, eY, sZ, eZ, val1, val2, val2, val3;\n var n = 0;\n if (numKeys > 0) {\n n = nearestKey(time).index;\n if (key(n).time > time) {\n n--;\n }\n }\n try {\n var key1 = key(n);\n var key2 = key($bm_sum(n, 1));\n } catch (e) {\n return null;\n }\n var dim = 1;\n try {\n key(1)[1].length;\n dim = 2;\n key(1)[2].length;\n dim = 3;\n } catch (e) {\n }\n t = $bm_sub(time, key1.time);\n d = $bm_sub(key2.time, key1.time);\n sX = key1[0];\n eX = $bm_sub(key2[0], key1[0]);\n if (dim >= 2) {\n sY = key1[1];\n eY = $bm_sub(key2[1], key1[1]);\n if (dim >= 3) {\n sZ = key1[2];\n eZ = $bm_sub(key2[2], key1[2]);\n }\n }\n if (time < key1.time || time > key2.time) {\n return value;\n } else {\n val1 = easeandwizz_outBack(t, sX, eX, d);\n switch (dim) {\n case 1:\n return val1;\n break;\n case 2:\n val2 = easeandwizz_outBack(t, sY, eY, d);\n return [\n val1,\n val2\n ];\n break;\n case 3:\n val2 = easeandwizz_outBack(t, sY, eY, d);\n val3 = easeandwizz_outBack(t, sZ, eZ, d);\n return [\n val1,\n val2,\n val3\n ];\n break;\n default:\n return null;\n }\n }\n}\n$bm_rt = easeAndWizz() || value;"}},"ao":0,"ip":3,"op":567.314314314314,"st":3,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"bot","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":23,"s":[390.312,315.488,0],"to":[0,1.03,0],"ti":[0,-1.03,0]},{"t":43,"s":[390.312,321.665,0]}],"ix":2},"a":{"a":0,"k":[390.318,315.488,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-5.846,0],[0,3.724],[5.846,0],[0,-3.724]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.2235294117647059,0.47843137254901963,0.996078431372549,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[390.318,315.488],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 90","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":3,"op":577.314314314314,"st":13,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"4","parent":7,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[393.469,317.121,0],"ix":2},"a":{"a":0,"k":[393.475,308.489,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"t":33,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[0,-3.724],[-5.845,0],[-11.723,-3.707],[-5.877,-7.431]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.167},"t":43,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[0,-3.724],[-5.845,0],[-5.889,-7.22],[-0.043,-10.944]],"c":true}]},{"t":53,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[0,-3.724],[-5.845,0],[0,3.724],[5.846,0]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.2235294117647059,0.47843137254901963,0.996078431372549,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[396.117,310.53],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"4","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":13,"op":587.314314314314,"st":23,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"3","parent":7,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[386.773,316.931,0],"ix":2},"a":{"a":0,"k":[386.779,308.299,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"t":33,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[5.877,-7.41],[11.723,-3.686],[5.845,0],[0,-3.724]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.167},"t":43,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-0.005,-11.097],[5.841,-7.373],[5.845,0],[0,-3.724]],"c":true}]},{"t":53,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-5.846,0],[0,3.724],[5.845,0],[0,-3.724]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.2235294117647059,0.47843137254901963,0.996078431372549,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[384.435,310.53],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 92","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":13,"op":587.314314314314,"st":23,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"2","parent":7,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[396.112,311.765,0],"ix":2},"a":{"a":0,"k":[396.117,303.133,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"t":33,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-5.845,0.001],[0,3.724],[-5.779,7.459],[-11.626,3.734]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.167},"t":43,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-5.845,0.001],[0,3.724],[-0.071,-3.444],[-5.917,-7.169]],"c":true}]},{"t":53,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-5.845,0.001],[0,3.724],[5.846,0.001],[0,-3.724]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.2235294117647059,0.47843137254901963,0.996078431372549,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[396.117,303.133],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 93","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":13,"op":587.314314314314,"st":23,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"1","parent":7,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[384.429,311.765,0],"ix":2},"a":{"a":0,"k":[384.435,303.133,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"t":33,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[5.932,7.445],[0,3.724],[5.845,0.001],[11.778,3.72]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0.167},"t":43,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[0.099,-3.611],[0.112,3.669],[5.845,0.001],[5.778,-7.03]],"c":true}]},{"t":53,"s":[{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-5.846,0.001],[0,3.724],[5.845,0.001],[0,-3.724]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.2235294117647059,0.47843137254901963,0.996078431372549,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[384.435,303.133],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 94","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":13,"op":587.314314314314,"st":23,"bm":0},{"ddd":0,"ind":7,"ty":3,"nm":"Top","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":23,"s":[390.318,315.488,0],"to":[0,-0.409,0],"ti":[0,0.409,0]},{"t":43,"s":[390.318,313.034,0]}],"ix":2},"a":{"a":0,"k":[390.318,315.488,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":13,"op":577.314314314314,"st":13,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Circ","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[539,540,0],"ix":2},"a":{"a":0,"k":[390.276,309.31,0],"ix":1},"s":{"a":0,"k":[900,900,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[38,38],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.2235294117647059,0.47843137254901963,0.996078431372549,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":1.5,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0]},{"t":20,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":4,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"tr","p":{"a":0,"k":[390.388,309.31],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[-76]},{"t":20,"s":[0]}],"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":564.314314314314,"st":0,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/desktop/build.gradle.kts b/desktop/build.gradle.kts deleted file mode 100644 index 76ac3f7f..00000000 --- a/desktop/build.gradle.kts +++ /dev/null @@ -1,61 +0,0 @@ -import org.jetbrains.compose.compose -import org.jetbrains.compose.desktop.application.dsl.TargetFormat - -plugins { - kotlin("multiplatform") - id("org.jetbrains.compose") version Version.composeMultiplatform - kotlin("plugin.serialization") -} - -group = "com.dropbox.componentbox" - -kotlin { - jvm { - compilations.all { - kotlinOptions.jvmTarget = "11" - } - withJava() - } - sourceSets { - val jvmMain by getting { - dependencies { - implementation(project(":componentbox")) - implementation(project(":util")) - api(project(":samples:discovery:theme")) - - api(compose.desktop.currentOs) - api(compose.preview) - - implementation(Deps.Kotlinx.serializationCore) - implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-common:0.20.0") - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0") - implementation("org.reduxkotlin:redux-kotlin-threadsafe-jvm:0.5.5") - } - } - } -} - -compose.desktop { - application { - mainClass = "Main" - nativeDistributions { - targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) - packageName = "jvm" - packageVersion = "1.0.0" - } - } -} - -tasks.named("jvmProcessResources") { - duplicatesStrategy = DuplicatesStrategy.WARN -} - -tasks.withType(JavaCompile::class.java).all { - options.compilerArgs.add("-Xno-optimized-callable-references") -} - -tasks.withType().configureEach { - kotlinOptions { - freeCompilerArgs = listOf("-Xno-optimized-callable-references") - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/app.kt b/desktop/src/jvmMain/kotlin/app.kt deleted file mode 100644 index 48ba6647..00000000 --- a/desktop/src/jvmMain/kotlin/app.kt +++ /dev/null @@ -1,33 +0,0 @@ -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import com.dropbox.componentbox.foundation.Inflater -import com.dropbox.componentbox.foundation.ResourceProvider -import com.dropbox.componentbox.foundation.Themer -import com.dropbox.desktop.componentbox.data.entities.Context -import com.dropbox.desktop.componentbox.store.actions.ThemeAction -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.ui -import com.dropbox.desktop.componentbox.ui.theme.componentBoxTheme - -@Composable -fun app(inflater: Inflater, themer: Themer, resourceProvider: ResourceProvider) = MaterialTheme { - val isNightMode = remember { mutableStateOf(store.state.themeState.isNightMode) } - - fun syncIsNightMode() { - isNightMode.value = store.state.screenState.isNightMode - } - - store.dispatch(ThemeAction.SetColors(resourceProvider.colors().list())) - store.dispatch(ThemeAction.SetBackground(resourceProvider.colors().background)) - store.subscribe { syncIsNightMode() } - - componentBoxTheme { - themer.Theme(isNightMode.value) { - ui(Context(resourceProvider), inflater, themer) - } - } -} - - diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/data/entities/ChildAndParentComponent.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/data/entities/ChildAndParentComponent.kt deleted file mode 100644 index 981f2294..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/data/entities/ChildAndParentComponent.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.dropbox.desktop.componentbox.data.entities - -import com.dropbox.componentbox.foundation.Component - -data class ChildAndParentComponent( - val child: Component, - val parent: Component? -) \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/data/entities/ChildAndParentNode.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/data/entities/ChildAndParentNode.kt deleted file mode 100644 index 56d220d0..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/data/entities/ChildAndParentNode.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.dropbox.desktop.componentbox.data.entities - -data class ChildAndParentNode( - val child: Node, - val parent: Node? -) \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/data/entities/Context.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/data/entities/Context.kt deleted file mode 100644 index 6c8bde54..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/data/entities/Context.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.dropbox.desktop.componentbox.data.entities - -import com.dropbox.componentbox.foundation.ResourceProvider - -data class Context( - val resourceProvider: ResourceProvider -) diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/data/entities/Node.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/data/entities/Node.kt deleted file mode 100644 index ed940be1..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/data/entities/Node.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.dropbox.desktop.componentbox.data.entities - -import com.dropbox.componentbox.foundation.ComponentType - -data class Node( - val id: String, - val path: String, - val type: ComponentType, - var children: MutableList -) \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/actions/ComponentAction.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/actions/ComponentAction.kt deleted file mode 100644 index 53ca0347..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/actions/ComponentAction.kt +++ /dev/null @@ -1,159 +0,0 @@ -package com.dropbox.desktop.componentbox.store.actions - -import com.dropbox.componentbox.foundation.* -import com.dropbox.desktop.componentbox.data.entities.Node - -sealed class ComponentAction { - - data class AddNode( - val node: Node, - val parentId: String? = null, - val index: Int? = null - ) : ComponentAction() - - object Clear : ComponentAction() - - object ClearActiveNode : ComponentAction() - - data class RemoveNode( - val id: String - ) : ComponentAction() - - data class SetActiveNode( - val node: Node - ) : ComponentAction() - - data class SetButtonVariant( - val id: String, - val variant: String, - ) : ComponentAction() - - data class SetColor( - val id: String, - val color: Color, - ) : ComponentAction() - - data class SetContentScale( - val id: String, - val contentScale: ContentScale - ) : ComponentAction() - - data class SetDrawableName( - val id: String, - val name: String - ) : ComponentAction() - - data class SetIsChecked( - val id: String, - val isChecked: Boolean - ) : ComponentAction() - - data class SetIsEnabled( - val id: String, - val isEnabled: Boolean - ) : ComponentAction() - - data class SetIsLazy( - val id: String, - val isLazy: Boolean - ) : ComponentAction() - - data class SetAction( - val id: String, - val action: String - ) : ComponentAction() - - data class SetText( - val id: String, - val text: String - ) : ComponentAction() - - data class SetTextStyle( - val id: String, - val style: String - ) : ComponentAction() - - data class SetVectorName( - val id: String, - val name: String - ) : ComponentAction() - - sealed class LayoutAction : ComponentAction() { - data class SetHorizontalArrangement( - val id: String, - val horizontalArrangement: Arrangement - ) : LayoutAction() - - data class SetVerticalArrangement( - val id: String, - val verticalArrangement: Arrangement - ) : ComponentAction() - - data class SetHorizontalAlignment( - val id: String, - val horizontalAlignment: Alignment - ) : ComponentAction() - - data class SetVerticalAlignment( - val id: String, - val verticalAlignment: Alignment - ) : ComponentAction() - - data class SetAlignment( - val id: String, - val alignment: Alignment - ) : ComponentAction() - } - - sealed class ModifierAction : ComponentAction() { - data class SetModifier( - val id: String, - val modifier: Modifier - ) : ModifierAction() - - data class SetFillMaxSize( - val id: String, - val fillMaxSize: Boolean - ) : ModifierAction() - - data class SetFillMaxHeight( - val id: String, - val fillMaxHeight: Boolean - ) : ModifierAction() - - data class SetFillMaxWidth( - val id: String, - val fillMaxWidth: Boolean - ) : ModifierAction() - - data class SetHeight( - val id: String, - val height: Int - ) : ModifierAction() - - data class SetWidth( - val id: String, - val width: Int - ) : ModifierAction() - - data class SetPadding( - val id: String, - val padding: Padding - ) : ModifierAction() - - data class SetMargin( - val id: String, - val margin: Margin - ) : ModifierAction() - - data class SetBackground( - val id: String, - val background: Color - ) : ModifierAction() - - data class SetWeight( - val id: String, - val weight: Float - ) : ModifierAction() - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/actions/ScreenAction.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/actions/ScreenAction.kt deleted file mode 100644 index 2430c646..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/actions/ScreenAction.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.dropbox.desktop.componentbox.store.actions - -import com.dropbox.componentbox.foundation.Alignment -import com.dropbox.componentbox.foundation.Arrangement - -sealed class ScreenAction { - data class SetTitle(val title: String) : ScreenAction() - data class SetHorizontalAlignment(val alignment: Alignment) : ScreenAction() - data class SetVerticalArrangement(val arrangement: Arrangement) : ScreenAction() - object ToggleBottomTabs : ScreenAction() - object ToggleNightMode : ScreenAction() - object TogglePreview : ScreenAction() -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/actions/ThemeAction.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/actions/ThemeAction.kt deleted file mode 100644 index 36dbc40d..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/actions/ThemeAction.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.dropbox.desktop.componentbox.store.actions - -import com.dropbox.componentbox.foundation.Color - -sealed class ThemeAction { - object ToggleNightMode : ThemeAction() - data class SetColors( - val colors: MutableList - ) : ThemeAction() - - data class SetBackground( - val color: Color - ): ThemeAction() -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/componentReducer.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/componentReducer.kt deleted file mode 100644 index bbd23b3b..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/componentReducer.kt +++ /dev/null @@ -1,79 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component - -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.main.addNode -import com.dropbox.desktop.componentbox.store.reducers.component.main.clear -import com.dropbox.desktop.componentbox.store.reducers.component.main.clearActiveNode -import com.dropbox.desktop.componentbox.store.reducers.component.main.removeNode -import com.dropbox.desktop.componentbox.store.reducers.component.main.setAction -import com.dropbox.desktop.componentbox.store.reducers.component.main.setActiveNode -import com.dropbox.desktop.componentbox.store.reducers.component.main.setAlignment -import com.dropbox.desktop.componentbox.store.reducers.component.main.setBackground -import com.dropbox.desktop.componentbox.store.reducers.component.main.setButtonVariant -import com.dropbox.desktop.componentbox.store.reducers.component.main.setColor -import com.dropbox.desktop.componentbox.store.reducers.component.main.setContentScale -import com.dropbox.desktop.componentbox.store.reducers.component.main.setDrawableName -import com.dropbox.desktop.componentbox.store.reducers.component.main.setFillMaxHeight -import com.dropbox.desktop.componentbox.store.reducers.component.main.setFillMaxSize -import com.dropbox.desktop.componentbox.store.reducers.component.main.setFillMaxWidth -import com.dropbox.desktop.componentbox.store.reducers.component.main.setHeight -import com.dropbox.desktop.componentbox.store.reducers.component.main.setHorizontalAlignment -import com.dropbox.desktop.componentbox.store.reducers.component.main.setHorizontalArrangement -import com.dropbox.desktop.componentbox.store.reducers.component.main.setIsChecked -import com.dropbox.desktop.componentbox.store.reducers.component.main.setIsEnabled -import com.dropbox.desktop.componentbox.store.reducers.component.main.setIsLazy -import com.dropbox.desktop.componentbox.store.reducers.component.main.setMargin -import com.dropbox.desktop.componentbox.store.reducers.component.main.setModifier -import com.dropbox.desktop.componentbox.store.reducers.component.main.setPadding -import com.dropbox.desktop.componentbox.store.reducers.component.main.setText -import com.dropbox.desktop.componentbox.store.reducers.component.main.setTextStyle -import com.dropbox.desktop.componentbox.store.reducers.component.main.setVectorName -import com.dropbox.desktop.componentbox.store.reducers.component.main.setVerticalAlignment -import com.dropbox.desktop.componentbox.store.reducers.component.main.setVerticalArrangement -import com.dropbox.desktop.componentbox.store.reducers.component.main.setWeight -import com.dropbox.desktop.componentbox.store.reducers.component.main.setWidth -import com.dropbox.desktop.componentbox.store.state.ComponentState - -fun componentReducer(state: ComponentState, action: Any): ComponentState { - return state.copy().let { nextState -> - when (action) { - ComponentAction.Clear -> nextState.clear() - ComponentAction.ClearActiveNode -> nextState.clearActiveNode() - - is ComponentAction.AddNode -> nextState.addNode(action) - is ComponentAction.RemoveNode -> nextState.removeNode(action) - - is ComponentAction.SetAction -> nextState.setAction(action) - is ComponentAction.SetActiveNode -> nextState.setActiveNode(action) - is ComponentAction.SetButtonVariant -> nextState.setButtonVariant(action) - is ComponentAction.SetColor -> nextState.setColor(action) - is ComponentAction.SetContentScale -> nextState.setContentScale(action) - is ComponentAction.SetDrawableName -> nextState.setDrawableName(action) - is ComponentAction.SetIsChecked -> nextState.setIsChecked(action) - is ComponentAction.SetIsEnabled -> nextState.setIsEnabled(action) - is ComponentAction.SetIsLazy -> nextState.setIsLazy(action) - is ComponentAction.SetText -> nextState.setText(action) - is ComponentAction.SetTextStyle -> nextState.setTextStyle(action) - is ComponentAction.SetVectorName -> nextState.setVectorName(action) - - is ComponentAction.ModifierAction.SetBackground -> nextState.setBackground(action) - is ComponentAction.ModifierAction.SetFillMaxHeight -> nextState.setFillMaxHeight(action) - is ComponentAction.ModifierAction.SetFillMaxSize -> nextState.setFillMaxSize(action) - is ComponentAction.ModifierAction.SetFillMaxWidth -> nextState.setFillMaxWidth(action) - is ComponentAction.ModifierAction.SetHeight -> nextState.setHeight(action) - is ComponentAction.ModifierAction.SetMargin -> nextState.setMargin(action) - is ComponentAction.ModifierAction.SetModifier -> nextState.setModifier(action) - is ComponentAction.ModifierAction.SetPadding -> nextState.setPadding(action) - is ComponentAction.ModifierAction.SetWeight -> nextState.setWeight(action) - is ComponentAction.ModifierAction.SetWidth -> nextState.setWidth(action) - - is ComponentAction.LayoutAction.SetAlignment -> nextState.setAlignment(action) - is ComponentAction.LayoutAction.SetHorizontalAlignment -> nextState.setHorizontalAlignment(action) - is ComponentAction.LayoutAction.SetHorizontalArrangement -> nextState.setHorizontalArrangement(action) - is ComponentAction.LayoutAction.SetVerticalAlignment -> nextState.setVerticalAlignment(action) - is ComponentAction.LayoutAction.SetVerticalArrangement -> nextState.setVerticalArrangement(action) - - else -> nextState - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/buildComponent.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/buildComponent.kt deleted file mode 100644 index f2866d7e..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/buildComponent.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.helpers - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.ComponentType -import com.dropbox.componentbox.foundation.Modifier - -internal fun ComponentType.build(id: String): Component { - return when (this) { - ComponentType.Box -> Component.Box(id, modifier = Modifier()) - ComponentType.Button -> Component.Button(id, modifier = Modifier()) - ComponentType.Column -> Component.Column(id, modifier = Modifier()) - ComponentType.Drawable -> Component.Drawable(id, modifier = Modifier()) - ComponentType.LazyColumn -> Component.Column(id, isLazy = true, modifier = Modifier()) - ComponentType.LazyRow -> Component.Row(id, isLazy = true, modifier = Modifier()) - ComponentType.Row -> Component.Row(id, modifier = Modifier()) - ComponentType.Switch -> Component.Switch(id, modifier = Modifier()) - ComponentType.Table -> Component.Column(id, isLazy = true, isTable = true, modifier = Modifier()) - ComponentType.Text -> Component.Text(id, modifier = Modifier()) - ComponentType.Vector -> Component.Vector(id, modifier = Modifier()) - ComponentType.Surface -> Component.Surface(id, modifier = Modifier()) - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/componentId.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/componentId.kt deleted file mode 100644 index e20cfd92..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/componentId.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.helpers - -import com.dropbox.componentbox.foundation.Component - -internal fun Component?.componentId() = when (this) { - is Component.Box -> this.id - is Component.Button -> this.id - is Component.Column -> this.id - is Component.Drawable -> this.id - is Component.Row -> this.id - is Component.Switch -> this.id - is Component.Text -> this.id - is Component.Vector -> this.id - is Component.Surface -> this.id - else -> null -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/getChildAndParentComponentById.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/getChildAndParentComponentById.kt deleted file mode 100644 index e740eee6..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/getChildAndParentComponentById.kt +++ /dev/null @@ -1,25 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.helpers - -import com.dropbox.desktop.componentbox.data.entities.ChildAndParentComponent -import com.dropbox.componentbox.foundation.Component - -internal fun MutableList.getChildAndParentComponentById(id: String): ChildAndParentComponent? { - val queue = toMutableList() - .map { rootComponent -> ChildAndParentComponent(child = rootComponent, parent = null) } - .toMutableList() - - while (queue.isNotEmpty()) { - val current = queue.removeAt(0) - if (current.child.componentId() == id) return current - - val next = current.child - .getComponentChildren() - ?.map { ChildAndParentComponent(child = it, parent = current.child) } - ?.toMutableList() - if (next != null) { - queue.addAll(next) - } - } - - return null -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/getChildAndParentNodeById.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/getChildAndParentNodeById.kt deleted file mode 100644 index 9dd32cda..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/getChildAndParentNodeById.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.helpers - -import com.dropbox.desktop.componentbox.data.entities.ChildAndParentNode -import com.dropbox.desktop.componentbox.data.entities.Node - -internal fun MutableList.getChildAndParentNodeById(id: String): ChildAndParentNode? { - val queue = toMutableList() - .map { rootNode -> ChildAndParentNode(child = rootNode, parent = null) } - .toMutableList() - - while (queue.isNotEmpty()) { - val current = queue.removeAt(0) - if (current.child.id == id) return current - val next = current.child.children - .map { child -> ChildAndParentNode(child = child, parent = current.child) } - .toMutableList() - queue.addAll(next) - } - - return null -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/getComponentById.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/getComponentById.kt deleted file mode 100644 index 9eab1370..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/getComponentById.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.helpers - -import com.dropbox.componentbox.foundation.Component - -internal fun MutableList.getComponentById(id: String): Component? { - val copy = toMutableList() - while (copy.size > 0) { - val component = copy.removeAt(0) - val componentId = component.componentId() - if (componentId == id) return component - val children = component.getComponentChildren() - if (children != null) { - copy.addAll(children) - } - } - return null -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/getComponentChildren.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/getComponentChildren.kt deleted file mode 100644 index ec2c3e59..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/getComponentChildren.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.helpers - -import com.dropbox.componentbox.foundation.Component - -internal fun Component.getComponentChildren(): MutableList? { - return let { component -> - when (component) { - is Component.Box -> component.components - is Component.Button -> component.components - is Component.Column -> component.components - is Component.Row -> component.components - is Component.Surface -> component.components - else -> null - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/getNodeById.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/getNodeById.kt deleted file mode 100644 index 18262b58..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/getNodeById.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.helpers - -import com.dropbox.desktop.componentbox.data.entities.Node - -internal fun MutableList.getNodeById(id: String): Node? { - val copy = toMutableList() - while (copy.isNotEmpty()) { - val node = copy.removeAt(0) - if (node.id == id) return node - copy.addAll(node.children) - } - return null -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/insertComponent.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/insertComponent.kt deleted file mode 100644 index 0d162b07..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/insertComponent.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.helpers - -import com.dropbox.componentbox.foundation.Component - -internal fun MutableList.insertComponent(component: Component, index: Int? = null) { - if (index == null) { - add(component) - } else { - add(index, component) - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/insertNode.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/insertNode.kt deleted file mode 100644 index 9771a693..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/insertNode.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.helpers - -import com.dropbox.desktop.componentbox.data.entities.Node - -internal fun MutableList.insertNode(node: Node, index: Int? = null) { - if (index == null) { - add(node) - } else { - add(index, node) - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/removeChildFromParentComponent.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/removeChildFromParentComponent.kt deleted file mode 100644 index e1ae532e..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/removeChildFromParentComponent.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.helpers - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.removeChildFromParentComponent(child: Component, parent: Component): ComponentState { - return apply { - val nextChildren = parent - .getComponentChildren() - ?.filter { it.componentId() != child.componentId() } - ?.toMutableList() - - if (nextChildren != null) { - parent.setComponentChildren(nextChildren) - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/removeChildFromParentNode.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/removeChildFromParentNode.kt deleted file mode 100644 index a790732d..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/removeChildFromParentNode.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.helpers - -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.removeChildFromParentNode(child: Node, parent: Node): ComponentState { - return apply { - parent.children = parent.children - .filter { it.id != child.id } - .toMutableList() - } -} diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/removeNodeAndDescendentsFromMap.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/removeNodeAndDescendentsFromMap.kt deleted file mode 100644 index 3b68e981..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/removeNodeAndDescendentsFromMap.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.helpers - -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.removeNodeAndDescendentsFromMap(node: Node): ComponentState { - return apply { - val queue = mutableListOf(node) - while (queue.isNotEmpty()) { - val current = queue.removeAt(0) - idToComponent.remove(current.id) - queue.addAll(current.children) - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/removeRootComponent.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/removeRootComponent.kt deleted file mode 100644 index 281f8af7..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/removeRootComponent.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.helpers - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.removeRootComponent(component: Component): ComponentState { - return apply { - rootComponents = rootComponents - .filter { it.componentId() != component.componentId() } - .toMutableList() - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/removeRootNode.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/removeRootNode.kt deleted file mode 100644 index 21460d4e..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/removeRootNode.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.helpers - -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.removeRootNode(node: Node): ComponentState { - return apply { - nodes = nodes - .filter { it.id != node.id } - .toMutableList() - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/setComponentChildren.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/setComponentChildren.kt deleted file mode 100644 index e442fb89..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/helpers/setComponentChildren.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.helpers - -import com.dropbox.componentbox.foundation.Component - -internal fun Component?.setComponentChildren(children: MutableList) { - apply { - when (this) { - is Component.Box -> components = children - is Component.Button -> components = children - is Component.Column -> components = children - is Component.Row -> components = children - is Component.Surface -> components = children - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/addNode.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/addNode.kt deleted file mode 100644 index c1d2f4c6..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/addNode.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.build -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentChildren -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getNodeById -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.insertComponent -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.insertNode -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.setComponentChildren -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.addNode(action: ComponentAction.AddNode): ComponentState { - return apply { - val component = action.node.type.build(action.node.id) - - if (action.parentId == null) { - nodes.insertNode(action.node, action.index) - rootComponents.insertComponent(component) - } else { - val parentNode = nodes.getNodeById(action.parentId) - parentNode?.children?.insertNode(action.node, action.index) - - val parentComponent = rootComponents.getComponentById(action.parentId) - val nextChildren = parentComponent?.getComponentChildren() - if (nextChildren != null) { - nextChildren.insertComponent(component, action.index) - parentComponent.setComponentChildren(nextChildren) - } else { - parentComponent.setComponentChildren(mutableListOf(component)) - } - } - - idToComponent[action.node.id] = component - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/clear.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/clear.kt deleted file mode 100644 index d8d7cb94..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/clear.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.clear(): ComponentState { - return apply { - idToComponent = mutableMapOf() - nodes = mutableListOf() - rootComponents = mutableListOf() - activeNode = null - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/clearActiveNode.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/clearActiveNode.kt deleted file mode 100644 index 8db6c5a6..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/clearActiveNode.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.clearActiveNode(): ComponentState { - return apply { - activeNode = null - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/removeNode.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/removeNode.kt deleted file mode 100644 index c57b143e..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/removeNode.kt +++ /dev/null @@ -1,44 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getChildAndParentComponentById -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getChildAndParentNodeById -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.removeChildFromParentComponent -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.removeChildFromParentNode -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.removeNodeAndDescendentsFromMap -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.removeRootComponent -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.removeRootNode -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.removeNode(action: ComponentAction.RemoveNode): ComponentState { - return apply { - val childAndParentNode = nodes.getChildAndParentNodeById(action.id) - if (childAndParentNode?.child != null) { - removeNodeAndDescendentsFromMap(childAndParentNode.child) - - if (childAndParentNode.parent != null) { - removeChildFromParentNode( - childAndParentNode.child, - childAndParentNode.parent - ) - } else removeRootNode(childAndParentNode.child) - } - - val childAndParentComponent = rootComponents.getChildAndParentComponentById(action.id) - if (childAndParentComponent?.child != null) { - if (childAndParentComponent.parent != null) { - removeChildFromParentComponent( - childAndParentComponent.child, - childAndParentComponent.parent - ) - } else removeRootComponent(childAndParentComponent.child) - } - } -} - - - - - - - diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setAction.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setAction.kt deleted file mode 100644 index 7503aa3f..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setAction.kt +++ /dev/null @@ -1,29 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setAction(action: ComponentAction.SetAction): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setAction(action.action) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setAction(action.action) - } -} - -private fun Component.setAction(action: String): Component { - return apply { - when (this) { - is Component.Box -> this.action = action - is Component.Button -> this.action = action - is Component.Column -> this.action = action - is Component.Row -> this.action = action - is Component.Switch -> this.action = action - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setActiveNode.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setActiveNode.kt deleted file mode 100644 index cc0e25c6..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setActiveNode.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setActiveNode(action: ComponentAction.SetActiveNode): ComponentState { - return apply { - activeNode = action.node.copy() - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setAlignment.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setAlignment.kt deleted file mode 100644 index f66bc4dc..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setAlignment.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Alignment -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setAlignment(action: ComponentAction.LayoutAction.SetAlignment): ComponentState { - return apply { - val component = idToComponent[action.id] - component.setAlignment(action.alignment) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent.setAlignment(action.alignment) - } -} - -private fun Component?.setAlignment(alignment: Alignment): Component? { - return apply { - when (this) { - is Component.Drawable -> this.alignment = alignment - is Component.Vector -> this.alignment = alignment - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setBackground.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setBackground.kt deleted file mode 100644 index de169ca8..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setBackground.kt +++ /dev/null @@ -1,34 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Color -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setBackground(action: ComponentAction.ModifierAction.SetBackground): ComponentState { - return apply { - val component = idToComponent[action.id] - component.setBackground(action.background) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent.setBackground(action.background) - } -} - -private fun Component?.setBackground(background: Color): Component? { - return apply { - when (this) { - is Component.Box -> modifier?.background = background - is Component.Button -> modifier?.background = background - is Component.Column -> modifier?.background = background - is Component.Drawable -> modifier?.background = background - is Component.Row -> modifier?.background = background - is Component.Switch -> modifier?.background = background - is Component.Text -> modifier?.background = background - is Component.Vector -> modifier?.background = background - is Component.Surface -> modifier?.background = background - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setButtonVariant.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setButtonVariant.kt deleted file mode 100644 index bf06c00d..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setButtonVariant.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setButtonVariant(action: ComponentAction.SetButtonVariant): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setVariant(action.variant) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setVariant(action.variant) - } -} - -private fun Component.setVariant(variant: String): Component { - return apply { - if (this is Component.Button) { - this.variant = variant - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setColor.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setColor.kt deleted file mode 100644 index f84b9ff5..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setColor.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Color -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setColor(action: ComponentAction.SetColor): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setColor(action.color) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setColor(action.color) - } -} - -private fun Component.setColor(color: Color): Component { - return apply { - when (this) { - is Component.Text -> this.color = color - is Component.Vector -> this.color = color - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setContentScale.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setContentScale.kt deleted file mode 100644 index 40665d42..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setContentScale.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.ContentScale -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setContentScale(action: ComponentAction.SetContentScale): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setContentScale(action.contentScale) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setContentScale(action.contentScale) - } -} - -private fun Component.setContentScale(contentScale: ContentScale): Component { - return apply { - when (this) { - is Component.Drawable -> this.contentScale = contentScale - is Component.Vector -> this.contentScale = contentScale - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setDrawableName.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setDrawableName.kt deleted file mode 100644 index bf5e19b0..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setDrawableName.kt +++ /dev/null @@ -1,25 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setDrawableName(action: ComponentAction.SetDrawableName): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setDrawableName(action.name) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setDrawableName(action.name) - } -} - -private fun Component.setDrawableName(name: String): Component { - return apply { - when (this) { - is Component.Drawable -> this.name = name - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setFillMaxHeight.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setFillMaxHeight.kt deleted file mode 100644 index 823c1dba..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setFillMaxHeight.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setFillMaxHeight(action: ComponentAction.ModifierAction.SetFillMaxHeight): ComponentState { - return apply { - val component = idToComponent[action.id] - component.setFillMaxHeight(action.fillMaxHeight) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent.setFillMaxHeight(action.fillMaxHeight) - } -} - -private fun Component?.setFillMaxHeight(fillMaxHeight: Boolean): Component? { - return apply { - when (this) { - is Component.Box -> modifier?.fillMaxHeight = fillMaxHeight - is Component.Button -> modifier?.fillMaxHeight = fillMaxHeight - is Component.Column -> modifier?.fillMaxHeight = fillMaxHeight - is Component.Drawable -> modifier?.fillMaxHeight = fillMaxHeight - is Component.Row -> modifier?.fillMaxHeight = fillMaxHeight - is Component.Switch -> modifier?.fillMaxHeight = fillMaxHeight - is Component.Text -> modifier?.fillMaxHeight = fillMaxHeight - is Component.Vector -> modifier?.fillMaxHeight = fillMaxHeight - is Component.Surface -> modifier?.fillMaxHeight = fillMaxHeight - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setFillMaxSize.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setFillMaxSize.kt deleted file mode 100644 index 30bfb4ce..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setFillMaxSize.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setFillMaxSize(action: ComponentAction.ModifierAction.SetFillMaxSize): ComponentState { - return apply { - val component = idToComponent[action.id] - component.setFillMaxSize(action.fillMaxSize) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent.setFillMaxSize(action.fillMaxSize) - } -} - -private fun Component?.setFillMaxSize(fillMaxSize: Boolean): Component? { - return apply { - when (this) { - is Component.Box -> modifier?.fillMaxSize = fillMaxSize - is Component.Button -> modifier?.fillMaxSize = fillMaxSize - is Component.Column -> modifier?.fillMaxSize = fillMaxSize - is Component.Drawable -> modifier?.fillMaxSize = fillMaxSize - is Component.Row -> modifier?.fillMaxSize = fillMaxSize - is Component.Switch -> modifier?.fillMaxSize = fillMaxSize - is Component.Text -> modifier?.fillMaxSize = fillMaxSize - is Component.Vector -> modifier?.fillMaxSize = fillMaxSize - is Component.Surface -> modifier?.fillMaxSize = fillMaxSize - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setFillMaxWidth.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setFillMaxWidth.kt deleted file mode 100644 index 8fcf223c..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setFillMaxWidth.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setFillMaxWidth(action: ComponentAction.ModifierAction.SetFillMaxWidth): ComponentState { - return apply { - val component = idToComponent[action.id] - component.setFillMaxWidth(action.fillMaxWidth) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent.setFillMaxWidth(action.fillMaxWidth) - } -} - -private fun Component?.setFillMaxWidth(fillMaxWidth: Boolean): Component? { - return apply { - when (this) { - is Component.Box -> modifier?.fillMaxWidth = fillMaxWidth - is Component.Button -> modifier?.fillMaxWidth = fillMaxWidth - is Component.Column -> modifier?.fillMaxWidth = fillMaxWidth - is Component.Drawable -> modifier?.fillMaxWidth = fillMaxWidth - is Component.Row -> modifier?.fillMaxWidth = fillMaxWidth - is Component.Switch -> modifier?.fillMaxWidth = fillMaxWidth - is Component.Text -> modifier?.fillMaxWidth = fillMaxWidth - is Component.Vector -> modifier?.fillMaxWidth = fillMaxWidth - is Component.Surface -> modifier?.fillMaxWidth = fillMaxWidth - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setHeight.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setHeight.kt deleted file mode 100644 index 583237fb..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setHeight.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setHeight(action: ComponentAction.ModifierAction.SetHeight): ComponentState { - return apply { - val component = idToComponent[action.id] - component.setHeight(action.height) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent.setHeight(action.height) - } -} - -private fun Component?.setHeight(height: Int): Component? { - return apply { - when (this) { - is Component.Box -> modifier?.height = height - is Component.Button -> modifier?.height = height - is Component.Column -> modifier?.height = height - is Component.Drawable -> modifier?.height = height - is Component.Row -> modifier?.height = height - is Component.Switch -> modifier?.height = height - is Component.Text -> modifier?.height = height - is Component.Vector -> modifier?.height = height - is Component.Surface -> modifier?.height = height - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setHorizontalAlignment.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setHorizontalAlignment.kt deleted file mode 100644 index f9f22329..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setHorizontalAlignment.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Alignment -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setHorizontalAlignment(action: ComponentAction.LayoutAction.SetHorizontalAlignment): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setHorizontalAlignment(action.horizontalAlignment) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setHorizontalAlignment(action.horizontalAlignment) - } -} - -private fun Component.setHorizontalAlignment(horizontalAlignment: Alignment): Component { - return apply { - when (this) { - is Component.Column -> this.horizontalAlignment = horizontalAlignment - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setHorizontalArrangement.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setHorizontalArrangement.kt deleted file mode 100644 index e9398aa0..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setHorizontalArrangement.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Arrangement -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setHorizontalArrangement(action: ComponentAction.LayoutAction.SetHorizontalArrangement): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setHorizontalArrangement(action.horizontalArrangement) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setHorizontalArrangement(action.horizontalArrangement) - } -} - -private fun Component.setHorizontalArrangement(horizontalArrangement: Arrangement): Component { - return apply { - when (this) { - is Component.Box -> this.horizontalArrangement = horizontalArrangement - is Component.Row -> this.horizontalArrangement = horizontalArrangement - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setIsChecked.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setIsChecked.kt deleted file mode 100644 index 77d55d5e..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setIsChecked.kt +++ /dev/null @@ -1,25 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setIsChecked(action: ComponentAction.SetIsChecked): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setIsChecked(action.isChecked) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setIsChecked(action.isChecked) - } -} - -private fun Component.setIsChecked(isChecked: Boolean): Component { - return apply { - when (this) { - is Component.Switch -> this.isChecked = isChecked - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setIsEnabled.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setIsEnabled.kt deleted file mode 100644 index 5224801f..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setIsEnabled.kt +++ /dev/null @@ -1,25 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setIsEnabled(action: ComponentAction.SetIsEnabled): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setIsEnabled(action.isEnabled) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setIsEnabled(action.isEnabled) - } -} - -private fun Component.setIsEnabled(isEnabled: Boolean): Component { - return apply { - when (this) { - is Component.Button -> this.isEnabled = isEnabled - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setIsLazy.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setIsLazy.kt deleted file mode 100644 index b19d57e8..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setIsLazy.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setIsLazy(action: ComponentAction.SetIsLazy): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setIsLazy(action.isLazy) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setIsLazy(action.isLazy) - } -} - -private fun Component.setIsLazy(isLazy: Boolean): Component { - return apply { - when (this) { - is Component.Column -> this.isLazy = isLazy - is Component.Row -> this.isLazy = isLazy - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setMargin.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setMargin.kt deleted file mode 100644 index 6219f310..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setMargin.kt +++ /dev/null @@ -1,37 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Margin -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setMargin(action: ComponentAction.ModifierAction.SetMargin): ComponentState { - return apply { - val nextIdToComponent = idToComponent.toMutableMap() - nextIdToComponent[action.id].setMargin(action.margin) - - val nextRootComponents = rootComponents.toMutableList() - nextRootComponents.getComponentById(action.id).setMargin(action.margin) - - this.idToComponent = nextIdToComponent - rootComponents = nextRootComponents - } -} - -private fun Component?.setMargin(margin: Margin): Component? { - return apply { - when (this) { - is Component.Box -> modifier?.margin = margin.copy() - is Component.Button -> modifier?.margin = margin.copy() - is Component.Column -> modifier?.margin = margin.copy() - is Component.Drawable -> modifier?.margin = margin.copy() - is Component.Row -> modifier?.margin = margin.copy() - is Component.Switch -> modifier?.margin = margin.copy() - is Component.Text -> modifier?.margin = margin.copy() - is Component.Vector -> modifier?.margin = margin.copy() - is Component.Surface -> modifier?.margin = margin.copy() - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setModifier.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setModifier.kt deleted file mode 100644 index b03f18ac..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setModifier.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Modifier -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setModifier(action: ComponentAction.ModifierAction.SetModifier): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setModifier(action.modifier) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setModifier(action.modifier) - } -} - -private fun Component.setModifier(modifier: Modifier): Component { - return apply { - when (this) { - is Component.Box -> this.modifier = modifier - is Component.Button -> this.modifier = modifier - is Component.Column -> this.modifier = modifier - is Component.Drawable -> this.modifier = modifier - is Component.Row -> this.modifier = modifier - is Component.Switch -> this.modifier = modifier - is Component.Text -> this.modifier = modifier - is Component.Vector -> this.modifier = modifier - is Component.Surface -> this.modifier = modifier - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setPadding.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setPadding.kt deleted file mode 100644 index f7798833..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setPadding.kt +++ /dev/null @@ -1,34 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Padding -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setPadding(action: ComponentAction.ModifierAction.SetPadding): ComponentState { - return apply { - val component = idToComponent[action.id] - component.setPadding(action.padding) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent.setPadding(action.padding) - } -} - -private fun Component?.setPadding(padding: Padding): Component? { - return apply { - when (this) { - is Component.Box -> modifier?.padding = padding - is Component.Button -> modifier?.padding = padding - is Component.Column -> modifier?.padding = padding - is Component.Drawable -> modifier?.padding = padding - is Component.Row -> modifier?.padding = padding - is Component.Switch -> modifier?.padding = padding - is Component.Text -> modifier?.padding = padding - is Component.Vector -> modifier?.padding = padding - is Component.Surface -> modifier?.padding = padding - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setText.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setText.kt deleted file mode 100644 index cfdf8165..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setText.kt +++ /dev/null @@ -1,25 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setText(action: ComponentAction.SetText): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setText(action.text) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setText(action.text) - } -} - -private fun Component.setText(text: String): Component { - return apply { - when (this) { - is Component.Text -> this.text = text - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setTextStyle.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setTextStyle.kt deleted file mode 100644 index c6ee6112..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setTextStyle.kt +++ /dev/null @@ -1,25 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setTextStyle(action: ComponentAction.SetTextStyle): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setTextStyle(action.style) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setTextStyle(action.style) - } -} - -private fun Component.setTextStyle(style: String): Component { - return apply { - when (this) { - is Component.Text -> this.textStyle = style - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setVectorName.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setVectorName.kt deleted file mode 100644 index 2672514b..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setVectorName.kt +++ /dev/null @@ -1,25 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setVectorName(action: ComponentAction.SetVectorName): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setVectorName(action.name) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setVectorName(action.name) - } -} - -private fun Component.setVectorName(name: String): Component { - return apply { - when (this) { - is Component.Vector -> this.name = name - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setVerticalAlignment.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setVerticalAlignment.kt deleted file mode 100644 index d090ff37..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setVerticalAlignment.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Alignment -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setVerticalAlignment(action: ComponentAction.LayoutAction.SetVerticalAlignment): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setVerticalAlignment(action.verticalAlignment) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setVerticalAlignment(action.verticalAlignment) - } -} - -private fun Component.setVerticalAlignment(verticalAlignment: Alignment): Component { - return apply { - when (this) { - is Component.Box -> this.verticalAlignment = verticalAlignment - is Component.Row -> this.verticalAlignment = verticalAlignment - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setVerticalArrangement.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setVerticalArrangement.kt deleted file mode 100644 index d7bb44d2..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setVerticalArrangement.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Arrangement -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setVerticalArrangement(action: ComponentAction.LayoutAction.SetVerticalArrangement): ComponentState { - return apply { - val component = idToComponent[action.id] - component?.setVerticalArrangement(action.verticalArrangement) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent?.setVerticalArrangement(action.verticalArrangement) - } -} - -private fun Component.setVerticalArrangement(verticalArrangement: Arrangement): Component { - return apply { - when (this) { - is Component.Column -> this.verticalArrangement = verticalArrangement - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setWeight.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setWeight.kt deleted file mode 100644 index 66aa4fc3..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setWeight.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setWeight(action: ComponentAction.ModifierAction.SetWeight): ComponentState { - return apply { - val component = idToComponent[action.id] - component.setWeight(action.weight) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent.setWeight(action.weight) - } -} - -private fun Component?.setWeight(weight: Float): Component? { - return apply { - when (this) { - is Component.Box -> modifier?.weight = weight - is Component.Button -> modifier?.weight = weight - is Component.Column -> modifier?.weight = weight - is Component.Drawable -> modifier?.weight = weight - is Component.Row -> modifier?.weight = weight - is Component.Switch -> modifier?.weight = weight - is Component.Text -> modifier?.weight = weight - is Component.Vector -> modifier?.weight = weight - is Component.Surface -> modifier?.weight = weight - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setWidth.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setWidth.kt deleted file mode 100644 index d3b48e0d..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/component/main/setWidth.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.component.main - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.reducers.component.helpers.getComponentById -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentState.setWidth(action: ComponentAction.ModifierAction.SetWidth): ComponentState { - return apply { - val component = idToComponent[action.id] - component.setWidth(action.width) - - val rootComponent = rootComponents.getComponentById(action.id) - rootComponent.setWidth(action.width) - } -} - -private fun Component?.setWidth(width: Int): Component? { - return apply { - when (this) { - is Component.Box -> modifier?.width = width - is Component.Button -> modifier?.width = width - is Component.Column -> modifier?.width = width - is Component.Drawable -> modifier?.width = width - is Component.Row -> modifier?.width = width - is Component.Switch -> modifier?.width = width - is Component.Text -> modifier?.width = width - is Component.Vector -> modifier?.width = width - is Component.Surface -> modifier?.width = width - else -> {} - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/rootReducer.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/rootReducer.kt deleted file mode 100644 index eebaff80..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/rootReducer.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers - -import com.dropbox.desktop.componentbox.store.reducers.component.componentReducer -import com.dropbox.desktop.componentbox.store.reducers.screen.screenReducer -import com.dropbox.desktop.componentbox.store.reducers.theme.themeReducer -import com.dropbox.desktop.componentbox.store.state.AppState - -fun rootReducer(state: AppState, action: Any) = AppState( - componentState = componentReducer(state.componentState, action), - screenState = screenReducer(state.screenState, action), - themeState = themeReducer(state.themeState, action) -) \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/setHorizontalAlignment.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/setHorizontalAlignment.kt deleted file mode 100644 index eae0fefa..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/setHorizontalAlignment.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.screen.main - -import com.dropbox.desktop.componentbox.store.actions.ScreenAction -import com.dropbox.desktop.componentbox.store.state.ScreenState - -internal fun ScreenState.setHorizontalAlignment(action: ScreenAction.SetHorizontalAlignment): ScreenState { - return apply { - horizontalAlignment = action.alignment - } -} diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/setTitle.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/setTitle.kt deleted file mode 100644 index 50d289c4..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/setTitle.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.screen.main - -import com.dropbox.desktop.componentbox.store.actions.ScreenAction -import com.dropbox.desktop.componentbox.store.state.ScreenState - -internal fun ScreenState.setTitle(action: ScreenAction.SetTitle): ScreenState { - return apply { - title = action.title - } -} diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/setVerticalArrangement.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/setVerticalArrangement.kt deleted file mode 100644 index 1a782262..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/setVerticalArrangement.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.screen.main - -import com.dropbox.desktop.componentbox.store.actions.ScreenAction -import com.dropbox.desktop.componentbox.store.state.ScreenState - -internal fun ScreenState.setVerticalArrangement(action: ScreenAction.SetVerticalArrangement): ScreenState { - return apply { - verticalArrangement = action.arrangement - } -} diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/toggleBottomTabs.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/toggleBottomTabs.kt deleted file mode 100644 index 1527a5df..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/toggleBottomTabs.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.screen.main - -import com.dropbox.desktop.componentbox.store.state.ScreenState - -internal fun ScreenState.toggleBottomTabs(): ScreenState { - return apply { - showBottomTabs = !showBottomTabs - } -} diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/toggleNightMode.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/toggleNightMode.kt deleted file mode 100644 index 106af3bf..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/toggleNightMode.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.screen.main - -import com.dropbox.desktop.componentbox.store.state.ScreenState - -internal fun ScreenState.toggleNightMode(): ScreenState { - return apply { - isNightMode = !isNightMode - } -} diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/togglePreview.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/togglePreview.kt deleted file mode 100644 index 73100a19..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/main/togglePreview.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.screen.main - -import com.dropbox.desktop.componentbox.store.state.ScreenState - -internal fun ScreenState.togglePreview(): ScreenState { - return apply { - isPreview = !isPreview - } -} diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/screenReducer.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/screenReducer.kt deleted file mode 100644 index 02f04e33..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/screen/screenReducer.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.screen - -import com.dropbox.desktop.componentbox.store.actions.ScreenAction -import com.dropbox.desktop.componentbox.store.reducers.screen.main.setHorizontalAlignment -import com.dropbox.desktop.componentbox.store.reducers.screen.main.setTitle -import com.dropbox.desktop.componentbox.store.reducers.screen.main.setVerticalArrangement -import com.dropbox.desktop.componentbox.store.reducers.screen.main.toggleBottomTabs -import com.dropbox.desktop.componentbox.store.reducers.screen.main.toggleNightMode -import com.dropbox.desktop.componentbox.store.reducers.screen.main.togglePreview -import com.dropbox.desktop.componentbox.store.state.ScreenState - -fun screenReducer(state: ScreenState, action: Any): ScreenState { - return state.copy().let { nextState -> - when (action) { - ScreenAction.ToggleBottomTabs -> nextState.toggleBottomTabs() - ScreenAction.ToggleNightMode -> nextState.toggleNightMode() - ScreenAction.TogglePreview -> nextState.togglePreview() - - is ScreenAction.SetHorizontalAlignment -> nextState.setHorizontalAlignment(action) - is ScreenAction.SetTitle -> nextState.setTitle(action) - is ScreenAction.SetVerticalArrangement -> nextState.setVerticalArrangement(action) - - else -> nextState - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/theme/main/setBackground.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/theme/main/setBackground.kt deleted file mode 100644 index 764ea23c..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/theme/main/setBackground.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.theme.main - -import com.dropbox.desktop.componentbox.store.actions.ThemeAction -import com.dropbox.desktop.componentbox.store.state.ThemeState - -internal fun ThemeState.setBackground(action: ThemeAction.SetBackground): ThemeState { - return apply { - background = action.color - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/theme/main/setColors.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/theme/main/setColors.kt deleted file mode 100644 index f00573b4..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/theme/main/setColors.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.theme.main - -import com.dropbox.desktop.componentbox.store.actions.ThemeAction -import com.dropbox.desktop.componentbox.store.state.ThemeState - -internal fun ThemeState.setColors(action: ThemeAction.SetColors): ThemeState { - return apply { - colors = action.colors - } -} diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/theme/main/toggleNightMode.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/theme/main/toggleNightMode.kt deleted file mode 100644 index f619941d..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/theme/main/toggleNightMode.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.theme.main - -import com.dropbox.desktop.componentbox.store.state.ThemeState - -internal fun ThemeState.toggleNightMode(): ThemeState { - return apply { - isNightMode = !isNightMode - } -} diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/theme/themeReducer.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/theme/themeReducer.kt deleted file mode 100644 index 5f47dda1..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/reducers/theme/themeReducer.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.dropbox.desktop.componentbox.store.reducers.theme - -import com.dropbox.desktop.componentbox.store.actions.ThemeAction -import com.dropbox.desktop.componentbox.store.reducers.theme.main.setColors -import com.dropbox.desktop.componentbox.store.reducers.theme.main.toggleNightMode -import com.dropbox.desktop.componentbox.store.state.ThemeState - -fun themeReducer(state: ThemeState, action: Any): ThemeState { - return state.copy().let { nextState -> - when (action) { - ThemeAction.ToggleNightMode -> nextState.toggleNightMode() - is ThemeAction.SetColors -> nextState.setColors(action) - else -> nextState - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/state/AppState.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/state/AppState.kt deleted file mode 100644 index c28c9e42..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/state/AppState.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.dropbox.desktop.componentbox.store.state - -data class AppState( - val componentState: ComponentState, - val screenState: ScreenState, - val themeState: ThemeState -) \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/state/ComponentState.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/state/ComponentState.kt deleted file mode 100644 index 4fe591bd..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/state/ComponentState.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.dropbox.desktop.componentbox.store.state - -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.componentbox.foundation.Component - -data class ComponentState( - var nodes: MutableList = mutableListOf(), - var idToComponent: MutableMap = mutableMapOf(), - var activeNode: Node? = null, - var rootComponents: MutableList = mutableListOf() -) \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/state/ScreenState.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/state/ScreenState.kt deleted file mode 100644 index cfa3bc8e..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/state/ScreenState.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.dropbox.desktop.componentbox.store.state - -import com.dropbox.componentbox.foundation.Alignment -import com.dropbox.componentbox.foundation.Arrangement - -data class ScreenState( - val id: String, - var title: String? = null, - var verticalArrangement: Arrangement = Arrangement.Top, - var horizontalAlignment: Alignment = Alignment.Start, - var showBottomTabs: Boolean = false, - var isNightMode: Boolean = true, - var isPreview: Boolean = false -) diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/state/ThemeState.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/state/ThemeState.kt deleted file mode 100644 index 574146b3..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/state/ThemeState.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.desktop.componentbox.store.state - -import com.dropbox.componentbox.foundation.Color - -data class ThemeState( - var isNightMode: Boolean = true, - var colors: MutableList = mutableListOf(), - var background: Color = Color("Background", 0xFFFFFFFF, 0xFF161313) -) diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/store.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/store.kt deleted file mode 100644 index 746d07be..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/store.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.dropbox.desktop.componentbox.store - -import com.dropbox.desktop.componentbox.store.reducers.rootReducer -import com.dropbox.desktop.componentbox.store.state.AppState -import com.dropbox.desktop.componentbox.store.state.ComponentState -import com.dropbox.desktop.componentbox.store.state.ScreenState -import com.dropbox.desktop.componentbox.store.state.ThemeState -import com.dropbox.desktop.componentbox.util.id -import org.reduxkotlin.createThreadSafeStore - -val store = createThreadSafeStore( - reducer = ::rootReducer, - preloadedState = AppState( - componentState = ComponentState(), - screenState = ScreenState(id()), - themeState = ThemeState() - ) -) \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncActiveNode.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncActiveNode.kt deleted file mode 100644 index 0a6a0583..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncActiveNode.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.desktop.componentbox.store.subscriptions - -import androidx.compose.runtime.MutableState -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.desktop.componentbox.store.state.AppState - -fun syncActiveNode(state: MutableState, appState: AppState) { - state.value = appState.componentState.activeNode -} diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncBottomTabs.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncBottomTabs.kt deleted file mode 100644 index 71e066b9..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncBottomTabs.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.dropbox.desktop.componentbox.store.subscriptions - -import androidx.compose.runtime.MutableState -import com.dropbox.desktop.componentbox.store.state.AppState - -fun syncBottomTabs(state: MutableState, appState: AppState) { - state.value = appState.screenState.showBottomTabs -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncChildrenNodes.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncChildrenNodes.kt deleted file mode 100644 index 652d8231..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncChildrenNodes.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.dropbox.desktop.componentbox.store.subscriptions - -import androidx.compose.runtime.snapshots.SnapshotStateList -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.desktop.componentbox.store.state.AppState - -fun syncChildrenNodes(state: SnapshotStateList, appState: AppState) { - val children = appState.componentState.activeNode?.children - if (children != null && children.isNotEmpty()) { - state.clear() - state.addAll(children) - } -} diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncComponents.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncComponents.kt deleted file mode 100644 index 9090a4be..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncComponents.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.dropbox.desktop.componentbox.store.subscriptions - -import androidx.compose.runtime.snapshots.SnapshotStateList -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.state.AppState - -fun syncComponents(state: SnapshotStateList, appState: AppState) { - state.clear() - state.addAll(appState.componentState.rootComponents) -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncNightMode.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncNightMode.kt deleted file mode 100644 index dcf98731..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncNightMode.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.dropbox.desktop.componentbox.store.subscriptions - -import androidx.compose.runtime.MutableState -import com.dropbox.desktop.componentbox.store.state.AppState - -fun syncNightMode(state: MutableState, appState: AppState) { - state.value = appState.screenState.isNightMode -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncNodes.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncNodes.kt deleted file mode 100644 index e3a3d0d6..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncNodes.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.dropbox.desktop.componentbox.store.subscriptions - -import androidx.compose.runtime.snapshots.SnapshotStateList -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.desktop.componentbox.store.state.AppState - -fun syncNodes(state: SnapshotStateList, appState: AppState) { - state.clear() - state.addAll(appState.componentState.nodes) -} diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncPreview.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncPreview.kt deleted file mode 100644 index 0003e534..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncPreview.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.dropbox.desktop.componentbox.store.subscriptions - -import androidx.compose.runtime.MutableState -import com.dropbox.desktop.componentbox.store.state.AppState - -fun syncPreview(state: MutableState, appState: AppState) { - state.value = appState.screenState.isPreview -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncScreenHeight.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncScreenHeight.kt deleted file mode 100644 index 61fe8bca..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncScreenHeight.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.desktop.componentbox.store.subscriptions - -import androidx.compose.runtime.MutableState -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.dp -import com.dropbox.desktop.componentbox.store.state.AppState - -fun syncScreenHeight(state: MutableState, appState: AppState) = - if (appState.screenState.showBottomTabs) state.value = 550.dp else state.value = 620.dp \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncScreenHorizontalAlignment.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncScreenHorizontalAlignment.kt deleted file mode 100644 index 21165211..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncScreenHorizontalAlignment.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.desktop.componentbox.store.subscriptions - -import androidx.compose.runtime.MutableState -import com.dropbox.componentbox.foundation.Alignment -import com.dropbox.desktop.componentbox.store.state.AppState - -fun syncScreenHorizontalAlignment(state: MutableState, appState: AppState) { - state.value = appState.screenState.horizontalAlignment -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncScreenNightMode.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncScreenNightMode.kt deleted file mode 100644 index 5f457c8a..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncScreenNightMode.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.dropbox.desktop.componentbox.store.subscriptions - -import androidx.compose.runtime.MutableState -import com.dropbox.desktop.componentbox.store.state.AppState - -fun syncScreenNightMode(state: MutableState, appState: AppState) { - state.value = appState.screenState.isNightMode -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncScreenTitle.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncScreenTitle.kt deleted file mode 100644 index 2fe92c67..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncScreenTitle.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.dropbox.desktop.componentbox.store.subscriptions - -import androidx.compose.runtime.MutableState -import com.dropbox.desktop.componentbox.store.state.AppState - -fun syncScreenTitle(state: MutableState, appState: AppState) { - state.value = appState.screenState.title -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncScreenVerticalArrangement.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncScreenVerticalArrangement.kt deleted file mode 100644 index 79dcef1a..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/store/subscriptions/syncScreenVerticalArrangement.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.desktop.componentbox.store.subscriptions - -import androidx.compose.runtime.MutableState -import com.dropbox.componentbox.foundation.Arrangement -import com.dropbox.desktop.componentbox.store.state.AppState - -fun syncScreenVerticalArrangement(state: MutableState, appState: AppState) { - state.value = appState.screenState.verticalArrangement -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui.kt deleted file mode 100644 index a5994414..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.dropbox.desktop.componentbox - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import com.dropbox.desktop.componentbox.data.entities.Context -import com.dropbox.componentbox.foundation.Inflater -import com.dropbox.componentbox.foundation.Themer -import com.dropbox.desktop.componentbox.ui.surfaces.explorer.explorer -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.inspector -import com.dropbox.desktop.componentbox.ui.surfaces.simulator.simulator -import com.dropbox.desktop.componentbox.ui.surfaces.toolbar.Toolbar - -@Composable -fun ui(context: Context, inflater: Inflater, themer: Themer) { - Column(modifier = Modifier.background(color = MaterialTheme.colors.background).fillMaxSize()) { - Toolbar() - - Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) { - explorer() - simulator(inflater) - inspector(context, themer) - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/components/searchIcon.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/components/searchIcon.kt deleted file mode 100644 index 423c2e9e..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/components/searchIcon.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.components - -import androidx.compose.material.Icon -import androidx.compose.runtime.Composable -import androidx.compose.ui.res.painterResource - -@Composable -fun searchIcon() { - Icon(painter = painterResource(SEARCH_LINE_RESOURCE_PATH), contentDescription = null) -} - -const val SEARCH_LINE_RESOURCE_PATH = "drawable/ic_dig_search_line.xml" \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/explorer/explorer.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/explorer/explorer.kt deleted file mode 100644 index b588187d..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/explorer/explorer.kt +++ /dev/null @@ -1,69 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.explorer - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.fillMaxHeight -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width -import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.foundation.lazy.items -import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.MaterialTheme -import androidx.compose.material.TextField -import androidx.compose.material.TextFieldDefaults -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateListOf -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.clip -import androidx.compose.ui.unit.dp -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.store.subscriptions.syncNodes -import com.dropbox.desktop.componentbox.ui.components.searchIcon -import com.dropbox.desktop.componentbox.ui.theme.buttonBackground -import com.dropbox.desktop.componentbox.ui.theme.paperBackground - -@Composable -fun explorer() { - val nodes = remember { mutableStateListOf() } - val activeNode = remember { mutableStateOf(null) } - - fun subscribe() { - syncNodes(nodes, store.state) - syncActiveNode(activeNode, store.state) - } - - store.subscribe { subscribe() } - - LazyColumn( - modifier = Modifier - .fillMaxHeight() - .width(400.dp) - .background(color = MaterialTheme.colors.paperBackground) - .padding(8.dp) - ) { - - item { - TextField( - leadingIcon = { searchIcon() }, - value = SEARCH_LABEL, - onValueChange = {}, - colors = TextFieldDefaults.textFieldColors( - textColor = MaterialTheme.colors.onBackground, - leadingIconColor = MaterialTheme.colors.onBackground - ), - modifier = Modifier.clip( - RoundedCornerShape(10.dp) - ).background(color = MaterialTheme.colors.buttonBackground) - ) - } - - items(nodes) { node -> - node(node, true) - } - } -} - -const val SEARCH_LABEL = "Search..." \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/explorer/node.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/explorer/node.kt deleted file mode 100644 index ef04f9af..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/explorer/node.kt +++ /dev/null @@ -1,78 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.explorer - -import androidx.compose.foundation.background -import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.sp -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.ui.theme.disabledBackground -import com.dropbox.desktop.componentbox.ui.theme.standardBackgroundElevated - -@Composable -fun node(node: Node, isRoot: Boolean, offsetX: Int = 0) { - val activeNode = remember { mutableStateOf(store.state.componentState.activeNode) } - - fun subscribe() { - syncActiveNode(activeNode, store.state) - } - - store.subscribe { subscribe() } - - Column { - Row( - modifier = Modifier.fillMaxWidth().padding(8.dp) - .background(color = if (isRoot) MaterialTheme.colors.standardBackgroundElevated else Color.Transparent) - .clickable { - store.dispatch(ComponentAction.SetActiveNode(node)) - } - ) { - - if (isRoot && node.children.isNotEmpty()) { - Icon( - painter = painterResource(CHEVRON_UP_LINE_RESOURCE_PATH), - contentDescription = null, - tint = MaterialTheme.colors.disabledBackground - ) - } - - Text( - text = node.type.name, - color = if (node.id == activeNode.value?.id) MaterialTheme.colors.primary else MaterialTheme.colors.onBackground, - modifier = Modifier.padding(top = 4.dp, bottom = 4.dp, start = offsetX.dp), - fontWeight = FontWeight.Bold, - fontSize = 16.sp - ) - - Text( - text = node.id, - color = if (node.id == activeNode.value?.id) MaterialTheme.colors.primary else MaterialTheme.colors.onBackground, - modifier = Modifier.padding(vertical = 4.dp, horizontal = 8.dp), - fontWeight = FontWeight.Light, - fontSize = 12.sp - ) - } - } - - node.children.forEach { child -> - node(child, false, offsetX + 20) - } -} - -const val CHEVRON_UP_LINE_RESOURCE_PATH = "drawable/ic_dig_chevron_up_line.xml" \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/inspector.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/inspector.kt deleted file mode 100644 index 2e537358..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/inspector.kt +++ /dev/null @@ -1,86 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector - -import androidx.compose.foundation.background -import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.fillMaxHeight -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width -import androidx.compose.foundation.lazy.LazyRow -import androidx.compose.foundation.lazy.items -import androidx.compose.material.Divider -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.foundation.Themer -import com.dropbox.desktop.componentbox.data.entities.Context -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.export.exportPanel -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.mainPanel -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.root.rootPanel -import com.dropbox.desktop.componentbox.ui.theme.disabledBackground -import com.dropbox.desktop.componentbox.ui.theme.inverseStandardBackground -import com.dropbox.desktop.componentbox.ui.theme.paperBackground - -@Composable -fun inspector(context: Context, themer: Themer) { - val activeTab = remember { mutableStateOf(0) } - - val panels = listOf( - Panel("Root", 0), - Panel("Inspect", 1), - Panel("Export", 2) - ) - - fun setActiveTab(index: Int) { - activeTab.value = index - } - - @Composable - fun textColor(index: Int): Color { - return if (index == activeTab.value) { - MaterialTheme.colors.inverseStandardBackground - } else MaterialTheme.colors.disabledBackground - } - - Column( - modifier = Modifier - .fillMaxHeight() - .width(400.dp) - .background(color = MaterialTheme.colors.paperBackground) - .padding(8.dp) - ) { - - Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { - - LazyRow(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(8.dp)) { - items(panels) { panel -> - Text( - text = panel.title, - color = textColor(panel.index), - modifier = Modifier.clickable { setActiveTab(panel.index) }) - } - } - - Divider(modifier = Modifier.fillMaxWidth().height(2.dp)) - } - - when (activeTab.value) { - 0 -> rootPanel() - 1 -> mainPanel(context, themer) - 2 -> exportPanel() - } - } -} - -private data class Panel( - val title: String, - val index: Int -) \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/export/exportButton.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/export/exportButton.kt deleted file mode 100644 index f32d779b..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/export/exportButton.kt +++ /dev/null @@ -1,57 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.export - -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.material.Button -import androidx.compose.material.ButtonDefaults -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import com.dropbox.componentbox.foundation.ComponentBox -import com.dropbox.desktop.componentbox.store.state.AppState -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.ui.theme.inverseStandardBackground -import com.dropbox.desktop.componentbox.ui.theme.successFill -import kotlinx.serialization.encodeToString -import kotlinx.serialization.json.Json -import java.io.File - -@Composable -fun exportbutton() { - var version = 1 - - Button( - onClick = { - exportJson(store.state, version) - version += 1 - }, - modifier = Modifier.fillMaxWidth(), - colors = ButtonDefaults.buttonColors( - backgroundColor = MaterialTheme.colors.successFill, - contentColor = MaterialTheme.colors.inverseStandardBackground - ) - ) { - Text( - text = BUTTON_LABEL, - color = MaterialTheme.colors.inverseStandardBackground, - style = MaterialTheme.typography.button - ) - } -} - -private fun buildScreen(state: AppState) = ComponentBox.Screen( - title = state.screenState.title, - verticalArrangement = state.screenState.verticalArrangement, - horizontalAlignment = state.screenState.horizontalAlignment, - components = state.componentState.rootComponents -) - -private fun exportJson(state: AppState, version: Int) { - val format = Json { prettyPrint = true } - val json = format.encodeToString(buildScreen(state)) - val home = System.getProperty("user.home") - val fileName = "ComponentBox-0.1.0-${state.screenState.id}-${version}" - File("$home/Downloads/$fileName.json").printWriter().use { it.println(json) } -} - -private const val BUTTON_LABEL = "Export" \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/export/exportPanel.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/export/exportPanel.kt deleted file mode 100644 index 61de213f..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/export/exportPanel.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.export - -import androidx.compose.runtime.Composable -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.panel - -@Composable -fun exportPanel() { - panel("Export") { - exportbutton() - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/activeNode.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/activeNode.kt deleted file mode 100644 index 42b941d1..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/activeNode.kt +++ /dev/null @@ -1,53 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.material.Divider -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.ui.theme.disabledBackground - -@Composable -fun activeNode() { - val activeNode = remember { mutableStateOf(null) } - - fun subscribe() { - syncActiveNode(activeNode, store.state) - } - - store.subscribe { subscribe() } - - if (activeNode.value != null) { - Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(8.dp)) { - Text( - text = activeNode.value!!.type.name, - color = MaterialTheme.colors.disabledBackground - ) - - Text( - text = activeNode.value!!.id, - color = MaterialTheme.colors.disabledBackground - ) - - Icon( - painter = painterResource("drawable/ic_dig_compass_line.xml"), - contentDescription = null, - tint = MaterialTheme.colors.disabledBackground - ) - } - - Divider(modifier = Modifier.fillMaxWidth().height(2.dp)) - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/children/addChild.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/children/addChild.kt deleted file mode 100644 index 732f1e09..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/children/addChild.kt +++ /dev/null @@ -1,120 +0,0 @@ -@file:OptIn(ExperimentalFoundationApi::class) - -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.children - -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.foundation.background -import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.lazy.GridCells -import androidx.compose.foundation.lazy.LazyVerticalGrid -import androidx.compose.material.DropdownMenu -import androidx.compose.material.DropdownMenuItem -import androidx.compose.material.Icon -import androidx.compose.material.IconButton -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.componentbox.foundation.ComponentType -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.ui.theme.buttonBackground -import com.dropbox.desktop.componentbox.ui.theme.disabledBackground -import com.dropbox.desktop.componentbox.ui.theme.inverseStandardBackground -import com.dropbox.desktop.componentbox.ui.theme.successFill - -@Composable -fun addChild() { - val activeNode = remember { mutableStateOf(null) } - val componentType = remember { mutableStateOf(ComponentType.Column) } - val isExpanded = remember { mutableStateOf(false) } - - fun setComponentType(value: ComponentType) { - componentType.value = value - } - - fun subscribe() { - syncActiveNode(activeNode, store.state) - } - - store.subscribe { subscribe() } - - LazyVerticalGrid( - cells = GridCells.Adaptive(120.dp), - verticalArrangement = Arrangement.Center, - horizontalArrangement = Arrangement.Start - ) { - - item { - Text( - text = "Add child:", - color = MaterialTheme.colors.disabledBackground, - modifier = Modifier.padding(0.dp) - ) - } - - item { - - Row( - modifier = Modifier.fillMaxWidth(), - verticalAlignment = Alignment.CenterVertically, - horizontalArrangement = Arrangement.spacedBy(8.dp) - ) { - - Box(modifier = Modifier.fillMaxWidth()) { - - Text( - text = componentType.value.name, - color = MaterialTheme.colors.primary, - modifier = Modifier.clickable { isExpanded.value = true } - .background(color = MaterialTheme.colors.buttonBackground).fillMaxWidth() - ) - - DropdownMenu( - modifier = Modifier.background(color = MaterialTheme.colors.buttonBackground).height(300.dp), - expanded = isExpanded.value, - onDismissRequest = { isExpanded.value = false }) { - ComponentType.values().forEach { type -> - DropdownMenuItem( - onClick = { - setComponentType(type) - isExpanded.value = false - }, - modifier = Modifier.background(color = MaterialTheme.colors.background).padding(0.dp) - .fillMaxWidth(), - contentPadding = PaddingValues(0.dp) - ) { - Text(text = type.name, color = MaterialTheme.colors.inverseStandardBackground) - } - } - } - } - } - } - - item { - Box(modifier = Modifier.height(22.dp)) { - IconButton(onClick = {}) { - Icon( - painter = painterResource("drawable/ic_dig_add_circle_fill.xml"), - contentDescription = null, - tint = MaterialTheme.colors.successFill - ) - } - } - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/children/children.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/children/children.kt deleted file mode 100644 index 65fc8362..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/children/children.kt +++ /dev/null @@ -1,50 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.children - -import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.foundation.lazy.items -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateListOf -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import androidx.compose.ui.res.painterResource -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.store.subscriptions.syncChildrenNodes -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.section -import com.dropbox.desktop.componentbox.ui.theme.successFill -import com.dropbox.desktop.componentbox.util.iconResourcePath - -@Composable -fun children() { - val activeNode = remember { mutableStateOf(null) } - val childrenNodes = remember { mutableStateListOf() } - - fun subscribe() { - syncActiveNode(activeNode, store.state) - syncChildrenNodes(childrenNodes, store.state) - } - - store.subscribe { subscribe() } - - section("Children") { - LazyColumn { - items(childrenNodes) { node -> - Row(modifier = Modifier.clickable { }) { - Icon( - painter = painterResource(node.type.iconResourcePath()), - contentDescription = null, - tint = MaterialTheme.colors.successFill - ) - } - } - } - - addChild() - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/content/content.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/content/content.kt deleted file mode 100644 index f40c81d5..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/content/content.kt +++ /dev/null @@ -1,28 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.content - -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import com.dropbox.desktop.componentbox.data.entities.Context -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.section - -@Composable -fun content(context: Context) { - val activeNode = remember { mutableStateOf(null) } - - fun subscribe() { - syncActiveNode(activeNode, store.state) - } - - store.subscribe { subscribe() } - - section(title = "Content") { - text() - image(context) - icon(context) - drawable() - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/content/drawable.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/content/drawable.kt deleted file mode 100644 index 1353ede2..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/content/drawable.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.content - -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.textInput - -@Composable -fun drawable() { - val activeNode = remember { mutableStateOf(store.state.componentState.activeNode) } - val state = remember { mutableStateOf("") } - - fun subscribe() { - syncActiveNode(activeNode, store.state) - } - - store.subscribe { subscribe() } - - textInput(state, LABEL) { input -> - state.value = input - - if (activeNode.value != null) { - store.dispatch( - ComponentAction.SetDrawableName( - id = activeNode.value!!.id, - name = input - ) - ) - } - } -} - -private const val LABEL = "Drawable name:" \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/content/icon.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/content/icon.kt deleted file mode 100644 index a452fd57..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/content/icon.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.content - -import androidx.compose.runtime.Composable -import com.dropbox.desktop.componentbox.data.entities.Context -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.selectInput - -@Composable -fun icon(context: Context) { - val icons = context.resourceProvider.icons().resPaths() - selectInput(LABEL, icons) { id, selection -> - ComponentAction.SetVectorName( - id = id, - name = selection.name - ) - } -} - -private const val LABEL = "Icon name:" \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/content/image.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/content/image.kt deleted file mode 100644 index f23f01b9..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/content/image.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.content - -import androidx.compose.runtime.Composable -import com.dropbox.desktop.componentbox.data.entities.Context -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.selectInput - -@Composable -fun image(context: Context) { - val images = context.resourceProvider.images().list() - selectInput(LABEL, images) { id, selection -> - ComponentAction.SetDrawableName( - id = id, - name = selection.name - ) - } -} - -private const val LABEL = "Image name:" \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/content/text.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/content/text.kt deleted file mode 100644 index 357944c7..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/content/text.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.content - -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.textInput - -@Composable -fun text() { - val activeNode = remember { mutableStateOf(store.state.componentState.activeNode) } - val state = remember { mutableStateOf("") } - - fun subscribe() { - syncActiveNode(activeNode, store.state) - } - - store.subscribe { subscribe() } - - textInput(state, LABEL) { input -> - state.value = input - - if (activeNode.value != null) { - store.dispatch( - ComponentAction.SetText( - id = activeNode.value!!.id, - text = input - ) - ) - } - } -} - -private const val LABEL = "Text:" \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/deleteButton.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/deleteButton.kt deleted file mode 100644 index 272072ee..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/deleteButton.kt +++ /dev/null @@ -1,37 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main - -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.material.Button -import androidx.compose.material.ButtonDefaults -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.ui.theme.inverseStandardBackground - -@Composable -fun deleteButton() { - val activeNode = remember { mutableStateOf(null) } - - fun subscribe() { - syncActiveNode(activeNode, store.state) - } - - store.subscribe { subscribe() } - - if (activeNode.value != null) { - Button( - onClick = { store.dispatch(ComponentAction.RemoveNode(activeNode.value!!.id)) }, - modifier = Modifier.fillMaxWidth(), - colors = ButtonDefaults.buttonColors(backgroundColor = MaterialTheme.colors.error) - ) { - Text(text = "Delete", color = MaterialTheme.colors.inverseStandardBackground) - } - } -} diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/layout/horizontalAlignment.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/layout/horizontalAlignment.kt deleted file mode 100644 index 8aa4a34e..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/layout/horizontalAlignment.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.layout - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Alignment -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.selectInput - -@Composable -fun horizontalAlignment() { - selectInput(LABEL, Alignment.values().toList()) { id, selection -> - ComponentAction.LayoutAction.SetHorizontalAlignment( - id = id, - horizontalAlignment = selection - ) - } -} - -private const val LABEL = "Horizontal alignment:" \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/layout/horizontalArrangement.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/layout/horizontalArrangement.kt deleted file mode 100644 index ad3c1a96..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/layout/horizontalArrangement.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.layout - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Arrangement -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.selectInput - -@Composable -fun horizontalArrangement() { - selectInput(LABEL, Arrangement.values().toList()) { id, selection -> - ComponentAction.LayoutAction.SetHorizontalArrangement( - id = id, - horizontalArrangement = selection - ) - } -} - -private const val LABEL = "Horizontal arrangement:" \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/layout/layout.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/layout/layout.kt deleted file mode 100644 index dcffc1e9..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/layout/layout.kt +++ /dev/null @@ -1,28 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.layout - -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import com.dropbox.desktop.componentbox.data.entities.Context -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.section - -@Composable -fun layout(context: Context) { - val activeNode = remember { mutableStateOf(null) } - - fun subscribe() { - syncActiveNode(activeNode, store.state) - } - - store.subscribe { subscribe() } - - section(title = "Layout") { - horizontalAlignment() - horizontalArrangement() - verticalAlignment() - verticalArrangement() - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/layout/verticalAlignment.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/layout/verticalAlignment.kt deleted file mode 100644 index 15efeb25..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/layout/verticalAlignment.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.layout - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Alignment -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.selectInput - -@Composable -fun verticalAlignment() { - selectInput(LABEL, Alignment.values().toList()) { id, selection -> - ComponentAction.LayoutAction.SetVerticalAlignment( - id = id, - verticalAlignment = selection - ) - } -} - -private const val LABEL = "Vertical alignment:" \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/layout/verticalArrangement.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/layout/verticalArrangement.kt deleted file mode 100644 index f13a0f18..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/layout/verticalArrangement.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.layout - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Arrangement -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.selectInput - -@Composable -fun verticalArrangement() { - selectInput(LABEL, Arrangement.values().toList()) { id, selection -> - ComponentAction.LayoutAction.SetVerticalArrangement( - id = id, - verticalArrangement = selection - ) - } -} - -private const val LABEL = "Vertical arrangement:" \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/mainPanel.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/mainPanel.kt deleted file mode 100644 index 8068f4b8..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/mainPanel.kt +++ /dev/null @@ -1,34 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Themer -import com.dropbox.desktop.componentbox.data.entities.Context -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.children.children -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.content.content -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.layout.layout -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.modifier.background -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.modifier.margin -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.modifier.padding -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.modifier.size -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.style.color -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.style.textStyle -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.panel - -@Composable -fun mainPanel(context: Context, themer: Themer) { - panel("Component") { - activeNode() - - content(context) - textStyle(context) - color(themer) - margin() - padding() - size() - background(themer) - layout(context) - children() - - deleteButton() - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/modifier/background.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/modifier/background.kt deleted file mode 100644 index 038d04b9..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/modifier/background.kt +++ /dev/null @@ -1,118 +0,0 @@ -@file:OptIn(ExperimentalFoundationApi::class) - -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.modifier - -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.foundation.background -import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.* -import androidx.compose.foundation.lazy.GridCells -import androidx.compose.foundation.lazy.LazyVerticalGrid -import androidx.compose.material.DropdownMenu -import androidx.compose.material.DropdownMenuItem -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.foundation.Color -import com.dropbox.componentbox.foundation.Themer -import com.dropbox.componentbox.util.compose -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.ui.theme.buttonBackground -import com.dropbox.desktop.componentbox.ui.theme.disabledBackground -import com.dropbox.desktop.componentbox.ui.theme.inverseStandardBackground -import com.dropbox.desktop.componentbox.ui.theme.standardText - -@Composable -fun background(themer: Themer) { - val activeNode = remember { mutableStateOf(store.state.componentState.activeNode) } - val color = remember { mutableStateOf(store.state.themeState.colors[0]) } - val isExpanded = remember { mutableStateOf(false) } - - fun subscribe() { - syncActiveNode(activeNode, store.state) - } - - store.subscribe { subscribe() } - - fun setColor(value: Color) { - color.value = value - if (activeNode.value != null) { - store.dispatch( - ComponentAction.ModifierAction.SetBackground( - id = activeNode.value!!.id, - background = color.value - ) - ) - } - } - - LazyVerticalGrid( - cells = GridCells.Adaptive(120.dp), - verticalArrangement = Arrangement.Center, - horizontalArrangement = Arrangement.Start - ) { - - item { - Text( - text = "Background color:", - color = MaterialTheme.colors.disabledBackground, - modifier = Modifier.padding(0.dp) - ) - } - - item { - Row( - modifier = Modifier.fillMaxWidth(), - verticalAlignment = Alignment.CenterVertically, - horizontalArrangement = Arrangement.spacedBy(8.dp) - ) { - Box( - modifier = Modifier - .background(color = color.value.compose()) - .height(18.dp) - .width(18.dp) - ) - - Box(modifier = Modifier.fillMaxWidth()) { - - Text( - text = color.value.title, - color = color.value.compose() ?: MaterialTheme.colors.standardText, - modifier = Modifier.clickable { isExpanded.value = true } - .background(color = MaterialTheme.colors.buttonBackground).fillMaxWidth() - ) - - DropdownMenu( - modifier = Modifier.background(color = MaterialTheme.colors.buttonBackground).height(300.dp), - expanded = isExpanded.value, - onDismissRequest = { isExpanded.value = false }) { - store.state.themeState.colors.forEach { color -> - DropdownMenuItem( - onClick = { - setColor(color) - isExpanded.value = false - }, - modifier = Modifier.background(color = MaterialTheme.colors.background).padding(0.dp) - .fillMaxWidth(), - contentPadding = PaddingValues(0.dp) - ) { - Box( - modifier = Modifier.background(color = color.compose()).height(15.dp) - .width(15.dp) - ) - Text(text = color.title, color = MaterialTheme.colors.inverseStandardBackground) - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/modifier/margin.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/modifier/margin.kt deleted file mode 100644 index ee2d7633..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/modifier/margin.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.modifier - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Margin -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.util.getComponentById -import com.dropbox.desktop.componentbox.util.margin - -@Composable -fun margin() { - paddingGroup("Margin") { change, nodeId -> - val activeComponent = store.state.componentState.getComponentById(nodeId) - if (activeComponent != null) { - store.dispatch( - ComponentAction.ModifierAction.SetMargin( - nodeId, - activeComponent.margin().build(change) - ) - ) - } - } -} - -private fun Margin.build(change: Change) = when (change.type) { - Type.Start -> copy(start = change.value) - Type.Top -> copy(top = change.value) - Type.End -> copy(end = change.value) - Type.Bottom -> copy(bottom = change.value) -} - diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/modifier/padding.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/modifier/padding.kt deleted file mode 100644 index 70f42161..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/modifier/padding.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.modifier - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Padding -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.util.getComponentById -import com.dropbox.desktop.componentbox.util.padding - -@Composable -fun padding() { - paddingGroup("Padding") { change, nodeId -> - val activeComponent = store.state.componentState.getComponentById(nodeId) - if (activeComponent != null) { - store.dispatch( - ComponentAction.ModifierAction.SetPadding( - nodeId, - activeComponent.padding().build(change) - ) - ) - } - } -} - -private fun Padding.build(change: Change) = when (change.type) { - Type.Start -> copy(start = change.value) - Type.Top -> copy(top = change.value) - Type.End -> copy(end = change.value) - Type.Bottom -> copy(bottom = change.value) -} - diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/modifier/paddingGroup.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/modifier/paddingGroup.kt deleted file mode 100644 index 0dc216b2..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/modifier/paddingGroup.kt +++ /dev/null @@ -1,97 +0,0 @@ -@file:OptIn(ExperimentalFoundationApi::class) - -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.modifier - -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.MutableState -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.numberInput -import com.dropbox.desktop.componentbox.ui.theme.inverseStandardBackground - -@Composable -internal fun paddingGroup(title: String, dispatch: (change: Change, nodeId: String) -> Unit) { - val activeNode = remember { mutableStateOf(store.state.componentState.activeNode) } - - val start = remember { mutableStateOf(0) } - val top = remember { mutableStateOf(0) } - val end = remember { mutableStateOf(0) } - val bottom = remember { mutableStateOf(0) } - - val inputs = listOf( - Input(start, "Start:", Type.Start), - Input(top, "Top:", Type.Top), - Input(end, "End:", Type.End), - Input(bottom, "Bottom:", Type.Bottom), - ) - - fun setLocalState(change: Change) { - when (change.type) { - Type.Start -> start.value = change.value - Type.Top -> top.value = change.value - Type.End -> end.value = change.value - Type.Bottom -> bottom.value = change.value - } - } - - fun onChange(change: Change) { - setLocalState(change) - - if (activeNode.value?.id != null) { - dispatch(change, activeNode.value!!.id) - } - } - - fun subscribe() { - syncActiveNode(activeNode, store.state) - } - - store.subscribe { subscribe() } - - Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { - - Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(8.dp)) { - - Text( - text = title, - color = MaterialTheme.colors.inverseStandardBackground - ) - } - - inputs.forEach { type -> - numberInput(type.state, type.label) { input -> - onChange(Change(type.type, input.trim().toInt())) - } - } - - } -} - -internal data class Change( - val type: Type, - val value: Int -) - -internal enum class Type { - Start, - Top, - End, - Bottom -} - -private data class Input( - val state: MutableState, - val label: String, - val type: Type -) \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/modifier/size.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/modifier/size.kt deleted file mode 100644 index 6dba44de..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/modifier/size.kt +++ /dev/null @@ -1,156 +0,0 @@ -@file:OptIn(ExperimentalFoundationApi::class) - -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.modifier - -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.lazy.GridCells -import androidx.compose.foundation.lazy.LazyVerticalGrid -import androidx.compose.foundation.text.BasicTextField -import androidx.compose.material.Checkbox -import androidx.compose.material.Divider -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.unit.dp -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.ui.theme.buttonBackground -import com.dropbox.desktop.componentbox.ui.theme.disabledBackground -import com.dropbox.desktop.componentbox.ui.theme.inverseStandardBackground - -@Composable -fun size() { - val activeNode = remember { mutableStateOf(store.state.componentState.activeNode) } - - val isFullSize = remember { mutableStateOf(false) } - val isFullHeight = remember { mutableStateOf(false) } - val isFullWidth = remember { mutableStateOf(false) } - - val size = remember { mutableStateOf(null) } - val height = remember { mutableStateOf(null) } - val width = remember { mutableStateOf(null) } - - fun subscribe() { - syncActiveNode(activeNode, store.state) - } - - store.subscribe { subscribe() } - - fun setIsFullWidth(value: Boolean) { - isFullWidth.value = value - if (activeNode.value != null) { - store.dispatch(ComponentAction.ModifierAction.SetFillMaxWidth(activeNode.value!!.id, value)) - } - } - - fun setHeight(value: Int?) { - height.value = value - - if (activeNode.value != null) { - store.dispatch(ComponentAction.ModifierAction.SetHeight(activeNode.value!!.id, value ?: 0)) - } - } - - fun setWidth(value: Int?) { - width.value = value - - if (activeNode.value != null) { - store.dispatch(ComponentAction.ModifierAction.SetWidth(activeNode.value!!.id, value ?: 0)) - } - } - - Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { - Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(8.dp)) { - Text( - text = "Size", - color = MaterialTheme.colors.inverseStandardBackground - ) - } - - LazyVerticalGrid(cells = GridCells.Adaptive(85.dp), verticalArrangement = Arrangement.Center) { - - item { - Text( - text = "Size:", - color = MaterialTheme.colors.disabledBackground - ) - } - - item { - Checkbox(checked = isFullSize.value, onCheckedChange = { value -> setIsFullWidth(value) }) - } - - item { - BasicTextField( - value = if (size.value != null) size.value.toString() else "", - onValueChange = { value -> size.value = value.toInt() }, - modifier = Modifier.fillMaxWidth().background(color = MaterialTheme.colors.buttonBackground) - .padding(4.dp), - textStyle = TextStyle(color = MaterialTheme.colors.primary) - ) - } - } - - LazyVerticalGrid(cells = GridCells.Adaptive(85.dp), verticalArrangement = Arrangement.Center) { - - item { - Text( - text = "Height:", - color = MaterialTheme.colors.disabledBackground - ) - } - - item { - Checkbox(checked = isFullHeight.value, onCheckedChange = { value -> setIsFullWidth(value) }) - } - - item { - BasicTextField( - value = if (height.value != null) height.value.toString() else "", - onValueChange = { value -> setHeight(value.toInt()) }, - modifier = Modifier.fillMaxWidth().background(color = MaterialTheme.colors.buttonBackground) - .padding(4.dp), - textStyle = TextStyle(color = MaterialTheme.colors.primary) - ) - } - } - - LazyVerticalGrid(cells = GridCells.Adaptive(85.dp), verticalArrangement = Arrangement.Center) { - - item { - Text( - text = "Width:", - color = MaterialTheme.colors.disabledBackground - ) - } - - item { - Checkbox(checked = isFullWidth.value, onCheckedChange = { value -> setIsFullWidth(value) }) - } - - item { - BasicTextField( - value = if (width.value != null) width.value.toString() else "", - onValueChange = { value -> setWidth(value.toInt()) }, - modifier = Modifier.fillMaxWidth().background(color = MaterialTheme.colors.buttonBackground) - .padding(4.dp), - textStyle = TextStyle(color = MaterialTheme.colors.primary) - ) - } - } - - Divider(modifier = Modifier.fillMaxWidth().height(2.dp)) - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/style/color.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/style/color.kt deleted file mode 100644 index 0f789b7c..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/style/color.kt +++ /dev/null @@ -1,115 +0,0 @@ -@file:OptIn(ExperimentalFoundationApi::class) - -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.style - -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.foundation.background -import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.* -import androidx.compose.foundation.lazy.GridCells -import androidx.compose.foundation.lazy.LazyVerticalGrid -import androidx.compose.material.DropdownMenu -import androidx.compose.material.DropdownMenuItem -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.foundation.Color -import com.dropbox.componentbox.foundation.Themer -import com.dropbox.componentbox.util.compose -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.ui.theme.buttonBackground -import com.dropbox.desktop.componentbox.ui.theme.disabledBackground -import com.dropbox.desktop.componentbox.ui.theme.inverseStandardBackground - -@Composable -fun color(themer: Themer) { - val activeNode = remember { mutableStateOf(store.state.componentState.activeNode) } - val color = remember { mutableStateOf(store.state.themeState.colors[0]) } - val isExpanded = remember { mutableStateOf(false) } - - fun subscribe() { - syncActiveNode(activeNode, store.state) - } - - store.subscribe { subscribe() } - - fun setColor(value: Color) { - color.value = value - if (activeNode.value != null) { - store.dispatch( - ComponentAction.SetColor( - id = activeNode.value!!.id, - color = color.value - ) - ) - } - } - - LazyVerticalGrid( - cells = GridCells.Adaptive(120.dp), - verticalArrangement = Arrangement.Center, - horizontalArrangement = Arrangement.Start - ) { - - item { - Text( - text = "Color:", - color = MaterialTheme.colors.disabledBackground, - modifier = Modifier.padding(0.dp) - ) - } - - item { - Row( - modifier = Modifier.fillMaxWidth(), - verticalAlignment = Alignment.CenterVertically, - horizontalArrangement = Arrangement.spacedBy(8.dp) - ) { - Box( - modifier = Modifier.background(color = color.value.compose()).height(18.dp) - .width(18.dp) - ) - - Box(modifier = Modifier.fillMaxWidth()) { - - Text( - text = color.value.title, - color = color.value.compose(), - modifier = Modifier.clickable { isExpanded.value = true } - .background(color = MaterialTheme.colors.buttonBackground).fillMaxWidth() - ) - - DropdownMenu( - modifier = Modifier.background(color = MaterialTheme.colors.buttonBackground).height(300.dp), - expanded = isExpanded.value, - onDismissRequest = { isExpanded.value = false }) { - store.state.themeState.colors.forEach { color -> - DropdownMenuItem( - onClick = { - setColor(color) - isExpanded.value = false - }, - modifier = Modifier.background(color = MaterialTheme.colors.background).padding(0.dp) - .fillMaxWidth(), - contentPadding = PaddingValues(0.dp) - ) { - Box( - modifier = Modifier.background(color = color.compose()).height(15.dp) - .width(15.dp) - ) - Text(text = color.title, color = MaterialTheme.colors.inverseStandardBackground) - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/style/textStyle.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/style/textStyle.kt deleted file mode 100644 index efd61941..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/main/style/textStyle.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.main.style - -import androidx.compose.runtime.Composable -import com.dropbox.desktop.componentbox.data.entities.Context -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.selectInput - -@Composable -fun textStyle(context: Context) { - val textStyles = context.resourceProvider.typography().list() - selectInput(LABEL, textStyles) { id, selection -> - ComponentAction.SetTextStyle( - id = id, - style = selection.name - ) - } -} - -private const val LABEL = "Text style:" \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/numberInput.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/numberInput.kt deleted file mode 100644 index 1788d094..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/numberInput.kt +++ /dev/null @@ -1,45 +0,0 @@ -@file:OptIn(ExperimentalFoundationApi::class) - -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels - -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.lazy.GridCells -import androidx.compose.foundation.lazy.LazyVerticalGrid -import androidx.compose.foundation.text.BasicTextField -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.MutableState -import androidx.compose.ui.Modifier -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.unit.dp -import com.dropbox.desktop.componentbox.ui.theme.buttonBackground -import com.dropbox.desktop.componentbox.ui.theme.disabledBackground - -@Composable -fun numberInput(state: MutableState, label: String, onValueChange: (value: String) -> Unit) { - LazyVerticalGrid(cells = GridCells.Adaptive(100.dp), verticalArrangement = Arrangement.Center) { - item { - Text( - text = label, - color = MaterialTheme.colors.disabledBackground - ) - } - - item { - BasicTextField( - value = state.value.toString(), - onValueChange = { value -> onValueChange(value) }, - modifier = Modifier - .fillMaxWidth() - .background(color = MaterialTheme.colors.buttonBackground) - .padding(4.dp), - textStyle = TextStyle(color = MaterialTheme.colors.primary) - ) - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/panel.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/panel.kt deleted file mode 100644 index 6c2a69fb..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/panel.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp -import com.dropbox.desktop.componentbox.ui.theme.inverseStandardBackground - -@Composable -fun panel(title: String, content: @Composable () -> Unit) { - - Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { - Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(8.dp)) { - Text( - text = title, - color = MaterialTheme.colors.inverseStandardBackground - ) - } - - content() - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/root/horizontalAlignment.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/root/horizontalAlignment.kt deleted file mode 100644 index c14a6df8..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/root/horizontalAlignment.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.root - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Alignment -import com.dropbox.desktop.componentbox.store.actions.ScreenAction -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.selectInput - -@Composable -fun horizontalAlignment() { - selectInput(LABEL, Alignment.values().toList()) { _, selection -> - ScreenAction.SetHorizontalAlignment(alignment = selection) - } -} - -private const val LABEL = "Horizontal alignment:" \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/root/rootPanel.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/root/rootPanel.kt deleted file mode 100644 index 419756f0..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/root/rootPanel.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.root - -import androidx.compose.runtime.Composable -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.panel - -@Composable -fun rootPanel() { - panel("Root") { - - title() - verticalArrangement() - horizontalAlignment() - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/root/title.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/root/title.kt deleted file mode 100644 index 31de027a..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/root/title.kt +++ /dev/null @@ -1,54 +0,0 @@ -@file:OptIn(ExperimentalFoundationApi::class) - -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.root - -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.lazy.GridCells -import androidx.compose.foundation.lazy.LazyVerticalGrid -import androidx.compose.foundation.text.BasicTextField -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.unit.dp -import com.dropbox.desktop.componentbox.store.actions.ScreenAction -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.ui.theme.buttonBackground -import com.dropbox.desktop.componentbox.ui.theme.disabledBackground - -@Composable -fun title() { - val title = remember { mutableStateOf(store.state.screenState.title) } - - fun setTitle(value: String) { - title.value = value - store.dispatch(ScreenAction.SetTitle(value)) - } - - LazyVerticalGrid(cells = GridCells.Adaptive(100.dp), verticalArrangement = Arrangement.Center) { - - item { - Text( - text = "Title:", - color = MaterialTheme.colors.disabledBackground - ) - } - - item { - BasicTextField( - value = title.value ?: "", - onValueChange = { value -> setTitle(value) }, - modifier = Modifier.fillMaxWidth().background(color = MaterialTheme.colors.buttonBackground) - .padding(4.dp), - textStyle = TextStyle(color = MaterialTheme.colors.primary) - ) - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/root/verticalArrangement.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/root/verticalArrangement.kt deleted file mode 100644 index 1f3543dc..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/root/verticalArrangement.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.root - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Arrangement -import com.dropbox.desktop.componentbox.store.actions.ScreenAction -import com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels.selectInput - -@Composable -fun verticalArrangement() { - selectInput(LABEL, Arrangement.values().toList()) { _, selection -> - ScreenAction.SetVerticalArrangement(arrangement = selection) - } -} - -private const val LABEL = "Vertical arrangement:" \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/section.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/section.kt deleted file mode 100644 index 4b1100ca..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/section.kt +++ /dev/null @@ -1,30 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.material.Divider -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp -import com.dropbox.desktop.componentbox.ui.theme.inverseStandardBackground - -@Composable -fun section(title: String, content: @Composable () -> Unit) { - Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { - Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(8.dp)) { - Text( - text = title, - color = MaterialTheme.colors.inverseStandardBackground - ) - } - - content() - - Divider(modifier = Modifier.fillMaxWidth().height(2.dp)) - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/select.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/select.kt deleted file mode 100644 index ef52677b..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/select.kt +++ /dev/null @@ -1,85 +0,0 @@ -@file:OptIn(ExperimentalFoundationApi::class) - -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels - -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.foundation.background -import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.lazy.GridCells -import androidx.compose.foundation.lazy.LazyVerticalGrid -import androidx.compose.material.DropdownMenu -import androidx.compose.material.DropdownMenuItem -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.MutableState -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp -import com.dropbox.desktop.componentbox.ui.theme.buttonBackground -import com.dropbox.desktop.componentbox.ui.theme.disabledBackground -import com.dropbox.desktop.componentbox.ui.theme.inverseStandardBackground -import com.dropbox.desktop.componentbox.util.name -import androidx.compose.foundation.layout.Arrangement as RealArrangement - -@Composable -fun select( - state: MutableState, - label: String, - options: List, - onSelect: (value: T) -> Unit -) { - val isExpanded = remember { mutableStateOf(false) } - - LazyVerticalGrid(cells = GridCells.Adaptive(100.dp), verticalArrangement = RealArrangement.Center) { - - item { - Text( - text = label, - color = MaterialTheme.colors.disabledBackground - ) - } - - item { - Box(modifier = Modifier.fillMaxWidth()) { - - Text( - text = state.value.name(), - color = MaterialTheme.colors.primary, - modifier = Modifier - .clickable { isExpanded.value = true } - .background(color = MaterialTheme.colors.buttonBackground) - .fillMaxWidth() - ) - - DropdownMenu( - modifier = Modifier.background(color = MaterialTheme.colors.buttonBackground).height(300.dp), - expanded = isExpanded.value, - onDismissRequest = { isExpanded.value = false }) { - - options.forEach { option -> - DropdownMenuItem( - onClick = { - onSelect(option) - isExpanded.value = false - }, - modifier = Modifier - .background(color = MaterialTheme.colors.background) - .padding(0.dp) - .fillMaxWidth(), - contentPadding = PaddingValues(0.dp) - ) { - Text(text = option.name(), color = MaterialTheme.colors.inverseStandardBackground) - } - } - } - } - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/selectInput.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/selectInput.kt deleted file mode 100644 index 7a876336..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/selectInput.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels - -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode - -@Composable -fun selectInput(label: String, options: List, dispatch: (id: String, selection: T) -> Any) { - val activeNode = remember { mutableStateOf(store.state.componentState.activeNode) } - val state = remember { mutableStateOf(null) } - - fun subscribe() { - syncActiveNode(activeNode, store.state) - } - - store.subscribe { subscribe() } - - select(state, label, options) { selection -> - state.value = selection - if (activeNode.value != null) { - store.dispatch(dispatch(activeNode.value!!.id, selection)) - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/textInput.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/textInput.kt deleted file mode 100644 index faea8243..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/inspector/panels/textInput.kt +++ /dev/null @@ -1,47 +0,0 @@ -@file:OptIn(ExperimentalFoundationApi::class) - -package com.dropbox.desktop.componentbox.ui.surfaces.inspector.panels - -import androidx.compose.foundation.ExperimentalFoundationApi -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.lazy.GridCells -import androidx.compose.foundation.lazy.LazyVerticalGrid -import androidx.compose.foundation.text.BasicTextField -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.MutableState -import androidx.compose.ui.Modifier -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.unit.dp -import com.dropbox.desktop.componentbox.ui.theme.buttonBackground -import com.dropbox.desktop.componentbox.ui.theme.disabledBackground - -@Composable -fun textInput(state: MutableState, label: String, onValueChange: (value: String) -> Unit) { - - LazyVerticalGrid(cells = GridCells.Adaptive(100.dp), verticalArrangement = Arrangement.Center) { - - item { - Text( - text = label, - color = MaterialTheme.colors.disabledBackground - ) - } - - item { - BasicTextField( - value = state.value, - onValueChange = { value -> onValueChange(value) }, - modifier = Modifier - .fillMaxWidth() - .background(color = MaterialTheme.colors.buttonBackground) - .padding(4.dp), - textStyle = TextStyle(color = MaterialTheme.colors.primary) - ) - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/bottomNav.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/bottomNav.kt deleted file mode 100644 index 3e0d801a..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/bottomNav.kt +++ /dev/null @@ -1,66 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.simulator - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.wrapContentHeight -import androidx.compose.foundation.lazy.LazyRow -import androidx.compose.foundation.lazy.items -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.sp -import com.dropbox.componentbox.foundation.Inflater -import com.dropbox.componentbox.foundation.BottomTab -import com.dropbox.desktop.componentbox.ui.theme.faintText -import com.dropbox.desktop.componentbox.ui.theme.standardBackgroundElevated - -@Composable -fun bottomNav(inflater: Inflater) { - - val bottomTabs = inflater.bottomTabs() - val selected = bottomTabs[3] - - fun isSelected(tab: BottomTab) = selected == tab - - LazyRow( - modifier = Modifier - .fillMaxWidth() - .wrapContentHeight() - .background(color = MaterialTheme.colors.standardBackgroundElevated) - .padding(vertical = 6.dp), - horizontalArrangement = Arrangement.SpaceAround, - ) { - items(bottomTabs.subList(0, 5)) { tab -> - Column(horizontalAlignment = Alignment.CenterHorizontally) { - Icon( - painter = painterResource(if (isSelected(tab)) tab.iconSelected.resPath else tab.iconNotSelected.resPath), - modifier = Modifier.size(24.dp), - tint = if (isSelected(tab)) MaterialTheme.colors.onBackground else MaterialTheme.colors.faintText, - contentDescription = null, - ) - Text( - text = tab.title.value, - style = MaterialTheme.typography.caption, - color = if (isSelected(tab)) MaterialTheme.colors.onBackground else MaterialTheme.colors.faintText, - fontSize = 8.sp, - ) - } - } - } -} - - - - - - - diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/content.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/content.kt deleted file mode 100644 index ab6df310..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/content.kt +++ /dev/null @@ -1,48 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.simulator - -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.height -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateListOf -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.toMutableStateList -import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.Dp -import com.dropbox.componentbox.foundation.Inflater -import com.dropbox.componentbox.foundation.Component -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncComponents -import com.dropbox.desktop.componentbox.store.subscriptions.syncScreenHorizontalAlignment -import com.dropbox.desktop.componentbox.store.subscriptions.syncScreenVerticalArrangement -import com.dropbox.desktop.componentbox.util.copy -import com.dropbox.desktop.componentbox.util.horizontal -import com.dropbox.desktop.componentbox.util.inflate -import com.dropbox.desktop.componentbox.util.vertical - -@Composable -fun content(inflater: Inflater, height: Dp) { - val screenVerticalArrangement = remember { mutableStateOf(store.state.screenState.verticalArrangement) } - val screenHorizontalAlignment = remember { mutableStateOf(store.state.screenState.horizontalAlignment) } - val components = remember { mutableStateListOf() } - - fun subscribe() { - syncScreenVerticalArrangement(screenVerticalArrangement, store.state) - syncScreenHorizontalAlignment(screenHorizontalAlignment, store.state) - syncComponents(components, store.state) - } - - store.subscribe { subscribe() } - - Column( - modifier = Modifier.height(height), - verticalArrangement = screenVerticalArrangement.value.vertical(), - horizontalAlignment = screenHorizontalAlignment.value.horizontal() - ) { - - components.toMutableStateList().forEach { component -> - val copy = component.copy() - copy.inflate(inflater) - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/devices/pixel4.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/devices/pixel4.kt deleted file mode 100644 index afeb5a17..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/devices/pixel4.kt +++ /dev/null @@ -1,63 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.simulator.devices - -import androidx.compose.foundation.Image -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.offset -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncNightMode - -@Composable -fun pixel4(content: @Composable () -> Unit) { - - val background = remember { mutableStateOf(store.state.themeState.background) } - val isNightMode = remember { mutableStateOf(store.state.screenState.isNightMode) } - - fun subscribe() { - syncNightMode(isNightMode, store.state) - background.value = store.state.themeState.background - } - - store.subscribe { subscribe() } - - Box(modifier = Modifier.height(800.dp).width(400.dp), contentAlignment = Alignment.TopCenter) { - Column( - modifier = Modifier.height(800.dp) - .padding(top = 45.dp, start = 35.dp, bottom = 55.dp, end = 35.dp) - .background(color = if (isNightMode.value) Color(background.value.dark) else Color(background.value.light)), - verticalArrangement = Arrangement.SpaceBetween - ) { - - Row( - modifier = Modifier.fillMaxWidth().height(50.dp) - .background(color = if (isNightMode.value) Color(background.value.dark) else Color(background.value.light)), - ) {} - - Row(modifier = Modifier.fillMaxWidth().height(30.dp).background(color = Color.Black)) {} - - } - - content() - - Image( - painter = painterResource("drawable/pixel_4.webp"), - contentDescription = null, - modifier = Modifier.height(800.dp).offset(y = 0.dp) - ) - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/screen.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/screen.kt deleted file mode 100644 index b503dbb9..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/screen.kt +++ /dev/null @@ -1,57 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.simulator - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.foundation.Inflater -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncBottomTabs -import com.dropbox.desktop.componentbox.store.subscriptions.syncNightMode -import com.dropbox.desktop.componentbox.store.subscriptions.syncPreview -import com.dropbox.desktop.componentbox.store.subscriptions.syncScreenHeight - -@Composable -fun screen(inflater: Inflater) { - val isPreview = remember { mutableStateOf(store.state.screenState.isPreview) } - val background = remember { mutableStateOf(store.state.themeState.background) } - val isNightMode = remember { mutableStateOf(store.state.screenState.isNightMode) } - val showBottomTabs = remember { mutableStateOf(store.state.screenState.showBottomTabs) } - val screenHeight = remember { mutableStateOf(620.dp) } - - fun subscribe() { - syncPreview(isPreview, store.state) - syncNightMode(isNightMode, store.state) - syncBottomTabs(showBottomTabs, store.state) - syncScreenHeight(screenHeight, store.state) - background.value = store.state.themeState.background - } - - store.subscribe { subscribe() } - - Column( - modifier = Modifier - .height(715.dp) - .width(330.dp) - .padding(top = 95.dp) - .background(color = if (isNightMode.value) Color(background.value.dark) else Color(background.value.light)), - verticalArrangement = Arrangement.SpaceBetween - ) { - - toolbar() - - content(inflater, screenHeight.value) - - if (showBottomTabs.value) { - bottomNav(inflater) - } - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/simulator.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/simulator.kt deleted file mode 100644 index cc58fc8a..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/simulator.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.simulator - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Inflater -import com.dropbox.desktop.componentbox.ui.surfaces.simulator.devices.pixel4 - -@Composable -fun simulator(inflater: Inflater) { - pixel4 { - screen(inflater) - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/toolbar.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/toolbar.kt deleted file mode 100644 index d338b234..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/simulator/toolbar.kt +++ /dev/null @@ -1,57 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.simulator - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp -import androidx.compose.ui.unit.sp -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncNightMode -import com.dropbox.desktop.componentbox.store.subscriptions.syncScreenTitle - -@Composable -fun toolbar() { - val screenTitle = remember { mutableStateOf(null) } - val background = remember { mutableStateOf(store.state.themeState.background) } - val isNightMode = remember { mutableStateOf(store.state.screenState.isNightMode) } - - fun subscribe() { - syncScreenTitle(screenTitle, store.state) - syncNightMode(isNightMode, store.state) - background.value = store.state.themeState.background - } - - store.subscribe { subscribe() } - - Row( - modifier = Modifier - .fillMaxWidth() - .background(color = if (isNightMode.value) Color(background.value.dark) else Color(background.value.light)), - verticalAlignment = Alignment.CenterVertically - ) { - Icon( - painter = painterResource("drawable/ic_dig_list_view_line.xml"), - contentDescription = null, - tint = if (isNightMode.value) Color(background.value.light) else Color(background.value.dark), - modifier = Modifier.padding(start = 16.dp) - ) - Text( - text = screenTitle.value ?: "", - style = MaterialTheme.typography.h5, - color = MaterialTheme.colors.onBackground, - modifier = Modifier.padding(start = 16.dp), - fontSize = 18.sp - ) - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/toolbar/AddContainerDropdownMenuButton.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/toolbar/AddContainerDropdownMenuButton.kt deleted file mode 100644 index e851f5cb..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/toolbar/AddContainerDropdownMenuButton.kt +++ /dev/null @@ -1,81 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.toolbar - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.material.DropdownMenu -import androidx.compose.material.DropdownMenuItem -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.componentbox.foundation.ComponentType -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.ui.theme.ComponentBoxIcon -import com.dropbox.desktop.componentbox.ui.theme.buttonBackground -import com.dropbox.desktop.componentbox.ui.theme.inverseStandardBackground -import com.dropbox.desktop.componentbox.ui.theme.resourcePath -import com.dropbox.desktop.componentbox.util.node - -@Composable -fun AddContainerDropdownMenuButton() { - val isExpanded = remember { mutableStateOf(false) } - val selectedContainerType = remember { mutableStateOf(ComponentType.Column) } - - val activeNode = remember { mutableStateOf(null) } - fun subscribe() { - syncActiveNode(activeNode, store.state) - } - store.subscribe { subscribe() } - - Box { - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.Square.Line.resourcePath()) { - isExpanded.value = !isExpanded.value - } - - DropdownMenu( - modifier = Modifier.background(color = MaterialTheme.colors.buttonBackground), - expanded = isExpanded.value, - onDismissRequest = { isExpanded.value = false }) { - containerTypes.forEach { containerType -> - DropdownMenuItem( - onClick = { - selectedContainerType.value = containerType - isExpanded.value = false - - store.dispatch( - ComponentAction.AddNode( - node = containerType.node(), - parentId = activeNode.value?.id - ) - ) - }, - modifier = Modifier - .background(color = MaterialTheme.colors.background) - .padding(0.dp) - .fillMaxWidth(), - contentPadding = PaddingValues(0.dp) - ) { - Text(text = containerType.name, color = MaterialTheme.colors.inverseStandardBackground) - } - } - } - } -} - -val containerTypes = listOf( - ComponentType.Box, - ComponentType.Row, - ComponentType.LazyRow, - ComponentType.Column, - ComponentType.LazyColumn, - ComponentType.Surface -) \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/toolbar/BasicToolbarButton.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/toolbar/BasicToolbarButton.kt deleted file mode 100644 index dc8e9633..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/toolbar/BasicToolbarButton.kt +++ /dev/null @@ -1,29 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.toolbar - -import androidx.compose.foundation.layout.size -import androidx.compose.material.Icon -import androidx.compose.material.IconButton -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp - -@Composable -fun BasicToolbarButton( - iconResourcePath: String, - contentDescription: String? = null, - tint: Color = MaterialTheme.colors.onBackground, - modifier: Modifier = Modifier, - onClick: () -> Unit = {}, -) { - IconButton(onClick = onClick) { - Icon( - painter = painterResource(iconResourcePath), - contentDescription = contentDescription, - tint = tint, - modifier = modifier.then(Modifier.size(32.dp)) - ) - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/toolbar/Toolbar.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/toolbar/Toolbar.kt deleted file mode 100644 index 1d228c29..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/surfaces/toolbar/Toolbar.kt +++ /dev/null @@ -1,106 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.surfaces.toolbar - -import androidx.compose.foundation.Image -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.size -import androidx.compose.foundation.shape.CircleShape -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.clip -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.componentbox.foundation.ComponentType -import com.dropbox.desktop.componentbox.store.actions.ComponentAction -import com.dropbox.desktop.componentbox.store.actions.ScreenAction -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncActiveNode -import com.dropbox.desktop.componentbox.ui.theme.ComponentBoxIcon -import com.dropbox.desktop.componentbox.ui.theme.resourcePath -import com.dropbox.desktop.componentbox.ui.theme.standardBackgroundElevated -import com.dropbox.desktop.componentbox.util.node - -@Composable -fun Toolbar() { - Row( - modifier = Modifier.fillMaxWidth().background(color = MaterialTheme.colors.standardBackgroundElevated), - horizontalArrangement = Arrangement.SpaceBetween - ) { - ToolbarButtons() - UserAvatarButton() - } -} - -@Composable -private fun ToolbarButtons() { - val activeNode = remember { mutableStateOf(null) } - fun subscribe() { - syncActiveNode(activeNode, store.state) - } - store.subscribe { subscribe() } - - Row { - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.ListView.Line.resourcePath()) - - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.Home.Line.resourcePath()) - - AddContainerDropdownMenuButton() - - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.TextBox.Line.resourcePath()) { - store.dispatch(ComponentAction.AddNode(ComponentType.Text.node(), activeNode.value?.id)) - } - - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.Image.Line.resourcePath()) { - store.dispatch(ComponentAction.AddNode(ComponentType.Drawable.node(), activeNode.value?.id)) - } - - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.EarlyBird.Line.resourcePath()) { - store.dispatch(ComponentAction.AddNode(ComponentType.Vector.node(), activeNode.value?.id)) - } - - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.Activity.Line.resourcePath()) { - store.dispatch(ComponentAction.AddNode(ComponentType.Button.node(), activeNode.value?.id)) - } - - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.Table.Line.resourcePath()) { - store.dispatch(ComponentAction.AddNode(ComponentType.Table.node(), activeNode.value?.id)) - } - - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.Theme.Line.resourcePath()) { - store.dispatch(ScreenAction.ToggleNightMode) - } - - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.Switcher.Line.resourcePath()) { - store.dispatch(ScreenAction.ToggleBottomTabs) - } - - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.Settings.Line.resourcePath()) - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.Help.Line.resourcePath()) - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.AddComment.Line.resourcePath()) - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.Share.Line.resourcePath()) - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.Heart.Line.resourcePath()) - - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.Delete.Line.resourcePath(), tint = MaterialTheme.colors.error) { - store.dispatch(ComponentAction.Clear) - } - - BasicToolbarButton(iconResourcePath = ComponentBoxIcon.Twinkle1.Line.resourcePath(), tint = MaterialTheme.colors.primary) { - store.dispatch(ComponentAction.ClearActiveNode) - } - } -} - -@Composable -private fun UserAvatarButton() { - Image( - painter = painterResource("tag.jpeg"), - contentDescription = null, - modifier = Modifier.size(40.dp).clip(CircleShape) - ) -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/theme/ComponentBoxIcon.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/theme/ComponentBoxIcon.kt deleted file mode 100644 index 7fbbe6cc..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/theme/ComponentBoxIcon.kt +++ /dev/null @@ -1,104 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.theme - -sealed class ComponentBoxIcon { - sealed class ListView : ComponentBoxIcon() { - object Line : ListView() - object Fill : ListView() - } - - sealed class Home : ComponentBoxIcon() { - object Line : Home() - object Fill : Home() - } - - sealed class Image : ComponentBoxIcon() { - object Line : Image() - object Fill : Image() - } - - sealed class TextBox : ComponentBoxIcon() { - object Line : TextBox() - object Fill : TextBox() - } - - sealed class EarlyBird : ComponentBoxIcon() { - object Line : EarlyBird() - } - - sealed class Activity : ComponentBoxIcon() { - object Line : Activity() - } - - sealed class Table : ComponentBoxIcon() { - object Line : Table() - } - - sealed class Theme : ComponentBoxIcon() { - object Line : Theme() - } - - sealed class Settings : ComponentBoxIcon() { - object Line : Settings() - } - - sealed class Help : ComponentBoxIcon() { - object Line : Help() - } - - sealed class AddComment : ComponentBoxIcon() { - object Line : AddComment() - } - - sealed class Share : ComponentBoxIcon() { - object Line : Share() - } - - sealed class Heart : ComponentBoxIcon() { - object Line : Heart() - } - - sealed class Delete : ComponentBoxIcon() { - object Line : Delete() - } - - sealed class Twinkle1 : ComponentBoxIcon() { - object Line : Twinkle1() - } - - sealed class Twinkle2 : ComponentBoxIcon() { - object Line : Twinkle2() - } - - sealed class Square: ComponentBoxIcon() { - object Line: Square() - } - - sealed class Switcher: ComponentBoxIcon() { - object Line: Switcher() - } -} - -fun ComponentBoxIcon.resourcePath() = when (this) { - ComponentBoxIcon.ListView.Fill -> "drawable/ic_dig_list_view_fill.xml" - ComponentBoxIcon.ListView.Line -> "drawable/ic_dig_list_view_line.xml" - ComponentBoxIcon.Activity.Line -> "drawable/ic_dig_activity_line.xml" - ComponentBoxIcon.AddComment.Line -> "drawable/ic_dig_add_comment_line.xml" - ComponentBoxIcon.Delete.Line -> "drawable/ic_dig_delete_line.xml" - ComponentBoxIcon.EarlyBird.Line -> "drawable/ic_dig_early_bird_line.xml" - ComponentBoxIcon.Heart.Line -> "drawable/ic_dig_heart_line.xml" - ComponentBoxIcon.Help.Line -> "drawable/ic_dig_help_line.xml" - ComponentBoxIcon.Home.Fill -> "drawable/ic_dig_home_fill.xml" - ComponentBoxIcon.Home.Line -> "drawable/ic_dig_home_line.xml" - ComponentBoxIcon.Image.Fill -> "drawable/ic_dig_image_fill.xml" - ComponentBoxIcon.Image.Line -> "drawable/ic_dig_image_line.xml" - ComponentBoxIcon.Settings.Line -> "drawable/ic_dig_settings_line.xml" - ComponentBoxIcon.Share.Line -> "drawable/ic_dig_share_line.xml" - ComponentBoxIcon.Table.Line -> "drawable/ic_dig_table_line.xml" - ComponentBoxIcon.TextBox.Fill -> "drawable/ic_dig_text_box_fill.xml" - ComponentBoxIcon.TextBox.Line -> "drawable/ic_dig_text_box_line.xml" - ComponentBoxIcon.Theme.Line -> "drawable/ic_dig_theme_line.xml" - ComponentBoxIcon.Twinkle1.Line -> "drawable/ic_dig_twinkle_1_line.xml" - ComponentBoxIcon.Twinkle2.Line -> "drawable/ic_dig_twinkle_2_line.xml" - ComponentBoxIcon.Square.Line -> "drawable/ic_dig_square_line.xml" - ComponentBoxIcon.Switcher.Line -> "drawable/ic_dig_switcher_line.xml" -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/theme/colors.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/theme/colors.kt deleted file mode 100644 index 618c79e2..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/theme/colors.kt +++ /dev/null @@ -1,83 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.theme - -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.material.Colors as RealColors - -object Colors { - val Light = RealColors( - primary = Color(0xFF0061FE), - primaryVariant = Color(0xFF1E1919), - secondary = Color(0xFFF7F5F2), - secondaryVariant = Color(0xFF1E1918), - background = Color(0xFFFFFFFF), - surface = Color(0xFFFBFAF9), - error = Color(0xFF9B0032), - onPrimary = Color(0xFFF7F5F2), - onSecondary = Color(0xFFF7F5F2), - onBackground = Color(0xFF1E1919), - onSurface = Color(0xFF1E1919), - onError = Color(0xFFF7F5F2), - isLight = true, - ) - - val Dark = RealColors( - primary = Color(0xFF3984FF), - primaryVariant = Color(0xFF3984FF), - secondary = Color(0xFF3984FF), - secondaryVariant = Color(0xFF3984FF), - background = Color(0xFF161313), - surface = Color(0xFF3984FF), - error = Color(0xFFFA551E), - onPrimary = Color(0xFF3984FF), - onSecondary = Color(0xFF3984FF), - onBackground = Color(0xFFFFFFFF), - onSurface = Color(0xFF3984FF), - onError = Color(0xFF3984FF), - isLight = false, - ) -} - -val RealColors.disabledBackground: Color - @Composable - get() = if (isLight) Color(0xFFC0BBB4) else Color(0xFFD8D3CB) - -val RealColors.standardBackgroundElevated: Color - @Composable - get() = if (isLight) Color(0xFFFBFAF9) else Color(0xFF2B2929) - -val RealColors.successFill: Color - @Composable - get() = if (isLight) Color(0xFFB4DC19) else Color(0xFFB4DC19) - -val RealColors.faintText: Color - @Composable - get() = if (isLight) Color(0xC7524A3E) else Color(0x99F7F5F6) - -val RealColors.standardText: Color - @Composable - get() = if (isLight) Color(0xFF1E1919) else Color(0xFFF7F5F9) - -val RealColors.buttonBackground: Color - @Composable - get() = if (isLight) Color(0xFFFFFFFF) else Color(0xff404754) - -val RealColors.realBackground: Color - @Composable - get() = if (isLight) Color(0xFFFFFFFF) else Color(0xff282c34) - -val RealColors.paperBackground: Color - @Composable - get() = if (isLight) Color(0xFFFFFFFF) else Color(0xff21252b) - -val RealColors.grayPrimary: Color - @Composable - get() = if (isLight) Color(0xFFFFFFFF) else Color(0xff424242) - -val RealColors.standardBackground: Color - @Composable - get() = if (isLight) Color(0xFFFFFFFF) else Color(0xFF161313) - -val RealColors.inverseStandardBackground: Color - @Composable - get() = if (isLight) Color(0xFF000000) else Color(0xFFFFFFFF) diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/theme/componentBoxTheme.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/theme/componentBoxTheme.kt deleted file mode 100644 index cdef9ee2..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/theme/componentBoxTheme.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.theme - -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import com.dropbox.desktop.componentbox.store.store -import com.dropbox.desktop.componentbox.store.subscriptions.syncNightMode - -@Composable -fun componentBoxTheme(content: @Composable () -> Unit) { - val colors = remember { mutableStateOf(Colors.Dark) } - val isNightMode = remember { mutableStateOf(store.state.screenState.isNightMode) } - - fun subscribe() { - syncNightMode(isNightMode, store.state) - colors.value = if (isNightMode.value) Colors.Dark else Colors.Light - } - - store.subscribe { subscribe() } - - return MaterialTheme( - typography = Typography, - colors = colors.value, - content = content - ) -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/theme/type.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/theme/type.kt deleted file mode 100644 index 386018ac..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/ui/theme/type.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.dropbox.desktop.componentbox.ui.theme - -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.text.platform.Font -import androidx.compose.ui.unit.sp -import androidx.compose.material.Typography as RealTypography - -val sharpGroteskBookFont = Font("font/sharpgrotesk_book.ttf") -val sharpGroteskBookFontFamily = FontFamily(listOf(sharpGroteskBookFont)) -val atlasGroteskRegularFont = Font("font/atlasgrotesk_regular.ttf") -val atlasGroteskFontFamily = FontFamily(listOf(atlasGroteskRegularFont)) - -val Typography = RealTypography( - defaultFontFamily = sharpGroteskBookFontFamily, - h1 = TextStyle(fontFamily = sharpGroteskBookFontFamily, fontWeight = FontWeight.Bold, fontSize = 24.sp), - h2 = TextStyle(fontFamily = sharpGroteskBookFontFamily, fontWeight = FontWeight.Bold, fontSize = 22.sp), - h3 = TextStyle(fontFamily = sharpGroteskBookFontFamily, fontWeight = FontWeight.Bold, fontSize = 20.sp), - h4 = TextStyle(fontFamily = sharpGroteskBookFontFamily, fontWeight = FontWeight.Bold, fontSize = 18.sp), - h5 = TextStyle(fontFamily = sharpGroteskBookFontFamily, fontWeight = FontWeight.Bold, fontSize = 16.sp), - h6 = TextStyle(fontFamily = sharpGroteskBookFontFamily, fontWeight = FontWeight.Bold, fontSize = 14.sp), - body1 = TextStyle(fontFamily = atlasGroteskFontFamily, fontWeight = FontWeight.Normal, fontSize = 14.sp), - body2 = TextStyle(fontFamily = atlasGroteskFontFamily, fontWeight = FontWeight.Normal, fontSize = 12.sp), - button = TextStyle(fontFamily = atlasGroteskFontFamily, fontWeight = FontWeight.Bold, fontSize = 14.sp), - caption = TextStyle(fontFamily = atlasGroteskFontFamily, fontWeight = FontWeight.Light, fontSize = 8.sp), -) \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/colors.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/colors.kt deleted file mode 100644 index d00c5c81..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/colors.kt +++ /dev/null @@ -1,2 +0,0 @@ -package com.dropbox.desktop.componentbox.util - diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/component.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/component.kt deleted file mode 100644 index 1d5fc289..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/component.kt +++ /dev/null @@ -1,41 +0,0 @@ -package com.dropbox.desktop.componentbox.util - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Inflater -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.ComponentType -import com.dropbox.desktop.componentbox.store.state.ComponentState - -internal fun ComponentType.iconResourcePath() = when (this) { - ComponentType.Surface, - ComponentType.Row, - ComponentType.LazyRow, - ComponentType.Column, - ComponentType.LazyColumn, - ComponentType.Box -> "drawable/ic_dig_square_line.xml" - ComponentType.Text -> "drawable/ic_dig_h1_line.xml" - ComponentType.Button -> "drawable/ic_dig_activity_line.xml" - ComponentType.Drawable, - ComponentType.Vector -> "drawable/ic_dig_image_line.xml" - ComponentType.Switch, - ComponentType.Table -> "drawable/ic_dig_table_line.xml" -} - -internal fun ComponentState.getComponentById(id: String?) = idToComponent[id] - -@Composable -internal fun Component.inflate(inflater: Inflater) = inflater.Inflate(this) - -internal fun Component.copy(): Component = when (this) { - is Component.Box -> copy(components = components?.copy(), modifier = this.modifier!!.copy()) - is Component.Button -> copy(components = components?.copy(), modifier = this.modifier!!.copy()) - is Component.Column -> copy(components = components?.copy(), modifier = this.modifier!!.copy()) - is Component.Drawable -> copy(modifier = this.modifier!!.copy()) - is Component.Row -> copy(components = components?.copy(), modifier = this.modifier!!.copy()) - is Component.Switch -> copy(modifier = this.modifier!!.copy()) - is Component.Text -> copy(modifier = this.modifier!!.copy()) - is Component.Vector -> copy(modifier = this.modifier!!.copy()) - is Component.Surface -> copy(components = components?.copy(), modifier = this.modifier!!.copy()) -} - -internal fun MutableList.copy(): MutableList = this.map { it.copy() }.toMutableList() \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/generic.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/generic.kt deleted file mode 100644 index 377da606..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/generic.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.dropbox.desktop.componentbox.util - -import com.dropbox.componentbox.foundation.Alignment -import com.dropbox.componentbox.foundation.Arrangement -import com.dropbox.componentbox.foundation.Image -import com.dropbox.componentbox.foundation.MultiplatformRes -import com.dropbox.componentbox.foundation.TextStyle - -internal fun T.name(): String { - return when (this) { - is TextStyle -> this.name - is Image -> this.name - is MultiplatformRes -> this.name - is Alignment -> this.name - is Arrangement -> this.name - else -> "" - } -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/id.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/id.kt deleted file mode 100644 index 37a24ed9..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/id.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.dropbox.desktop.componentbox.util - -import java.util.UUID - -fun id() = UUID.randomUUID().toString().split("-")[0] \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/layout.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/layout.kt deleted file mode 100644 index e6665881..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/layout.kt +++ /dev/null @@ -1,53 +0,0 @@ -package com.dropbox.desktop.componentbox.util - -import com.dropbox.componentbox.foundation.Alignment -import com.dropbox.componentbox.foundation.Arrangement -import androidx.compose.foundation.layout.Arrangement as RealArrangement -import androidx.compose.ui.Alignment as RealAlignment - -fun Alignment.horizontal(): RealAlignment.Horizontal = when (this) { - Alignment.Start -> RealAlignment.Start - Alignment.CenterHorizontally -> RealAlignment.CenterHorizontally - Alignment.End -> RealAlignment.End - else -> RealAlignment.Start -} - -fun Alignment.vertical(): RealAlignment.Vertical = when (this) { - Alignment.Top -> RealAlignment.Top - Alignment.CenterVertically -> RealAlignment.CenterVertically - Alignment.Bottom -> RealAlignment.Bottom - else -> RealAlignment.Top -} - -fun Alignment.alignment(): RealAlignment = when (this) { - Alignment.TopStart -> RealAlignment.TopStart - Alignment.TopCenter -> RealAlignment.TopCenter - Alignment.TopEnd -> RealAlignment.TopEnd - Alignment.CenterStart -> RealAlignment.CenterStart - Alignment.Center -> RealAlignment.Center - Alignment.CenterEnd -> RealAlignment.CenterEnd - Alignment.BottomStart -> RealAlignment.BottomStart - Alignment.BottomCenter -> RealAlignment.BottomCenter - Alignment.BottomEnd -> RealAlignment.BottomEnd - else -> RealAlignment.TopStart -} - -fun Arrangement.vertical(): RealArrangement.Vertical = when (this) { - Arrangement.Top -> RealArrangement.Top - Arrangement.Bottom -> RealArrangement.Bottom - Arrangement.Center -> RealArrangement.Center - Arrangement.SpaceEvenly -> RealArrangement.SpaceEvenly - Arrangement.SpaceBetween -> RealArrangement.SpaceBetween - Arrangement.SpaceAround -> RealArrangement.SpaceAround - else -> androidx.compose.foundation.layout.Arrangement.Top -} - -fun Arrangement.horizontal(): RealArrangement.Horizontal = when (this) { - Arrangement.Start -> RealArrangement.Start - Arrangement.End -> RealArrangement.End - Arrangement.Center -> RealArrangement.Center - Arrangement.SpaceEvenly -> RealArrangement.SpaceEvenly - Arrangement.SpaceBetween -> RealArrangement.SpaceBetween - Arrangement.SpaceAround -> RealArrangement.SpaceAround - else -> androidx.compose.foundation.layout.Arrangement.Start -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/modifier.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/modifier.kt deleted file mode 100644 index c151ff73..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/modifier.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.dropbox.desktop.componentbox.util - -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Margin -import com.dropbox.componentbox.foundation.Padding - -internal fun Component?.margin() = when (this) { - is Component.Box -> this.modifier?.margin ?: Margin() - is Component.Button -> this.modifier?.margin ?: Margin() - is Component.Column -> this.modifier?.margin ?: Margin() - is Component.Drawable -> this.modifier?.margin ?: Margin() - is Component.Row -> this.modifier?.margin ?: Margin() - is Component.Switch -> this.modifier?.margin ?: Margin() - is Component.Text -> this.modifier?.margin ?: Margin() - is Component.Vector -> this.modifier?.margin ?: Margin() - is Component.Surface -> this.modifier?.margin ?: Margin() - else -> Margin() -} - -internal fun Component?.padding() = when (this) { - is Component.Box -> this.modifier?.padding ?: Padding() - is Component.Button -> this.modifier?.padding ?: Padding() - is Component.Column -> this.modifier?.padding ?: Padding() - is Component.Drawable -> this.modifier?.padding ?: Padding() - is Component.Row -> this.modifier?.padding ?: Padding() - is Component.Switch -> this.modifier?.padding ?: Padding() - is Component.Text -> this.modifier?.padding ?: Padding() - is Component.Vector -> this.modifier?.padding ?: Padding() - is Component.Surface -> this.modifier?.padding ?: Padding() - else -> Padding() -} \ No newline at end of file diff --git a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/node.kt b/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/node.kt deleted file mode 100644 index 3ff840bb..00000000 --- a/desktop/src/jvmMain/kotlin/com/dropbox/desktop/componentbox/util/node.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.dropbox.desktop.componentbox.util - -import com.dropbox.desktop.componentbox.data.entities.Node -import com.dropbox.componentbox.foundation.ComponentType - -internal fun ComponentType.node() = Node(id = id(), path = "", type = this, children = mutableListOf()) diff --git a/desktop/src/jvmMain/resources/drawable-hdpi/roadblock.webp b/desktop/src/jvmMain/resources/drawable-hdpi/roadblock.webp deleted file mode 100644 index 8cedb2bb..00000000 Binary files a/desktop/src/jvmMain/resources/drawable-hdpi/roadblock.webp and /dev/null differ diff --git a/desktop/src/jvmMain/resources/drawable-night-xhdpi/placeholder.webp b/desktop/src/jvmMain/resources/drawable-night-xhdpi/placeholder.webp deleted file mode 100644 index 2e1dba92..00000000 Binary files a/desktop/src/jvmMain/resources/drawable-night-xhdpi/placeholder.webp and /dev/null differ diff --git a/desktop/src/jvmMain/resources/drawable-night-xhdpi/traffic_road_blocked.webp b/desktop/src/jvmMain/resources/drawable-night-xhdpi/traffic_road_blocked.webp deleted file mode 100644 index 8732ecbf..00000000 Binary files a/desktop/src/jvmMain/resources/drawable-night-xhdpi/traffic_road_blocked.webp and /dev/null differ diff --git a/desktop/src/jvmMain/resources/drawable-xhdpi/placeholder.webp b/desktop/src/jvmMain/resources/drawable-xhdpi/placeholder.webp deleted file mode 100644 index 2e1dba92..00000000 Binary files a/desktop/src/jvmMain/resources/drawable-xhdpi/placeholder.webp and /dev/null differ diff --git a/desktop/src/jvmMain/resources/drawable-xhdpi/roadblock.webp b/desktop/src/jvmMain/resources/drawable-xhdpi/roadblock.webp deleted file mode 100644 index 5f0c60bb..00000000 Binary files a/desktop/src/jvmMain/resources/drawable-xhdpi/roadblock.webp and /dev/null differ diff --git a/desktop/src/jvmMain/resources/drawable-xhdpi/traffic_road_blocked.webp b/desktop/src/jvmMain/resources/drawable-xhdpi/traffic_road_blocked.webp deleted file mode 100644 index e1148ff5..00000000 Binary files a/desktop/src/jvmMain/resources/drawable-xhdpi/traffic_road_blocked.webp and /dev/null differ diff --git a/desktop/src/jvmMain/resources/drawable-xxhdpi/dog_digs.webp b/desktop/src/jvmMain/resources/drawable-xxhdpi/dog_digs.webp deleted file mode 100644 index 79fa19d9..00000000 Binary files a/desktop/src/jvmMain/resources/drawable-xxhdpi/dog_digs.webp and /dev/null differ diff --git a/desktop/src/jvmMain/resources/drawable-xxhdpi/roadblock.webp b/desktop/src/jvmMain/resources/drawable-xxhdpi/roadblock.webp deleted file mode 100644 index 6015f07c..00000000 Binary files a/desktop/src/jvmMain/resources/drawable-xxhdpi/roadblock.webp and /dev/null differ diff --git a/desktop/src/jvmMain/resources/drawable-xxhdpi/travel_backpack.webp b/desktop/src/jvmMain/resources/drawable-xxhdpi/travel_backpack.webp deleted file mode 100644 index 0d60f4a4..00000000 Binary files a/desktop/src/jvmMain/resources/drawable-xxhdpi/travel_backpack.webp and /dev/null differ diff --git a/desktop/src/jvmMain/resources/drawable-xxhdpi/van_cityscape.webp b/desktop/src/jvmMain/resources/drawable-xxhdpi/van_cityscape.webp deleted file mode 100644 index d46bdb42..00000000 Binary files a/desktop/src/jvmMain/resources/drawable-xxhdpi/van_cityscape.webp and /dev/null differ diff --git a/desktop/src/jvmMain/resources/drawable-xxxhdpi/roadblock.webp b/desktop/src/jvmMain/resources/drawable-xxxhdpi/roadblock.webp deleted file mode 100644 index 24ce1832..00000000 Binary files a/desktop/src/jvmMain/resources/drawable-xxxhdpi/roadblock.webp and /dev/null differ diff --git a/desktop/src/jvmMain/resources/drawable/background.webp b/desktop/src/jvmMain/resources/drawable/background.webp deleted file mode 100644 index 9e774e2c..00000000 Binary files a/desktop/src/jvmMain/resources/drawable/background.webp and /dev/null differ diff --git a/desktop/src/jvmMain/resources/drawable/dig_dropbox_logo.xml b/desktop/src/jvmMain/resources/drawable/dig_dropbox_logo.xml deleted file mode 100644 index f584567c..00000000 --- a/desktop/src/jvmMain/resources/drawable/dig_dropbox_logo.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_activity_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_activity_line.xml deleted file mode 100644 index 4cac1eca..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_activity_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_add_circle_fill.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_add_circle_fill.xml deleted file mode 100644 index ca781fe2..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_add_circle_fill.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_add_comment_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_add_comment_line.xml deleted file mode 100644 index 11d85ee9..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_add_comment_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_arrow_right_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_arrow_right_line.xml deleted file mode 100644 index 60e602ff..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_arrow_right_line.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_backup_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_backup_line.xml deleted file mode 100644 index a3f9a3df..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_backup_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_camera_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_camera_line.xml deleted file mode 100644 index b1d4cee0..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_camera_line.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_camera_upload_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_camera_upload_line.xml deleted file mode 100644 index 471a3ff2..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_camera_upload_line.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_checkmark_circle_fill.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_checkmark_circle_fill.xml deleted file mode 100644 index 9a22b4a3..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_checkmark_circle_fill.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_checkmark_circle_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_checkmark_circle_line.xml deleted file mode 100644 index 68ee9fec..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_checkmark_circle_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_chevron_up_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_chevron_up_line.xml deleted file mode 100644 index 4081fe7a..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_chevron_up_line.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_close_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_close_line.xml deleted file mode 100644 index 0119c88b..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_close_line.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_compass_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_compass_line.xml deleted file mode 100644 index e520ccf5..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_compass_line.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_computer_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_computer_line.xml deleted file mode 100644 index 79db8eed..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_computer_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_delete_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_delete_line.xml deleted file mode 100644 index bbbfb0ba..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_delete_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_dropbox_backup_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_dropbox_backup_line.xml deleted file mode 100644 index 26dc6d81..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_dropbox_backup_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_dropbox_capture_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_dropbox_capture_line.xml deleted file mode 100644 index f9857bda..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_dropbox_capture_line.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_dropbox_passwords_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_dropbox_passwords_line.xml deleted file mode 100644 index e5625dee..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_dropbox_passwords_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_early_bird_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_early_bird_line.xml deleted file mode 100644 index 99ee0757..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_early_bird_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_edit_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_edit_line.xml deleted file mode 100644 index 89876ec0..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_edit_line.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_fail_fill.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_fail_fill.xml deleted file mode 100644 index 51097ac1..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_fail_fill.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_fail_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_fail_line.xml deleted file mode 100644 index 876081c0..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_fail_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_h1_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_h1_line.xml deleted file mode 100644 index 0f4d5876..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_h1_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_heart_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_heart_line.xml deleted file mode 100644 index 8ac5e950..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_heart_line.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_help_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_help_line.xml deleted file mode 100644 index b1a1a751..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_help_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_home_fill.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_home_fill.xml deleted file mode 100644 index 8dc9f779..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_home_fill.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_home_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_home_line.xml deleted file mode 100644 index f608c4bf..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_home_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_image_fill.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_image_fill.xml deleted file mode 100644 index bfb20350..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_image_fill.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_image_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_image_line.xml deleted file mode 100644 index e4fb79aa..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_image_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_list_view_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_list_view_line.xml deleted file mode 100644 index b28b79d6..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_list_view_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_member_transfer_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_member_transfer_line.xml deleted file mode 100644 index 49592d16..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_member_transfer_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_mobile_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_mobile_line.xml deleted file mode 100644 index 6ea49e20..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_mobile_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_person_fill.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_person_fill.xml deleted file mode 100644 index 108358fb..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_person_fill.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_person_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_person_line.xml deleted file mode 100644 index ed947bd3..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_person_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_scan_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_scan_line.xml deleted file mode 100644 index f2e875b2..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_scan_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_search_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_search_line.xml deleted file mode 100644 index 76c5dd0f..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_search_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_settings_fill.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_settings_fill.xml deleted file mode 100644 index 951b305b..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_settings_fill.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_settings_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_settings_line.xml deleted file mode 100644 index 3e27ac41..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_settings_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_share_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_share_line.xml deleted file mode 100644 index 0493a4ac..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_share_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_space_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_space_line.xml deleted file mode 100644 index e6d1da87..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_space_line.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_square_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_square_line.xml deleted file mode 100644 index 7f70c724..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_square_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_switcher_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_switcher_line.xml deleted file mode 100644 index 0c464d17..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_switcher_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_syncing_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_syncing_line.xml deleted file mode 100644 index 97afcad1..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_syncing_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_table_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_table_line.xml deleted file mode 100644 index 49cd9863..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_table_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_text_box_fill.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_text_box_fill.xml deleted file mode 100644 index d5c9bb68..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_text_box_fill.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_text_box_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_text_box_line.xml deleted file mode 100644 index 700d9072..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_text_box_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_theme_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_theme_line.xml deleted file mode 100644 index 92f442be..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_theme_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_twinkle_1_fill.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_twinkle_1_fill.xml deleted file mode 100644 index 8f429e1f..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_twinkle_1_fill.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_twinkle_1_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_twinkle_1_line.xml deleted file mode 100644 index 0ef3534d..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_twinkle_1_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_twinkle_2_fill.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_twinkle_2_fill.xml deleted file mode 100644 index 034f9b43..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_twinkle_2_fill.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_twinkle_2_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_twinkle_2_line.xml deleted file mode 100644 index 3bc75aa6..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_twinkle_2_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_upgrade_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_upgrade_line.xml deleted file mode 100644 index 88db0b22..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_upgrade_line.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_upload_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_upload_line.xml deleted file mode 100644 index 499d10a0..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_upload_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/drawable/ic_dig_warning_line.xml b/desktop/src/jvmMain/resources/drawable/ic_dig_warning_line.xml deleted file mode 100644 index aa6ab00c..00000000 --- a/desktop/src/jvmMain/resources/drawable/ic_dig_warning_line.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/desktop/src/jvmMain/resources/drawable/passwords.webp b/desktop/src/jvmMain/resources/drawable/passwords.webp deleted file mode 100644 index ea3c276d..00000000 Binary files a/desktop/src/jvmMain/resources/drawable/passwords.webp and /dev/null differ diff --git a/desktop/src/jvmMain/resources/drawable/pixel_4.webp b/desktop/src/jvmMain/resources/drawable/pixel_4.webp deleted file mode 100644 index 63a5afc9..00000000 Binary files a/desktop/src/jvmMain/resources/drawable/pixel_4.webp and /dev/null differ diff --git a/desktop/src/jvmMain/resources/drawable/tag.jpeg b/desktop/src/jvmMain/resources/drawable/tag.jpeg deleted file mode 100644 index 05ed48f5..00000000 Binary files a/desktop/src/jvmMain/resources/drawable/tag.jpeg and /dev/null differ diff --git a/desktop/src/jvmMain/resources/drawable/toolbox.webp b/desktop/src/jvmMain/resources/drawable/toolbox.webp deleted file mode 100644 index fb3cff9d..00000000 Binary files a/desktop/src/jvmMain/resources/drawable/toolbox.webp and /dev/null differ diff --git a/desktop/src/jvmMain/resources/font/atlas_grotesk.xml b/desktop/src/jvmMain/resources/font/atlas_grotesk.xml deleted file mode 100644 index 699dc5a1..00000000 --- a/desktop/src/jvmMain/resources/font/atlas_grotesk.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/font/atlas_grotesk_bold.xml b/desktop/src/jvmMain/resources/font/atlas_grotesk_bold.xml deleted file mode 100644 index efcf7319..00000000 --- a/desktop/src/jvmMain/resources/font/atlas_grotesk_bold.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/font/atlasgrotesk_medium.ttf b/desktop/src/jvmMain/resources/font/atlasgrotesk_medium.ttf deleted file mode 100644 index fd0025aa..00000000 Binary files a/desktop/src/jvmMain/resources/font/atlasgrotesk_medium.ttf and /dev/null differ diff --git a/desktop/src/jvmMain/resources/font/atlasgrotesk_regular.ttf b/desktop/src/jvmMain/resources/font/atlasgrotesk_regular.ttf deleted file mode 100644 index 17bd78bd..00000000 Binary files a/desktop/src/jvmMain/resources/font/atlasgrotesk_regular.ttf and /dev/null differ diff --git a/desktop/src/jvmMain/resources/font/sharp_grotesk.xml b/desktop/src/jvmMain/resources/font/sharp_grotesk.xml deleted file mode 100644 index 2a0f9b63..00000000 --- a/desktop/src/jvmMain/resources/font/sharp_grotesk.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/font/sharp_grotesk_book.xml b/desktop/src/jvmMain/resources/font/sharp_grotesk_book.xml deleted file mode 100644 index 0ac4ca73..00000000 --- a/desktop/src/jvmMain/resources/font/sharp_grotesk_book.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/desktop/src/jvmMain/resources/font/sharpgrotesk_book.ttf b/desktop/src/jvmMain/resources/font/sharpgrotesk_book.ttf deleted file mode 100644 index c98e4687..00000000 Binary files a/desktop/src/jvmMain/resources/font/sharpgrotesk_book.ttf and /dev/null differ diff --git a/desktop/src/jvmMain/resources/font/sharpgrotesk_medium.ttf b/desktop/src/jvmMain/resources/font/sharpgrotesk_medium.ttf deleted file mode 100644 index 6d5d7b57..00000000 Binary files a/desktop/src/jvmMain/resources/font/sharpgrotesk_medium.ttf and /dev/null differ diff --git a/desktop/src/jvmMain/resources/roadblock.png b/desktop/src/jvmMain/resources/roadblock.png deleted file mode 100644 index bcd3d240..00000000 Binary files a/desktop/src/jvmMain/resources/roadblock.png and /dev/null differ diff --git a/desktop/src/jvmMain/resources/tag.jpeg b/desktop/src/jvmMain/resources/tag.jpeg deleted file mode 100644 index 05ed48f5..00000000 Binary files a/desktop/src/jvmMain/resources/tag.jpeg and /dev/null differ diff --git a/desktop/src/jvmMain/resources/values-night/colors.xml b/desktop/src/jvmMain/resources/values-night/colors.xml deleted file mode 100644 index 3e713166..00000000 --- a/desktop/src/jvmMain/resources/values-night/colors.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - #4DFA551E - #FFFA551E - #66FA551E - #FFFA551E - #663984FF - #293984FF - #FF3984FF - #663984FF - #FF3984FF - #FF3984FF - #FFF7F5F3 - #FF1E1918 - #FFD8D3CB - #4DF7F5F4 - #4DF7F5F5 - #FF2B2929 - #FF242121 - #33BABABA - #99F7F5F6 - - #1A9B0032 - #FF9B0032 - #529B0032 - #FF9B0032 - #290061FE - #140061FE - #FF0061FE - #520061FE - #FF0061FE - #FF0061FE - #FF1E1917 - #FFF7F5F7 - #FFC0BBB4 - #FFC0BBB4 - #66524A3E - #FFFBFAF9 - #FFF7F5F8 - #33A69171 - #C7524A3E - #24A69171 - #3DA69171 - #52A69171 - #FFFFFFFF - #99A69E92 - #FF1E1915 - #1F2D8000 - #FF2D8000 - #522D8000 - #FF2D8000 - #3DFAD24B - #FF9B6400 - #529B6400 - #FF9B6400 - - #298E8B87 - #3D8E8B87 - #528E8B87 - #FF161313 - #808E8B87 - #FFF7F5F9 - #4DB4DC19 - #FFB4DC19 - #66B4DC19 - #FFB4DC19 - #4DFAD24B - #FFFAD24B - #66FAD24B - #FFFAD24B - @color/color__core__accent - diff --git a/desktop/src/jvmMain/resources/values/colors.xml b/desktop/src/jvmMain/resources/values/colors.xml deleted file mode 100644 index a31f043b..00000000 --- a/desktop/src/jvmMain/resources/values/colors.xml +++ /dev/null @@ -1,192 +0,0 @@ - - - #FFCD2F7B - #FFFAD24B - #FF0F503C - #FFB4C8E1 - #FF9B0032 - #FF9B6400 - #FFB4DC19 - #FF283750 - #FF007891 - #FFC8AFF0 - #FFFFAFA5 - #FF78286E - #FFBE4B0A - #FFFA551E - #FFFF8C19 - #FF14C8EB - #1A9B0032 - #FF9B0032 - #529B0032 - #FF9B0032 - #290061FE - #140061FE - #FF0061FE - #520061FE - #FF0061FE - #FF0061FE - #FF1E1919 - #FFF7F5F2 - #FFC0BBB4 - #FFC0BBB4 - #66524A3E - #FFFBFAF9 - #FFF7F5F2 - #33A69171 - #C7524A3E - #FFCD2F7B - #FFFAD24B - #FF0F503C - #FFB4C8E1 - #FF9B0032 - #FF9B6400 - #FFB4DC19 - #FF283750 - #FF007891 - #FFC8AFF0 - #FFFFAFA5 - #FF78286E - #FFBE4B0A - #FFFA551E - #FFFF8C19 - #FF14C8EB - #FF1E1919 - #FF1E1919 - #FFFFF9EF - #FFE0DBD6 - #FFC6C6C6 - #FFB2AAA4 - #FF8A8A8A - #FFE5C892 - #FFCAA672 - #FFC1A483 - #FFC2926E - #FF965128 - #FF8A6B3E - #FF6F4328 - #FFA67A5A - #FFA25E3A - #FF7A3B24 - #FF56241A - #FF97795E - #FF745135 - #FF604430 - #FF796A61 - #FF544A44 - #FF422608 - #FF322011 - #FF351800 - #FFFBDCBE - #FFF8DADA - #FFF4CBAE - #FFFACCBC - #FFEFBC96 - #FFE7BFA6 - #FFF2B289 - #FFDFB193 - #FFDBA889 - #FFE39D77 - #FFD19063 - #FFAD785C - #FFCF7D42 - #FFB4724B - #FFC3672D - #FFB06330 - #FFB0591A - #FF905235 - #FF914C30 - #FF974523 - #FF843F18 - #FF793C23 - #FF6E3515 - #FF68352A - #4DFA551E - #FFFA551E - #66FA551E - #FFFA551E - #663984FF - #293984FF - #FF3984FF - #663984FF - #FF3984FF - #FF3984FF - #FFF7F5F2 - #FF1E1919 - #FFD8D3CB - #4DF7F5F2 - #4DF7F5F2 - #FF2B2929 - #FF242121 - #33BABABA - #99F7F5F2 - #298E8B87 - #3D8E8B87 - #528E8B87 - #FF161313 - #808E8B87 - #FFF7F5F2 - #4DB4DC19 - #FFB4DC19 - #66B4DC19 - #FFB4DC19 - #4DFAD24B - #FFFAD24B - #66FAD24B - #FFFAD24B - - - #4DFA551E - #FFFA551E - #66FA551E - #FFFA551E - #663984FF - #293984FF - #FF3984FF - #663984FF - #FF3984FF - #FF3984FF - #FFF7F5F2 - #FF1E1919 - #FFD8D3CB - #4DF7F5F2 - #4DF7F5F2 - #FF2B2929 - #FF242121 - #33BABABA - #99F7F5F2 - #298E8B87 - #3D8E8B87 - #528E8B87 - #FF161313 - #808E8B87 - #FFF7F5F2 - #4DB4DC19 - #FFB4DC19 - #66B4DC19 - #FFB4DC19 - #4DFAD24B - #FFFAD24B - #66FAD24B - #FFFAD24B - - #24A69171 - #3DA69171 - #52A69171 - #FFFFFFFF - #99A69E92 - #FF1E1919 - #1F2D8000 - #FF2D8000 - #522D8000 - #FF2D8000 - #800061FE - #B2D9D4CC - #3DFAD24B - #FF9B6400 - #529B6400 - #FF9B6400 - - @color/color__standard__text - @color/color__core__accent - diff --git a/desktop/src/jvmMain/resources/values/themes.xml b/desktop/src/jvmMain/resources/values/themes.xml deleted file mode 100644 index 6321062a..00000000 --- a/desktop/src/jvmMain/resources/values/themes.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index c45a448f..ee31e14f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -28,4 +28,10 @@ android.enableJetifier=false systemProp.org.gradle.internal.http.connectionTimeout=480000 systemProp.org.gradle.internal.http.socketTimeout=480000 systemProp.org.gradle.internal.repository.max.retries=10 -systemProp.org.gradle.internal.repository.initial.backoff=500 \ No newline at end of file +systemProp.org.gradle.internal.repository.initial.backoff=500 +kotlin.js.generate.executable.default=false +org.jetbrains.compose.experimental.uikit.enabled=true +org.jetbrains.compose.experimental.jscanvas.enabled=true + +composeVersion=1.3.0-alpha01-dev827 +kmmBridgeVersion=0.3.2 \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..7d460524 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,43 @@ +[versions] +activity-compose = "1.4.0-beta01" +android-min-sdk = "24" +android-compile-sdk = "33" +android-target-sdk = "33" +anvil-gradle-plugin = "2.4.2" +compose-androidx = "1.3.0-beta02" +compose-compiler = "1.3.0" +compose-jetbrains = "1.2.0-alpha01-dev755" +coroutines = "1.6.4" +dagger = "2.44" +kmm-bridge = "0.3.2" +kotlin = "1.7.10" +kotlinx-serialization = "1.4.0" +store = "4.0.5" +okio = "3.2.0" +okHttp = "4.9.1" +viewmodel = "2.6.0-alpha02" +zipline = "0.9.4" + +[libraries] +androidx-viewmodel = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "viewmodel" } +activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activity-compose" } + +kotlinx-serialization-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core", version.ref = "kotlinx-serialization" } +kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinx-serialization" } +kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" } + +compose-compiler = { group = "androidx.compose.compiler", name = "compiler", version.ref = "compose-compiler" } +compose-ui = { group = "androidx.compose.ui", name = "ui", version.ref = "compose-androidx" } +compose-material = { group = "androidx.compose.material", name = "material", version.ref = "compose-androidx" } +compose-runtime = { group = "androidx.compose.runtime", name = "runtime", version.ref = "compose-androidx" } + +dagger-dagger = { group = "com.google.dagger", name = "dagger", version.ref = "dagger" } +dagger-compiler = { group = "com.google.dagger", name = "dagger-compiler", version.ref = "dagger" } + +store = { group = "com.dropbox.mobile.store", name = "store4", version.ref = "store" } + +okio-core = { group = "com.squareup.okio", name = "okio", version.ref = "okio" } +okHttp-core = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okHttp" } + +zipline-zipline = { group = "app.cash.zipline", name = "zipline", version.ref = "zipline" } +zipline-loader = { group = "app.cash.zipline", name = "zipline-loader", version.ref = "zipline" } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 69a97150..0420ae62 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Tue Oct 25 20:23:14 EDT 2022 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 744e882e..1b6c7873 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,67 +17,101 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MSYS* | MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -106,80 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/util/build.gradle.kts b/kit/build.gradle.kts similarity index 51% rename from util/build.gradle.kts rename to kit/build.gradle.kts index 6cdc170d..57e3203b 100644 --- a/util/build.gradle.kts +++ b/kit/build.gradle.kts @@ -1,33 +1,32 @@ +@file:Suppress("UnstableApiUsage") + plugins { kotlin("multiplatform") - kotlin("plugin.serialization") id("com.android.library") - id("org.jetbrains.compose") version Version.composeMultiplatform - id("com.vanniktech.maven.publish.base") - id("org.jetbrains.dokka") + id("org.jetbrains.compose") } group = "com.dropbox.componentbox" kotlin { android() - jvm() + ios() sourceSets { val commonMain by getting { dependencies { + implementation(project(":componentbox")) implementation(compose.runtime) - implementation(compose.ui) - implementation(compose.foundation) - implementation(compose.preview) implementation(compose.material) - - implementation(project(":componentbox")) } } + + val iosMain by getting } } android { - compileSdkVersion(Version.androidCompileSdk) + val minSdk = libs.versions.android.min.sdk.get() + compileSdk = minSdk.toInt() + sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") } \ No newline at end of file diff --git a/kit/gradle.properties b/kit/gradle.properties new file mode 100644 index 00000000..dddeea35 --- /dev/null +++ b/kit/gradle.properties @@ -0,0 +1,3 @@ +POM_NAME=com.dropbox.componentbox +POM_ARTIFACT_ID=kit +POM_PACKAGING=jar \ No newline at end of file diff --git a/kit/src/androidMain/AndroidManifest.xml b/kit/src/androidMain/AndroidManifest.xml new file mode 100644 index 00000000..0793e848 --- /dev/null +++ b/kit/src/androidMain/AndroidManifest.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/kit/src/commonMain/kotlin/com/dropbox/componentbox/ui/ComponentBoxKit.kt b/kit/src/commonMain/kotlin/com/dropbox/componentbox/ui/ComponentBoxKit.kt new file mode 100644 index 00000000..148dc037 --- /dev/null +++ b/kit/src/commonMain/kotlin/com/dropbox/componentbox/ui/ComponentBoxKit.kt @@ -0,0 +1,34 @@ +package com.dropbox.componentbox.ui + +import androidx.compose.ui.graphics.painter.Painter +import com.dropbox.componentbox.component.ContentScale +import com.dropbox.componentbox.component.Icon +import com.dropbox.componentbox.component.Image +import com.dropbox.componentbox.foundation.Alignment +import com.dropbox.componentbox.foundation.Arrangement +import com.dropbox.componentbox.foundation.Color +import com.dropbox.componentbox.foundation.ComponentBoxAction +import com.dropbox.componentbox.foundation.Modifier +import com.dropbox.componentbox.foundation.TextStyle +import androidx.compose.foundation.layout.Arrangement as ComposeArrangement +import androidx.compose.ui.Alignment as ComposeAlignment + +import androidx.compose.ui.Modifier as ComposeModifier +import androidx.compose.ui.graphics.Color as ComposeColor +import androidx.compose.ui.layout.ContentScale as ComposeContentScale +import androidx.compose.ui.text.TextStyle as ComposeTextStyle + +interface ComponentBoxKit { + val actionHandler: (action: ComponentBoxAction?) -> Unit + val textProcessor: (text: String) -> String + val modifierTransformer: (modifier: Modifier?) -> ComposeModifier + val colorTransformer: (color: Color) -> ComposeColor + val textStyleTransformer: (textStyle: TextStyle?) -> ComposeTextStyle? + val contentScaleTransformer: (contentScale: ContentScale?) -> ComposeContentScale + val verticalArrangementTransformer: (arrangement: Arrangement.Vertical?) -> ComposeArrangement.Vertical? + val verticalAlignmentTransformer: (alignment: Alignment.Vertical?) -> ComposeAlignment.Vertical? + val horizontalArrangementTransformer: (arrangement: Arrangement.Horizontal?) -> ComposeArrangement.Horizontal? + val horizontalAlignmentTransformer: (alignment: Alignment.Horizontal?) -> ComposeAlignment.Horizontal? + val imagePainterConverter: (image: Image) -> Painter + val iconPainterConverter: (icon: Icon<*>) -> Painter +} diff --git a/material/build.gradle.kts b/material/build.gradle.kts index ab8f0390..713ac737 100644 --- a/material/build.gradle.kts +++ b/material/build.gradle.kts @@ -1,70 +1,33 @@ -import com.vanniktech.maven.publish.JavadocJar.Dokka -import com.vanniktech.maven.publish.KotlinMultiplatform -import com.vanniktech.maven.publish.MavenPublishBaseExtension -import org.jetbrains.dokka.gradle.DokkaTask +@file:Suppress("UnstableApiUsage") plugins { kotlin("multiplatform") - kotlin("plugin.serialization") id("com.android.library") - id("org.jetbrains.compose") version Version.composeMultiplatform - id("app.cash.zipline") + id("org.jetbrains.compose") } group = "com.dropbox.componentbox" kotlin { android() - jvm() + ios() sourceSets { val commonMain by getting { dependencies { - implementation(project(":componentbox")) - implementation(project(":util")) - api(compose.runtime) - api(compose.material) - api(compose.ui) - api(compose.foundation) - implementation(Deps.Compose.coilCompose) - - with(Deps.AndroidX) { - api(appCompat) - api(coreKtx) - } - - with(Deps.Kotlinx) { - api(serializationCore) - api(serializationJson) - } - - with(Deps.Cash.Zipline) { - implementation(zipline) - implementation(ziplineLoader) - } - - + api(project(":componentbox")) + api(project(":kit")) + implementation(compose.runtime) + implementation(compose.material) } } - val jvmMain by getting - - val androidMain by getting { - dependencies { - with(Deps.Mavericks) { - implementation(mavericksCompose) - } - - with(Deps.Cash) { - implementation(okhttp) - } - - implementation(Deps.Airbnb.lottieCompose) - } - } + val iosMain by getting } } android { - compileSdkVersion(Version.androidCompileSdk) + val minSdk = libs.versions.android.min.sdk.get() + compileSdk = minSdk.toInt() + sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") } \ No newline at end of file diff --git a/material/gradle.properties b/material/gradle.properties new file mode 100644 index 00000000..9fbeff77 --- /dev/null +++ b/material/gradle.properties @@ -0,0 +1,3 @@ +POM_NAME=com.dropbox.componentbox +POM_ARTIFACT_ID=material +POM_PACKAGING=jar \ No newline at end of file diff --git a/material/src/androidMain/AndroidManifest.xml b/material/src/androidMain/AndroidManifest.xml new file mode 100644 index 00000000..17dd47e4 --- /dev/null +++ b/material/src/androidMain/AndroidManifest.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/material/src/androidMain/kotlin/com/dropbox/componentbox/material/drawable/Inflate.kt b/material/src/androidMain/kotlin/com/dropbox/componentbox/material/drawable/Inflate.kt deleted file mode 100644 index 36e44e2e..00000000 --- a/material/src/androidMain/kotlin/com/dropbox/componentbox/material/drawable/Inflate.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.dropbox.componentbox.material.drawable - -import androidx.annotation.DrawableRes -import androidx.compose.foundation.Image -import androidx.compose.runtime.Composable -import androidx.compose.ui.res.painterResource -import coil.compose.rememberImagePainter -import com.dropbox.componentbox.foundation.COMPONENT_BOX_FALLBACK_DRAWABLE_URL -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.util.translate - -@Composable -actual fun Component.Drawable.Inflate(context: Context?) { - @DrawableRes - val drawableResId = context?.themer?.getDrawableResId(name) - - val painter = if (drawableResId != null) { - painterResource(drawableResId) - } else { - rememberImagePainter(data = url ?: COMPONENT_BOX_FALLBACK_DRAWABLE_URL) - } - - Image( - painter = painter, - modifier = modifier.build(), - contentScale = contentScale.translate(), - contentDescription = contentDescription - ) -} diff --git a/material/src/androidMain/kotlin/com/dropbox/componentbox/material/inflate.kt b/material/src/androidMain/kotlin/com/dropbox/componentbox/material/inflate.kt deleted file mode 100644 index d5c421da..00000000 --- a/material/src/androidMain/kotlin/com/dropbox/componentbox/material/inflate.kt +++ /dev/null @@ -1,70 +0,0 @@ -package com.dropbox.componentbox.material - -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.ComponentBox -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.material.box.Inflate -import com.dropbox.componentbox.material.button.Inflate -import com.dropbox.componentbox.material.column.Inflate -import com.dropbox.componentbox.material.drawable.Inflate -import com.dropbox.componentbox.material.row.Inflate -import com.dropbox.componentbox.material.surface.Inflate -import com.dropbox.componentbox.material.text.Inflate -import com.dropbox.componentbox.util.horizontal -import com.dropbox.componentbox.util.vertical - -@Composable -actual fun Component.Inflate(context: Context?) { - when (this) { - is Component.Box -> Inflate(context) - is Component.Button -> Inflate(context) - is Component.Column -> Inflate(context) - is Component.Drawable -> Inflate(context) - is Component.Row -> Inflate(context) - is Component.Switch -> TODO() - is Component.Text -> Inflate(context) - is Component.Vector -> TODO() - is Component.Surface -> Inflate(context) - } -} - -@Composable -actual fun ComponentBox.Inflate(context: Context) { - when (this) { - is ComponentBox.Banner -> - Row( - verticalAlignment = horizontalAlignment.vertical(), - horizontalArrangement = verticalArrangement.horizontal() - ) { - components.forEach { component -> - context.inflater?.Inflate(component) ?: component.Inflate(context) - } - } - - is ComponentBox.Modal -> - Column( - horizontalAlignment = horizontalAlignment.horizontal(), - verticalArrangement = verticalArrangement.vertical() - ) { - components.forEach { component -> - context.inflater?.Inflate(component) ?: component.Inflate(context) - } - } - - is ComponentBox.Screen -> - Column( - modifier = Modifier.fillMaxSize(), - horizontalAlignment = horizontalAlignment.horizontal(), - verticalArrangement = verticalArrangement.vertical() - ) { - components.forEach { component -> - context.inflater?.Inflate(component) ?: component.Inflate(context) - } - } - } -} \ No newline at end of file diff --git a/material/src/androidMain/kotlin/com/dropbox/componentbox/material/text/Inflate.kt b/material/src/androidMain/kotlin/com/dropbox/componentbox/material/text/Inflate.kt deleted file mode 100644 index 6cc7043c..00000000 --- a/material/src/androidMain/kotlin/com/dropbox/componentbox/material/text/Inflate.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.dropbox.componentbox.material.text - -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.text.TextStyle -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.util.compose -import com.dropbox.componentbox.util.translate - -@Composable -actual fun Component.Text.Inflate(context: Context?) { - val style: TextStyle = - context?.themer?.getTextStyle(textStyle) ?: textStyle.translate() ?: MaterialTheme.typography.body2 - - val color = modifier?.background.compose() ?: MaterialTheme.colors.onBackground - - Text( - text = text.toString(), - style = style, - modifier = this.modifier.build(), - color = color - ) -} \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/box/Inflate.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/box/Inflate.kt deleted file mode 100644 index 575a7fb9..00000000 --- a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/box/Inflate.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.dropbox.componentbox.material.box - -import androidx.compose.foundation.layout.Box -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.material.Inflate -import com.dropbox.componentbox.util.build - -@Composable -fun Component.Box.Inflate(context: Context?) { - Box(modifier = modifier.build()) { - components?.forEach { component -> - component.Inflate(context) - } - } -} \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/button/Contained.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/button/Contained.kt deleted file mode 100644 index 5800ad2b..00000000 --- a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/button/Contained.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.dropbox.componentbox.material.button - -import androidx.compose.material.Button -import androidx.compose.material.ButtonDefaults -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.util.compose -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.material.Inflate -import com.dropbox.componentbox.util.build - -@Composable -fun Component.Button.Contained(context: Context? = null) { - Button( - modifier = modifier.build(), - colors = ButtonDefaults.buttonColors( - backgroundColor = modifier?.background.compose() ?: MaterialTheme.colors.primary, - ), - onClick = { context?.manager?.run(action) } - ) { - components?.forEach { component -> - component.Inflate(context) - } - } -} \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/button/Inflate.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/button/Inflate.kt deleted file mode 100644 index 114811d1..00000000 --- a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/button/Inflate.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.dropbox.componentbox.material.button - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.ButtonVariant -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.util.translate - -@Composable -fun Component.Button.Inflate(context: Context?) { - when (this.variant.translate()) { - ButtonVariant.Contained -> Contained(context) - ButtonVariant.Text -> TODO() - ButtonVariant.Outlined -> TODO() - ButtonVariant.Icon -> TODO() - } -} \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/column.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/column.kt new file mode 100644 index 00000000..151abefa --- /dev/null +++ b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/column.kt @@ -0,0 +1,40 @@ +package com.dropbox.componentbox.material + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import com.dropbox.componentbox.component.Column +import com.dropbox.componentbox.component.LazyColumn +import com.dropbox.componentbox.ui.ComponentBoxKit + +@Composable +internal fun Column.column(kit: ComponentBoxKit) { + when (this) { + is LazyColumn -> { + LazyColumn( + modifier = kit.modifierTransformer(modifier), + verticalArrangement = kit.verticalArrangementTransformer(this.verticalArrangement) ?: Arrangement.Top, + horizontalAlignment = kit.horizontalAlignmentTransformer(this.horizontalAlignment) ?: Alignment.Start + ) { + if (components != null) { + items(components!!) { component -> + component.material(kit) + } + } + } + } + + else -> Column( + modifier = kit.modifierTransformer(modifier), + verticalArrangement = kit.verticalArrangementTransformer(this.verticalArrangement) ?: Arrangement.Top, + horizontalAlignment = kit.horizontalAlignmentTransformer(this.horizontalAlignment) ?: Alignment.Start + ) { + components?.forEach { component -> + component.material(kit) + } + } + } +} diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/column/Inflate.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/column/Inflate.kt deleted file mode 100644 index 2772bd98..00000000 --- a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/column/Inflate.kt +++ /dev/null @@ -1,62 +0,0 @@ -package com.dropbox.componentbox.material.column - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.foundation.lazy.items -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import com.dropbox.componentbox.util.compose -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.material.Inflate -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.util.horizontal -import com.dropbox.componentbox.util.vertical - -@Composable -fun Component.Column.Inflate(context: Context?) { - when (this.isLazy) { - true -> this.LazyColumn(context) - else -> this.Column(context) - } -} - -@Composable -fun Component.Column.Column(context: Context?) { - val components = this.components - val customModifiers = listOf( - Modifier.background(modifier?.background.compose() ?: MaterialTheme.colors.background) - ) - - Column( - verticalArrangement = verticalArrangement.vertical(), - horizontalAlignment = horizontalAlignment.horizontal(), - modifier = this.modifier.build(customModifiers) - ) { - components?.forEach { component -> - component.Inflate(context) - } - } -} - -@Composable -fun Component.Column.LazyColumn(context: Context?) { - val components = this.components - val customModifiers = listOf( - Modifier.background(modifier?.background.compose() ?: MaterialTheme.colors.background) - ) - - LazyColumn( - verticalArrangement = verticalArrangement.vertical(), - horizontalAlignment = horizontalAlignment.horizontal(), - modifier = modifier.build(customModifiers) - ) { - if (components != null) { - items(components) { component -> - component.Inflate(context) - } - } - } -} \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/containedButton.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/containedButton.kt new file mode 100644 index 00000000..07e195a2 --- /dev/null +++ b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/containedButton.kt @@ -0,0 +1,29 @@ +package com.dropbox.componentbox.material + +import androidx.compose.material.Button +import androidx.compose.material.ButtonDefaults +import androidx.compose.runtime.Composable +import com.dropbox.componentbox.component.ContainedButton +import com.dropbox.componentbox.ui.ComponentBoxKit + +@Composable +internal fun ContainedButton.containedButton(kit: ComponentBoxKit) { + + val colors = if (modifier?.background != null) { + ButtonDefaults.buttonColors( + backgroundColor = kit.colorTransformer(modifier!!.background!!), + ) + } else ButtonDefaults.buttonColors() + + Button( + modifier = kit.modifierTransformer(modifier), + colors = colors, + onClick = { + kit.actionHandler(actions?.onClick) + } + ) { + components?.forEach { component -> + component.material(kit) + } + } +} \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/drawable/Inflate.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/drawable/Inflate.kt deleted file mode 100644 index 2e78df1a..00000000 --- a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/drawable/Inflate.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.dropbox.componentbox.material.drawable - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Context - -@Composable -expect fun Component.Drawable.Inflate(context: Context?) diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/icon.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/icon.kt new file mode 100644 index 00000000..cdc809e7 --- /dev/null +++ b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/icon.kt @@ -0,0 +1,26 @@ +package com.dropbox.componentbox.material + +import androidx.compose.material.Icon +import androidx.compose.runtime.Composable +import com.dropbox.componentbox.component.Icon +import com.dropbox.componentbox.ui.ComponentBoxKit + +@Composable +internal fun Icon?.icon(kit: ComponentBoxKit) { + if (this != null) { + if (color != null) { + Icon( + painter = kit.iconPainterConverter(this), + contentDescription = contentDescription, + modifier = kit.modifierTransformer(modifier), + tint = kit.colorTransformer(color!!) + ) + } else { + Icon( + painter = kit.iconPainterConverter(this), + contentDescription = contentDescription, + modifier = kit.modifierTransformer(modifier), + ) + } + } +} \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/inflate.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/inflate.kt deleted file mode 100644 index d8bab0c5..00000000 --- a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/inflate.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.dropbox.componentbox.material - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.ComponentBox -import com.dropbox.componentbox.foundation.Context - -@Composable -expect fun Component.Inflate(context: Context?) - -@Composable -expect fun ComponentBox.Inflate(context: Context) \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/localImage.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/localImage.kt new file mode 100644 index 00000000..c48d21de --- /dev/null +++ b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/localImage.kt @@ -0,0 +1,18 @@ +package com.dropbox.componentbox.material + +import androidx.compose.foundation.Image +import androidx.compose.runtime.Composable +import com.dropbox.componentbox.component.LocalImage +import com.dropbox.componentbox.ui.ComponentBoxKit + +@Composable +internal fun LocalImage?.localImage(kit: ComponentBoxKit) { + if (this != null) { + Image( + painter = kit.imagePainterConverter(this), + modifier = kit.modifierTransformer(modifier), + contentScale = kit.contentScaleTransformer(contentScale), + contentDescription = contentDescription + ) + } +} \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/material.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/material.kt new file mode 100644 index 00000000..db83f31e --- /dev/null +++ b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/material.kt @@ -0,0 +1,37 @@ +package com.dropbox.componentbox.material + +import androidx.compose.runtime.Composable +import com.dropbox.componentbox.ComponentBox +import com.dropbox.componentbox.component.Column +import com.dropbox.componentbox.component.Component +import com.dropbox.componentbox.component.ContainedButton +import com.dropbox.componentbox.component.Icon +import com.dropbox.componentbox.component.LocalImage +import com.dropbox.componentbox.component.NetworkImage +import com.dropbox.componentbox.component.OutlinedButton +import com.dropbox.componentbox.component.Row +import com.dropbox.componentbox.component.Stack +import com.dropbox.componentbox.component.Switch +import com.dropbox.componentbox.component.Text +import com.dropbox.componentbox.component.TextButton +import com.dropbox.componentbox.ui.ComponentBoxKit + +@Composable +fun ComponentBox.material(kit: ComponentBoxKit) = root.material(kit) + +@Composable +internal fun Component.material(kit: ComponentBoxKit) { + when (this) { + is Icon<*> -> icon(kit) + is LocalImage<*> -> localImage(kit) + is NetworkImage<*> -> networkImage(kit) + is Column -> column(kit) + is Row -> row(kit) + is Stack -> stack(kit) + is ContainedButton -> containedButton(kit) + is OutlinedButton -> outlinedButton(kit) + is TextButton -> textButton(kit) + is Switch -> switch(kit) + is Text -> text(kit) + } +} \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/networkImage.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/networkImage.kt new file mode 100644 index 00000000..6aaee55a --- /dev/null +++ b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/networkImage.kt @@ -0,0 +1,18 @@ +package com.dropbox.componentbox.material + +import androidx.compose.foundation.Image +import androidx.compose.runtime.Composable +import com.dropbox.componentbox.component.NetworkImage +import com.dropbox.componentbox.ui.ComponentBoxKit + +@Composable +internal fun NetworkImage?.networkImage(kit: ComponentBoxKit) { + if (this != null) { + Image( + painter = kit.imagePainterConverter(this), + modifier = kit.modifierTransformer(modifier), + contentScale = kit.contentScaleTransformer(contentScale), + contentDescription = contentDescription + ) + } +} diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/outlinedButton.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/outlinedButton.kt new file mode 100644 index 00000000..44bbc50b --- /dev/null +++ b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/outlinedButton.kt @@ -0,0 +1,29 @@ +package com.dropbox.componentbox.material + +import androidx.compose.material.ButtonDefaults +import androidx.compose.material.OutlinedButton +import androidx.compose.runtime.Composable +import com.dropbox.componentbox.component.OutlinedButton +import com.dropbox.componentbox.ui.ComponentBoxKit + +@Composable +internal fun OutlinedButton.outlinedButton(kit: ComponentBoxKit) { + + val colors = if (modifier?.background != null) { + ButtonDefaults.buttonColors( + backgroundColor = kit.colorTransformer(modifier!!.background!!), + ) + } else ButtonDefaults.buttonColors() + + OutlinedButton( + modifier = kit.modifierTransformer(modifier), + colors = colors, + onClick = { + kit.actionHandler(actions?.onClick) + } + ) { + components?.forEach { component -> + component.material(kit) + } + } +} \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/row.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/row.kt new file mode 100644 index 00000000..f656dd18 --- /dev/null +++ b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/row.kt @@ -0,0 +1,42 @@ +package com.dropbox.componentbox.material + +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.lazy.LazyRow +import androidx.compose.foundation.lazy.items +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import com.dropbox.componentbox.component.LazyRow +import com.dropbox.componentbox.component.Row +import com.dropbox.componentbox.ui.ComponentBoxKit + +@Composable +internal fun Row.row(kit: ComponentBoxKit) { + when (this) { + is LazyRow -> { + LazyRow( + modifier = kit.modifierTransformer(modifier), + verticalAlignment = kit.verticalAlignmentTransformer(this.verticalAlignment) ?: Alignment.Top, + horizontalArrangement = kit.horizontalArrangementTransformer(this.horizontalArrangement) + ?: Arrangement.Start + ) { + if (components != null) { + items(components!!) { component -> + component.material(kit) + } + } + } + } + + else -> Row( + modifier = kit.modifierTransformer(modifier), + verticalAlignment = kit.verticalAlignmentTransformer(this.verticalAlignment) ?: Alignment.Top, + horizontalArrangement = kit.horizontalArrangementTransformer(this.horizontalArrangement) + ?: Arrangement.Start + ) { + components?.forEach { component -> + component.material(kit) + } + } + } +} \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/row/Inflate.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/row/Inflate.kt deleted file mode 100644 index 6617dc16..00000000 --- a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/row/Inflate.kt +++ /dev/null @@ -1,67 +0,0 @@ -package com.dropbox.componentbox.material.row - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.lazy.LazyRow -import androidx.compose.foundation.lazy.items -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import com.dropbox.componentbox.util.compose -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.material.Inflate -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.util.horizontal -import com.dropbox.componentbox.util.vertical - -@Composable -fun Component.Row.Inflate(context: Context?) { - when (this.isLazy) { - true -> this.LazyRow(context) - else -> this.Row(context) - } -} - -@Composable -private fun Component.Row.Row(context: Context?) { - val backgroundColor = modifier?.background.compose() - - val customModifiers = if (backgroundColor != null) { - listOf(Modifier.background(backgroundColor)) - } else { - listOf() - } - - Row( - verticalAlignment = verticalAlignment.vertical(), - horizontalArrangement = horizontalArrangement.horizontal(), - modifier = modifier.build(customModifiers) - ) { - components?.forEach { component -> - component.Inflate(context) - } - } -} - -@Composable -private fun Component.Row.LazyRow(context: Context?) { - val backgroundColor = modifier?.background.compose() - - val customModifiers = if (backgroundColor != null) { - listOf(Modifier.background(backgroundColor)) - } else { - listOf() - } - - LazyRow( - verticalAlignment = verticalAlignment.vertical(), - horizontalArrangement = horizontalArrangement.horizontal(), - modifier = modifier.build(customModifiers) - ) { - if (components != null) { - items(components!!) { component -> - component.Inflate(context) - } - } - } -} diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/stack.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/stack.kt new file mode 100644 index 00000000..e1a2f2d5 --- /dev/null +++ b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/stack.kt @@ -0,0 +1,15 @@ +package com.dropbox.componentbox.material + +import androidx.compose.foundation.layout.Box +import androidx.compose.runtime.Composable +import com.dropbox.componentbox.component.Stack +import com.dropbox.componentbox.ui.ComponentBoxKit + +@Composable +internal fun Stack.stack(kit: ComponentBoxKit) { + Box(modifier = kit.modifierTransformer(modifier)) { + components?.forEach { component -> + component.material(kit) + } + } +} \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/surface/Surface.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/surface/Surface.kt deleted file mode 100644 index 1d2eef13..00000000 --- a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/surface/Surface.kt +++ /dev/null @@ -1,45 +0,0 @@ -package com.dropbox.componentbox.material.surface - -import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.material.Inflate -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.util.translate - -@Composable -fun Component.Surface.Inflate(context: Context?) { - val isDark = isSystemInDarkTheme() || !MaterialTheme.colors.isLight - - val color = if (this.color?.dark != null && this.color?.light != null) { - if (isDark) Color(this.color!!.dark) else Color(this.color!!.light) - } else { - MaterialTheme.colors.surface - } - - val contentColor = if (this.contentColor?.dark != null && this.contentColor?.light != null) { - if (isDark) Color(this.contentColor!!.dark) else Color(this.contentColor!!.light) - } else { - MaterialTheme.colors.onSurface - } - - val shape = this.shape.translate() - val elevation = this.elevation?.dp ?: 0.dp - - Surface( - modifier = modifier.build(), - shape = shape, - color = color, - contentColor = contentColor, - elevation = elevation - ) { - components?.forEach { component -> - component.Inflate(context) - } - } -} \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/switch.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/switch.kt new file mode 100644 index 00000000..62725019 --- /dev/null +++ b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/switch.kt @@ -0,0 +1,17 @@ +package com.dropbox.componentbox.material + +import androidx.compose.material.Switch +import androidx.compose.runtime.Composable +import com.dropbox.componentbox.component.Switch +import com.dropbox.componentbox.ui.ComponentBoxKit + +@Composable +internal fun Switch.switch(kit: ComponentBoxKit) { + Switch( + modifier = kit.modifierTransformer(modifier), + checked = checked ?: false, + onCheckedChange = { + kit.actionHandler(this.actions?.onCheckedChange) + }, + ) +} \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/text.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/text.kt new file mode 100644 index 00000000..f38e9f90 --- /dev/null +++ b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/text.kt @@ -0,0 +1,42 @@ +package com.dropbox.componentbox.material + +import androidx.compose.material.Text +import androidx.compose.runtime.Composable +import com.dropbox.componentbox.component.Text +import com.dropbox.componentbox.ui.ComponentBoxKit + +@Composable +internal fun Text.text(kit: ComponentBoxKit) { + if (text != null) { + val style = kit.textStyleTransformer(textStyle) + if (style != null) { + if (color != null) { + Text( + text = kit.textProcessor(text!!), + style = style, + modifier = kit.modifierTransformer(modifier), + color = kit.colorTransformer(color!!) + ) + } else { + Text( + text = kit.textProcessor(text!!), + modifier = kit.modifierTransformer(modifier), + style = style + ) + } + } else { + if (color != null) { + Text( + text = kit.textProcessor(text!!), + modifier = kit.modifierTransformer(modifier), + color = kit.colorTransformer(color!!) + ) + } else { + Text( + text = kit.textProcessor(text!!), + modifier = kit.modifierTransformer(modifier), + ) + } + } + } +} diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/text/Inflate.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/text/Inflate.kt deleted file mode 100644 index eafb9332..00000000 --- a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/text/Inflate.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.dropbox.componentbox.material.text - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Context - -@Composable -expect fun Component.Text.Inflate(context: Context?) \ No newline at end of file diff --git a/material/src/commonMain/kotlin/com/dropbox/componentbox/material/textButton.kt b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/textButton.kt new file mode 100644 index 00000000..e1b35943 --- /dev/null +++ b/material/src/commonMain/kotlin/com/dropbox/componentbox/material/textButton.kt @@ -0,0 +1,28 @@ +package com.dropbox.componentbox.material + +import androidx.compose.material.ButtonDefaults +import androidx.compose.material.TextButton +import androidx.compose.runtime.Composable +import com.dropbox.componentbox.component.TextButton +import com.dropbox.componentbox.ui.ComponentBoxKit + +@Composable +internal fun TextButton.textButton(kit: ComponentBoxKit) { + val colors = if (modifier?.background != null) { + ButtonDefaults.buttonColors( + backgroundColor = kit.colorTransformer(modifier!!.background!!), + ) + } else ButtonDefaults.buttonColors() + + TextButton( + modifier = kit.modifierTransformer(modifier), + colors = colors, + onClick = { + kit.actionHandler(actions?.onClick) + } + ) { + components?.forEach { component -> + component.material(kit) + } + } +} \ No newline at end of file diff --git a/material/src/jvmMain/kotlin/com/dropbox/componentbox/material/drawable/Inflate.kt b/material/src/jvmMain/kotlin/com/dropbox/componentbox/material/drawable/Inflate.kt deleted file mode 100644 index 4b8def8a..00000000 --- a/material/src/jvmMain/kotlin/com/dropbox/componentbox/material/drawable/Inflate.kt +++ /dev/null @@ -1,64 +0,0 @@ -package com.dropbox.componentbox.material.drawable - -import androidx.compose.foundation.Image -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.ImageBitmap -import androidx.compose.ui.graphics.toComposeImageBitmap -import androidx.compose.ui.res.painterResource -import com.dropbox.componentbox.foundation.COMPONENT_BOX_FALLBACK_DRAWABLE_URL -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.util.alignment -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.util.translate -import java.io.ByteArrayOutputStream -import java.net.HttpURLConnection -import java.net.URL -import javax.imageio.ImageIO - -@Composable -actual fun Component.Drawable.Inflate(context: Context?) { - - - val imageResPath = context?.themer?.getDrawableResPath(name) - - if (imageResPath != null) { - Image( - painter = painterResource(imageResPath), - modifier = modifier.build(), - contentScale = contentScale.translate(), - contentDescription = contentDescription, - alignment = alignment.alignment() - ) - } else { - val imageBitmap = this.url.toImageBitmap() ?: COMPONENT_BOX_FALLBACK_DRAWABLE_URL.toImageBitmap() - if (imageBitmap != null) { - Image( - bitmap = imageBitmap, - modifier = modifier.build(), - contentScale = contentScale.translate(), - contentDescription = contentDescription, - alignment = alignment.alignment() - ) - - } - } -} - - -private fun String?.toImageBitmap(): ImageBitmap? { - if (this == null) return null - - val url = URL(this) - val connection = url.openConnection() as HttpURLConnection - connection.connect() - - val inputStream = connection.inputStream - val bufferedImage = ImageIO.read(inputStream) - - val stream = ByteArrayOutputStream() - ImageIO.write(bufferedImage, "png", stream) - val byteArray = stream.toByteArray() - - return org.jetbrains.skia.Image.makeFromEncoded(byteArray).toComposeImageBitmap() -} diff --git a/material/src/jvmMain/kotlin/com/dropbox/componentbox/material/inflate.kt b/material/src/jvmMain/kotlin/com/dropbox/componentbox/material/inflate.kt deleted file mode 100644 index d5c421da..00000000 --- a/material/src/jvmMain/kotlin/com/dropbox/componentbox/material/inflate.kt +++ /dev/null @@ -1,70 +0,0 @@ -package com.dropbox.componentbox.material - -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.ComponentBox -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.material.box.Inflate -import com.dropbox.componentbox.material.button.Inflate -import com.dropbox.componentbox.material.column.Inflate -import com.dropbox.componentbox.material.drawable.Inflate -import com.dropbox.componentbox.material.row.Inflate -import com.dropbox.componentbox.material.surface.Inflate -import com.dropbox.componentbox.material.text.Inflate -import com.dropbox.componentbox.util.horizontal -import com.dropbox.componentbox.util.vertical - -@Composable -actual fun Component.Inflate(context: Context?) { - when (this) { - is Component.Box -> Inflate(context) - is Component.Button -> Inflate(context) - is Component.Column -> Inflate(context) - is Component.Drawable -> Inflate(context) - is Component.Row -> Inflate(context) - is Component.Switch -> TODO() - is Component.Text -> Inflate(context) - is Component.Vector -> TODO() - is Component.Surface -> Inflate(context) - } -} - -@Composable -actual fun ComponentBox.Inflate(context: Context) { - when (this) { - is ComponentBox.Banner -> - Row( - verticalAlignment = horizontalAlignment.vertical(), - horizontalArrangement = verticalArrangement.horizontal() - ) { - components.forEach { component -> - context.inflater?.Inflate(component) ?: component.Inflate(context) - } - } - - is ComponentBox.Modal -> - Column( - horizontalAlignment = horizontalAlignment.horizontal(), - verticalArrangement = verticalArrangement.vertical() - ) { - components.forEach { component -> - context.inflater?.Inflate(component) ?: component.Inflate(context) - } - } - - is ComponentBox.Screen -> - Column( - modifier = Modifier.fillMaxSize(), - horizontalAlignment = horizontalAlignment.horizontal(), - verticalArrangement = verticalArrangement.vertical() - ) { - components.forEach { component -> - context.inflater?.Inflate(component) ?: component.Inflate(context) - } - } - } -} \ No newline at end of file diff --git a/material/src/jvmMain/kotlin/com/dropbox/componentbox/material/text/Inflate.kt b/material/src/jvmMain/kotlin/com/dropbox/componentbox/material/text/Inflate.kt deleted file mode 100644 index 6cc7043c..00000000 --- a/material/src/jvmMain/kotlin/com/dropbox/componentbox/material/text/Inflate.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.dropbox.componentbox.material.text - -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.text.TextStyle -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.util.compose -import com.dropbox.componentbox.util.translate - -@Composable -actual fun Component.Text.Inflate(context: Context?) { - val style: TextStyle = - context?.themer?.getTextStyle(textStyle) ?: textStyle.translate() ?: MaterialTheme.typography.body2 - - val color = modifier?.background.compose() ?: MaterialTheme.colors.onBackground - - Text( - text = text.toString(), - style = style, - modifier = this.modifier.build(), - color = color - ) -} \ No newline at end of file diff --git a/material/src/main/AndroidManifest.xml b/material/src/main/AndroidManifest.xml deleted file mode 100644 index 63179f30..00000000 --- a/material/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/samples/discovery/android/Discovery/build.gradle.kts b/samples/discovery/android/Discovery/build.gradle.kts deleted file mode 100644 index 192cd26d..00000000 --- a/samples/discovery/android/Discovery/build.gradle.kts +++ /dev/null @@ -1,86 +0,0 @@ -plugins { - kotlin("android") - kotlin("kapt") - kotlin("plugin.serialization") - id("com.android.application") - id("org.jetbrains.compose") version Version.composeMultiplatform - id("dagger.hilt.android.plugin") - id("app.cash.zipline") -} - -group = "com.dropbox.componentbox.discovery" - -android { - compileSdk = Version.androidCompileSdk - - defaultConfig { - applicationId = "com.dropbox.componentbox.discovery" - minSdkVersion(Version.androidMinSdk) - targetSdkVersion(Version.androidTargetSdk) - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - - buildFeatures { - compose = true - } - - composeOptions { - kotlinCompilerExtensionVersion = Version.composeCompiler - } - - packagingOptions { - resources { - excludes += "META-INF/{AL2.0,LGPL2.1}" - } - } -} - -dependencies { - implementation(project(":componentbox")) - implementation(project(":ui")) - implementation(project(":util")) - implementation(project(":samples:discovery:common")) - implementation(project(":samples:discovery:components")) - implementation(project(":samples:discovery:theme")) - implementation(project(":samples:discovery:android:zipline")) - - implementation("com.google.dagger:hilt-android:2.42") - kapt("com.google.dagger:hilt-android-compiler:2.42") - implementation("androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha03") - annotationProcessor("androidx.hilt:hilt-compiler:1.0.0") - implementation("androidx.hilt:hilt-navigation-compose:1.0.0") - - with(Deps.Mavericks) { - implementation(mavericksCompose) - } - - with(Deps.Compose) { - implementation(accompanistNavigationAnimation) - implementation(coilCompose) - implementation(compiler) - implementation(foundationLayout) - implementation(material) - implementation(navigation) - implementation(ui) - implementation(uiGraphics) - } - - with(Deps.AndroidX) { - implementation(appCompat) - } - - implementation(Deps.Kotlinx.serializationCore) - implementation(Deps.Kotlinx.serializationJson) - - with(Deps.Cash.Zipline) { - implementation(zipline) - } -} - -kapt { - correctErrorTypes = true -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/AndroidManifest.xml b/samples/discovery/android/Discovery/src/main/AndroidManifest.xml deleted file mode 100644 index 61e61a6f..00000000 --- a/samples/discovery/android/Discovery/src/main/AndroidManifest.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryActivity.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryActivity.kt deleted file mode 100644 index 27fa7aa1..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryActivity.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery - -import android.os.Bundle -import androidx.activity.ComponentActivity -import androidx.activity.compose.setContent -import com.dropbox.componentbox.discovery.discovery.scaffold.Scaffold -import dagger.hilt.android.AndroidEntryPoint - -@AndroidEntryPoint -class DiscoveryActivity : ComponentActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContent { - DiscoveryTheme(false) { - Scaffold() - } - } - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryApp.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryApp.kt deleted file mode 100644 index 88ef9d92..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryApp.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery - -import android.app.Application -import com.airbnb.mvrx.Mavericks -import dagger.hilt.android.HiltAndroidApp - -@HiltAndroidApp -class DiscoveryApp : Application() { - override fun onCreate() { - super.onCreate() - Mavericks.initialize(this) - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryManager.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryManager.kt deleted file mode 100644 index 40b7e72c..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryManager.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery - -import com.dropbox.componentbox.foundation.Manager - -class DiscoveryManager: Manager { - override fun run(action: String?) { - TODO("Not yet implemented") - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryModule.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryModule.kt deleted file mode 100644 index be4e06fe..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryModule.kt +++ /dev/null @@ -1,29 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery - -import com.dropbox.componentbox.discovery.discovery.scoping.AppScope -import com.dropbox.componentbox.discovery.discovery.scoping.UserScope -import com.dropbox.componentbox.discovery.discovery.scoping.appScope -import com.dropbox.componentbox.discovery.discovery.scoping.userScope -import com.dropbox.componentbox.foundation.ResourceProvider -import com.dropbox.componentbox.samples.discovery.RealResourceProvider -import dagger.Module -import dagger.Provides -import dagger.hilt.InstallIn -import dagger.hilt.components.SingletonComponent -import javax.inject.Singleton - -@InstallIn(SingletonComponent::class) -@Module -object DiscoveryModule { - @Provides - @Singleton - fun provideAppScope(): AppScope = appScope() - - @Provides - @Singleton - fun provideUserScope(): UserScope = userScope() - - @Provides - @Singleton - fun provideResources(): ResourceProvider = RealResourceProvider() -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryPresenter.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryPresenter.kt deleted file mode 100644 index 93d1fbda..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryPresenter.kt +++ /dev/null @@ -1,69 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery - -import com.airbnb.mvrx.MavericksState -import com.airbnb.mvrx.MavericksViewModel -import com.airbnb.mvrx.MavericksViewModelFactory -import com.airbnb.mvrx.ViewModelContext -import com.dropbox.componentbox.discovery.discovery.campaigns.data.entities.Campaign -import com.dropbox.componentbox.discovery.discovery.scoping.UserScope -import com.dropbox.componentbox.discovery.discovery.scoping.userScope -import kotlinx.coroutines.delay -import kotlinx.coroutines.flow.MutableStateFlow -import kotlinx.coroutines.launch - -class DiscoveryPresenter( - initialState: DiscoveryState, - val userScope: UserScope -) : MavericksViewModel(initialState) { - - var bestBanner = MutableStateFlow(null) - var bestModal = MutableStateFlow(null) - - var canShowBanner = MutableStateFlow(true) - var canShowModal = MutableStateFlow(true) - - init { - bestBanner.value = getBestCampaign() - - viewModelScope.launch { - delay(3000) - bestModal.value = getBestCampaign() - } - } - - inline fun getBestCampaign(): C? = - userScope.campaignManager.getBestCampaign() as C? - - inline fun dismissCampaign() { - when (C::class) { - Campaign.Banner::class -> { - canShowBanner.value = false - bestBanner.value = getBestCampaign() - canShowBanner.value = true - } - Campaign.Modal::class -> { - canShowModal.value = false - bestModal.value = getBestCampaign() - } - } - } - - companion object : MavericksViewModelFactory { - override fun initialState(viewModelContext: ViewModelContext): DiscoveryState { - return DiscoveryState(DiscoveryViewState.Loading) - } - - override fun create(viewModelContext: ViewModelContext, state: DiscoveryState): DiscoveryPresenter { - return DiscoveryPresenter(state, userScope()) - } - } -} - -data class DiscoveryState( - val viewState: DiscoveryViewState, -) : MavericksState - -sealed class DiscoveryViewState { - object Loading : DiscoveryViewState() - object Success : DiscoveryViewState() -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryTheme.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryTheme.kt deleted file mode 100644 index 22b2c538..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryTheme.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery - -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import com.dropbox.componentbox.discovery.discovery.scoping.appScope -import com.dropbox.componentbox.samples.discovery.color.Colors -import com.dropbox.componentbox.samples.discovery.type.materialTheme - -@Composable -fun DiscoveryTheme(isNightMode: Boolean, content: @Composable () -> Unit) { - val colors = remember { mutableStateOf(if (isNightMode) Colors.Dark else Colors.Light) } - return MaterialTheme( - typography = appScope().resourceProvider.typography().materialTheme(), - colors = colors.value, - content = content - ) -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryThemer.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryThemer.kt deleted file mode 100644 index 2c763c70..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/DiscoveryThemer.kt +++ /dev/null @@ -1,23 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery - -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.text.TextStyle -import com.dropbox.componentbox.foundation.Themer - -class DiscoveryThemer : Themer() { - @Composable - override fun Theme(isNightMode: Boolean, content: () -> Unit) { - TODO("Not yet implemented") - } - - @Composable - override fun getDrawableResId(name: String?): Int? { - TODO("Not yet implemented") - } - - @Composable - override fun getTextStyle(name: String?): TextStyle { - TODO("Not yet implemented") - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/RealComponentBoxPresenter.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/RealComponentBoxPresenter.kt deleted file mode 100644 index d8346bfe..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/RealComponentBoxPresenter.kt +++ /dev/null @@ -1,19 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery - -import com.dropbox.componentbox.foundation.ComponentBox -import com.dropbox.componentbox.foundation.ComponentBoxType -import com.dropbox.componentbox.presentation.ComponentBoxPresenter -import com.dropbox.componentbox.presentation.ComponentBoxState -import com.dropbox.componentbox.presentation.ComponentBoxViewModel -import com.dropbox.componentbox.presentation.ComponentBoxViewState -import com.dropbox.componentbox.presentation.RealComponentBoxState -import com.dropbox.componentbox.zipline.ComponentBoxZipline - -class RealComponentBoxPresenter(zipline: ComponentBoxZipline, componentBoxUrl: String) : - ComponentBoxPresenter>( - initialState = RealComponentBoxState(ComponentBoxViewState.Initialized), - viewModel = ComponentBoxViewModel(), - zipline = zipline, - type = ComponentBoxType.Screen, - componentBoxUrl = componentBoxUrl - ) \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/AccountDetails.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/AccountDetails.kt deleted file mode 100644 index 46dc6601..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/AccountDetails.kt +++ /dev/null @@ -1,160 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.account.ui - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.* -import androidx.compose.material.* -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.shadow -import androidx.compose.ui.graphics.RectangleShape -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.discovery.theme.R -import com.dropbox.componentbox.samples.discovery.color.disabledBackground -import com.dropbox.componentbox.samples.discovery.color.faintText -import com.dropbox.componentbox.samples.discovery.color.standardBackgroundElevated -import com.dropbox.componentbox.samples.discovery.color.standardText - -@Composable -fun AccountDetails() { - Column( - modifier = Modifier - .fillMaxWidth() - .background(MaterialTheme.colors.background) - .padding(16.dp), - verticalArrangement = Arrangement.SpaceAround, - horizontalAlignment = Alignment.CenterHorizontally, - ) { - - EffectivePlan(FAKE_PLAN_NAME) { - UpgradeButton() - } - - Spacer(modifier = Modifier.size(16.dp)) - - Divider(color = MaterialTheme.colors.disabledBackground, thickness = 0.8.dp) - - Spacer(modifier = Modifier.size(16.dp)) - EffectivePlanStats(storageUsed = "1.5GB", connectedDevices = "2/3") - Spacer(modifier = Modifier.size(16.dp)) - Row { - Button( - onClick = { /*TODO*/ }, - shape = RectangleShape, - colors = ButtonDefaults.buttonColors(backgroundColor = MaterialTheme.colors.disabledBackground), - modifier = Modifier - .fillMaxWidth(), - elevation = ButtonDefaults.elevation(0.dp) - ) { - - Text( - text = "Account details", - color = MaterialTheme.colors.standardText, - style = MaterialTheme.typography.button, - modifier = Modifier.padding(vertical = 4.dp) - ) - } - } - - } -} - -@Composable -fun EffectivePlan(planName: String, Button: (@Composable () -> Unit)? = null) { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.SpaceBetween, - verticalAlignment = Alignment.CenterVertically - ) { - Row( - verticalAlignment = Alignment.CenterVertically - ) { - Icon( - painter = painterResource(id = R.drawable.dig_dropbox_logo), - tint = MaterialTheme.colors.primary, - contentDescription = null, - modifier = Modifier.size(32.dp) - ) - - - Text( - text = planName, - style = MaterialTheme.typography.h6, - modifier = Modifier.padding(start = 8.dp), - color = MaterialTheme.colors.standardText - ) - } - - if (Button != null) { - Button() - } - } -} - -@Composable -fun EffectivePlanStats(storageUsed: String, connectedDevices: String) { - Row( - modifier = Modifier - .fillMaxWidth() - .heightIn(min = 40.dp, max = 60.dp), - horizontalArrangement = Arrangement.SpaceAround, - verticalAlignment = Alignment.CenterVertically - ) { - Row(verticalAlignment = Alignment.CenterVertically) { - Icon( - painter = painterResource(id = R.drawable.ic_dig_space_line), - contentDescription = null, - modifier = Modifier.size(32.dp), - tint = MaterialTheme.colors.standardText - ) - - Column(modifier = Modifier.padding(start = 8.dp)) { - Text(text = storageUsed, style = MaterialTheme.typography.h6) - - Text(text = "Storage used", style = MaterialTheme.typography.body2) - } - } - - - Divider( - color = MaterialTheme.colors.disabledBackground, modifier = Modifier - .fillMaxHeight() - .width(0.8.dp) - ) - - Row(verticalAlignment = Alignment.CenterVertically) { - Icon( - painter = painterResource(id = R.drawable.ic_dig_mobile_line), - contentDescription = null, - modifier = Modifier.size(32.dp), - tint = MaterialTheme.colors.standardText - ) - - Column(modifier = Modifier.padding(start = 8.dp)) { - Text(text = connectedDevices, style = MaterialTheme.typography.h6) - - Text(text = "Devices linked", style = MaterialTheme.typography.body2) - } - } - } -} - -@Composable -fun UpgradeButton() { - Button( - onClick = { /*TODO*/ }, - shape = RectangleShape, - colors = ButtonDefaults.buttonColors(backgroundColor = MaterialTheme.colors.primary) - ) { - - Text( - text = "Upgrade", - color = MaterialTheme.colors.onPrimary, - style = MaterialTheme.typography.button, - modifier = Modifier.padding(vertical = 4.dp) - ) - } -} - -private const val FAKE_PLAN_NAME = "Dropbox Basic" \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/AccountFeatures.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/AccountFeatures.kt deleted file mode 100644 index 3448d8b6..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/AccountFeatures.kt +++ /dev/null @@ -1,107 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.account.ui - -import androidx.annotation.DrawableRes -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.* -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.discovery.theme.R -import com.dropbox.componentbox.samples.discovery.color.standardBackgroundElevated -import com.dropbox.componentbox.samples.discovery.color.standardText - -@Composable -fun AccountFeatures() { - Column( - modifier = Modifier - .fillMaxWidth() - .background(MaterialTheme.colors.background) - ) { - Text( - text = "Your features", - style = MaterialTheme.typography.h6, - modifier = Modifier.padding(start = 16.dp, bottom = 16.dp) - ) - - AccountFeature( - iconStart = R.drawable.ic_dig_syncing_line, - title = "Sync", - caption = "All your content everywhere", - iconEnd = R.drawable.ic_dig_arrow_right_line, - contentColor = MaterialTheme.colors.standardText - ) - - AccountFeature( - iconStart = R.drawable.ic_dig_scan_line, - title = "Doc scanner", - caption = "Scan receipts and documents", - iconEnd = R.drawable.ic_dig_arrow_right_line, - contentColor = MaterialTheme.colors.standardText - ) - - AccountFeature( - iconStart = R.drawable.ic_dig_member_transfer_line, - title = "Transfer", - caption = "Send large files securely", - iconEnd = R.drawable.ic_dig_arrow_right_line, - contentColor = MaterialTheme.colors.standardText - ) - - AccountFeature( - iconStart = R.drawable.ic_dig_twinkle_2_line, - title = "Explore", - caption = "Explore Plus features", - iconEnd = R.drawable.ic_dig_arrow_right_line, - contentColor = MaterialTheme.colors.primary - ) - } -} - -@Composable -fun AccountFeature( - @DrawableRes iconStart: Int, - title: String, - caption: String, - @DrawableRes iconEnd: Int, - contentColor: Color -) { - - Row( - modifier = Modifier - .padding(horizontal = 16.dp, vertical = 4.dp) - .fillMaxWidth() - .background(MaterialTheme.colors.standardBackgroundElevated) - .padding(16.dp), - horizontalArrangement = Arrangement.SpaceBetween - ) { - - Row { - Icon( - painter = painterResource(id = iconStart), - contentDescription = null, - tint = contentColor, - modifier = Modifier.size(24.dp) - ) - - Column(modifier = Modifier.padding(start = 16.dp)) { - Text(text = title, style = MaterialTheme.typography.body1, color = contentColor) - Text(text = caption, style = MaterialTheme.typography.body2, color = contentColor) - } - } - - - - Icon( - painter = painterResource(id = iconEnd), - contentDescription = null, - tint = contentColor, - modifier = Modifier.size(24.dp) - ) - - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/AccountScreen.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/AccountScreen.kt deleted file mode 100644 index 87345ab2..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/AccountScreen.kt +++ /dev/null @@ -1,44 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.account.ui - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import com.dropbox.componentbox.discovery.discovery.common.ui.DiscoveryScreen -import com.dropbox.componentbox.discovery.discovery.scaffold.ScaffoldCallback -import com.dropbox.componentbox.samples.discovery.color.standardBackgroundElevated - -@Composable -fun AccountScreen(scaffoldCallback: ScaffoldCallback) { - DiscoveryScreen( - title = TITLE, - scaffoldCallback = scaffoldCallback, - TopBarActions = listOf { SettingsButton() } - ) { Banner -> - - Column { - Banner() - - LazyColumn( - modifier = Modifier - .fillMaxSize() - .background(MaterialTheme.colors.standardBackgroundElevated), - verticalArrangement = Arrangement.SpaceBetween - ) { - items(1) { - CurrentUser() - AccountDetails() - AccountFeatures() - AlsoFromDropbox() - AccountSettings() - } - } - } - } -} - -private const val TITLE = "Account" diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/AccountSettings.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/AccountSettings.kt deleted file mode 100644 index cf471aee..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/AccountSettings.kt +++ /dev/null @@ -1,86 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.account.ui - -import androidx.annotation.DrawableRes -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.size -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.discovery.theme.R -import com.dropbox.componentbox.samples.discovery.color.faintText -import com.dropbox.componentbox.samples.discovery.color.standardBackgroundElevated -import com.dropbox.componentbox.samples.discovery.color.standardText - -@Composable -fun AccountSettings() { - Column( - modifier = Modifier - .fillMaxWidth() - .background(MaterialTheme.colors.background) - ) { - Text( - text = "Settings", - style = MaterialTheme.typography.h6, - modifier = Modifier.padding(start = 16.dp, top = 16.dp, bottom = 16.dp) - ) - - AccountSetting( - icon = R.drawable.ic_dig_camera_line, - title = "Camera uploads", - caption = "Automatically upload your device's photos", - label = "Off" - ) - - AccountSetting( - icon = R.drawable.ic_dig_computer_line, - title = "Connect a computer", - caption = "Easily install the Dropbox desktop application", - ) - } -} - -@Composable -fun AccountSetting( - @DrawableRes icon: Int, - title: String, - caption: String, - label: String? = null -) { - - Row( - modifier = Modifier - .padding(horizontal = 16.dp, vertical = 4.dp) - .fillMaxWidth() - .padding(16.dp), - horizontalArrangement = Arrangement.SpaceBetween - ) { - - Row { - Icon( - painter = painterResource(id = icon), - contentDescription = null, - tint = MaterialTheme.colors.standardText, - modifier = Modifier.size(24.dp) - ) - - Column(modifier = Modifier.padding(start = 16.dp)) { - Text(text = title, style = MaterialTheme.typography.body1) - Text(text = caption, style = MaterialTheme.typography.body2, color = MaterialTheme.colors.faintText) - } - } - - if (label != null) { - Text(text = label, style = MaterialTheme.typography.body1, color = MaterialTheme.colors.faintText) - } - - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/AlsoFromDropbox.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/AlsoFromDropbox.kt deleted file mode 100644 index 30a18a10..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/AlsoFromDropbox.kt +++ /dev/null @@ -1,139 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.account.ui - -import androidx.annotation.DrawableRes -import androidx.compose.foundation.Image -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.heightIn -import androidx.compose.foundation.layout.offset -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width -import androidx.compose.foundation.lazy.LazyRow -import androidx.compose.foundation.shape.CircleShape -import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.layout.ContentScale -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp -import androidx.compose.ui.zIndex -import com.dropbox.componentbox.discovery.theme.R - -@Composable -fun AlsoFromDropbox() { - Column( - modifier = Modifier - .fillMaxWidth() - .background(MaterialTheme.colors.background) - ) { - Text( - text = "Also from Dropbox", - style = MaterialTheme.typography.h6, - modifier = Modifier.padding(start = 16.dp, top = 16.dp, bottom = 16.dp) - ) - - - LazyRow { - items(1) { - DropboxFeatureCard( - image = R.drawable.van_cityscape, - icon = R.drawable.ic_dig_dropbox_passwords_line, - title = "Dropbox Passwords", - caption = "Sign in anywhere with Windows, Mac, iOS, and Android", - chipLabels = listOf("Premium") - ) - - DropboxFeatureCard( - image = R.drawable.travel_backpack, - icon = R.drawable.ic_dig_dropbox_backup_line, - title = "Dropbox Backup", - caption = "Backup your Mac or PC folders, including Desktop, Documents and Downloads", - chipLabels = listOf("Premium") - ) - } - } - } -} - -@Composable -fun DropboxFeatureCard( - @DrawableRes image: Int, - @DrawableRes icon: Int, - title: String, - caption: String, - chipLabels: List -) { - Surface( - shape = RoundedCornerShape(4.dp), - elevation = 2.dp, - modifier = Modifier - .padding(8.dp) - .width(200.dp) - .heightIn(min = 200.dp) - .padding(8.dp) - ) { - Column { - Box { - Image( - painter = painterResource(id = image), - contentDescription = null, - modifier = Modifier.height(100.dp), - contentScale = ContentScale.FillWidth - ) - - - Surface( - elevation = 1.dp, - shape = CircleShape, - modifier = Modifier - .padding(6.dp) - .offset(x = 2.dp, y = 80.dp), - color = MaterialTheme.colors.background - ) { - Icon( - painter = painterResource(id = icon), - contentDescription = null, - modifier = Modifier.zIndex(100.0f) - ) - } - - } - - Column(modifier = Modifier.padding(8.dp)) { - Text(text = title, style = MaterialTheme.typography.body1) - - Text(text = caption, style = MaterialTheme.typography.caption) - } - - - Row { - chipLabels.forEach { chipLabel -> - Surface( - modifier = Modifier - .padding(4.dp), - shape = RoundedCornerShape(16.dp), - color = MaterialTheme.colors.primary - ) { - - Text( - text = chipLabel, - color = MaterialTheme.colors.onPrimary, - style = MaterialTheme.typography.caption, - modifier = Modifier.padding(4.dp) - ) - - } - } - } - } - - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/CurrentUser.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/CurrentUser.kt deleted file mode 100644 index 7ee21290..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/CurrentUser.kt +++ /dev/null @@ -1,58 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.account.ui - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.material.Icon -import androidx.compose.material.IconButton -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.discovery.theme.R -import com.dropbox.componentbox.samples.discovery.color.standardText - -@Composable -fun CurrentUser() { - Row( - modifier = Modifier - .fillMaxWidth() - .background(MaterialTheme.colors.background) - .padding(16.dp), - horizontalArrangement = Arrangement.SpaceBetween, - verticalAlignment = Alignment.CenterVertically - ) { - - Row(verticalAlignment = Alignment.CenterVertically) { - - UserAvatarWithEditAction(FAKE_AVATAR_URL, FAKE_CONTENT_DESCRIPTION) - - - Box(modifier = Modifier.padding(start = 16.dp)) { - UserNameAndEmail(name = FAKE_NAME, email = FAKE_EMAIL) - } - - } - - - IconButton(onClick = { /*TODO*/ }) { - Icon( - painter = painterResource(id = R.drawable.ic_dig_switcher_line), - contentDescription = null, - tint = MaterialTheme.colors.standardText - ) - } - - } -} - -private const val FAKE_AVATAR_URL = - "https://raw.githubusercontent.com/dropbox/componentbox/master/desktop/src/jvmMain/resources/tag.jpeg" -private const val FAKE_CONTENT_DESCRIPTION = "tag" -private const val FAKE_NAME = "Tag Ramotar" -private const val FAKE_EMAIL = "tag@dropbox.com" \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/SettingsButton.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/SettingsButton.kt deleted file mode 100644 index c5f68b4e..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/SettingsButton.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.account.ui - -import androidx.compose.foundation.layout.size -import androidx.compose.material.Icon -import androidx.compose.material.IconButton -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.discovery.theme.R -import com.dropbox.componentbox.samples.discovery.color.standardText - -@Composable -fun SettingsButton() { - IconButton(onClick = { /*TODO*/ }) { - Icon( - painter = painterResource(id = R.drawable.ic_dig_settings_line), - contentDescription = null, - tint = MaterialTheme.colors.standardText, - modifier = Modifier.size(32.dp) - ) - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/UserAvatarWithEditAction.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/UserAvatarWithEditAction.kt deleted file mode 100644 index aa6f3cf6..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/UserAvatarWithEditAction.kt +++ /dev/null @@ -1,57 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.account.ui - -import androidx.compose.foundation.Image -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.* -import androidx.compose.foundation.shape.CircleShape -import androidx.compose.material.Icon -import androidx.compose.material.IconButton -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.clip -import androidx.compose.ui.layout.ContentScale -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.discovery.theme.R - -@Composable -fun UserAvatarWithEditAction(url: String, contentDescription: String? = null) { - Box(modifier = Modifier.size(80.dp)) { - Image( - painter = painterResource(id = R.drawable.tag), - contentScale = ContentScale.Crop, - contentDescription = contentDescription, - modifier = Modifier - .size(80.dp) - .clip(CircleShape) - ) - - Column( - modifier = Modifier.fillMaxSize(), - verticalArrangement = Arrangement.Bottom, - horizontalAlignment = Alignment.End - ) { - - Surface(color = MaterialTheme.colors.background, elevation = 2.dp, shape = CircleShape) { - IconButton( - onClick = { /*TODO*/ }, - modifier = Modifier - .size(24.dp) - .clip(CircleShape) - .padding(2.dp) - .background(MaterialTheme.colors.background) - .padding(2.dp) - ) { - Icon( - painter = painterResource(id = R.drawable.ic_dig_edit_line), - contentDescription = null, - ) - } - } - } - - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/UserNameAndEmail.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/UserNameAndEmail.kt deleted file mode 100644 index 7935b975..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/account/ui/UserNameAndEmail.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.account.ui - -import androidx.compose.foundation.layout.Column -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment - -@Composable -fun UserNameAndEmail(name: String, email: String) { - Column(horizontalAlignment = Alignment.Start) { - Text(text = name, style = MaterialTheme.typography.h6) - Text(text = email, style = MaterialTheme.typography.body2) - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/CampaignManager.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/CampaignManager.kt deleted file mode 100644 index 2a19ab07..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/CampaignManager.kt +++ /dev/null @@ -1,27 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.campaigns.data - -import com.dropbox.componentbox.discovery.discovery.campaigns.data.entities.Campaign -import com.dropbox.componentbox.discovery.discovery.campaigns.data.repository.CampaignRepository -import com.dropbox.componentbox.discovery.discovery.util.id -import javax.inject.Inject - -class CampaignManager @Inject constructor(repository: CampaignRepository) { - val bestCampaigns: MutableList - val campaignIdToSeen: MutableMap = mutableMapOf() - - inline fun getBestCampaign(): Campaign? { - val bestCampaignIndex = bestCampaigns.indexOfFirst { campaign -> campaign is C } - - if (bestCampaignIndex > -1) { - val bestCampaign = bestCampaigns.removeAt(bestCampaignIndex) - campaignIdToSeen[bestCampaign.id()] - return bestCampaign - } - - return null - } - - init { - bestCampaigns = repository.getBestCampaigns().toMutableList() - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/entities/BannerStyle.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/entities/BannerStyle.kt deleted file mode 100644 index 9c0a335f..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/entities/BannerStyle.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.campaigns.data.entities - -import kotlinx.serialization.Serializable - -@Serializable -enum class BannerStyle { - Info, - Notification, - Warning, - Promotion -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/entities/Campaign.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/entities/Campaign.kt deleted file mode 100644 index 4d2908c0..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/entities/Campaign.kt +++ /dev/null @@ -1,79 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.campaigns.data.entities - -sealed class Campaign { - interface PromptCampaign { - val id: String - } - - interface ComponentBoxCampaign

{ - val promptCampaign: P - val componentBoxId: String - } - - sealed class Banner : Campaign() { - data class PromptBanner( - override val id: String, - val text: String, - val subtext: String, - val style: BannerStyle, - val action: CampaignAction, - val iconStart: String, - val iconEnd: String, - ) : Banner(), PromptCampaign - - data class PromptBigBanner( - override val id: String, - val imageUrl: String, - val text: String, - val subtext: String, - val style: BannerStyle, - val action: CampaignAction, - val confirmText: String - ) : Banner(), PromptCampaign - - data class ComponentBoxBanner( - override val promptCampaign: PromptBanner, - override val componentBoxId: String - ) : Banner(), ComponentBoxCampaign - - data class ComponentBoxBigBanner( - override val promptCampaign: PromptBigBanner, - override val componentBoxId: String - ) : Banner(), ComponentBoxCampaign - } - - sealed class Modal : Campaign() { - data class PromptModal( - override val id: String, - val imageUrl: String, - val text: String, - val subtext: String, - val action: CampaignAction, - val confirmText: String, - val dismissText: String - ) : Modal(), PromptCampaign - - data class ComponentBoxModal( - override val promptCampaign: PromptModal, - override val componentBoxId: String - ) : Modal(), ComponentBoxCampaign - } - - sealed class UpgradeScreen : Campaign() { - data class PromptUpgradeScreen( - override val id: String, - val title: String, - val imageUrl: String, - val text: String, - val subtext: String, - val benefitList: List, - val actionText: String, - val dismissText: String, - ) : UpgradeScreen(), PromptCampaign - - data class ComponentBoxUpgradeScreen( - override val promptCampaign: PromptUpgradeScreen, - override val componentBoxId: String - ) : UpgradeScreen(), ComponentBoxCampaign - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/entities/CampaignAction.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/entities/CampaignAction.kt deleted file mode 100644 index e6723bc5..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/entities/CampaignAction.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.campaigns.data.entities - -import kotlinx.serialization.Serializable - -@Serializable -enum class CampaignAction { - OpenUpsellScreen, - OpenFeatureDiscoveryScreen -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/repository/CampaignRepository.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/repository/CampaignRepository.kt deleted file mode 100644 index 9ffa8f7d..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/repository/CampaignRepository.kt +++ /dev/null @@ -1,35 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.campaigns.data.repository - -import com.dropbox.componentbox.discovery.discovery.campaigns.data.entities.BannerStyle -import com.dropbox.componentbox.discovery.discovery.campaigns.data.entities.Campaign -import com.dropbox.componentbox.discovery.discovery.campaigns.data.entities.CampaignAction -import com.dropbox.componentbox.discovery.theme.R - -interface CampaignRepository { - fun getBestCampaigns(): List -} - -class FakeCampaignRepository : CampaignRepository { - override fun getBestCampaigns(): List = listOf( - - Campaign.Banner.PromptBanner( - "1", - "Turn on camera uploads", - "Keep all your photos safe and sound", - BannerStyle.Promotion, - CampaignAction.OpenUpsellScreen, - iconStart = "CameraUpload.Line", - iconEnd = "ArrowRight.Line", - ), - - Campaign.Modal.PromptModal( - "2", - "https://raw.githubusercontent.com/dropbox/componentbox/master/samples/discovery/theme/src/main/res/drawable-xhdpi/traffic_road_blocked.webp", - "Keep your photos safe", - "Now you can auto-upload right from your phone to view and share on any device", - CampaignAction.OpenUpsellScreen, - "Show me how", - "Dismiss" - ) - ) -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/run.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/run.kt deleted file mode 100644 index 81951ac6..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/data/run.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.campaigns.data - -import com.dropbox.componentbox.discovery.discovery.campaigns.data.entities.CampaignAction - -fun CampaignAction.run(): () -> Unit = when (this) { - CampaignAction.OpenUpsellScreen -> { - {} - } - CampaignAction.OpenFeatureDiscoveryScreen -> { - {} - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/ui/compose/Inflate.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/ui/compose/Inflate.kt deleted file mode 100644 index 9a34e861..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/ui/compose/Inflate.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.campaigns.ui.compose - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.discovery.discovery.campaigns.data.entities.Campaign - -@Composable -fun Campaign.Inflate(onDismiss: () -> Unit) = when (this) { - is Campaign.Banner.ComponentBoxBanner -> TODO() - is Campaign.Banner.PromptBanner -> Inflate(onDismiss) - is Campaign.Modal.ComponentBoxModal -> TODO() - is Campaign.Modal.PromptModal -> Inflate(onDismiss) - is Campaign.UpgradeScreen.ComponentBoxUpgradeScreen -> TODO() - is Campaign.UpgradeScreen.PromptUpgradeScreen -> Inflate() - is Campaign.Banner.PromptBigBanner -> Inflate(onDismiss) - is Campaign.Banner.ComponentBoxBigBanner -> TODO() -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/ui/compose/banner.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/ui/compose/banner.kt deleted file mode 100644 index fbfe0130..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/ui/compose/banner.kt +++ /dev/null @@ -1,134 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.campaigns.ui.compose - -import androidx.compose.foundation.Image -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.* -import androidx.compose.material.* -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.RectangleShape -import androidx.compose.ui.layout.ContentScale -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp -import coil.compose.rememberImagePainter -import com.dropbox.componentbox.discovery.discovery.campaigns.data.entities.Campaign -import com.dropbox.componentbox.discovery.discovery.campaigns.data.run -import com.dropbox.componentbox.discovery.theme.R - -@Composable -fun Campaign.Banner.PromptBanner.Inflate(onDismiss: () -> Unit) { - Row( - modifier = Modifier - .fillMaxWidth() - .background(Color(0xFFEBF2FF)) - .padding(vertical = 12.dp, horizontal = 8.dp), - horizontalArrangement = Arrangement.SpaceBetween, - verticalAlignment = Alignment.CenterVertically, - ) { - Icon( - painter = painterResource(id = R.drawable.ic_dig_camera_upload_line), - contentDescription = null, - modifier = Modifier.size(32.dp) - ) - - Column() { - Text(text = "Turn on camera uploads", style = MaterialTheme.typography.h6) - Text(text = "Keep all your photos safe and sound", style = MaterialTheme.typography.body2) - } - - IconButton(onClick = { - action.run() - onDismiss() - }) { - Icon( - painter = painterResource(id = R.drawable.ic_dig_arrow_right_line), - contentDescription = null, - modifier = Modifier.size(32.dp), - tint = MaterialTheme.colors.primary - ) - } - } -} - - -@Composable -fun Campaign.Banner.PromptBigBanner.Inflate(onDismiss: () -> Unit) { - Column( - modifier = Modifier - .fillMaxWidth() - .background(Color(0xFFFEF4D4)) - ) { - - Box { - Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.End) { - IconButton(onClick = onDismiss) { - Icon( - painter = painterResource(id = R.drawable.ic_dig_close_line), - contentDescription = null, - modifier = Modifier.size(32.dp) - ) - } - } - - Image( - painter = rememberImagePainter(imageUrl), - contentDescription = null, - modifier = Modifier - .fillMaxWidth() - .height(140.dp), - contentScale = ContentScale.Crop - ) - } - - Column( - modifier = Modifier - .fillMaxWidth() - .background(MaterialTheme.colors.onBackground) - .padding(horizontal = 16.dp) - - ) { - Text( - text = text, - style = MaterialTheme.typography.h4, - color = MaterialTheme.colors.background - ) - - Text( - text = subtext, - style = MaterialTheme.typography.body2, - modifier = Modifier.padding(vertical = 4.dp), - color = MaterialTheme.colors.background - ) - - - Row( - modifier = Modifier - .fillMaxWidth() - .padding(vertical = 12.dp), - verticalAlignment = Alignment.CenterVertically, - horizontalArrangement = Arrangement.SpaceBetween - ) { - - Button( - onClick = { onDismiss() }, - shape = RectangleShape, - colors = ButtonDefaults.buttonColors(backgroundColor = MaterialTheme.colors.primary), - modifier = Modifier - .padding(end = 2.dp) - .fillMaxWidth(), - elevation = ButtonDefaults.elevation(0.dp) - ) { - Text( - text = confirmText, - modifier = Modifier.padding(vertical = 4.dp, horizontal = 16.dp), - color = MaterialTheme.colors.background, - style = MaterialTheme.typography.button, - ) - } - } - } - - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/ui/compose/modal.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/ui/compose/modal.kt deleted file mode 100644 index 5565c120..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/ui/compose/modal.kt +++ /dev/null @@ -1,76 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.campaigns.ui.compose - -import androidx.compose.foundation.Image -import androidx.compose.foundation.layout.* -import androidx.compose.material.* -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.RectangleShape -import androidx.compose.ui.layout.ContentScale -import androidx.compose.ui.unit.dp -import androidx.compose.ui.window.Dialog -import coil.compose.rememberImagePainter -import com.dropbox.componentbox.discovery.discovery.campaigns.data.entities.Campaign -import com.dropbox.componentbox.samples.discovery.color.disabledBackground - - -@Composable -fun Campaign.Modal.PromptModal.Inflate(onDismiss: () -> Unit) { - Dialog(onDismissRequest = onDismiss) { - Surface( - elevation = 2.dp, - color = MaterialTheme.colors.background - ) { - Column( - modifier = Modifier.padding(vertical = 24.dp), - verticalArrangement = Arrangement.Center, - horizontalAlignment = Alignment.CenterHorizontally - ) { - - Image( - painter = rememberImagePainter(imageUrl), - contentDescription = null, - modifier = Modifier - .height(220.dp), - contentScale = ContentScale.FillHeight, - ) - - Column( - modifier = Modifier.padding(horizontal = 16.dp, vertical = 8.dp), - horizontalAlignment = Alignment.CenterHorizontally - ) { - - Text(text = text, style = MaterialTheme.typography.h5) - Text(text = subtext, style = MaterialTheme.typography.body1) - Button( - onClick = { /*TODO*/ }, - shape = RectangleShape, - elevation = ButtonDefaults.elevation(0.dp), - colors = ButtonDefaults.buttonColors(backgroundColor = MaterialTheme.colors.primary), - modifier = Modifier.fillMaxWidth() - ) { - Text( - text = confirmText, - style = MaterialTheme.typography.button, - color = MaterialTheme.colors.onPrimary - ) - } - Button( - onClick = onDismiss, - shape = RectangleShape, - elevation = ButtonDefaults.elevation(0.dp), - colors = ButtonDefaults.buttonColors(backgroundColor = MaterialTheme.colors.disabledBackground), - modifier = Modifier.fillMaxWidth() - ) { - Text( - text = dismissText, - style = MaterialTheme.typography.button, - color = MaterialTheme.colors.onBackground - ) - } - } - } - } - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/ui/compose/screen.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/ui/compose/screen.kt deleted file mode 100644 index f8be266d..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/campaigns/ui/compose/screen.kt +++ /dev/null @@ -1,30 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.campaigns.ui.compose - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import com.dropbox.componentbox.discovery.discovery.campaigns.data.entities.Campaign - -// TODO(mramotar) -@Composable -fun Campaign.UpgradeScreen.PromptUpgradeScreen.Inflate() { - Column( - modifier = Modifier - .fillMaxSize() - .background(MaterialTheme.colors.background), - verticalArrangement = Arrangement.SpaceBetween, - horizontalAlignment = Alignment.CenterHorizontally - ) { - Column() { - Text(text = title, style = MaterialTheme.typography.h6) - Text(text = text, style = MaterialTheme.typography.body2) - Text(text = subtext, style = MaterialTheme.typography.body2) - } - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/common/ui/DiscoveryScreen.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/common/ui/DiscoveryScreen.kt deleted file mode 100644 index 53bba00a..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/common/ui/DiscoveryScreen.kt +++ /dev/null @@ -1,38 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.common.ui - -import androidx.compose.foundation.layout.Box -import androidx.compose.runtime.Composable -import androidx.compose.runtime.collectAsState -import com.airbnb.mvrx.compose.mavericksViewModel -import com.dropbox.componentbox.discovery.discovery.DiscoveryPresenter -import com.dropbox.componentbox.discovery.discovery.campaigns.data.entities.Campaign -import com.dropbox.componentbox.discovery.discovery.campaigns.ui.compose.Inflate -import com.dropbox.componentbox.discovery.discovery.scaffold.ScaffoldCallback -import com.dropbox.componentbox.discovery.discovery.util.setUpScreen - -@Composable -fun DiscoveryScreen( - title: String, - scaffoldCallback: ScaffoldCallback, - TopBarActions: List<@Composable () -> Unit>, - LazyColumn: @Composable (@Composable () -> Unit) -> Unit, -) { - scaffoldCallback.setUpScreen(title = title, TopBarActions = TopBarActions) - - val presenter: DiscoveryPresenter = mavericksViewModel() - - Box { - LazyColumn { - if (presenter.canShowBanner.collectAsState().value) { - presenter.bestBanner.collectAsState().value?.Inflate { - presenter.dismissCampaign() - } - } - } - - - presenter.bestModal.collectAsState().value?.Inflate { - presenter.dismissCampaign() - } - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/home/ui/HomeScreen.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/home/ui/HomeScreen.kt deleted file mode 100644 index bcf90a37..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/home/ui/HomeScreen.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.home.ui - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.compose.ComponentBoxLoadingView -import com.dropbox.componentbox.discovery.discovery.iap.ui.DeviceLimitsScreen -import com.dropbox.componentbox.discovery.discovery.scaffold.ScaffoldCallback - -@Composable -fun HomeScreen(callback: ScaffoldCallback){ - callback.setTitle("Home") - - DeviceLimitsScreen(callback) -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/iap/ui/DeviceLimitsScreen.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/iap/ui/DeviceLimitsScreen.kt deleted file mode 100644 index 41221eea..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/iap/ui/DeviceLimitsScreen.kt +++ /dev/null @@ -1,262 +0,0 @@ -@file:OptIn(ExperimentalMaterialApi::class) - -package com.dropbox.componentbox.discovery.discovery.iap.ui - -import androidx.annotation.DrawableRes -import androidx.annotation.StringRes -import androidx.compose.foundation.Image -import androidx.compose.foundation.background -import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.* -import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.material.* -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.RectangleShape -import androidx.compose.ui.layout.ContentScale -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.discovery.android.R -import com.dropbox.componentbox.discovery.discovery.scaffold.LeadingNavigationIconButton -import com.dropbox.componentbox.discovery.discovery.scaffold.ScaffoldCallback -import com.dropbox.componentbox.samples.discovery.color.faintText -import com.dropbox.componentbox.samples.discovery.color.successFill - - -@Composable -fun getBenefits() = listOf( - Benefit( - icon = BenefitIcon(res = R.drawable.info, tint = MaterialTheme.colors.onBackground), - text = BenefitText( - res = R.string.device_limits_benefit_one, - style = MaterialTheme.typography.body1, - fontWeight = FontWeight.Bold - ) - ), - - Benefit( - icon = BenefitIcon(res = R.drawable.ic_dig_checkmark_circle_fill, tint = MaterialTheme.colors.successFill), - text = BenefitText( - res = R.string.device_limits_benefit_two, - style = MaterialTheme.typography.body1, - fontWeight = FontWeight.Normal - ) - ), - - Benefit( - icon = BenefitIcon(res = R.drawable.ic_dig_checkmark_circle_fill, tint = MaterialTheme.colors.successFill), - text = BenefitText( - res = R.string.device_limits_benefit_three, - style = MaterialTheme.typography.body1, - fontWeight = FontWeight.Normal - ) - ), - - Benefit( - icon = BenefitIcon(res = R.drawable.ic_dig_checkmark_circle_fill, tint = MaterialTheme.colors.successFill), - text = BenefitText( - res = R.string.device_limits_benefit_four, - style = MaterialTheme.typography.body1, - fontWeight = FontWeight.Normal - ) - ) -) - - -@Composable -fun DeviceLimitsScreen(callback: ScaffoldCallback) { - callback.setTitle("3 of 3 devices linked") - callback.setLeadingNavigationIconButton(LeadingNavigationIconButton(R.drawable.ic_dig_close_line) {}) - callback.setTopBarActions(listOf()) - callback.enableSheetGestures() - callback.setBottomSheet { BottomSheet() } - - - val benefits = getBenefits() - - Column( - modifier = Modifier.fillMaxSize(), - verticalArrangement = Arrangement.SpaceBetween, - horizontalAlignment = Alignment.CenterHorizontally - ) { - - LazyColumn( - modifier = Modifier - .fillMaxWidth() - .background(color = MaterialTheme.colors.secondary), - verticalArrangement = Arrangement.SpaceBetween, - horizontalAlignment = Alignment.CenterHorizontally - ) { - - item { - Image( - painter = painterResource(id = R.drawable.devices_room), - contentDescription = null, - modifier = Modifier - .fillMaxWidth() - .heightIn(min = 250.dp, max = 320.dp) - .padding(0.dp), - contentScale = ContentScale.Crop, - alignment = Alignment.TopCenter - ) - } - - item { - Surface( - modifier = Modifier - .fillMaxWidth(), color = MaterialTheme.colors.background, elevation = 12.dp - ) { - - Column(modifier = Modifier.padding(16.dp)) { - Text( - text = stringResource(id = R.string.device_limits_title), - style = MaterialTheme.typography.h4, - fontWeight = FontWeight.Bold, - modifier = Modifier.padding(bottom = 16.dp) - ) - - benefits.forEach { benefit -> - benefit.Inflate() - } - } - } - - } - } - - - - - - - Surface( - modifier = Modifier - .fillMaxWidth() - .padding(0.dp), color = MaterialTheme.colors.background - ) { - - Column(modifier = Modifier.padding(horizontal = 16.dp)) { - Button( - onClick = {}, - modifier = Modifier.fillMaxWidth(), - colors = ButtonDefaults.buttonColors(backgroundColor = MaterialTheme.colors.primary), - shape = RectangleShape - ) { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.Center, - verticalAlignment = Alignment.CenterVertically - ) { - Text( - text = "Try free for 30 days", - color = MaterialTheme.colors.onPrimary, - style = MaterialTheme.typography.button, - fontWeight = FontWeight.Bold - ) - } - - } - - - Row( - modifier = Modifier - .fillMaxWidth() - .padding(0.dp) - .clickable { - callback.expandBottomSheet() - }, - horizontalArrangement = Arrangement.Center, - verticalAlignment = Alignment.CenterVertically, - ) { - Text( - text = "Subscription details", - color = MaterialTheme.colors.faintText, - style = MaterialTheme.typography.button, - fontWeight = FontWeight.Normal, - modifier = Modifier.padding(end = 8.dp) - ) - - Icon( - painter = painterResource(id = R.drawable.chevron_up), - modifier = Modifier.size(16.dp), - tint = MaterialTheme.colors.primary, - contentDescription = null - ) - } - } - } - } -} - - -@Composable -private fun BottomSheet() { - Column( - modifier = Modifier - .fillMaxWidth() - .background(MaterialTheme.colors.background) - .padding(16.dp) - ) { - - - Row(modifier = Modifier.fillMaxWidth()) { - Text( - text = "Subscription details", - style = MaterialTheme.typography.h5, - modifier = Modifier.padding(end = 16.dp) - ) - - Icon( - painter = painterResource(id = R.drawable.chevron_down), - contentDescription = null, - modifier = Modifier.size(20.dp), - tint = MaterialTheme.colors.primary - ) - } - - - Text( - text = "This subscription automatically renews after the 30-day free trial. You can turn off auto-renew at least 24 hours before your billing period ends.\n" + - "\n" + - "By upgrading your account, you agree to Dropbox’sTerms of Service and Privacy Policy." - ) - } -} - - -data class BenefitIcon( - @DrawableRes val res: Int, - val tint: Color -) - -data class BenefitText( - @StringRes val res: Int, - val style: TextStyle, - val fontWeight: FontWeight -) - -data class Benefit( - val icon: BenefitIcon, - val text: BenefitText -) - -@Composable -fun Benefit.Inflate() { - Row(modifier = Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically) { - Icon( - painter = painterResource(id = icon.res), - contentDescription = null, - tint = icon.tint, - modifier = Modifier - .size(32.dp) - .padding(end = 16.dp) - ) - - Text(text = stringResource(id = text.res), style = text.style, fontWeight = text.fontWeight) - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/photos/ui/PhotosScreen.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/photos/ui/PhotosScreen.kt deleted file mode 100644 index 9e4d6ade..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/photos/ui/PhotosScreen.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.photos.ui - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.compose.ComponentBoxLoadingView -import com.dropbox.componentbox.discovery.discovery.scaffold.ScaffoldCallback - -@Composable -fun PhotosScreen(callback: ScaffoldCallback) { - - callback.setTitle("Photos") - - ComponentBoxLoadingView() -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/plans/presentation/PlansScreenPresenter.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/plans/presentation/PlansScreenPresenter.kt deleted file mode 100644 index f2846723..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/plans/presentation/PlansScreenPresenter.kt +++ /dev/null @@ -1,43 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.plans.presentation - -import com.airbnb.mvrx.MavericksViewModel -import com.airbnb.mvrx.MavericksViewModelFactory -import com.airbnb.mvrx.ViewModelContext -import com.dropbox.componentbox.discovery.discovery.RealComponentBoxPresenter -import com.dropbox.componentbox.discovery.zipline.LOAD_COMPONENT_BOX_SCRIPT -import com.dropbox.componentbox.foundation.ComponentBox -import com.dropbox.componentbox.presentation.ComponentBoxPresenter -import com.dropbox.componentbox.presentation.ComponentBoxState -import com.dropbox.componentbox.presentation.ComponentBoxViewModel -import com.dropbox.componentbox.presentation.ComponentBoxViewState -import com.dropbox.componentbox.presentation.RealComponentBoxState -import com.dropbox.componentbox.zipline.ComponentBoxZipline - -class PlansScreenPresenter(zipline: ComponentBoxZipline, componentBoxUrl: String, initialState: ComponentBoxState) : - MavericksViewModel(initialState) { - private val componentBoxPresenter: ComponentBoxPresenter> - - init { - componentBoxPresenter = RealComponentBoxPresenter(zipline, componentBoxUrl) - } - - fun bridge() = componentBoxPresenter - - companion object : MavericksViewModelFactory { - override fun initialState(viewModelContext: ViewModelContext): ComponentBoxState { - return RealComponentBoxState(ComponentBoxViewState.Initialized) - } - - override fun create(viewModelContext: ViewModelContext, state: ComponentBoxState): PlansScreenPresenter? { - - val ziplineUrl = "https://api.componentbox.io/zipline/1.js" - val componentBoxUrl = "https://api.componentbox.io/screens/1.json" - val zipline = ComponentBoxZipline(ziplineUrl = ziplineUrl, script = LOAD_COMPONENT_BOX_SCRIPT) - return PlansScreenPresenter( - zipline, - componentBoxUrl, - RealComponentBoxState(ComponentBoxViewState.Initialized) - ) - } - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/plans/ui/PlansScreen.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/plans/ui/PlansScreen.kt deleted file mode 100644 index e61a6da0..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/plans/ui/PlansScreen.kt +++ /dev/null @@ -1,25 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.plans.ui - -import androidx.compose.runtime.Composable -import com.airbnb.mvrx.compose.mavericksViewModel -import com.dropbox.componentbox.compose.ComponentBoxView -import com.dropbox.componentbox.discovery.discovery.plans.presentation.PlansScreenPresenter -import com.dropbox.componentbox.discovery.discovery.scaffold.ScaffoldCallback -import com.dropbox.componentbox.discovery.discovery.scoping.appScope - -@Composable -fun PlansScreen(callback: ScaffoldCallback) { - val title = "Upgrade to Dropbox Plus" - val topBarActions = listOf<@Composable () -> Unit>() - val presenter: PlansScreenPresenter = mavericksViewModel() - - callback.setTitle(title) - callback.setTopBarActions(topBarActions) - - ComponentBoxView( - presenter = presenter.bridge(), - context = appScope().context, - Loading = { }, - Fallback = { } - ) -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/ScaffoldCallback.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/ScaffoldCallback.kt deleted file mode 100644 index e374b3ea..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/ScaffoldCallback.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.scaffold - -import androidx.compose.runtime.Composable - -interface ScaffoldCallback { - fun setTitle(value: String) - fun setLeadingNavigationIconButton(value: LeadingNavigationIconButton) - fun setTopBarActions(value: List<@Composable () -> Unit>) - fun setBottomSheet(content: @Composable () -> Unit) - fun expandBottomSheet() - fun collapseBottomSheet() - fun enableSheetGestures() - fun disableSheetGestures() -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/ScaffoldPresenter.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/ScaffoldPresenter.kt deleted file mode 100644 index 1d78835e..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/ScaffoldPresenter.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.scaffold - -import androidx.lifecycle.ViewModel -import com.dropbox.componentbox.foundation.Inflater -import com.dropbox.componentbox.discovery.discovery.scoping.AppScope -import dagger.hilt.android.lifecycle.HiltViewModel -import javax.inject.Inject - -@HiltViewModel -class ScaffoldPresenter @Inject constructor(appScope: AppScope) : ViewModel() { - val inflater: Inflater - - init { - inflater = appScope.inflater - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/bottomBar.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/bottomBar.kt deleted file mode 100644 index b550534e..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/bottomBar.kt +++ /dev/null @@ -1,43 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.scaffold - -import androidx.compose.foundation.layout.padding -import androidx.compose.material.BottomNavigation -import androidx.compose.material.BottomNavigationItem -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.foundation.BottomTab -import com.dropbox.componentbox.samples.discovery.color.standardBackgroundElevated - -@Composable -fun bottomBar( - tabs: List, - selectedTab: BottomTab, - onClick: (tab: BottomTab) -> Unit -): @Composable () -> Unit { - return { - BottomNavigation( - backgroundColor = MaterialTheme.colors.standardBackgroundElevated, - modifier = Modifier.padding(vertical = 4.dp) - ) { - tabs.forEach { tab -> - BottomNavigationItem( - selected = tab == selectedTab, - onClick = { onClick(tab) }, - icon = { - Icon( - painter = painterResource(id = if (tab == selectedTab) tab.iconSelected.resId else tab.iconNotSelected.resId), - contentDescription = null - ) - }, - label = { Text(text = stringResource(id = tab.title.resId)) } - ) - } - } - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/scaffold.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/scaffold.kt deleted file mode 100644 index 9f690beb..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/scaffold.kt +++ /dev/null @@ -1,108 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.scaffold - -import androidx.annotation.DrawableRes -import androidx.compose.foundation.clickable -import androidx.compose.foundation.gestures.detectTapGestures -import androidx.compose.foundation.layout.* -import androidx.compose.material.* -import androidx.compose.runtime.* -import androidx.compose.ui.Modifier -import androidx.compose.ui.input.pointer.pointerInput -import androidx.compose.ui.unit.dp -import androidx.hilt.navigation.compose.hiltViewModel -import com.dropbox.componentbox.discovery.android.R -import kotlinx.coroutines.launch -import androidx.compose.runtime.CompositionLocalProvider - -import java.util.logging.Logger.global - - -@OptIn(ExperimentalMaterialApi::class) -@Composable -fun Scaffold() { - val presenter: ScaffoldPresenter = hiltViewModel() - - val bottomSheetScaffoldState = rememberBottomSheetScaffoldState( - bottomSheetState = BottomSheetState(initialValue = BottomSheetValue.Collapsed) - ) - - val coroutineScope = rememberCoroutineScope() - - val tabs = presenter.inflater.bottomTabs() - val (selectedTab, setSelectedTab) = remember { mutableStateOf(tabs[3]) } - val title = remember { mutableStateOf("") } - - val defaultLeadingNavigationIconButton = LeadingNavigationIconButton(R.drawable.ic_dig_list_view_line) {} - val leadingNavigationIconButton: MutableState = - remember { mutableStateOf(defaultLeadingNavigationIconButton) } - - val topBarActions = remember { mutableStateListOf<@Composable () -> Unit>() } - - val bottomSheetContent = remember { - mutableStateOf<@Composable () -> Unit>({ - Text(text = "Bottom sheet") - }) - } - val sheetGesturesEnabled = remember { mutableStateOf(false) } - - val callback = object : ScaffoldCallback { - override fun setTitle(value: String) { - title.value = value - } - - override fun setTopBarActions(value: List<@Composable () -> Unit>) { - topBarActions.clear() - topBarActions.addAll(value) - } - - override fun setLeadingNavigationIconButton(value: LeadingNavigationIconButton) { - leadingNavigationIconButton.value = value - } - - override fun expandBottomSheet() { - coroutineScope.launch { - bottomSheetScaffoldState.bottomSheetState.expand() - } - } - - override fun collapseBottomSheet() { - coroutineScope.launch { - bottomSheetScaffoldState.bottomSheetState.collapse() - } - } - - override fun setBottomSheet(content: @Composable () -> Unit) { - bottomSheetContent.value = content - } - - override fun enableSheetGestures() { - sheetGesturesEnabled.value = true - } - - override fun disableSheetGestures() { - sheetGesturesEnabled.value = false - } - } - - - BottomSheetScaffold( - scaffoldState = bottomSheetScaffoldState, - sheetContent = { bottomSheetContent.value() }, - sheetGesturesEnabled = sheetGesturesEnabled.value, - sheetPeekHeight = 0.dp - ) - { - Scaffold( - topBar = topBar(title.value, topBarActions, leadingNavigationIconButton.value), - bottomBar = bottomBar(tabs, selectedTab) { setSelectedTab(it) } - ) { innerPadding -> - Screen(innerPadding, selectedTab, callback) - } - - } -} - -data class LeadingNavigationIconButton( - @DrawableRes val icon: Int, - val action: () -> Unit -) \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/screen.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/screen.kt deleted file mode 100644 index 1d775675..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/screen.kt +++ /dev/null @@ -1,30 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.scaffold - -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.PaddingValues -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.padding -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import com.dropbox.componentbox.discovery.discovery.account.ui.AccountScreen -import com.dropbox.componentbox.discovery.discovery.home.ui.HomeScreen -import com.dropbox.componentbox.discovery.discovery.photos.ui.PhotosScreen -import com.dropbox.componentbox.discovery.discovery.plans.ui.PlansScreen -import com.dropbox.componentbox.foundation.BottomTab -import com.dropbox.componentbox.samples.discovery.DiscoveryDestination - -@Composable -fun Screen(innerPadding: PaddingValues, selectedTab: BottomTab, callback: ScaffoldCallback) { - Box( - modifier = Modifier - .padding(innerPadding) - .fillMaxSize() - ) { - when (selectedTab.id) { - DiscoveryDestination.Home -> HomeScreen(callback) - DiscoveryDestination.Photos -> PhotosScreen(callback) - DiscoveryDestination.Plans -> PlansScreen(callback) - DiscoveryDestination.Account -> AccountScreen(callback) - } - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/topBar.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/topBar.kt deleted file mode 100644 index 696f1787..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scaffold/topBar.kt +++ /dev/null @@ -1,54 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.scaffold - -import androidx.compose.foundation.layout.size -import androidx.compose.material.* -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.text.style.TextAlign -import androidx.compose.ui.unit.dp - -@Composable -fun topBar( - title: String, - actions: List<@Composable () -> Unit>, - leadingNavigationIconButton: LeadingNavigationIconButton? -): @Composable () -> Unit { - return { - TopAppBar( - backgroundColor = MaterialTheme.colors.background, - navigationIcon = { leadingNavigationIconButton?.Inflate() }, - title = topBarTitle(title), - actions = { - actions.forEach { action -> - action() - } - } - ) - } -} - -@Composable -private fun topBarTitle(title: String): @Composable () -> Unit { - return { - Text( - text = title, - color = MaterialTheme.colors.onBackground, - style = MaterialTheme.typography.h5, - textAlign = TextAlign.Start - ) - } -} - - -@Composable -private fun LeadingNavigationIconButton.Inflate() { - IconButton(onClick = action) { - Icon( - painter = painterResource(icon), - modifier = Modifier.size(32.dp), - contentDescription = null, - tint = MaterialTheme.colors.onBackground - ) - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scoping/AppScope.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scoping/AppScope.kt deleted file mode 100644 index 6a1c7640..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scoping/AppScope.kt +++ /dev/null @@ -1,21 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.scoping - -import com.dropbox.componentbox.discovery.discovery.DiscoveryManager -import com.dropbox.componentbox.discovery.discovery.DiscoveryThemer -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.foundation.Inflater -import com.dropbox.componentbox.foundation.ResourceProvider -import com.dropbox.componentbox.samples.discovery.RealInflater -import com.dropbox.componentbox.samples.discovery.RealResourceProvider - -data class AppScope( - val inflater: Inflater, - val resourceProvider: ResourceProvider, - val context: Context -) - -fun appScope() = AppScope( - inflater = RealInflater(), - resourceProvider = RealResourceProvider(), - context = Context(RealInflater(), DiscoveryThemer(), DiscoveryManager()) -) \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scoping/UserScope.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scoping/UserScope.kt deleted file mode 100644 index 0a5b50df..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/scoping/UserScope.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.scoping - -import com.dropbox.componentbox.discovery.discovery.campaigns.data.CampaignManager -import com.dropbox.componentbox.discovery.discovery.campaigns.data.repository.CampaignRepository -import com.dropbox.componentbox.discovery.discovery.campaigns.data.repository.FakeCampaignRepository - -data class UserScope( - val campaignManager: CampaignManager, - val campaignRepository: CampaignRepository -) - -fun userScope() = UserScope( - campaignManager = CampaignManager(FakeCampaignRepository()), - campaignRepository = FakeCampaignRepository() -) \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/util/campaign.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/util/campaign.kt deleted file mode 100644 index adcdac2b..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/util/campaign.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.util - -import com.dropbox.componentbox.discovery.discovery.campaigns.data.entities.Campaign - -fun Campaign?.id() = when (this) { - is Campaign.Banner.ComponentBoxBanner -> promptCampaign.id - is Campaign.Banner.PromptBanner -> id - is Campaign.Modal.PromptModal -> id - is Campaign.UpgradeScreen.ComponentBoxUpgradeScreen -> promptCampaign.id - is Campaign.UpgradeScreen.PromptUpgradeScreen -> id - is Campaign.Banner.ComponentBoxBigBanner -> promptCampaign.id - is Campaign.Banner.PromptBigBanner -> id - is Campaign.Modal.ComponentBoxModal -> promptCampaign.id - null -> null -} - -fun Campaign?.componentBoxId() = when (this) { - is Campaign.Banner.ComponentBoxBanner -> componentBoxId - is Campaign.Modal.ComponentBoxModal -> componentBoxId - is Campaign.UpgradeScreen.ComponentBoxUpgradeScreen -> componentBoxId - else -> null -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/util/context.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/util/context.kt deleted file mode 100644 index 2bf85820..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/util/context.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.util - -import android.content.Context -import android.content.ContextWrapper -import androidx.activity.ComponentActivity - -fun Context.getActivity(): ComponentActivity? = when (this) { - is ComponentActivity -> this - is ContextWrapper -> baseContext.getActivity() - else -> null -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/util/resources.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/util/resources.kt deleted file mode 100644 index 7d43f17f..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/util/resources.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.util - -import androidx.compose.foundation.layout.size -import androidx.compose.material.Icon -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.unit.dp - -fun Int.icon(size: Int = 28): @Composable () -> Unit { - return { - Icon(painter = painterResource(id = this), contentDescription = null, modifier = Modifier.size(size.dp)) - } -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/util/scaffold.kt b/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/util/scaffold.kt deleted file mode 100644 index 96187bfe..00000000 --- a/samples/discovery/android/Discovery/src/main/kotlin/com/dropbox/componentbox/discovery/discovery/util/scaffold.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.componentbox.discovery.discovery.util - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.discovery.discovery.scaffold.ScaffoldCallback - -fun ScaffoldCallback.setUpScreen(title: String, TopBarActions: List<@Composable () -> Unit>) { - setTitle(title) - setTopBarActions(TopBarActions) -} \ No newline at end of file diff --git a/samples/discovery/android/Discovery/src/main/res/drawable-hdpi/devices_room.png b/samples/discovery/android/Discovery/src/main/res/drawable-hdpi/devices_room.png deleted file mode 100644 index c7ed0b54..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/drawable-hdpi/devices_room.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/drawable-mdpi/devices_room.png b/samples/discovery/android/Discovery/src/main/res/drawable-mdpi/devices_room.png deleted file mode 100644 index 0458579f..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/drawable-mdpi/devices_room.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/drawable-night-hdpi/devices_room.png b/samples/discovery/android/Discovery/src/main/res/drawable-night-hdpi/devices_room.png deleted file mode 100644 index f07a2667..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/drawable-night-hdpi/devices_room.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/drawable-night-mdpi/devices_room.png b/samples/discovery/android/Discovery/src/main/res/drawable-night-mdpi/devices_room.png deleted file mode 100644 index 47803fa7..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/drawable-night-mdpi/devices_room.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/drawable-night-xhdpi/devices_room.png b/samples/discovery/android/Discovery/src/main/res/drawable-night-xhdpi/devices_room.png deleted file mode 100644 index f47bfb59..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/drawable-night-xhdpi/devices_room.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/drawable-night-xxhdpi/devices_room.png b/samples/discovery/android/Discovery/src/main/res/drawable-night-xxhdpi/devices_room.png deleted file mode 100644 index 8a3148fa..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/drawable-night-xxhdpi/devices_room.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/drawable-night-xxxhdpi/devices_room.png b/samples/discovery/android/Discovery/src/main/res/drawable-night-xxxhdpi/devices_room.png deleted file mode 100644 index 5aae3f6b..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/drawable-night-xxxhdpi/devices_room.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/drawable-xhdpi/devices_room.png b/samples/discovery/android/Discovery/src/main/res/drawable-xhdpi/devices_room.png deleted file mode 100644 index d7c4ff2c..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/drawable-xhdpi/devices_room.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/drawable-xxhdpi/devices_room.png b/samples/discovery/android/Discovery/src/main/res/drawable-xxhdpi/devices_room.png deleted file mode 100644 index 14b825c7..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/drawable-xxhdpi/devices_room.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/drawable-xxxhdpi/devices_room.png b/samples/discovery/android/Discovery/src/main/res/drawable-xxxhdpi/devices_room.png deleted file mode 100644 index 370a56e1..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/drawable-xxxhdpi/devices_room.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-hdpi/adaptive_bg.png b/samples/discovery/android/Discovery/src/main/res/mipmap-hdpi/adaptive_bg.png deleted file mode 100644 index 2d4e26de..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-hdpi/adaptive_bg.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-hdpi/adaptive_fg.png b/samples/discovery/android/Discovery/src/main/res/mipmap-hdpi/adaptive_fg.png deleted file mode 100644 index 244829d6..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-hdpi/adaptive_fg.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-hdpi/icon.png b/samples/discovery/android/Discovery/src/main/res/mipmap-hdpi/icon.png deleted file mode 100644 index d2ea7fbe..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-hdpi/icon.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-hdpi/icon_round.png b/samples/discovery/android/Discovery/src/main/res/mipmap-hdpi/icon_round.png deleted file mode 100644 index d2ea7fbe..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-hdpi/icon_round.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-mdpi/adaptive_bg.png b/samples/discovery/android/Discovery/src/main/res/mipmap-mdpi/adaptive_bg.png deleted file mode 100644 index da58ea07..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-mdpi/adaptive_bg.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-mdpi/adaptive_fg.png b/samples/discovery/android/Discovery/src/main/res/mipmap-mdpi/adaptive_fg.png deleted file mode 100644 index 463a7b30..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-mdpi/adaptive_fg.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-mdpi/componentbox.png b/samples/discovery/android/Discovery/src/main/res/mipmap-mdpi/componentbox.png deleted file mode 100644 index 8de38848..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-mdpi/componentbox.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-xhdpi/adaptive_bg.png b/samples/discovery/android/Discovery/src/main/res/mipmap-xhdpi/adaptive_bg.png deleted file mode 100644 index 42e3b826..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-xhdpi/adaptive_bg.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-xhdpi/adaptive_fg.png b/samples/discovery/android/Discovery/src/main/res/mipmap-xhdpi/adaptive_fg.png deleted file mode 100644 index 0694529b..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-xhdpi/adaptive_fg.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-xhdpi/icon.png b/samples/discovery/android/Discovery/src/main/res/mipmap-xhdpi/icon.png deleted file mode 100644 index ef111a8a..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-xhdpi/icon.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-xhdpi/icon_round.png b/samples/discovery/android/Discovery/src/main/res/mipmap-xhdpi/icon_round.png deleted file mode 100644 index ef111a8a..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-xhdpi/icon_round.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-xxhdpi/adaptive_bg.png b/samples/discovery/android/Discovery/src/main/res/mipmap-xxhdpi/adaptive_bg.png deleted file mode 100644 index 2c0d22c5..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-xxhdpi/adaptive_bg.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-xxhdpi/adaptive_fg.png b/samples/discovery/android/Discovery/src/main/res/mipmap-xxhdpi/adaptive_fg.png deleted file mode 100644 index 442a2556..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-xxhdpi/adaptive_fg.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-xxhdpi/icon.png b/samples/discovery/android/Discovery/src/main/res/mipmap-xxhdpi/icon.png deleted file mode 100644 index 314a94af..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-xxhdpi/icon.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-xxhdpi/icon_round.png b/samples/discovery/android/Discovery/src/main/res/mipmap-xxhdpi/icon_round.png deleted file mode 100644 index 314a94af..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-xxhdpi/icon_round.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-xxxhdpi/adaptive_bg.png b/samples/discovery/android/Discovery/src/main/res/mipmap-xxxhdpi/adaptive_bg.png deleted file mode 100644 index c04f3002..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-xxxhdpi/adaptive_bg.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-xxxhdpi/adaptive_fg.png b/samples/discovery/android/Discovery/src/main/res/mipmap-xxxhdpi/adaptive_fg.png deleted file mode 100644 index 35463098..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-xxxhdpi/adaptive_fg.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-xxxhdpi/componentbox.png b/samples/discovery/android/Discovery/src/main/res/mipmap-xxxhdpi/componentbox.png deleted file mode 100644 index dbe40263..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-xxxhdpi/componentbox.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-xxxhdpi/icon.png b/samples/discovery/android/Discovery/src/main/res/mipmap-xxxhdpi/icon.png deleted file mode 100644 index b6911535..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-xxxhdpi/icon.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/mipmap-xxxhdpi/icon_round.png b/samples/discovery/android/Discovery/src/main/res/mipmap-xxxhdpi/icon_round.png deleted file mode 100644 index b6911535..00000000 Binary files a/samples/discovery/android/Discovery/src/main/res/mipmap-xxxhdpi/icon_round.png and /dev/null differ diff --git a/samples/discovery/android/Discovery/src/main/res/values/string.xml b/samples/discovery/android/Discovery/src/main/res/values/string.xml deleted file mode 100644 index 4521072c..00000000 --- a/samples/discovery/android/Discovery/src/main/res/values/string.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - Get your content on all your devices with Plus - 2 TB (2,000 GB), $11.99 per month - Link and sync unlimited devices - Remotely remove files from lost devices - Set up entire folders for offline access - diff --git a/samples/discovery/android/zipline/build.gradle.kts b/samples/discovery/android/zipline/build.gradle.kts deleted file mode 100644 index 76848cab..00000000 --- a/samples/discovery/android/zipline/build.gradle.kts +++ /dev/null @@ -1,69 +0,0 @@ -import org.jetbrains.kotlin.gradle.plugin.PLUGIN_CLASSPATH_CONFIGURATION_NAME - -plugins { - kotlin("multiplatform") - kotlin("plugin.serialization") - id("com.android.library") - id("org.jetbrains.compose") version Version.composeMultiplatform - id("app.cash.zipline") -} - -group = "com.dropbox.componentbox.discovery" - -kotlin { - android() - js { - browser() - binaries.executable() - } - jvm() - - sourceSets { - val commonMain by getting { - dependencies { - implementation(project(":componentbox")) - - implementation(compose.runtime) - implementation(Deps.Cash.Zipline.zipline) - - with(Deps.Kotlinx){ - implementation(serializationCore) - implementation(serializationJson) - implementation(coroutinesCore) - } - } - } - - val jvmMain by getting { - dependencies { - with(Deps.Cash) { - implementation(okhttp) - } - } - } - - val androidMain by getting { - dependencies { - dependsOn(jvmMain) - with(Deps.Kotlinx) { - implementation(coroutinesAndroid) - implementation(serializationCore) - } - with(Deps.AndroidX) { - implementation(coreKtx) - implementation(appCompat) - } - } - } - } -} - -android { - compileSdkVersion(Version.androidCompileSdk) -} - -rootProject.plugins.withType { - val nodeJsRootExtension = rootProject.the() - nodeJsRootExtension.versions.webpackCli.version = "4.9.0" - nodeJsRootExtension.nodeVersion = "16.0.0" -} \ No newline at end of file diff --git a/samples/discovery/android/zipline/src/commonMain/kotlin/com/dropbox/componentbox/discovery/zipline/constants.kt b/samples/discovery/android/zipline/src/commonMain/kotlin/com/dropbox/componentbox/discovery/zipline/constants.kt deleted file mode 100644 index 54b4e45b..00000000 --- a/samples/discovery/android/zipline/src/commonMain/kotlin/com/dropbox/componentbox/discovery/zipline/constants.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.discovery.zipline - -const val LOAD_COMPONENT_BOX_SCRIPT = "require('zipline').com.dropbox.componentbox.discovery.zipline.loadComponentBox()" \ No newline at end of file diff --git a/samples/discovery/android/zipline/src/jsMain/kotlin/com/dropbox/componentbox/discovery/zipline/RealComponentBoxPresenter.kt b/samples/discovery/android/zipline/src/jsMain/kotlin/com/dropbox/componentbox/discovery/zipline/RealComponentBoxPresenter.kt deleted file mode 100644 index 963954e2..00000000 --- a/samples/discovery/android/zipline/src/jsMain/kotlin/com/dropbox/componentbox/discovery/zipline/RealComponentBoxPresenter.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.dropbox.componentbox.discovery.zipline - -import com.dropbox.componentbox.zipline.ComponentBoxPresenter -import com.dropbox.componentbox.zipline.HostApi - -class RealComponentBoxPresenter(hostApi: HostApi) : ComponentBoxPresenter(hostApi) diff --git a/samples/discovery/android/zipline/src/jsMain/kotlin/com/dropbox/componentbox/discovery/zipline/loadComponentBox.kt b/samples/discovery/android/zipline/src/jsMain/kotlin/com/dropbox/componentbox/discovery/zipline/loadComponentBox.kt deleted file mode 100644 index 7dddeebe..00000000 --- a/samples/discovery/android/zipline/src/jsMain/kotlin/com/dropbox/componentbox/discovery/zipline/loadComponentBox.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.dropbox.componentbox.discovery.zipline - - -import app.cash.zipline.Zipline -import com.dropbox.componentbox.foundation.COMPONENT_BOX_ZIPLINE_SERVICE -import com.dropbox.componentbox.zipline.ComponentBoxZiplineService -import com.dropbox.componentbox.zipline.HostApi - - -private val zipline by lazy { Zipline.get() } - -@JsExport -fun loadComponentBox() { - val hostApi = zipline.take("hostApi") - val componentBoxPresenter = RealComponentBoxPresenter(hostApi) - zipline.bind(COMPONENT_BOX_ZIPLINE_SERVICE, componentBoxPresenter) -} \ No newline at end of file diff --git a/samples/discovery/android/zipline/src/main/AndroidManifest.xml b/samples/discovery/android/zipline/src/main/AndroidManifest.xml deleted file mode 100644 index f8f13e72..00000000 --- a/samples/discovery/android/zipline/src/main/AndroidManifest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/samples/discovery/android/zipline/webpack.config.d/devserver.js b/samples/discovery/android/zipline/webpack.config.d/devserver.js deleted file mode 100644 index 978c82ff..00000000 --- a/samples/discovery/android/zipline/webpack.config.d/devserver.js +++ /dev/null @@ -1,15 +0,0 @@ -if (config.devServer) { - // Accept calls from any device. Typically this is a phone on the same WiFi network. - config.devServer.host = "0.0.0.0"; - - // Don't inject served JavaScript with live reloading features. - config.devServer.liveReload = false; - config.devServer.hot = false; - config.devServer.client = false; - - // Don't open Chrome. - delete config.devServer.open; - - // Serve .zipline files. - config.devServer.static.push('../build/zipline'); -} \ No newline at end of file diff --git a/samples/discovery/common/build.gradle.kts b/samples/discovery/common/build.gradle.kts deleted file mode 100644 index 0d689924..00000000 --- a/samples/discovery/common/build.gradle.kts +++ /dev/null @@ -1,65 +0,0 @@ -import org.jetbrains.kotlin.gradle.plugin.PLUGIN_CLASSPATH_CONFIGURATION_NAME - -plugins { - kotlin("multiplatform") - kotlin("plugin.serialization") - id("com.android.library") - id("org.jetbrains.compose") version Version.composeMultiplatform - id("app.cash.zipline") -} - -group = "com.dropbox.componentbox.discovery" - -kotlin { - android() - js { - browser() - binaries.executable() - } - jvm() - - sourceSets { - val commonMain by getting { - dependencies { - implementation(Deps.Kotlinx.serializationCore) - implementation(Deps.Kotlinx.serializationJson) - implementation(Deps.Cash.Zipline.zipline) - implementation(project(":componentbox")) - } - } - - val jsMain by getting - - val jvmMain by getting { - dependencies { - with(Deps.Cash) { - implementation(okhttp) - } - } - } - - val androidMain by getting { - dependencies { - dependsOn(jvmMain) - with(Deps.Kotlinx) { - implementation(coroutinesAndroid) - implementation(serializationCore) - } - with(Deps.AndroidX) { - implementation(coreKtx) - implementation(appCompat) - } - } - } - } -} - -android { - compileSdkVersion(Version.androidCompileSdk) - compileSdk = Version.androidCompileSdk -} - -rootProject.plugins.withType(org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin::class.java) { - rootProject.the().versions.webpackCli.version = - "4.9.0" -} \ No newline at end of file diff --git a/samples/discovery/common/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/Strings.kt b/samples/discovery/common/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/Strings.kt deleted file mode 100644 index 57a40042..00000000 --- a/samples/discovery/common/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/Strings.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import com.dropbox.componentbox.discovery.R -import com.dropbox.componentbox.foundation.RealStringRes -import com.dropbox.componentbox.foundation.StringRes - -actual object Strings { - actual val home_tab: StringRes = RealStringRes(R.string.home_tab) - actual val files_tab: StringRes = RealStringRes(R.string.files_tab) - actual val photos_tab: StringRes = RealStringRes(R.string.photos_tab) - actual val plans_tab: StringRes = RealStringRes(R.string.plans_tab) - actual val account_tab: StringRes = RealStringRes(R.string.account_tab) -} \ No newline at end of file diff --git a/samples/discovery/common/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/action.kt b/samples/discovery/common/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/action.kt deleted file mode 100644 index 91ff4a7e..00000000 --- a/samples/discovery/common/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/action.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -actual fun DiscoveryAction.action(): () -> Unit { - return when (this) { - is DiscoveryAction.Dismiss.DismissPurchaseFlowUpsell -> {{}} - is DiscoveryAction.Navigate.FeatureDiscovery -> {{}} - is DiscoveryAction.Nothing.Void -> {{}} - is DiscoveryAction.Purchase.InitPurchaseFlow -> {{}} - } -} \ No newline at end of file diff --git a/samples/discovery/common/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/DiscoveryAction.kt b/samples/discovery/common/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/DiscoveryAction.kt deleted file mode 100644 index be86a944..00000000 --- a/samples/discovery/common/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/DiscoveryAction.kt +++ /dev/null @@ -1,53 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import kotlinx.serialization.Serializable - -@Serializable -sealed class DiscoveryAction { - interface Required { - val id: DiscoveryActionId - } - - @Serializable - sealed class Navigate : Required, DiscoveryAction() { - @Serializable - class FeatureDiscovery : Navigate() { - override val id = DiscoveryActionId.NavigateFeatureDiscovery - } - } - - @Serializable - sealed class Purchase : Required, DiscoveryAction() { - @Serializable - class InitPurchaseFlow : Purchase() { - override val id = DiscoveryActionId.InitPurchaseFlow - } - } - - @Serializable - sealed class Dismiss : Required, DiscoveryAction() { - @Serializable - class DismissPurchaseFlowUpsell : Dismiss() { - override val id = DiscoveryActionId.DismissPurchaseFlowUpsell - } - } - - @Serializable - sealed class Nothing : Required, DiscoveryAction() { - @Serializable - class Void : Nothing() { - override val id = DiscoveryActionId.Nothing - } - } -} - -fun DiscoveryActionId.action(): DiscoveryAction { - return when (this) { - DiscoveryActionId.DismissPurchaseFlowUpsell -> DiscoveryAction.Dismiss.DismissPurchaseFlowUpsell() - DiscoveryActionId.InitPurchaseFlow -> DiscoveryAction.Purchase.InitPurchaseFlow() - DiscoveryActionId.NavigateFeatureDiscovery -> DiscoveryAction.Navigate.FeatureDiscovery() - DiscoveryActionId.Nothing -> DiscoveryAction.Nothing.Void() - } -} - -expect fun DiscoveryAction.action(): () -> Unit \ No newline at end of file diff --git a/samples/discovery/common/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/DiscoveryActionId.kt b/samples/discovery/common/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/DiscoveryActionId.kt deleted file mode 100644 index 085bddec..00000000 --- a/samples/discovery/common/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/DiscoveryActionId.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -enum class DiscoveryActionId { - DismissPurchaseFlowUpsell, - InitPurchaseFlow, - NavigateFeatureDiscovery, - Nothing -} - -fun String?.action(): DiscoveryActionId { - return when (this) { - DiscoveryActionId.DismissPurchaseFlowUpsell.name -> DiscoveryActionId.DismissPurchaseFlowUpsell - DiscoveryActionId.InitPurchaseFlow.name -> DiscoveryActionId.InitPurchaseFlow - DiscoveryActionId.NavigateFeatureDiscovery.name -> DiscoveryActionId.NavigateFeatureDiscovery - DiscoveryActionId.Nothing.name -> DiscoveryActionId.Nothing - else -> DiscoveryActionId.Nothing - } -} \ No newline at end of file diff --git a/samples/discovery/common/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/DiscoveryDestination.kt b/samples/discovery/common/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/DiscoveryDestination.kt deleted file mode 100644 index 73b61f5e..00000000 --- a/samples/discovery/common/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/DiscoveryDestination.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import com.dropbox.componentbox.foundation.Destination - -sealed class DiscoveryDestination : Destination() { - object Home : DiscoveryDestination() - object Photos : DiscoveryDestination() - object Plans : DiscoveryDestination() - object Account : DiscoveryDestination() -} \ No newline at end of file diff --git a/samples/discovery/common/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/Manager.kt b/samples/discovery/common/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/Manager.kt deleted file mode 100644 index 75062f8a..00000000 --- a/samples/discovery/common/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/Manager.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import app.cash.zipline.ZiplineService - -interface Manager : ZiplineService { - fun handleAction(action: DiscoveryAction) -} \ No newline at end of file diff --git a/samples/discovery/common/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/string.kt b/samples/discovery/common/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/string.kt deleted file mode 100644 index c5eb65a9..00000000 --- a/samples/discovery/common/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/string.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import com.dropbox.componentbox.foundation.StringRes - -expect object Strings { - val home_tab: StringRes - val files_tab: StringRes - val photos_tab: StringRes - val plans_tab: StringRes - val account_tab: StringRes -} \ No newline at end of file diff --git a/samples/discovery/common/src/jsMain/kotlin/com/dropbox/componentbox/samples/discovery/Strings.kt b/samples/discovery/common/src/jsMain/kotlin/com/dropbox/componentbox/samples/discovery/Strings.kt deleted file mode 100644 index ab2a0753..00000000 --- a/samples/discovery/common/src/jsMain/kotlin/com/dropbox/componentbox/samples/discovery/Strings.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import com.dropbox.componentbox.foundation.StringRes - -actual object Strings { - actual val home_tab: StringRes - get() = TODO("Not yet implemented") - actual val files_tab: StringRes - get() = TODO("Not yet implemented") - actual val photos_tab: StringRes - get() = TODO("Not yet implemented") - actual val plans_tab: StringRes - get() = TODO("Not yet implemented") - actual val account_tab: StringRes - get() = TODO("Not yet implemented") -} \ No newline at end of file diff --git a/samples/discovery/common/src/jsMain/kotlin/com/dropbox/componentbox/samples/discovery/action.kt b/samples/discovery/common/src/jsMain/kotlin/com/dropbox/componentbox/samples/discovery/action.kt deleted file mode 100644 index df47aa46..00000000 --- a/samples/discovery/common/src/jsMain/kotlin/com/dropbox/componentbox/samples/discovery/action.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -actual fun DiscoveryAction.action(): () -> Unit { - return {} -} \ No newline at end of file diff --git a/samples/discovery/common/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/Strings.kt b/samples/discovery/common/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/Strings.kt deleted file mode 100644 index ab2a0753..00000000 --- a/samples/discovery/common/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/Strings.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import com.dropbox.componentbox.foundation.StringRes - -actual object Strings { - actual val home_tab: StringRes - get() = TODO("Not yet implemented") - actual val files_tab: StringRes - get() = TODO("Not yet implemented") - actual val photos_tab: StringRes - get() = TODO("Not yet implemented") - actual val plans_tab: StringRes - get() = TODO("Not yet implemented") - actual val account_tab: StringRes - get() = TODO("Not yet implemented") -} \ No newline at end of file diff --git a/samples/discovery/common/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/action.kt b/samples/discovery/common/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/action.kt deleted file mode 100644 index 8f80d1b8..00000000 --- a/samples/discovery/common/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/action.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -actual fun DiscoveryAction.action(): () -> Unit = {} \ No newline at end of file diff --git a/samples/discovery/common/src/main/AndroidManifest.xml b/samples/discovery/common/src/main/AndroidManifest.xml deleted file mode 100644 index 49cca9b4..00000000 --- a/samples/discovery/common/src/main/AndroidManifest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/samples/discovery/common/src/main/res/values/strings.xml b/samples/discovery/common/src/main/res/values/strings.xml deleted file mode 100644 index dff6edbc..00000000 --- a/samples/discovery/common/src/main/res/values/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - Home - Files - Photos - Plans - Account - \ No newline at end of file diff --git a/samples/discovery/common/webpack.config.d/devserver.js b/samples/discovery/common/webpack.config.d/devserver.js deleted file mode 100644 index 978c82ff..00000000 --- a/samples/discovery/common/webpack.config.d/devserver.js +++ /dev/null @@ -1,15 +0,0 @@ -if (config.devServer) { - // Accept calls from any device. Typically this is a phone on the same WiFi network. - config.devServer.host = "0.0.0.0"; - - // Don't inject served JavaScript with live reloading features. - config.devServer.liveReload = false; - config.devServer.hot = false; - config.devServer.client = false; - - // Don't open Chrome. - delete config.devServer.open; - - // Serve .zipline files. - config.devServer.static.push('../build/zipline'); -} \ No newline at end of file diff --git a/samples/discovery/components/build.gradle.kts b/samples/discovery/components/build.gradle.kts deleted file mode 100644 index f65bbc2c..00000000 --- a/samples/discovery/components/build.gradle.kts +++ /dev/null @@ -1,36 +0,0 @@ -plugins { - kotlin("multiplatform") - kotlin("plugin.serialization") - id("com.android.library") - id("org.jetbrains.compose") version Version.composeMultiplatform -} - -group = "com.dropbox.componentbox.discovery" - -kotlin { - android() - jvm() - - sourceSets { - val commonMain by getting { - dependencies { - implementation(compose.runtime) - implementation(compose.ui) - implementation(compose.foundation) - implementation(compose.preview) - implementation(compose.material) - implementation(Deps.Compose.uiGraphics) - implementation(Deps.Compose.ui) - - implementation(project(":componentbox")) - implementation(project(":util")) - api(project(":samples:discovery:common")) - api(project(":samples:discovery:theme")) - } - } - } -} - -android { - compileSdkVersion(Version.androidCompileSdk) -} \ No newline at end of file diff --git a/samples/discovery/components/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/RealInflater.kt b/samples/discovery/components/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/RealInflater.kt deleted file mode 100644 index db7f5e05..00000000 --- a/samples/discovery/components/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/RealInflater.kt +++ /dev/null @@ -1,46 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Inflater -import com.dropbox.componentbox.foundation.BottomTab -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.samples.discovery.vector.DiscoveryIcons - -actual class RealInflater : Inflater { - @Composable - override fun Inflate(component: Component) { - component.Inflate() - } - - @Composable - override fun bottomTabs(): List { - val discoveryIcons = DiscoveryIcons() - - return listOf( - BottomTab( - id = DiscoveryDestination.Home, - iconSelected = discoveryIcons.home.fill ?: discoveryIcons.home.line, - iconNotSelected = discoveryIcons.home.line, - title = Strings.home_tab - ), - BottomTab( - id = DiscoveryDestination.Photos, - iconSelected = discoveryIcons.image.fill ?: discoveryIcons.image.line, - iconNotSelected = discoveryIcons.image.line, - title = Strings.photos_tab - ), - BottomTab( - id = DiscoveryDestination.Plans, - iconSelected = discoveryIcons.upgrade.fill ?: discoveryIcons.upgrade.line, - iconNotSelected = discoveryIcons.upgrade.line, - title = Strings.plans_tab - ), - BottomTab( - id = DiscoveryDestination.Account, - iconSelected = discoveryIcons.person.fill ?: discoveryIcons.person.line, - iconNotSelected = discoveryIcons.person.line, - title = Strings.account_tab - ) - ) - } -} \ No newline at end of file diff --git a/samples/discovery/components/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/inflate.kt b/samples/discovery/components/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/inflate.kt deleted file mode 100644 index ec9a6dd5..00000000 --- a/samples/discovery/components/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/inflate.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.drawable - -import androidx.compose.foundation.Image -import androidx.compose.runtime.Composable -import androidx.compose.ui.res.painterResource -import com.dropbox.componentbox.foundation.Component - -@Composable -actual fun Component.Drawable.Inflate() { - Image( - painter = painterResource(this.name.imageRes().resId), - contentDescription = null - ) -} diff --git a/samples/discovery/components/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/inflate.kt b/samples/discovery/components/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/inflate.kt deleted file mode 100644 index 35e95b03..00000000 --- a/samples/discovery/components/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/inflate.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.samples.discovery.box.Inflate -import com.dropbox.componentbox.samples.discovery.button.Inflate -import com.dropbox.componentbox.samples.discovery.column.Inflate -import com.dropbox.componentbox.samples.discovery.drawable.Inflate -import com.dropbox.componentbox.samples.discovery.row.Inflate -import com.dropbox.componentbox.samples.discovery.switch.Inflate -import com.dropbox.componentbox.samples.discovery.text.Inflate -import com.dropbox.componentbox.samples.discovery.vector.Inflate - -@Composable -actual fun Component.Inflate() { - when (this) { - is Component.Box -> this.Inflate() - is Component.Button -> this.Inflate() - is Component.Column -> this.Inflate() - is Component.Drawable -> this.Inflate() - is Component.Row -> this.Inflate() - is Component.Switch -> this.Inflate() - is Component.Text -> this.Inflate() - is Component.Vector -> this.Inflate() - } -} \ No newline at end of file diff --git a/samples/discovery/components/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/text/Inflate.kt b/samples/discovery/components/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/text/Inflate.kt deleted file mode 100644 index ec5f2984..00000000 --- a/samples/discovery/components/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/text/Inflate.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.text - -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.samples.discovery.color.standardText -import com.dropbox.componentbox.samples.discovery.type.textStyle -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.util.compose - -@Composable -actual fun Component.Text.Inflate() { - Text( - text = this.text.toString(), - style = this.textStyle.textStyle().textStyle(), - modifier = this.modifier.build(), - color = this.color.compose() ?: this.modifier?.background.compose() ?: MaterialTheme.colors.standardText - ) -} \ No newline at end of file diff --git a/samples/discovery/components/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/inflate.kt b/samples/discovery/components/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/inflate.kt deleted file mode 100644 index 0b3ab427..00000000 --- a/samples/discovery/components/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/inflate.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.vector - -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.res.painterResource -import com.dropbox.componentbox.util.compose -import com.dropbox.componentbox.foundation.Component - -@Composable -actual fun Component.Vector.Inflate() { - Icon( - painter = painterResource(this.name.iconRes().resId), - contentDescription = null, - tint = this.color.compose() ?: this.modifier?.background.compose() ?: MaterialTheme.colors.onBackground - ) -} diff --git a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/RealInflater.kt b/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/RealInflater.kt deleted file mode 100644 index f7aca363..00000000 --- a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/RealInflater.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import com.dropbox.componentbox.foundation.Inflater - -expect class RealInflater : Inflater \ No newline at end of file diff --git a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/box/inflate.kt b/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/box/inflate.kt deleted file mode 100644 index ab096964..00000000 --- a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/box/inflate.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.box - -import androidx.compose.foundation.layout.Box -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.samples.discovery.Inflate - -@Composable -fun Component.Box.Inflate() { - val components = this.components - Box(modifier = this.modifier.build()) { - components?.forEach { component -> - component.Inflate() - } - } -} \ No newline at end of file diff --git a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/button/ButtonVariant.kt b/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/button/ButtonVariant.kt deleted file mode 100644 index 28a01432..00000000 --- a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/button/ButtonVariant.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.button - -enum class ButtonVariant { - Contained, - Text, - Outlined, - Icon -} - -fun String?.buttonVariant(): ButtonVariant { - return when (this) { - ButtonVariant.Contained.name -> ButtonVariant.Contained - ButtonVariant.Text.name -> ButtonVariant.Text - ButtonVariant.Outlined.name -> ButtonVariant.Outlined - ButtonVariant.Icon.name -> ButtonVariant.Icon - else -> ButtonVariant.Contained - } -} \ No newline at end of file diff --git a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/button/contained.kt b/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/button/contained.kt deleted file mode 100644 index 1cdb2271..00000000 --- a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/button/contained.kt +++ /dev/null @@ -1,28 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.button - -import androidx.compose.material.Button -import androidx.compose.material.ButtonDefaults -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.RectangleShape -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.util.compose -import com.dropbox.componentbox.samples.discovery.Inflate -import com.dropbox.componentbox.samples.discovery.action - -@Composable -fun contained(button: Component.Button) { - Button( - modifier = button.modifier.build(), - shape = RectangleShape, - colors = ButtonDefaults.buttonColors( - backgroundColor = button.modifier?.background.compose() ?: MaterialTheme.colors.primary, - ), - onClick = button.action.action().action().action() - ) { - button.components?.forEach { component -> - component.Inflate() - } - } -} \ No newline at end of file diff --git a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/button/inflate.kt b/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/button/inflate.kt deleted file mode 100644 index 51c87eeb..00000000 --- a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/button/inflate.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.button - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Component - -@Composable -fun Component.Button.Inflate() { - when (this.variant.buttonVariant()) { - else -> contained(this) - } -} diff --git a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/column/inflate.kt b/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/column/inflate.kt deleted file mode 100644 index 5607926a..00000000 --- a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/column/inflate.kt +++ /dev/null @@ -1,68 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.column - -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.foundation.lazy.items -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.util.compose -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.util.horizontal -import com.dropbox.componentbox.samples.discovery.Inflate -import com.dropbox.componentbox.util.vertical - -@Composable -fun Component.Column.Inflate() { - when (this.isLazy) { - true -> this.LazyColumn() - else -> this.Column() - } -} - -@Composable -fun Component.Column.Column() { - val components = components - - val backgroundColor = modifier?.background.compose() - val customModifiers = if (backgroundColor != null) { - listOf(Modifier.background(backgroundColor)) - } else { - listOf() - } - - Column( - verticalArrangement = verticalArrangement.vertical(), - horizontalAlignment = horizontalAlignment.horizontal(), - modifier = modifier.build(customModifiers) - ) { - components?.forEach { component -> - component.Inflate() - } - } -} - -@Composable -fun Component.Column.LazyColumn() { - val components = components - - val backgroundColor = modifier?.background.compose() - val customModifiers = if (backgroundColor != null) { - listOf(Modifier.background(backgroundColor)) - } else { - listOf() - } - - LazyColumn( - verticalArrangement = verticalArrangement.vertical(), - horizontalAlignment = horizontalAlignment.horizontal(), - modifier = modifier.build(customModifiers) - ) { - if (components != null) { - items(components) { component -> - component.Inflate() - } - } - } -} \ No newline at end of file diff --git a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/inflate.kt b/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/inflate.kt deleted file mode 100644 index 6a7b7818..00000000 --- a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/inflate.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.drawable - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Component - -@Composable -expect fun Component.Drawable.Inflate() \ No newline at end of file diff --git a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/inflate.kt b/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/inflate.kt deleted file mode 100644 index af16d80d..00000000 --- a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/inflate.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Component - -@Composable -expect fun Component.Inflate() \ No newline at end of file diff --git a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/row/inflate.kt b/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/row/inflate.kt deleted file mode 100644 index 64d48584..00000000 --- a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/row/inflate.kt +++ /dev/null @@ -1,49 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.row - -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.lazy.LazyRow -import androidx.compose.foundation.lazy.items -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.util.horizontal -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.samples.discovery.Inflate -import com.dropbox.componentbox.util.vertical - -@Composable -fun Component.Row.Inflate() { - when (this.isLazy) { - true -> this.LazyRow() - else -> this.Row() - } -} - -@Composable -fun Component.Row.Row() { - val components = this.components - Row( - verticalAlignment = verticalAlignment.vertical(), - horizontalArrangement = horizontalArrangement.horizontal(), - modifier = modifier.build() - ) { - components?.forEach { component -> - component.Inflate() - } - } -} - -@Composable -fun Component.Row.LazyRow() { - val components = this.components - LazyRow( - verticalAlignment = verticalAlignment.vertical(), - horizontalArrangement = horizontalArrangement.horizontal(), - modifier = modifier.build() - ) { - if (components != null) { - items(components) { component -> - component.Inflate() - } - } - } -} diff --git a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/surface/Inflate.kt b/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/surface/Inflate.kt deleted file mode 100644 index 56d10aa3..00000000 --- a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/surface/Inflate.kt +++ /dev/null @@ -1,43 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.surface - -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.samples.discovery.Inflate -import com.dropbox.componentbox.util.translate - -@Composable -fun Component.Surface.Inflate() { - val isDark = !MaterialTheme.colors.isLight - - val color = if (this.color?.dark != null && this.color?.light != null) { - if (isDark) Color(this.color!!.dark) else Color(this.color!!.light) - } else { - MaterialTheme.colors.surface - } - - val contentColor = if (this.contentColor?.dark != null && this.contentColor?.light != null) { - if (isDark) Color(this.contentColor!!.dark) else Color(this.contentColor!!.light) - } else { - MaterialTheme.colors.onSurface - } - - val shape = this.shape.translate() - val elevation = this.elevation?.dp ?: 0.dp - - Surface( - modifier = modifier.build(), - shape = shape, - color = color, - contentColor = contentColor, - elevation = elevation - ) { - components?.forEach { component -> - component.Inflate() - } - } -} \ No newline at end of file diff --git a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/switch/inflate.kt b/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/switch/inflate.kt deleted file mode 100644 index f876bea2..00000000 --- a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/switch/inflate.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.switch - -import androidx.compose.material.Switch -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.samples.discovery.action - -@Composable -fun Component.Switch.Inflate() { - Switch( - checked = this.isChecked == true, - onCheckedChange = { this.action.action().action().action() }, - modifier = this.modifier.build() - ) -} diff --git a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/text/inflate.kt b/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/text/inflate.kt deleted file mode 100644 index 30177b70..00000000 --- a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/text/inflate.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.text - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Component - -@Composable -expect fun Component.Text.Inflate() diff --git a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/inflate.kt b/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/inflate.kt deleted file mode 100644 index 5e3fedd6..00000000 --- a/samples/discovery/components/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/inflate.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.vector - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Component - -@Composable -expect fun Component.Vector.Inflate() \ No newline at end of file diff --git a/samples/discovery/components/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/RealInflater.kt b/samples/discovery/components/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/RealInflater.kt deleted file mode 100644 index 39a16000..00000000 --- a/samples/discovery/components/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/RealInflater.kt +++ /dev/null @@ -1,46 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Inflater -import com.dropbox.componentbox.foundation.BottomTab -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.samples.discovery.vector.DiscoveryIcons - -actual class RealInflater : Inflater { - @Composable - override fun Inflate(component: Component) { - component.Inflate() - } - - @Composable - override fun bottomTabs(): List { - val discoveryIcons = DiscoveryIcons() - - return listOf( - BottomTab( - id = DiscoveryDestination.Home, - title = Strings.home_tab, - iconSelected = discoveryIcons.twinkle2.fill ?: discoveryIcons.twinkle2.line, - iconNotSelected = discoveryIcons.twinkle2.line - ), - BottomTab( - id = DiscoveryDestination.Photos, - title = Strings.photos_tab, - iconSelected = discoveryIcons.twinkle2.fill ?: discoveryIcons.twinkle2.line, - iconNotSelected = discoveryIcons.twinkle2.line, - ), - BottomTab( - id = DiscoveryDestination.Plans, - title = Strings.plans_tab, - iconSelected = discoveryIcons.twinkle2.fill ?: discoveryIcons.twinkle2.line, - iconNotSelected = discoveryIcons.twinkle2.line, - ), - BottomTab( - id = DiscoveryDestination.Account, - title = Strings.account_tab, - iconSelected = discoveryIcons.twinkle2.fill ?: discoveryIcons.twinkle2.line, - iconNotSelected = discoveryIcons.twinkle2.line, - ), - ) - } -} \ No newline at end of file diff --git a/samples/discovery/components/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/inflate.kt b/samples/discovery/components/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/inflate.kt deleted file mode 100644 index 44ddbff8..00000000 --- a/samples/discovery/components/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/inflate.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.drawable - -import androidx.compose.foundation.Image -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.res.painterResource -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.foundation.Component - -@Composable -actual fun Component.Drawable.Inflate() { - val resourcePath = if (MaterialTheme.colors.isLight) name.image().light.resPath else name.image().dark.resPath - Image(painter = painterResource(resourcePath), null, modifier = modifier.build()) -} \ No newline at end of file diff --git a/samples/discovery/components/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/inflate.kt b/samples/discovery/components/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/inflate.kt deleted file mode 100644 index 98a70a43..00000000 --- a/samples/discovery/components/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/inflate.kt +++ /dev/null @@ -1,28 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.samples.discovery.box.Inflate -import com.dropbox.componentbox.samples.discovery.button.Inflate -import com.dropbox.componentbox.samples.discovery.column.Inflate -import com.dropbox.componentbox.samples.discovery.drawable.Inflate -import com.dropbox.componentbox.samples.discovery.row.Inflate -import com.dropbox.componentbox.samples.discovery.surface.Inflate -import com.dropbox.componentbox.samples.discovery.switch.Inflate -import com.dropbox.componentbox.samples.discovery.text.Inflate -import com.dropbox.componentbox.samples.discovery.vector.Inflate - -@Composable -actual fun Component.Inflate() { - when (this) { - is Component.Box -> this.Inflate() - is Component.Button -> this.Inflate() - is Component.Column -> this.Inflate() - is Component.Drawable -> this.Inflate() - is Component.Row -> this.Inflate() - is Component.Switch -> this.Inflate() - is Component.Text -> this.Inflate() - is Component.Vector -> this.Inflate() - is Component.Surface -> this.Inflate() - } -} \ No newline at end of file diff --git a/samples/discovery/components/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/text/Inflate.kt b/samples/discovery/components/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/text/Inflate.kt deleted file mode 100644 index 2e4b4db7..00000000 --- a/samples/discovery/components/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/text/Inflate.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.text - -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.samples.discovery.color.standardText -import com.dropbox.componentbox.samples.discovery.type.textStyle -import com.dropbox.componentbox.util.compose - -@Composable -actual fun Component.Text.Inflate() { - Text( - text = this.text.toString(), - style = this.textStyle.textStyle().textStyle(), - modifier = this.modifier.build(), - color = this.color.compose() ?: MaterialTheme.colors.standardText - ) -} \ No newline at end of file diff --git a/samples/discovery/components/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/inflate.kt b/samples/discovery/components/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/inflate.kt deleted file mode 100644 index 4e16b61e..00000000 --- a/samples/discovery/components/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/inflate.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.vector - -import androidx.compose.material.Icon -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.res.painterResource -import com.dropbox.componentbox.foundation.Component -import com.dropbox.componentbox.util.build -import com.dropbox.componentbox.util.compose - -@Composable -actual fun Component.Vector.Inflate() { - val resourcePath = name.iconRes().resPath - Icon( - painter = painterResource(resourcePath), - null, - modifier = modifier.build(), - tint = modifier?.background.compose() ?: MaterialTheme.colors.onBackground - ) -} \ No newline at end of file diff --git a/samples/discovery/components/src/main/AndroidManifest.xml b/samples/discovery/components/src/main/AndroidManifest.xml deleted file mode 100644 index eae8bc3c..00000000 --- a/samples/discovery/components/src/main/AndroidManifest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/samples/discovery/desktop/build.gradle.kts b/samples/discovery/desktop/build.gradle.kts deleted file mode 100644 index 8b8b5a3c..00000000 --- a/samples/discovery/desktop/build.gradle.kts +++ /dev/null @@ -1,58 +0,0 @@ -import org.jetbrains.compose.compose -import org.jetbrains.compose.desktop.application.dsl.TargetFormat - -plugins { - kotlin("multiplatform") - id("org.jetbrains.compose") version Version.composeMultiplatform - kotlin("plugin.serialization") -} - -group = "com.dropbox.componentbox.discovery" - -kotlin { - jvm { - compilations.all { - kotlinOptions.jvmTarget = "11" - } - withJava() - } - sourceSets { - val commonMain by getting { - dependencies { - implementation(project(":componentbox")) - implementation(project(":util")) - api(project(":samples:discovery:theme")) - implementation(project(":samples:discovery:components")) - } - } - - val jvmMain by getting { - dependencies { - api(project(":desktop")) - api(compose.desktop.currentOs) - api(compose.preview) - } - } - } -} - -compose.desktop { - application { - mainClass = "Main" - nativeDistributions { - targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) - packageName = "jvm" - packageVersion = "1.0.0" - } - } -} - -tasks.withType().configureEach { - kotlinOptions { - freeCompilerArgs = listOf("-Xno-optimized-callable-references") - } -} - -tasks.withType(JavaCompile::class.java).all { - options.compilerArgs.add("-Xno-optimized-callable-references") -} \ No newline at end of file diff --git a/samples/discovery/desktop/src/jvmMain/kotlin/Main.kt b/samples/discovery/desktop/src/jvmMain/kotlin/Main.kt deleted file mode 100644 index 5081662c..00000000 --- a/samples/discovery/desktop/src/jvmMain/kotlin/Main.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.dropbox.componentbox.discovery.desktop - -import androidx.compose.ui.window.Window -import androidx.compose.ui.window.application -import app -import com.dropbox.componentbox.samples.discovery.RealInflater -import com.dropbox.componentbox.samples.discovery.RealResourceProvider -import com.dropbox.componentbox.samples.discovery.RealThemer - -fun main() = application { - Window(onCloseRequest = ::exitApplication, title = "Discovery") { - app(RealInflater(), RealThemer(), RealResourceProvider()) - } -} \ No newline at end of file diff --git a/samples/discovery/ios/Podfile b/samples/discovery/ios/Podfile deleted file mode 100644 index 3b64009e..00000000 --- a/samples/discovery/ios/Podfile +++ /dev/null @@ -1,3 +0,0 @@ -target 'ios' do - pod 'componentbox', :path => '../../../componentbox' -end \ No newline at end of file diff --git a/samples/discovery/ios/ios.xcodeproj/project.pbxproj b/samples/discovery/ios/ios.xcodeproj/project.pbxproj deleted file mode 100644 index ded01e13..00000000 --- a/samples/discovery/ios/ios.xcodeproj/project.pbxproj +++ /dev/null @@ -1,819 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 52; - objects = { - -/* Begin PBXBuildFile section */ - 330711CA0C41B2223CA5388E /* color.swift in Sources */ = {isa = PBXBuildFile; fileRef = 330713464ED0DCE6E6133003 /* color.swift */; }; - 330713C483CD34503563A155 /* FilesScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33071B0076B2646701D871A4 /* FilesScreen.swift */; }; - 330713FB089A1390000E9315 /* DiscoveryApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33071FD0F45C1302364055B5 /* DiscoveryApp.swift */; }; - 330716033243182DE88F151F /* Scaffold.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3307171BAE8B3F9780CF6A26 /* Scaffold.swift */; }; - 3307172787A93E2EC9271942 /* PlansScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33071DE52D3A72CF8E3803F4 /* PlansScreen.swift */; }; - 33071932281A6A16230C3841 /* HomeScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33071ECAFCCA78581373E7B2 /* HomeScreen.swift */; }; - 33071DF31FDF10941C1EA2A2 /* AccountScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33071206F5D3CBC31B9A9765 /* AccountScreen.swift */; }; - 33071ED5854FEB12779EB378 /* PhotosScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33071576A17B16DDA1042633 /* PhotosScreen.swift */; }; - 6677D6A927F0ECEE003A69D2 /* ComponentBox in Frameworks */ = {isa = PBXBuildFile; productRef = 6677D6A827F0ECEE003A69D2 /* ComponentBox */; }; - 6677D6AB27F1245E003A69D2 /* ComponentBoxUI in Frameworks */ = {isa = PBXBuildFile; productRef = 6677D6AA27F1245E003A69D2 /* ComponentBoxUI */; }; - 66A6A28027E7AD3500F27257 /* KMPNativeCoroutinesAsync in Frameworks */ = {isa = PBXBuildFile; productRef = 66A6A27F27E7AD3500F27257 /* KMPNativeCoroutinesAsync */; }; - 66A6A28227E7AD3500F27257 /* KMPNativeCoroutinesCombine in Frameworks */ = {isa = PBXBuildFile; productRef = 66A6A28127E7AD3500F27257 /* KMPNativeCoroutinesCombine */; }; - 66A6A28427E7AD3500F27257 /* KMPNativeCoroutinesCore in Frameworks */ = {isa = PBXBuildFile; productRef = 66A6A28327E7AD3500F27257 /* KMPNativeCoroutinesCore */; }; - 66A6A28627E7AD3500F27257 /* KMPNativeCoroutinesRxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 66A6A28527E7AD3500F27257 /* KMPNativeCoroutinesRxSwift */; }; - 66A6A28827E7AD9600F27257 /* PlansScreenViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66A6A28727E7AD9600F27257 /* PlansScreenViewModel.swift */; }; - 7555FF85242A565B00829871 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7555FF84242A565B00829871 /* Assets.xcassets */; }; - 7555FF88242A565B00829871 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7555FF87242A565B00829871 /* Preview Assets.xcassets */; }; - 7555FF8B242A565B00829871 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7555FF89242A565B00829871 /* LaunchScreen.storyboard */; }; - 7555FF96242A565B00829871 /* iosTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FF95242A565B00829871 /* iosTests.swift */; }; - 7555FFA1242A565B00829871 /* iosUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7555FFA0242A565B00829871 /* iosUITests.swift */; }; - C95CD01127E547E200B0986F /* AtlasGroteskMedium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C95CD00F27E547E200B0986F /* AtlasGroteskMedium.ttf */; }; - C95CD01227E547E200B0986F /* SharpGroteskBook.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C95CD01027E547E200B0986F /* SharpGroteskBook.ttf */; }; - C95CD01427E5564300B0986F /* SharpGroteskMedium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C95CD01327E5564300B0986F /* SharpGroteskMedium.ttf */; }; - C95CD01627E5575800B0986F /* AtlasGroteskRegular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C95CD01527E5575800B0986F /* AtlasGroteskRegular.ttf */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 7555FF92242A565B00829871 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 7555FF73242A565900829871 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 7555FF7A242A565900829871; - remoteInfo = ios; - }; - 7555FF9D242A565B00829871 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 7555FF73242A565900829871 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 7555FF7A242A565900829871; - remoteInfo = ios; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 33071206F5D3CBC31B9A9765 /* AccountScreen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountScreen.swift; sourceTree = ""; }; - 330713464ED0DCE6E6133003 /* color.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = color.swift; sourceTree = ""; }; - 33071576A17B16DDA1042633 /* PhotosScreen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PhotosScreen.swift; sourceTree = ""; }; - 3307171BAE8B3F9780CF6A26 /* Scaffold.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Scaffold.swift; sourceTree = ""; }; - 33071B0076B2646701D871A4 /* FilesScreen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilesScreen.swift; sourceTree = ""; }; - 33071DE52D3A72CF8E3803F4 /* PlansScreen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlansScreen.swift; sourceTree = ""; }; - 33071ECAFCCA78581373E7B2 /* HomeScreen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeScreen.swift; sourceTree = ""; }; - 33071FD0F45C1302364055B5 /* DiscoveryApp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DiscoveryApp.swift; sourceTree = ""; }; - 6677D6A427F0E8D0003A69D2 /* ComponentBoxUI */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = ComponentBoxUI; sourceTree = ""; }; - 66A6A28727E7AD9600F27257 /* PlansScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlansScreenViewModel.swift; sourceTree = ""; }; - 7555FF7B242A565900829871 /* ios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ios.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 7555FF84242A565B00829871 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 7555FF87242A565B00829871 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - 7555FF8A242A565B00829871 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 7555FF8C242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 7555FF91242A565B00829871 /* iosTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iosTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 7555FF95242A565B00829871 /* iosTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosTests.swift; sourceTree = ""; }; - 7555FF97242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 7555FF9C242A565B00829871 /* iosUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = iosUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 7555FFA0242A565B00829871 /* iosUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosUITests.swift; sourceTree = ""; }; - 7555FFA2242A565B00829871 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - C95CD00F27E547E200B0986F /* AtlasGroteskMedium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = AtlasGroteskMedium.ttf; sourceTree = ""; }; - C95CD01027E547E200B0986F /* SharpGroteskBook.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = SharpGroteskBook.ttf; sourceTree = ""; }; - C95CD01327E5564300B0986F /* SharpGroteskMedium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = SharpGroteskMedium.ttf; sourceTree = ""; }; - C95CD01527E5575800B0986F /* AtlasGroteskRegular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = AtlasGroteskRegular.ttf; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 7555FF78242A565900829871 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6677D6A927F0ECEE003A69D2 /* ComponentBox in Frameworks */, - 66A6A28027E7AD3500F27257 /* KMPNativeCoroutinesAsync in Frameworks */, - 66A6A28227E7AD3500F27257 /* KMPNativeCoroutinesCombine in Frameworks */, - 66A6A28427E7AD3500F27257 /* KMPNativeCoroutinesCore in Frameworks */, - 6677D6AB27F1245E003A69D2 /* ComponentBoxUI in Frameworks */, - 66A6A28627E7AD3500F27257 /* KMPNativeCoroutinesRxSwift in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7555FF8E242A565B00829871 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7555FF99242A565B00829871 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 33071003ABD804162C92B6C1 /* files */ = { - isa = PBXGroup; - children = ( - 33071B0076B2646701D871A4 /* FilesScreen.swift */, - ); - path = files; - sourceTree = ""; - }; - 330711327315E23F11D441F7 /* util */ = { - isa = PBXGroup; - children = ( - 330713464ED0DCE6E6133003 /* color.swift */, - ); - path = util; - sourceTree = ""; - }; - 330713FB20911EC7D21CB7F5 /* home */ = { - isa = PBXGroup; - children = ( - 33071ECAFCCA78581373E7B2 /* HomeScreen.swift */, - ); - path = home; - sourceTree = ""; - }; - 330715E7FD921243761E9119 /* plans */ = { - isa = PBXGroup; - children = ( - 33071DE52D3A72CF8E3803F4 /* PlansScreen.swift */, - 66A6A28727E7AD9600F27257 /* PlansScreenViewModel.swift */, - ); - path = plans; - sourceTree = ""; - }; - 33071667D698C0E101D6A4A4 /* account */ = { - isa = PBXGroup; - children = ( - 33071206F5D3CBC31B9A9765 /* AccountScreen.swift */, - ); - path = account; - sourceTree = ""; - }; - 33071B7763BFF56C81D8ADF3 /* photos */ = { - isa = PBXGroup; - children = ( - 33071576A17B16DDA1042633 /* PhotosScreen.swift */, - ); - path = photos; - sourceTree = ""; - }; - 6677D69F27F0E7A5003A69D2 /* Packages */ = { - isa = PBXGroup; - children = ( - ); - name = Packages; - sourceTree = ""; - }; - 6677D6A127F0E845003A69D2 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; - 7555FF72242A565900829871 = { - isa = PBXGroup; - children = ( - 6677D69F27F0E7A5003A69D2 /* Packages */, - 7555FF7D242A565900829871 /* ios */, - 7555FF94242A565B00829871 /* iosTests */, - 7555FF9F242A565B00829871 /* iosUITests */, - 7555FF7C242A565900829871 /* Products */, - 6677D6A127F0E845003A69D2 /* Frameworks */, - ); - sourceTree = ""; - }; - 7555FF7C242A565900829871 /* Products */ = { - isa = PBXGroup; - children = ( - 7555FF7B242A565900829871 /* ios.app */, - 7555FF91242A565B00829871 /* iosTests.xctest */, - 7555FF9C242A565B00829871 /* iosUITests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 7555FF7D242A565900829871 /* ios */ = { - isa = PBXGroup; - children = ( - 6677D6A427F0E8D0003A69D2 /* ComponentBoxUI */, - 7555FF84242A565B00829871 /* Assets.xcassets */, - C95CD00E27E5463300B0986F /* Font */, - 7555FF86242A565B00829871 /* Preview Content */, - 7555FF89242A565B00829871 /* LaunchScreen.storyboard */, - 7555FF8C242A565B00829871 /* Info.plist */, - 33071FD0F45C1302364055B5 /* DiscoveryApp.swift */, - 3307171BAE8B3F9780CF6A26 /* Scaffold.swift */, - 330713FB20911EC7D21CB7F5 /* home */, - 33071667D698C0E101D6A4A4 /* account */, - 330715E7FD921243761E9119 /* plans */, - 33071003ABD804162C92B6C1 /* files */, - 33071B7763BFF56C81D8ADF3 /* photos */, - 330711327315E23F11D441F7 /* util */, - ); - path = ios; - sourceTree = ""; - }; - 7555FF86242A565B00829871 /* Preview Content */ = { - isa = PBXGroup; - children = ( - 7555FF87242A565B00829871 /* Preview Assets.xcassets */, - ); - path = "Preview Content"; - sourceTree = ""; - }; - 7555FF94242A565B00829871 /* iosTests */ = { - isa = PBXGroup; - children = ( - 7555FF95242A565B00829871 /* iosTests.swift */, - 7555FF97242A565B00829871 /* Info.plist */, - ); - path = iosTests; - sourceTree = ""; - }; - 7555FF9F242A565B00829871 /* iosUITests */ = { - isa = PBXGroup; - children = ( - 7555FFA0242A565B00829871 /* iosUITests.swift */, - 7555FFA2242A565B00829871 /* Info.plist */, - ); - path = iosUITests; - sourceTree = ""; - }; - C95CD00E27E5463300B0986F /* Font */ = { - isa = PBXGroup; - children = ( - C95CD01527E5575800B0986F /* AtlasGroteskRegular.ttf */, - C95CD01327E5564300B0986F /* SharpGroteskMedium.ttf */, - C95CD00F27E547E200B0986F /* AtlasGroteskMedium.ttf */, - C95CD01027E547E200B0986F /* SharpGroteskBook.ttf */, - ); - path = Font; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 7555FF7A242A565900829871 /* ios */ = { - isa = PBXNativeTarget; - buildConfigurationList = 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "ios" */; - buildPhases = ( - C95CD01727E6255100B0986F /* ShellScript */, - 7555FF77242A565900829871 /* Sources */, - 7555FF78242A565900829871 /* Frameworks */, - 7555FF79242A565900829871 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ios; - packageProductDependencies = ( - 66A6A27F27E7AD3500F27257 /* KMPNativeCoroutinesAsync */, - 66A6A28127E7AD3500F27257 /* KMPNativeCoroutinesCombine */, - 66A6A28327E7AD3500F27257 /* KMPNativeCoroutinesCore */, - 66A6A28527E7AD3500F27257 /* KMPNativeCoroutinesRxSwift */, - 6677D6A827F0ECEE003A69D2 /* ComponentBox */, - 6677D6AA27F1245E003A69D2 /* ComponentBoxUI */, - ); - productName = ios; - productReference = 7555FF7B242A565900829871 /* ios.app */; - productType = "com.apple.product-type.application"; - }; - 7555FF90242A565B00829871 /* iosTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 7555FFA8242A565B00829871 /* Build configuration list for PBXNativeTarget "iosTests" */; - buildPhases = ( - 7555FF8D242A565B00829871 /* Sources */, - 7555FF8E242A565B00829871 /* Frameworks */, - 7555FF8F242A565B00829871 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 7555FF93242A565B00829871 /* PBXTargetDependency */, - ); - name = iosTests; - productName = iosTests; - productReference = 7555FF91242A565B00829871 /* iosTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 7555FF9B242A565B00829871 /* iosUITests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 7555FFAB242A565B00829871 /* Build configuration list for PBXNativeTarget "iosUITests" */; - buildPhases = ( - 7555FF98242A565B00829871 /* Sources */, - 7555FF99242A565B00829871 /* Frameworks */, - 7555FF9A242A565B00829871 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 7555FF9E242A565B00829871 /* PBXTargetDependency */, - ); - name = iosUITests; - productName = iosUITests; - productReference = 7555FF9C242A565B00829871 /* iosUITests.xctest */; - productType = "com.apple.product-type.bundle.ui-testing"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 7555FF73242A565900829871 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1130; - LastUpgradeCheck = 1130; - ORGANIZATIONNAME = "Dropbox, Inc"; - TargetAttributes = { - 7555FF7A242A565900829871 = { - CreatedOnToolsVersion = 11.3.1; - }; - 7555FF90242A565B00829871 = { - CreatedOnToolsVersion = 11.3.1; - TestTargetID = 7555FF7A242A565900829871; - }; - 7555FF9B242A565B00829871 = { - CreatedOnToolsVersion = 11.3.1; - TestTargetID = 7555FF7A242A565900829871; - }; - }; - }; - buildConfigurationList = 7555FF76242A565900829871 /* Build configuration list for PBXProject "ios" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 7555FF72242A565900829871; - packageReferences = ( - 66A6A27E27E7AD3500F27257 /* XCRemoteSwiftPackageReference "KMP-NativeCoroutines" */, - 6677D6A727F0ECED003A69D2 /* XCRemoteSwiftPackageReference "ComponentBoxPackage" */, - ); - productRefGroup = 7555FF7C242A565900829871 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 7555FF7A242A565900829871 /* ios */, - 7555FF90242A565B00829871 /* iosTests */, - 7555FF9B242A565B00829871 /* iosUITests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 7555FF79242A565900829871 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C95CD01227E547E200B0986F /* SharpGroteskBook.ttf in Resources */, - C95CD01627E5575800B0986F /* AtlasGroteskRegular.ttf in Resources */, - 7555FF8B242A565B00829871 /* LaunchScreen.storyboard in Resources */, - 7555FF88242A565B00829871 /* Preview Assets.xcassets in Resources */, - C95CD01427E5564300B0986F /* SharpGroteskMedium.ttf in Resources */, - 7555FF85242A565B00829871 /* Assets.xcassets in Resources */, - C95CD01127E547E200B0986F /* AtlasGroteskMedium.ttf in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7555FF8F242A565B00829871 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7555FF9A242A565B00829871 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - C95CD01727E6255100B0986F /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd \"$SRCROOT/../../..\"\n./gradlew :componentbox:embedAndSignAppleFrameworkForXcode\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 7555FF77242A565900829871 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 330713FB089A1390000E9315 /* DiscoveryApp.swift in Sources */, - 330716033243182DE88F151F /* Scaffold.swift in Sources */, - 33071DF31FDF10941C1EA2A2 /* AccountScreen.swift in Sources */, - 330713C483CD34503563A155 /* FilesScreen.swift in Sources */, - 33071932281A6A16230C3841 /* HomeScreen.swift in Sources */, - 33071ED5854FEB12779EB378 /* PhotosScreen.swift in Sources */, - 66A6A28827E7AD9600F27257 /* PlansScreenViewModel.swift in Sources */, - 3307172787A93E2EC9271942 /* PlansScreen.swift in Sources */, - 330711CA0C41B2223CA5388E /* color.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7555FF8D242A565B00829871 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7555FF96242A565B00829871 /* iosTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7555FF98242A565B00829871 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7555FFA1242A565B00829871 /* iosUITests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 7555FF93242A565B00829871 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 7555FF7A242A565900829871 /* ios */; - targetProxy = 7555FF92242A565B00829871 /* PBXContainerItemProxy */; - }; - 7555FF9E242A565B00829871 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 7555FF7A242A565900829871 /* ios */; - targetProxy = 7555FF9D242A565B00829871 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 7555FF89242A565B00829871 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 7555FF8A242A565B00829871 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 7555FFA3242A565B00829871 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.2; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 7555FFA4242A565B00829871 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.2; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 7555FFA6242A565B00829871 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_ASSET_PATHS = "\"ios/Preview Content\""; - ENABLE_PREVIEWS = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../../componentbox/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; - INFOPLIST_FILE = ios/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = "0.1.0-alpha"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - componentbox, - ); - PRODUCT_BUNDLE_IDENTIFIER = com.dropbox.componentbox; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 7555FFA7242A565B00829871 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_ASSET_PATHS = "\"ios/Preview Content\""; - ENABLE_PREVIEWS = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../../componentbox/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; - INFOPLIST_FILE = ios/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = "0.1.0-alpha"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-framework", - componentbox, - ); - PRODUCT_BUNDLE_IDENTIFIER = com.dropbox.componentbox; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - 7555FFA9242A565B00829871 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = iosTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ios.app/ios"; - }; - name = Debug; - }; - 7555FFAA242A565B00829871 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = iosTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.2; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ios.app/ios"; - }; - name = Release; - }; - 7555FFAC242A565B00829871 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = iosUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = ios; - }; - name = Debug; - }; - 7555FFAD242A565B00829871 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = iosUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = orgIdentifier.iosUITests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_TARGET_NAME = ios; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 7555FF76242A565900829871 /* Build configuration list for PBXProject "ios" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7555FFA3242A565B00829871 /* Debug */, - 7555FFA4242A565B00829871 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 7555FFA5242A565B00829871 /* Build configuration list for PBXNativeTarget "ios" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7555FFA6242A565B00829871 /* Debug */, - 7555FFA7242A565B00829871 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 7555FFA8242A565B00829871 /* Build configuration list for PBXNativeTarget "iosTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7555FFA9242A565B00829871 /* Debug */, - 7555FFAA242A565B00829871 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 7555FFAB242A565B00829871 /* Build configuration list for PBXNativeTarget "iosUITests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 7555FFAC242A565B00829871 /* Debug */, - 7555FFAD242A565B00829871 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - -/* Begin XCRemoteSwiftPackageReference section */ - 6677D6A727F0ECED003A69D2 /* XCRemoteSwiftPackageReference "ComponentBoxPackage" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/matt-ramotar/ComponentBoxPackage.git"; - requirement = { - branch = master; - kind = branch; - }; - }; - 66A6A27E27E7AD3500F27257 /* XCRemoteSwiftPackageReference "KMP-NativeCoroutines" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/rickclephas/KMP-NativeCoroutines.git"; - requirement = { - branch = master; - kind = branch; - }; - }; -/* End XCRemoteSwiftPackageReference section */ - -/* Begin XCSwiftPackageProductDependency section */ - 6677D6A827F0ECEE003A69D2 /* ComponentBox */ = { - isa = XCSwiftPackageProductDependency; - package = 6677D6A727F0ECED003A69D2 /* XCRemoteSwiftPackageReference "ComponentBoxPackage" */; - productName = ComponentBox; - }; - 6677D6AA27F1245E003A69D2 /* ComponentBoxUI */ = { - isa = XCSwiftPackageProductDependency; - productName = ComponentBoxUI; - }; - 66A6A27F27E7AD3500F27257 /* KMPNativeCoroutinesAsync */ = { - isa = XCSwiftPackageProductDependency; - package = 66A6A27E27E7AD3500F27257 /* XCRemoteSwiftPackageReference "KMP-NativeCoroutines" */; - productName = KMPNativeCoroutinesAsync; - }; - 66A6A28127E7AD3500F27257 /* KMPNativeCoroutinesCombine */ = { - isa = XCSwiftPackageProductDependency; - package = 66A6A27E27E7AD3500F27257 /* XCRemoteSwiftPackageReference "KMP-NativeCoroutines" */; - productName = KMPNativeCoroutinesCombine; - }; - 66A6A28327E7AD3500F27257 /* KMPNativeCoroutinesCore */ = { - isa = XCSwiftPackageProductDependency; - package = 66A6A27E27E7AD3500F27257 /* XCRemoteSwiftPackageReference "KMP-NativeCoroutines" */; - productName = KMPNativeCoroutinesCore; - }; - 66A6A28527E7AD3500F27257 /* KMPNativeCoroutinesRxSwift */ = { - isa = XCSwiftPackageProductDependency; - package = 66A6A27E27E7AD3500F27257 /* XCRemoteSwiftPackageReference "KMP-NativeCoroutines" */; - productName = KMPNativeCoroutinesRxSwift; - }; -/* End XCSwiftPackageProductDependency section */ - }; - rootObject = 7555FF73242A565900829871 /* Project object */; -} diff --git a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6..00000000 --- a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c5..00000000 --- a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 73e35a06..00000000 --- a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,32 +0,0 @@ -{ - "pins" : [ - { - "identity" : "componentboxpackage", - "kind" : "remoteSourceControl", - "location" : "https://github.com/matt-ramotar/ComponentBoxPackage.git", - "state" : { - "branch" : "master", - "revision" : "567fd919c0c222b7187bd17090ba142e0595f60b" - } - }, - { - "identity" : "kmp-nativecoroutines", - "kind" : "remoteSourceControl", - "location" : "https://github.com/rickclephas/KMP-NativeCoroutines.git", - "state" : { - "branch" : "master", - "revision" : "c6b134ab947a97a212b18d1a80b26bcef013511e" - } - }, - { - "identity" : "rxswift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/ReactiveX/RxSwift.git", - "state" : { - "revision" : "b4307ba0b6425c0ba4178e138799946c3da594f8", - "version" : "6.5.0" - } - } - ], - "version" : 2 -} diff --git a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/matt.xcuserdatad/UserInterfaceState.xcuserstate b/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/matt.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index e428142c..00000000 Binary files a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/matt.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/matt.xcuserdatad/xcschemes/xcschememanagement.plist b/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/matt.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index ee3458dd..00000000 --- a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/matt.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/mramotar.xcuserdatad/UserInterfaceState.xcuserstate b/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/mramotar.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index cc733e50..00000000 Binary files a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/mramotar.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/mramotar.xcuserdatad/WorkspaceSettings.xcsettings b/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/mramotar.xcuserdatad/WorkspaceSettings.xcsettings deleted file mode 100644 index 379adbed..00000000 --- a/samples/discovery/ios/ios.xcodeproj/project.xcworkspace/xcuserdata/mramotar.xcuserdatad/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,18 +0,0 @@ - - - - - BuildLocationStyle - UseAppPreferences - CustomBuildLocationType - RelativeToDerivedData - DerivedDataLocationStyle - Default - IssueFilterStyle - ShowActiveSchemeOnly - LiveSourceIssuesEnabled - - ShowSharedSchemesAutomaticallyEnabled - - - diff --git a/samples/discovery/ios/ios.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/ios.xcscheme b/samples/discovery/ios/ios.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/ios.xcscheme deleted file mode 100644 index b60f85c3..00000000 --- a/samples/discovery/ios/ios.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/ios.xcscheme +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/samples/discovery/ios/ios.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/xcschememanagement.plist b/samples/discovery/ios/ios.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 85c684a0..00000000 --- a/samples/discovery/ios/ios.xcodeproj/xcuserdata/matt.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - SchemeUserState - - ios.xcscheme - - orderHint - 0 - - - - diff --git a/samples/discovery/ios/ios.xcodeproj/xcuserdata/mramotar.xcuserdatad/xcschemes/xcschememanagement.plist b/samples/discovery/ios/ios.xcodeproj/xcuserdata/mramotar.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 884d419a..00000000 --- a/samples/discovery/ios/ios.xcodeproj/xcuserdata/mramotar.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,119 +0,0 @@ - - - - - SchemeUserState - - Rx (Playground) 1.xcscheme - - isShown - - orderHint - 2 - - Rx (Playground) 10.xcscheme - - isShown - - orderHint - 12 - - Rx (Playground) 11.xcscheme - - isShown - - orderHint - 13 - - Rx (Playground) 12.xcscheme - - isShown - - orderHint - 14 - - Rx (Playground) 13.xcscheme - - isShown - - orderHint - 15 - - Rx (Playground) 14.xcscheme - - isShown - - orderHint - 16 - - Rx (Playground) 2.xcscheme - - isShown - - orderHint - 3 - - Rx (Playground) 3.xcscheme - - isShown - - orderHint - 4 - - Rx (Playground) 4.xcscheme - - isShown - - orderHint - 5 - - Rx (Playground) 5.xcscheme - - isShown - - orderHint - 6 - - Rx (Playground) 6.xcscheme - - isShown - - orderHint - 8 - - Rx (Playground) 7.xcscheme - - isShown - - orderHint - 9 - - Rx (Playground) 8.xcscheme - - isShown - - orderHint - 10 - - Rx (Playground) 9.xcscheme - - isShown - - orderHint - 11 - - Rx (Playground).xcscheme - - isShown - - orderHint - 1 - - ios.xcscheme_^#shared#^_ - - orderHint - 0 - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/AppIcon.appiconset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 3ec3e95e..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "filename" : "componentbox (9).png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "filename" : "componentbox (10).png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "filename" : "componentbox (10)-1.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "filename" : "componentbox (8).png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "ipad", - "scale" : "1x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/AppIcon.appiconset/componentbox (10)-1.png b/samples/discovery/ios/ios/Assets.xcassets/AppIcon.appiconset/componentbox (10)-1.png deleted file mode 100644 index 2b8ecba0..00000000 Binary files a/samples/discovery/ios/ios/Assets.xcassets/AppIcon.appiconset/componentbox (10)-1.png and /dev/null differ diff --git a/samples/discovery/ios/ios/Assets.xcassets/AppIcon.appiconset/componentbox (10).png b/samples/discovery/ios/ios/Assets.xcassets/AppIcon.appiconset/componentbox (10).png deleted file mode 100644 index 2b8ecba0..00000000 Binary files a/samples/discovery/ios/ios/Assets.xcassets/AppIcon.appiconset/componentbox (10).png and /dev/null differ diff --git a/samples/discovery/ios/ios/Assets.xcassets/AppIcon.appiconset/componentbox (8).png b/samples/discovery/ios/ios/Assets.xcassets/AppIcon.appiconset/componentbox (8).png deleted file mode 100644 index d1b949b5..00000000 Binary files a/samples/discovery/ios/ios/Assets.xcassets/AppIcon.appiconset/componentbox (8).png and /dev/null differ diff --git a/samples/discovery/ios/ios/Assets.xcassets/AppIcon.appiconset/componentbox (9).png b/samples/discovery/ios/ios/Assets.xcassets/AppIcon.appiconset/componentbox (9).png deleted file mode 100644 index 0193b177..00000000 Binary files a/samples/discovery/ios/ios/Assets.xcassets/AppIcon.appiconset/componentbox (9).png and /dev/null differ diff --git a/samples/discovery/ios/ios/Assets.xcassets/BackgroundElevated.colorset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/BackgroundElevated.colorset/Contents.json deleted file mode 100644 index 8762acec..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/BackgroundElevated.colorset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xF9", - "green" : "0xFA", - "red" : "0xFB" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "1.000", - "green" : "1.000", - "red" : "1.000" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/CheckmarkCircle.Fill.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/CheckmarkCircle.Fill.imageset/Contents.json deleted file mode 100644 index 97dfd14a..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/CheckmarkCircle.Fill.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "checkmark circle (1).svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/CheckmarkCircle.Fill.imageset/checkmark circle (1).svg b/samples/discovery/ios/ios/Assets.xcassets/CheckmarkCircle.Fill.imageset/checkmark circle (1).svg deleted file mode 100644 index be71dc28..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/CheckmarkCircle.Fill.imageset/checkmark circle (1).svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Dropbox-1.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Dropbox-1.imageset/Contents.json deleted file mode 100644 index a240b431..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Dropbox-1.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "Dropbox.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Dropbox-1.imageset/Dropbox.svg b/samples/discovery/ios/ios/Assets.xcassets/Dropbox-1.imageset/Dropbox.svg deleted file mode 100644 index 1e3d692e..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Dropbox-1.imageset/Dropbox.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/Dropbox.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Dropbox.imageset/Contents.json deleted file mode 100644 index 5e153076..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Dropbox.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "Dropbox (4).svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Dropbox.imageset/Dropbox (4).svg b/samples/discovery/ios/ios/Assets.xcassets/Dropbox.imageset/Dropbox (4).svg deleted file mode 100644 index dea69544..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Dropbox.imageset/Dropbox (4).svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/Edit.Line.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Edit.Line.imageset/Contents.json deleted file mode 100644 index 13f9713f..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Edit.Line.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "edit.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Edit.Line.imageset/edit.svg b/samples/discovery/ios/ios/Assets.xcassets/Edit.Line.imageset/edit.svg deleted file mode 100644 index 0f5f5647..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Edit.Line.imageset/edit.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/FaintText.colorset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/FaintText.colorset/Contents.json deleted file mode 100644 index e50e8369..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/FaintText.colorset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x60", - "green" : "0x6A", - "red" : "0x70" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "1.000", - "green" : "1.000", - "red" : "1.000" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Folder.Fill.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Folder.Fill.imageset/Contents.json deleted file mode 100644 index fb61a316..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Folder.Fill.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "folder (1).svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Folder.Fill.imageset/folder (1).svg b/samples/discovery/ios/ios/Assets.xcassets/Folder.Fill.imageset/folder (1).svg deleted file mode 100644 index 222cd833..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Folder.Fill.imageset/folder (1).svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/Folder.Line.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Folder.Line.imageset/Contents.json deleted file mode 100644 index 1231a585..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Folder.Line.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "folder.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Folder.Line.imageset/folder.svg b/samples/discovery/ios/ios/Assets.xcassets/Folder.Line.imageset/folder.svg deleted file mode 100644 index 81614335..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Folder.Line.imageset/folder.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/Home.Fill.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Home.Fill.imageset/Contents.json deleted file mode 100644 index 0958ed26..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Home.Fill.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "home (1).svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Home.Fill.imageset/home (1).svg b/samples/discovery/ios/ios/Assets.xcassets/Home.Fill.imageset/home (1).svg deleted file mode 100644 index 1544be40..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Home.Fill.imageset/home (1).svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/Home.Line.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Home.Line.imageset/Contents.json deleted file mode 100644 index 654a69df..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Home.Line.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "home.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Home.Line.imageset/home.svg b/samples/discovery/ios/ios/Assets.xcassets/Home.Line.imageset/home.svg deleted file mode 100644 index 0f261145..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Home.Line.imageset/home.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/Image.Fill.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Image.Fill.imageset/Contents.json deleted file mode 100644 index 5600c080..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Image.Fill.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "image (1).svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Image.Fill.imageset/image (1).svg b/samples/discovery/ios/ios/Assets.xcassets/Image.Fill.imageset/image (1).svg deleted file mode 100644 index eef62728..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Image.Fill.imageset/image (1).svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/Image.Line.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Image.Line.imageset/Contents.json deleted file mode 100644 index 8f75fcb4..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Image.Line.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "image.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Image.Line.imageset/image.svg b/samples/discovery/ios/ios/Assets.xcassets/Image.Line.imageset/image.svg deleted file mode 100644 index d18a58cf..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Image.Line.imageset/image.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/Notification.Line.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Notification.Line.imageset/Contents.json deleted file mode 100644 index acfc4431..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Notification.Line.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "notification.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Notification.Line.imageset/notification.svg b/samples/discovery/ios/ios/Assets.xcassets/Notification.Line.imageset/notification.svg deleted file mode 100644 index c5b1e46f..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Notification.Line.imageset/notification.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/OnBackground.colorset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/OnBackground.colorset/Contents.json deleted file mode 100644 index 648b3c7f..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/OnBackground.colorset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "display-p3", - "components" : { - "alpha" : "1.000", - "blue" : "0.000", - "green" : "0.000", - "red" : "0.000" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "display-p3", - "components" : { - "alpha" : "1.000", - "blue" : "1.000", - "green" : "1.000", - "red" : "1.000" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/OnPrimary.colorset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/OnPrimary.colorset/Contents.json deleted file mode 100644 index 2960d721..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/OnPrimary.colorset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "1.000", - "green" : "1.000", - "red" : "1.000" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x00", - "green" : "0x00", - "red" : "0x00" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Opacity1.colorset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Opacity1.colorset/Contents.json deleted file mode 100644 index ca9b70bd..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Opacity1.colorset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "0.140", - "blue" : "0x71", - "green" : "0x91", - "red" : "0xA6" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "1.000", - "green" : "1.000", - "red" : "1.000" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Person.Fill.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Person.Fill.imageset/Contents.json deleted file mode 100644 index 35207038..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Person.Fill.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "person.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "person@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "person@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Person.Fill.imageset/person.png b/samples/discovery/ios/ios/Assets.xcassets/Person.Fill.imageset/person.png deleted file mode 100644 index 9d76537b..00000000 Binary files a/samples/discovery/ios/ios/Assets.xcassets/Person.Fill.imageset/person.png and /dev/null differ diff --git a/samples/discovery/ios/ios/Assets.xcassets/Person.Fill.imageset/person@2x.png b/samples/discovery/ios/ios/Assets.xcassets/Person.Fill.imageset/person@2x.png deleted file mode 100644 index de004e7a..00000000 Binary files a/samples/discovery/ios/ios/Assets.xcassets/Person.Fill.imageset/person@2x.png and /dev/null differ diff --git a/samples/discovery/ios/ios/Assets.xcassets/Person.Fill.imageset/person@3x.png b/samples/discovery/ios/ios/Assets.xcassets/Person.Fill.imageset/person@3x.png deleted file mode 100644 index f52efd71..00000000 Binary files a/samples/discovery/ios/ios/Assets.xcassets/Person.Fill.imageset/person@3x.png and /dev/null differ diff --git a/samples/discovery/ios/ios/Assets.xcassets/Person.Line.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Person.Line.imageset/Contents.json deleted file mode 100644 index 35207038..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Person.Line.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "filename" : "person.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "person@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "person@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Person.Line.imageset/person.png b/samples/discovery/ios/ios/Assets.xcassets/Person.Line.imageset/person.png deleted file mode 100644 index 5cf0264c..00000000 Binary files a/samples/discovery/ios/ios/Assets.xcassets/Person.Line.imageset/person.png and /dev/null differ diff --git a/samples/discovery/ios/ios/Assets.xcassets/Person.Line.imageset/person@2x.png b/samples/discovery/ios/ios/Assets.xcassets/Person.Line.imageset/person@2x.png deleted file mode 100644 index 6fe0df9f..00000000 Binary files a/samples/discovery/ios/ios/Assets.xcassets/Person.Line.imageset/person@2x.png and /dev/null differ diff --git a/samples/discovery/ios/ios/Assets.xcassets/Person.Line.imageset/person@3x.png b/samples/discovery/ios/ios/Assets.xcassets/Person.Line.imageset/person@3x.png deleted file mode 100644 index a2078302..00000000 Binary files a/samples/discovery/ios/ios/Assets.xcassets/Person.Line.imageset/person@3x.png and /dev/null differ diff --git a/samples/discovery/ios/ios/Assets.xcassets/Primary.colorset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Primary.colorset/Contents.json deleted file mode 100644 index 4a5f5fb9..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Primary.colorset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0xFE", - "green" : "0x61", - "red" : "0x00" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "1.000", - "green" : "1.000", - "red" : "1.000" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Settings.Line.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Settings.Line.imageset/Contents.json deleted file mode 100644 index b322f1ec..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Settings.Line.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "settings.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Settings.Line.imageset/settings.svg b/samples/discovery/ios/ios/Assets.xcassets/Settings.Line.imageset/settings.svg deleted file mode 100644 index 6ed26436..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Settings.Line.imageset/settings.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/SuccessFill.colorset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/SuccessFill.colorset/Contents.json deleted file mode 100644 index c291baa4..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/SuccessFill.colorset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0x19", - "green" : "0xDC", - "red" : "0xB4" - } - }, - "idiom" : "universal" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "1.000", - "green" : "1.000", - "red" : "1.000" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Upgrade.Line.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/Upgrade.Line.imageset/Contents.json deleted file mode 100644 index 197c2d85..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Upgrade.Line.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "upgrade.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/Upgrade.Line.imageset/upgrade.svg b/samples/discovery/ios/ios/Assets.xcassets/Upgrade.Line.imageset/upgrade.svg deleted file mode 100644 index cd797a97..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/Upgrade.Line.imageset/upgrade.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/componentbox.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/componentbox.imageset/Contents.json deleted file mode 100644 index 7abb6635..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/componentbox.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "componentbox.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/componentbox.imageset/componentbox.png b/samples/discovery/ios/ios/Assets.xcassets/componentbox.imageset/componentbox.png deleted file mode 100644 index dbe40263..00000000 Binary files a/samples/discovery/ios/ios/Assets.xcassets/componentbox.imageset/componentbox.png and /dev/null differ diff --git a/samples/discovery/ios/ios/Assets.xcassets/folder.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/folder.imageset/Contents.json deleted file mode 100644 index 1231a585..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/folder.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "folder.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/folder.imageset/folder.svg b/samples/discovery/ios/ios/Assets.xcassets/folder.imageset/folder.svg deleted file mode 100644 index 81614335..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/folder.imageset/folder.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/home.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/home.imageset/Contents.json deleted file mode 100644 index 654a69df..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/home.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "home.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/home.imageset/home.svg b/samples/discovery/ios/ios/Assets.xcassets/home.imageset/home.svg deleted file mode 100644 index 0f261145..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/home.imageset/home.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/image.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/image.imageset/Contents.json deleted file mode 100644 index 8f75fcb4..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/image.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "image.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/image.imageset/image.svg b/samples/discovery/ios/ios/Assets.xcassets/image.imageset/image.svg deleted file mode 100644 index d18a58cf..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/image.imageset/image.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/member transfer.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/member transfer.imageset/Contents.json deleted file mode 100644 index f69cb911..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/member transfer.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "member transfer.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/member transfer.imageset/member transfer.svg b/samples/discovery/ios/ios/Assets.xcassets/member transfer.imageset/member transfer.svg deleted file mode 100644 index cd74caff..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/member transfer.imageset/member transfer.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/notification.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/notification.imageset/Contents.json deleted file mode 100644 index acfc4431..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/notification.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "notification.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/notification.imageset/notification.svg b/samples/discovery/ios/ios/Assets.xcassets/notification.imageset/notification.svg deleted file mode 100644 index c5b1e46f..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/notification.imageset/notification.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/person.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/person.imageset/Contents.json deleted file mode 100644 index 54de0929..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/person.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "person.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/person.imageset/person.svg b/samples/discovery/ios/ios/Assets.xcassets/person.imageset/person.svg deleted file mode 100644 index e57814d9..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/person.imageset/person.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/placeholder.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/placeholder.imageset/Contents.json deleted file mode 100644 index d7a6ec89..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/placeholder.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "placeholder.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/placeholder.imageset/placeholder.png b/samples/discovery/ios/ios/Assets.xcassets/placeholder.imageset/placeholder.png deleted file mode 100644 index f49d2a63..00000000 Binary files a/samples/discovery/ios/ios/Assets.xcassets/placeholder.imageset/placeholder.png and /dev/null differ diff --git a/samples/discovery/ios/ios/Assets.xcassets/scan.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/scan.imageset/Contents.json deleted file mode 100644 index 90bb7279..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/scan.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "scan.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/scan.imageset/scan.svg b/samples/discovery/ios/ios/Assets.xcassets/scan.imageset/scan.svg deleted file mode 100644 index 3be105bd..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/scan.imageset/scan.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/search.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/search.imageset/Contents.json deleted file mode 100644 index 6e779188..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/search.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "search.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/search.imageset/search.svg b/samples/discovery/ios/ios/Assets.xcassets/search.imageset/search.svg deleted file mode 100644 index f9f2926d..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/search.imageset/search.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/settings.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/settings.imageset/Contents.json deleted file mode 100644 index b322f1ec..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/settings.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "settings.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/settings.imageset/settings.svg b/samples/discovery/ios/ios/Assets.xcassets/settings.imageset/settings.svg deleted file mode 100644 index 6ed26436..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/settings.imageset/settings.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/space.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/space.imageset/Contents.json deleted file mode 100644 index c31c6fa6..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/space.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "space.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/space.imageset/space.svg b/samples/discovery/ios/ios/Assets.xcassets/space.imageset/space.svg deleted file mode 100644 index d94bda2a..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/space.imageset/space.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/switcher.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/switcher.imageset/Contents.json deleted file mode 100644 index cd1a4e06..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/switcher.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "switcher.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/switcher.imageset/switcher.svg b/samples/discovery/ios/ios/Assets.xcassets/switcher.imageset/switcher.svg deleted file mode 100644 index 9636cd90..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/switcher.imageset/switcher.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/syncing.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/syncing.imageset/Contents.json deleted file mode 100644 index a24b3b5a..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/syncing.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "syncing.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/syncing.imageset/syncing.svg b/samples/discovery/ios/ios/Assets.xcassets/syncing.imageset/syncing.svg deleted file mode 100644 index c8430315..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/syncing.imageset/syncing.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/tag-1.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/tag-1.imageset/Contents.json deleted file mode 100644 index 45797b00..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/tag-1.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "tag.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/tag-1.imageset/tag.svg b/samples/discovery/ios/ios/Assets.xcassets/tag-1.imageset/tag.svg deleted file mode 100644 index 67d62c90..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/tag-1.imageset/tag.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/tag.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/tag.imageset/Contents.json deleted file mode 100644 index 5e945a2f..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/tag.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "tag.jpeg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/tag.imageset/tag.jpeg b/samples/discovery/ios/ios/Assets.xcassets/tag.imageset/tag.jpeg deleted file mode 100644 index 05ed48f5..00000000 Binary files a/samples/discovery/ios/ios/Assets.xcassets/tag.imageset/tag.jpeg and /dev/null differ diff --git a/samples/discovery/ios/ios/Assets.xcassets/twinkle 1.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/twinkle 1.imageset/Contents.json deleted file mode 100644 index 856d26bc..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/twinkle 1.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "twinkle 1.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/twinkle 1.imageset/twinkle 1.svg b/samples/discovery/ios/ios/Assets.xcassets/twinkle 1.imageset/twinkle 1.svg deleted file mode 100644 index f085ec26..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/twinkle 1.imageset/twinkle 1.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/twinkle 2.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/twinkle 2.imageset/Contents.json deleted file mode 100644 index 601100b4..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/twinkle 2.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "twinkle 2.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/twinkle 2.imageset/twinkle 2.svg b/samples/discovery/ios/ios/Assets.xcassets/twinkle 2.imageset/twinkle 2.svg deleted file mode 100644 index 41e7fc9c..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/twinkle 2.imageset/twinkle 2.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/discovery/ios/ios/Assets.xcassets/upgrade.imageset/Contents.json b/samples/discovery/ios/ios/Assets.xcassets/upgrade.imageset/Contents.json deleted file mode 100644 index 197c2d85..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/upgrade.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "filename" : "upgrade.svg", - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/samples/discovery/ios/ios/Assets.xcassets/upgrade.imageset/upgrade.svg b/samples/discovery/ios/ios/Assets.xcassets/upgrade.imageset/upgrade.svg deleted file mode 100644 index cd797a97..00000000 --- a/samples/discovery/ios/ios/Assets.xcassets/upgrade.imageset/upgrade.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/samples/discovery/ios/ios/Base.lproj/LaunchScreen.storyboard b/samples/discovery/ios/ios/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index cf996030..00000000 --- a/samples/discovery/ios/ios/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/discovery/ios/ios/ComponentBoxUI/.swiftpm/xcode/xcuserdata/mramotar.xcuserdatad/xcschemes/xcschememanagement.plist b/samples/discovery/ios/ios/ComponentBoxUI/.swiftpm/xcode/xcuserdata/mramotar.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index a5fc26fd..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/.swiftpm/xcode/xcuserdata/mramotar.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - SchemeUserState - - ComponentBoxUI.xcscheme_^#shared#^_ - - orderHint - 7 - - - - diff --git a/samples/discovery/ios/ios/ComponentBoxUI/Package.swift b/samples/discovery/ios/ios/ComponentBoxUI/Package.swift deleted file mode 100644 index eca6a508..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/Package.swift +++ /dev/null @@ -1,29 +0,0 @@ -// swift-tools-version: 5.6 -// The swift-tools-version declares the minimum version of Swift required to build this package. - -import PackageDescription - -let package = Package( - name: "ComponentBoxUI", - products: [ - // Products define the executables and libraries a package produces, and make them visible to other packages. - .library( - name: "ComponentBoxUI", - targets: ["ComponentBoxUI"]), - ], - dependencies: [ - // Dependencies declare other packages that this package depends on. - // .package(url: /* package url */, from: "1.0.0"), - .package(url: "https://github.com/matt-ramotar/ComponentBoxPackage.git", branch: "master") - ], - targets: [ - // Targets are the basic building blocks of a package. A target can define a module or a test suite. - // Targets can depend on other targets in this package, and on products in packages this package depends on. - .target( - name: "ComponentBoxUI", - dependencies: []), - .testTarget( - name: "ComponentBoxUITests", - dependencies: ["ComponentBoxUI"]), - ] -) diff --git a/samples/discovery/ios/ios/ComponentBoxUI/README.md b/samples/discovery/ios/ios/ComponentBoxUI/README.md deleted file mode 100644 index 6bfcc64d..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/README.md +++ /dev/null @@ -1 +0,0 @@ -# ComponentBoxUI diff --git a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/ComponentBoxScreen.swift b/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/ComponentBoxScreen.swift deleted file mode 100644 index e3df67de..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/ComponentBoxScreen.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// Created by Matt Ramotar on 3/27/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. - -import Foundation -import SwiftUI -import componentbox - - -@available(iOS 14.0, *) -public struct ComponentBoxScreen: View, Identifiable { - public let id: String - let title: String? - let verticalArrangement: componentbox.Arrangement? - let horizontalAlignment: componentbox.Alignment? - let components: [componentbox.Component]? - - public init(id: String, title: String?, verticalArrangement: componentbox.Arrangement?, horizontalAlignment: componentbox.Alignment?, components: [componentbox.Component]?) { - self.id = id - self.title = title - self.verticalArrangement = verticalArrangement - self.horizontalAlignment = horizontalAlignment - self.components = components - } - - public var body: some View { - - if (self.components?.isEmpty == false) { - - VStack { - ForEach(self.components!, id: \.self) { component in - component.inflate() - } - }.frame(maxWidth: .infinity, maxHeight: .infinity).padding(0) - } - } -} - diff --git a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/ComponentBoxUI.swift b/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/ComponentBoxUI.swift deleted file mode 100644 index 23f76549..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/ComponentBoxUI.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// Created by Matt Ramotar on 3/27/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - - -import Foundation -import SwiftUI -import componentbox - -enum ComponentBoxUI { - case Box( - id: String, - components: [componentbox.Component]?, - modifier: componentbox.Modifier?, - horizontalArrangement: componentbox.Arrangement?, - verticalAlignment: componentbox.Alignment?, - action: String? - ) - - case Button(id: String, components: [componentbox.Component]?, modifier: componentbox.Modifier?, isEnabled: Bool?, action: String?, variant: String?) - - case Column( - id: String, - components: [componentbox.Component]?, - modifier: componentbox.Modifier?, - verticalArrangement: componentbox.Arrangement?, - horizontalAlignment: componentbox.Alignment?, - action: String?, - isLazy: Bool? - ) - - case Image( - id: String, - name: String?, - url: String?, - contentDescription: String?, - modifier: componentbox.Modifier?, - alignment: componentbox.Alignment?, - contentScale: componentbox.ContentScale? - ) - - case Icon( - id: String, - name: String?, - modifier: componentbox.Modifier?, - alignment: componentbox.Alignment?, - contentScale: componentbox.ContentScale?, - color: componentbox.Color? - ) - - case Row( - id: String, - components: [componentbox.Component]?, - modifier: componentbox.Modifier?, - horizontalArrangement: componentbox.Arrangement?, - verticalAlignment: componentbox.Alignment?, - action: String?, - isLazy: Bool? - ) - - case Text(id: String, modifier: componentbox.Modifier?, text: String?, color: componentbox.Color?, textStyle: String?) - - @available(iOS 14.0, *) - func inflate() -> some View { - switch self { - - case let .Box(id, components, modifier, horizontalArrangement, verticalAlignment, action): - return AnyView(ComponentBoxUIBox(id: id, components: components, modifier: modifier, horizontalArrangement: horizontalArrangement, verticalAlignment: verticalAlignment, action: action)) - - case let .Button(id, components, modifier, isEnabled, action, variant): - return AnyView(ComponentBoxUIButton(id: id, components: components, modifier: modifier, isEnabled: isEnabled, action: action, variant: variant)) - - case let .Column(id, components, modifier, verticalArrangement, horizontalAlignment, action, isLazy): - return AnyView(ComponentBoxUIColumn(id: id, components: components, modifier: modifier, verticalArrangement: verticalArrangement, horizontalAlignment: horizontalAlignment, action: action, isLazy: isLazy)) - - case let .Image(id, name, url, contentDescription, modifier, alignment, contentScale): - return AnyView(ComponentBoxUIImage(id: id, name: name, url: url, contentDescription: contentDescription, modifier: modifier, alignment: alignment, contentScale: contentScale)) - - case let .Icon(id, name, modifier, alignment, contentScale, color): - return AnyView(ComponentBoxUIIcon(id: id, name: name, modifier: modifier, alignment: alignment, contentScale: contentScale, color: color)) - - case let .Row(id, components, modifier, horizontalArrangement, verticalAlignment, action, isLazy): - return AnyView(ComponentBoxUIRow(id: id, components: components, modifier: modifier, horizontalArrangement: horizontalArrangement, verticalAlignment: verticalAlignment, action: action, isLazy: isLazy)) - - case let .Text(id, modifier, text, color, textStyle): - return AnyView(ComponentBoxUIText(id: id, modifier: modifier, text: text, color: color, textStyle: textStyle)) - } - } -} diff --git a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Box.swift b/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Box.swift deleted file mode 100644 index cd2b0bf7..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Box.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// Created by Matt Ramotar on 3/27/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI -import componentbox - -@available(iOS 14.0, *) -struct ComponentBoxUIBox: View, Identifiable { - let id: String - let components: [componentbox.Component]? - let modifier: componentbox.Modifier? - let horizontalArrangement: componentbox.Arrangement? - let verticalAlignment: componentbox.Alignment? - let action: String? - - - var body: some View { - - if (self.components != nil) { - ZStack { - ForEach(self.components!, id: \.self) { component in - component.inflate() - } - } - } - } -} diff --git a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Button.swift b/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Button.swift deleted file mode 100644 index 33d5fd5f..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Button.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// Created by Matt Ramotar on 3/27/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - - -import Foundation -import SwiftUI -import componentbox - -@available(iOS 14.0, *) -struct ComponentBoxUIButton: View, Identifiable { - let id: String - let components: [componentbox.Component]? - let modifier: componentbox.Modifier? - let isEnabled: Bool? - let action: String? - let variant: String? - - func log() { - print(components?.count ?? "NO components") - } - - var body: some View { - - SwiftUI.Button(action: {}, label: { - - if (self.components != nil) { - ForEach(self.components!, id: \.self) { component in - component.inflate() - } - }}).buttonStyle(PrimaryButton(fillMaxWidth: modifier?.fillMaxWidth as? Bool ?? false)) - } -} - - - -@available(iOS 14.0, *) -struct PrimaryButton: ButtonStyle { - - let fillMaxWidth: Bool - - func makeBody(configuration: Self.Configuration) -> some View { - configuration.label - .padding(12) - .frame(maxWidth: fillMaxWidth ? .infinity : .none) - .foregroundColor(Color.ui.onPrimary) - .font(.sharpGroteskBook(withStyle: .title3, size: 16)) - .background(Color.ui.primary) - } -} diff --git a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Column.swift b/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Column.swift deleted file mode 100644 index a2660b7b..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Column.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// Created by Matt Ramotar on 3/27/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI -import componentbox - -@available(iOS 14.0, *) -struct ComponentBoxUIColumn: View, Identifiable { - let id: String - let components: Array? - let modifier: componentbox.Modifier? - let verticalArrangement: componentbox.Arrangement? - let horizontalAlignment: componentbox.Alignment? - let action: String? - let isLazy: Bool? - - - var body: some View { - - let backgroundColor = modifier?.background != nil ? modifier!.background!.title.ui() : "Background".ui() - - let padding = modifier?.padding != nil ? modifier!.padding!.build() : EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0) - - if (self.components != nil) { - if (self.isLazy == true) { - ScrollView { - ForEach(self.components!, id: \.self) { component in - component.inflate() - } - }.frame(maxWidth: .infinity).padding(padding).background(backgroundColor) - } else { - VStack { - ForEach(self.components!, id: \.self) { component in - component.inflate() - } - }.frame(maxWidth: .infinity, alignment: .center).padding(padding).background(backgroundColor) - } - } - } -} diff --git a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Icon.swift b/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Icon.swift deleted file mode 100644 index 9f650b72..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Icon.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// Created by Matt Ramotar on 3/27/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI -import componentbox - -@available(iOS 14.0, *) -struct ComponentBoxUIIcon: View, Identifiable { - let id: String - let name: String? - let modifier: componentbox.Modifier? - let alignment: componentbox.Alignment? - let contentScale: componentbox.ContentScale? - let color: componentbox.Color? - - func getForegroundColor() -> SwiftUI.Color { - return color?.title != nil ? color!.title.ui() : modifier?.background?.title != nil ? modifier!.background!.title.ui() : "On background".ui() - } - - var body: some View { - if (name != nil) { - SwiftUI.Image(name!).renderingMode(.template).foregroundColor(getForegroundColor()) - } - } -} diff --git a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Image.swift b/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Image.swift deleted file mode 100644 index b9c2ba53..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Image.swift +++ /dev/null @@ -1,91 +0,0 @@ -// -// Created by Matt Ramotar on 3/27/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI -import componentbox -import Combine - -@available(iOS 14.0, *) -struct ComponentBoxUIImage: View, Identifiable { - let id: String - let name: String? - let url: String? - let contentDescription: String? - let modifier: componentbox.Modifier? - let alignment: componentbox.Alignment? - let contentScale: componentbox.ContentScale? - - - var fallbackImage : some View { - SwiftUI.Image("placeholder").resizable().scaledToFit().frame(height: 200).clipped() - } - - var body: some View { - - if (url != nil) { - ComponentBoxAsyncImage(url: URL(string: url!)!, placeholder: {fallbackImage} ) - } else { - fallbackImage - } - } -} - - -@available(iOS 14.0, *) -class ImageLoader: ObservableObject { - @Published var image: UIImage? - private let url: URL - private var cancellable: AnyCancellable? - - init(url: URL) { - self.url = url - } - - deinit { - cancel() - } - - - func load() { - cancellable = URLSession.shared.dataTaskPublisher(for: url) - .map { UIImage(data: $0.data) } - .replaceError(with: nil) - .receive(on: DispatchQueue.main) - .sink { [weak self] in self?.image = $0 } - } - - func cancel() { - cancellable?.cancel() - } -} - -@available(iOS 14.0, *) -struct ComponentBoxAsyncImage : View { - - @StateObject private var loader: ImageLoader - private let placeholder: Placeholder - - init(url: URL, @ViewBuilder placeholder: () -> Placeholder) { - self.placeholder = placeholder() - _loader = StateObject(wrappedValue: ImageLoader(url: url)) - } - - var body: some View { - content - .onAppear(perform: loader.load) - } - - private var content: some View { - Group { - if loader.image != nil { - Image(uiImage: loader.image!) - .resizable() - } else { - placeholder - } - } - } -} diff --git a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Row.swift b/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Row.swift deleted file mode 100644 index e52af265..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Row.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// Created by Matt Ramotar on 3/27/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI -import componentbox - -@available(iOS 14.0, *) -struct ComponentBoxUIRow: View, Identifiable { - let id: String - let components: [componentbox.Component]? - let modifier: componentbox.Modifier? - let horizontalArrangement: componentbox.Arrangement? - let verticalAlignment: componentbox.Alignment? - let action: String? - let isLazy: Bool? - - - var body: some View { - - if (self.components != nil) { - if (self.isLazy == true) { - ScrollView { - ForEach(self.components!, id: \.self) { component in - component.inflate() - } - } - } else { - HStack { - ForEach(self.components!, id: \.self) { component in - component.inflate() - } - }.frame(maxWidth: modifier?.fillMaxWidth == true ? .infinity : .none, alignment: .leading) - } - } - } -} diff --git a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Text.swift b/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Text.swift deleted file mode 100644 index 63f698c2..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/components/Text.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// Created by Matt Ramotar on 3/27/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI -import componentbox - -@available(iOS 14.0, *) -struct ComponentBoxUIText: View, Identifiable { - let id: String - let modifier: componentbox.Modifier? - let text: String? - let color: componentbox.Color? - let textStyle: String? - - func getColor() -> SwiftUI.Color { - color != nil ? color!.title.ui() : textStyle == "button" ? Color.ui.onPrimary : Color.ui.onBackground - } - - var body: some View { - - let isHeading = ["h1", "h2", "h3", "h4", "h5", "h6"].contains(self.textStyle) - let isButton = ["button"].contains(self.textStyle) - - if (isHeading) { - SwiftUI.Text(text ?? "").sharpGroteskBold(style: .title3, color: getColor()) - } else if (isButton) { - SwiftUI.Text(text ?? "").sharpGroteskBold(style: .body, color: getColor()) - } else { - SwiftUI.Text(text ?? "").atlasGrotesk(style: .body, weight: .regular, color: getColor() ) - } - } -} diff --git a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/extensions/color.swift b/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/extensions/color.swift deleted file mode 100644 index f0a28b93..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/extensions/color.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// Created by Matt Ramotar on 3/27/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI - -@available(iOS 14.0, *) -extension Color { - static let ui = Color.UI() - - struct UI { - let backgroundElevated = Color("BackgroundElevated") - let primary = Color("Primary") - let onBackground = Color("OnBackground") - let opacity1 = Color("Opacity1") - let faintText = Color("FaintText") - let successFill = Color("SuccessFill") - let background = Color("Background") - let onPrimary = Color("OnPrimary") - } -} - -@available(iOS 14.0, *) -extension String { - func ui() -> Color { - switch self { - - case "Standard background elevated": - return Color.ui.backgroundElevated - - case "Opacity 1": - return Color.ui.opacity1 - - case "On background": - return Color.ui.onBackground - - case "Success fill": - return Color.ui.successFill - - case "Primary": - return Color.ui.primary - - case "Faint text": - return Color.ui.faintText - - case "Background": - return Color.ui.background - - case "On primary": - return Color.ui.onPrimary - - default: - return Color.ui.onBackground - } - } -} diff --git a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/extensions/component.swift b/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/extensions/component.swift deleted file mode 100644 index a1cc6ba6..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/extensions/component.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// Created by Matt Ramotar on 3/27/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - - -import Foundation -import SwiftUI -import componentbox - -@available(iOS 14.0, *) -public extension Component { - func inflate() -> some View { - switch self { - - case let box as Component.Box: - let ui = ComponentBoxUI.Box( - id: box.id, - components: box.components as? [componentbox.Component], - modifier: box.modifier, - horizontalArrangement: box.horizontalArrangement, - verticalAlignment: box.verticalAlignment, - action: box.action - ) - - return AnyView(ui.inflate()) - - case let button as Component.Button: - let ui = ComponentBoxUI.Button(id: button.id, components: button.components as? [componentbox.Component], modifier: button.modifier, isEnabled: button.isEnabled as? Bool, action: button.action, variant: button.variant) - return AnyView(ui.inflate()) - - case let column as Component.Column: - let ui = ComponentBoxUI.Column( - id: column.id, - components: column.components as? [componentbox.Component], - modifier: column.modifier, - verticalArrangement: column.verticalArrangement, - horizontalAlignment: column.horizontalAlignment, - action: column.action, - isLazy: column.isLazy as? Bool - ) - - return AnyView(ui.inflate()) - - case let image as Component.Drawable: - let ui = ComponentBoxUI.Image(id: image.id, name: image.name, url: image.url, contentDescription: image.contentDescription, modifier: image.modifier, alignment: image.alignment, contentScale: image.contentScale) - return AnyView(ui.inflate()) - - case let icon as Component.Vector: - let ui = ComponentBoxUI.Icon(id: icon.id, name: icon.name, modifier: icon.modifier, alignment: icon.alignment, contentScale: icon.contentScale, color: icon.color) - return AnyView(ui.inflate()) - - case let row as Component.Row: - let ui = ComponentBoxUI.Row( - id: row.id, - components: row.components as? [componentbox.Component], - modifier: row.modifier, - horizontalArrangement: row.horizontalArrangement, - verticalAlignment: row.verticalAlignment, - action: row.action, - isLazy: row.isLazy as? Bool - ) - - return AnyView(ui.inflate()) - - case let text as Component.Text: - let ui = ComponentBoxUI.Text(id: text.id, modifier: text.modifier, text: text.text, color: text.color, textStyle: text.textStyle) - return AnyView(ui.inflate()) - - default: - return AnyView(HStack { }) - } - } -} diff --git a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/extensions/font.swift b/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/extensions/font.swift deleted file mode 100644 index deede6d4..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/extensions/font.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// Created by Matt Ramotar on 3/27/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - - -import Foundation -import SwiftUI - -import Foundation - - -@available(iOS 14.0, *) -extension Font { - @available(iOS 14.0, *) - static func sharpGroteskBook( - withStyle style: Font.TextStyle, - size: CGFloat - ) -> Font { - .custom("SharpGroteskDBCyrBook20", size: size, relativeTo: style) - } - - - static func atlasGrotesk( - withStyle style: Font.TextStyle, - size: CGFloat, - isBold: Bool = false - ) -> Font { - .custom("font0000000027e54b07", size: size, relativeTo: style).weight(isBold ? .bold : .regular) - } -} - - -@available(iOS 14.0, *) -struct FontModifier: ViewModifier { - - var name: String - var style: UIFont.TextStyle = .body - var weight: Font.Weight = .regular - var color: Color - - func body(content: Content) -> some View { - content - .font(Font.custom(name, size: UIFont.preferredFont(forTextStyle: style).pointSize) - .weight(weight)) - .foregroundColor(color) - } - -} - - -@available(iOS 14.0, *) -extension View { - func sharpGroteskBook(style: UIFont.TextStyle, weight: Font.Weight, color: Color = Color.ui.onBackground) -> some View { - self.modifier(FontModifier(name: "SharpGroteskDBCyrBook20", style: style, weight: weight, color: color)) - } - - func sharpGroteskBold(style: UIFont.TextStyle, color: Color = Color.ui.onBackground) -> some View { - self.modifier(FontModifier(name: "SharpGroteskDBCyrMedium20", style: style, weight: .bold, color: color)) - } - - - func atlasGroteskBold(style: UIFont.TextStyle, color: Color = Color.ui.onBackground) -> some View { - self.modifier(FontModifier(name: "font0000000027e55806", style: style, weight: .bold, color: color)) - } - - func atlasGrotesk(style: UIFont.TextStyle, weight: Font.Weight, color: Color = Color.ui.onBackground) -> some View { - self.modifier(FontModifier(name: "font0000000027e54b07", style: style, weight: weight, color: color)) - } -} diff --git a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/extensions/padding.swift b/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/extensions/padding.swift deleted file mode 100644 index 27accba0..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/Sources/ComponentBoxUI/extensions/padding.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// Created by Matt Ramotar on 3/27/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI -import componentbox - -@available(iOS 14.0, *) -extension componentbox.Padding { - func build() -> EdgeInsets { - - let top = CGFloat(self.top?.floatValue ?? 0) - let bottom = CGFloat(self.bottom?.floatValue ?? 0) - let leading = CGFloat(self.start?.floatValue ?? 0) - let trailing = CGFloat(self.end?.floatValue ?? 0) - - return EdgeInsets(top: top, leading: leading, bottom: bottom, trailing: trailing) - } -} diff --git a/samples/discovery/ios/ios/ComponentBoxUI/Tests/ComponentBoxUITests/ComponentBoxUITests.swift b/samples/discovery/ios/ios/ComponentBoxUI/Tests/ComponentBoxUITests/ComponentBoxUITests.swift deleted file mode 100644 index 19baffdc..00000000 --- a/samples/discovery/ios/ios/ComponentBoxUI/Tests/ComponentBoxUITests/ComponentBoxUITests.swift +++ /dev/null @@ -1,11 +0,0 @@ -import XCTest -@testable import ComponentBoxUI - -final class ComponentBoxUITests: XCTestCase { - func testExample() throws { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct - // results. - XCTAssertEqual(ComponentBoxUI().text, "Hello, World!") - } -} diff --git a/samples/discovery/ios/ios/DiscoveryApp.swift b/samples/discovery/ios/ios/DiscoveryApp.swift deleted file mode 100644 index 030c7dfd..00000000 --- a/samples/discovery/ios/ios/DiscoveryApp.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Created by Matt Ramotar on 3/18/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI - -@available(iOS 14.0, *) -@main -struct DiscoveryApp: App { - - var body: some Scene { - WindowGroup { - Scaffold() - } - } -} diff --git a/samples/discovery/ios/ios/Font/AtlasGroteskMedium.ttf b/samples/discovery/ios/ios/Font/AtlasGroteskMedium.ttf deleted file mode 100644 index fd0025aa..00000000 Binary files a/samples/discovery/ios/ios/Font/AtlasGroteskMedium.ttf and /dev/null differ diff --git a/samples/discovery/ios/ios/Font/AtlasGroteskRegular.ttf b/samples/discovery/ios/ios/Font/AtlasGroteskRegular.ttf deleted file mode 100644 index 17bd78bd..00000000 Binary files a/samples/discovery/ios/ios/Font/AtlasGroteskRegular.ttf and /dev/null differ diff --git a/samples/discovery/ios/ios/Font/SharpGroteskBook.ttf b/samples/discovery/ios/ios/Font/SharpGroteskBook.ttf deleted file mode 100644 index c98e4687..00000000 Binary files a/samples/discovery/ios/ios/Font/SharpGroteskBook.ttf and /dev/null differ diff --git a/samples/discovery/ios/ios/Font/SharpGroteskMedium.ttf b/samples/discovery/ios/ios/Font/SharpGroteskMedium.ttf deleted file mode 100644 index 6d5d7b57..00000000 Binary files a/samples/discovery/ios/ios/Font/SharpGroteskMedium.ttf and /dev/null differ diff --git a/samples/discovery/ios/ios/Info.plist b/samples/discovery/ios/ios/Info.plist deleted file mode 100644 index 70733c68..00000000 --- a/samples/discovery/ios/ios/Info.plist +++ /dev/null @@ -1,73 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Discovery - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIcons - - CFBundleIcons~ipad - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIAppFonts - - AtlasGroteskRegular.ttf - SharpGroteskBook.ttf - AtlasGroteskMedium.ttf - SharpGroteskMedium.ttf - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - $(PRODUCT_MODULE_NAME).SceneDelegate - - - - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/samples/discovery/ios/ios/Preview Content/Preview Assets.xcassets/Contents.json b/samples/discovery/ios/ios/Preview Content/Preview Assets.xcassets/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/samples/discovery/ios/ios/Preview Content/Preview Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/samples/discovery/ios/ios/Scaffold.swift b/samples/discovery/ios/ios/Scaffold.swift deleted file mode 100644 index 9fe03ba3..00000000 --- a/samples/discovery/ios/ios/Scaffold.swift +++ /dev/null @@ -1,94 +0,0 @@ -// -// Created by Matt Ramotar on 3/18/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI - -@available(iOS 14.0, *) -struct Scaffold: View { - - @State private var selectedTab = 0 - @Environment(\.colorScheme) var colorScheme - - var handler: Binding { - Binding( - get: { selectedTab }, - set: { - if ($0 != selectedTab) { - selectedTab = $0 - } - } - ) - } - - init() { - UITabBar.appearance().barTintColor = .systemBackground - UITabBar.appearance().unselectedItemTintColor = UIColor(named: "OnBackground") - UITabBar.appearance().tintColor = UIColor(named: "OnBackground") - UINavigationBar.appearance().largeTitleTextAttributes = [.font: UIFont(name: "SharpGroteskDBCyrBook20", size: 28)!] - } - - - var body: some View { - TabView(selection: handler) { - HomeScreen().tabItem { - if (selectedTab == 0) { - Image("Home.Fill").renderingMode(.template) - } else { - Image("Home.Line").renderingMode(.template) - } - - Text("Home") - } - .tag(0) - - - FilesScreen().tabItem { - if (selectedTab == 1) { - Image("Folder.Fill").renderingMode(.template) - } else { - Image("Folder.Line").renderingMode(.template) - } - - Text("Files") - } - .tag(1) - - PhotosScreen().tabItem { - if (selectedTab == 2) { - Image("Image.Fill").renderingMode(.template) - } else { - Image("Image.Line").renderingMode(.template) - } - - Text("Photos") - } - .tag(2) - - PlansScreen().tabItem { - if (selectedTab == 3) { - Image("Upgrade.Line").renderingMode(.template) - } else { - Image("Upgrade.Line").renderingMode(.template) - } - - Text("Plans") - } - .tag(3) - - AccountScreen().tabItem { - if (selectedTab == 4) { - Image("Person.Fill").renderingMode(.template) - } else { - Image("Person.Line").renderingMode(.template) - } - - Text("Account") - } - .tag(4) - } - .accentColor(colorScheme == .dark ? Color.white : Color.black) - } -} \ No newline at end of file diff --git a/samples/discovery/ios/ios/account/AccountScreen.swift b/samples/discovery/ios/ios/account/AccountScreen.swift deleted file mode 100644 index 86499092..00000000 --- a/samples/discovery/ios/ios/account/AccountScreen.swift +++ /dev/null @@ -1,338 +0,0 @@ -// -// Created by Matt Ramotar on 3/18/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI - -@available(iOS 14.0, *) -struct AccountScreen: View { - - - var body: some View { - NavigationView { - AccountScreenContent() - .navigationTitle("Account") - .toolbar { - ToolbarItem(placement: ToolbarItemPlacement.primaryAction) { - Image("Settings.Line").resizable().frame(width: 32.0, height: 32.0) - } - } - } - } -} - -@available(iOS 14.0, *) -private struct AccountScreenContent: View { - var body: some View { - - ScrollView { - - HStack(spacing: 20.0) { - - HStack { - ZStack(alignment: .bottomTrailing) { - Image("tag").resizable().scaledToFill().clipShape(Circle()).frame(width: 72.0, height: 72.0).clipped() - - Image("Edit.Line").resizable().background(Color.white).scaledToFill().clipShape(Circle()).frame(width: 24.0, height: 24.0, alignment: .bottomTrailing).shadow(radius: 8.0) - } - - VStack(alignment: .leading) { - Text("Tag Ramotar").sharpGroteskBold(style: .title3) - Text("tag@dropbox.com").atlasGrotesk(style: .body, weight: .regular) - } - .padding([.leading], 16).frame(alignment: .leading) - - } - .frame(maxWidth: .infinity, alignment: .leading) - - Image("switcher").resizable().frame(width: 32.0, height: 32.0) - - } // HStack - .frame(maxWidth: .infinity, alignment: .leading).padding().background(Color.white.shadow(radius: 4, x: 0, y: 0) - .mask(Rectangle().padding(.bottom, -8))) - - - AccountDetails().onAppear { - - for family in UIFont.familyNames.sorted() { - let names = UIFont.fontNames(forFamilyName: family) - print("Family: \(family) Font names: \(names)") - } - } - - AccountFeatures() - - - } // VStack - .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: Alignment.top).background(Color(hex: "#F3F3F3")) - } -} - -@available(iOS 14.0, *) -private struct AccountFeatures: View { - - var fakeFeatures = [ - FeatureCardModel(id: UUID(), imageNameLeading: "syncing", imageNameTrailing: "arrow right", text: "Sync", subtext: "All your content everywhere", accentColor: "OnBackground"), - FeatureCardModel(id: UUID(), imageNameLeading: "scan", imageNameTrailing: "arrow right", text: "Doc scanner", subtext: "Scan receipts and documents", accentColor: "OnBackground"), - FeatureCardModel(id: UUID(), imageNameLeading: "member transfer", imageNameTrailing: "arrow right", text: "Transfer", subtext: "Send large files securely", accentColor: "OnBackground"), - FeatureCardModel(id: UUID(), imageNameLeading: "twinkle 2", imageNameTrailing: "arrow right", text: "Explore", subtext: "Explore your plus features", accentColor: "Primary") - ] - - var body: some View { - Surface { - VStack(alignment: .leading) { - Text("Your features").sharpGroteskBook(style: .title3, weight: .bold) - ForEach(fakeFeatures, id: \.id) { fakeFeature in - FeatureCardView(model: fakeFeature) - } - - } - } - } -} - - -@available(iOS 14.0, *) -private struct AccountDetails: View { - var body: some View { - VStack { - HStack { - - HStack { - Image("Dropbox").resizable().renderingMode(.template).foregroundColor(Color.ui.primary).frame(width: 40, height: 40) - - Text("Dropbox Basic").sharpGroteskBook(style: .title3, weight: .regular) - } - .frame(maxWidth: .infinity, alignment: .leading) - - Button { - } label: { - Text("Upgrade").sharpGroteskBold(style: .body, color: .white) - } - .buttonStyle(PrimaryButton()) - - - } - .padding() - - Divider().frame(maxWidth: .infinity) - - HStack { - - VStack { - - HStack { - Image("space").resizable().frame(width: 28, height: 28) - Text("1.5 GB").atlasGrotesk(style: .title3, weight: .regular) - } - - Text("Storage used").atlasGrotesk(style: .subheadline, weight: .regular) - - } - .frame(maxWidth: .infinity) - - Divider().frame(maxHeight: 100) - - VStack { - - HStack { - Image("mobile").resizable().frame(width: 28, height: 28) - Text("2/3").atlasGrotesk(style: .title3, weight: .regular) - } - - Text("Devices linked").atlasGrotesk(style: .subheadline, weight: .regular) - - } - .frame(maxWidth: .infinity) - }.padding() - - Button { - } label: { - Text("Account details").sharpGroteskBold(style: .body, color: Color.ui.onBackground) - } - .buttonStyle(SecondaryButton(fillMaxWidth: true)) - - } - .padding().background(Color.white.shadow(radius: 4, x: 0, y: 0) - .mask(Rectangle().padding(.bottom, -8))) - } -} - - -@available(iOS 14.0, *) -struct PrimaryButton: ButtonStyle { - - func makeBody(configuration: Self.Configuration) -> some View { - configuration.label - .padding(12) - .background(Color.ui.primary) - } -} - -@available(iOS 14.0, *) -struct SecondaryButton: ButtonStyle { - let fillMaxWidth: Bool - - - init(fillMaxWidth: Bool = false) { - self.fillMaxWidth = fillMaxWidth - } - - func makeBody(configuration: Self.Configuration) -> some View { - configuration.label - .padding(12) - .frame(maxWidth: fillMaxWidth ? .infinity : .none) - .foregroundColor(Color.black) - .font(.sharpGroteskBook(withStyle: .title3, size: 16)) - .background(Color.ui.opacity1) - - } -} - - -@available(iOS 14.0, *) -struct Surface: View { - let content: () -> Content - - public init(@ViewBuilder content: @escaping () -> Content) { - self.content = content - } - - var body: some View { - content().padding().background(Color.white.shadow(radius: 1, x: 0, y: 2) - .mask(Rectangle().padding(.bottom, -2))) - } - -} - - -@available(iOS 14.0, *) -struct FeatureCardView: View { - let model: FeatureCardModel - - var body: some View { - HStack { - - HStack(spacing: 16) { - Image(model.imageNameLeading).renderingMode(.template).foregroundColor(model.accentColor.ui()) - - VStack(alignment: .leading, spacing: 8) { - Text(model.text).atlasGrotesk(style: .body, weight: .regular, color: model.accentColor.ui()) - Text(model.subtext).atlasGrotesk(style: .caption1, weight: .regular, color: model.accentColor == "Primary" ? model.accentColor.ui() : Color.ui.faintText) - } - } - .frame(maxWidth: .infinity, alignment: .leading) - - Image(model.imageNameTrailing).renderingMode(.template).foregroundColor(model.accentColor.ui()) - } - .padding().frame(maxWidth: .infinity).background(Color.ui.backgroundElevated) - } -} - -struct FeatureCardModel: Identifiable { - let id: UUID - let imageNameLeading: String - let imageNameTrailing: String - let text: String - let subtext: String - let accentColor: String -} - -extension Color { - - - static let ui = Color.UI() - - struct UI { - let backgroundElevated = Color("BackgroundElevated") - let primary = Color("Primary") - let onBackground = Color("OnBackground") - let opacity1 = Color("Opacity1") - let faintText = Color("FaintText") - } -} - -extension String { - func ui() -> Color { - switch self { - case "Opacity1": - return Color.ui.opacity1 - - case "OnBackground": - return Color.ui.onBackground - - case "Primary": - return Color.ui.primary - - case "FaintText": - return Color.ui.faintText - - default: - return Color.ui.onBackground - } - - } - -} - - -@available(iOS 14.0, *) -extension Font { - @available(iOS 14.0, *) - static func sharpGroteskBook( - withStyle style: Font.TextStyle, - size: CGFloat - ) -> Font { - .custom("SharpGroteskDBCyrBook20", size: size, relativeTo: style) - } - - - static func atlasGrotesk( - withStyle style: Font.TextStyle, - size: CGFloat, - isBold: Bool = false - ) -> Font { - .custom("font0000000027e54b07", size: size, relativeTo: style).weight(isBold ? .bold : .regular) - } -} - - -@available(iOS 14.0, *) -struct FontModifier: ViewModifier { - - var name: String - var style: UIFont.TextStyle = .body - var weight: Font.Weight = .regular - var color: Color - - func body(content: Content) -> some View { - content - .font(Font.custom(name, size: UIFont.preferredFont(forTextStyle: style).pointSize) - .weight(weight)) - .foregroundColor(color) - } - -} - - -@available(iOS 14.0, *) -extension View { - func sharpGroteskBook(style: UIFont.TextStyle, weight: Font.Weight, color: Color = Color.ui.onBackground) -> some View { - self.modifier(FontModifier(name: "SharpGroteskDBCyrBook20", style: style, weight: weight, color: color)) - } - - func sharpGroteskBold(style: UIFont.TextStyle, color: Color = Color.ui.onBackground) -> some View { - self.modifier(FontModifier(name: "SharpGroteskDBCyrMedium20", style: style, weight: .bold, color: color)) - } - - - func atlasGroteskBold(style: UIFont.TextStyle, color: Color = Color.ui.onBackground) -> some View { - self.modifier(FontModifier(name: "font0000000027e55806", style: style, weight: .bold, color: color)) - } - - func atlasGrotesk(style: UIFont.TextStyle, weight: Font.Weight, color: Color = Color.ui.onBackground) -> some View { - self.modifier(FontModifier(name: "font0000000027e54b07", style: style, weight: weight, color: color)) - } -} diff --git a/samples/discovery/ios/ios/files/FilesScreen.swift b/samples/discovery/ios/ios/files/FilesScreen.swift deleted file mode 100644 index da7e71ce..00000000 --- a/samples/discovery/ios/ios/files/FilesScreen.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Created by Matt Ramotar on 3/18/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI - -@available(iOS 14.0, *) -struct FilesScreen: View { - var body: some View { - NavigationView { - Content() - .navigationTitle("Files") - .toolbar { - ToolbarItem(placement: ToolbarItemPlacement.navigationBarLeading) { - Image("Notification.Line").resizable().frame(width: 32.0, height: 32.0) - } - } - } - } - - -} - -private struct Content: View { - var body: some View { - VStack { - - }.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: Alignment.top).padding() - } -} \ No newline at end of file diff --git a/samples/discovery/ios/ios/home/HomeScreen.swift b/samples/discovery/ios/ios/home/HomeScreen.swift deleted file mode 100644 index c5e3b16b..00000000 --- a/samples/discovery/ios/ios/home/HomeScreen.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// Created by Matt Ramotar on 3/18/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI - -@available(iOS 14.0, *) -struct HomeScreen: View { - var body: some View { - NavigationView { - Content() - .navigationTitle("Home") - .toolbar { - ToolbarItem(placement: ToolbarItemPlacement.navigationBarLeading) { - Image("Notification.Line").resizable().frame(width: 32.0, height: 32.0) - } - } - } - } - - -} - -private struct Content: View { - var body: some View { - VStack { - - } - .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: Alignment.top).padding() - } -} \ No newline at end of file diff --git a/samples/discovery/ios/ios/photos/PhotosScreen.swift b/samples/discovery/ios/ios/photos/PhotosScreen.swift deleted file mode 100644 index eb8da920..00000000 --- a/samples/discovery/ios/ios/photos/PhotosScreen.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// Created by Matt Ramotar on 3/18/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI - -@available(iOS 14.0, *) -struct PhotosScreen: View { - var body: some View { - NavigationView { - Content() - .navigationTitle("Photos") - .toolbar { - ToolbarItem(placement: ToolbarItemPlacement.navigationBarLeading) { - Image("Notification.Line").resizable().frame(width: 32.0, height: 32.0) - } - } - } - } - - -} - -private struct Content: View { - var body: some View { - VStack { - - }.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: Alignment.top).padding() - } -} \ No newline at end of file diff --git a/samples/discovery/ios/ios/plans/PlansScreen.swift b/samples/discovery/ios/ios/plans/PlansScreen.swift deleted file mode 100644 index 0eb9ae4c..00000000 --- a/samples/discovery/ios/ios/plans/PlansScreen.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// Created by Matt Ramotar on 3/18/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI -import componentbox -import ComponentBoxUI - -@available(iOS 14.0, *) -struct PlansScreen: View { - - @State private var viewModel = PlansScreenViewModel() - - var body: some View { - NavigationView { - Content(screen: viewModel.screen) - .navigationTitle(viewModel.screen?.title ?? "Plans") - .toolbar { - ToolbarItem(placement: ToolbarItemPlacement.navigationBarLeading) { - Image("Notification.Line").resizable().frame(width: 32.0, height: 32.0) - } - } - } - } - - -} - -@available(iOS 14.0, *) -private struct Content: View { - - let screen: ComponentBox.Screen? - - var body: some View { - ComponentBoxScreen(id: UUID().uuidString, title: screen?.title, verticalArrangement: screen?.verticalArrangement, horizontalAlignment: screen?.horizontalAlignment, components: screen?.components ) - } -} diff --git a/samples/discovery/ios/ios/plans/PlansScreenViewModel.swift b/samples/discovery/ios/ios/plans/PlansScreenViewModel.swift deleted file mode 100644 index 538a0e27..00000000 --- a/samples/discovery/ios/ios/plans/PlansScreenViewModel.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// PlansScreenViewModel.swift -// ios -// -// Created by mramotar on 3/20/22. -// Copyright © 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import componentbox -import KMPNativeCoroutinesAsync - -class PlansScreenViewModel: ObservableObject { - @Published var screen: ComponentBox.Screen? - - let client = ComponentBoxClient().freeze() - - init () { - fetchComponentBox() - } - - func fetchComponentBox() { - Task { - do { - let response = try await asyncResult(for: client.fetchScreenNative(url: "https://api.componentbox.io/screens/1.json")) - - guard case let .success(screen) = response else { return } - self.screen = screen - - } catch { - print("FAILED \(error)") - } - } - - } -} diff --git a/samples/discovery/ios/ios/util/color.swift b/samples/discovery/ios/ios/util/color.swift deleted file mode 100644 index e777ae24..00000000 --- a/samples/discovery/ios/ios/util/color.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// Created by Matt Ramotar on 3/18/22. -// Copyright (c) 2022 Dropbox, Inc. All rights reserved. -// - -import Foundation -import SwiftUI - -extension Color { - init(hex: String) { - let hex = hex.trimmingCharacters(in: CharacterSet.alphanumerics.inverted) - var int: UInt64 = 0 - Scanner(string: hex).scanHexInt64(&int) - let a, r, g, b: UInt64 - switch hex.count { - case 3: // RGB (12-bit) - (a, r, g, b) = (255, (int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17) - case 6: // RGB (24-bit) - (a, r, g, b) = (255, int >> 16, int >> 8 & 0xFF, int & 0xFF) - case 8: // ARGB (32-bit) - (a, r, g, b) = (int >> 24, int >> 16 & 0xFF, int >> 8 & 0xFF, int & 0xFF) - default: - (a, r, g, b) = (1, 1, 1, 0) - } - - self.init( - .sRGB, - red: Double(r) / 255, - green: Double(g) / 255, - blue: Double(b) / 255, - opacity: Double(a) / 255 - ) - } -} \ No newline at end of file diff --git a/samples/discovery/ios/iosTests/Info.plist b/samples/discovery/ios/iosTests/Info.plist deleted file mode 100644 index 64d65ca4..00000000 --- a/samples/discovery/ios/iosTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/samples/discovery/ios/iosTests/iosTests.swift b/samples/discovery/ios/iosTests/iosTests.swift deleted file mode 100644 index 4d3a4bd2..00000000 --- a/samples/discovery/ios/iosTests/iosTests.swift +++ /dev/null @@ -1,26 +0,0 @@ -import XCTest -@testable import ios - -class iosTests: XCTestCase { - - override func setUp() { - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - } - - func testExample() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testPerformanceExample() { - // This is an example of a performance test case. - self.measure { - // Put the code you want to measure the time of here. - } - } - -} diff --git a/samples/discovery/ios/iosUITests/Info.plist b/samples/discovery/ios/iosUITests/Info.plist deleted file mode 100644 index 64d65ca4..00000000 --- a/samples/discovery/ios/iosUITests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/samples/discovery/ios/iosUITests/iosUITests.swift b/samples/discovery/ios/iosUITests/iosUITests.swift deleted file mode 100644 index 8fb13f20..00000000 --- a/samples/discovery/ios/iosUITests/iosUITests.swift +++ /dev/null @@ -1,35 +0,0 @@ -import XCTest - -class appNameUITests: XCTestCase { - - override func setUp() { - // Put setup code here. This method is called before the invocation of each test method in the class. - - // In UI tests it is usually best to stop immediately when a failure occurs. - continueAfterFailure = false - - // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - } - - func testExample() { - // UI tests must launch the application that they test. - let app = XCUIApplication() - app.launch() - - // Use recording to get started writing UI tests. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testLaunchPerformance() { - if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { - // This measures how long it takes to launch your application. - measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) { - XCUIApplication().launch() - } - } - } -} diff --git a/samples/discovery/theme/build.gradle.kts b/samples/discovery/theme/build.gradle.kts deleted file mode 100644 index d3ee621f..00000000 --- a/samples/discovery/theme/build.gradle.kts +++ /dev/null @@ -1,42 +0,0 @@ -plugins { - kotlin("multiplatform") - kotlin("plugin.serialization") - id("com.android.library") - id("org.jetbrains.compose") version Version.composeMultiplatform -} - -group = "com.dropbox.componentbox.discovery" - -kotlin { - android() - jvm() - - sourceSets { - val commonMain by getting { - dependencies { - implementation(project(":componentbox")) - implementation(project(":util")) - - implementation(compose.runtime) - implementation(compose.ui) - implementation(compose.foundation) - implementation(compose.preview) - implementation(compose.material) - - with(Deps.Kotlin){ - implementation(reflect) - } - - with(Deps.AndroidX){ - implementation(appCompat) - } - implementation(kotlin("reflect")) - } - } - } -} - -android { - compileSdk = Version.androidCompileSdk - -} \ No newline at end of file diff --git a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/RealResourceProvider.kt b/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/RealResourceProvider.kt deleted file mode 100644 index f820786b..00000000 --- a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/RealResourceProvider.kt +++ /dev/null @@ -1,25 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.Colors -import com.dropbox.componentbox.foundation.Images -import com.dropbox.componentbox.foundation.ResourceProvider -import com.dropbox.componentbox.foundation.Typography -import com.dropbox.componentbox.samples.discovery.color.DiscoveryColors -import com.dropbox.componentbox.samples.discovery.drawable.DiscoveryImages -import com.dropbox.componentbox.samples.discovery.type.DiscoveryTypography -import com.dropbox.componentbox.samples.discovery.vector.DiscoveryIcons - -class RealResourceProvider : ResourceProvider { - @Composable - override fun icons() = DiscoveryIcons() - - @Composable - override fun images(): Images = DiscoveryImages() - - @Composable - override fun typography(): Typography = DiscoveryTypography - - @Composable - override fun colors(): Colors = DiscoveryColors -} \ No newline at end of file diff --git a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/DiscoveryImages.kt b/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/DiscoveryImages.kt deleted file mode 100644 index 9193cbfd..00000000 --- a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/DiscoveryImages.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.drawable - -import com.dropbox.componentbox.discovery.theme.R -import com.dropbox.componentbox.foundation.Image -import com.dropbox.componentbox.foundation.Images -import com.dropbox.componentbox.foundation.RealImage - -actual class DiscoveryImages : Images { - actual val placeholder: Image = RealImage("Placeholder", R.drawable.placeholder) - actual val trafficRoadBlocked: Image = RealImage("TrafficRoadBlocked", R.drawable.traffic_road_blocked) - - override fun list(): MutableList = mutableListOf( - placeholder, - trafficRoadBlocked - ) -} \ No newline at end of file diff --git a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/imageRes.kt b/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/imageRes.kt deleted file mode 100644 index 19ea165d..00000000 --- a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/imageRes.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.drawable - -import com.dropbox.componentbox.foundation.MultiplatformRes - -actual fun String?.imageRes(): MultiplatformRes { - val images = DiscoveryImages() - - if (this == null) return images.placeholder - - return images.get(this) -} - - diff --git a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/use.kt b/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/use.kt deleted file mode 100644 index d3977140..00000000 --- a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/use.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.drawable - -import com.dropbox.componentbox.foundation.Image -import com.dropbox.componentbox.foundation.ImageType -import com.dropbox.componentbox.foundation.MultiplatformRes - -actual fun Image.use(type: ImageType): MultiplatformRes = this - -actual fun discoveryImages(): DiscoveryImages = DiscoveryImages() \ No newline at end of file diff --git a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/type/DiscoveryTypography.kt b/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/type/DiscoveryTypography.kt deleted file mode 100644 index 6d41e419..00000000 --- a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/type/DiscoveryTypography.kt +++ /dev/null @@ -1,168 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.type - -import androidx.compose.runtime.Composable -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.sp -import com.dropbox.componentbox.foundation.RealTextStyle -import com.dropbox.componentbox.foundation.TextStyle -import com.dropbox.componentbox.foundation.Typography - -actual object DiscoveryTypography : Typography { - override val h1: TextStyle = RealTextStyle( - name = "h1", - fontFamily = headlineFontFamily(), - fontWeight = FontWeight.Bold, - fontSize = 24.sp - ) - - override val h2: TextStyle = RealTextStyle( - name = "h2", - fontFamily = headlineFontFamily(), - fontWeight = FontWeight.Bold, - fontSize = 22.sp - ) - - override val h3: TextStyle = RealTextStyle( - name = "h3", - fontFamily = headlineFontFamily(), - fontWeight = FontWeight.Bold, - fontSize = 20.sp - ) - - override val h4: TextStyle = RealTextStyle( - name = "h4", - fontFamily = headlineFontFamily(), - fontWeight = FontWeight.Bold, - fontSize = 18.sp - ) - - override val h5: TextStyle = RealTextStyle( - name = "h5", - fontFamily = headlineFontFamily(), - fontWeight = FontWeight.Bold, - fontSize = 16.sp - ) - - override val h6: TextStyle = RealTextStyle( - name = "h6", - fontFamily = headlineFontFamily(), - fontWeight = FontWeight.Bold, - fontSize = 14.sp - ) - - override val body1: TextStyle = RealTextStyle( - name = "body1", - fontFamily = bodyFontFamily(), - fontWeight = FontWeight.Normal, - fontSize = 14.sp - ) - - override val body2: TextStyle = RealTextStyle( - name = "body2", - fontFamily = bodyFontFamily(), - fontWeight = FontWeight.Normal, - fontSize = 12.sp - ) - - override val button: TextStyle = RealTextStyle( - name = "button", - fontFamily = buttonFontFamily(), - fontWeight = FontWeight.Bold, - fontSize = 14.sp - ) - - override val caption: TextStyle = RealTextStyle( - name = "caption", - fontFamily = captionFontFamily(), - fontWeight = FontWeight.Light, - fontSize = 8.sp - ) - - override fun list(): MutableList = mutableListOf( - h1, h2, h3, h4, h5, h6, body1, body2, button, caption - ) -} - -@Composable -fun String?.textStyle(): TextStyle = when (this) { - DiscoveryTypography.h1.name -> DiscoveryTypography.h1 - DiscoveryTypography.h2.name -> DiscoveryTypography.h2 - DiscoveryTypography.h3.name -> DiscoveryTypography.h3 - DiscoveryTypography.h4.name -> DiscoveryTypography.h4 - DiscoveryTypography.h5.name -> DiscoveryTypography.h5 - DiscoveryTypography.h6.name -> DiscoveryTypography.h6 - DiscoveryTypography.body1.name -> DiscoveryTypography.body1 - DiscoveryTypography.body2.name -> DiscoveryTypography.body2 - DiscoveryTypography.button.name -> DiscoveryTypography.button - DiscoveryTypography.caption.name -> DiscoveryTypography.caption - else -> DiscoveryTypography.body2 -} - -@Composable -fun TextStyle.textStyle(): androidx.compose.ui.text.TextStyle = when (this) { - DiscoveryTypography.h1 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.h2 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.h3 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.h4 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.h5 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.h6 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.body1 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.body2 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.button -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.caption -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - else -> androidx.compose.ui.text.TextStyle(fontFamily = fontFamily, fontSize = fontSize, fontWeight = fontWeight) -} - -@Composable -fun Typography.materialTheme() = androidx.compose.material.Typography( - h1 = this.h1.textStyle(), - h2 = this.h2.textStyle(), - h3 = this.h3.textStyle(), - h4 = this.h4.textStyle(), - h5 = this.h5.textStyle(), - h6 = this.h6.textStyle(), - body1 = this.body1.textStyle(), - body2 = this.body2.textStyle(), - caption = this.caption.textStyle(), - button = this.button.textStyle() -) \ No newline at end of file diff --git a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/type/font.kt b/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/type/font.kt deleted file mode 100644 index 3d1cf73f..00000000 --- a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/type/font.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.type - -import androidx.compose.ui.text.font.Font -import androidx.compose.ui.text.font.FontFamily -import com.dropbox.componentbox.discovery.theme.R - -val sharpGroteskBookFontFamily = FontFamily(listOf(Font(R.font.sharp_grotesk_book))) -val atlasGroteskFontFamily = FontFamily(listOf(Font(R.font.atlasgrotesk_medium))) - -actual fun defaultFontFamily(): FontFamily = sharpGroteskBookFontFamily -actual fun headlineFontFamily(): FontFamily = sharpGroteskBookFontFamily -actual fun bodyFontFamily(): FontFamily = atlasGroteskFontFamily -actual fun buttonFontFamily(): FontFamily = atlasGroteskFontFamily -actual fun captionFontFamily(): FontFamily = atlasGroteskFontFamily \ No newline at end of file diff --git a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/DiscoveryIcons.kt b/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/DiscoveryIcons.kt deleted file mode 100644 index 625e14df..00000000 --- a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/DiscoveryIcons.kt +++ /dev/null @@ -1,66 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.vector - -import com.dropbox.componentbox.discovery.theme.R -import com.dropbox.componentbox.foundation.Icon -import com.dropbox.componentbox.foundation.Icons -import com.dropbox.componentbox.foundation.RealVectorRes - -actual class DiscoveryIcons : Icons { - actual val checkmarkCircle = Icon( - line = RealVectorRes("CheckmarkCircle.Line", R.drawable.ic_dig_checkmark_circle_line), - fill = RealVectorRes("CheckmarkCircle.Fill", R.drawable.ic_dig_checkmark_circle_fill), - pictogram = null, - spot = null, - ) - - actual val fail = Icon( - line = RealVectorRes("Fail.Line", R.drawable.ic_dig_fail_line), - fill = RealVectorRes("Fail.Fill", R.drawable.ic_dig_fail_fill), - pictogram = null, - spot = null, - ) - - actual val twinkle2 = Icon( - line = RealVectorRes("Twinkle2.Line", R.drawable.ic_dig_twinkle_2_line), - fill = RealVectorRes("Twinkle2.Fill", R.drawable.ic_dig_twinkle_2_fill), - pictogram = null, - spot = null, - ) - - actual val home = Icon( - line = RealVectorRes("Home.Line", R.drawable.ic_dig_home_line), - fill = RealVectorRes("Home.fill", R.drawable.ic_dig_home_fill), - pictogram = null, - spot = null - ) - - actual val image = Icon( - line = RealVectorRes("Image.Line", R.drawable.ic_dig_image_line), - fill = RealVectorRes("Image.fill", R.drawable.ic_dig_image_fill), - pictogram = null, - spot = null - ) - actual val upgrade = Icon( - line = RealVectorRes("Upgrade.Line", R.drawable.ic_dig_upgrade_line), - fill = null, - pictogram = null, - spot = null - ) - actual val person = Icon( - line = RealVectorRes("Home.Line", R.drawable.ic_dig_person_line), - fill = RealVectorRes("Home.fill", R.drawable.ic_dig_person_fill), - pictogram = null, - spot = null - ) - - - override fun list() = mutableListOf( - checkmarkCircle, - fail, - twinkle2, - home, - image, - upgrade, - person - ) -} \ No newline at end of file diff --git a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/iconRes.kt b/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/iconRes.kt deleted file mode 100644 index 563acd21..00000000 --- a/samples/discovery/theme/src/androidMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/iconRes.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.vector - -import com.dropbox.componentbox.foundation.MultiplatformRes - -actual fun String?.iconRes(): MultiplatformRes { - val icons = DiscoveryIcons() - - if (this == null) return icons.fail.line - - val split = this.split(".") - val name = split[0] - val type = split[1] - - val icon = icons.get(name) - val iconType = type.iconType() - return icon.use(iconType) -} \ No newline at end of file diff --git a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/color/colors.kt b/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/color/colors.kt deleted file mode 100644 index b2a5a797..00000000 --- a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/color/colors.kt +++ /dev/null @@ -1,124 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.color - -import androidx.compose.runtime.Composable -import androidx.compose.material.Colors as MaterialColors -import androidx.compose.ui.graphics.Color as ComposeColor -import com.dropbox.componentbox.foundation.Color as ComponentBoxColor -import com.dropbox.componentbox.foundation.Colors as ComponentBoxColors - -object DiscoveryColors : ComponentBoxColors { - override val primary = - ComponentBoxColor( - title = "Primary", - light = 0xFF0061FE, - dark = 0xFF3984FF - ) - - override val primaryVariant = - ComponentBoxColor( - title = "Primary variant", - light = 0x663984FF, - dark = 0x290061FE - ) - - override val secondary = - ComponentBoxColor( - title = "Secondary", - light = 0xFFF7F5F2, - dark = 0xFF1E1918 - ) - - override val secondaryVariant = - ComponentBoxColor(title = "Secondary variant", light = 0x33A69171, dark = 0x33BABABA) - override val background = ComponentBoxColor(title = "Background", light = 0xFFFFFFFF, dark = 0xFF161313) - override val surface = ComponentBoxColor(title = "Surface", light = 0xFFFBFAF9, dark = 0xFF2B2929) - override val error = ComponentBoxColor(title = "Error", light = 0xFF9B0032, dark = 0xFFFA551E) - override val onPrimary = ComponentBoxColor(title = "On primary", light = 0xFFF7F5F2, dark = 0xFF1E1917) - override val onSecondary = ComponentBoxColor(title = "On secondary", light = 0xFF1E1919, dark = 0xFFF7F5F7) - override val onBackground = ComponentBoxColor(title = "On background", light = 0xFF1E1919, dark = 0xFFFFFFFF) - override val onSurface = ComponentBoxColor(title = "On surface", light = 0xFF2B2929, dark = 0xFFFBFAF9) - override val onError = ComponentBoxColor(title = "On error", light = 0xFFF7F5F2, dark = 0xFF1E1915) - val disabledBackground = ComponentBoxColor(title = "Disabled background", light = 0xFFF3F0EB, dark = 0xFFD8D3CB) - val standardBackgroundElevated = - ComponentBoxColor(title = "Standard background elevated", light = 0xFFFBFAF9, dark = 0xFF2B2929) - val successFill = ComponentBoxColor(title = "Success fill", light = 0xFFB4DC19, dark = 0xFFB4DC19) - val faintText = ComponentBoxColor(title = "Faint text", light = 0xC7524A3E, dark = 0x99F7F5F6) - val standardText = ComponentBoxColor(title = "Standard text", light = 0xFF1E1919, dark = 0xFFF7F5F9) - - override fun list() = mutableListOf( - primary, - primaryVariant, - secondary, - secondaryVariant, - background, - surface, - error, - onPrimary, - onSecondary, - onBackground, - onSurface, - onError, - disabledBackground, - standardBackgroundElevated, - successFill, - faintText, - standardText - ) -} - -object Colors { - val Light = MaterialColors( - primary = ComposeColor(DiscoveryColors.primary.light), - primaryVariant = ComposeColor(DiscoveryColors.primaryVariant.light), - secondary = ComposeColor(DiscoveryColors.secondary.light), - secondaryVariant = ComposeColor(DiscoveryColors.secondaryVariant.light), - background = ComposeColor(DiscoveryColors.background.light), - surface = ComposeColor(DiscoveryColors.surface.light), - error = ComposeColor(DiscoveryColors.error.light), - onPrimary = ComposeColor(DiscoveryColors.onPrimary.light), - onSecondary = ComposeColor(DiscoveryColors.onSecondary.light), - onBackground = ComposeColor(DiscoveryColors.onBackground.light), - onSurface = ComposeColor(DiscoveryColors.onSurface.light), - onError = ComposeColor(DiscoveryColors.onError.light), - isLight = true, - ) - - val Dark = MaterialColors( - primary = ComposeColor(DiscoveryColors.primary.dark), - primaryVariant = ComposeColor(DiscoveryColors.primaryVariant.dark), - secondary = ComposeColor(DiscoveryColors.secondary.dark), - secondaryVariant = ComposeColor(DiscoveryColors.secondaryVariant.dark), - background = ComposeColor(DiscoveryColors.background.dark), - surface = ComposeColor(DiscoveryColors.surface.dark), - error = ComposeColor(DiscoveryColors.error.dark), - onPrimary = ComposeColor(DiscoveryColors.onPrimary.dark), - onSecondary = ComposeColor(DiscoveryColors.onSecondary.dark), - onBackground = ComposeColor(DiscoveryColors.onBackground.dark), - onSurface = ComposeColor(DiscoveryColors.onSurface.dark), - onError = ComposeColor(DiscoveryColors.onError.dark), - isLight = false, - ) -} - -val MaterialColors.disabledBackground: ComposeColor - @Composable - get() = if (isLight) ComposeColor(DiscoveryColors.disabledBackground.light) else ComposeColor(DiscoveryColors.disabledBackground.dark) - -val MaterialColors.standardBackgroundElevated: ComposeColor - @Composable - get() = if (isLight) ComposeColor(DiscoveryColors.standardBackgroundElevated.light) else ComposeColor( - DiscoveryColors.standardBackgroundElevated.dark - ) - -val MaterialColors.successFill: ComposeColor - @Composable - get() = if (isLight) ComposeColor(DiscoveryColors.successFill.light) else ComposeColor(DiscoveryColors.successFill.dark) - -val MaterialColors.faintText: ComposeColor - @Composable - get() = if (isLight) ComposeColor(DiscoveryColors.faintText.light) else ComposeColor(DiscoveryColors.faintText.dark) - -val MaterialColors.standardText: ComposeColor - @Composable - get() = if (isLight) ComposeColor(DiscoveryColors.standardText.light) else ComposeColor(DiscoveryColors.standardText.dark) - diff --git a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/discoveryTheme.kt b/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/discoveryTheme.kt deleted file mode 100644 index 2f74adda..00000000 --- a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/discoveryTheme.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import com.dropbox.componentbox.samples.discovery.color.Colors - -@Composable -fun discoveryTheme(isNightMode: Boolean, content: @Composable () -> Unit) { - val colors = remember { mutableStateOf(if (isNightMode) Colors.Dark else Colors.Light) } - - return MaterialTheme( - colors = colors.value, - content = content - ) -} \ No newline at end of file diff --git a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/DiscoveryImages.kt b/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/DiscoveryImages.kt deleted file mode 100644 index e7c42095..00000000 --- a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/DiscoveryImages.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.drawable - -import com.dropbox.componentbox.foundation.Image -import com.dropbox.componentbox.foundation.Images - -expect class DiscoveryImages : Images { - val placeholder: Image - val trafficRoadBlocked: Image -} \ No newline at end of file diff --git a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/image.kt b/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/image.kt deleted file mode 100644 index f0f6c62a..00000000 --- a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/image.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.drawable - -import com.dropbox.componentbox.foundation.Image -import com.dropbox.componentbox.foundation.ImageType -import com.dropbox.componentbox.foundation.MultiplatformRes - -expect fun discoveryImages(): DiscoveryImages -expect fun Image.use(type: ImageType): MultiplatformRes - -fun DiscoveryImages.get(name: String?) = when (name) { - "TrafficRoadBlocked" -> trafficRoadBlocked - else -> trafficRoadBlocked -} - -fun String?.imageType(): ImageType = when (this) { - "Light" -> ImageType.Light - "Dark" -> ImageType.Dark - else -> ImageType.Light -} - -fun String?.image(): Image { - val discoveryImages = discoveryImages() - return discoveryImages.get(this) -} \ No newline at end of file diff --git a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/imageRes.kt b/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/imageRes.kt deleted file mode 100644 index 52fd38e6..00000000 --- a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/imageRes.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.drawable - -import com.dropbox.componentbox.foundation.MultiplatformRes - -expect fun String?.imageRes(): MultiplatformRes \ No newline at end of file diff --git a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/type/DiscoveryTypography.kt b/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/type/DiscoveryTypography.kt deleted file mode 100644 index 1ef036fc..00000000 --- a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/type/DiscoveryTypography.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.type - -import com.dropbox.componentbox.foundation.Typography - -expect object DiscoveryTypography : Typography diff --git a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/type/font.kt b/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/type/font.kt deleted file mode 100644 index ce0fb0bd..00000000 --- a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/type/font.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.type - -import androidx.compose.ui.text.font.FontFamily - -expect fun defaultFontFamily(): FontFamily -expect fun headlineFontFamily(): FontFamily -expect fun bodyFontFamily(): FontFamily -expect fun buttonFontFamily(): FontFamily -expect fun captionFontFamily(): FontFamily \ No newline at end of file diff --git a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/DiscoveryIcons.kt b/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/DiscoveryIcons.kt deleted file mode 100644 index 9cb4a295..00000000 --- a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/DiscoveryIcons.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.vector - -import com.dropbox.componentbox.foundation.Icon -import com.dropbox.componentbox.foundation.Icons - -expect class DiscoveryIcons : Icons { - val checkmarkCircle: Icon - val fail: Icon - val twinkle2: Icon - val home: Icon - val image: Icon - val upgrade: Icon - val person: Icon -} \ No newline at end of file diff --git a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/icon.kt b/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/icon.kt deleted file mode 100644 index 60c6cbf9..00000000 --- a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/icon.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.vector - -import com.dropbox.componentbox.foundation.Icon -import com.dropbox.componentbox.foundation.IconType - -fun DiscoveryIcons.get(name: String?) = when (name) { - "CheckmarkCircle" -> checkmarkCircle - "Fail" -> fail - "Twinkle2" -> twinkle2 - else -> fail -} - -fun Icon.use(type: IconType) = when (type) { - IconType.Line -> this.line - IconType.Fill -> this.fill ?: this.line - IconType.Pictogram -> this.pictogram ?: this.line - IconType.Spot -> this.spot ?: this.line -} - -fun String?.iconType(): IconType = when (this) { - "Line" -> IconType.Line - "Fill" -> IconType.Fill - "Pictogram" -> IconType.Pictogram - "Spot" -> IconType.Spot - else -> IconType.Line -} \ No newline at end of file diff --git a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/iconRes.kt b/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/iconRes.kt deleted file mode 100644 index 058f2c9b..00000000 --- a/samples/discovery/theme/src/commonMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/iconRes.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.vector - -import com.dropbox.componentbox.foundation.MultiplatformRes - -expect fun String?.iconRes(): MultiplatformRes \ No newline at end of file diff --git a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/RealResourceProvider.kt b/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/RealResourceProvider.kt deleted file mode 100644 index 85304ae1..00000000 --- a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/RealResourceProvider.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import androidx.compose.runtime.Composable -import com.dropbox.componentbox.foundation.ResourceProvider -import com.dropbox.componentbox.samples.discovery.color.DiscoveryColors -import com.dropbox.componentbox.samples.discovery.drawable.DiscoveryImages -import com.dropbox.componentbox.samples.discovery.type.DiscoveryTypography -import com.dropbox.componentbox.samples.discovery.vector.DiscoveryIcons - -class RealResourceProvider : ResourceProvider { - @Composable - override fun icons() = DiscoveryIcons() - - @Composable - override fun images() = DiscoveryImages() - - @Composable - override fun typography() = DiscoveryTypography - - @Composable - override fun colors() = DiscoveryColors -} \ No newline at end of file diff --git a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/RealThemer.kt b/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/RealThemer.kt deleted file mode 100644 index 5b2074f1..00000000 --- a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/RealThemer.kt +++ /dev/null @@ -1,30 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.text.TextStyle -import com.dropbox.componentbox.foundation.Themer -import com.dropbox.componentbox.samples.discovery.drawable.DiscoveryImages -import com.dropbox.componentbox.samples.discovery.drawable.get -import com.dropbox.componentbox.util.translate - -class RealThemer : Themer() { - @Composable - override fun Theme(isNightMode: Boolean, content: @Composable () -> Unit) { - discoveryTheme(isNightMode, content) - } - - @Composable - override fun getDrawableResPath(name: String?): String? { - if (name == null) return null - - val image = DiscoveryImages().get(name) - return if (isSystemInDarkTheme() || !MaterialTheme.colors.isLight) image.dark.resPath else image.light.resPath - } - - @Composable - override fun getTextStyle(name: String?): TextStyle? { - return name.translate() - } -} \ No newline at end of file diff --git a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/DiscoveryImages.kt b/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/DiscoveryImages.kt deleted file mode 100644 index 6a0af5fc..00000000 --- a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/DiscoveryImages.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.drawable - -import com.dropbox.componentbox.foundation.Image -import com.dropbox.componentbox.foundation.Images -import com.dropbox.componentbox.foundation.RealImage -import com.dropbox.componentbox.foundation.RealMultiplatformRes - -actual class DiscoveryImages : Images { - - actual val placeholder: Image = RealImage( - name = "Placeholder", - light = RealMultiplatformRes("Placeholder.Light", "drawable-xhdpi/placeholder.webp"), - dark = RealMultiplatformRes("Placeholder.Dark", "drawable-night-xhdpi/placeholder.webp") - ) - - actual val trafficRoadBlocked: Image = RealImage( - name = "TrafficRoadBlocked", - light = RealMultiplatformRes("TrafficRoadBlocked.Light", "drawable-xhdpi/traffic_road_blocked.webp"), - dark = RealMultiplatformRes("TrafficRoadBlocked.Dark", "drawable-night-xhdpi/traffic_road_blocked.webp") - ) - - override fun list(): MutableList = mutableListOf( - placeholder, - trafficRoadBlocked - ) -} \ No newline at end of file diff --git a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/imageRes.kt b/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/imageRes.kt deleted file mode 100644 index 81953108..00000000 --- a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/imageRes.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.drawable - -import com.dropbox.componentbox.foundation.MultiplatformRes - -actual fun String?.imageRes(): MultiplatformRes { - val images = DiscoveryImages() - - if (this == null) return images.placeholder.light - - val split = this.split(".") - val name = split[0] - val type = split[1] - - val image = images.get(name) - val imageType = type.imageType() - return image.use(imageType) -} \ No newline at end of file diff --git a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/use.kt b/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/use.kt deleted file mode 100644 index 48c6d26c..00000000 --- a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/drawable/use.kt +++ /dev/null @@ -1,12 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.drawable - -import com.dropbox.componentbox.foundation.Image -import com.dropbox.componentbox.foundation.ImageType -import com.dropbox.componentbox.foundation.MultiplatformRes - -actual fun Image.use(type: ImageType): MultiplatformRes = when (type) { - ImageType.Light -> this.light - ImageType.Dark -> this.dark -} - -actual fun discoveryImages(): DiscoveryImages = DiscoveryImages() \ No newline at end of file diff --git a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/font.kt b/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/font.kt deleted file mode 100644 index bcfe1638..00000000 --- a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/font.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.dropbox.componentbox.samples.discovery - -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.text.platform.Font - diff --git a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/type/DiscoveryTypography.kt b/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/type/DiscoveryTypography.kt deleted file mode 100644 index f1cf5f09..00000000 --- a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/type/DiscoveryTypography.kt +++ /dev/null @@ -1,154 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.type - -import androidx.compose.runtime.Composable -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.sp -import com.dropbox.componentbox.foundation.RealTextStyle -import com.dropbox.componentbox.foundation.TextStyle -import com.dropbox.componentbox.foundation.Typography - -actual object DiscoveryTypography : Typography { - override val h1: TextStyle = RealTextStyle( - name = "h1", - fontFamily = headlineFontFamily(), - fontWeight = FontWeight.Bold, - fontSize = 24.sp - ) - - override val h2: TextStyle = RealTextStyle( - name = "h2", - fontFamily = headlineFontFamily(), - fontWeight = FontWeight.Bold, - fontSize = 22.sp - ) - - override val h3: TextStyle = RealTextStyle( - name = "h3", - fontFamily = headlineFontFamily(), - fontWeight = FontWeight.Bold, - fontSize = 20.sp - ) - - override val h4: TextStyle = RealTextStyle( - name = "h4", - fontFamily = headlineFontFamily(), - fontWeight = FontWeight.Bold, - fontSize = 18.sp - ) - - override val h5: TextStyle = RealTextStyle( - name = "h5", - fontFamily = headlineFontFamily(), - fontWeight = FontWeight.Bold, - fontSize = 16.sp - ) - - override val h6: TextStyle = RealTextStyle( - name = "h6", - fontFamily = headlineFontFamily(), - fontWeight = FontWeight.Bold, - fontSize = 14.sp - ) - - override val body1: TextStyle = RealTextStyle( - name = "body1", - fontFamily = bodyFontFamily(), - fontWeight = FontWeight.Normal, - fontSize = 14.sp - ) - - override val body2: TextStyle = RealTextStyle( - name = "body2", - fontFamily = bodyFontFamily(), - fontWeight = FontWeight.Normal, - fontSize = 12.sp - ) - - override val button: TextStyle = RealTextStyle( - name = "button", - fontFamily = buttonFontFamily(), - fontWeight = FontWeight.Bold, - fontSize = 14.sp - ) - - override val caption: TextStyle = RealTextStyle( - name = "caption", - fontFamily = captionFontFamily(), - fontWeight = FontWeight.Light, - fontSize = 8.sp - ) - - override fun list(): MutableList = mutableListOf( - h1, h2, h3, h4, h5, h6, body1, body2, button, caption - ) -} - -@Composable -fun String?.textStyle(): TextStyle = when (this) { - DiscoveryTypography.h1.name -> DiscoveryTypography.h1 - DiscoveryTypography.h2.name -> DiscoveryTypography.h2 - DiscoveryTypography.h3.name -> DiscoveryTypography.h3 - DiscoveryTypography.h4.name -> DiscoveryTypography.h4 - DiscoveryTypography.h5.name -> DiscoveryTypography.h5 - DiscoveryTypography.h6.name -> DiscoveryTypography.h6 - DiscoveryTypography.body1.name -> DiscoveryTypography.body1 - DiscoveryTypography.body2.name -> DiscoveryTypography.body2 - DiscoveryTypography.button.name -> DiscoveryTypography.button - DiscoveryTypography.caption.name -> DiscoveryTypography.caption - else -> DiscoveryTypography.body2 -} - -@Composable -fun TextStyle.textStyle(): androidx.compose.ui.text.TextStyle = when (this) { - DiscoveryTypography.h1 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.h2 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.h3 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.h4 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.h5 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.h6 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.body1 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.body2 -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.button -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - DiscoveryTypography.caption -> androidx.compose.ui.text.TextStyle( - fontFamily = fontFamily, - fontSize = fontSize, - fontWeight = fontWeight - ) - else -> androidx.compose.ui.text.TextStyle(fontFamily = fontFamily, fontSize = fontSize, fontWeight = fontWeight) -} \ No newline at end of file diff --git a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/type/font.kt b/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/type/font.kt deleted file mode 100644 index 29eb5b85..00000000 --- a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/type/font.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.type - -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.text.platform.Font - -val atlasGroteskFontFamily = - FontFamily( - listOf( - Font("font/atlasgrotesk_medium.ttf"), - ) - ) - -val sharpGroteskBookFontFamily = - FontFamily( - listOf( - Font("font/sharpgrotesk_book.ttf") - ) - ) - -actual fun defaultFontFamily(): FontFamily = sharpGroteskBookFontFamily -actual fun headlineFontFamily(): FontFamily = sharpGroteskBookFontFamily -actual fun bodyFontFamily(): FontFamily = atlasGroteskFontFamily -actual fun buttonFontFamily(): FontFamily = atlasGroteskFontFamily -actual fun captionFontFamily(): FontFamily = atlasGroteskFontFamily \ No newline at end of file diff --git a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/DiscoveryIcons.kt b/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/DiscoveryIcons.kt deleted file mode 100644 index 6ab72109..00000000 --- a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/DiscoveryIcons.kt +++ /dev/null @@ -1,58 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.vector - -import com.dropbox.componentbox.foundation.Icon -import com.dropbox.componentbox.foundation.Icons -import com.dropbox.componentbox.foundation.MultiplatformRes -import com.dropbox.componentbox.foundation.RealVectorRes - -actual class DiscoveryIcons : Icons { - actual val checkmarkCircle = Icon( - line = RealVectorRes("CheckmarkCircle.Line", "drawable/ic_dig_checkmark_circle_line.xml"), - fill = RealVectorRes("CheckmarkCircle.Fill", "drawable/ic_dig_checkmark_circle_fill.xml"), - pictogram = null, - spot = null, - ) - - actual val fail = Icon( - line = RealVectorRes("Fail.Line", "drawable/ic_dig_fail_line.xml"), - fill = RealVectorRes("Fail.Fill", "drawable/ic_dig_fail_fill.xml"), - pictogram = null, - spot = null, - ) - - actual val twinkle2 = Icon( - line = RealVectorRes("Twinkle2.Line", "drawable/ic_dig_twinkle_2_line.xml"), - fill = RealVectorRes("Twinkle2.Fill", "drawable/ic_dig_twinkle_2_fill.xml"), - pictogram = null, - spot = null, - ) - - actual val home: Icon - get() = TODO("Not yet implemented") - actual val image: Icon - get() = TODO("Not yet implemented") - actual val upgrade: Icon - get() = TODO("Not yet implemented") - actual val person: Icon - get() = TODO("Not yet implemented") - - override fun list() = mutableListOf( - checkmarkCircle, - fail, - twinkle2 - ) - - override fun resPaths(): MutableList { - val icons = list() - val resPaths: MutableList = mutableListOf() - - icons.forEach { icon -> - resPaths.add(icon.line) - if (icon.fill != null) resPaths.add(icon.fill!!) - if (icon.pictogram != null) resPaths.add(icon.pictogram!!) - if (icon.spot != null) resPaths.add(icon.spot!!) - } - - return resPaths - } -} \ No newline at end of file diff --git a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/iconRes.kt b/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/iconRes.kt deleted file mode 100644 index 563acd21..00000000 --- a/samples/discovery/theme/src/jvmMain/kotlin/com/dropbox/componentbox/samples/discovery/vector/iconRes.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.dropbox.componentbox.samples.discovery.vector - -import com.dropbox.componentbox.foundation.MultiplatformRes - -actual fun String?.iconRes(): MultiplatformRes { - val icons = DiscoveryIcons() - - if (this == null) return icons.fail.line - - val split = this.split(".") - val name = split[0] - val type = split[1] - - val icon = icons.get(name) - val iconType = type.iconType() - return icon.use(iconType) -} \ No newline at end of file diff --git a/samples/discovery/theme/src/main/AndroidManifest.xml b/samples/discovery/theme/src/main/AndroidManifest.xml deleted file mode 100644 index e82b1433..00000000 --- a/samples/discovery/theme/src/main/AndroidManifest.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/samples/discovery/theme/src/main/res/drawable-hdpi/roadblock.webp b/samples/discovery/theme/src/main/res/drawable-hdpi/roadblock.webp deleted file mode 100644 index 8cedb2bb..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable-hdpi/roadblock.webp and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable-night-xhdpi/placeholder.webp b/samples/discovery/theme/src/main/res/drawable-night-xhdpi/placeholder.webp deleted file mode 100644 index 2e1dba92..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable-night-xhdpi/placeholder.webp and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable-night-xhdpi/traffic_road_blocked.webp b/samples/discovery/theme/src/main/res/drawable-night-xhdpi/traffic_road_blocked.webp deleted file mode 100644 index 8732ecbf..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable-night-xhdpi/traffic_road_blocked.webp and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable-xhdpi/placeholder.webp b/samples/discovery/theme/src/main/res/drawable-xhdpi/placeholder.webp deleted file mode 100644 index 2e1dba92..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable-xhdpi/placeholder.webp and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable-xhdpi/roadblock.webp b/samples/discovery/theme/src/main/res/drawable-xhdpi/roadblock.webp deleted file mode 100644 index 5f0c60bb..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable-xhdpi/roadblock.webp and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable-xhdpi/traffic_road_blocked.webp b/samples/discovery/theme/src/main/res/drawable-xhdpi/traffic_road_blocked.webp deleted file mode 100644 index e1148ff5..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable-xhdpi/traffic_road_blocked.webp and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable-xxhdpi/dog_digs.webp b/samples/discovery/theme/src/main/res/drawable-xxhdpi/dog_digs.webp deleted file mode 100644 index 79fa19d9..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable-xxhdpi/dog_digs.webp and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable-xxhdpi/roadblock.webp b/samples/discovery/theme/src/main/res/drawable-xxhdpi/roadblock.webp deleted file mode 100644 index 6015f07c..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable-xxhdpi/roadblock.webp and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable-xxhdpi/travel_backpack.webp b/samples/discovery/theme/src/main/res/drawable-xxhdpi/travel_backpack.webp deleted file mode 100644 index 0d60f4a4..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable-xxhdpi/travel_backpack.webp and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable-xxhdpi/van_cityscape.webp b/samples/discovery/theme/src/main/res/drawable-xxhdpi/van_cityscape.webp deleted file mode 100644 index d46bdb42..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable-xxhdpi/van_cityscape.webp and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable-xxxhdpi/roadblock.webp b/samples/discovery/theme/src/main/res/drawable-xxxhdpi/roadblock.webp deleted file mode 100644 index 24ce1832..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable-xxxhdpi/roadblock.webp and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable/background.webp b/samples/discovery/theme/src/main/res/drawable/background.webp deleted file mode 100644 index 9e774e2c..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable/background.webp and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable/chevron_down.png b/samples/discovery/theme/src/main/res/drawable/chevron_down.png deleted file mode 100644 index f031a5dc..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable/chevron_down.png and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable/chevron_up.png b/samples/discovery/theme/src/main/res/drawable/chevron_up.png deleted file mode 100644 index 933bdb00..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable/chevron_up.png and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable/dig_dropbox_logo.xml b/samples/discovery/theme/src/main/res/drawable/dig_dropbox_logo.xml deleted file mode 100644 index f584567c..00000000 --- a/samples/discovery/theme/src/main/res/drawable/dig_dropbox_logo.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_arrow_right_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_arrow_right_line.xml deleted file mode 100644 index 60e602ff..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_arrow_right_line.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_backup_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_backup_line.xml deleted file mode 100644 index a3f9a3df..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_backup_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_camera_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_camera_line.xml deleted file mode 100644 index b1d4cee0..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_camera_line.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_camera_upload_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_camera_upload_line.xml deleted file mode 100644 index 471a3ff2..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_camera_upload_line.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_checkmark_circle_fill.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_checkmark_circle_fill.xml deleted file mode 100644 index 9a22b4a3..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_checkmark_circle_fill.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_checkmark_circle_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_checkmark_circle_line.xml deleted file mode 100644 index 68ee9fec..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_checkmark_circle_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_close_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_close_line.xml deleted file mode 100644 index 0119c88b..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_close_line.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_computer_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_computer_line.xml deleted file mode 100644 index 79db8eed..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_computer_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_dropbox_backup_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_dropbox_backup_line.xml deleted file mode 100644 index 26dc6d81..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_dropbox_backup_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_dropbox_capture_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_dropbox_capture_line.xml deleted file mode 100644 index f9857bda..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_dropbox_capture_line.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_dropbox_passwords_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_dropbox_passwords_line.xml deleted file mode 100644 index e5625dee..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_dropbox_passwords_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_edit_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_edit_line.xml deleted file mode 100644 index 89876ec0..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_edit_line.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_fail_fill.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_fail_fill.xml deleted file mode 100644 index 51097ac1..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_fail_fill.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_fail_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_fail_line.xml deleted file mode 100644 index 876081c0..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_fail_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_home_fill.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_home_fill.xml deleted file mode 100644 index 8dc9f779..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_home_fill.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_home_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_home_line.xml deleted file mode 100644 index f608c4bf..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_home_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_image_fill.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_image_fill.xml deleted file mode 100644 index bfb20350..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_image_fill.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_image_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_image_line.xml deleted file mode 100644 index e4fb79aa..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_image_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_list_view_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_list_view_line.xml deleted file mode 100644 index b28b79d6..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_list_view_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_member_transfer_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_member_transfer_line.xml deleted file mode 100644 index 49592d16..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_member_transfer_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_mobile_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_mobile_line.xml deleted file mode 100644 index 6ea49e20..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_mobile_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_person_fill.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_person_fill.xml deleted file mode 100644 index 108358fb..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_person_fill.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_person_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_person_line.xml deleted file mode 100644 index ed947bd3..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_person_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_scan_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_scan_line.xml deleted file mode 100644 index f2e875b2..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_scan_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_settings_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_settings_line.xml deleted file mode 100644 index 3e27ac41..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_settings_line.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_space_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_space_line.xml deleted file mode 100644 index e6d1da87..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_space_line.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_switcher_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_switcher_line.xml deleted file mode 100644 index 0c464d17..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_switcher_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_syncing_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_syncing_line.xml deleted file mode 100644 index 97afcad1..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_syncing_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_twinkle_1_fill.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_twinkle_1_fill.xml deleted file mode 100644 index 8f429e1f..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_twinkle_1_fill.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_twinkle_1_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_twinkle_1_line.xml deleted file mode 100644 index 0ef3534d..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_twinkle_1_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_twinkle_2_fill.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_twinkle_2_fill.xml deleted file mode 100644 index 034f9b43..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_twinkle_2_fill.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_twinkle_2_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_twinkle_2_line.xml deleted file mode 100644 index 3bc75aa6..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_twinkle_2_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_upgrade_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_upgrade_line.xml deleted file mode 100644 index 88db0b22..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_upgrade_line.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_upload_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_upload_line.xml deleted file mode 100644 index 499d10a0..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_upload_line.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/ic_dig_warning_line.xml b/samples/discovery/theme/src/main/res/drawable/ic_dig_warning_line.xml deleted file mode 100644 index aa6ab00c..00000000 --- a/samples/discovery/theme/src/main/res/drawable/ic_dig_warning_line.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/samples/discovery/theme/src/main/res/drawable/info.png b/samples/discovery/theme/src/main/res/drawable/info.png deleted file mode 100644 index 867d6517..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable/info.png and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable/passwords.webp b/samples/discovery/theme/src/main/res/drawable/passwords.webp deleted file mode 100644 index ea3c276d..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable/passwords.webp and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/drawable/tag.jpeg b/samples/discovery/theme/src/main/res/drawable/tag.jpeg deleted file mode 100644 index 05ed48f5..00000000 Binary files a/samples/discovery/theme/src/main/res/drawable/tag.jpeg and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/font/atlas_grotesk.xml b/samples/discovery/theme/src/main/res/font/atlas_grotesk.xml deleted file mode 100644 index 699dc5a1..00000000 --- a/samples/discovery/theme/src/main/res/font/atlas_grotesk.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/font/atlas_grotesk_bold.xml b/samples/discovery/theme/src/main/res/font/atlas_grotesk_bold.xml deleted file mode 100644 index efcf7319..00000000 --- a/samples/discovery/theme/src/main/res/font/atlas_grotesk_bold.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/font/atlasgrotesk_medium.ttf b/samples/discovery/theme/src/main/res/font/atlasgrotesk_medium.ttf deleted file mode 100644 index fd0025aa..00000000 Binary files a/samples/discovery/theme/src/main/res/font/atlasgrotesk_medium.ttf and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/font/atlasgrotesk_regular.ttf b/samples/discovery/theme/src/main/res/font/atlasgrotesk_regular.ttf deleted file mode 100644 index 17bd78bd..00000000 Binary files a/samples/discovery/theme/src/main/res/font/atlasgrotesk_regular.ttf and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/font/sharp_grotesk.xml b/samples/discovery/theme/src/main/res/font/sharp_grotesk.xml deleted file mode 100644 index 2a0f9b63..00000000 --- a/samples/discovery/theme/src/main/res/font/sharp_grotesk.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/font/sharp_grotesk_book.xml b/samples/discovery/theme/src/main/res/font/sharp_grotesk_book.xml deleted file mode 100644 index 0ac4ca73..00000000 --- a/samples/discovery/theme/src/main/res/font/sharp_grotesk_book.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/samples/discovery/theme/src/main/res/font/sharpgrotesk_book.ttf b/samples/discovery/theme/src/main/res/font/sharpgrotesk_book.ttf deleted file mode 100644 index c98e4687..00000000 Binary files a/samples/discovery/theme/src/main/res/font/sharpgrotesk_book.ttf and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/font/sharpgrotesk_medium.ttf b/samples/discovery/theme/src/main/res/font/sharpgrotesk_medium.ttf deleted file mode 100644 index 6d5d7b57..00000000 Binary files a/samples/discovery/theme/src/main/res/font/sharpgrotesk_medium.ttf and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/roadblock.png b/samples/discovery/theme/src/main/res/roadblock.png deleted file mode 100644 index bcd3d240..00000000 Binary files a/samples/discovery/theme/src/main/res/roadblock.png and /dev/null differ diff --git a/samples/discovery/theme/src/main/res/values-night/colors.xml b/samples/discovery/theme/src/main/res/values-night/colors.xml deleted file mode 100644 index 3e713166..00000000 --- a/samples/discovery/theme/src/main/res/values-night/colors.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - #4DFA551E - #FFFA551E - #66FA551E - #FFFA551E - #663984FF - #293984FF - #FF3984FF - #663984FF - #FF3984FF - #FF3984FF - #FFF7F5F3 - #FF1E1918 - #FFD8D3CB - #4DF7F5F4 - #4DF7F5F5 - #FF2B2929 - #FF242121 - #33BABABA - #99F7F5F6 - - #1A9B0032 - #FF9B0032 - #529B0032 - #FF9B0032 - #290061FE - #140061FE - #FF0061FE - #520061FE - #FF0061FE - #FF0061FE - #FF1E1917 - #FFF7F5F7 - #FFC0BBB4 - #FFC0BBB4 - #66524A3E - #FFFBFAF9 - #FFF7F5F8 - #33A69171 - #C7524A3E - #24A69171 - #3DA69171 - #52A69171 - #FFFFFFFF - #99A69E92 - #FF1E1915 - #1F2D8000 - #FF2D8000 - #522D8000 - #FF2D8000 - #3DFAD24B - #FF9B6400 - #529B6400 - #FF9B6400 - - #298E8B87 - #3D8E8B87 - #528E8B87 - #FF161313 - #808E8B87 - #FFF7F5F9 - #4DB4DC19 - #FFB4DC19 - #66B4DC19 - #FFB4DC19 - #4DFAD24B - #FFFAD24B - #66FAD24B - #FFFAD24B - @color/color__core__accent - diff --git a/samples/discovery/theme/src/main/res/values/colors.xml b/samples/discovery/theme/src/main/res/values/colors.xml deleted file mode 100644 index a31f043b..00000000 --- a/samples/discovery/theme/src/main/res/values/colors.xml +++ /dev/null @@ -1,192 +0,0 @@ - - - #FFCD2F7B - #FFFAD24B - #FF0F503C - #FFB4C8E1 - #FF9B0032 - #FF9B6400 - #FFB4DC19 - #FF283750 - #FF007891 - #FFC8AFF0 - #FFFFAFA5 - #FF78286E - #FFBE4B0A - #FFFA551E - #FFFF8C19 - #FF14C8EB - #1A9B0032 - #FF9B0032 - #529B0032 - #FF9B0032 - #290061FE - #140061FE - #FF0061FE - #520061FE - #FF0061FE - #FF0061FE - #FF1E1919 - #FFF7F5F2 - #FFC0BBB4 - #FFC0BBB4 - #66524A3E - #FFFBFAF9 - #FFF7F5F2 - #33A69171 - #C7524A3E - #FFCD2F7B - #FFFAD24B - #FF0F503C - #FFB4C8E1 - #FF9B0032 - #FF9B6400 - #FFB4DC19 - #FF283750 - #FF007891 - #FFC8AFF0 - #FFFFAFA5 - #FF78286E - #FFBE4B0A - #FFFA551E - #FFFF8C19 - #FF14C8EB - #FF1E1919 - #FF1E1919 - #FFFFF9EF - #FFE0DBD6 - #FFC6C6C6 - #FFB2AAA4 - #FF8A8A8A - #FFE5C892 - #FFCAA672 - #FFC1A483 - #FFC2926E - #FF965128 - #FF8A6B3E - #FF6F4328 - #FFA67A5A - #FFA25E3A - #FF7A3B24 - #FF56241A - #FF97795E - #FF745135 - #FF604430 - #FF796A61 - #FF544A44 - #FF422608 - #FF322011 - #FF351800 - #FFFBDCBE - #FFF8DADA - #FFF4CBAE - #FFFACCBC - #FFEFBC96 - #FFE7BFA6 - #FFF2B289 - #FFDFB193 - #FFDBA889 - #FFE39D77 - #FFD19063 - #FFAD785C - #FFCF7D42 - #FFB4724B - #FFC3672D - #FFB06330 - #FFB0591A - #FF905235 - #FF914C30 - #FF974523 - #FF843F18 - #FF793C23 - #FF6E3515 - #FF68352A - #4DFA551E - #FFFA551E - #66FA551E - #FFFA551E - #663984FF - #293984FF - #FF3984FF - #663984FF - #FF3984FF - #FF3984FF - #FFF7F5F2 - #FF1E1919 - #FFD8D3CB - #4DF7F5F2 - #4DF7F5F2 - #FF2B2929 - #FF242121 - #33BABABA - #99F7F5F2 - #298E8B87 - #3D8E8B87 - #528E8B87 - #FF161313 - #808E8B87 - #FFF7F5F2 - #4DB4DC19 - #FFB4DC19 - #66B4DC19 - #FFB4DC19 - #4DFAD24B - #FFFAD24B - #66FAD24B - #FFFAD24B - - - #4DFA551E - #FFFA551E - #66FA551E - #FFFA551E - #663984FF - #293984FF - #FF3984FF - #663984FF - #FF3984FF - #FF3984FF - #FFF7F5F2 - #FF1E1919 - #FFD8D3CB - #4DF7F5F2 - #4DF7F5F2 - #FF2B2929 - #FF242121 - #33BABABA - #99F7F5F2 - #298E8B87 - #3D8E8B87 - #528E8B87 - #FF161313 - #808E8B87 - #FFF7F5F2 - #4DB4DC19 - #FFB4DC19 - #66B4DC19 - #FFB4DC19 - #4DFAD24B - #FFFAD24B - #66FAD24B - #FFFAD24B - - #24A69171 - #3DA69171 - #52A69171 - #FFFFFFFF - #99A69E92 - #FF1E1919 - #1F2D8000 - #FF2D8000 - #522D8000 - #FF2D8000 - #800061FE - #B2D9D4CC - #3DFAD24B - #FF9B6400 - #529B6400 - #FF9B6400 - - @color/color__standard__text - @color/color__core__accent - diff --git a/samples/discovery/theme/src/main/res/values/themes.xml b/samples/discovery/theme/src/main/res/values/themes.xml deleted file mode 100644 index 6321062a..00000000 --- a/samples/discovery/theme/src/main/res/values/themes.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index c1fac3c6..66cb31ce 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,6 +1,14 @@ -@Suppress("JcenterRepositoryObsolete") +enableFeaturePreview("VERSION_CATALOGS") pluginManagement { + plugins { + val composeVersion = extra["composeVersion"] as String + id("org.jetbrains.compose").version(composeVersion) + + val kmmBridgeVersion = extra["kmmBridgeVersion"] as String + id("co.touchlab.faktory.kmmbridge").version(kmmBridgeVersion) + } + repositories { google() gradlePluginPortal() @@ -12,16 +20,14 @@ pluginManagement { rootProject.name = "componentbox" include(":componentbox") -include(":desktop") include(":material") -include(":util") -include(":ui") - -include(":samples:discovery:android:Discovery") -include(":samples:discovery:android:zipline") +include(":kit") -include(":samples:discovery:common") -include(":samples:discovery:components") -include(":samples:discovery:desktop") -include(":samples:discovery:theme") -include(":samples:discovery:ios:Shared") \ No newline at end of file +include(":samples:campaigns:android:app") +include(":samples:campaigns:android:common:scoping") +include(":samples:campaigns:android:common:binding") +include(":samples:campaigns:android:common:annotation") +include(":samples:campaigns:android:common:codegen") +include(":samples:campaigns:android:common:user") +include(":samples:campaigns:android:feature:account") +include(":samples:campaigns:xplat:componentbox") diff --git a/ui/build.gradle.kts b/ui/build.gradle.kts deleted file mode 100644 index 27abe48d..00000000 --- a/ui/build.gradle.kts +++ /dev/null @@ -1,71 +0,0 @@ -import com.vanniktech.maven.publish.JavadocJar.Dokka -import com.vanniktech.maven.publish.KotlinMultiplatform -import com.vanniktech.maven.publish.MavenPublishBaseExtension -import org.jetbrains.dokka.gradle.DokkaTask - -plugins { - kotlin("multiplatform") - kotlin("plugin.serialization") - id("com.android.library") - id("org.jetbrains.compose") version Version.composeMultiplatform - id("app.cash.zipline") -} - -group = "com.dropbox.componentbox" - -kotlin { - android() - jvm() - - sourceSets { - val commonMain by getting { - dependencies { - implementation(project(":componentbox")) - implementation(project(":util")) - implementation(project(":material")) - api(compose.runtime) - api(compose.material) - api(compose.ui) - api(compose.foundation) - implementation(Deps.Compose.coilCompose) - - with(Deps.AndroidX) { - api(appCompat) - api(coreKtx) - } - - with(Deps.Kotlinx) { - api(serializationCore) - api(serializationJson) - } - - with(Deps.Cash.Zipline) { - implementation(zipline) - } - - - } - } - - val jvmMain by getting - - val androidMain by getting { - dependencies { - with(Deps.Mavericks) { - implementation(mavericksCompose) - } - - with(Deps.Cash) { - implementation(okhttp) - } - - implementation(Deps.Airbnb.lottieCompose) - - } - } - } -} - -android { - compileSdkVersion(Version.androidCompileSdk) -} \ No newline at end of file diff --git a/ui/src/androidMain/kotlin/com/dropbox/componentbox/compose/ComponentBoxLoadingView.kt b/ui/src/androidMain/kotlin/com/dropbox/componentbox/compose/ComponentBoxLoadingView.kt deleted file mode 100644 index adbd8d36..00000000 --- a/ui/src/androidMain/kotlin/com/dropbox/componentbox/compose/ComponentBoxLoadingView.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.dropbox.componentbox.compose - -import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.ui.Modifier -import com.airbnb.lottie.compose.LottieAnimation -import com.airbnb.lottie.compose.LottieCompositionSpec -import com.airbnb.lottie.compose.rememberLottieComposition -import com.dropbox.componentbox.R - -@Composable -fun ComponentBoxLoadingView() { - val composition by rememberLottieComposition(LottieCompositionSpec.RawRes(R.raw.loading)) - - Column( - modifier = Modifier - .fillMaxSize(), - verticalArrangement = Arrangement.Center - ) { - - LottieAnimation(composition) - } -} \ No newline at end of file diff --git a/ui/src/androidMain/kotlin/com/dropbox/componentbox/compose/ComponentBoxView.kt b/ui/src/androidMain/kotlin/com/dropbox/componentbox/compose/ComponentBoxView.kt deleted file mode 100644 index 306e7d8f..00000000 --- a/ui/src/androidMain/kotlin/com/dropbox/componentbox/compose/ComponentBoxView.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.dropbox.componentbox.compose - -import androidx.compose.runtime.Composable -import androidx.compose.runtime.collectAsState -import com.airbnb.mvrx.compose.collectAsState -import com.dropbox.componentbox.foundation.ComponentBox -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.material.Inflate -import com.dropbox.componentbox.presentation.ComponentBoxPresenter -import com.dropbox.componentbox.presentation.ComponentBoxState -import com.dropbox.componentbox.presentation.ComponentBoxViewModel -import com.dropbox.componentbox.presentation.ComponentBoxViewState - -@Composable -inline fun > ComponentBoxView( - presenter: ComponentBoxPresenter, - context: Context, - noinline Loading: (@Composable () -> Unit)? = null, - noinline Fallback: (@Composable () -> Unit), -) { - val viewModel = presenter.models.collectAsState() - val state = presenter.collectAsState() - - when (val root = viewModel.value.root) { - null -> when (state.value.viewState) { - ComponentBoxViewState.Failure -> Fallback() - ComponentBoxViewState.Initialized -> if (Loading != null) Loading() else ComponentBoxLoadingView() - ComponentBoxViewState.Loading -> if (Loading != null) Loading() else ComponentBoxLoadingView() - ComponentBoxViewState.Success -> Fallback() - } - else -> root.Inflate(context) - } -} \ No newline at end of file diff --git a/ui/src/androidMain/kotlin/com/dropbox/componentbox/view/ComponentBoxDialogFragment.kt b/ui/src/androidMain/kotlin/com/dropbox/componentbox/view/ComponentBoxDialogFragment.kt deleted file mode 100644 index 987a8299..00000000 --- a/ui/src/androidMain/kotlin/com/dropbox/componentbox/view/ComponentBoxDialogFragment.kt +++ /dev/null @@ -1,39 +0,0 @@ -package com.dropbox.componentbox.view - -import android.os.Bundle -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.platform.ComposeView -import androidx.compose.ui.window.Dialog -import androidx.fragment.app.DialogFragment -import com.dropbox.componentbox.compose.ComponentBoxView -import com.dropbox.componentbox.foundation.ComponentBox -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.presentation.ComponentBoxPresenter -import com.dropbox.componentbox.presentation.ComponentBoxState -import com.dropbox.componentbox.presentation.ComponentBoxViewModel - -abstract class ComponentBoxDialogFragment( - private val componentBoxUrl: String, - private val componentBoxPresenter: ComponentBoxPresenter>, - private val componentBoxContext: Context, - private val onDismiss: () -> Unit, - private val Loading: (@Composable () -> Unit), - private val Fallback: (@Composable () -> Unit) -) : DialogFragment() { - - override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { - return ComposeView(requireContext()).apply { - setContent { - componentBoxContext.themer?.Theme(isSystemInDarkTheme()) { - Dialog(onDismiss) { - ComponentBoxView(componentBoxPresenter, componentBoxContext, Loading, Fallback) - } - } - } - } - } -} diff --git a/ui/src/androidMain/kotlin/com/dropbox/componentbox/view/ComponentBoxFragment.kt b/ui/src/androidMain/kotlin/com/dropbox/componentbox/view/ComponentBoxFragment.kt deleted file mode 100644 index 37bd9892..00000000 --- a/ui/src/androidMain/kotlin/com/dropbox/componentbox/view/ComponentBoxFragment.kt +++ /dev/null @@ -1,40 +0,0 @@ -package com.dropbox.componentbox.view - -import android.os.Bundle -import android.view.LayoutInflater -import android.view.View -import android.view.ViewGroup -import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.platform.ComposeView -import androidx.fragment.app.DialogFragment -import com.dropbox.componentbox.compose.ComponentBoxView -import com.dropbox.componentbox.foundation.ComponentBox -import com.dropbox.componentbox.foundation.Context -import com.dropbox.componentbox.presentation.ComponentBoxPresenter -import com.dropbox.componentbox.presentation.ComponentBoxState -import com.dropbox.componentbox.presentation.ComponentBoxViewModel - -abstract class ComponentBoxFragment( - private val componentBoxUrl: String, - private val componentBoxPresenter: ComponentBoxPresenter>, - private val componentBoxContext: Context, - private val Loading: (@Composable () -> Unit), - private val Fallback: (@Composable () -> Unit) -) : DialogFragment() { - - override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { - return ComposeView(requireContext()).apply { - setContent { - componentBoxContext.themer?.Theme(isSystemInDarkTheme()) { - Column(modifier = Modifier.fillMaxSize()) { - ComponentBoxView(componentBoxPresenter, componentBoxContext, Loading, Fallback) - } - } - } - } - } -} diff --git a/ui/src/main/AndroidManifest.xml b/ui/src/main/AndroidManifest.xml deleted file mode 100644 index 5cf1ef29..00000000 --- a/ui/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/util/src/commonMain/kotlin/com/dropbox/componentbox/util/color.kt b/util/src/commonMain/kotlin/com/dropbox/componentbox/util/color.kt deleted file mode 100644 index 2cb39b29..00000000 --- a/util/src/commonMain/kotlin/com/dropbox/componentbox/util/color.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.dropbox.componentbox.util - -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color - -@Composable -fun com.dropbox.componentbox.foundation.Color?.compose(): Color? { - if (this == null) return null - return if (MaterialTheme.colors.isLight) Color(light) else Color(dark) -} - -@Composable -fun com.dropbox.componentbox.foundation.Color.compose(): Color { - return if (MaterialTheme.colors.isLight) Color(light) else Color(dark) -} \ No newline at end of file diff --git a/util/src/commonMain/kotlin/com/dropbox/componentbox/util/contentScale.kt b/util/src/commonMain/kotlin/com/dropbox/componentbox/util/contentScale.kt deleted file mode 100644 index e7686c7a..00000000 --- a/util/src/commonMain/kotlin/com/dropbox/componentbox/util/contentScale.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.dropbox.componentbox.util - -import com.dropbox.componentbox.foundation.ContentScale -import androidx.compose.ui.layout.ContentScale as ComposeContentScale - -fun ContentScale?.translate(): ComposeContentScale = when (this) { - ContentScale.Crop -> ComposeContentScale.Crop - ContentScale.Fit -> ComposeContentScale.Fit - ContentScale.FillHeight -> ComposeContentScale.FillHeight - ContentScale.FillWidth -> ComposeContentScale.FillWidth - ContentScale.Inside -> ComposeContentScale.Inside - ContentScale.None -> ComposeContentScale.None - ContentScale.FillBounds -> ComposeContentScale.FillBounds - null -> ComposeContentScale.None -} \ No newline at end of file diff --git a/util/src/commonMain/kotlin/com/dropbox/componentbox/util/layout.kt b/util/src/commonMain/kotlin/com/dropbox/componentbox/util/layout.kt deleted file mode 100644 index 935b03b2..00000000 --- a/util/src/commonMain/kotlin/com/dropbox/componentbox/util/layout.kt +++ /dev/null @@ -1,53 +0,0 @@ -package com.dropbox.componentbox.util - -import com.dropbox.componentbox.foundation.Alignment -import com.dropbox.componentbox.foundation.Arrangement -import androidx.compose.foundation.layout.Arrangement as RealArrangement -import androidx.compose.ui.Alignment as RealAlignment - -fun Alignment?.horizontal(): RealAlignment.Horizontal = when (this) { - Alignment.Start -> RealAlignment.Start - Alignment.CenterHorizontally -> RealAlignment.CenterHorizontally - Alignment.End -> RealAlignment.End - else -> RealAlignment.Start -} - -fun Alignment?.vertical(): RealAlignment.Vertical = when (this) { - Alignment.Top -> RealAlignment.Top - Alignment.CenterVertically -> RealAlignment.CenterVertically - Alignment.Bottom -> RealAlignment.Bottom - else -> RealAlignment.Top -} - -fun Alignment?.alignment(): RealAlignment = when (this) { - Alignment.TopStart -> RealAlignment.TopStart - Alignment.TopCenter -> RealAlignment.TopCenter - Alignment.TopEnd -> RealAlignment.TopEnd - Alignment.CenterStart -> RealAlignment.CenterStart - Alignment.Center -> RealAlignment.Center - Alignment.CenterEnd -> RealAlignment.CenterEnd - Alignment.BottomStart -> RealAlignment.BottomStart - Alignment.BottomCenter -> RealAlignment.BottomCenter - Alignment.BottomEnd -> RealAlignment.BottomEnd - else -> RealAlignment.TopStart -} - -fun Arrangement?.vertical(): RealArrangement.Vertical = when (this) { - Arrangement.Top -> RealArrangement.Top - Arrangement.Bottom -> RealArrangement.Bottom - Arrangement.Center -> RealArrangement.Center - Arrangement.SpaceEvenly -> RealArrangement.SpaceEvenly - Arrangement.SpaceBetween -> RealArrangement.SpaceBetween - Arrangement.SpaceAround -> RealArrangement.SpaceAround - else -> androidx.compose.foundation.layout.Arrangement.Top -} - -fun Arrangement?.horizontal(): RealArrangement.Horizontal = when (this) { - Arrangement.Start -> RealArrangement.Start - Arrangement.End -> RealArrangement.End - Arrangement.Center -> RealArrangement.Center - Arrangement.SpaceEvenly -> RealArrangement.SpaceEvenly - Arrangement.SpaceBetween -> RealArrangement.SpaceBetween - Arrangement.SpaceAround -> RealArrangement.SpaceAround - else -> androidx.compose.foundation.layout.Arrangement.Start -} \ No newline at end of file diff --git a/util/src/commonMain/kotlin/com/dropbox/componentbox/util/modifier.kt b/util/src/commonMain/kotlin/com/dropbox/componentbox/util/modifier.kt deleted file mode 100644 index a94e5a94..00000000 --- a/util/src/commonMain/kotlin/com/dropbox/componentbox/util/modifier.kt +++ /dev/null @@ -1,77 +0,0 @@ -package com.dropbox.componentbox.util - -import androidx.compose.foundation.layout.fillMaxHeight -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.foundation.Margin -import com.dropbox.componentbox.foundation.Modifier -import com.dropbox.componentbox.foundation.Padding -import androidx.compose.ui.Modifier as RealModifier - -fun Modifier?.build(customModifiers: List? = null): RealModifier { - var modifier: RealModifier = RealModifier - - if (this == null) return modifier - - modifier = modifier.then(margin(this.margin)) - modifier = modifier.then(width(this)) - modifier = modifier.then(height(this)) - - customModifiers?.forEach { customModifier -> - modifier = modifier.then(customModifier) - } - - modifier = modifier.then(padding(this.padding)) - - return modifier -} - -private fun margin(margin: Margin?): RealModifier { - if (margin == null) return RealModifier - - return padding( - Padding( - start = margin.start, - end = margin.end, - top = margin.top, - bottom = margin.bottom - ) - ) -} - -private fun padding(padding: Padding?): RealModifier { - val start = padding?.start ?: 0 - val end = padding?.end ?: 0 - val top = padding?.top ?: 0 - val bottom = padding?.bottom ?: 0 - - return RealModifier.padding( - start = start.dp, - top = top.dp, - end = end.dp, - bottom = bottom.dp - ) -} - -private fun width(modifier: Modifier): RealModifier { - return if (modifier.fillMaxWidth == true) { - RealModifier.fillMaxWidth() - } else if (modifier.width != null) { - RealModifier.width(modifier.width!!.dp) - } else { - RealModifier - } -} - -private fun height(modifier: Modifier): RealModifier { - return if (modifier.fillMaxHeight == true) { - RealModifier.fillMaxHeight() - } else if (modifier.height != null) { - RealModifier.height(modifier.height!!.dp) - } else { - RealModifier - } -} \ No newline at end of file diff --git a/util/src/commonMain/kotlin/com/dropbox/componentbox/util/shape.kt b/util/src/commonMain/kotlin/com/dropbox/componentbox/util/shape.kt deleted file mode 100644 index 734b87d1..00000000 --- a/util/src/commonMain/kotlin/com/dropbox/componentbox/util/shape.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.dropbox.componentbox.util - -import androidx.compose.foundation.shape.CircleShape -import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.ui.graphics.RectangleShape -import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.dp -import com.dropbox.componentbox.foundation.Shape - -fun Shape?.translate(size: Dp = 0.dp) = when (this) { - Shape.RectangleShape -> RectangleShape - Shape.RoundedCornerShape -> RoundedCornerShape(size) - Shape.CircleShape -> CircleShape - null -> RoundedCornerShape(size) -} \ No newline at end of file diff --git a/util/src/commonMain/kotlin/com/dropbox/componentbox/util/translate.kt b/util/src/commonMain/kotlin/com/dropbox/componentbox/util/translate.kt deleted file mode 100644 index 34cb7b42..00000000 --- a/util/src/commonMain/kotlin/com/dropbox/componentbox/util/translate.kt +++ /dev/null @@ -1,33 +0,0 @@ -package com.dropbox.componentbox.util - -import androidx.compose.material.MaterialTheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.text.TextStyle -import com.dropbox.componentbox.foundation.ButtonVariant - -@Composable -inline fun String?.translate(): T? = when (T::class) { - TextStyle::class -> when (this) { - "H1" -> MaterialTheme.typography.h1 as T - "H2" -> MaterialTheme.typography.h2 as T - "H3" -> MaterialTheme.typography.h3 as T - "H4" -> MaterialTheme.typography.h4 as T - "H5" -> MaterialTheme.typography.h5 as T - "H6" -> MaterialTheme.typography.h6 as T - "BODY1" -> MaterialTheme.typography.body1 as T - "BODY2" -> MaterialTheme.typography.body2 as T - "BUTTON" -> MaterialTheme.typography.button as T - "CAPTION" -> MaterialTheme.typography.caption as T - else -> MaterialTheme.typography.body2 as T - } - - ButtonVariant::class -> when (this) { - ButtonVariant.Contained.name -> ButtonVariant.Contained as T - ButtonVariant.Text.name -> ButtonVariant.Text as T - ButtonVariant.Outlined.name -> ButtonVariant.Outlined as T - ButtonVariant.Icon.name -> ButtonVariant.Icon as T - else -> ButtonVariant.Contained as T - } - - else -> null -} \ No newline at end of file diff --git a/util/src/main/AndroidManifest.xml b/util/src/main/AndroidManifest.xml deleted file mode 100644 index 688b5b57..00000000 --- a/util/src/main/AndroidManifest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file