├── .gitignore
├── LICENSE
├── README.md
├── build.gradle.kts
├── buildSrc
├── build.gradle.kts
├── settings.gradle.kts
└── src
│ └── main
│ └── kotlin
│ └── Shared.kt
├── detekt-config.yml
├── examples
├── bootstrap-form
│ ├── build.gradle.kts
│ ├── src
│ │ └── commonMain
│ │ │ ├── kotlin
│ │ │ └── main.kt
│ │ │ └── resources
│ │ │ └── index.html
│ └── webpack.config.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
├── fullstack-ktor-koin
│ ├── build.gradle.kts
│ ├── gradle.properties
│ ├── src
│ │ ├── commonMain
│ │ │ └── kotlin
│ │ │ │ └── example
│ │ │ │ └── IPingService.kt
│ │ ├── jvmMain
│ │ │ ├── kotlin
│ │ │ │ └── example
│ │ │ │ │ ├── Main.kt
│ │ │ │ │ └── PingService.kt
│ │ │ └── resources
│ │ │ │ ├── application.conf
│ │ │ │ └── logback.xml
│ │ └── webMain
│ │ │ ├── kotlin
│ │ │ └── example
│ │ │ │ └── main.kt
│ │ │ └── resources
│ │ │ └── index.html
│ └── webpack.config.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── proxy.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
├── hello-world
│ ├── build.gradle.kts
│ ├── src
│ │ └── commonMain
│ │ │ ├── kotlin
│ │ │ └── main.kt
│ │ │ └── resources
│ │ │ └── index.html
│ └── webpack.config.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
├── js-framework-benchmark
│ ├── build.gradle.kts
│ ├── src
│ │ └── commonMain
│ │ │ ├── kotlin
│ │ │ └── main.kt
│ │ │ └── resources
│ │ │ └── index.html
│ └── webpack.config.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
├── playground
│ ├── build.gradle.kts
│ ├── src
│ │ ├── commonMain
│ │ │ ├── kotlin
│ │ │ │ └── main.kt
│ │ │ └── resources
│ │ │ │ ├── index.html
│ │ │ │ ├── modules
│ │ │ │ ├── css
│ │ │ │ │ └── style.css
│ │ │ │ ├── i18n
│ │ │ │ │ ├── messages-de.po
│ │ │ │ │ ├── messages-en.po
│ │ │ │ │ ├── messages-es.po
│ │ │ │ │ ├── messages-fr.po
│ │ │ │ │ ├── messages-ja.po
│ │ │ │ │ ├── messages-ko.po
│ │ │ │ │ ├── messages-pl.po
│ │ │ │ │ └── messages-ru.po
│ │ │ │ ├── img
│ │ │ │ │ ├── cat.jpg
│ │ │ │ │ └── dog.jpg
│ │ │ │ └── json
│ │ │ │ │ └── test.json
│ │ │ │ └── tailwind
│ │ │ │ ├── tailwind.config.js
│ │ │ │ └── tailwind.twcss
│ │ ├── jsMain
│ │ │ └── kotlin
│ │ │ │ └── main.kt
│ │ └── wasmJsMain
│ │ │ └── kotlin
│ │ │ └── main.kt
│ └── webpack.config.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
├── realworld
│ ├── build.gradle.kts
│ ├── gradle.properties
│ ├── src
│ │ ├── jvmMain
│ │ │ ├── kotlin
│ │ │ │ └── io
│ │ │ │ │ └── realworld
│ │ │ │ │ └── Main.kt
│ │ │ └── resources
│ │ │ │ ├── application.conf
│ │ │ │ └── logback.xml
│ │ └── webMain
│ │ │ ├── kotlin
│ │ │ └── io
│ │ │ │ └── realworld
│ │ │ │ ├── Api.kt
│ │ │ │ ├── App.kt
│ │ │ │ ├── ConduitAction.kt
│ │ │ │ ├── ConduitManager.kt
│ │ │ │ ├── ConduitReducer.kt
│ │ │ │ ├── ConduitState.kt
│ │ │ │ ├── TokenProvider.kt
│ │ │ │ ├── externals
│ │ │ │ └── Date.kt
│ │ │ │ ├── layout
│ │ │ │ ├── ArticlePreview.kt
│ │ │ │ ├── FeedToggle.kt
│ │ │ │ ├── Home.kt
│ │ │ │ ├── Profile.kt
│ │ │ │ ├── articles
│ │ │ │ │ ├── Article.kt
│ │ │ │ │ ├── ArticleComment.kt
│ │ │ │ │ └── ArticleMeta.kt
│ │ │ │ ├── shared
│ │ │ │ │ ├── Footer.kt
│ │ │ │ │ ├── Header.kt
│ │ │ │ │ ├── Pagination.kt
│ │ │ │ │ └── Tags.kt
│ │ │ │ └── users
│ │ │ │ │ ├── Editor.kt
│ │ │ │ │ ├── Login.kt
│ │ │ │ │ ├── Register.kt
│ │ │ │ │ └── Settings.kt
│ │ │ │ └── model
│ │ │ │ ├── Articles.kt
│ │ │ │ └── Users.kt
│ │ │ └── resources
│ │ │ └── index.html
│ ├── webpack.config.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
│ └── webpack.config.ssr.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
├── ssr-javalin
│ ├── build.gradle.kts
│ ├── gradle.properties
│ ├── src
│ │ ├── jvmMain
│ │ │ ├── kotlin
│ │ │ │ └── example
│ │ │ │ │ └── Main.kt
│ │ │ └── resources
│ │ │ │ ├── application.properties
│ │ │ │ └── logback.xml
│ │ └── webMain
│ │ │ ├── kotlin
│ │ │ └── example
│ │ │ │ └── main.kt
│ │ │ └── resources
│ │ │ └── index.html
│ ├── webpack.config.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
│ └── webpack.config.ssr.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
├── ssr-jooby
│ ├── build.gradle.kts
│ ├── gradle.properties
│ ├── src
│ │ ├── jvmMain
│ │ │ ├── kotlin
│ │ │ │ └── example
│ │ │ │ │ └── Main.kt
│ │ │ └── resources
│ │ │ │ ├── application.conf
│ │ │ │ └── logback.xml
│ │ └── webMain
│ │ │ ├── kotlin
│ │ │ └── example
│ │ │ │ └── main.kt
│ │ │ └── resources
│ │ │ └── index.html
│ ├── webpack.config.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
│ └── webpack.config.ssr.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
├── ssr-ktor
│ ├── build.gradle.kts
│ ├── gradle.properties
│ ├── src
│ │ ├── jvmMain
│ │ │ ├── kotlin
│ │ │ │ └── example
│ │ │ │ │ └── Main.kt
│ │ │ └── resources
│ │ │ │ ├── application.conf
│ │ │ │ └── logback.xml
│ │ └── webMain
│ │ │ ├── kotlin
│ │ │ └── example
│ │ │ │ └── main.kt
│ │ │ └── resources
│ │ │ └── index.html
│ ├── webpack.config.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
│ └── webpack.config.ssr.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
├── ssr-micronaut
│ ├── application
│ │ └── build.gradle.kts
│ ├── build.gradle.kts
│ ├── gradle.properties
│ ├── src
│ │ ├── jvmMain
│ │ │ ├── kotlin
│ │ │ │ └── example
│ │ │ │ │ └── Main.kt
│ │ │ └── resources
│ │ │ │ ├── application.yml
│ │ │ │ └── logback.xml
│ │ └── webMain
│ │ │ ├── kotlin
│ │ │ └── example
│ │ │ │ └── main.kt
│ │ │ └── resources
│ │ │ └── index.html
│ ├── webpack.config.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
│ └── webpack.config.ssr.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
├── ssr-spring-boot
│ ├── application
│ │ └── build.gradle.kts
│ ├── build.gradle.kts
│ ├── gradle.properties
│ ├── src
│ │ ├── jvmMain
│ │ │ ├── kotlin
│ │ │ │ └── example
│ │ │ │ │ └── Main.kt
│ │ │ └── resources
│ │ │ │ ├── application.yml
│ │ │ │ └── logback.xml
│ │ └── webMain
│ │ │ ├── kotlin
│ │ │ └── example
│ │ │ │ └── main.kt
│ │ │ └── resources
│ │ │ └── index.html
│ ├── webpack.config.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
│ └── webpack.config.ssr.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
├── ssr-vertx
│ ├── build.gradle.kts
│ ├── gradle.properties
│ ├── src
│ │ ├── jvmMain
│ │ │ ├── kotlin
│ │ │ │ └── example
│ │ │ │ │ └── Main.kt
│ │ │ └── resources
│ │ │ │ ├── application.properties
│ │ │ │ └── logback.xml
│ │ └── webMain
│ │ │ ├── kotlin
│ │ │ └── example
│ │ │ │ └── main.kt
│ │ │ └── resources
│ │ │ └── index.html
│ ├── webpack.config.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
│ └── webpack.config.ssr.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
├── todomvc-ballast
│ ├── build.gradle.kts
│ ├── src
│ │ └── commonMain
│ │ │ ├── kotlin
│ │ │ ├── TodoApp.kt
│ │ │ ├── TodoContract.kt
│ │ │ ├── TodoEventHandler.kt
│ │ │ ├── TodoInputHandler.kt
│ │ │ ├── TodoModel.kt
│ │ │ ├── TodoModule.kt
│ │ │ ├── TodoSavedStateAdapter.kt
│ │ │ └── TodoViewModel.kt
│ │ │ └── resources
│ │ │ ├── index.html
│ │ │ ├── node_modules
│ │ │ ├── todomvc-app-css
│ │ │ │ ├── index.css
│ │ │ │ ├── package.json
│ │ │ │ └── readme.md
│ │ │ └── todomvc-common
│ │ │ │ ├── base.css
│ │ │ │ ├── base.js
│ │ │ │ ├── package.json
│ │ │ │ └── readme.md
│ │ │ ├── package-lock.json
│ │ │ └── package.json
│ └── webpack.config.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ ├── file.js
│ │ ├── tailwind.js
│ │ ├── temporal.js
│ │ └── webpack.js
└── todomvc
│ ├── build.gradle.kts
│ ├── src
│ └── commonMain
│ │ ├── kotlin
│ │ ├── TodoApp.kt
│ │ ├── TodoInputs.kt
│ │ ├── TodoModel.kt
│ │ ├── TodoState.kt
│ │ └── TodoViewModel.kt
│ │ └── resources
│ │ ├── index.html
│ │ ├── node_modules
│ │ ├── todomvc-app-css
│ │ │ ├── index.css
│ │ │ ├── package.json
│ │ │ └── readme.md
│ │ └── todomvc-common
│ │ │ ├── base.css
│ │ │ ├── base.js
│ │ │ ├── package.json
│ │ │ └── readme.md
│ │ ├── package-lock.json
│ │ └── package.json
│ └── webpack.config.d
│ ├── bootstrap.js
│ ├── css.js
│ ├── file.js
│ ├── tailwind.js
│ ├── temporal.js
│ └── webpack.js
├── gradle.properties
├── gradle
├── libs.versions.toml
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── kilua-assets
├── README.md
├── build.gradle.kts
└── src
│ ├── css
│ ├── k-animation.css
│ ├── k-bootstrap.css
│ ├── k-jetpack.css
│ ├── k-splitjs.css
│ ├── k-style.css
│ ├── k-tabulator.css
│ ├── k-tempus-dominus.css
│ ├── k-toastify.css
│ ├── k-tom-select.css
│ └── k-trix.css
│ ├── index.js
│ └── js
│ ├── nodejs_dom.js
│ └── nodejs_dom.mjs
├── kilua
├── build.gradle.kts
└── src
│ ├── commonMain
│ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ ├── Application.kt
│ │ ├── HMR.kt
│ │ ├── compose
│ │ ├── ComponentApplier.kt
│ │ ├── ComponentNode.kt
│ │ ├── DomMonotonicClockImpl.kt
│ │ ├── GlobalSnapshotManager.kt
│ │ ├── NoDomMonotonicClockImpl.kt
│ │ ├── NonDisposableRoot.kt
│ │ ├── PromiseDispatcher.kt
│ │ └── Root.kt
│ │ ├── core
│ │ ├── Component.kt
│ │ ├── ComponentBase.kt
│ │ ├── IComponent.kt
│ │ ├── PropertyDelegate.kt
│ │ ├── RenderConfig.kt
│ │ └── SafeDomFactory.kt
│ │ ├── externals
│ │ ├── JsArray.kt
│ │ └── NodeJsDom.kt
│ │ ├── form
│ │ ├── FieldParams.kt
│ │ ├── FieldWithLabel.kt
│ │ ├── Form.kt
│ │ ├── FormControl.kt
│ │ ├── Input.kt
│ │ ├── InputAttrs.kt
│ │ ├── Mask.kt
│ │ ├── Validation.kt
│ │ ├── check
│ │ │ ├── AbstractCheck.kt
│ │ │ ├── CheckBox.kt
│ │ │ ├── Radio.kt
│ │ │ ├── RadioGroup.kt
│ │ │ └── TriStateCheckBox.kt
│ │ ├── color
│ │ │ └── ColorPicker.kt
│ │ ├── number
│ │ │ ├── Numeric.kt
│ │ │ ├── Range.kt
│ │ │ └── Spinner.kt
│ │ ├── select
│ │ │ └── Select.kt
│ │ ├── text
│ │ │ ├── Password.kt
│ │ │ ├── Text.kt
│ │ │ └── TextArea.kt
│ │ ├── time
│ │ │ ├── Date.kt
│ │ │ ├── DateTime.kt
│ │ │ └── Time.kt
│ │ └── upload
│ │ │ └── Upload.kt
│ │ ├── html
│ │ ├── A.kt
│ │ ├── Atom.kt
│ │ ├── Button.kt
│ │ ├── Canvas.kt
│ │ ├── CommentNode.kt
│ │ ├── Css.kt
│ │ ├── CssSize.kt
│ │ ├── HtmlTags.kt
│ │ ├── Iframe.kt
│ │ ├── Img.kt
│ │ ├── Label.kt
│ │ ├── Ol.kt
│ │ ├── Optgroup.kt
│ │ ├── Option.kt
│ │ ├── RawHtml.kt
│ │ ├── RawHtmlBlock.kt
│ │ ├── Tag.kt
│ │ ├── Td.kt
│ │ ├── TextNode.kt
│ │ ├── Th.kt
│ │ ├── helpers
│ │ │ ├── CombineClickable.kt
│ │ │ ├── EventsState.kt
│ │ │ ├── GlobalCallbacks.kt
│ │ │ ├── ModifierBase.kt
│ │ │ ├── PropertyListBuilder.kt
│ │ │ ├── TagAttrs.kt
│ │ │ ├── TagAttrsDelegate.kt
│ │ │ ├── TagAttrsFun.kt
│ │ │ ├── TagBase.kt
│ │ │ ├── TagBaseFun.kt
│ │ │ ├── TagDnd.kt
│ │ │ ├── TagDndDelegate.kt
│ │ │ ├── TagEvents.kt
│ │ │ ├── TagEventsDelegate.kt
│ │ │ ├── TagEventsSuspending.kt
│ │ │ ├── TagStyle.kt
│ │ │ ├── TagStyleDelegate.kt
│ │ │ └── TagStyleFun.kt
│ │ └── style
│ │ │ ├── CssStyle.kt
│ │ │ ├── Style.kt
│ │ │ └── StyleParams.kt
│ │ ├── i18n
│ │ ├── DefaultLocale.kt
│ │ ├── Locale.kt
│ │ ├── LocaleChangeListener.kt
│ │ ├── LocaleManager.kt
│ │ └── SimpleLocale.kt
│ │ ├── panel
│ │ ├── FlexPanel.kt
│ │ ├── GridPanel.kt
│ │ ├── HPanel.kt
│ │ └── VPanel.kt
│ │ ├── state
│ │ ├── StateFlowUtils.kt
│ │ └── WithStateFlow.kt
│ │ └── utils
│ │ ├── Common.kt
│ │ ├── Event.kt
│ │ ├── File.kt
│ │ ├── Format.kt
│ │ ├── JavaScript.kt
│ │ ├── Mutations.kt
│ │ ├── NativeList.kt
│ │ ├── NativeMap.kt
│ │ ├── Promise.kt
│ │ ├── Serialization.kt
│ │ └── Time.kt
│ ├── commonTest
│ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ ├── compose
│ │ ├── ComponentApplierSpec.kt
│ │ └── RootSpec.kt
│ │ ├── core
│ │ └── PropertyDelegateSpec.kt
│ │ ├── form
│ │ ├── FieldWithLabelSpec.kt
│ │ ├── FormSpec.kt
│ │ ├── check
│ │ │ ├── CheckBoxSpec.kt
│ │ │ ├── RadioGroupSpec.kt
│ │ │ ├── RadioSpec.kt
│ │ │ └── TriStateCheckBoxSpec.kt
│ │ ├── color
│ │ │ └── ColorPickerSpec.kt
│ │ ├── number
│ │ │ ├── NumericSpec.kt
│ │ │ ├── RangeSpec.kt
│ │ │ └── SpinnerSpec.kt
│ │ ├── select
│ │ │ └── SelectSpec.kt
│ │ ├── text
│ │ │ ├── PasswordSpec.kt
│ │ │ ├── TextAreaSpec.kt
│ │ │ └── TextSpec.kt
│ │ ├── time
│ │ │ ├── DateSpec.kt
│ │ │ ├── DateTimeSpec.kt
│ │ │ └── TimeSpec.kt
│ │ └── upload
│ │ │ └── UploadSpec.kt
│ │ ├── html
│ │ ├── ASpec.kt
│ │ ├── AbbrSpec.kt
│ │ ├── AddressSpec.kt
│ │ ├── AreaSpec.kt
│ │ ├── ArticleSpec.kt
│ │ ├── AsideSpec.kt
│ │ ├── AudioSpec.kt
│ │ ├── BSpec.kt
│ │ ├── BaseSpec.kt
│ │ ├── BdiSpec.kt
│ │ ├── BdoSpec.kt
│ │ ├── BlockquoteSpec.kt
│ │ ├── BodySpec.kt
│ │ ├── BrSpec.kt
│ │ ├── ButtonSpec.kt
│ │ ├── CanvasSpec.kt
│ │ ├── CaptionSpec.kt
│ │ ├── CiteSpec.kt
│ │ ├── CodeSpec.kt
│ │ ├── ColSpec.kt
│ │ ├── ColgroupSpec.kt
│ │ ├── CssSizeSpec.kt
│ │ ├── CssSpec.kt
│ │ ├── DataSpec.kt
│ │ ├── DatalistSpec.kt
│ │ ├── DdSpec.kt
│ │ ├── DelSpec.kt
│ │ ├── DetailsSpec.kt
│ │ ├── DfnSpec.kt
│ │ ├── DialogSpec.kt
│ │ ├── DivSpec.kt
│ │ ├── DlSpec.kt
│ │ ├── DtSpec.kt
│ │ ├── EmSpec.kt
│ │ ├── EmbedSpec.kt
│ │ ├── FieldsetSpec.kt
│ │ ├── FigcaptionSpec.kt
│ │ ├── FigureSpec.kt
│ │ ├── FooterSpec.kt
│ │ ├── H1Spec.kt
│ │ ├── H2Spec.kt
│ │ ├── H3Spec.kt
│ │ ├── H4Spec.kt
│ │ ├── H5Spec.kt
│ │ ├── H6Spec.kt
│ │ ├── HeadSpec.kt
│ │ ├── HeaderSpec.kt
│ │ ├── HgroupSpec.kt
│ │ ├── HrSpec.kt
│ │ ├── HtmlSpec.kt
│ │ ├── ISpec.kt
│ │ ├── IframeSpec.kt
│ │ ├── ImgSpec.kt
│ │ ├── InsSpec.kt
│ │ ├── KbdSpec.kt
│ │ ├── LabelSpec.kt
│ │ ├── LegendSpec.kt
│ │ ├── LiSpec.kt
│ │ ├── LinkSpec.kt
│ │ ├── MainSpec.kt
│ │ ├── MapTagSpec.kt
│ │ ├── MarkSpec.kt
│ │ ├── MenuSpec.kt
│ │ ├── MetaSpec.kt
│ │ ├── MeterSpec.kt
│ │ ├── NavSpec.kt
│ │ ├── NoscriptSpec.kt
│ │ ├── ObjectTagSpec.kt
│ │ ├── OlSpec.kt
│ │ ├── OptgroupSpec.kt
│ │ ├── OptionSpec.kt
│ │ ├── OutputSpec.kt
│ │ ├── PSpec.kt
│ │ ├── PictureSpec.kt
│ │ ├── PortalSpec.kt
│ │ ├── PreSpec.kt
│ │ ├── ProgressSpec.kt
│ │ ├── QSpec.kt
│ │ ├── RawHtmlBlockSpec.kt
│ │ ├── RawHtmlSpec.kt
│ │ ├── RpSpec.kt
│ │ ├── RtSpec.kt
│ │ ├── RubySpec.kt
│ │ ├── SSpec.kt
│ │ ├── SampSpec.kt
│ │ ├── ScriptSpec.kt
│ │ ├── SearchSpec.kt
│ │ ├── SectionSpec.kt
│ │ ├── SlotSpec.kt
│ │ ├── SmallSpec.kt
│ │ ├── SourceSpec.kt
│ │ ├── SpanSpec.kt
│ │ ├── StrongSpec.kt
│ │ ├── SubSpec.kt
│ │ ├── SummarySpec.kt
│ │ ├── SupSpec.kt
│ │ ├── TableSpec.kt
│ │ ├── TagSpec.kt
│ │ ├── TbodySpec.kt
│ │ ├── TdSpec.kt
│ │ ├── TemplateSpec.kt
│ │ ├── TextNodeSpec.kt
│ │ ├── TfootSpec.kt
│ │ ├── ThSpec.kt
│ │ ├── TheadSpec.kt
│ │ ├── TimeSpec.kt
│ │ ├── TitleSpec.kt
│ │ ├── TrSpec.kt
│ │ ├── TrackSpec.kt
│ │ ├── USpec.kt
│ │ ├── UlSpec.kt
│ │ ├── VarTagSpec.kt
│ │ ├── VideoSpec.kt
│ │ ├── WbrSpec.kt
│ │ └── style
│ │ │ ├── CssStyleSpec.kt
│ │ │ ├── StyleParamsSpec.kt
│ │ │ └── StyleSpec.kt
│ │ ├── i18n
│ │ └── SimpleLocaleSpec.kt
│ │ └── utils
│ │ ├── CommonSpec.kt
│ │ ├── FormatSpec.kt
│ │ ├── JavaScriptSpec.kt
│ │ ├── NativeListSpec.kt
│ │ └── NativeMapSpec.kt
│ ├── jsMain
│ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ ├── externals
│ │ ├── JsArray.js.kt
│ │ └── NodeJsDom.js.kt
│ │ └── utils
│ │ ├── Common.js.kt
│ │ ├── JavaScript.js.kt
│ │ ├── NativeList.js.kt
│ │ ├── NativeMap.js.kt
│ │ └── Promise.js.kt
│ └── wasmJsMain
│ └── kotlin
│ └── dev
│ └── kilua
│ ├── HMR.wasmJs.kt
│ ├── externals
│ ├── JsArray.wasmJs.kt
│ └── NodeJsDom.wasmJs.kt
│ └── utils
│ ├── Common.wasmJs.kt
│ ├── JavaScript.wasmJs.kt
│ ├── NativeList.wasmJs.kt
│ ├── NativeMap.wasmJs.kt
│ └── Promise.wasmJs.kt
├── kotlin-js-store
├── package-lock.json
└── wasm
│ └── package-lock.json
├── modules
├── kilua-animation
│ ├── build.gradle.kts
│ └── src
│ │ └── commonMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ ├── AnimationModule.kt
│ │ ├── animation
│ │ ├── AnimateAsState.kt
│ │ ├── AnimatedVisibility.kt
│ │ ├── CssTransition.kt
│ │ ├── MotionAnimatedVisibility.kt
│ │ ├── MotionAnimation.kt
│ │ ├── MotionTransition.kt
│ │ └── TransitionType.kt
│ │ └── externals
│ │ └── Motion.kt
├── kilua-annotations
│ ├── build.gradle.kts
│ └── src
│ │ └── commonMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── annotations
│ │ └── Annotations.kt
├── kilua-bootstrap-icons
│ ├── build.gradle.kts
│ └── src
│ │ └── commonMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── BootstrapIconsModule.kt
├── kilua-bootstrap
│ ├── build.gradle.kts
│ └── src
│ │ ├── commonMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ ├── BootstrapCssCoreModule.kt
│ │ │ ├── BootstrapCssModule.kt
│ │ │ ├── BootstrapModule.kt
│ │ │ ├── dropdown
│ │ │ ├── DropDown.kt
│ │ │ ├── DropDownButton.kt
│ │ │ └── DropDownMenu.kt
│ │ │ ├── externals
│ │ │ └── Bootstrap.kt
│ │ │ ├── html
│ │ │ ├── BsButton.kt
│ │ │ └── Css.kt
│ │ │ ├── modal
│ │ │ ├── Alert.kt
│ │ │ ├── Confirm.kt
│ │ │ └── Modal.kt
│ │ │ ├── panel
│ │ │ ├── Accordion.kt
│ │ │ ├── Carousel.kt
│ │ │ ├── Offcanvas.kt
│ │ │ └── TabPanel.kt
│ │ │ ├── popup
│ │ │ ├── Popover.kt
│ │ │ ├── PopupOptions.kt
│ │ │ └── Tooltip.kt
│ │ │ ├── theme
│ │ │ ├── ThemeManager.kt
│ │ │ └── ThemeSwitcher.kt
│ │ │ └── toast
│ │ │ └── Toast.kt
│ │ ├── commonTest
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ ├── dropdown
│ │ │ └── DropDownSpec.kt
│ │ │ ├── html
│ │ │ └── BsButtonSpec.kt
│ │ │ ├── modal
│ │ │ └── ModalSpec.kt
│ │ │ └── panel
│ │ │ ├── AccordionSpec.kt
│ │ │ ├── CarouselSpec.kt
│ │ │ ├── OffcanvasSpec.kt
│ │ │ └── TabPanelSpec.kt
│ │ ├── jsMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ ├── BootstrapModule.js.kt
│ │ │ └── externals
│ │ │ └── NodeJsDom.js.kt
│ │ └── wasmJsMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ ├── BootstrapModule.wasmJs.kt
│ │ └── externals
│ │ └── NodeJsDom.wasmJs.kt
├── kilua-common-types
│ ├── build.gradle.kts
│ └── src
│ │ ├── commonMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ └── types
│ │ │ └── KFile.kt
│ │ └── jvmMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── types
│ │ └── KFileExt.kt
├── kilua-core-modules
│ ├── build.gradle.kts
│ └── src
│ │ └── commonMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ ├── CoreModule.kt
│ │ ├── CssRegister.kt
│ │ ├── ModuleInitializer.kt
│ │ └── Modules.kt
├── kilua-fontawesome
│ ├── build.gradle.kts
│ └── src
│ │ └── commonMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── FontAwesomeModule.kt
├── kilua-i18n
│ ├── build.gradle.kts
│ └── src
│ │ └── commonMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── i18n
│ │ └── I18n.kt
├── kilua-imask
│ ├── build.gradle.kts
│ └── src
│ │ ├── commonMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ ├── ImaskModule.kt
│ │ │ ├── externals
│ │ │ └── ImaskJs.kt
│ │ │ └── form
│ │ │ ├── Imask.kt
│ │ │ ├── ImaskFactory.kt
│ │ │ ├── ImaskOptions.kt
│ │ │ ├── Number.kt
│ │ │ └── number
│ │ │ └── ImaskNumeric.kt
│ │ ├── commonTest
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ └── form
│ │ │ └── number
│ │ │ └── ImaskNumericSpec.kt
│ │ ├── jsMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ └── form
│ │ │ └── Number.js.kt
│ │ └── wasmJsMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── form
│ │ └── Number.wasmJs.kt
├── kilua-jetpack
│ ├── build.gradle.kts
│ └── src
│ │ ├── commonMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ ├── JetpackModule.kt
│ │ │ └── compose
│ │ │ ├── adaptive
│ │ │ ├── BootstrapBreakpoint.kt
│ │ │ ├── Breakpoint.kt
│ │ │ ├── MediaQuery.kt
│ │ │ ├── Orientation.kt
│ │ │ ├── TailwindcssBreakpoint.kt
│ │ │ └── WindowSizeClass.kt
│ │ │ ├── foundation
│ │ │ └── layout
│ │ │ │ ├── Arrangement.kt
│ │ │ │ ├── Box.kt
│ │ │ │ ├── BoxDiv.kt
│ │ │ │ ├── BoxScope.kt
│ │ │ │ ├── Column.kt
│ │ │ │ ├── FlexScope.kt
│ │ │ │ └── Row.kt
│ │ │ └── ui
│ │ │ ├── Alignment.kt
│ │ │ ├── AttrsModifier.kt
│ │ │ ├── AttrsModifiers.kt
│ │ │ ├── BaseModifier.kt
│ │ │ ├── BaseModifiers.kt
│ │ │ ├── DndModifier.kt
│ │ │ ├── DndModifiers.kt
│ │ │ ├── EventsModifier.kt
│ │ │ ├── EventsModifiers.kt
│ │ │ ├── Modifier.kt
│ │ │ ├── StyleModifier.kt
│ │ │ └── StyleModifiers.kt
│ │ └── commonTest
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── compose
│ │ ├── foundation
│ │ └── layout
│ │ │ ├── BoxSpec.kt
│ │ │ ├── ColumnSpec.kt
│ │ │ └── RowSpec.kt
│ │ └── ui
│ │ └── ModifierSpec.kt
├── kilua-lazy-layouts
│ ├── build.gradle.kts
│ └── src
│ │ └── commonMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── panel
│ │ ├── Components.kt
│ │ ├── LazyDsl.kt
│ │ ├── LazyLinearLayout.kt
│ │ ├── LoadedItem.kt
│ │ ├── Section.kt
│ │ └── VisibilityDetector.kt
├── kilua-leaflet
│ ├── build.gradle.kts
│ └── src
│ │ ├── commonMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ ├── LeafletModule.kt
│ │ │ ├── externals
│ │ │ └── leaflet
│ │ │ │ ├── callback.kt
│ │ │ │ ├── control
│ │ │ │ ├── Attribution.kt
│ │ │ │ ├── Control.kt
│ │ │ │ ├── Layers.kt
│ │ │ │ ├── Scale.kt
│ │ │ │ └── Zoom.kt
│ │ │ │ ├── core
│ │ │ │ ├── Class.kt
│ │ │ │ └── Handler.kt
│ │ │ │ ├── dom
│ │ │ │ ├── DomUtil.kt
│ │ │ │ └── Draggable.kt
│ │ │ │ ├── events
│ │ │ │ ├── Evented.kt
│ │ │ │ ├── LeafletEventHandlerFnMap.kt
│ │ │ │ ├── eventHandlerFns.kt
│ │ │ │ └── leafletEvents.kt
│ │ │ │ ├── geo
│ │ │ │ ├── CRS.kt
│ │ │ │ ├── Coords.kt
│ │ │ │ ├── LatLng.kt
│ │ │ │ ├── LatLngBounds.kt
│ │ │ │ └── Projection.kt
│ │ │ │ ├── geometry
│ │ │ │ ├── Bounds.kt
│ │ │ │ └── Point.kt
│ │ │ │ ├── layer
│ │ │ │ ├── FeatureGroup.kt
│ │ │ │ ├── GeoJSON.kt
│ │ │ │ ├── Layer.kt
│ │ │ │ ├── LayerGroup.kt
│ │ │ │ ├── marker
│ │ │ │ │ ├── DivIcon.kt
│ │ │ │ │ ├── Icon.kt
│ │ │ │ │ └── Marker.kt
│ │ │ │ ├── overlay
│ │ │ │ │ ├── DivOverlay.kt
│ │ │ │ │ ├── ImageOverlay.kt
│ │ │ │ │ ├── MediaOverlay.kt
│ │ │ │ │ ├── Popup.kt
│ │ │ │ │ ├── SVGOverlay.kt
│ │ │ │ │ ├── Tooltip.kt
│ │ │ │ │ └── VideoOverlay.kt
│ │ │ │ ├── styleFunction.kt
│ │ │ │ ├── tile
│ │ │ │ │ ├── GridLayer.kt
│ │ │ │ │ ├── TileLayer.kt
│ │ │ │ │ └── WMS.kt
│ │ │ │ └── vector
│ │ │ │ │ ├── Canvas.kt
│ │ │ │ │ ├── Circle.kt
│ │ │ │ │ ├── CircleMarker.kt
│ │ │ │ │ ├── Path.kt
│ │ │ │ │ ├── Polygon.kt
│ │ │ │ │ ├── Polyline.kt
│ │ │ │ │ ├── Rectangle.kt
│ │ │ │ │ ├── Renderer.kt
│ │ │ │ │ └── SVG.kt
│ │ │ │ ├── map
│ │ │ │ ├── LeafletMap.kt
│ │ │ │ └── mapPanes.kt
│ │ │ │ └── unionAliases.kt
│ │ │ └── maps
│ │ │ ├── BaseTileLayer.kt
│ │ │ ├── LeafletObjectFactory.kt
│ │ │ ├── Maps.kt
│ │ │ └── MapsOptions.kt
│ │ └── commonTest
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── maps
│ │ └── MapsSpec.kt
├── kilua-marked
│ ├── build.gradle.kts
│ └── src
│ │ ├── commonMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ ├── externals
│ │ │ └── MarkedJs.kt
│ │ │ └── marked
│ │ │ └── Marked.kt
│ │ └── commonTest
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── marked
│ │ └── MarkedSpec.kt
├── kilua-rest
│ ├── build.gradle.kts
│ └── src
│ │ └── commonMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── rest
│ │ └── RestClient.kt
├── kilua-routing
│ ├── build.gradle.kts
│ └── src
│ │ ├── commonMain
│ │ └── kotlin
│ │ │ ├── app
│ │ │ └── softwork
│ │ │ │ └── routingcompose
│ │ │ │ ├── BrowserRouter.kt
│ │ │ │ ├── DelegateRouter.kt
│ │ │ │ ├── HashRouter.kt
│ │ │ │ ├── Parameters.kt
│ │ │ │ ├── Path.kt
│ │ │ │ ├── RouteBuilder.kt
│ │ │ │ ├── Router.kt
│ │ │ │ └── Routing.kt
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ ├── html
│ │ │ └── NavLink.kt
│ │ │ └── routing
│ │ │ ├── GlobalRouter.kt
│ │ │ ├── RouteAction.kt
│ │ │ ├── SimpleBrowserRouter.kt
│ │ │ └── SimpleHashRouter.kt
│ │ └── commonTest
│ │ └── kotlin
│ │ └── app
│ │ └── softwork
│ │ └── routingcompose
│ │ ├── ParametersTest.kt
│ │ └── PathTest.kt
├── kilua-rsup-progress
│ ├── build.gradle.kts
│ └── src
│ │ └── commonMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ ├── externals
│ │ └── RsupProgress.kt
│ │ └── progress
│ │ └── Progress.kt
├── kilua-sanitize-html
│ ├── build.gradle.kts
│ └── src
│ │ ├── commonMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ ├── externals
│ │ │ └── SanitizeHtmlJs.kt
│ │ │ └── sanitize
│ │ │ └── SanitizeHtml.kt
│ │ └── commonTest
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── sanitize
│ │ └── SanitizeHtmlSpec.kt
├── kilua-select-remote
│ ├── build.gradle.kts
│ └── src
│ │ └── commonMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── form
│ │ └── select
│ │ └── SelectRemote.kt
├── kilua-splitjs
│ ├── build.gradle.kts
│ └── src
│ │ ├── commonMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ ├── SplitjsModule.kt
│ │ │ ├── externals
│ │ │ └── SplitJs.kt
│ │ │ └── panel
│ │ │ └── SplitPanel.kt
│ │ ├── commonTest
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ └── panel
│ │ │ └── SplitPanelSpec.kt
│ │ ├── jsMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ └── externals
│ │ │ ├── SplitJs.js.kt
│ │ │ └── SplitJs.kt
│ │ └── wasmJsMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── externals
│ │ └── SplitJs.wasmJs.kt
├── kilua-ssr-server-javalin
│ ├── build.gradle.kts
│ └── src
│ │ └── jvmMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── ssr
│ │ └── InitSsr.kt
├── kilua-ssr-server-jooby
│ ├── build.gradle.kts
│ └── src
│ │ └── jvmMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── ssr
│ │ └── InitSsr.kt
├── kilua-ssr-server-ktor
│ ├── build.gradle.kts
│ └── src
│ │ └── jvmMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── ssr
│ │ └── InitSsr.kt
├── kilua-ssr-server-micronaut
│ ├── build.gradle.kts
│ └── src
│ │ └── jvmMain
│ │ ├── kotlin
│ │ └── dev
│ │ │ └── kilua
│ │ │ └── ssr
│ │ │ ├── SsrController.kt
│ │ │ └── SsrEngineBean.kt
│ │ └── resources
│ │ └── META-INF
│ │ └── http
│ │ └── mime.types
├── kilua-ssr-server-spring-boot
│ ├── build.gradle.kts
│ └── src
│ │ └── jvmMain
│ │ ├── kotlin
│ │ └── dev
│ │ │ └── kilua
│ │ │ └── ssr
│ │ │ ├── SsrConfig.kt
│ │ │ ├── SsrConfiguration.kt
│ │ │ ├── SsrErrorWebExceptionHandler.kt
│ │ │ ├── SsrRouterConfiguration.kt
│ │ │ └── WebFluxConfig.kt
│ │ └── resources
│ │ └── META-INF
│ │ └── spring
│ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
├── kilua-ssr-server-vertx
│ ├── build.gradle.kts
│ └── src
│ │ └── jvmMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── ssr
│ │ └── InitSsr.kt
├── kilua-ssr-server
│ ├── build.gradle.kts
│ └── src
│ │ └── jvmMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── ssr
│ │ ├── CacheKey.kt
│ │ ├── FileUtils.kt
│ │ └── SsrEngine.kt
├── kilua-ssr
│ ├── build.gradle.kts
│ └── src
│ │ └── commonMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── ssr
│ │ ├── AsyncSsrRouter.kt
│ │ ├── LzString.kt
│ │ ├── NodeHttp.kt
│ │ ├── NodeProcess.kt
│ │ ├── SimpleSsrRouter.kt
│ │ ├── SsrRouter.kt
│ │ └── SsrState.kt
├── kilua-svg
│ ├── build.gradle.kts
│ └── src
│ │ ├── commonMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ └── svg
│ │ │ ├── ISvgTag.kt
│ │ │ ├── Svg.kt
│ │ │ └── SvgTag.kt
│ │ └── commonTest
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── svg
│ │ └── SvgSpec.kt
├── kilua-tabulator-remote
│ ├── build.gradle.kts
│ └── src
│ │ └── commonMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── tabulator
│ │ └── TabulatorRemote.kt
├── kilua-tabulator
│ ├── build.gradle.kts
│ └── src
│ │ ├── commonMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ ├── TabulatorBulmaModule.kt
│ │ │ ├── TabulatorDefaultModule.kt
│ │ │ ├── TabulatorMaterializeModule.kt
│ │ │ ├── TabulatorMidnightModule.kt
│ │ │ ├── TabulatorModernModule.kt
│ │ │ ├── TabulatorModule.kt
│ │ │ ├── TabulatorSemanticUIModule.kt
│ │ │ ├── TabulatorSimpleModule.kt
│ │ │ ├── TabulatorSiteDarkModule.kt
│ │ │ ├── externals
│ │ │ ├── CellComponentBase.kt
│ │ │ ├── Interop.kt
│ │ │ ├── TabulatorJs.kt
│ │ │ ├── TabulatorMenuItem.kt
│ │ │ └── TabulatorTablesJs.kt
│ │ │ └── tabulator
│ │ │ ├── Options.kt
│ │ │ ├── Tabulator.kt
│ │ │ └── TabulatorPagination.kt
│ │ ├── commonTest
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ └── tabulator
│ │ │ └── TabulatorSpec.kt
│ │ ├── jsMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ └── externals
│ │ │ └── Interop.js.kt
│ │ └── wasmJsMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── externals
│ │ └── Interop.wasmJs.kt
├── kilua-tailwindcss
│ ├── build.gradle.kts
│ └── src
│ │ └── commonMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ ├── TailwindcssModule.kt
│ │ └── theme
│ │ ├── ThemeManager.kt
│ │ └── ThemeSwitcher.kt
├── kilua-tempus-dominus
│ ├── build.gradle.kts
│ └── src
│ │ ├── commonMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ ├── TempusDominusModule.kt
│ │ │ ├── externals
│ │ │ ├── Locales.kt
│ │ │ └── TempusDominus.kt
│ │ │ ├── form
│ │ │ └── time
│ │ │ │ ├── AbstractRichDateTime.kt
│ │ │ │ ├── DateTimeIcons.kt
│ │ │ │ ├── IAbstractRichDateTime.kt
│ │ │ │ ├── RichDate.kt
│ │ │ │ ├── RichDateTime.kt
│ │ │ │ └── RichTime.kt
│ │ │ └── utils
│ │ │ └── Date.kt
│ │ └── commonTest
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── form
│ │ └── time
│ │ ├── RichDateSpec.kt
│ │ ├── RichDateTimeSpec.kt
│ │ └── RichTimeSpec.kt
├── kilua-testutils
│ ├── build.gradle.kts
│ ├── src
│ │ └── commonMain
│ │ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ └── test
│ │ │ ├── HtmlDiffer.kt
│ │ │ └── TestUtil.kt
│ └── webpack.config.d
│ │ ├── bootstrap.js
│ │ ├── css.js
│ │ └── file.js
├── kilua-toastify
│ ├── build.gradle.kts
│ └── src
│ │ └── commonMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ ├── ToastifyModule.kt
│ │ ├── externals
│ │ └── Toastify.kt
│ │ └── toastify
│ │ └── Toast.kt
├── kilua-tom-select-remote
│ ├── build.gradle.kts
│ └── src
│ │ └── commonMain
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── form
│ │ ├── select
│ │ └── TomSelectRemote.kt
│ │ └── text
│ │ └── TomTypeaheadRemote.kt
├── kilua-tom-select
│ ├── build.gradle.kts
│ └── src
│ │ ├── commonMain
│ │ └── kotlin
│ │ │ └── dev
│ │ │ └── kilua
│ │ │ ├── TomSelectDefaultModule.kt
│ │ │ ├── TomSelectMinModule.kt
│ │ │ ├── TomSelectModule.kt
│ │ │ ├── externals
│ │ │ └── TomSelectJs.kt
│ │ │ └── form
│ │ │ ├── select
│ │ │ ├── TomSelect.kt
│ │ │ ├── TomSelectCallbacks.kt
│ │ │ ├── TomSelectOptions.kt
│ │ │ └── TomSelectRenders.kt
│ │ │ └── text
│ │ │ └── TomTypeahead.kt
│ │ └── commonTest
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── form
│ │ └── select
│ │ └── TomSelectSpec.kt
└── kilua-trix
│ ├── build.gradle.kts
│ └── src
│ ├── commonMain
│ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ ├── TrixModule.kt
│ │ ├── externals
│ │ ├── Editor.kt
│ │ └── TrixLocale.kt
│ │ └── form
│ │ └── text
│ │ ├── RichText.kt
│ │ └── i18n
│ │ ├── TrixLocaleEn.kt
│ │ ├── TrixLocalePl.kt
│ │ └── TrixLocales.kt
│ ├── commonTest
│ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── form
│ │ └── text
│ │ └── RichTextSpec.kt
│ ├── jsMain
│ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ ├── TrixModule.js.kt
│ │ ├── externals
│ │ ├── Editor.js.kt
│ │ ├── NodeJsDom.js.kt
│ │ └── Trix.js.kt
│ │ └── form
│ │ └── text
│ │ └── i18n
│ │ ├── TrixLocaleEn.js.kt
│ │ ├── TrixLocalePl.js.kt
│ │ └── TrixLocales.js.kt
│ └── wasmJsMain
│ └── kotlin
│ └── dev
│ └── kilua
│ ├── TrixModule.wasmJs.kt
│ ├── externals
│ ├── Editor.wasmJs.kt
│ ├── NodeJsDom.wasmJs.kt
│ └── Trix.wasmJs.kt
│ └── form
│ └── text
│ └── i18n
│ ├── TrixLocaleEn.wasmJs.kt
│ ├── TrixLocalePl.wasmJs.kt
│ └── TrixLocales.wasmJs.kt
├── plugins
├── kilua-gradle-plugin
│ ├── build.gradle.kts
│ └── src
│ │ └── main
│ │ └── kotlin
│ │ └── dev
│ │ └── kilua
│ │ └── gradle
│ │ ├── KiluaConfiguration.kt
│ │ ├── KiluaExtension.kt
│ │ ├── KiluaPlugin.kt
│ │ ├── Url.kt
│ │ └── tasks
│ │ ├── KiluaExportHtmlTask.kt
│ │ └── KiluaTask.kt
└── kilua-ksp-processor
│ ├── build.gradle.kts
│ └── src
│ └── jvmMain
│ ├── kotlin
│ └── dev
│ │ └── kilua
│ │ └── ksp
│ │ ├── KiluaProcessor.kt
│ │ └── KiluaProcessorProvider.kt
│ └── resources
│ └── META-INF
│ └── services
│ └── com.google.devtools.ksp.processing.SymbolProcessorProvider
├── settings.gradle.kts
├── templates
└── template
│ ├── .gitignore
│ ├── README.md
│ ├── build.gradle.kts
│ ├── gradle.properties
│ ├── gradle
│ ├── libs.versions.toml
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── kotlin-js-store
│ ├── wasm
│ │ └── yarn.lock
│ └── yarn.lock
│ ├── settings.gradle.kts
│ ├── src
│ └── commonMain
│ │ ├── kotlin
│ │ └── main.kt
│ │ └── resources
│ │ └── index.html
│ └── webpack.config.d
│ ├── bootstrap.js
│ ├── css.js
│ ├── file.js
│ ├── tailwind.js
│ ├── temporal.js
│ └── webpack.js
└── versions.json
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | .idea
3 | .kotlin
4 | build
5 | refresh.sh
6 | refreshW.sh
7 |
8 | /bsrefresh.sh
9 | /bsrefreshW.sh
10 | /upload.sh
11 | /build-mvnlocal.sh
12 | /examples/fullstack-ktor-koin/logs
13 | /examples/ssr-ktor/logs/
14 | /examples.sh
15 | /examples_wasm.sh
16 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License
2 |
3 | Copyright (c) 2023 Robert Jaros
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/buildSrc/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | `kotlin-dsl`
3 | }
4 |
5 | repositories {
6 | mavenCentral()
7 | gradlePluginPortal()
8 | }
9 |
10 | dependencies {
11 | implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${libs.versions.kotlin.get()}")
12 | implementation("org.jetbrains.dokka:dokka-gradle-plugin:${libs.versions.dokka.get()}")
13 | implementation(gradleApi())
14 | }
15 |
--------------------------------------------------------------------------------
/buildSrc/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | dependencyResolutionManagement {
2 | versionCatalogs {
3 | create("libs") {
4 | from(files("../gradle/libs.versions.toml"))
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/detekt-config.yml:
--------------------------------------------------------------------------------
1 | build:
2 | maxIssues: 0
3 |
4 | naming:
5 | FunctionNaming:
6 | functionPattern: '[a-zA-Z][a-zA-Z0-9]*'
7 | MatchingDeclarationName:
8 | active: false
9 |
10 | complexity:
11 | LongParameterList:
12 | ignoreDefaultParameters: true
13 |
--------------------------------------------------------------------------------
/examples/bootstrap-form/src/commonMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Kilua demo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/bootstrap-form/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/bootstrap-form/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/bootstrap-form/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/bootstrap-form/webpack.config.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | config.module.rules.push({
3 | test: /\.twcss$/,
4 | use: [
5 | "style-loader",
6 | {
7 | loader: "css-loader",
8 | options: {sourceMap: false}
9 | },
10 | {
11 | loader: "postcss-loader",
12 | options: {
13 | postcssOptions: {
14 | plugins: [
15 | ["@tailwindcss/postcss", {} ],
16 | (config.devServer ? undefined : [ "cssnano", {} ])
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | });
23 | })();
24 |
--------------------------------------------------------------------------------
/examples/bootstrap-form/webpack.config.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/bootstrap-form/webpack.config.d/webpack.js:
--------------------------------------------------------------------------------
1 | if (config.devServer) {
2 | config.devServer.hot = true;
3 | config.devServer.open = false;
4 | config.devServer.port = 3000;
5 | config.devServer.historyApiFallback = true;
6 | config.devtool = 'eval-cheap-source-map';
7 | } else {
8 | config.devtool = undefined;
9 | }
10 |
11 | // disable bundle size warning
12 | config.performance = {
13 | assetFilter: function (assetFilename) {
14 | return !assetFilename.endsWith('.js');
15 | },
16 | };
17 |
--------------------------------------------------------------------------------
/examples/fullstack-ktor-koin/gradle.properties:
--------------------------------------------------------------------------------
1 | kotlin.mpp.applyDefaultHierarchyTemplate=false
2 |
--------------------------------------------------------------------------------
/examples/fullstack-ktor-koin/src/jvmMain/kotlin/example/Main.kt:
--------------------------------------------------------------------------------
1 | package example
2 |
3 | import dev.kilua.rpc.applyRoutes
4 | import dev.kilua.rpc.getAllServiceManagers
5 | import dev.kilua.rpc.initRpc
6 | import io.ktor.server.application.*
7 | import io.ktor.server.plugins.compression.*
8 | import io.ktor.server.routing.*
9 | import io.ktor.server.websocket.*
10 | import org.koin.core.annotation.ComponentScan
11 | import org.koin.core.annotation.Module
12 | import org.koin.ksp.generated.module
13 |
14 | @Module
15 | @ComponentScan
16 | class PingModule
17 |
18 | fun Application.main() {
19 | install(Compression)
20 | install(WebSockets)
21 | routing {
22 | getAllServiceManagers().forEach { applyRoutes(it) }
23 | }
24 | initRpc(PingModule().module)
25 | }
26 |
--------------------------------------------------------------------------------
/examples/fullstack-ktor-koin/src/jvmMain/resources/application.conf:
--------------------------------------------------------------------------------
1 | ktor {
2 | development = true
3 | deployment {
4 | port = 8080
5 | watch = [build/classes/kotlin/jvm/main]
6 | }
7 |
8 | application {
9 | modules = [example.MainKt.main]
10 | }
11 | }
12 |
13 | db {
14 | driver = "org.h2.Driver"
15 | jdbcUrl = "jdbc:h2:mem:test"
16 | username = null
17 | password = null
18 | }
19 |
--------------------------------------------------------------------------------
/examples/fullstack-ktor-koin/src/jvmMain/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | [%d{ISO8601}]-[%thread] %-5level %logger - %msg%n
6 |
7 |
8 |
9 |
10 | logs/ktor.log
11 |
12 | logs/archived/ktor.%d{yyyy-MM-dd}.%i.log.gz
13 |
14 | 10MB
15 |
16 | 20GB
17 |
18 | 60
19 |
20 |
21 |
22 | [%d{ISO8601}]-[%thread] %-5level %logger - %msg%n
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/examples/fullstack-ktor-koin/src/webMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Kilua demo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/fullstack-ktor-koin/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/fullstack-ktor-koin/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/fullstack-ktor-koin/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/fullstack-ktor-koin/webpack.config.d/proxy.js:
--------------------------------------------------------------------------------
1 | if (config.devServer) {
2 | config.devServer.proxy = [
3 | {
4 | context: ["/rpc/*", "/rpcsse/*"],
5 | target: 'http://localhost:8080'
6 | },
7 | {
8 | context: ["/rpcws/*"],
9 | target: 'http://localhost:8080',
10 | ws: true
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/examples/fullstack-ktor-koin/webpack.config.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | config.module.rules.push({
3 | test: /\.twcss$/,
4 | use: [
5 | "style-loader",
6 | {
7 | loader: "css-loader",
8 | options: {sourceMap: false}
9 | },
10 | {
11 | loader: "postcss-loader",
12 | options: {
13 | postcssOptions: {
14 | plugins: [
15 | ["@tailwindcss/postcss", {} ],
16 | (config.devServer ? undefined : [ "cssnano", {} ])
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | });
23 | })();
24 |
--------------------------------------------------------------------------------
/examples/fullstack-ktor-koin/webpack.config.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/fullstack-ktor-koin/webpack.config.d/webpack.js:
--------------------------------------------------------------------------------
1 | if (config.devServer) {
2 | config.devServer.hot = true;
3 | config.devServer.open = false;
4 | config.devServer.port = 3000;
5 | config.devServer.historyApiFallback = true;
6 | config.devtool = 'eval-cheap-source-map';
7 | } else {
8 | config.devtool = undefined;
9 | }
10 |
11 | // disable bundle size warning
12 | config.performance = {
13 | assetFilter: function (assetFilename) {
14 | return !assetFilename.endsWith('.js');
15 | },
16 | };
17 |
--------------------------------------------------------------------------------
/examples/hello-world/src/commonMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Kilua demo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/hello-world/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/hello-world/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/hello-world/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/hello-world/webpack.config.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | config.module.rules.push({
3 | test: /\.twcss$/,
4 | use: [
5 | "style-loader",
6 | {
7 | loader: "css-loader",
8 | options: {sourceMap: false}
9 | },
10 | {
11 | loader: "postcss-loader",
12 | options: {
13 | postcssOptions: {
14 | plugins: [
15 | ["@tailwindcss/postcss", {} ],
16 | (config.devServer ? undefined : [ "cssnano", {} ])
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | });
23 | })();
24 |
--------------------------------------------------------------------------------
/examples/hello-world/webpack.config.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/hello-world/webpack.config.d/webpack.js:
--------------------------------------------------------------------------------
1 | if (config.devServer) {
2 | config.devServer.hot = true;
3 | config.devServer.open = false;
4 | config.devServer.port = 3000;
5 | config.devServer.historyApiFallback = true;
6 | config.devtool = 'eval-cheap-source-map';
7 | } else {
8 | config.devtool = undefined;
9 | }
10 |
11 | // disable bundle size warning
12 | config.performance = {
13 | assetFilter: function (assetFilename) {
14 | return !assetFilename.endsWith('.js');
15 | },
16 | };
17 |
--------------------------------------------------------------------------------
/examples/js-framework-benchmark/src/commonMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Kilua demo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/js-framework-benchmark/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/js-framework-benchmark/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/js-framework-benchmark/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/js-framework-benchmark/webpack.config.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | config.module.rules.push({
3 | test: /\.twcss$/,
4 | use: [
5 | "style-loader",
6 | {
7 | loader: "css-loader",
8 | options: {sourceMap: false}
9 | },
10 | {
11 | loader: "postcss-loader",
12 | options: {
13 | postcssOptions: {
14 | plugins: [
15 | ["@tailwindcss/postcss", {} ],
16 | (config.devServer ? undefined : [ "cssnano", {} ])
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | });
23 | })();
24 |
--------------------------------------------------------------------------------
/examples/js-framework-benchmark/webpack.config.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/js-framework-benchmark/webpack.config.d/webpack.js:
--------------------------------------------------------------------------------
1 | if (config.devServer) {
2 | config.devServer.hot = true;
3 | config.devServer.open = false;
4 | config.devServer.port = 3000;
5 | config.devServer.historyApiFallback = true;
6 | config.devtool = 'eval-cheap-source-map';
7 | } else {
8 | config.devtool = undefined;
9 | }
10 |
11 | // disable bundle size warning
12 | config.performance = {
13 | assetFilter: function (assetFilename) {
14 | return !assetFilename.endsWith('.js');
15 | },
16 | };
17 |
--------------------------------------------------------------------------------
/examples/playground/src/commonMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Kilua demo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/playground/src/commonMain/resources/modules/css/style.css:
--------------------------------------------------------------------------------
1 | .gridstyle div {
2 | width: 5px;
3 | height: 5px;
4 | }
5 |
--------------------------------------------------------------------------------
/examples/playground/src/commonMain/resources/modules/i18n/messages-de.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the KVision package.
4 | # FIRST AUTHOR , YEAR.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: KVision\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2018-08-18 01:34+0200\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "Language: German\n"
16 | "MIME-Version: 1.0\n"
17 | "Content-Type: text/plain; charset=UTF-8\n"
18 | "Content-Transfer-Encoding: 8bit\n"
19 | "Plural-Forms: nplurals=2; plural=n != 1;\n"
20 |
21 | #: src/main/kotlin/com/example/Helloworld.kt:21
22 | msgid "Hello world!"
23 | msgstr "Hallo Welt!"
24 |
--------------------------------------------------------------------------------
/examples/playground/src/commonMain/resources/modules/i18n/messages-en.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the KVision package.
4 | # FIRST AUTHOR , YEAR.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: KVision\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2018-08-18 01:34+0200\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "Language: English\n"
16 | "MIME-Version: 1.0\n"
17 | "Content-Type: text/plain; charset=UTF-8\n"
18 | "Content-Transfer-Encoding: 8bit\n"
19 | "Plural-Forms: nplurals=2; plural=n != 1;\n"
20 |
21 | #: src/main/kotlin/com/example/Helloworld.kt:21
22 | msgid "Hello world!"
23 | msgstr ""
24 |
--------------------------------------------------------------------------------
/examples/playground/src/commonMain/resources/modules/i18n/messages-es.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the KVision package.
4 | # FIRST AUTHOR , YEAR.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: KVision\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2018-08-18 01:34+0200\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "Language: Spanish\n"
16 | "MIME-Version: 1.0\n"
17 | "Content-Type: text/plain; charset=UTF-8\n"
18 | "Content-Transfer-Encoding: 8bit\n"
19 | "Plural-Forms: nplurals=2; plural=n != 1;\n"
20 |
21 | #: src/main/kotlin/com/example/Helloworld.kt:21
22 | msgid "Hello world!"
23 | msgstr "Hola mundo!"
24 |
--------------------------------------------------------------------------------
/examples/playground/src/commonMain/resources/modules/i18n/messages-fr.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the KVision package.
4 | # FIRST AUTHOR , YEAR.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: KVision\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2018-08-18 01:34+0200\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "Language: French\n"
16 | "MIME-Version: 1.0\n"
17 | "Content-Type: text/plain; charset=UTF-8\n"
18 | "Content-Transfer-Encoding: 8bit\n"
19 | "Plural-Forms: nplurals=2; plural=(n > 1);\n"
20 |
21 | #: src/main/kotlin/com/example/Helloworld.kt:21
22 | msgid "Hello world!"
23 | msgstr "Bonjour monde!"
24 |
--------------------------------------------------------------------------------
/examples/playground/src/commonMain/resources/modules/i18n/messages-ja.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the KVision package.
4 | # FIRST AUTHOR , YEAR.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: KVision\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2018-08-18 01:34+0200\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "Language: Japanese\n"
16 | "MIME-Version: 1.0\n"
17 | "Content-Type: text/plain; charset=UTF-8\n"
18 | "Content-Transfer-Encoding: 8bit\n"
19 | "Plural-Forms: nplurals=1; plural=0;\n"
20 |
21 | #: src/main/kotlin/com/example/Helloworld.kt:21
22 | msgid "Hello world!"
23 | msgstr "こんにちは世界!"
24 |
--------------------------------------------------------------------------------
/examples/playground/src/commonMain/resources/modules/i18n/messages-ko.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the KVision package.
4 | # FIRST AUTHOR , YEAR.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: KVision\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2018-08-18 01:34+0200\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "Language: Korean\n"
16 | "MIME-Version: 1.0\n"
17 | "Content-Type: text/plain; charset=UTF-8\n"
18 | "Content-Transfer-Encoding: 8bit\n"
19 | "Plural-Forms: nplurals=1; plural=0;\n"
20 |
21 | #: src/main/kotlin/com/example/Helloworld.kt:21
22 | msgid "Hello world!"
23 | msgstr "여보세요 세계!"
24 |
--------------------------------------------------------------------------------
/examples/playground/src/commonMain/resources/modules/i18n/messages-pl.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the KVision package.
4 | # FIRST AUTHOR , YEAR.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: KVision\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2018-08-18 01:34+0200\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "Language: Polish\n"
16 | "MIME-Version: 1.0\n"
17 | "Content-Type: text/plain; charset=CHARSET\n"
18 | "Content-Transfer-Encoding: 8bit\n"
19 | "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
20 |
21 | #: src/main/kotlin/com/example/Helloworld.kt:21
22 | msgid "Hello world!"
23 | msgstr "Witaj świecie!"
24 |
--------------------------------------------------------------------------------
/examples/playground/src/commonMain/resources/modules/i18n/messages-ru.po:
--------------------------------------------------------------------------------
1 | # SOME DESCRIPTIVE TITLE.
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3 | # This file is distributed under the same license as the KVision package.
4 | # FIRST AUTHOR , YEAR.
5 | #
6 | #, fuzzy
7 | msgid ""
8 | msgstr ""
9 | "Project-Id-Version: KVision\n"
10 | "Report-Msgid-Bugs-To: \n"
11 | "POT-Creation-Date: 2018-08-18 01:34+0200\n"
12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: LANGUAGE \n"
15 | "Language: Russian\n"
16 | "MIME-Version: 1.0\n"
17 | "Content-Type: text/plain; charset=UTF-8\n"
18 | "Content-Transfer-Encoding: 8bit\n"
19 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
20 |
21 | #: src/main/kotlin/com/example/Helloworld.kt:21
22 | msgid "Hello world!"
23 | msgstr "Здравствулте мир!"
24 |
--------------------------------------------------------------------------------
/examples/playground/src/commonMain/resources/modules/img/cat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rjaros/kilua/03a778310788728ad7a264abb67b5f89f540ae74/examples/playground/src/commonMain/resources/modules/img/cat.jpg
--------------------------------------------------------------------------------
/examples/playground/src/commonMain/resources/modules/img/dog.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rjaros/kilua/03a778310788728ad7a264abb67b5f89f540ae74/examples/playground/src/commonMain/resources/modules/img/dog.jpg
--------------------------------------------------------------------------------
/examples/playground/src/commonMain/resources/modules/json/test.json:
--------------------------------------------------------------------------------
1 | {
2 | "test": "test 2"
3 | }
4 |
--------------------------------------------------------------------------------
/examples/playground/src/commonMain/resources/tailwind/tailwind.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | content: {
3 | files: [ "SOURCES" ]
4 | },
5 | }
6 |
--------------------------------------------------------------------------------
/examples/playground/src/commonMain/resources/tailwind/tailwind.twcss:
--------------------------------------------------------------------------------
1 | @config "./tailwind.config.js";
2 | @import "tailwindcss";
3 | @custom-variant dark (&:where(.dark, .dark *));
4 | @source inline("bg-neutral-500 text-white font-bold inline-block rounded-full");
5 |
--------------------------------------------------------------------------------
/examples/playground/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/playground/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/playground/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/playground/webpack.config.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | config.module.rules.push({
3 | test: /\.twcss$/,
4 | use: [
5 | "style-loader",
6 | {
7 | loader: "css-loader",
8 | options: {sourceMap: false}
9 | },
10 | {
11 | loader: "postcss-loader",
12 | options: {
13 | postcssOptions: {
14 | plugins: [
15 | ["@tailwindcss/postcss", {} ],
16 | (config.devServer ? undefined : [ "cssnano", {} ])
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | });
23 | })();
24 |
--------------------------------------------------------------------------------
/examples/playground/webpack.config.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/playground/webpack.config.d/webpack.js:
--------------------------------------------------------------------------------
1 | if (config.devServer) {
2 | config.devServer.hot = true;
3 | config.devServer.open = false;
4 | config.devServer.port = 3000;
5 | config.devServer.historyApiFallback = true;
6 | config.devtool = 'eval-cheap-source-map';
7 | } else {
8 | config.devtool = undefined;
9 | }
10 |
11 | // disable bundle size warning
12 | config.performance = {
13 | assetFilter: function (assetFilename) {
14 | return !assetFilename.endsWith('.js');
15 | },
16 | };
17 |
--------------------------------------------------------------------------------
/examples/realworld/gradle.properties:
--------------------------------------------------------------------------------
1 | kotlin.mpp.applyDefaultHierarchyTemplate=false
2 |
--------------------------------------------------------------------------------
/examples/realworld/src/jvmMain/kotlin/io/realworld/Main.kt:
--------------------------------------------------------------------------------
1 | package io.realworld
2 |
3 | import dev.kilua.ssr.initSsr
4 | import io.ktor.http.*
5 | import io.ktor.http.content.*
6 | import io.ktor.server.application.*
7 | import io.ktor.server.plugins.cachingheaders.*
8 | import io.ktor.server.plugins.compression.*
9 |
10 | fun Application.main() {
11 | install(Compression)
12 | install(CachingHeaders) {
13 | options { call, content ->
14 | when (content.contentType?.withoutParameters()) {
15 | ContentType.Application.Wasm -> CachingOptions(CacheControl.MaxAge(maxAgeSeconds = 3600))
16 | ContentType.Application.JavaScript -> CachingOptions(CacheControl.MaxAge(maxAgeSeconds = 3600))
17 | ContentType.Text.Html -> CachingOptions(CacheControl.MaxAge(maxAgeSeconds = 3600))
18 | else -> null
19 | }
20 | }
21 | }
22 | initSsr()
23 | }
24 |
--------------------------------------------------------------------------------
/examples/realworld/src/jvmMain/resources/application.conf:
--------------------------------------------------------------------------------
1 | ktor {
2 | development = true
3 | deployment {
4 | port = 8080
5 | watch = [build/classes/kotlin/jvm/main]
6 | }
7 |
8 | application {
9 | modules = [io.realworld.MainKt.main]
10 | }
11 | }
12 |
13 | db {
14 | driver = "org.h2.Driver"
15 | jdbcUrl = "jdbc:h2:mem:test"
16 | username = null
17 | password = null
18 | }
19 |
20 | ssr {
21 | nodeExecutable = "/home/rjaros/Programs/node/bin/node"
22 | # port = 7788
23 | # externalSsrService = "http://localhost:7788"
24 | # rpcUrlPrefix = "http://localhost:8080"
25 | # rootId = "root"
26 | # cacheTime = 10
27 | }
28 |
--------------------------------------------------------------------------------
/examples/realworld/src/jvmMain/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | [%d{ISO8601}]-[%thread] %-5level %logger - %msg%n
6 |
7 |
8 |
9 |
10 | logs/ktor.log
11 |
12 | logs/archived/ktor.%d{yyyy-MM-dd}.%i.log.gz
13 |
14 | 10MB
15 |
16 | 20GB
17 |
18 | 60
19 |
20 |
21 |
22 | [%d{ISO8601}]-[%thread] %-5level %logger - %msg%n
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/examples/realworld/src/webMain/kotlin/io/realworld/TokenProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package io.realworld
24 |
25 | interface TokenProvider {
26 | fun getJwtToken(): String?
27 | }
28 |
--------------------------------------------------------------------------------
/examples/realworld/src/webMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Conduit
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/examples/realworld/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/realworld/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/realworld/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/realworld/webpack.config.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | config.module.rules.push({
3 | test: /\.twcss$/,
4 | use: [
5 | "style-loader",
6 | {
7 | loader: "css-loader",
8 | options: {sourceMap: false}
9 | },
10 | {
11 | loader: "postcss-loader",
12 | options: {
13 | postcssOptions: {
14 | plugins: [
15 | ["@tailwindcss/postcss", {} ],
16 | (config.devServer ? undefined : [ "cssnano", {} ])
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | });
23 | })();
24 |
--------------------------------------------------------------------------------
/examples/realworld/webpack.config.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/realworld/webpack.config.ssr.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/realworld/webpack.config.ssr.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/realworld/webpack.config.ssr.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/realworld/webpack.config.ssr.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3 | config.module.rules.push({
4 | test: /\.twcss$/,
5 | use: [
6 | MiniCssExtractPlugin.loader,
7 | {
8 | loader: "css-loader",
9 | options: {sourceMap: false}
10 | },
11 | {
12 | loader: "postcss-loader",
13 | options: {
14 | postcssOptions: {
15 | plugins: [
16 | ["@tailwindcss/postcss", {} ],
17 | [ "cssnano", {} ]
18 | ]
19 | }
20 | }
21 | }
22 | ]
23 | });
24 | config.plugins.push(new MiniCssExtractPlugin({
25 | filename: "tailwindcss.css"
26 | }));
27 | })();
28 |
--------------------------------------------------------------------------------
/examples/realworld/webpack.config.ssr.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/ssr-javalin/gradle.properties:
--------------------------------------------------------------------------------
1 | kotlin.mpp.applyDefaultHierarchyTemplate=false
2 |
--------------------------------------------------------------------------------
/examples/ssr-javalin/src/jvmMain/kotlin/example/Main.kt:
--------------------------------------------------------------------------------
1 | package example
2 |
3 | import dev.kilua.ssr.initSsr
4 | import io.javalin.Javalin
5 |
6 | fun main() {
7 | Javalin.create().start(8080).apply {
8 | initSsr()
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/examples/ssr-javalin/src/jvmMain/resources/application.properties:
--------------------------------------------------------------------------------
1 | ssr.nodeExecutable=/home/rjaros/Programs/node/bin/node
2 | # ssr.port=7788
3 | # ssr.externalSsrService=http://localhost:7788
4 | # ssr.rpcUrlPrefix=http://localhost:8080
5 | # ssr.rootId=root
6 | # ssr.contextPath=/
7 | # ssr.cacheTime=10
8 |
--------------------------------------------------------------------------------
/examples/ssr-javalin/src/jvmMain/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | [%d{ISO8601}]-[%thread] %-5level %logger - %msg%n
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/ssr-javalin/src/webMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Kilua demo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/ssr-javalin/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/ssr-javalin/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/ssr-javalin/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/ssr-javalin/webpack.config.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | config.module.rules.push({
3 | test: /\.twcss$/,
4 | use: [
5 | "style-loader",
6 | {
7 | loader: "css-loader",
8 | options: {sourceMap: false}
9 | },
10 | {
11 | loader: "postcss-loader",
12 | options: {
13 | postcssOptions: {
14 | plugins: [
15 | ["@tailwindcss/postcss", {} ],
16 | (config.devServer ? undefined : [ "cssnano", {} ])
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | });
23 | })();
24 |
--------------------------------------------------------------------------------
/examples/ssr-javalin/webpack.config.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/ssr-javalin/webpack.config.ssr.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/ssr-javalin/webpack.config.ssr.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/ssr-javalin/webpack.config.ssr.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/ssr-javalin/webpack.config.ssr.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3 | config.module.rules.push({
4 | test: /\.twcss$/,
5 | use: [
6 | MiniCssExtractPlugin.loader,
7 | {
8 | loader: "css-loader",
9 | options: {sourceMap: false}
10 | },
11 | {
12 | loader: "postcss-loader",
13 | options: {
14 | postcssOptions: {
15 | plugins: [
16 | ["@tailwindcss/postcss", {} ],
17 | [ "cssnano", {} ]
18 | ]
19 | }
20 | }
21 | }
22 | ]
23 | });
24 | config.plugins.push(new MiniCssExtractPlugin({
25 | filename: "tailwindcss.css"
26 | }));
27 | })();
28 |
--------------------------------------------------------------------------------
/examples/ssr-javalin/webpack.config.ssr.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/ssr-jooby/gradle.properties:
--------------------------------------------------------------------------------
1 | kotlin.mpp.applyDefaultHierarchyTemplate=false
2 | kotlin.mpp.enableResourcesPublication=false
--------------------------------------------------------------------------------
/examples/ssr-jooby/src/jvmMain/kotlin/example/Main.kt:
--------------------------------------------------------------------------------
1 | package example
2 |
3 | import dev.kilua.ssr.initSsr
4 | import io.jooby.kt.runApp
5 |
6 | fun main(args: Array) {
7 | runApp(args) {
8 | initSsr()
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/examples/ssr-jooby/src/jvmMain/resources/application.conf:
--------------------------------------------------------------------------------
1 | ssr {
2 | nodeExecutable = "/home/rjaros/Programs/node/bin/node"
3 | # port = 7788
4 | # externalSsrService = "http://localhost:7788"
5 | # rpcUrlPrefix = "http://localhost:8080"
6 | # rootId = "root"
7 | # contextPath = "/"
8 | # cacheTime = 10
9 | }
10 |
--------------------------------------------------------------------------------
/examples/ssr-jooby/src/jvmMain/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | [%d{ISO8601}]-[%thread] %-5level %logger - %msg%n
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/ssr-jooby/src/webMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Kilua demo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/ssr-jooby/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/ssr-jooby/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/ssr-jooby/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/ssr-jooby/webpack.config.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | config.module.rules.push({
3 | test: /\.twcss$/,
4 | use: [
5 | "style-loader",
6 | {
7 | loader: "css-loader",
8 | options: {sourceMap: false}
9 | },
10 | {
11 | loader: "postcss-loader",
12 | options: {
13 | postcssOptions: {
14 | plugins: [
15 | ["@tailwindcss/postcss", {} ],
16 | (config.devServer ? undefined : [ "cssnano", {} ])
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | });
23 | })();
24 |
--------------------------------------------------------------------------------
/examples/ssr-jooby/webpack.config.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/ssr-jooby/webpack.config.ssr.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/ssr-jooby/webpack.config.ssr.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/ssr-jooby/webpack.config.ssr.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/ssr-jooby/webpack.config.ssr.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3 | config.module.rules.push({
4 | test: /\.twcss$/,
5 | use: [
6 | MiniCssExtractPlugin.loader,
7 | {
8 | loader: "css-loader",
9 | options: {sourceMap: false}
10 | },
11 | {
12 | loader: "postcss-loader",
13 | options: {
14 | postcssOptions: {
15 | plugins: [
16 | ["@tailwindcss/postcss", {} ],
17 | [ "cssnano", {} ]
18 | ]
19 | }
20 | }
21 | }
22 | ]
23 | });
24 | config.plugins.push(new MiniCssExtractPlugin({
25 | filename: "tailwindcss.css"
26 | }));
27 | })();
28 |
--------------------------------------------------------------------------------
/examples/ssr-jooby/webpack.config.ssr.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/ssr-ktor/gradle.properties:
--------------------------------------------------------------------------------
1 | kotlin.mpp.applyDefaultHierarchyTemplate=false
2 |
--------------------------------------------------------------------------------
/examples/ssr-ktor/src/jvmMain/kotlin/example/Main.kt:
--------------------------------------------------------------------------------
1 | package example
2 |
3 | import dev.kilua.ssr.initSsr
4 | import io.ktor.server.application.*
5 | import io.ktor.server.plugins.compression.*
6 |
7 | fun Application.main() {
8 | install(Compression)
9 | initSsr()
10 | }
11 |
--------------------------------------------------------------------------------
/examples/ssr-ktor/src/jvmMain/resources/application.conf:
--------------------------------------------------------------------------------
1 | ktor {
2 | development = true
3 | deployment {
4 | port = 8080
5 | watch = [build/classes/kotlin/jvm/main]
6 | }
7 |
8 | application {
9 | modules = [example.MainKt.main]
10 | }
11 | }
12 |
13 | db {
14 | driver = "org.h2.Driver"
15 | jdbcUrl = "jdbc:h2:mem:test"
16 | username = null
17 | password = null
18 | }
19 |
20 | ssr {
21 | nodeExecutable = "/home/rjaros/Programs/node/bin/node"
22 | # port = 7788
23 | # externalSsrService = "http://localhost:7788"
24 | # rpcUrlPrefix = "http://localhost:8080"
25 | # rootId = "root"
26 | # contextPath = "/"
27 | # cacheTime = 10
28 | }
29 |
--------------------------------------------------------------------------------
/examples/ssr-ktor/src/jvmMain/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | [%d{ISO8601}]-[%thread] %-5level %logger - %msg%n
6 |
7 |
8 |
9 |
10 | logs/ktor.log
11 |
12 | logs/archived/ktor.%d{yyyy-MM-dd}.%i.log.gz
13 |
14 | 10MB
15 |
16 | 20GB
17 |
18 | 60
19 |
20 |
21 |
22 | [%d{ISO8601}]-[%thread] %-5level %logger - %msg%n
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/examples/ssr-ktor/src/webMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Kilua demo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/ssr-ktor/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/ssr-ktor/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/ssr-ktor/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/ssr-ktor/webpack.config.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | config.module.rules.push({
3 | test: /\.twcss$/,
4 | use: [
5 | "style-loader",
6 | {
7 | loader: "css-loader",
8 | options: {sourceMap: false}
9 | },
10 | {
11 | loader: "postcss-loader",
12 | options: {
13 | postcssOptions: {
14 | plugins: [
15 | ["@tailwindcss/postcss", {} ],
16 | (config.devServer ? undefined : [ "cssnano", {} ])
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | });
23 | })();
24 |
--------------------------------------------------------------------------------
/examples/ssr-ktor/webpack.config.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/ssr-ktor/webpack.config.ssr.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/ssr-ktor/webpack.config.ssr.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/ssr-ktor/webpack.config.ssr.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/ssr-ktor/webpack.config.ssr.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3 | config.module.rules.push({
4 | test: /\.twcss$/,
5 | use: [
6 | MiniCssExtractPlugin.loader,
7 | {
8 | loader: "css-loader",
9 | options: {sourceMap: false}
10 | },
11 | {
12 | loader: "postcss-loader",
13 | options: {
14 | postcssOptions: {
15 | plugins: [
16 | ["@tailwindcss/postcss", {} ],
17 | [ "cssnano", {} ]
18 | ]
19 | }
20 | }
21 | }
22 | ]
23 | });
24 | config.plugins.push(new MiniCssExtractPlugin({
25 | filename: "tailwindcss.css"
26 | }));
27 | })();
28 |
--------------------------------------------------------------------------------
/examples/ssr-ktor/webpack.config.ssr.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/ssr-micronaut/application/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("jvm")
3 | alias(libs.plugins.micronaut.application)
4 | alias(libs.plugins.micronaut.aot)
5 | }
6 |
7 | dependencies {
8 | implementation(project(":examples:ssr-micronaut"))
9 | }
10 |
11 | application {
12 | mainClass.set(project.parent?.extra?.get("mainClassName")?.toString())
13 | }
14 |
15 | micronaut {
16 | runtime("netty")
17 | processing {
18 | incremental(true)
19 | annotations("example.*")
20 | }
21 | aot {
22 | optimizeServiceLoading.set(false)
23 | convertYamlToJava.set(false)
24 | precomputeOperations.set(true)
25 | cacheEnvironment.set(true)
26 | optimizeClassLoading.set(true)
27 | deduceEnvironment.set(true)
28 | optimizeNetty.set(true)
29 | }
30 | }
31 |
32 | tasks {
33 | withType {
34 | jvmArgs("-XX:TieredStopAtLevel=1", "-Dcom.sun.management.jmxremote")
35 | if (gradle.startParameter.isContinuous) {
36 | systemProperties(
37 | mapOf(
38 | "micronaut.io.watch.restart" to "true",
39 | "micronaut.io.watch.enabled" to "true",
40 | "micronaut.io.watch.paths" to "src/jvmMain"
41 | )
42 | )
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/examples/ssr-micronaut/gradle.properties:
--------------------------------------------------------------------------------
1 | kotlin.mpp.applyDefaultHierarchyTemplate=false
2 | kotlin.mpp.enableResourcesPublication=false
--------------------------------------------------------------------------------
/examples/ssr-micronaut/src/jvmMain/kotlin/example/Main.kt:
--------------------------------------------------------------------------------
1 | package example
2 |
3 | import io.micronaut.runtime.Micronaut
4 |
5 | fun main(args: Array) {
6 | Micronaut.run(*args)
7 | }
8 |
--------------------------------------------------------------------------------
/examples/ssr-micronaut/src/jvmMain/resources/application.yml:
--------------------------------------------------------------------------------
1 | micronaut:
2 | application:
3 | name: fullstack-micronaut
4 | router:
5 | static-resources:
6 | default:
7 | enabled: true
8 | mapping: "/**"
9 | paths:
10 | - classpath:public
11 |
12 | ssr:
13 | nodeExecutable: "/home/rjaros/Programs/node/bin/node"
14 | # port: 7788
15 | # externalSsrService: "http://localhost:7788"
16 | # rpcUrlPrefix: "http://localhost:8080"
17 | # rootId: "root"
18 | # contextPath: "/"
19 | # cacheTime: 10
20 |
--------------------------------------------------------------------------------
/examples/ssr-micronaut/src/jvmMain/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | [%d{ISO8601}]-[%thread] %-5level %logger - %msg%n
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/ssr-micronaut/src/webMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Kilua demo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/ssr-micronaut/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/ssr-micronaut/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/ssr-micronaut/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/ssr-micronaut/webpack.config.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | config.module.rules.push({
3 | test: /\.twcss$/,
4 | use: [
5 | "style-loader",
6 | {
7 | loader: "css-loader",
8 | options: {sourceMap: false}
9 | },
10 | {
11 | loader: "postcss-loader",
12 | options: {
13 | postcssOptions: {
14 | plugins: [
15 | ["@tailwindcss/postcss", {} ],
16 | (config.devServer ? undefined : [ "cssnano", {} ])
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | });
23 | })();
24 |
--------------------------------------------------------------------------------
/examples/ssr-micronaut/webpack.config.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/ssr-micronaut/webpack.config.ssr.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/ssr-micronaut/webpack.config.ssr.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/ssr-micronaut/webpack.config.ssr.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/ssr-micronaut/webpack.config.ssr.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3 | config.module.rules.push({
4 | test: /\.twcss$/,
5 | use: [
6 | MiniCssExtractPlugin.loader,
7 | {
8 | loader: "css-loader",
9 | options: {sourceMap: false}
10 | },
11 | {
12 | loader: "postcss-loader",
13 | options: {
14 | postcssOptions: {
15 | plugins: [
16 | ["@tailwindcss/postcss", {} ],
17 | [ "cssnano", {} ]
18 | ]
19 | }
20 | }
21 | }
22 | ]
23 | });
24 | config.plugins.push(new MiniCssExtractPlugin({
25 | filename: "tailwindcss.css"
26 | }));
27 | })();
28 |
--------------------------------------------------------------------------------
/examples/ssr-micronaut/webpack.config.ssr.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/application/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("jvm")
3 | id("org.springframework.boot")
4 | }
5 |
6 | dependencies {
7 | implementation(project(":examples:ssr-spring-boot"))
8 | implementation(project.dependencies.platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES))
9 | implementation("org.springframework.boot:spring-boot-devtools")
10 | }
11 |
12 | springBoot {
13 | mainClass.value(project.parent?.extra?.get("mainClassName")?.toString())
14 | }
15 |
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/gradle.properties:
--------------------------------------------------------------------------------
1 | kotlin.mpp.applyDefaultHierarchyTemplate=false
2 | kotlin.mpp.enableResourcesPublication=false
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/src/jvmMain/kotlin/example/Main.kt:
--------------------------------------------------------------------------------
1 | package example
2 |
3 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration
4 | import org.springframework.boot.autoconfigure.SpringBootApplication
5 | import org.springframework.boot.runApplication
6 |
7 | @SpringBootApplication
8 | @EnableAutoConfiguration(
9 | exclude = [
10 | org.springframework.boot.autoconfigure.security.reactive.ReactiveSecurityAutoConfiguration::class,
11 | org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration::class
12 | ]
13 | )
14 | class SsrApplication
15 |
16 | fun main(args: Array) {
17 | runApplication(*args)
18 | }
19 |
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/src/jvmMain/resources/application.yml:
--------------------------------------------------------------------------------
1 | server:
2 | compression:
3 | enabled: true
4 | mime-types: text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/wasm
5 | min-response-size: 1024
6 |
7 | ssr:
8 | nodeExecutable: "/home/rjaros/Programs/node/bin/node"
9 | # port: 7788
10 | # externalSsrService: "http://localhost:7788"
11 | # rpcUrlPrefix: "http://localhost:8080"
12 | # rootId: "root"
13 | # contextPath: "/"
14 | # cacheTime: 10
15 |
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/src/jvmMain/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | %d [%thread] %-5level %logger{36} - %msg%n
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/src/webMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Kilua demo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/webpack.config.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | config.module.rules.push({
3 | test: /\.twcss$/,
4 | use: [
5 | "style-loader",
6 | {
7 | loader: "css-loader",
8 | options: {sourceMap: false}
9 | },
10 | {
11 | loader: "postcss-loader",
12 | options: {
13 | postcssOptions: {
14 | plugins: [
15 | ["@tailwindcss/postcss", {} ],
16 | (config.devServer ? undefined : [ "cssnano", {} ])
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | });
23 | })();
24 |
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/webpack.config.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/webpack.config.ssr.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/webpack.config.ssr.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/webpack.config.ssr.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/webpack.config.ssr.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3 | config.module.rules.push({
4 | test: /\.twcss$/,
5 | use: [
6 | MiniCssExtractPlugin.loader,
7 | {
8 | loader: "css-loader",
9 | options: {sourceMap: false}
10 | },
11 | {
12 | loader: "postcss-loader",
13 | options: {
14 | postcssOptions: {
15 | plugins: [
16 | ["@tailwindcss/postcss", {} ],
17 | [ "cssnano", {} ]
18 | ]
19 | }
20 | }
21 | }
22 | ]
23 | });
24 | config.plugins.push(new MiniCssExtractPlugin({
25 | filename: "tailwindcss.css"
26 | }));
27 | })();
28 |
--------------------------------------------------------------------------------
/examples/ssr-spring-boot/webpack.config.ssr.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/ssr-vertx/gradle.properties:
--------------------------------------------------------------------------------
1 | kotlin.mpp.applyDefaultHierarchyTemplate=false
2 | kotlin.mpp.enableResourcesPublication=false
--------------------------------------------------------------------------------
/examples/ssr-vertx/src/jvmMain/kotlin/example/Main.kt:
--------------------------------------------------------------------------------
1 | package example
2 |
3 | import dev.kilua.ssr.initSsr
4 | import io.vertx.core.AbstractVerticle
5 | import io.vertx.ext.web.Router
6 |
7 | class MainVerticle : AbstractVerticle() {
8 | override fun start() {
9 | val router = Router.router(vertx)
10 | vertx.initSsr(router)
11 | val server = vertx.createHttpServer()
12 | server.requestHandler(router).listen(8080)
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/examples/ssr-vertx/src/jvmMain/resources/application.properties:
--------------------------------------------------------------------------------
1 | ssr.nodeExecutable=/home/rjaros/Programs/node/bin/node
2 | # ssr.port=7788
3 | # ssr.externalSsrService=http://localhost:7788
4 | # ssr.rpcUrlPrefix=http://localhost:8080
5 | # ssr.rootId=root
6 | # ssr.contextPath=/
7 | # ssr.cacheTime=10
8 |
--------------------------------------------------------------------------------
/examples/ssr-vertx/src/jvmMain/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | [%d{ISO8601}]-[%thread] %-5level %logger - %msg%n
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/ssr-vertx/src/webMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Kilua demo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/ssr-vertx/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/ssr-vertx/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/ssr-vertx/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/ssr-vertx/webpack.config.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | config.module.rules.push({
3 | test: /\.twcss$/,
4 | use: [
5 | "style-loader",
6 | {
7 | loader: "css-loader",
8 | options: {sourceMap: false}
9 | },
10 | {
11 | loader: "postcss-loader",
12 | options: {
13 | postcssOptions: {
14 | plugins: [
15 | ["@tailwindcss/postcss", {} ],
16 | (config.devServer ? undefined : [ "cssnano", {} ])
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | });
23 | })();
24 |
--------------------------------------------------------------------------------
/examples/ssr-vertx/webpack.config.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/ssr-vertx/webpack.config.ssr.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/ssr-vertx/webpack.config.ssr.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/ssr-vertx/webpack.config.ssr.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/ssr-vertx/webpack.config.ssr.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const MiniCssExtractPlugin = require("mini-css-extract-plugin");
3 | config.module.rules.push({
4 | test: /\.twcss$/,
5 | use: [
6 | MiniCssExtractPlugin.loader,
7 | {
8 | loader: "css-loader",
9 | options: {sourceMap: false}
10 | },
11 | {
12 | loader: "postcss-loader",
13 | options: {
14 | postcssOptions: {
15 | plugins: [
16 | ["@tailwindcss/postcss", {} ],
17 | [ "cssnano", {} ]
18 | ]
19 | }
20 | }
21 | }
22 | ]
23 | });
24 | config.plugins.push(new MiniCssExtractPlugin({
25 | filename: "tailwindcss.css"
26 | }));
27 | })();
28 |
--------------------------------------------------------------------------------
/examples/ssr-vertx/webpack.config.ssr.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/src/commonMain/kotlin/TodoContract.kt:
--------------------------------------------------------------------------------
1 | object TodoContract {
2 | data class State(val todos: List, val mode: Mode) {
3 | fun areAllCompleted() = todos.find { !it.completed } == null
4 | fun activeList() = todos.filter { !it.completed }
5 | fun completedList() = todos.filter { it.completed }
6 | fun allListIndexed() = todos.mapIndexed { index, todo -> index to todo }
7 | fun activeListIndexed() = allListIndexed().filter { !it.second.completed }
8 | fun completedListIndexed() = allListIndexed().filter { it.second.completed }
9 | }
10 |
11 | sealed class Inputs {
12 | data class Load(val todos: List) : Inputs()
13 | data class Add(val todo: Todo) : Inputs()
14 | data class ChangeTitle(val index: Int, val title: String) : Inputs()
15 | data class ToggleActive(val index: Int) : Inputs()
16 | data class Delete(val index: Int) : Inputs()
17 | data object ToggleAll : Inputs()
18 | data object ClearCompleted : Inputs()
19 | data object ShowAll : Inputs()
20 | data object ShowActive : Inputs()
21 | data object ShowCompleted : Inputs()
22 | }
23 |
24 | sealed class Events {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/src/commonMain/kotlin/TodoEventHandler.kt:
--------------------------------------------------------------------------------
1 | import com.copperleaf.ballast.EventHandler
2 | import com.copperleaf.ballast.EventHandlerScope
3 |
4 | class TodoEventHandler :
5 | EventHandler {
6 | override suspend fun EventHandlerScope.handleEvent(
7 | event: TodoContract.Events
8 | ) {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/src/commonMain/kotlin/TodoModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | import kotlinx.serialization.Serializable
24 |
25 | @Serializable
26 | enum class Mode {
27 | All,
28 | Active,
29 | Completed
30 | }
31 |
32 | @Serializable
33 | data class Todo(val completed: Boolean, val title: String)
34 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/src/commonMain/kotlin/TodoModule.kt:
--------------------------------------------------------------------------------
1 | import kotlinx.coroutines.CoroutineScope
2 | import kotlinx.coroutines.Dispatchers
3 | import kotlinx.coroutines.SupervisorJob
4 | import kotlinx.serialization.json.Json
5 | import org.koin.core.module.dsl.singleOf
6 | import org.koin.dsl.module
7 | import web.storage.localStorage
8 |
9 | val todoModule = module {
10 | single {
11 | Json {
12 | prettyPrint = true
13 | }
14 | }
15 | single {
16 | CoroutineScope(Dispatchers.Default + SupervisorJob())
17 | }
18 | single {
19 | localStorage
20 | }
21 | singleOf(::TodoInputHandler)
22 | singleOf(::TodoEventHandler)
23 | singleOf(::TodoSavedStateAdapter)
24 | singleOf(::TodoViewModel)
25 | }
26 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/src/commonMain/kotlin/TodoSavedStateAdapter.kt:
--------------------------------------------------------------------------------
1 | import Mode.All
2 | import com.copperleaf.ballast.savedstate.RestoreStateScope
3 | import com.copperleaf.ballast.savedstate.SaveStateScope
4 | import com.copperleaf.ballast.savedstate.SavedStateAdapter
5 | import kotlinx.serialization.builtins.ListSerializer
6 | import kotlinx.serialization.json.Json
7 | import web.storage.Storage
8 |
9 | class TodoSavedStateAdapter(private val json: Json, private val storage: Storage) :
10 | SavedStateAdapter<
11 | TodoContract.Inputs,
12 | TodoContract.Events,
13 | TodoContract.State> {
14 |
15 | override suspend fun SaveStateScope<
16 | TodoContract.Inputs,
17 | TodoContract.Events,
18 | TodoContract.State>.save() {
19 | saveAll { state ->
20 | val jsonString =
21 | json.encodeToString(ListSerializer(Todo.serializer()), state.todos)
22 | storage.setItem("todos-kilua", jsonString)
23 | }
24 | }
25 |
26 | override suspend fun RestoreStateScope<
27 | TodoContract.Inputs,
28 | TodoContract.Events,
29 | TodoContract.State>.restore(): TodoContract.State {
30 | return TodoContract.State(
31 | todos = storage.getItem("todos-kilua")?.let {
32 | json.decodeFromString(
33 | ListSerializer(Todo.serializer()),
34 | it.toString()
35 | )
36 | } ?: emptyList(), All
37 | )
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/src/commonMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Kilua • TodoMVC
7 |
8 |
9 |
10 |
11 |
12 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/src/commonMain/resources/node_modules/todomvc-app-css/readme.md:
--------------------------------------------------------------------------------
1 | # todomvc-app-css
2 |
3 | > CSS for TodoMVC apps
4 |
5 | 
6 |
7 |
8 | ## Install
9 |
10 |
11 | ```
12 | $ npm install --save todomvc-app-css
13 | ```
14 |
15 |
16 | ## Getting started
17 |
18 | ```html
19 |
20 | ```
21 |
22 | See the [TodoMVC app template](https://github.com/tastejs/todomvc-app-template).
23 |
24 |
25 |
26 | ## License
27 |
28 | 
This work by Sindre Sorhus is licensed under a Creative Commons Attribution 4.0 International License.
29 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/src/commonMain/resources/node_modules/todomvc-common/readme.md:
--------------------------------------------------------------------------------
1 | # todomvc-common
2 |
3 | > Common TodoMVC utilities used by our apps
4 |
5 |
6 | ## Install
7 |
8 | ```
9 | $ npm install --save todomvc-common
10 | ```
11 |
12 |
13 | ## License
14 |
15 | MIT © [TasteJS](http://tastejs.com)
16 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/src/commonMain/resources/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "requires": true,
3 | "lockfileVersion": 1,
4 | "dependencies": {
5 | "todomvc-app-css": {
6 | "version": "2.1.0",
7 | "resolved": "https://registry.npmjs.org/todomvc-app-css/-/todomvc-app-css-2.1.0.tgz",
8 | "integrity": "sha1-tvJxbTOa+i5feZNH0qSLBTliQqU="
9 | },
10 | "todomvc-common": {
11 | "version": "1.0.4",
12 | "resolved": "https://registry.npmjs.org/todomvc-common/-/todomvc-common-1.0.4.tgz",
13 | "integrity": "sha512-AA0Z4exovEqubhbZCrzzn9roVT4zvOncS319p2zIc4CsNe5B9TLL7Sei1NIV6d+WrgR5rOi+y0I9Y6GE7xgNOw=="
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/src/commonMain/resources/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "dependencies": {
4 | "todomvc-app-css": "2.1.0",
5 | "todomvc-common": "1.0.4"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/webpack.config.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | config.module.rules.push({
3 | test: /\.twcss$/,
4 | use: [
5 | "style-loader",
6 | {
7 | loader: "css-loader",
8 | options: {sourceMap: false}
9 | },
10 | {
11 | loader: "postcss-loader",
12 | options: {
13 | postcssOptions: {
14 | plugins: [
15 | ["@tailwindcss/postcss", {} ],
16 | (config.devServer ? undefined : [ "cssnano", {} ])
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | });
23 | })();
24 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/webpack.config.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/todomvc-ballast/webpack.config.d/webpack.js:
--------------------------------------------------------------------------------
1 | if (config.devServer) {
2 | config.devServer.hot = true;
3 | config.devServer.open = false;
4 | config.devServer.port = 3000;
5 | config.devServer.historyApiFallback = true;
6 | config.devtool = 'eval-cheap-source-map';
7 | } else {
8 | config.devtool = undefined;
9 | }
10 |
11 | // disable bundle size warning
12 | config.performance = {
13 | assetFilter: function (assetFilename) {
14 | return !assetFilename.endsWith('.js');
15 | },
16 | };
17 |
--------------------------------------------------------------------------------
/examples/todomvc/src/commonMain/kotlin/TodoModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | import kotlinx.serialization.Serializable
24 |
25 | @Serializable
26 | enum class Mode {
27 | All,
28 | Active,
29 | Completed
30 | }
31 |
32 | @Serializable
33 | data class Todo(val completed: Boolean, val title: String)
34 |
--------------------------------------------------------------------------------
/examples/todomvc/src/commonMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Kilua • TodoMVC
7 |
8 |
9 |
10 |
11 |
12 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/examples/todomvc/src/commonMain/resources/node_modules/todomvc-app-css/readme.md:
--------------------------------------------------------------------------------
1 | # todomvc-app-css
2 |
3 | > CSS for TodoMVC apps
4 |
5 | 
6 |
7 |
8 | ## Install
9 |
10 |
11 | ```
12 | $ npm install --save todomvc-app-css
13 | ```
14 |
15 |
16 | ## Getting started
17 |
18 | ```html
19 |
20 | ```
21 |
22 | See the [TodoMVC app template](https://github.com/tastejs/todomvc-app-template).
23 |
24 |
25 |
26 | ## License
27 |
28 | 
This work by Sindre Sorhus is licensed under a Creative Commons Attribution 4.0 International License.
29 |
--------------------------------------------------------------------------------
/examples/todomvc/src/commonMain/resources/node_modules/todomvc-common/readme.md:
--------------------------------------------------------------------------------
1 | # todomvc-common
2 |
3 | > Common TodoMVC utilities used by our apps
4 |
5 |
6 | ## Install
7 |
8 | ```
9 | $ npm install --save todomvc-common
10 | ```
11 |
12 |
13 | ## License
14 |
15 | MIT © [TasteJS](http://tastejs.com)
16 |
--------------------------------------------------------------------------------
/examples/todomvc/src/commonMain/resources/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "requires": true,
3 | "lockfileVersion": 1,
4 | "dependencies": {
5 | "todomvc-app-css": {
6 | "version": "2.1.0",
7 | "resolved": "https://registry.npmjs.org/todomvc-app-css/-/todomvc-app-css-2.1.0.tgz",
8 | "integrity": "sha1-tvJxbTOa+i5feZNH0qSLBTliQqU="
9 | },
10 | "todomvc-common": {
11 | "version": "1.0.4",
12 | "resolved": "https://registry.npmjs.org/todomvc-common/-/todomvc-common-1.0.4.tgz",
13 | "integrity": "sha512-AA0Z4exovEqubhbZCrzzn9roVT4zvOncS319p2zIc4CsNe5B9TLL7Sei1NIV6d+WrgR5rOi+y0I9Y6GE7xgNOw=="
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/examples/todomvc/src/commonMain/resources/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "dependencies": {
4 | "todomvc-app-css": "2.1.0",
5 | "todomvc-common": "1.0.4"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/examples/todomvc/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/examples/todomvc/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/examples/todomvc/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/examples/todomvc/webpack.config.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | config.module.rules.push({
3 | test: /\.twcss$/,
4 | use: [
5 | "style-loader",
6 | {
7 | loader: "css-loader",
8 | options: {sourceMap: false}
9 | },
10 | {
11 | loader: "postcss-loader",
12 | options: {
13 | postcssOptions: {
14 | plugins: [
15 | ["@tailwindcss/postcss", {} ],
16 | (config.devServer ? undefined : [ "cssnano", {} ])
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | });
23 | })();
24 |
--------------------------------------------------------------------------------
/examples/todomvc/webpack.config.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/examples/todomvc/webpack.config.d/webpack.js:
--------------------------------------------------------------------------------
1 | if (config.devServer) {
2 | config.devServer.hot = true;
3 | config.devServer.open = false;
4 | config.devServer.port = 3000;
5 | config.devServer.historyApiFallback = true;
6 | config.devtool = 'eval-cheap-source-map';
7 | } else {
8 | config.devtool = undefined;
9 | }
10 |
11 | // disable bundle size warning
12 | config.performance = {
13 | assetFilter: function (assetFilename) {
14 | return !assetFilename.endsWith('.js');
15 | },
16 | };
17 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx6g
2 | org.gradle.parallel=true
3 | org.gradle.caching=true
4 | #org.gradle.unsafe.configuration-cache=true
5 | #org.gradle.unsafe.configuration-cache-problems=warn
6 | org.gradle.kotlin.dsl.precompiled.accessors.strict=true
7 | kotlin.js.yarn=false
8 |
9 | kotlin.mpp.stability.nowarn=true
10 | kotlin.code.style=official
11 | ksp.useKSP2=true
12 | kapt.use.k2=true
13 | org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
14 | org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
15 | org.jetbrains.dokka.experimental.tryK2=true
16 | org.jetbrains.dokka.experimental.tryK2.nowarn=true
17 | kotlin.js.ir.output.granularity=per-file
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rjaros/kilua/03a778310788728ad7a264abb67b5f89f540ae74/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-all.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/kilua-assets/README.md:
--------------------------------------------------------------------------------
1 | # Kilua
2 |
3 | Experimental web framework for Kotlin/Wasm and Kotlin/JS.
4 |
5 | [](https://opensource.org/licenses/MIT)
6 |
7 | Kilua allows you to build web applications with the [Kotlin](https://kotlinlang.org) language.
8 |
--------------------------------------------------------------------------------
/kilua-assets/src/css/k-animation.css:
--------------------------------------------------------------------------------
1 | @keyframes kilua-fade-in {
2 | from {opacity: 0;}
3 | to {opacity: 1;}
4 | }
5 |
6 | @keyframes kilua-fade-out {
7 | from {opacity: 1;}
8 | to {opacity: 0;}
9 | }
10 |
11 | @keyframes kilua-scale-in {
12 | from { scale: 0; }
13 | to { scale: 1; }
14 | }
15 |
16 | @keyframes kilua-scale-out {
17 | from { scale: 1; }
18 | to { scale: 0; }
19 | }
20 |
21 | @keyframes kilua-translate-left-in {
22 | from {translate: -100vw}
23 | to {translate: 0}
24 | }
25 |
26 | @keyframes kilua-translate-left-out {
27 | from {translate: 0}
28 | to {translate: -100vw}
29 | }
30 |
31 | @keyframes kilua-translate-right-in {
32 | from {translate: 100vw}
33 | to {translate: 0}
34 | }
35 |
36 | @keyframes kilua-translate-right-out {
37 | from {translate: 0}
38 | to {translate: 100vw}
39 | }
40 |
41 | @keyframes kilua-translate-top-in {
42 | from {translate: 0 -100vh}
43 | to {translate: 0}
44 | }
45 |
46 | @keyframes kilua-translate-top-out {
47 | from {translate: 0}
48 | to {translate: 0 -100vh}
49 | }
50 |
51 | @keyframes kilua-translate-bottom-in {
52 | from {translate: 0 100vh}
53 | to {translate: 0}
54 | }
55 |
56 | @keyframes kilua-translate-bottom-out {
57 | from {translate: 0}
58 | to {translate: 0 100vh}
59 | }
60 |
--------------------------------------------------------------------------------
/kilua-assets/src/css/k-jetpack.css:
--------------------------------------------------------------------------------
1 | .kilua-jetpack-box {
2 | display: grid;
3 | grid-template: minmax(0px, 1fr) / minmax(0px, 1fr);
4 | }
5 |
6 | .kilua-jetpack-box > * {
7 | grid-area: 1 / 1;
8 | }
9 |
--------------------------------------------------------------------------------
/kilua-assets/src/css/k-splitjs.css:
--------------------------------------------------------------------------------
1 | .splitpanel-vertical {
2 | display: flex;
3 | flex-direction: row;
4 | overflow: auto;
5 | }
6 |
7 | .splitpanel-vertical > *:first-child {
8 | max-width: calc(100% - 9px);
9 | }
10 |
11 | .splitpanel-vertical > * {
12 | flex: 0 0 auto;
13 | overflow: auto;
14 | }
15 |
16 | .splitpanel-vertical > *:last-child {
17 | flex: 1 1 auto;
18 | overflow: auto;
19 | }
20 |
21 | .splitpanel-horizontal {
22 | display: flex;
23 | flex-direction: column;
24 | overflow: auto;
25 | }
26 |
27 | .splitpanel-horizontal > *:first-child {
28 | max-height: calc(100% - 9px);
29 | }
30 |
31 | .splitpanel-horizontal > * {
32 | flex: 0 0 auto;
33 | overflow: auto;
34 | }
35 |
36 | .splitpanel-horizontal > *:last-child {
37 | flex: 1 1 auto;
38 | overflow: auto;
39 | }
40 |
41 | .splitter-vertical {
42 | flex: 0 0 auto;
43 | width: 9px;
44 | background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAhCAQAAABOpSL+AAAAIklEQVR4AWMwbb/PdR+JZDD9f1/oPhI5sgVGBSruc9xHIgGdSQqqQJGkRgAAAABJRU5ErkJggg==') center center no-repeat #cecece;
45 | cursor: col-resize;
46 | }
47 |
48 | .splitter-horizontal {
49 | flex: 0 0 auto;
50 | height: 9px;
51 | background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAICAQAAADdTl4aAAAAIElEQVQoz2MwrTD9TxFsZ7jPcV+IIsjFQAUw6hFqegQA+xzRHT2p7pEAAAAASUVORK5CYII=') center center no-repeat #cecece;
52 | cursor: row-resize;
53 | }
54 |
--------------------------------------------------------------------------------
/kilua-assets/src/css/k-style.css:
--------------------------------------------------------------------------------
1 | .kilua-radio-inline {
2 | display: inline-block;
3 | }
4 |
5 | select:required:invalid {
6 | color: rgb(117, 117, 117);
7 | }
8 |
9 | select:required option {
10 | color: black;
11 | }
12 |
--------------------------------------------------------------------------------
/kilua-assets/src/css/k-tempus-dominus.css:
--------------------------------------------------------------------------------
1 | .was-validated .input-group.kilua-td:has(:invalid) ~ .invalid-feedback, .was-validated .input-group.kilua-td:has(:invalid) ~ .invalid-tooltip {
2 | display: block;
3 | }
4 |
--------------------------------------------------------------------------------
/kilua-assets/src/css/k-toastify.css:
--------------------------------------------------------------------------------
1 | .toastify {
2 | background-image: unset;
3 | background-color: blue;
4 | }
5 |
6 | .kilua-toastify-primary {
7 | color: #fff !important;
8 | background-color: rgba(13,110,253) !important;
9 | }
10 |
11 | .kilua-toastify-secondary {
12 | color: #fff !important;
13 | background-color: rgba(108,117,125) !important;
14 | }
15 |
16 | .kilua-toastify-success {
17 | color: #fff !important;
18 | background-color: rgba(25,135,84) !important;
19 | }
20 |
21 | .kilua-toastify-info {
22 | color: #000 !important;
23 | background-color: rgba(13,202,240) !important;
24 | }
25 |
26 | .kilua-toastify-warning {
27 | color: #000 !important;
28 | background-color: rgba(255,193,7) !important;
29 | }
30 |
31 | .kilua-toastify-danger {
32 | color: #fff !important;
33 | background-color: rgba(220,53,69) !important;
34 | }
35 |
36 | .kilua-toastify-light {
37 | color: #000 !important;
38 | background-color: rgba(248,249,250) !important;
39 | }
40 |
41 | .kilua-toastify-dark {
42 | color: #fff !important;
43 | background-color: rgba(33,37,41) !important;
44 | }
45 |
--------------------------------------------------------------------------------
/kilua-assets/src/css/k-trix.css:
--------------------------------------------------------------------------------
1 | trix-editor {
2 | overflow-y: auto;
3 | }
4 |
5 | trix-toolbar .trix-button-group {
6 | margin-bottom: 3px !important;
7 | }
8 |
9 | [data-bs-theme="dark"] trix-toolbar .trix-button {
10 | background: #fff !important;
11 | }
12 |
--------------------------------------------------------------------------------
/kilua-assets/src/index.js:
--------------------------------------------------------------------------------
1 | // Empty file
2 |
--------------------------------------------------------------------------------
/kilua/src/commonMain/kotlin/dev/kilua/form/FieldParams.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.form
24 |
25 | /**
26 | * Internal data class containing form field parameters.
27 | */
28 | internal data class FieldParams>(
29 | val validator: ((F) -> Boolean)? = null,
30 | val validatorWithMessage: ((F) -> Pair)? = null
31 | )
32 |
--------------------------------------------------------------------------------
/kilua/src/commonMain/kotlin/dev/kilua/i18n/LocaleChangeListener.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.i18n
24 |
25 | /**
26 | * A listener for global locale changes.
27 | */
28 | public fun interface LocaleChangeListener {
29 | public fun setLocale(locale: Locale)
30 | }
31 |
--------------------------------------------------------------------------------
/kilua/src/commonMain/kotlin/dev/kilua/i18n/SimpleLocale.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.i18n
24 |
25 | /**
26 | * Simple locale class.
27 | */
28 | public data class SimpleLocale(
29 | override val language: String = "en-US",
30 | override val decimalSeparator: Char = decimalSeparator(language),
31 | override val thousandsSeparator: Char? = thousandsSeparator(language),
32 | ) : Locale
33 |
--------------------------------------------------------------------------------
/kilua/src/jsMain/kotlin/dev/kilua/utils/Common.js.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023-present Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.utils
24 |
25 | @Suppress("UnsafeCastFromDynamic")
26 | public actual val isDom: Boolean =
27 | js("typeof document !== 'undefined' && typeof document.kilua == 'undefined'")
28 |
--------------------------------------------------------------------------------
/kilua/src/wasmJsMain/kotlin/dev/kilua/HMR.wasmJs.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua
24 |
25 | public fun webpackHot(): Hot = js("import.meta.webpackHot")
26 |
--------------------------------------------------------------------------------
/kilua/src/wasmJsMain/kotlin/dev/kilua/utils/Common.wasmJs.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.utils
24 |
25 | private fun isDom(): Boolean = js("typeof document !== 'undefined' && typeof document.kilua == 'undefined'")
26 |
27 | public actual val isDom: Boolean = isDom()
28 |
--------------------------------------------------------------------------------
/kilua/src/wasmJsMain/kotlin/dev/kilua/utils/NativeList.wasmJs.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.utils
24 |
25 | public actual open class NativeList(private val internalList: MutableList = mutableListOf()) :
26 | MutableList by internalList
27 |
28 | public actual fun nativeListOf(vararg elements: E): MutableList {
29 | return NativeList(mutableListOf(*elements))
30 | }
31 |
--------------------------------------------------------------------------------
/kilua/src/wasmJsMain/kotlin/dev/kilua/utils/NativeMap.wasmJs.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.utils
24 |
25 | public actual class NativeMap(private val internalMap: MutableMap = mutableMapOf()) :
26 | MutableMap by internalMap
27 |
28 | public actual fun nativeMapOf(vararg pairs: Pair): MutableMap {
29 | return NativeMap(mutableMapOf(*pairs))
30 | }
31 |
--------------------------------------------------------------------------------
/modules/kilua-animation/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | implementation(npm("motion", libs.versions.motion.get()))
29 | }
30 | }
31 | val commonTest by getting {
32 | dependencies {
33 | implementation(kotlin("test"))
34 | implementation(kotlin("test-common"))
35 | implementation(kotlin("test-annotations-common"))
36 | implementation(project(":modules:kilua-testutils"))
37 | }
38 | }
39 | val jsMain by getting {
40 | dependencies {
41 | }
42 | }
43 | val wasmJsMain by getting {
44 | dependencies {
45 | }
46 | }
47 | }
48 | }
49 |
50 | setupDokka(tasks.dokkaGenerate)
51 | setupPublishing()
52 |
--------------------------------------------------------------------------------
/modules/kilua-animation/src/commonMain/kotlin/dev/kilua/animation/MotionTransition.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2025 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.animation
24 |
25 | /**
26 | * Motion animation transition parameters.
27 | */
28 | public data class MotionTransition(
29 | val type: TransitionType = TransitionType.Fade,
30 | val animation: MotionAnimation = MotionAnimation.Tween()
31 | )
32 |
--------------------------------------------------------------------------------
/modules/kilua-annotations/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.detekt)
4 | alias(libs.plugins.nmcp)
5 | id("org.jetbrains.dokka")
6 | id("maven-publish")
7 | id("signing")
8 | }
9 |
10 | detekt {
11 | toolVersion = libs.versions.detekt.get()
12 | config.setFrom("../../detekt-config.yml")
13 | buildUponDefaultConfig = true
14 | }
15 |
16 | kotlin {
17 | explicitApi()
18 | compilerOptions()
19 | kotlinJsTargets()
20 | kotlinWasmTargets()
21 | kotlinJvmTargets()
22 | sourceSets {
23 | val commonMain by getting {
24 | dependencies {
25 | }
26 | }
27 | val jsMain by getting {
28 | dependencies {
29 | }
30 | }
31 | val wasmJsMain by getting {
32 | dependencies {
33 | }
34 | }
35 | val jvmMain by getting {
36 | dependencies {
37 | }
38 | }
39 | }
40 | }
41 |
42 | setupDokka(tasks.dokkaGenerate)
43 | setupPublishing()
44 |
--------------------------------------------------------------------------------
/modules/kilua-annotations/src/commonMain/kotlin/dev/kilua/annotations/Annotations.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.annotations
24 |
25 | @Target(AnnotationTarget.CLASS)
26 | public annotation class SimpleHtmlComponent(val tagName: String, val withText: Boolean = false, val domPackage: String = "web.html")
27 |
--------------------------------------------------------------------------------
/modules/kilua-bootstrap-icons/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.detekt)
4 | alias(libs.plugins.nmcp)
5 | id("org.jetbrains.dokka")
6 | id("maven-publish")
7 | id("signing")
8 | }
9 |
10 | detekt {
11 | toolVersion = libs.versions.detekt.get()
12 | config.setFrom("../../detekt-config.yml")
13 | buildUponDefaultConfig = true
14 | }
15 |
16 | kotlin {
17 | explicitApi()
18 | compilerOptions()
19 | kotlinJsTargets()
20 | kotlinWasmTargets()
21 | sourceSets {
22 | val commonMain by getting {
23 | dependencies {
24 | implementation(project(":kilua"))
25 | implementation(npm("bootstrap-icons", libs.versions.bootstrap.icons.get()))
26 | }
27 | }
28 | val commonTest by getting {
29 | dependencies {
30 | implementation(kotlin("test"))
31 | implementation(kotlin("test-common"))
32 | implementation(kotlin("test-annotations-common"))
33 | implementation(project(":modules:kilua-testutils"))
34 | }
35 | }
36 | val jsMain by getting {
37 | dependencies {
38 | }
39 | }
40 | val wasmJsMain by getting {
41 | dependencies {
42 | }
43 | }
44 | }
45 | }
46 |
47 | setupDokka(tasks.dokkaGenerate)
48 | setupPublishing()
49 |
--------------------------------------------------------------------------------
/modules/kilua-bootstrap/src/jsMain/kotlin/dev/kilua/BootstrapModule.js.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua
24 |
25 | import dev.kilua.externals.nodeJsInit
26 |
27 | internal actual fun initializeBootstrap() {
28 | nodeJsInit()
29 | }
30 |
--------------------------------------------------------------------------------
/modules/kilua-bootstrap/src/wasmJsMain/kotlin/dev/kilua/BootstrapModule.wasmJs.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua
24 |
25 | import dev.kilua.externals.nodeJsInit
26 |
27 | internal actual fun initializeBootstrap() {
28 | nodeJsInit()
29 | }
30 |
--------------------------------------------------------------------------------
/modules/kilua-common-types/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.detekt)
5 | alias(libs.plugins.nmcp)
6 | id("org.jetbrains.dokka")
7 | id("maven-publish")
8 | id("signing")
9 | }
10 |
11 | detekt {
12 | toolVersion = libs.versions.detekt.get()
13 | config.setFrom("../../detekt-config.yml")
14 | buildUponDefaultConfig = true
15 | }
16 |
17 | kotlin {
18 | explicitApi()
19 | compilerOptions()
20 | kotlinJsTargets()
21 | kotlinWasmTargets()
22 | kotlinJvmTargets()
23 | sourceSets {
24 | val commonMain by getting {
25 | dependencies {
26 | implementation(libs.kotlinx.serialization.json)
27 | api(libs.kotlinx.datetime)
28 | }
29 | }
30 | val jsMain by getting {
31 | dependencies {
32 | }
33 | }
34 | val wasmJsMain by getting {
35 | dependencies {
36 | }
37 | }
38 | val jvmMain by getting {
39 | dependencies {
40 | }
41 | }
42 | }
43 | }
44 |
45 | setupDokka(tasks.dokkaGenerate)
46 | setupPublishing()
47 |
--------------------------------------------------------------------------------
/modules/kilua-core-modules/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.detekt)
4 | alias(libs.plugins.nmcp)
5 | id("org.jetbrains.dokka")
6 | id("maven-publish")
7 | id("signing")
8 | }
9 |
10 | detekt {
11 | toolVersion = libs.versions.detekt.get()
12 | config.setFrom("../../detekt-config.yml")
13 | buildUponDefaultConfig = true
14 | }
15 |
16 | kotlin {
17 | explicitApi()
18 | compilerOptions()
19 | kotlinJsTargets()
20 | kotlinWasmTargets()
21 | sourceSets {
22 | val commonMain by getting {
23 | dependencies {
24 | api(libs.wrappers.browser)
25 | // implementation(npm("zzz-kilua-assets", "http://localhost:8001/zzz-kilua-assets-0.0.9-SNAPSHOT.tgz"))
26 | implementation(npm("zzz-kilua-assets", libs.versions.npm.kilua.assets.get()))
27 | }
28 | }
29 | val commonTest by getting {
30 | dependencies {
31 | implementation(kotlin("test"))
32 | implementation(kotlin("test-common"))
33 | implementation(kotlin("test-annotations-common"))
34 | implementation(project(":modules:kilua-testutils"))
35 | }
36 | }
37 | val jsMain by getting {
38 | dependencies {
39 | }
40 | }
41 | val wasmJsMain by getting {
42 | dependencies {
43 | }
44 | }
45 | }
46 | }
47 |
48 | setupDokka(tasks.dokkaGenerate)
49 | setupPublishing()
50 |
--------------------------------------------------------------------------------
/modules/kilua-core-modules/src/commonMain/kotlin/dev/kilua/ModuleInitializer.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua
24 |
25 | /**
26 | * Kilua Module initializer.
27 | */
28 | public interface ModuleInitializer {
29 | /**
30 | * Initialize Kilua module.
31 | */
32 | public fun initialize()
33 | }
34 |
--------------------------------------------------------------------------------
/modules/kilua-fontawesome/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.detekt)
4 | alias(libs.plugins.nmcp)
5 | id("org.jetbrains.dokka")
6 | id("maven-publish")
7 | id("signing")
8 | }
9 |
10 | detekt {
11 | toolVersion = libs.versions.detekt.get()
12 | config.setFrom("../../detekt-config.yml")
13 | buildUponDefaultConfig = true
14 | }
15 |
16 | kotlin {
17 | explicitApi()
18 | compilerOptions()
19 | kotlinJsTargets()
20 | kotlinWasmTargets()
21 | sourceSets {
22 | val commonMain by getting {
23 | dependencies {
24 | implementation(project(":kilua"))
25 | implementation(npm("@fortawesome/fontawesome-free", libs.versions.fontawesome.get()))
26 | }
27 | }
28 | val commonTest by getting {
29 | dependencies {
30 | implementation(kotlin("test"))
31 | implementation(kotlin("test-common"))
32 | implementation(kotlin("test-annotations-common"))
33 | implementation(project(":modules:kilua-testutils"))
34 | }
35 | }
36 | val jsMain by getting {
37 | dependencies {
38 | }
39 | }
40 | val wasmJsMain by getting {
41 | dependencies {
42 | }
43 | }
44 | }
45 | }
46 |
47 | setupDokka(tasks.dokkaGenerate)
48 | setupPublishing()
49 |
--------------------------------------------------------------------------------
/modules/kilua-i18n/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | api(libs.kilua.gettext)
29 | }
30 | }
31 | val commonTest by getting {
32 | dependencies {
33 | implementation(kotlin("test"))
34 | implementation(kotlin("test-common"))
35 | implementation(kotlin("test-annotations-common"))
36 | implementation(project(":modules:kilua-testutils"))
37 | }
38 | }
39 | val jsMain by getting {
40 | dependencies {
41 | }
42 | }
43 | val wasmJsMain by getting {
44 | dependencies {
45 | }
46 | }
47 | }
48 | }
49 |
50 | setupDokka(tasks.dokkaGenerate)
51 | setupPublishing()
52 |
--------------------------------------------------------------------------------
/modules/kilua-imask/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | implementation(npm("imask", libs.versions.imask.get()))
29 | }
30 | }
31 | val commonTest by getting {
32 | dependencies {
33 | implementation(kotlin("test"))
34 | implementation(kotlin("test-common"))
35 | implementation(kotlin("test-annotations-common"))
36 | implementation(project(":modules:kilua-testutils"))
37 | }
38 | }
39 | val jsMain by getting {
40 | dependencies {
41 | }
42 | }
43 | val wasmJsMain by getting {
44 | dependencies {
45 | }
46 | }
47 | }
48 | }
49 |
50 | setupDokka(tasks.dokkaGenerate)
51 | setupPublishing()
52 |
--------------------------------------------------------------------------------
/modules/kilua-imask/src/commonMain/kotlin/dev/kilua/ImaskModule.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua
24 |
25 | import dev.kilua.form.ImaskFactory
26 | import dev.kilua.form.MaskManager
27 |
28 | /**
29 | * Initializer for Kilua Imask module.
30 | */
31 | public object ImaskModule : ModuleInitializer {
32 |
33 | override fun initialize() {
34 | MaskManager.factory = ImaskFactory()
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/modules/kilua-imask/src/commonMain/kotlin/dev/kilua/form/Number.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.form
24 |
25 | import js.core.JsAny
26 |
27 | internal expect fun jsNumber(): JsAny
28 |
--------------------------------------------------------------------------------
/modules/kilua-imask/src/jsMain/kotlin/dev/kilua/form/Number.js.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.form
24 |
25 | import js.core.JsAny
26 |
27 | internal actual fun jsNumber(): JsAny {
28 | @Suppress("UnsafeCastFromDynamic")
29 | return js("Number")
30 | }
31 |
--------------------------------------------------------------------------------
/modules/kilua-imask/src/wasmJsMain/kotlin/dev/kilua/form/Number.wasmJs.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.form
24 |
25 | import js.core.JsAny
26 |
27 | internal actual fun jsNumber(): JsAny = js("Number")
28 |
--------------------------------------------------------------------------------
/modules/kilua-jetpack/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | }
29 | }
30 | val commonTest by getting {
31 | dependencies {
32 | implementation(kotlin("test"))
33 | implementation(kotlin("test-common"))
34 | implementation(kotlin("test-annotations-common"))
35 | implementation(project(":modules:kilua-testutils"))
36 | }
37 | }
38 | val jsMain by getting {
39 | dependencies {
40 | }
41 | }
42 | val wasmJsMain by getting {
43 | dependencies {
44 | }
45 | }
46 | }
47 | }
48 |
49 | setupDokka(tasks.dokkaGenerate)
50 | setupPublishing()
51 |
--------------------------------------------------------------------------------
/modules/kilua-lazy-layouts/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | }
29 | }
30 | val commonTest by getting {
31 | dependencies {
32 | implementation(kotlin("test"))
33 | implementation(kotlin("test-common"))
34 | implementation(kotlin("test-annotations-common"))
35 | implementation(project(":modules:kilua-testutils"))
36 | }
37 | }
38 | val jsMain by getting {
39 | dependencies {
40 | }
41 | }
42 | val wasmJsMain by getting {
43 | dependencies {
44 | }
45 | }
46 | }
47 | }
48 |
49 | setupDokka(tasks.dokkaGenerate)
50 | setupPublishing()
51 |
--------------------------------------------------------------------------------
/modules/kilua-lazy-layouts/src/commonMain/kotlin/dev/kilua/panel/LoadedItem.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 OpenSavvy
3 | *
4 | * This file is ported from the https://gitlab.com/opensavvy/ui/compose-lazy-html project
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 | package dev.kilua.panel
19 |
20 | import androidx.compose.runtime.Composable
21 | import dev.kilua.core.IComponent
22 |
23 | internal class LoadedItem(
24 | val key: Any?,
25 | val block: @Composable IComponent.() -> Unit,
26 | )
27 |
--------------------------------------------------------------------------------
/modules/kilua-leaflet/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | implementation(npm("leaflet", libs.versions.leaflet.get()))
29 | }
30 | }
31 | val commonTest by getting {
32 | dependencies {
33 | implementation(kotlin("test"))
34 | implementation(kotlin("test-common"))
35 | implementation(kotlin("test-annotations-common"))
36 | implementation(project(":modules:kilua-testutils"))
37 | }
38 | }
39 | val jsMain by getting {
40 | dependencies {
41 | }
42 | }
43 | val wasmJsMain by getting {
44 | dependencies {
45 | }
46 | }
47 | }
48 | }
49 |
50 | setupDokka(tasks.dokkaGenerate)
51 | setupPublishing()
52 |
--------------------------------------------------------------------------------
/modules/kilua-leaflet/src/commonMain/kotlin/dev/kilua/externals/leaflet/callback.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2025 Robert Jaros
3 | * Copyright (c) 2022 Adam S.
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all
13 | * copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | * SOFTWARE.
22 | */
23 |
24 | package dev.kilua.externals.leaflet
25 |
26 | import js.errors.JsError
27 | import web.html.HTMLElement
28 |
29 | public typealias DoneCallback = (error: JsError, tile: HTMLElement) -> Unit
30 |
--------------------------------------------------------------------------------
/modules/kilua-leaflet/src/commonMain/kotlin/dev/kilua/externals/leaflet/geo/Coords.kt:
--------------------------------------------------------------------------------
1 | @file:JsModule("leaflet")
2 | /*
3 | * Copyright (c) 2025 Robert Jaros
4 | * Copyright (c) 2022 Adam S.
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package dev.kilua.externals.leaflet.geo
26 |
27 | import dev.kilua.externals.leaflet.geometry.Point
28 | import js.import.JsModule
29 |
30 |
31 | public open external class Coords : Point {
32 | public var z: Double
33 | }
34 |
--------------------------------------------------------------------------------
/modules/kilua-leaflet/src/commonMain/kotlin/dev/kilua/externals/leaflet/layer/styleFunction.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2025 Robert Jaros
3 | * Copyright (c) 2022 Adam S.
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all
13 | * copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | * SOFTWARE.
22 | */
23 |
24 | package dev.kilua.externals.leaflet.layer
25 |
26 | import dev.kilua.externals.leaflet.layer.vector.Path
27 | import js.core.JsAny
28 |
29 | public typealias StyleFunction = (feature: JsAny) -> Path.PathOptions
30 |
--------------------------------------------------------------------------------
/modules/kilua-marked/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | implementation(npm("marked", libs.versions.marked.get()))
29 | }
30 | }
31 | val commonTest by getting {
32 | dependencies {
33 | implementation(kotlin("test"))
34 | implementation(kotlin("test-common"))
35 | implementation(kotlin("test-annotations-common"))
36 | implementation(project(":modules:kilua-testutils"))
37 | }
38 | }
39 | val jsMain by getting {
40 | dependencies {
41 | }
42 | }
43 | val wasmJsMain by getting {
44 | dependencies {
45 | }
46 | }
47 | }
48 | }
49 |
50 | setupDokka(tasks.dokkaGenerate)
51 | setupPublishing()
52 |
--------------------------------------------------------------------------------
/modules/kilua-rest/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | }
29 | }
30 | val commonTest by getting {
31 | dependencies {
32 | implementation(kotlin("test"))
33 | implementation(kotlin("test-common"))
34 | implementation(kotlin("test-annotations-common"))
35 | implementation(project(":modules:kilua-testutils"))
36 | }
37 | }
38 | val jsMain by getting {
39 | dependencies {
40 | }
41 | }
42 | val wasmJsMain by getting {
43 | dependencies {
44 | }
45 | }
46 | }
47 | }
48 |
49 | setupDokka(tasks.dokkaGenerate)
50 | setupPublishing()
51 |
--------------------------------------------------------------------------------
/modules/kilua-routing/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | }
29 | }
30 | val commonTest by getting {
31 | dependencies {
32 | implementation(kotlin("test"))
33 | implementation(kotlin("test-common"))
34 | implementation(kotlin("test-annotations-common"))
35 | implementation(project(":modules:kilua-testutils"))
36 | }
37 | }
38 | val jsMain by getting {
39 | dependencies {
40 | }
41 | }
42 | val wasmJsMain by getting {
43 | dependencies {
44 | }
45 | }
46 | }
47 | }
48 |
49 | setupDokka(tasks.dokkaGenerate)
50 | setupPublishing()
51 |
--------------------------------------------------------------------------------
/modules/kilua-routing/src/commonMain/kotlin/app/softwork/routingcompose/Routing.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 Philip Wedemann
3 | * This file is copied from the https://github.com/hfhbd/routing-compose project
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package app.softwork.routingcompose
18 |
19 | @DslMarker
20 | public annotation class Routing
21 |
--------------------------------------------------------------------------------
/modules/kilua-routing/src/commonTest/kotlin/app/softwork/routingcompose/PathTest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 Philip Wedemann
3 | * This file is copied from the https://github.com/hfhbd/routing-compose project
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package app.softwork.routingcompose
18 |
19 | import kotlin.test.*
20 |
21 | class PathTest {
22 | @Test
23 | fun testingPathConverter() {
24 | val prefixPath = "/a"
25 | assertEquals(Path("/a", null), Path.from(prefixPath))
26 | assertEquals(Path("/a", null), Path.from("a"))
27 | }
28 |
29 | @Test
30 | fun relative() {
31 | val base = Path.from("/a/b/c/d")
32 | assertEquals("/a/b/c", base.relative("./").path)
33 | assertEquals("/a/b", base.relative("././").path)
34 | assertEquals("/a/b/g", base.relative("././g").path)
35 |
36 | assertEquals("/a/b/g?foo=bar", base.relative("././g?foo=bar").toString())
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/modules/kilua-rsup-progress/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | implementation(npm("rsup-progress", libs.versions.rsup.progress.get()))
29 | }
30 | }
31 | val commonTest by getting {
32 | dependencies {
33 | implementation(kotlin("test"))
34 | implementation(kotlin("test-common"))
35 | implementation(kotlin("test-annotations-common"))
36 | implementation(project(":modules:kilua-testutils"))
37 | }
38 | }
39 | val jsMain by getting {
40 | dependencies {
41 | }
42 | }
43 | val wasmJsMain by getting {
44 | dependencies {
45 | }
46 | }
47 | }
48 | }
49 |
50 | setupDokka(tasks.dokkaGenerate)
51 | setupPublishing()
52 |
--------------------------------------------------------------------------------
/modules/kilua-sanitize-html/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | implementation(npm("sanitize-html", libs.versions.sanitize.html.get()))
29 | }
30 | }
31 | val commonTest by getting {
32 | dependencies {
33 | implementation(kotlin("test"))
34 | implementation(kotlin("test-common"))
35 | implementation(kotlin("test-annotations-common"))
36 | implementation(project(":modules:kilua-testutils"))
37 | }
38 | }
39 | val jsMain by getting {
40 | dependencies {
41 | }
42 | }
43 | val wasmJsMain by getting {
44 | dependencies {
45 | }
46 | }
47 | }
48 | }
49 |
50 | setupDokka(tasks.dokkaGenerate)
51 | setupPublishing()
52 |
--------------------------------------------------------------------------------
/modules/kilua-select-remote/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | api(libs.kilua.rpc.core)
29 | }
30 | }
31 | val commonTest by getting {
32 | dependencies {
33 | implementation(kotlin("test"))
34 | implementation(kotlin("test-common"))
35 | implementation(kotlin("test-annotations-common"))
36 | implementation(project(":modules:kilua-testutils"))
37 | }
38 | }
39 | val jsMain by getting {
40 | dependencies {
41 | }
42 | }
43 | val wasmJsMain by getting {
44 | dependencies {
45 | }
46 | }
47 | }
48 | }
49 |
50 | setupDokka(tasks.dokkaGenerate)
51 | setupPublishing()
52 |
--------------------------------------------------------------------------------
/modules/kilua-splitjs/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | implementation(npm("split.js", libs.versions.splitjs.get()))
29 | }
30 | }
31 | val commonTest by getting {
32 | dependencies {
33 | implementation(kotlin("test"))
34 | implementation(kotlin("test-common"))
35 | implementation(kotlin("test-annotations-common"))
36 | implementation(project(":modules:kilua-testutils"))
37 | }
38 | }
39 | val jsMain by getting {
40 | dependencies {
41 | }
42 | }
43 | val wasmJsMain by getting {
44 | dependencies {
45 | }
46 | }
47 | }
48 | }
49 |
50 | setupDokka(tasks.dokkaGenerate)
51 | setupPublishing()
52 |
--------------------------------------------------------------------------------
/modules/kilua-ssr-server-javalin/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.detekt)
5 | alias(libs.plugins.nmcp)
6 | id("org.jetbrains.dokka")
7 | id("maven-publish")
8 | id("signing")
9 | }
10 |
11 | detekt {
12 | toolVersion = libs.versions.detekt.get()
13 | config.setFrom("../../detekt-config.yml")
14 | buildUponDefaultConfig = true
15 | }
16 |
17 | kotlin {
18 | explicitApi()
19 | compilerOptions()
20 | kotlinJvmTargets()
21 | sourceSets {
22 | val jvmMain by getting {
23 | dependencies {
24 | implementation(project(":modules:kilua-ssr-server"))
25 | api(libs.javalin)
26 | }
27 | }
28 | }
29 | }
30 |
31 | setupDokka(tasks.dokkaGenerate)
32 | setupPublishing()
33 |
--------------------------------------------------------------------------------
/modules/kilua-ssr-server-jooby/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.detekt)
5 | alias(libs.plugins.nmcp)
6 | id("org.jetbrains.dokka")
7 | id("maven-publish")
8 | id("signing")
9 | }
10 |
11 | detekt {
12 | toolVersion = libs.versions.detekt.get()
13 | config.setFrom("../../detekt-config.yml")
14 | buildUponDefaultConfig = true
15 | }
16 |
17 | kotlin {
18 | explicitApi()
19 | compilerOptions()
20 | kotlinJvmTargets()
21 | sourceSets {
22 | val jvmMain by getting {
23 | dependencies {
24 | implementation(project(":modules:kilua-ssr-server"))
25 | api(libs.jooby.kotlin)
26 | }
27 | }
28 | }
29 | }
30 |
31 | setupDokka(tasks.dokkaGenerate)
32 | setupPublishing()
33 |
--------------------------------------------------------------------------------
/modules/kilua-ssr-server-ktor/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.detekt)
5 | alias(libs.plugins.nmcp)
6 | id("org.jetbrains.dokka")
7 | id("maven-publish")
8 | id("signing")
9 | }
10 |
11 | detekt {
12 | toolVersion = libs.versions.detekt.get()
13 | config.setFrom("../../detekt-config.yml")
14 | buildUponDefaultConfig = true
15 | }
16 |
17 | kotlin {
18 | explicitApi()
19 | compilerOptions()
20 | kotlinJvmTargets()
21 | sourceSets {
22 | val jvmMain by getting {
23 | dependencies {
24 | implementation(project(":modules:kilua-ssr-server"))
25 | api(libs.ktor.server.core)
26 | }
27 | }
28 | }
29 | }
30 |
31 | setupDokka(tasks.dokkaGenerate)
32 | setupPublishing()
33 |
--------------------------------------------------------------------------------
/modules/kilua-ssr-server-micronaut/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.detekt)
5 | alias(libs.plugins.ksp)
6 | alias(libs.plugins.nmcp)
7 | id("org.jetbrains.dokka")
8 | id("maven-publish")
9 | id("signing")
10 | }
11 |
12 | detekt {
13 | toolVersion = libs.versions.detekt.get()
14 | config.setFrom("../../detekt-config.yml")
15 | buildUponDefaultConfig = true
16 | }
17 |
18 | kotlin {
19 | explicitApi()
20 | compilerOptions()
21 | kotlinJvmTargets()
22 | sourceSets {
23 | val jvmMain by getting {
24 | dependencies {
25 | implementation(project(":modules:kilua-ssr-server"))
26 | implementation(kotlin("reflect"))
27 | api(libs.kotlinx.coroutines.reactor)
28 | api(project.dependencies.platform(libs.micronaut.platform))
29 | api("io.micronaut:micronaut-http")
30 | api("io.micronaut:micronaut-router")
31 | api("io.micronaut.reactor:micronaut-reactor")
32 | }
33 | }
34 | }
35 | }
36 |
37 | dependencies {
38 | add("kspJvm", platform(libs.micronaut.platform))
39 | add("kspJvm", "io.micronaut:micronaut-inject-kotlin")
40 | }
41 |
42 | setupDokka(tasks.dokkaGenerate)
43 | setupPublishing()
44 |
--------------------------------------------------------------------------------
/modules/kilua-ssr-server-spring-boot/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.detekt)
5 | alias(libs.plugins.nmcp)
6 | id("org.jetbrains.dokka")
7 | id("maven-publish")
8 | id("signing")
9 | }
10 |
11 | detekt {
12 | toolVersion = libs.versions.detekt.get()
13 | config.setFrom("../../detekt-config.yml")
14 | buildUponDefaultConfig = true
15 | }
16 |
17 | kotlin {
18 | explicitApi()
19 | compilerOptions()
20 | kotlinJvmTargets()
21 | sourceSets {
22 | val jvmMain by getting {
23 | dependencies {
24 | implementation(project(":modules:kilua-ssr-server"))
25 | api(libs.kotlinx.coroutines.reactor)
26 | api(libs.spring.boot.starter)
27 | api(libs.spring.boot.starter.webflux)
28 | }
29 | }
30 | }
31 | }
32 |
33 | setupDokka(tasks.dokkaGenerate)
34 | setupPublishing()
35 |
--------------------------------------------------------------------------------
/modules/kilua-ssr-server-spring-boot/src/jvmMain/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:
--------------------------------------------------------------------------------
1 | dev.kilua.ssr.SsrConfiguration
2 | dev.kilua.ssr.SsrRouterConfiguration
3 | dev.kilua.ssr.SsrHandler
4 | dev.kilua.ssr.SsrErrorWebExceptionHandler
5 | dev.kilua.ssr.WebFluxConfig
6 |
--------------------------------------------------------------------------------
/modules/kilua-ssr-server-vertx/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.detekt)
5 | alias(libs.plugins.nmcp)
6 | id("org.jetbrains.dokka")
7 | id("maven-publish")
8 | id("signing")
9 | }
10 |
11 | detekt {
12 | toolVersion = libs.versions.detekt.get()
13 | config.setFrom("../../detekt-config.yml")
14 | buildUponDefaultConfig = true
15 | }
16 |
17 | kotlin {
18 | explicitApi()
19 | compilerOptions()
20 | kotlinJvmTargets()
21 | sourceSets {
22 | val jvmMain by getting {
23 | dependencies {
24 | implementation(project(":modules:kilua-ssr-server"))
25 | api(libs.vertx.web)
26 | api(libs.vertx.lang.kotlin)
27 | api(libs.vertx.lang.kotlin.coroutines)
28 | api(libs.vertx.launcher.application)
29 | }
30 | }
31 | }
32 | }
33 |
34 | setupDokka(tasks.dokkaGenerate)
35 | setupPublishing()
36 |
--------------------------------------------------------------------------------
/modules/kilua-ssr-server/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.detekt)
5 | alias(libs.plugins.nmcp)
6 | id("org.jetbrains.dokka")
7 | id("maven-publish")
8 | id("signing")
9 | }
10 |
11 | detekt {
12 | toolVersion = libs.versions.detekt.get()
13 | config.setFrom("../../detekt-config.yml")
14 | buildUponDefaultConfig = true
15 | }
16 |
17 | kotlin {
18 | explicitApi()
19 | compilerOptions()
20 | kotlinJvmTargets()
21 | sourceSets {
22 | val jvmMain by getting {
23 | dependencies {
24 | api(libs.ktor.client.core)
25 | api(libs.ktor.client.cio)
26 | api(libs.resources.optimizer)
27 | api(libs.expiring.map)
28 | api(libs.logback.classic)
29 | }
30 | }
31 | }
32 | }
33 |
34 | setupDokka(tasks.dokkaGenerate)
35 | setupPublishing()
36 |
--------------------------------------------------------------------------------
/modules/kilua-ssr-server/src/jvmMain/kotlin/dev/kilua/ssr/CacheKey.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.ssr
24 |
25 | internal data class CacheKey(val uri: String, val locale: String? = null)
26 |
--------------------------------------------------------------------------------
/modules/kilua-svg/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | }
29 | }
30 | val commonTest by getting {
31 | dependencies {
32 | implementation(kotlin("test"))
33 | implementation(kotlin("test-common"))
34 | implementation(kotlin("test-annotations-common"))
35 | implementation(project(":modules:kilua-testutils"))
36 | }
37 | }
38 | val jsMain by getting {
39 | dependencies {
40 | }
41 | }
42 | val wasmJsMain by getting {
43 | dependencies {
44 | }
45 | }
46 | }
47 | }
48 |
49 | setupDokka(tasks.dokkaGenerate)
50 | setupPublishing()
51 |
--------------------------------------------------------------------------------
/modules/kilua-tabulator/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | implementation(npm("tabulator-tables", libs.versions.tabulator.get()))
29 | }
30 | }
31 | val commonTest by getting {
32 | dependencies {
33 | implementation(kotlin("test"))
34 | implementation(kotlin("test-common"))
35 | implementation(kotlin("test-annotations-common"))
36 | implementation(project(":modules:kilua-testutils"))
37 | }
38 | }
39 | val jsMain by getting {
40 | dependencies {
41 | }
42 | }
43 | val wasmJsMain by getting {
44 | dependencies {
45 | }
46 | }
47 | }
48 | }
49 |
50 | setupDokka(tasks.dokkaGenerate)
51 | setupPublishing()
52 |
--------------------------------------------------------------------------------
/modules/kilua-testutils/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.detekt)
4 | alias(libs.plugins.nmcp)
5 | id("org.jetbrains.dokka")
6 | id("maven-publish")
7 | id("signing")
8 | }
9 |
10 | detekt {
11 | toolVersion = libs.versions.detekt.get()
12 | config.setFrom("../../detekt-config.yml")
13 | buildUponDefaultConfig = true
14 | }
15 |
16 | kotlin {
17 | explicitApi()
18 | compilerOptions()
19 | kotlinJsTargets()
20 | kotlinWasmTargets()
21 | sourceSets {
22 | val commonMain by getting {
23 | dependencies {
24 | implementation(libs.kotlinx.coroutines)
25 | implementation(project(":kilua"))
26 | implementation(kotlin("test"))
27 | implementation(kotlin("test-common"))
28 | implementation(kotlin("test-annotations-common"))
29 | implementation(npm("html-differ", libs.versions.html.differ.get()))
30 | }
31 | }
32 | val jsMain by getting {
33 | dependencies {
34 | }
35 | }
36 | val wasmJsMain by getting {
37 | dependencies {
38 | }
39 | }
40 | }
41 | }
42 |
43 | setupDokka(tasks.dokkaGenerate)
44 | setupPublishing()
45 |
--------------------------------------------------------------------------------
/modules/kilua-testutils/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/modules/kilua-testutils/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
3 |
--------------------------------------------------------------------------------
/modules/kilua-testutils/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 |
--------------------------------------------------------------------------------
/modules/kilua-toastify/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | implementation(npm("toastify-js", libs.versions.toastify.get()))
29 | }
30 | }
31 | val commonTest by getting {
32 | dependencies {
33 | implementation(kotlin("test"))
34 | implementation(kotlin("test-common"))
35 | implementation(kotlin("test-annotations-common"))
36 | implementation(project(":modules:kilua-testutils"))
37 | }
38 | }
39 | val jsMain by getting {
40 | dependencies {
41 | }
42 | }
43 | val wasmJsMain by getting {
44 | dependencies {
45 | }
46 | }
47 | }
48 | }
49 |
50 | setupDokka(tasks.dokkaGenerate)
51 | setupPublishing()
52 |
--------------------------------------------------------------------------------
/modules/kilua-tom-select/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | implementation(npm("tom-select", libs.versions.tom.select.get()))
29 | }
30 | }
31 | val commonTest by getting {
32 | dependencies {
33 | implementation(kotlin("test"))
34 | implementation(kotlin("test-common"))
35 | implementation(kotlin("test-annotations-common"))
36 | implementation(project(":modules:kilua-testutils"))
37 | }
38 | }
39 | val jsMain by getting {
40 | dependencies {
41 | }
42 | }
43 | val wasmJsMain by getting {
44 | dependencies {
45 | }
46 | }
47 | }
48 | }
49 |
50 | setupDokka(tasks.dokkaGenerate)
51 | setupPublishing()
52 |
--------------------------------------------------------------------------------
/modules/kilua-trix/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.kotlinx.serialization)
4 | alias(libs.plugins.compose)
5 | alias(libs.plugins.compose.compiler)
6 | alias(libs.plugins.detekt)
7 | alias(libs.plugins.nmcp)
8 | id("org.jetbrains.dokka")
9 | id("maven-publish")
10 | id("signing")
11 | }
12 |
13 | detekt {
14 | toolVersion = libs.versions.detekt.get()
15 | config.setFrom("../../detekt-config.yml")
16 | buildUponDefaultConfig = true
17 | }
18 |
19 | kotlin {
20 | explicitApi()
21 | compilerOptions()
22 | kotlinJsTargets()
23 | kotlinWasmTargets()
24 | sourceSets {
25 | val commonMain by getting {
26 | dependencies {
27 | implementation(project(":kilua"))
28 | implementation(npm("trix", libs.versions.trix.get()))
29 | }
30 | }
31 | val commonTest by getting {
32 | dependencies {
33 | implementation(kotlin("test"))
34 | implementation(kotlin("test-common"))
35 | implementation(kotlin("test-annotations-common"))
36 | implementation(project(":modules:kilua-testutils"))
37 | }
38 | }
39 | val jsMain by getting {
40 | dependencies {
41 | }
42 | }
43 | val wasmJsMain by getting {
44 | dependencies {
45 | }
46 | }
47 | }
48 | }
49 |
50 | setupDokka(tasks.dokkaGenerate)
51 | setupPublishing()
52 |
--------------------------------------------------------------------------------
/modules/kilua-trix/src/commonMain/kotlin/dev/kilua/form/text/i18n/TrixLocaleEn.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.form.text.i18n
24 |
25 | import dev.kilua.externals.TrixLocale
26 |
27 | /**
28 | * Get English locale.
29 | */
30 | internal expect fun getTrixLocaleEn(): TrixLocale
31 |
--------------------------------------------------------------------------------
/modules/kilua-trix/src/jsMain/kotlin/dev/kilua/TrixModule.js.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua
24 |
25 | import dev.kilua.externals.Trix
26 | import dev.kilua.externals.nodeJsInit
27 |
28 | internal actual fun initializeTrix() {
29 | nodeJsInit()
30 | useModule(Trix)
31 | }
32 |
--------------------------------------------------------------------------------
/modules/kilua-trix/src/jsMain/kotlin/dev/kilua/externals/Editor.js.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.externals
24 |
25 | import web.dom.Element
26 |
27 | internal actual fun getEditorFromElement(element: Element): Editor? {
28 | @Suppress("UnsafeCastFromDynamic")
29 | return element.asDynamic().editor
30 | }
31 |
--------------------------------------------------------------------------------
/modules/kilua-trix/src/jsMain/kotlin/dev/kilua/externals/NodeJsDom.js.kt:
--------------------------------------------------------------------------------
1 | @file:JsModule("aaa-kilua-assets/nodejs_dom.js")
2 | /*
3 | * Copyright (c) 2023 Robert Jaros
4 | *
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy
6 | * of this software and associated documentation files (the "Software"), to deal
7 | * in the Software without restriction, including without limitation the rights
8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | * copies of the Software, and to permit persons to whom the Software is
10 | * furnished to do so, subject to the following conditions:
11 | *
12 | * The above copyright notice and this permission notice shall be included in all
13 | * copies or substantial portions of the Software.
14 | *
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | * SOFTWARE.
22 | */
23 |
24 | package dev.kilua.externals
25 |
26 | internal external fun nodeJsInit()
27 |
--------------------------------------------------------------------------------
/modules/kilua-trix/src/jsMain/kotlin/dev/kilua/form/text/i18n/TrixLocalePl.js.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.form.text.i18n
24 |
25 | import dev.kilua.externals.TrixLocale
26 | import dev.kilua.utils.obj
27 |
28 | internal actual fun getTrixLocalePl(): TrixLocale {
29 | return obj {
30 | initTrixLocalePl()
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/modules/kilua-trix/src/wasmJsMain/kotlin/dev/kilua/TrixModule.wasmJs.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua
24 |
25 | import dev.kilua.externals.Trix
26 | import dev.kilua.externals.nodeJsInit
27 |
28 | internal actual fun initializeTrix() {
29 | nodeJsInit()
30 | useModule(Trix)
31 | }
32 |
--------------------------------------------------------------------------------
/modules/kilua-trix/src/wasmJsMain/kotlin/dev/kilua/externals/NodeJsDom.wasmJs.kt:
--------------------------------------------------------------------------------
1 | @file:JsModule("aaa-kilua-assets/nodejs_dom.mjs")
2 |
3 | /*
4 | * Copyright (c) 2023 Robert Jaros
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | package dev.kilua.externals
26 |
27 | internal external fun nodeJsInit()
28 |
--------------------------------------------------------------------------------
/modules/kilua-trix/src/wasmJsMain/kotlin/dev/kilua/form/text/i18n/TrixLocalePl.wasmJs.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Robert Jaros
3 | *
4 | * Permission is hereby granted, free of charge, to any person obtaining a copy
5 | * of this software and associated documentation files (the "Software"), to deal
6 | * in the Software without restriction, including without limitation the rights
7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | * copies of the Software, and to permit persons to whom the Software is
9 | * furnished to do so, subject to the following conditions:
10 | *
11 | * The above copyright notice and this permission notice shall be included in all
12 | * copies or substantial portions of the Software.
13 | *
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | * SOFTWARE.
21 | */
22 |
23 | package dev.kilua.form.text.i18n
24 |
25 | import dev.kilua.externals.TrixLocale
26 | import dev.kilua.utils.obj
27 |
28 | internal actual fun getTrixLocalePl(): TrixLocale {
29 | return obj {
30 | initTrixLocalePl()
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/plugins/kilua-gradle-plugin/src/main/kotlin/dev/kilua/gradle/tasks/KiluaTask.kt:
--------------------------------------------------------------------------------
1 | package dev.kilua.gradle.tasks
2 |
3 | public interface KiluaTask
4 |
--------------------------------------------------------------------------------
/plugins/kilua-ksp-processor/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("multiplatform")
3 | alias(libs.plugins.nmcp)
4 | id("org.jetbrains.dokka")
5 | id("maven-publish")
6 | id("signing")
7 | }
8 |
9 | kotlin {
10 | explicitApi()
11 | compilerOptions()
12 | kotlinJvmTargets()
13 | sourceSets {
14 | val commonMain by getting {
15 | dependencies {
16 | api(project(":modules:kilua-annotations"))
17 | }
18 | }
19 | val jvmMain by getting {
20 | dependencies {
21 | implementation(libs.ksp.symbol.processing.api)
22 | }
23 | }
24 | }
25 | }
26 |
27 | setupDokka(tasks.dokkaGenerate, path = "plugins/")
28 | setupPublishing()
29 |
--------------------------------------------------------------------------------
/plugins/kilua-ksp-processor/src/jvmMain/resources/META-INF/services/com.google.devtools.ksp.processing.SymbolProcessorProvider:
--------------------------------------------------------------------------------
1 | dev.kilua.ksp.KiluaProcessorProvider
2 |
--------------------------------------------------------------------------------
/templates/template/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | .idea
3 | .kotlin
4 | build/
5 | out/
--------------------------------------------------------------------------------
/templates/template/README.md:
--------------------------------------------------------------------------------
1 | # Building and running
2 |
3 | To build the application, you need to have JDK 21 or later installed.
4 |
5 | The following tasks are available:
6 |
7 | - `./gradlew -t jsBrowserDevelopmentRun` - run the webpack dev server in continuous build mode for JS target on `http://localhost:3000`
8 | - `./gradlew -t wasmJsBrowserDevelopmentRun` - run the webpack dev server in continuous build mode for Wasm target on `http://localhost:3000`
9 | - `./gradlew jsBrowserDistribution` - build production application for JS target to `build/dist/js/productionExecutable` directory
10 | - `./gradlew wasmJsBrowserDistribution` - build production application for Wasm target to `build/dist/wasmJs/productionExecutable` directory
11 |
12 | Note: use `gradlew.bat` instead of `./gradlew` on Windows operating system.
13 |
--------------------------------------------------------------------------------
/templates/template/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx6g
2 | org.gradle.parallel=true
3 | org.gradle.caching=true
4 | #org.gradle.unsafe.configuration-cache=true
5 | #org.gradle.unsafe.configuration-cache-problems=warn
6 | org.gradle.kotlin.dsl.precompiled.accessors.strict=true
7 |
8 | kotlin.mpp.stability.nowarn=true
9 | kotlin.code.style=official
10 | ksp.useKSP2=true
11 | kotlin.js.ir.output.granularity=per-file
12 |
--------------------------------------------------------------------------------
/templates/template/gradle/libs.versions.toml:
--------------------------------------------------------------------------------
1 | [versions]
2 | kilua = "0.0.25"
3 | kotlin = "2.2.0-RC"
4 | compose = "1.8.1"
5 |
6 | [libraries]
7 | kilua = { module = "dev.kilua:kilua", version.ref = "kilua" }
8 |
9 | [plugins]
10 | compose = { id = "org.jetbrains.compose", version.ref = "compose" }
11 | compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
12 | kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
13 | kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
14 | kilua = { id = "dev.kilua", version.ref = "kilua" }
15 |
--------------------------------------------------------------------------------
/templates/template/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rjaros/kilua/03a778310788728ad7a264abb67b5f89f540ae74/templates/template/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/templates/template/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-all.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/templates/template/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | @file:Suppress("UnstableApiUsage")
2 |
3 | pluginManagement {
4 | repositories {
5 | gradlePluginPortal()
6 | mavenCentral()
7 | mavenLocal()
8 | }
9 | }
10 |
11 | dependencyResolutionManagement {
12 | repositories {
13 | mavenCentral()
14 | google()
15 | mavenLocal()
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/templates/template/src/commonMain/resources/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Kilua template
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/templates/template/webpack.config.d/bootstrap.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
2 | config.module.rules.push({test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, type: 'asset'});
3 | config.module.rules.push({test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, type: 'asset/resource'});
4 |
--------------------------------------------------------------------------------
/templates/template/webpack.config.d/css.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push({ test: /\.css$/, use: ["style-loader", { loader: "css-loader", options: {sourceMap: false} } ] });
2 |
--------------------------------------------------------------------------------
/templates/template/webpack.config.d/file.js:
--------------------------------------------------------------------------------
1 | config.module.rules.push(
2 | {
3 | test: /\.(jpe?g|png|gif|svg)$/i,
4 | type: 'asset/resource'
5 | }
6 | );
7 | config.module.rules.push(
8 | {
9 | test: /\.(po)$/i,
10 | type: 'asset/source'
11 | }
12 | );
13 |
--------------------------------------------------------------------------------
/templates/template/webpack.config.d/tailwind.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | config.module.rules.push({
3 | test: /\.twcss$/,
4 | use: [
5 | "style-loader",
6 | {
7 | loader: "css-loader",
8 | options: {sourceMap: false}
9 | },
10 | {
11 | loader: "postcss-loader",
12 | options: {
13 | postcssOptions: {
14 | plugins: [
15 | ["@tailwindcss/postcss", {} ],
16 | (config.devServer ? undefined : [ "cssnano", {} ])
17 | ]
18 | }
19 | }
20 | }
21 | ]
22 | });
23 | })();
24 |
--------------------------------------------------------------------------------
/templates/template/webpack.config.d/temporal.js:
--------------------------------------------------------------------------------
1 | ;(function() {
2 | const webpack = require('webpack')
3 | config.plugins.push(new webpack.DefinePlugin({
4 | Temporal: {},
5 | }));
6 | })();
7 |
--------------------------------------------------------------------------------
/templates/template/webpack.config.d/webpack.js:
--------------------------------------------------------------------------------
1 | if (config.devServer) {
2 | config.devServer.hot = true;
3 | config.devServer.open = false;
4 | config.devServer.port = 3000;
5 | config.devServer.historyApiFallback = true;
6 | config.devtool = 'eval-cheap-source-map';
7 | } else {
8 | config.devtool = undefined;
9 | }
10 |
11 | // disable bundle size warning
12 | config.performance = {
13 | assetFilter: function (assetFilename) {
14 | return !assetFilename.endsWith('.js');
15 | },
16 | };
17 |
--------------------------------------------------------------------------------