mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
Added @ExperimentalApi annotations
commit_hash:c3d75e4e995a359993e5fd22145298ded43a561b
This commit is contained in:
+2
-2
@@ -7,8 +7,8 @@ import com.yandex.div.compose.actions.DivExternalActionHandler
|
||||
import com.yandex.div.compose.dagger.Names
|
||||
import com.yandex.div.compose.dagger.`Yatagan$DivContextComponent`
|
||||
import com.yandex.div.compose.internal.DivDebugConfiguration
|
||||
import com.yandex.div.core.annotations.ExperimentalApi
|
||||
import com.yandex.div.core.annotations.InternalApi
|
||||
import com.yandex.div.core.annotations.PublicApi
|
||||
import com.yandex.div.core.expression.variables.DivVariableController
|
||||
import com.yandex.yatagan.Module
|
||||
import com.yandex.yatagan.Provides
|
||||
@@ -28,7 +28,7 @@ import javax.inject.Named
|
||||
* }
|
||||
*/
|
||||
@Module
|
||||
@PublicApi
|
||||
@ExperimentalApi
|
||||
class DivComposeConfiguration(
|
||||
@get:Provides
|
||||
val actionHandler: DivExternalActionHandler = defaultActionHandler,
|
||||
|
||||
@@ -7,8 +7,8 @@ import com.yandex.div.compose.context.DivLocalContext
|
||||
import com.yandex.div.compose.context.DivViewContext
|
||||
import com.yandex.div.compose.dagger.DivContextComponent
|
||||
import com.yandex.div.compose.internal.DivDebugFeatures
|
||||
import com.yandex.div.core.annotations.ExperimentalApi
|
||||
import com.yandex.div.core.annotations.InternalApi
|
||||
import com.yandex.div.core.annotations.PublicApi
|
||||
import com.yandex.div.core.expression.variables.DivVariableController
|
||||
import com.yandex.div.evaluable.function.GeneratedBuiltinFunctionProvider
|
||||
import com.yandex.div.internal.expressions.FunctionProviderDecorator
|
||||
@@ -27,7 +27,7 @@ import javax.inject.Inject
|
||||
* val configuration = DivComposeConfiguration()
|
||||
* val divContext = configuration.createContext(baseContext = activity)
|
||||
*/
|
||||
@PublicApi
|
||||
@ExperimentalApi
|
||||
class DivContext @Inject @MainThread internal constructor(
|
||||
internal val component: DivContextComponent
|
||||
) : ContextWrapper(component.baseContext) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.yandex.div.compose
|
||||
|
||||
import com.yandex.div.core.annotations.PublicApi
|
||||
import com.yandex.div.core.annotations.ExperimentalApi
|
||||
|
||||
/**
|
||||
* Exception thrown when an unrecoverable error occurs in DivKit pipeline.
|
||||
*/
|
||||
@PublicApi
|
||||
class DivException(message: String) : Exception(message)
|
||||
@ExperimentalApi
|
||||
class DivException internal constructor(message: String) : Exception(message)
|
||||
|
||||
+7
-2
@@ -2,9 +2,14 @@ package com.yandex.div.compose
|
||||
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import com.yandex.div.core.annotations.PublicApi
|
||||
import com.yandex.div.core.annotations.ExperimentalApi
|
||||
|
||||
@PublicApi
|
||||
/**
|
||||
* Provides [FontFamily] for the text elements inside [DivView].
|
||||
*
|
||||
* @see DivComposeConfiguration
|
||||
*/
|
||||
@ExperimentalApi
|
||||
interface DivFontFamilyProvider {
|
||||
fun getFontFamily(fontFamilyName: String?, weight: FontWeight): FontFamily
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.yandex.div.compose
|
||||
|
||||
import com.yandex.div.core.annotations.PublicApi
|
||||
import com.yandex.div.core.annotations.ExperimentalApi
|
||||
import com.yandex.div.internal.Log
|
||||
|
||||
/**
|
||||
@@ -10,7 +10,7 @@ import com.yandex.div.internal.Log
|
||||
*
|
||||
* @see DivComposeConfiguration
|
||||
*/
|
||||
@PublicApi
|
||||
@ExperimentalApi
|
||||
open class DivReporter {
|
||||
|
||||
open fun reportError(message: String) {
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.yandex.div.compose.triggers.observe
|
||||
import com.yandex.div.compose.utils.divContext
|
||||
import com.yandex.div.compose.utils.reporter
|
||||
import com.yandex.div.compose.views.DivBlockView
|
||||
import com.yandex.div.core.annotations.ExperimentalApi
|
||||
import com.yandex.div2.DivData
|
||||
|
||||
/**
|
||||
@@ -27,6 +28,7 @@ import com.yandex.div2.DivData
|
||||
* @param data the [DivData] describing the layout to render.
|
||||
* @param modifier the [Modifier] to be applied to the root layout.
|
||||
*/
|
||||
@ExperimentalApi
|
||||
@Composable
|
||||
fun DivView(
|
||||
data: DivData,
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package com.yandex.div.compose.actions
|
||||
|
||||
import android.net.Uri
|
||||
import com.yandex.div.core.annotations.PublicApi
|
||||
import com.yandex.div.core.annotations.ExperimentalApi
|
||||
import org.json.JSONObject
|
||||
|
||||
/**
|
||||
* Data associated with a DivKit action.
|
||||
*/
|
||||
@PublicApi
|
||||
data class DivActionData(
|
||||
@ExperimentalApi
|
||||
data class DivActionData internal constructor(
|
||||
val id: String,
|
||||
val payload: JSONObject?,
|
||||
val url: Uri?
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package com.yandex.div.compose.actions
|
||||
|
||||
import com.yandex.div.core.annotations.ExperimentalApi
|
||||
import com.yandex.div.core.annotations.Mockable
|
||||
import com.yandex.div.core.annotations.PublicApi
|
||||
import com.yandex.div.json.expressions.ExpressionResolver
|
||||
import javax.inject.Inject
|
||||
|
||||
@@ -10,7 +10,7 @@ import javax.inject.Inject
|
||||
* scoped to the element that triggered the action.
|
||||
*/
|
||||
@Mockable
|
||||
@PublicApi
|
||||
class DivActionHandlingContext @Inject constructor(
|
||||
@ExperimentalApi
|
||||
class DivActionHandlingContext @Inject internal constructor(
|
||||
val expressionResolver: ExpressionResolver
|
||||
)
|
||||
|
||||
+3
-3
@@ -1,13 +1,13 @@
|
||||
package com.yandex.div.compose.actions
|
||||
|
||||
import com.yandex.div.core.annotations.PublicApi
|
||||
import com.yandex.div.core.annotations.ExperimentalApi
|
||||
import org.json.JSONObject
|
||||
|
||||
/**
|
||||
* Data associated with a custom DivKit action (action with `"type": "custom"`).
|
||||
*/
|
||||
@PublicApi
|
||||
data class DivCustomActionData(
|
||||
@ExperimentalApi
|
||||
data class DivCustomActionData internal constructor(
|
||||
val id: String,
|
||||
val payload: JSONObject?
|
||||
)
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package com.yandex.div.compose.actions
|
||||
|
||||
import com.yandex.div.core.annotations.PublicApi
|
||||
import com.yandex.div.core.annotations.ExperimentalApi
|
||||
|
||||
/**
|
||||
* Handler for actions that DivKit does not handle internally.
|
||||
@@ -9,7 +9,7 @@ import com.yandex.div.core.annotations.PublicApi
|
||||
*
|
||||
* @see com.yandex.div.compose.DivComposeConfiguration
|
||||
*/
|
||||
@PublicApi
|
||||
@ExperimentalApi
|
||||
interface DivExternalActionHandler {
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -7,4 +7,4 @@ import com.yandex.div.core.annotations.InternalApi
|
||||
@InternalApi
|
||||
fun interface ImageLoaderProvider {
|
||||
fun provide(context: Context): ImageLoader
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user