diff --git a/Partas.Solid.Tests.Plugin/Compiled/SolidCases/ValueUnrollerDecisionTree/ValueUnrollerDecisionTree.expected b/Partas.Solid.Tests.Plugin/Compiled/SolidCases/ValueUnrollerDecisionTree/ValueUnrollerDecisionTree.expected
new file mode 100644
index 0000000..5dcd362
--- /dev/null
+++ b/Partas.Solid.Tests.Plugin/Compiled/SolidCases/ValueUnrollerDecisionTree/ValueUnrollerDecisionTree.expected
@@ -0,0 +1,19 @@
+
+import { twMerge } from "tailwind-merge";
+import { clsx } from "clsx";
+import { splitProps } from "solid-js";
+
+export function Lib_cn_Z35CD86D0(classes) {
+ return twMerge(clsx(classes));
+}
+
+export function ValueUnrollTest(props) {
+ const [PARTAS_LOCAL, PARTAS_OTHERS] = splitProps(props, []);
+ return
;
+}
+
+export function ValueUnrollNestedTest(props) {
+ const [PARTAS_LOCAL, PARTAS_OTHERS] = splitProps(props, []);
+ return
;
+}
+
diff --git a/Partas.Solid.Tests.Plugin/Compiled/SolidCases/ValueUnrollerDecisionTree/ValueUnrollerDecisionTree.fs b/Partas.Solid.Tests.Plugin/Compiled/SolidCases/ValueUnrollerDecisionTree/ValueUnrollerDecisionTree.fs
new file mode 100644
index 0000000..ca0ea01
--- /dev/null
+++ b/Partas.Solid.Tests.Plugin/Compiled/SolidCases/ValueUnrollerDecisionTree/ValueUnrollerDecisionTree.fs
@@ -0,0 +1,78 @@
+module Partas.Solid.Tests.Plugin.Compiled.SolidCases.ValueUnrollerDecisionTree.ValueUnrollerDecisionTree
+
+open Partas.Solid
+open Fable.Core
+open Fable.Core.JS
+open Fable.Core.JsInterop
+
+[
]
+type Lib =
+ []
+ static member twMerge(classes: string) : string = jsNative
+
+ []
+ static member clsx(classes: obj) : string = jsNative
+
+ []
+ static member cn(classes: string array) : string =
+ classes
+ |> Lib.clsx
+ |> Lib.twMerge
+
+[]
+type Variant =
+ | Black
+ | Brown
+ | Green
+
+[]
+type ValueUnrollTest() =
+ interface RegularNode
+
+ []
+ val mutable variant: Variant
+
+ []
+ member props.__ =
+ div (
+ class' =
+ Lib.cn
+ [| "bg-primary"
+ match props.variant with
+ | Brown -> "brown"
+ | Black -> "black"
+ | Green -> "green" |]
+ )
+
+[]
+type AltVariant =
+ | Blue
+ | Orange
+ | Yellow
+
+[]
+type ValueUnrollNestedTest() =
+ interface RegularNode
+
+ []
+ val mutable variant: Variant
+
+ []
+ val mutable altVariant: AltVariant
+
+ []
+ member props.__ =
+ div (
+ class' =
+ Lib.cn
+ [| "bg-primary"
+ match props.variant with
+ | Brown -> "brown"
+ | Black when props.altVariant = Blue -> "black & blue"
+ | Black -> "black"
+ | Green ->
+ match props.altVariant with
+ | Blue -> "green & blue"
+ | Orange -> "orange & blue"
+ | Yellow -> "yellow & blue" |]
+ )
diff --git a/Partas.Solid.Tests.Plugin/Tests.fs b/Partas.Solid.Tests.Plugin/Tests.fs
index 7ddf3db..0e28b82 100644
--- a/Partas.Solid.Tests.Plugin/Tests.fs
+++ b/Partas.Solid.Tests.Plugin/Tests.fs
@@ -94,7 +94,9 @@ let SolidCases =
"ChildLambdaProvider"
|> runSolidCase "ChildLambdaProvider interfaces"
"SolidComponentAsTagValues"
- |> runSolidCase "SolidComponent let bindings as TagValues" ]
+ |> runSolidCase "SolidComponent let bindings as TagValues"
+ "ValueUnrollerDecisionTree"
+ |> runSolidCase "Decision Trees in arrays do not spawn singleton instructions" ]
[]
let AttributeCases =
diff --git a/Partas.Solid/HtmlAttributes.fs b/Partas.Solid/HtmlAttributes.fs
index ea60c46..35e95c8 100644
--- a/Partas.Solid/HtmlAttributes.fs
+++ b/Partas.Solid/HtmlAttributes.fs
@@ -11,7 +11,9 @@ open Partas.Solid.Experimental.U
module HtmlAttributes =
type HtmlContainer with
[]
- member _.children: HtmlElement = jsNative
+ member _.children
+ with set (value: HtmlElement) = JS.undefined
+ and get (): HtmlElement = JS.undefined
type HTMLAttributes with
[]
@@ -475,62 +477,74 @@ module HtmlAttributes =
with set (value: WheelEvent -> unit) = ()
and [] get (): WheelEvent -> unit = unbox ()
- []
+ // []
+ []
member _.class'
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.accessKey
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.contenteditable
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.contextmenu
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.dir
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.draggable
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.hidden
with set (_: U2) = ()
and [] get (): U2 = unbox ()
- []
+ // []
+ []
member _.id
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.is
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.inert
with set (_: bool) = ()
and [] get (): bool = unbox ()
- []
+ // []
+ []
member _.lang
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.spellcheck
with set (_: bool) = ()
and [] get (): bool = unbox ()
@@ -540,228 +554,273 @@ module HtmlAttributes =
with set (_: obj) = ()
and get (): obj = unbox ()
- []
+ // []
+ []
member this.style
with inline set (value: string) = this.style'' <- value
and inline [] get (): string = !!this.style''
- []
+ // []
+ []
member _.tabindex
with set (_: int) = ()
and [] get (): int = unbox ()
- []
+ // []
+ []
member _.title
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.translate
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.about
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.datatype
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.inlist
with set (_: obj) = ()
and [] get () = unbox ()
- []
+ // []
+ []
member _.popover
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.prefix
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.property
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.resource
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.typeof
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.vocab
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.autocapitalize
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.slot
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.color
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.itemprop
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.itemscope
with set (_: bool) = ()
and [] get (): bool = unbox ()
- []
+ // []
+ []
member _.itemtype
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.itemid
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.itemref
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.part
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.exportparts
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.inputmode
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.contentEditable
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.contextMenu
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.tabIndex
with set (_: int) = ()
and [] get (): int = unbox ()
- []
+ // []
+ []
member _.autoCapitalize
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.itemProp
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.itemScope
with set (_: bool) = ()
and [] get (): bool = unbox ()
- []
+ // []
+ []
member _.itemType
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.itemId
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.itemRef
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.exportParts
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.inputMode
with set (_: string) = ()
and [] get (): string = unbox ()
type AnchorHTMLAttributes with
- []
+ // []
+ []
member _.download
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.href
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.hreflang
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.media
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.ping
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.referrerpolicy
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.rel
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.target
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.type'
with set (_: string) = ()
and [] get (): string = unbox ()
- []
+ // []
+ []
member _.referrerPolicy
with set (_: string) = ()
and [] get (): string = unbox ()
@@ -770,67 +829,67 @@ module HtmlAttributes =
type AreaHTMLAttributes with
[]
- []
+ // []
member _.alt
with set (_: string) = ()
and [] get (): string = unbox ()
[