diff --git a/README.md b/README.md index 368d7e3..64ad7a9 100644 --- a/README.md +++ b/README.md @@ -3,25 +3,36 @@ [![Maven Central](https://img.shields.io/maven-central/v/com.huanshankeji/compose-web-material)](https://search.maven.org/artifact/com.huanshankeji/compose-web-material) [![Gradle Plugin Portal](https://img.shields.io/gradle-plugin-portal/v/com.huanshankeji.compose-web-material-conventions)](https://plugins.gradle.org/plugin/com.huanshankeji.compose-web-material-conventions) -Some Material components for Compose for Web, based on [Material Web (Web Components)](https://github.com/material-components/material-web) (preferred) and [Material Components for the web](https://github.com/material-components/material-components-web) (fallback) +Some Material components for Compose for Web, based on [Material Web (with Web Components) (or material-web, or `mwc`)](https://github.com/material-components/material-web) (preferred) and [Material Components for the web (or material-components-web, or `mdc`)](https://github.com/material-components/material-components-web) (fallback) -This project is in prototype and the components are not complete. More components will be added. It will probably go through huge refactors and API changes, too. +~~This project is in prototype and the components are not complete. More components will be added. It will probably go through huge refactors and API changes, too.~~ + +**This project is not currently under active development. Here is a list of reasons and alternatives:** + +1. The [material-web](https://github.com/material-components/material-web) team is working on Material You (Material Design 3) support and [the Material 2 branch (`mwc`)](https://github.com/material-components/material-web/tree/mwc) is no longer under active development. Existing Compose wrappers of their Material 2 components are still kept in [the `:compose-web-material` subproject](compose-web-material) but not updated. +1. [KMDC](https://github.com/mpetuska/kmdc) wrapping around [material-components-web (`mdc`)](https://github.com/material-components/material-components-web) provides a much more complete set of Material Design components for Compose for Web. +1. We are currently focusing more on [compose-multiplatform-material](https://github.com/huanshankeji/compose-multiplatform-material) to provide multiplatform Compose Material wrappers, whose web portion depends on KMDC and [the `:compose-web-common` subproject](compose-web-common), which may be occasionally updated for the dependent project. ## Instructions on how to use + Some configurations are needed to use this library due to the immaturities of this project and Kotlin/JS. ### Add the dependency + ```kotlin implementation("com.huanshankeji:compose-web-material:$version") ``` ### In code + Call `mwcRequires()` in your `main` function before calling any component Composable functions. ### Kotlin/JS Webpack configuration + If you use this library in an app project with Webpack [which Kotlin/JS currently uses](https://kotlinlang.org/docs/js-project-setup.html), you might want to configure it as recommended by Material Web and Material Components for the web. Some instructions on how to do this simply are as below. This plugin helps add the dependency to this project (if you do this you can skip the "Add the dependency" step above) and the `devNpm` dependencies: + ```kotlin plugins { id("com.huanshankeji.compose-web-material-conventions") version someVersion diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index cc02e63..982ea2f 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,7 +1,15 @@ plugins { `kotlin-dsl` } - repositories { + //mavenLocal() gradlePluginPortal() + //maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") +} + +dependencies { + implementation(kotlin("gradle-plugin", "1.7.20")) + implementation("org.jetbrains.compose:compose-gradle-plugin:1.2.1") + implementation("com.huanshankeji:kotlin-common-gradle-plugins:0.3.2") + implementation("com.huanshankeji.team:gradle-plugins:0.3.2") } diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 387dcfd..be9ceea 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -1,4 +1,4 @@ -const val projectVersion = "0.1.0-compose-1.2.0-alpha01-dev750" +const val projectVersion = "0.2.0" object DependencyVersions { val webcomponents = "2.6.0" diff --git a/buildSrc/src/main/kotlin/lib-conventions.gradle.kts b/buildSrc/src/main/kotlin/lib-conventions.gradle.kts new file mode 100644 index 0000000..f7efc50 --- /dev/null +++ b/buildSrc/src/main/kotlin/lib-conventions.gradle.kts @@ -0,0 +1,26 @@ +import com.huanshankeji.team.`Shreck Ye` +import com.huanshankeji.team.pomForTeamDefaultOpenSource +import org.gradle.api.publish.maven.MavenPublication +import org.gradle.api.tasks.bundling.Jar +import org.gradle.kotlin.dsl.* + +plugins { + id("com.huanshankeji.kotlin-multiplatform-js-browser-conventions") + id("org.jetbrains.compose") + id("com.huanshankeji.sonatype-ossrh-publish") +} + +repositories { + maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") +} + +group = "com.huanshankeji" +version = projectVersion + +val javadocJar by tasks.registering(Jar::class) { + archiveClassifier.set("javadoc") +} + +publishing.publications.withType { + artifact(javadocJar) +} diff --git a/compose-web-common/build.gradle.kts b/compose-web-common/build.gradle.kts new file mode 100644 index 0000000..e291cfd --- /dev/null +++ b/compose-web-common/build.gradle.kts @@ -0,0 +1,23 @@ +import com.huanshankeji.team.`Shreck Ye` +import com.huanshankeji.team.pomForTeamDefaultOpenSource + +plugins { + `lib-conventions` +} + +kotlin { + sourceSets { + val jsMain by getting { + dependencies { + implementation(compose.web.core) + implementation(compose.runtime) + } + } + } +} + +publishing.publications.withType { + pomForTeamDefaultOpenSource(project, "Huanshankeji Compose for Web common", "Huanshankeji's common code for Compose for Web") { + `Shreck Ye`() + } +} diff --git a/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/Layouts.kt b/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/Layouts.kt new file mode 100644 index 0000000..942a1d1 --- /dev/null +++ b/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/Layouts.kt @@ -0,0 +1,156 @@ +package com.huanshankeji.compose.web + +import androidx.compose.runtime.Composable +import com.huanshankeji.compose.web.attributes.attrs +import com.huanshankeji.compose.web.attributes.plus +import com.huanshankeji.compose.web.css.FIT_CONTENT +import com.huanshankeji.compose.web.css.Styles +import com.huanshankeji.compose.web.css.width +import com.huanshankeji.compose.web.css.wrapInAttrs +import org.jetbrains.compose.web.css.* +import org.jetbrains.compose.web.dom.AttrBuilderContext +import org.jetbrains.compose.web.dom.ContentBuilder +import org.jetbrains.compose.web.dom.Div +import org.w3c.dom.HTMLDivElement + +// try to follow names in Android Jetpack Compose + +@Composable +fun Flexbox( + attrs: AttrBuilderContext? = null, + content: ContentBuilder +) = + Div(attrs { + style { + display(DisplayStyle.Flex) + } + } + attrs, content) + +@Composable +fun Flexbox(styles: Styles? = null, content: ContentBuilder) = + Flexbox(styles.wrapInAttrs(), content) + +@Composable +fun Column( + attrs: AttrBuilderContext? = null, + fitContent: Boolean = true, + content: ContentBuilder +) = + Flexbox(attrs { + style { + flexDirection(FlexDirection.Column) + if (fitContent) width(FIT_CONTENT) + } + } + attrs, content) + +@Composable +fun Column(styles: Styles? = null, fitContent: Boolean = true, content: ContentBuilder) = + Column(styles.wrapInAttrs(), fitContent, content) + +@Composable +fun ColumnWithSpaceBetween( + attrs: AttrBuilderContext? = null, + fitContent: Boolean = true, + content: ContentBuilder +) = + Column(attrs { + style { + justifyContent(JustifyContent.SpaceBetween) + } + } + attrs, fitContent, content) + + +@Composable +fun Row( + attrs: AttrBuilderContext? = null, + content: ContentBuilder +) = + Flexbox(attrs { + style { + flexDirection(FlexDirection.Row) + } + } + attrs, content) + +@Composable +fun Row( + styles: Styles? = null, + content: ContentBuilder +) = + Row(styles.wrapInAttrs(), content) + +@Composable +fun RowWithSpaceBetween( + attrs: AttrBuilderContext? = null, + content: ContentBuilder +) = + Row(attrs { + style { + justifyContent(JustifyContent.SpaceBetween) + } + } + attrs, content) + +@Composable +fun ColumnWithGaps( + attrs: AttrBuilderContext? = null, + gap: CSSNumeric, + fitContent: Boolean = true, + content: ContentBuilder +) = + Column(attrs { + style { + gap(gap) + } + } + attrs, fitContent, content) + +@Composable +fun RowWithGaps( + attrs: AttrBuilderContext? = null, + gap: CSSNumeric, + content: ContentBuilder +) = + Row(attrs { + style { + gap(gap) + } + } + attrs, content) + +@Composable +fun Centered( + attrs: AttrBuilderContext? = null, + content: ContentBuilder +) = + Flexbox(attrs { + style { + alignItems(AlignItems.Center) + justifyContent(JustifyContent.Center) + } + } + attrs, content) + +@Composable +fun CenteredInViewport( + attrs: AttrBuilderContext? = null, + content: ContentBuilder +) = + Centered(attrs { + style { + minHeight(100.vh) + } + } + attrs, content) + +@Composable +fun FrGrid( + numColumns: Int, + gap: CSSNumeric, + content: HTMLElementContent +) = + Div({ + style { + display(DisplayStyle.Grid) + gridTemplateColumns("repeat($numColumns, 1fr)") + gap(gap) + } + }, content) + +@Composable +fun Spacer(numPxs: Int) = + TODO() as Unit diff --git a/lib/src/jsMain/kotlin/com/huanshankeji/compose/web/LoadingState.kt b/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/LoadingState.kt similarity index 100% rename from lib/src/jsMain/kotlin/com/huanshankeji/compose/web/LoadingState.kt rename to compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/LoadingState.kt diff --git a/lib/src/jsMain/kotlin/com/huanshankeji/compose/web/Types.kt b/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/Types.kt similarity index 90% rename from lib/src/jsMain/kotlin/com/huanshankeji/compose/web/Types.kt rename to compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/Types.kt index a8db126..561fc2c 100644 --- a/lib/src/jsMain/kotlin/com/huanshankeji/compose/web/Types.kt +++ b/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/Types.kt @@ -1,7 +1,6 @@ package com.huanshankeji.compose.web import androidx.compose.runtime.Composable -import org.jetbrains.compose.web.css.StyleScope import org.jetbrains.compose.web.dom.AttrBuilderContext import org.jetbrains.compose.web.dom.ContentBuilder import org.jetbrains.compose.web.dom.Div @@ -19,6 +18,4 @@ typealias DivElementComposable = ElementComposable // `::Div` cannot be used directly because "Function References of @Composable functions are not currently supported" val DivComposable: ElementComposable = { attrs, content -> Div(attrs, content) } -typealias Styles = StyleScope.() -> Unit - typealias HTMLElementContent = (@Composable ElementScope.() -> Unit)? diff --git a/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/attributes/AttrBuilderContext.kt b/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/attributes/AttrBuilderContext.kt new file mode 100644 index 0000000..3d14add --- /dev/null +++ b/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/attributes/AttrBuilderContext.kt @@ -0,0 +1,18 @@ +package com.huanshankeji.compose.web.attributes + +import org.jetbrains.compose.web.dom.AttrBuilderContext +import org.w3c.dom.Element + +operator fun AttrBuilderContext.plus(other: AttrBuilderContext?): AttrBuilderContext = + if (other === null) this + else { + { + this@plus() + other() + } + } + +/** A helper function to create [AttrBuilderContext]s where type inference doesn't work */ +@Suppress("NOTHING_TO_INLINE") +inline fun attrs(noinline attrs: AttrBuilderContext) = + attrs diff --git a/lib/src/jsMain/kotlin/com/huanshankeji/compose/web/attributes/AttrsScope.kt b/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/attributes/AttrsScope.kt similarity index 100% rename from lib/src/jsMain/kotlin/com/huanshankeji/compose/web/attributes/AttrsScope.kt rename to compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/attributes/AttrsScope.kt diff --git a/lib/src/jsMain/kotlin/com/huanshankeji/compose/web/css/CSS.kt b/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/css/CSS.kt similarity index 100% rename from lib/src/jsMain/kotlin/com/huanshankeji/compose/web/css/CSS.kt rename to compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/css/CSS.kt diff --git a/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/css/StyleScope.kt b/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/css/StyleScope.kt new file mode 100644 index 0000000..b0087a9 --- /dev/null +++ b/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/css/StyleScope.kt @@ -0,0 +1,11 @@ +package com.huanshankeji.compose.web.css + +import org.jetbrains.compose.web.css.StyleScope + +fun StyleScope.width(value: String) = + property("width", value) + +fun StyleScope.height(value: String) = + property("height", value) + +const val FIT_CONTENT = "fit-content" diff --git a/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/css/Styles.kt b/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/css/Styles.kt new file mode 100644 index 0000000..584e546 --- /dev/null +++ b/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/css/Styles.kt @@ -0,0 +1,10 @@ +package com.huanshankeji.compose.web.css + +import org.jetbrains.compose.web.css.StyleScope +import org.jetbrains.compose.web.dom.AttrBuilderContext +import org.w3c.dom.Element + +typealias Styles = StyleScope.() -> Unit + +fun Styles?.wrapInAttrs(): AttrBuilderContext? = + this?.let { { style { it() } } } diff --git a/lib/src/jsMain/kotlin/com/huanshankeji/compose/web/dom/ElementScope.kt b/compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/dom/ElementScope.kt similarity index 100% rename from lib/src/jsMain/kotlin/com/huanshankeji/compose/web/dom/ElementScope.kt rename to compose-web-common/src/jsMain/kotlin/com/huanshankeji/compose/web/dom/ElementScope.kt diff --git a/compose-web-material/build.gradle.kts b/compose-web-material/build.gradle.kts new file mode 100644 index 0000000..602282c --- /dev/null +++ b/compose-web-material/build.gradle.kts @@ -0,0 +1,45 @@ +import com.huanshankeji.team.`Shreck Ye` +import com.huanshankeji.team.pomForTeamDefaultOpenSource + +plugins { + `lib-conventions` +} + +kotlin { + sourceSets { + val jsMain by getting { + dependencies { + implementation(compose.web.core) + implementation(compose.runtime) + implementation(project(":compose-web-common")) + + implementation(npm("@webcomponents/webcomponentsjs", DependencyVersions.webcomponents)) + + fun mwcImplementation(module: String) = + implementation(npm("@material/mwc-$module", DependencyVersions.mwc)) + + fun mwcImplementations(vararg modules: String) { + for (module in modules) mwcImplementation(module) + } + + mwcImplementations( + "button", + "textfield", + "select", + "icon-button", + "snackbar", + "circular-progress", + "circular-progress-four-color" + ) + + implementation(npm("@material/card", DependencyVersions.mdc)) + } + } + } +} + +publishing.publications.withType { + pomForTeamDefaultOpenSource(project, "Compose for Web Material", "Some Material components for Compose for Web") { + `Shreck Ye`() + } +} diff --git a/lib/src/jsMain/kotlin/com/huanshankeji/compose/web/material/Components.kt b/compose-web-material/src/jsMain/kotlin/com/huanshankeji/compose/web/material/Components.kt similarity index 100% rename from lib/src/jsMain/kotlin/com/huanshankeji/compose/web/material/Components.kt rename to compose-web-material/src/jsMain/kotlin/com/huanshankeji/compose/web/material/Components.kt diff --git a/compose-web-material/src/jsMain/kotlin/com/huanshankeji/compose/web/material/Layouts.kt b/compose-web-material/src/jsMain/kotlin/com/huanshankeji/compose/web/material/Layouts.kt new file mode 100644 index 0000000..44b4a13 --- /dev/null +++ b/compose-web-material/src/jsMain/kotlin/com/huanshankeji/compose/web/material/Layouts.kt @@ -0,0 +1,18 @@ +package com.huanshankeji.compose.web.material + +import androidx.compose.runtime.Composable +import com.huanshankeji.compose.web.CenteredInViewport +import com.huanshankeji.compose.web.css.Styles +import org.jetbrains.compose.web.attributes.AttrsScope +import org.jetbrains.compose.web.dom.ContentBuilder +import org.w3c.dom.HTMLDivElement + +@Composable +fun CenteredCardInViewport( + viewportDivStyles: Styles? = null, + cardAttrs: (AttrsScope.() -> Unit)? = null, + content: ContentBuilder +) = + CenteredInViewport({ viewportDivStyles?.let { style { it() } } }) { + MdcCard(cardAttrs, content = content) + } diff --git a/lib/src/jsMain/kotlin/com/huanshankeji/compose/web/material/MwcRequires.kt b/compose-web-material/src/jsMain/kotlin/com/huanshankeji/compose/web/material/MwcRequires.kt similarity index 100% rename from lib/src/jsMain/kotlin/com/huanshankeji/compose/web/material/MwcRequires.kt rename to compose-web-material/src/jsMain/kotlin/com/huanshankeji/compose/web/material/MwcRequires.kt diff --git a/lib/src/jsMain/kotlin/com/huanshankeji/compose/web/material/Styles.kt b/compose-web-material/src/jsMain/kotlin/com/huanshankeji/compose/web/material/Styles.kt similarity index 100% rename from lib/src/jsMain/kotlin/com/huanshankeji/compose/web/material/Styles.kt rename to compose-web-material/src/jsMain/kotlin/com/huanshankeji/compose/web/material/Styles.kt diff --git a/lib/src/jsMain/kotlin/com/huanshankeji/material/Colors.kt b/compose-web-material/src/jsMain/kotlin/com/huanshankeji/material/Colors.kt similarity index 100% rename from lib/src/jsMain/kotlin/com/huanshankeji/material/Colors.kt rename to compose-web-material/src/jsMain/kotlin/com/huanshankeji/material/Colors.kt diff --git a/gradle-plugins/build.gradle.kts b/gradle-plugins/build.gradle.kts index f0d7373..e95e587 100644 --- a/gradle-plugins/build.gradle.kts +++ b/gradle-plugins/build.gradle.kts @@ -3,7 +3,7 @@ import com.huanshankeji.generateKotlinSources plugins { `kotlin-dsl` - id("com.gradle.plugin-publish") version "1.0.0-rc-2" + id("com.gradle.plugin-publish") version "1.1.0" } repositories { @@ -11,7 +11,7 @@ repositories { } dependencies { - implementation(kotlin("gradle-plugin", "1.7.0")) + implementation(kotlin("gradle-plugin", "1.7.20")) } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 41d9927..249e583 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 92f06b5..8fad3f5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c787..a69d9cb 100755 --- a/gradlew +++ b/gradlew @@ -205,6 +205,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 107acd3..f127cfd 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock index 74ea056..98a14b2 100644 --- a/kotlin-js-store/yarn.lock +++ b/kotlin-js-store/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + "@discoveryjs/json-ext@^0.5.0": version "0.5.7" resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" @@ -633,10 +638,10 @@ "@material/theme" "14.0.0-canary.261f2db59.0" tslib "^2.1.0" -"@types/component-emitter@^1.2.10": - version "1.2.11" - resolved "https://registry.yarnpkg.com/@types/component-emitter/-/component-emitter-1.2.11.tgz#50d47d42b347253817a39709fef03ce66a108506" - integrity sha512-SRXjM+tfsSlA9VuG8hGO2nft2p8zjXCK1VcC6N4NXbBbYbSia9kzCChYQajIjzIqOOOuh5Ock6MmV2oux4jDZQ== +"@socket.io/component-emitter@~3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz#96116f2a912e0c02817345b3c10751069920d553" + integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== "@types/cookie@^0.4.1": version "0.4.1" @@ -815,19 +820,19 @@ resolved "https://registry.yarnpkg.com/@webcomponents/webcomponentsjs/-/webcomponentsjs-2.6.0.tgz#7d1674c40bddf0c6dd974c44ffd34512fe7274ff" integrity sha512-Moog+Smx3ORTbWwuPqoclr+uvfLnciVd6wdCaVscHPrxbmQ/IJKm3wbB7hpzJtXWjAq2l/6QMlO85aZiOdtv5Q== -"@webpack-cli/configtest@^1.1.1": +"@webpack-cli/configtest@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@webpack-cli/configtest/-/configtest-1.2.0.tgz#7b20ce1c12533912c3b217ea68262365fa29a6f5" integrity sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg== -"@webpack-cli/info@^1.4.1": +"@webpack-cli/info@^1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@webpack-cli/info/-/info-1.5.0.tgz#6c78c13c5874852d6e2dd17f08a41f3fe4c261b1" integrity sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ== dependencies: envinfo "^7.7.3" -"@webpack-cli/serve@^1.6.1": +"@webpack-cli/serve@^1.7.0": version "1.7.0" resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.7.0.tgz#e1993689ac42d2b16e9194376cfb6753f6254db1" integrity sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q== @@ -842,7 +847,7 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -abab@^2.0.5: +abab@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== @@ -951,6 +956,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^3.0.2, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -1065,11 +1077,6 @@ colorette@^2.0.14: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== -colors@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" - integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== - commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -1080,11 +1087,6 @@ commander@^7.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -component-emitter@~1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -1149,14 +1151,7 @@ debug@2.6.9: dependencies: ms "2.0.0" -debug@4.3.3: - version "4.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" - integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== - dependencies: - ms "2.1.2" - -debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: +debug@4.3.4, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -1247,7 +1242,7 @@ engine.io@~6.2.0: engine.io-parser "~5.0.3" ws "~8.2.3" -enhanced-resolve@^5.8.3: +enhanced-resolve@^5.9.3: version "5.10.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz#0dc579c3bb2a1032e357ac45b8f3a6f3ad4fb1e6" integrity sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ== @@ -1320,21 +1315,6 @@ events@^3.2.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - extend@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" @@ -1449,11 +1429,6 @@ get-intrinsic@^1.0.2: has "^1.0.3" has-symbols "^1.0.1" -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -1500,11 +1475,6 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" @@ -1547,11 +1517,6 @@ http-proxy@^1.18.1: follow-redirects "^1.0.0" requires-port "^1.0.0" -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -1640,11 +1605,6 @@ is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - is-unicode-supported@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" @@ -1681,10 +1641,10 @@ js-yaml@4.1.0: dependencies: argparse "^2.0.1" -json-parse-better-errors@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== +json-parse-even-better-errors@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== json-schema-traverse@^0.4.1: version "0.4.1" @@ -1700,10 +1660,10 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" -karma-chrome-launcher@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-3.1.0.tgz#805a586799a4d05f4e54f72a204979f3f3066738" - integrity sha512-3dPs/n7vgz1rxxtynpzZTvb9y/GIaW8xjAwcIGttLbycqoFtI7yo1NGnQi6oFTherRE+GIhCAHZC4vEqWGhNvg== +karma-chrome-launcher@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/karma-chrome-launcher/-/karma-chrome-launcher-3.1.1.tgz#baca9cc071b1562a1db241827257bfe5cab597ea" + integrity sha512-hsIglcq1vtboGPAN+DGCISCFOxW+ZVnIqhDQcCMqqCp+4dmJ0Qpq5QAjkbA0X2L9Mi6OBkHi2Srrbmm7pUKkzQ== dependencies: which "^1.2.1" @@ -1730,15 +1690,15 @@ karma-webpack@5.0.0: minimatch "^3.0.4" webpack-merge "^4.1.5" -karma@6.3.16: - version "6.3.16" - resolved "https://registry.yarnpkg.com/karma/-/karma-6.3.16.tgz#76d1a705fd1cf864ee5ed85270b572641e0958ef" - integrity sha512-nEU50jLvDe5yvXqkEJRf8IuvddUkOY2x5Xc4WXHz6dxINgGDrgD2uqQWeVrJs4hbfNaotn+HQ1LZJ4yOXrL7xQ== +karma@6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/karma/-/karma-6.4.0.tgz#82652dfecdd853ec227b74ed718a997028a99508" + integrity sha512-s8m7z0IF5g/bS5ONT7wsOavhW4i4aFkzD4u4wgzAQWT4HGUeWI3i21cK2Yz6jndMAeHETp5XuNsRoyGJZXVd4w== dependencies: + "@colors/colors" "1.5.0" body-parser "^1.19.0" braces "^3.0.2" chokidar "^3.5.1" - colors "1.4.0" connect "^3.7.0" di "^0.0.1" dom-serialize "^2.2.1" @@ -1754,7 +1714,7 @@ karma@6.3.16: qjobs "^1.2.0" range-parser "^1.2.1" rimraf "^3.0.2" - socket.io "^4.2.0" + socket.io "^4.4.1" source-map "^0.6.1" tmp "^0.2.1" ua-parser-js "^0.7.30" @@ -1864,17 +1824,12 @@ mime@^2.5.2: resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -minimatch@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== dependencies: - brace-expansion "^1.1.7" + brace-expansion "^2.0.1" minimatch@^3.0.4, minimatch@^3.1.1: version "3.1.2" @@ -1895,32 +1850,30 @@ mkdirp@^0.5.5: dependencies: minimist "^1.2.6" -mocha@9.2.1: - version "9.2.1" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.2.1.tgz#a1abb675aa9a8490798503af57e8782a78f1338e" - integrity sha512-T7uscqjJVS46Pq1XDXyo9Uvey9gd3huT/DD9cYBb4K2Xc/vbKRPUWK067bxDQRK0yIz6Jxk73IrnimvASzBNAQ== +mocha@10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.0.0.tgz#205447d8993ec755335c4b13deba3d3a13c4def9" + integrity sha512-0Wl+elVUD43Y0BqPZBzZt8Tnkw9CMUdNYnUsTfOM1vuhJVZL+kiesFYsqwBkEEuEixaiPe5ZQdqDgX2jddhmoA== dependencies: "@ungap/promise-all-settled" "1.1.2" ansi-colors "4.1.1" browser-stdout "1.3.1" chokidar "3.5.3" - debug "4.3.3" + debug "4.3.4" diff "5.0.0" escape-string-regexp "4.0.0" find-up "5.0.0" glob "7.2.0" - growl "1.10.5" he "1.2.0" js-yaml "4.1.0" log-symbols "4.1.0" - minimatch "3.0.4" + minimatch "5.0.1" ms "2.1.3" - nanoid "3.2.0" + nanoid "3.3.3" serialize-javascript "6.0.0" strip-json-comments "3.1.1" supports-color "8.1.1" - which "2.0.2" - workerpool "6.2.0" + workerpool "6.2.1" yargs "16.2.0" yargs-parser "20.2.4" yargs-unparser "2.0.0" @@ -1940,10 +1893,10 @@ ms@2.1.3: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -nanoid@3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.2.0.tgz#62667522da6673971cca916a6d3eff3f415ff80c" - integrity sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA== +nanoid@3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== negotiator@0.6.3: version "0.6.3" @@ -1965,13 +1918,6 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - object-assign@^4: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -2003,13 +1949,6 @@ once@^1.3.0: dependencies: wrappy "1" -onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -2058,7 +1997,7 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-key@^3.0.0, path-key@^3.1.0: +path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== @@ -2240,50 +2179,44 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.3: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - socket.io-adapter@~2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz#b50a4a9ecdd00c34d4c8c808224daa1a786152a6" integrity sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg== -socket.io-parser@~4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.0.5.tgz#cb404382c32324cc962f27f3a44058cf6e0552df" - integrity sha512-sNjbT9dX63nqUFIOv95tTVm6elyIU4RvB1m8dOeZt+IgWwcWklFDOdmGcfo3zSiRsnR/3pJkjY5lfoGqEe4Eig== +socket.io-parser@~4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.1.tgz#01c96efa11ded938dcb21cbe590c26af5eff65e5" + integrity sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g== dependencies: - "@types/component-emitter" "^1.2.10" - component-emitter "~1.3.0" + "@socket.io/component-emitter" "~3.1.0" debug "~4.3.1" -socket.io@^4.2.0: - version "4.5.1" - resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.5.1.tgz#aa7e73f8a6ce20ee3c54b2446d321bbb6b1a9029" - integrity sha512-0y9pnIso5a9i+lJmsCdtmTTgJFFSvNQKDnPQRz28mGNnxbmqYg2QPtJTLFxhymFZhAIn50eHAKzJeiNaKr+yUQ== +socket.io@^4.4.1: + version "4.5.3" + resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-4.5.3.tgz#44dffea48d7f5aa41df4a66377c386b953bc521c" + integrity sha512-zdpnnKU+H6mOp7nYRXH4GNv1ux6HL6+lHL8g7Ds7Lj8CkdK1jJK/dlwsKDculbyOHifcJ0Pr/yeXnZQ5GeFrcg== dependencies: accepts "~1.3.4" base64id "~2.0.0" debug "~4.3.2" engine.io "~6.2.0" socket.io-adapter "~2.4.0" - socket.io-parser "~4.0.4" + socket.io-parser "~4.2.0" -source-map-js@^1.0.1: +source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== -source-map-loader@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-3.0.1.tgz#9ae5edc7c2d42570934be4c95d1ccc6352eba52d" - integrity sha512-Vp1UsfyPvgujKQzi4pyDiTOnE3E4H+yHvkVRN3c/9PJmQS4CQJExvcDvaX/D+RV+xQben9HJ56jMJS3CgUeWyA== +source-map-loader@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-4.0.0.tgz#bdc6b118bc6c87ee4d8d851f2d4efcc5abdb2ef5" + integrity sha512-i3KVgM3+QPAHNbGavK+VBq03YoJl24m9JWNbLgsjTj8aJzXG9M61bantBTNBt7CNwY2FYf+RJRYJ3pzalKjIrw== dependencies: - abab "^2.0.5" + abab "^2.0.6" iconv-lite "^0.6.3" - source-map-js "^1.0.1" + source-map-js "^1.0.2" source-map-support@~0.5.20: version "0.5.21" @@ -2340,11 +2273,6 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - strip-json-comments@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -2489,18 +2417,18 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-cli@4.9.2: - version "4.9.2" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.9.2.tgz#77c1adaea020c3f9e2db8aad8ea78d235c83659d" - integrity sha512-m3/AACnBBzK/kMTcxWHcZFPrw/eQuY4Df1TxvIWfWM2x7mRqBQCqKEd96oCUa9jkapLBaFfRce33eGDb4Pr7YQ== +webpack-cli@4.10.0: + version "4.10.0" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.10.0.tgz#37c1d69c8d85214c5a65e589378f53aec64dab31" + integrity sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w== dependencies: "@discoveryjs/json-ext" "^0.5.0" - "@webpack-cli/configtest" "^1.1.1" - "@webpack-cli/info" "^1.4.1" - "@webpack-cli/serve" "^1.6.1" + "@webpack-cli/configtest" "^1.2.0" + "@webpack-cli/info" "^1.5.0" + "@webpack-cli/serve" "^1.7.0" colorette "^2.0.14" commander "^7.0.0" - execa "^5.0.0" + cross-spawn "^7.0.3" fastest-levenshtein "^1.0.12" import-local "^3.0.2" interpret "^2.2.0" @@ -2527,10 +2455,10 @@ webpack-sources@^3.2.3: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@5.69.1: - version "5.69.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.69.1.tgz#8cfd92c192c6a52c99ab00529b5a0d33aa848dc5" - integrity sha512-+VyvOSJXZMT2V5vLzOnDuMz5GxEqLk7hKWQ56YxPW/PQRUuKimPqmEIJOx8jHYeyo65pKbapbW464mvsKbaj4A== +webpack@5.73.0: + version "5.73.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.73.0.tgz#bbd17738f8a53ee5760ea2f59dce7f3431d35d38" + integrity sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^0.0.51" @@ -2541,13 +2469,13 @@ webpack@5.69.1: acorn-import-assertions "^1.7.6" browserslist "^4.14.5" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.8.3" + enhanced-resolve "^5.9.3" es-module-lexer "^0.9.0" eslint-scope "5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" graceful-fs "^4.2.9" - json-parse-better-errors "^1.0.2" + json-parse-even-better-errors "^2.3.1" loader-runner "^4.2.0" mime-types "^2.1.27" neo-async "^2.6.2" @@ -2566,13 +2494,6 @@ whatwg-url@^7.0.0: tr46 "^1.0.1" webidl-conversions "^4.0.2" -which@2.0.2, which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - which@^1.2.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -2580,15 +2501,22 @@ which@^1.2.1: dependencies: isexe "^2.0.0" +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + wildcard@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.0.tgz#a77d20e5200c6faaac979e4b3aadc7b3dd7f8fec" integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== -workerpool@6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" - integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== +workerpool@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== wrap-ansi@^7.0.0: version "7.0.0" diff --git a/lib/build.gradle.kts b/lib/build.gradle.kts deleted file mode 100644 index 03962ea..0000000 --- a/lib/build.gradle.kts +++ /dev/null @@ -1,79 +0,0 @@ -plugins { - id("com.huanshankeji.kotlin-multiplatform-js-browser-conventions") - id("org.jetbrains.compose") version "1.2.0-alpha01-dev750" - id("com.huanshankeji.sonatype-ossrh-publish") -} - -repositories { - maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") -} - -kotlin { - sourceSets { - val jsMain by getting { - dependencies { - implementation(compose.web.core) - implementation(compose.runtime) - - implementation(npm("@webcomponents/webcomponentsjs", DependencyVersions.webcomponents)) - - fun mwcImplementation(module: String) = - implementation(npm("@material/mwc-$module", DependencyVersions.mwc)) - - fun mwcImplementations(vararg modules: String) { - for (module in modules) mwcImplementation(module) - } - - mwcImplementations( - "button", - "textfield", - "select", - "icon-button", - "snackbar", - "circular-progress", - "circular-progress-four-color" - ) - - implementation(npm("@material/card", DependencyVersions.mdc)) - } - } - } -} - -//group = "com.huanshankeji" -version = projectVersion - -val javadocJar by tasks.registering(Jar::class) { - archiveClassifier.set("javadoc") -} - -publishing.publications.withType { - artifact(javadocJar) - - pom { - name.set("Compose for Web Material") - description.set("Some Material components for Compose for Web") - val githubUrl = "https://github.com/huanshankeji/compose-web-material" - url.set(githubUrl) - - licenses { - license { - name.set("The Apache License, Version 2.0") - url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") - } - } - developers { - developer { - id.set("ShreckYe") - name.set("Shreck Ye") - email.set("ShreckYe@gmail.com") - } - } - scm { - val scmString = "scm:git:$githubUrl.git" - connection.set(scmString) - developerConnection.set(scmString) - url.set(githubUrl) - } - } -} diff --git a/lib/src/jsMain/kotlin/com/huanshankeji/compose/web/Layouts.kt b/lib/src/jsMain/kotlin/com/huanshankeji/compose/web/Layouts.kt deleted file mode 100644 index db56511..0000000 --- a/lib/src/jsMain/kotlin/com/huanshankeji/compose/web/Layouts.kt +++ /dev/null @@ -1,104 +0,0 @@ -package com.huanshankeji.compose.web - -import androidx.compose.runtime.Composable -import com.huanshankeji.compose.web.material.defaultSpacing -import org.jetbrains.compose.web.css.* -import org.jetbrains.compose.web.dom.ContentBuilder -import org.jetbrains.compose.web.dom.Div -import org.w3c.dom.HTMLDivElement - -// follow names in Android Jetpack Compose - -@Composable -fun Flexbox( - styles: Styles? = null, - content: ContentBuilder -) = - Div({ - style { - display(DisplayStyle.Flex) - styles?.invoke(this) - } - }, content) - -@Composable -fun Column( - styles: Styles? = null, - fitContent: Boolean = true, - content: ContentBuilder -) = - Flexbox({ - flexDirection(FlexDirection.Column) - if (fitContent) property("width", "fit-content") - styles?.invoke(this) - }, content) - -@Composable -fun ColumnWithSpaceBetween( - styles: Styles? = null, - fitContent: Boolean = true, - content: ContentBuilder -) = - Column({ - justifyContent(JustifyContent.SpaceBetween) - styles?.invoke(this) - }, fitContent, content) - -@Composable -fun Row( - styles: Styles? = null, - content: ContentBuilder -) = - Flexbox({ - flexDirection(FlexDirection.Row) - styles?.invoke(this) - }, content) - -@Composable -fun RowWithSpaceBetween( - styles: Styles? = null, - content: ContentBuilder -) = - Row({ - justifyContent(JustifyContent.SpaceBetween) - styles?.invoke(this) - }, content) - -@Composable -fun Centered( - styles: Styles? = null, - content: ContentBuilder -) = - Flexbox({ - alignItems(AlignItems.Center) - justifyContent(JustifyContent.Center) - styles?.invoke(this) - }, content) - -@Composable -fun CenteredInViewport( - styles: Styles? = null, - content: ContentBuilder -) = - Centered({ - minHeight(100.vh) - styles?.invoke(this) - }, content) - -@Composable -fun FrGrid( - numColumns: Int, - gap: CSSNumeric = defaultSpacing, - content: HTMLElementContent -) = - Div({ - style { - display(DisplayStyle.Grid) - gridTemplateColumns("repeat($numColumns, 1fr)") - gap(gap) - } - }, content) - -@Composable -fun Spacer(numPxs: Int) = - TODO() as Unit diff --git a/lib/src/jsMain/kotlin/com/huanshankeji/compose/web/material/Layouts.kt b/lib/src/jsMain/kotlin/com/huanshankeji/compose/web/material/Layouts.kt deleted file mode 100644 index ba1bac2..0000000 --- a/lib/src/jsMain/kotlin/com/huanshankeji/compose/web/material/Layouts.kt +++ /dev/null @@ -1,45 +0,0 @@ -package com.huanshankeji.compose.web.material - -import androidx.compose.runtime.Composable -import com.huanshankeji.compose.web.CenteredInViewport -import com.huanshankeji.compose.web.Column -import com.huanshankeji.compose.web.Row -import com.huanshankeji.compose.web.Styles -import org.jetbrains.compose.web.attributes.AttrsScope -import org.jetbrains.compose.web.css.CSSNumeric -import org.jetbrains.compose.web.css.gap -import org.jetbrains.compose.web.dom.ContentBuilder -import org.w3c.dom.HTMLDivElement - -@Composable -fun ColumnWithGaps( - styles: Styles? = null, - gap: CSSNumeric = defaultSpacing, - fitContent: Boolean = true, - content: ContentBuilder -) = - Column({ - gap(gap) - styles?.invoke(this) - }, fitContent, content) - -@Composable -fun RowWithGaps( - styles: Styles? = null, - gap: CSSNumeric = defaultSpacing, - content: ContentBuilder -) = - Row({ - gap(gap) - styles?.invoke(this) - }, content) - -@Composable -fun CenteredCardInViewport( - viewportDivStyles: Styles? = null, - cardAttrs: (AttrsScope.() -> Unit)? = null, - content: ContentBuilder -) = - CenteredInViewport(viewportDivStyles) { - MdcCard(cardAttrs, content = content) - } diff --git a/settings.gradle.kts b/settings.gradle.kts index efc7ce1..897a4c8 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,17 +1,6 @@ rootProject.name = "compose-web-material" -include("lib") -project(":lib").name = rootProject.name + +include("compose-web-common") +include(rootProject.name) include("gradle-plugins") project(":gradle-plugins").name = rootProject.name + "-gradle-plugins" - -buildscript { - repositories { - mavenLocal() - gradlePluginPortal() - //maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") - } - dependencies { - classpath(kotlin("gradle-plugin", "1.7.0")) - classpath("com.huanshankeji:kotlin-common-gradle-plugins:0.1.8-kotlin-1.6.10") - } -}