Partas.Solid 0.1.0

Suggested Alternatives

Partas.Solid 0.2.10

Additional Details

Previous versions have missing, or incorrect transformations in uncommon but vital use cases.

There is a newer version of this package available.
See the version list below for details.
dotnet add package Partas.Solid --version 0.1.0
                    
NuGet\Install-Package Partas.Solid -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Partas.Solid" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Partas.Solid" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Partas.Solid" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Partas.Solid --version 0.1.0
                    
#r "nuget: Partas.Solid, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Partas.Solid@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Partas.Solid&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Partas.Solid&version=0.1.0
                    
Install as a Cake Tool

Partas.Solid

This is an opinionated fork of Oxpecker.Solid that enables experimental behaviours and patterns which I use in personal projects.

Until such a time as these types of behaviours/patterns are sought out by users, the behaviours will not be supported on the mainstream.

For this reason, I publish this as a means of allowing users to experiment or observe the patterns enabled and submit requests for it to be considered in the mainline.

Features

The feature set contained within this is a modified transformation or alternate transformation which can be applied to the type definitions of your tags/elements. This allows a UserDefined custom tag rather than only allowing Library Imported tags.

namespace Partas.Solid.Test

open Partas.Solid
open Fable.Core

type [<Erase>] CustomTag() =
    inherit RegularNode()
    [<SolidTypeComponent>]
    member private props.typeDef () =
        div() { "Hi" }

Compiles to

function CustomTag(props) {
    return <div> Hi </div>;
}

We can now utilise this like any other tag:

module App
open Partas.Solid.Test

[<SolidTypeComponent>]
let App () =
    CustomTag()
import { CustomTag } from "./Program.fs.jsx"

export function App() {
    return <CustomTag />;
}

Which would render the Html

<div>Hi</div>

Ontop of the above, we also can pass properties down to nested children while maintaining reactivity:

Setting default properties and splitting properties/spreading now has all the mergeProps and splitProps abstracted away

type [<Erase>] CustomTag() =
    inherit RegularNode()
    [<SolidTypeComponent>]
    member private props.typeDef () =
        props.class' <- "DefaultClass" // setting properties will set the 'default'
        div(class' = props.class') {
            button(spreadObj = props)
        }
function CustomTag(props) {
    props = mergeProps({
        class: "DefaultClass",
    }, props);
    const [local, others] = splitProps(props, ["class"]);
    return <div class={local.class}>
        <button {...others} />
    </div>;
}

Rough Edges

Oxpecker.Solid is a great DSL and works for most use cases. However, I've encountered many rough edges when it comes to LibraryImports especially. In the process of developing these behaviours, I've fixed several of those issues. But in the process, perhaps I've created more.

If you do decide to play with this and find some odd behaviours, please let me know.

Usage

Installation

Will be uploaded to nuget soon(tm)

Attribute

Purposeful attribute change to allow simultaneous use from mainstream by changing [<SolidComponent>] to [<SolidTypeComponent>].

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (34)

Showing the top 5 NuGet packages that depend on Partas.Solid:

Package Downloads
Partas.Solid.Kobalte

Bindings for Kobalte for Partas.Solid

Partas.Solid.Primitives.Tween

Bindings for Solid-js primitives

Partas.Solid.Primitives

Bindings for Solid-js primitives

Partas.Solid.Corvu

Bindings for Solid-Corvu in Oxpecker.Solid Style compatible with Partas.Solid

Partas.Solid.Cmdk

