Swate.Components
2.0.0
See the version list below for details.
dotnet add package Swate.Components --version 2.0.0
NuGet\Install-Package Swate.Components -Version 2.0.0
<PackageReference Include="Swate.Components" Version="2.0.0" />
<PackageVersion Include="Swate.Components" Version="2.0.0" />
<PackageReference Include="Swate.Components" />
paket add Swate.Components --version 2.0.0
#r "nuget: Swate.Components, 2.0.0"
#:package Swate.Components@2.0.0
#addin nuget:?package=Swate.Components&version=2.0.0
#tool nuget:?package=Swate.Components&version=2.0.0
Components
Local Dev
Tests
- Once:
npm test - Watch:
npm run test:watch
Playground
npm start
Run Storybook
npm run storybook
Build Storybook
npm run build:storybook
Build Npm Package
npm run build
Test Npm Package
npm pack can be used to locally test the npm package before publishing it. It creates a .tgz file in the ./src folder. MUST run npm run build first to transpile the f# code and bundle the js code.
Can be references like this in a react test repo after moving the .tgz file to the test repo:
"dependencies": {
"@nfdi4plants/swate-components": "file:./nfdi4plants-swate-components-2.0.2.tgz",
"react": "^19.1.0",
"react-dom": "^19.1.0"
},
Build .NET Package
npm run build:net
Release
.NET
- Update version in
./src/Components.fsproj npm run build:net(creates tailwind style css and packs nuget package)- Upload nuget package from
./src/bin/Releases
NPM
- Release normally and copy
<new_version>from console output. npm version <new_version> --no-git-tag-versionnpm run build(transpiles with fable, creates tsc types, and bundles with rollup)- (Due to #701) replace
@layer basewith@layer swt-baseindist/swate-components.css npm publish --access public [--tag next](Use--tag nextfor prerelease)
Background info:
<details> <summary>Requirements</summary>
- Library MUST include swate styling via .css file.
- Library MUST be readable code (not minified) for easier debugging.
- Library MUST be tree-shakeable.
- Library MUST include proper TypeScript types.
- Library MUST preserve individual files to support dynamic imports in larger components (keyword preserveModules).
</details>
Question: Why transpile to
src/dist, instead of using the fable transpiled files next to the f# files?Answer: Because otherwise the vite tsc compiler cannot find the f# code from Swate.Components.Shared. By giving fable a specific output dir
src/dist, all code, including the f# code from Swate.Components.Shared, is in one place and tsc can find it.
Question: Why use a bundler, instead of uploading raw files.
Answer: some F# fable libraries use native .js files. These are difficult to copy to the correct locations using
tscor other "bundle" mechanisms without actually bundling the files. Rollup (used by vite) is a bundler that can handle this and also supports tree-shaking and other optimizations.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- ARCtrl.Core (>= 3.0.0-beta.12)
- ARCtrl.Javascript (>= 3.0.0-beta.12)
- ARCtrl.Spreadsheet (>= 3.0.0-beta.12)
- Fable.Browser.Dom (>= 2.18.0)
- Fable.Core (>= 5.0.0-beta.4)
- Fable.Fetch (>= 2.7.0)
- Fable.React.Types (>= 18.4.0)
- Fable.Remoting.Client (>= 7.32.0)
- Feliz (>= 3.1.1)
- Feliz.UseElmish (>= 4.1.0)
- FSharp.Core (>= 10.1.203)
- Swate.Components.Core (>= 2.0.0)
- YAMLicious (>= 1.0.0-alpha.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.2 | 27 | 7/15/2026 |
| 2.0.1 | 38 | 7/14/2026 |
| 2.0.0 | 40 | 7/14/2026 |
| 1.0.7 | 110 | 1/8/2026 |
| 1.0.6 | 411 | 11/20/2025 |
| 1.0.5 | 405 | 11/20/2025 |
| 1.0.4 | 395 | 11/20/2025 |
| 1.0.3 | 347 | 11/17/2025 |
| 1.0.2 | 201 | 10/30/2025 |
| 1.0.1 | 207 | 10/29/2025 |
| 1.0.0 | 212 | 10/29/2025 |
| 1.0.0-rc.12 | 193 | 10/28/2025 |
| 1.0.0-rc.11 | 179 | 10/28/2025 |
| 1.0.0-rc.10 | 194 | 10/27/2025 |
| 1.0.0-rc.9 | 186 | 10/20/2025 |
| 1.0.0-rc.8 | 176 | 10/9/2025 |
| 1.0.0-rc.7 | 285 | 9/19/2025 |
| 1.0.0-rc.5 | 184 | 9/8/2025 |
| 1.0.0-rc.4 | 182 | 9/8/2025 |
| 1.0.0-rc.3 | 148 | 9/5/2025 |