Bindings for Solid-Cmdk in Oxpecker.Solid Style compatible with Partas.Solid

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 227 7/20/2025
1.1.6 181 7/19/2025
1.1.5 232 7/10/2025
1.1.4 142 7/1/2025
1.1.3 135 6/25/2025
1.1.2 136 6/25/2025
1.0.2 96 6/6/2025
1.0.1 83 6/6/2025
1.0.0 270 6/5/2025
1.0.0-alpha97 568 5/31/2025 1.0.0-alpha97 is deprecated because it is no longer maintained.
1.0.0-alpha96 563 5/31/2025 1.0.0-alpha96 is deprecated because it is no longer maintained.
1.0.0-alpha92 527 5/31/2025 1.0.0-alpha92 is deprecated because it is no longer maintained.
1.0.0-alpha91 614 5/29/2025 1.0.0-alpha91 is deprecated because it is no longer maintained.
1.0.0-alpha9 606 5/29/2025 1.0.0-alpha9 is deprecated because it is no longer maintained.
1.0.0-alpha8 606 5/29/2025 1.0.0-alpha8 is deprecated because it is no longer maintained.
1.0.0-alpha7 614 5/29/2025 1.0.0-alpha7 is deprecated because it is no longer maintained.
1.0.0-alpha6 609 5/29/2025 1.0.0-alpha6 is deprecated because it is no longer maintained.
1.0.0-alpha5 619 5/25/2025 1.0.0-alpha5 is deprecated because it is no longer maintained.
1.0.0-alpha4 698 5/24/2025 1.0.0-alpha4 is deprecated because it is no longer maintained.
1.0.0-alpha3 594 5/23/2025 1.0.0-alpha3 is deprecated because it is no longer maintained.
1.0.0-alpha2 595 5/23/2025 1.0.0-alpha2 is deprecated because it is no longer maintained.
1.0.0-alpha11 605 5/29/2025 1.0.0-alpha11 is deprecated because it is no longer maintained.
1.0.0-alpha1 617 5/22/2025 1.0.0-alpha1 is deprecated because it is no longer maintained.
0.2.35 604 5/17/2025 0.2.35 is deprecated because it is no longer maintained.
0.2.34 628 4/29/2025 0.2.34 is deprecated because it is no longer maintained.
0.2.33 625 4/29/2025 0.2.33 is deprecated because it is no longer maintained.
0.2.32 635 4/22/2025 0.2.32 is deprecated because it is no longer maintained.
0.2.31 633 4/21/2025 0.2.31 is deprecated because it is no longer maintained.
0.2.29 628 4/20/2025 0.2.29 is deprecated because it is no longer maintained.
0.2.28 655 4/16/2025 0.2.28 is deprecated because it is no longer maintained.
0.2.27 642 3/22/2025 0.2.27 is deprecated because it is no longer maintained.
0.2.26 564 3/22/2025 0.2.26 is deprecated because it is no longer maintained.
0.2.25 553 3/22/2025 0.2.25 is deprecated because it is no longer maintained.
0.2.24 575 3/21/2025 0.2.24 is deprecated because it is no longer maintained.
0.2.23 595 3/21/2025 0.2.23 is deprecated because it is no longer maintained.
0.2.22 677 3/20/2025 0.2.22 is deprecated because it is no longer maintained.
0.2.21 621 3/20/2025 0.2.21 is deprecated because it is no longer maintained.
0.2.20 627 3/20/2025 0.2.20 is deprecated because it is no longer maintained.
0.2.19 620 3/19/2025 0.2.19 is deprecated because it is no longer maintained.
0.2.18 608 3/16/2025 0.2.18 is deprecated because it is no longer maintained.
0.2.17 613 3/16/2025 0.2.17 is deprecated because it is no longer maintained.
0.2.16 592 3/14/2025 0.2.16 is deprecated because it is no longer maintained.
0.2.15 611 3/14/2025 0.2.15 is deprecated because it is no longer maintained.
0.2.14 627 3/12/2025 0.2.14 is deprecated because it is no longer maintained.
0.2.13 638 3/12/2025 0.2.13 is deprecated because it is no longer maintained.
0.2.12 629 3/12/2025 0.2.12 is deprecated because it is no longer maintained.
0.2.11 637 3/11/2025 0.2.11 is deprecated because it is no longer maintained.
0.2.10 648 3/9/2025 0.2.10 is deprecated because it is no longer maintained.
0.2.9 247 3/9/2025 0.2.9 is deprecated because it is no longer maintained and has critical bugs.
0.2.8 259 3/9/2025 0.2.8 is deprecated because it is no longer maintained and has critical bugs.
0.2.7 251 3/9/2025 0.2.7 is deprecated because it is no longer maintained and has critical bugs.
0.2.6 283 3/8/2025 0.2.6 is deprecated because it is no longer maintained and has critical bugs.
0.2.5 300 3/7/2025 0.2.5 is deprecated because it is no longer maintained and has critical bugs.
0.2.4 300 3/7/2025 0.2.4 is deprecated because it is no longer maintained and has critical bugs.
0.2.3 283 3/7/2025 0.2.3 is deprecated because it is no longer maintained and has critical bugs.
0.2.2 279 3/7/2025 0.2.2 is deprecated because it is no longer maintained and has critical bugs.
0.2.1 300 3/7/2025 0.2.1 is deprecated because it is no longer maintained and has critical bugs.
0.2.0 300 3/6/2025 0.2.0 is deprecated because it is no longer maintained and has critical bugs.
0.1.0 205 3/1/2025 0.1.0 is deprecated because it is no longer maintained and has critical bugs.

Init