├── .config
└── dotnet-tools.json
├── .github
└── workflows
│ ├── build-and-test.yml
│ └── publish.yml
├── .gitignore
├── .paket
└── Paket.Restore.targets
├── Feliz.Bulma.ViewEngine
├── Bulma.fs
├── ElementBuilders.fs
├── Feliz.Bulma.ViewEngine.fsproj
├── LICENSE
├── Modifiers.fs
├── Operators.fs
├── PropertyBuilders.fs
└── paket.references
├── Feliz.ViewEngine.sln
├── LICENSE
├── LICENSE.Apache-2.0
├── LICENSE.MIT
├── README.md
├── examples
└── giraffe
│ ├── Program.fs
│ ├── README.md
│ ├── build.bat
│ ├── build.sh
│ └── giraffe.fsproj
├── nuget-packages
├── Feliz.Bulma.ViewEngine.0.26.0.nupkg
└── Feliz.ViewEngine.0.26.0.nupkg
├── paket.dependencies
├── paket.lock
├── src
├── Colors.fs
├── Feliz.ViewEngine.fsproj
├── Fonts.fs
├── Html.fs
├── Interop.fs
├── Properties.fs
├── React.fs
├── StyleTypes.fs
├── Styles.fs
├── TextDecorationLine.fs
├── TextDecorationStyle.fs
├── ViewEngine.fs
└── paket.references
└── test
├── Bulma.ViewEngineTest.fs
├── Program.fs
├── Tests.Feliz.ViewEngine.fsproj
├── ViewEngineTest.fs
└── paket.references
/.config/dotnet-tools.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 1,
3 | "isRoot": true,
4 | "tools": {
5 | "paket": {
6 | "version": "9.0.2",
7 | "commands": [
8 | "paket"
9 | ],
10 | "rollForward": false
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/.github/workflows/build-and-test.yml:
--------------------------------------------------------------------------------
1 | name: Build and Test
2 |
3 | on:
4 | push:
5 | branches: [ master ]
6 | pull_request:
7 | branches: [ master ]
8 |
9 | jobs:
10 | build:
11 |
12 | runs-on: ubuntu-latest
13 |
14 | steps:
15 | - uses: actions/checkout@v4
16 | - name: Setup .NET Core
17 | uses: actions/setup-dotnet@v4
18 | with:
19 | dotnet-version: 9.0.300
20 | - name: Restore tools
21 | run: dotnet tool restore
22 | - name: Install dependencies
23 | run: dotnet paket restore
24 | - name: Build
25 | run: dotnet build --configuration Release
26 | - name: Test
27 | run: dotnet test --verbosity normal
28 |
--------------------------------------------------------------------------------
/.github/workflows/publish.yml:
--------------------------------------------------------------------------------
1 | on:
2 | push:
3 | tags:
4 | - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
5 |
6 | name: Publish Release
7 | jobs:
8 | build:
9 | name: Create Release
10 | runs-on: ubuntu-latest
11 | timeout-minutes: 10
12 | steps:
13 | - name: Checkout code
14 | uses: actions/checkout@v4
15 |
16 | - name: Setup .NET Core
17 | uses: actions/setup-dotnet@v4
18 | with:
19 | dotnet-version: 9.0.300
20 |
21 | - name: Restore tools
22 | run: dotnet tool restore
23 | - name: Install dependencies
24 | run: dotnet paket restore
25 | - name: Build
26 | run: dotnet build --configuration Release
27 | - name: Pack
28 | run: dotnet pack -c Release -p:PackageVersion=${GITHUB_REF##*/v}
29 |
30 | - name: Push Feliz.ViewEngine Nuget
31 | run: dotnet nuget push src/bin/Release/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
32 | continue-on-error: false
33 | - name: Push Feliz.Bulma.ViewEngine Nuget
34 | run: dotnet nuget push Feliz.Bulma.ViewEngine/bin/Release/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
35 | continue-on-error: false
36 |
37 | - name: Create Release
38 | uses: actions/create-release@master
39 | env:
40 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41 | with:
42 | tag_name: ${{ github.ref }}
43 | release_name: Release ${{ github.ref }}
44 | draft: false
45 | prerelease: false
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | src/obj
2 | .ionide
3 | paket-files
4 | examples/giraffe/bin
5 | examples/giraffe/obj
6 | bin
7 | obj
8 | .vs
9 |
--------------------------------------------------------------------------------
/.paket/Paket.Restore.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
8 |
9 | $(MSBuildVersion)
10 | 15.0.0
11 | false
12 | true
13 |
14 | true
15 | $(MSBuildThisFileDirectory)
16 | $(MSBuildThisFileDirectory)..\
17 | $(PaketRootPath)paket-files\paket.restore.cached
18 | $(PaketRootPath)paket.lock
19 | classic
20 | proj
21 | assembly
22 | native
23 | /Library/Frameworks/Mono.framework/Commands/mono
24 | mono
25 |
26 |
27 | $(PaketRootPath)paket.bootstrapper.exe
28 | $(PaketToolsPath)paket.bootstrapper.exe
29 | $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\
30 |
31 | "$(PaketBootStrapperExePath)"
32 | $(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)"
33 |
34 |
35 |
36 |
37 | true
38 | true
39 |
40 |
41 | True
42 |
43 |
44 | False
45 |
46 | $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/'))
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | $(PaketRootPath)paket
56 | $(PaketToolsPath)paket
57 |
58 |
59 |
60 |
61 |
62 | $(PaketRootPath)paket.exe
63 | $(PaketToolsPath)paket.exe
64 |
65 |
66 |
67 |
68 |
69 | <_DotnetToolsJson Condition="Exists('$(PaketRootPath)/.config/dotnet-tools.json')">$([System.IO.File]::ReadAllText("$(PaketRootPath)/.config/dotnet-tools.json"))
70 | <_ConfigContainsPaket Condition=" '$(_DotnetToolsJson)' != ''">$(_DotnetToolsJson.Contains('"paket"'))
71 | <_ConfigContainsPaket Condition=" '$(_ConfigContainsPaket)' == ''">false
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 | <_PaketCommand>dotnet paket
83 |
84 |
85 |
86 |
87 |
88 | $(PaketToolsPath)paket
89 | $(PaketBootStrapperExeDir)paket
90 |
91 |
92 | paket
93 |
94 |
95 |
96 |
97 | <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))
98 | <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)"
99 | <_PaketCommand Condition=" '$(_PaketCommand)' == '' AND '$(OS)' != 'Windows_NT' AND '$(_PaketExeExtension)' == '.exe' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"
100 | <_PaketCommand Condition=" '$(_PaketCommand)' == '' ">"$(PaketExePath)"
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 | true
122 | $(NoWarn);NU1603;NU1604;NU1605;NU1608
123 | false
124 | true
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 | $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)'))
134 |
135 |
136 |
137 |
138 |
139 |
141 | $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[0].Replace(`"`, ``).Replace(` `, ``))
142 | $([System.Text.RegularExpressions.Regex]::Split(`%(Identity)`, `": "`)[1].Replace(`"`, ``).Replace(` `, ``))
143 |
144 |
145 |
146 |
147 | %(PaketRestoreCachedKeyValue.Value)
148 | %(PaketRestoreCachedKeyValue.Value)
149 |
150 |
151 |
152 |
153 | true
154 | false
155 | true
156 |
157 |
158 |
162 |
163 | true
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 | $(PaketIntermediateOutputPath)\$(MSBuildProjectFile).paket.references.cached
183 |
184 | $(MSBuildProjectFullPath).paket.references
185 |
186 | $(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references
187 |
188 | $(MSBuildProjectDirectory)\paket.references
189 |
190 | false
191 | true
192 | true
193 | references-file-or-cache-not-found
194 |
195 |
196 |
197 |
198 | $([System.IO.File]::ReadAllText('$(PaketReferencesCachedFilePath)'))
199 | $([System.IO.File]::ReadAllText('$(PaketOriginalReferencesFilePath)'))
200 | references-file
201 | false
202 |
203 |
204 |
205 |
206 | false
207 |
208 |
209 |
210 |
211 | true
212 | target-framework '$(TargetFramework)' or '$(TargetFrameworks)' files @(PaketResolvedFilePaths)
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 | false
224 | true
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 | $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length)
236 | $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])
237 | $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])
238 | $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[2])
239 | $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])
240 | $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])
241 | $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6])
242 | $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7])
243 | $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[8])
244 |
245 |
246 | %(PaketReferencesFileLinesInfo.PackageVersion)
247 | All
248 | runtime
249 | $(ExcludeAssets);contentFiles
250 | $(ExcludeAssets);build;buildMultitargeting;buildTransitive
251 | %(PaketReferencesFileLinesInfo.Aliases)
252 | true
253 | true
254 |
255 |
256 |
257 |
258 | %(PaketReferencesFileLinesInfo.PackageVersion)
259 |
260 |
261 |
262 |
263 | $(PaketIntermediateOutputPath)/$(MSBuildProjectFile).paket.clitools
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 | $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[0])
273 | $([System.String]::Copy('%(PaketCliToolFileLines.Identity)').Split(',')[1])
274 |
275 |
276 | %(PaketCliToolFileLinesInfo.PackageVersion)
277 |
278 |
279 |
280 |
284 |
285 |
286 |
287 |
288 |
289 | false
290 |
291 |
292 |
293 |
294 |
295 | <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/>
296 |
297 |
298 |
299 |
300 |
301 | $(MSBuildProjectDirectory)/$(MSBuildProjectFile)
302 | true
303 | false
304 | true
305 | false
306 | true
307 | false
308 | true
309 | false
310 | true
311 | false
312 | true
313 | $(PaketIntermediateOutputPath)\$(Configuration)
314 | $(PaketIntermediateOutputPath)
315 |
316 |
317 |
318 | <_NuspecFiles Include="$(AdjustedNuspecOutputPath)\*.$(PackageVersion.Split(`+`)[0]).nuspec"/>
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
378 |
379 |
428 |
429 |
474 |
475 |
519 |
520 |
563 |
564 |
565 |
566 |
--------------------------------------------------------------------------------
/Feliz.Bulma.ViewEngine/ElementBuilders.fs:
--------------------------------------------------------------------------------
1 | module Feliz.Bulma.ViewEngine.ElementBuilders
2 |
3 | open Feliz.ViewEngine
4 |
5 | module internal Helpers =
6 | let [] ClassName = "class"
7 |
8 | let inline getClasses (xs:IReactProperty list) =
9 | xs
10 | |> List.choose (function | KeyValue (k, v) -> Some (k, v) | _ -> None)
11 | |> List.filter (fun (k,_) ->
12 | k = ClassName)
13 | |> List.map (snd >> string)
14 |
15 | let inline partitionClasses (xs:IReactProperty list) =
16 | xs
17 | |> List.partition (function | KeyValue (k, v) -> k = ClassName | _ -> false)
18 |
19 | let inline combineClasses cn (xs:IReactProperty list) =
20 | xs
21 | |> getClasses
22 | |> List.append [cn]
23 | |> prop.classes
24 |
25 | module Div =
26 | let inline props (cn:string) (xs:IReactProperty list) = Html.div [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
27 | let inline children (cn:string) (children:seq) = Html.div [ prop.className cn; prop.children children ]
28 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
29 | let inline valueStr (cn:string) (value:string) = Html.div [ prop.className cn; prop.text value ]
30 | let inline valueInt (cn:string) (value:int) = Html.div [ prop.className cn; prop.text value ]
31 |
32 | module Nav =
33 | let inline props (cn:string) (xs:IReactProperty list) = Html.nav [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
34 | let inline children (cn:string) (children:seq) = Html.nav [ prop.className cn; prop.children children ]
35 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
36 |
37 | module Article =
38 | let inline props (cn:string) (xs:IReactProperty list) = Html.article [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
39 | let inline children (cn:string) (children:seq) = Html.article [ prop.className cn; prop.children children ]
40 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
41 |
42 | module Section =
43 | let inline props (cn:string) (xs:IReactProperty list) = Html.section [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
44 | let inline children (cn:string) (children:seq) = Html.section [ prop.className cn; prop.children children ]
45 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
46 |
47 | module Footer =
48 | let inline props (cn:string) (xs:IReactProperty list) = Html.footer [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
49 | let inline children (cn:string) (children:seq) = Html.footer [ prop.className cn; prop.children children ]
50 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
51 |
52 | module Label =
53 | let inline props (cn:string) (xs:IReactProperty list) = Html.label [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
54 | let inline children (cn:string) (children:seq) = Html.label [ prop.className cn; prop.children children ]
55 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
56 | let inline valueStr (cn:string) (value:string) = Html.label [ prop.className cn; prop.text value ]
57 | let inline valueInt (cn:string) (value:int) = Html.label [ prop.className cn; prop.text value ]
58 |
59 | module Input =
60 | let inline propsWithType (cn:string) (typ: IReactProperty) (xs:IReactProperty list) =
61 | Html.input [ typ; Helpers.combineClasses cn xs ]
62 |
63 | module Textarea =
64 | let inline props (cn:string) (xs:IReactProperty list) = Html.textarea [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
65 | let inline children (cn:string) (children:seq) = Html.textarea [ prop.className cn; prop.children children ]
66 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
67 |
68 | module Button =
69 | let inline props (cn:string) (xs:IReactProperty list) = Html.button [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
70 | let inline children (cn:string) (children:seq) = Html.button [ prop.className cn; prop.children children ]
71 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
72 | let inline valueStr (cn:string) (value:string) = Html.button [ prop.className cn; prop.text value ]
73 | let inline valueInt (cn:string) (value:int) = Html.button [ prop.className cn; prop.text value ]
74 |
75 | module Span =
76 | let inline props (cn:string) (xs:IReactProperty list) = Html.span [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
77 | let inline children (cn:string) (children:seq) = Html.span [ prop.className cn; prop.children children ]
78 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
79 | let inline valueStr (cn:string) (value:string) = Html.span [ prop.className cn; prop.text value ]
80 | let inline valueInt (cn:string) (value:int) = Html.span [ prop.className cn; prop.text value ]
81 |
82 | module Figure =
83 | let inline props (cn:string) (xs:IReactProperty list) = Html.figure [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
84 | let inline children (cn:string) (children:seq) = Html.figure [ prop.className cn; prop.children children ]
85 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
86 |
87 | module Progress =
88 | let inline props (cn:string) (xs:IReactProperty list) = Html.progress [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
89 | let inline children (cn:string) (children:seq) = Html.progress [ prop.className cn; prop.children children ]
90 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
91 | let inline valueStr (cn:string) (value:string) = Html.progress [ prop.className cn; prop.text value ]
92 | let inline valueInt (cn:string) (value:int) = Html.progress [ prop.className cn; prop.text value ]
93 |
94 | module Table =
95 | let inline props (cn:string) (xs:IReactProperty list) = Html.table [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
96 | let inline children (cn:string) (children:seq) = Html.table [ prop.className cn; prop.children children ]
97 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
98 |
99 | module H1 =
100 | let inline props (cn:string) (xs:IReactProperty list) = Html.h1 [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
101 | let inline children (cn:string) (children:seq) = Html.h1 [ prop.className cn; prop.children children ]
102 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
103 | let inline valueStr (cn:string) (value:string) = Html.h1 [ prop.className cn; prop.text value ]
104 | let inline valueInt (cn:string) (value:int) = Html.h1 [ prop.className cn; prop.text value ]
105 |
106 | module H2 =
107 | let inline props (cn:string) (xs:IReactProperty list) = Html.h2 [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
108 | let inline children (cn:string) (children:seq) = Html.h2 [ prop.className cn; prop.children children ]
109 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
110 | let inline valueStr (cn:string) (value:string) = Html.h2 [ prop.className cn; prop.text value ]
111 | let inline valueInt (cn:string) (value:int) = Html.h2 [ prop.className cn; prop.text value ]
112 |
113 | module H3 =
114 | let inline props (cn:string) (xs:IReactProperty list) = Html.h3 [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
115 | let inline children (cn:string) (children:seq) = Html.h3 [ prop.className cn; prop.children children ]
116 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
117 | let inline valueStr (cn:string) (value:string) = Html.h3 [ prop.className cn; prop.text value ]
118 | let inline valueInt (cn:string) (value:int) = Html.h3 [ prop.className cn; prop.text value ]
119 |
120 | module H4 =
121 | let inline props (cn:string) (xs:IReactProperty list) = Html.h4 [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
122 | let inline children (cn:string) (children:seq) = Html.h4 [ prop.className cn; prop.children children ]
123 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
124 | let inline valueStr (cn:string) (value:string) = Html.h4 [ prop.className cn; prop.text value ]
125 | let inline valueInt (cn:string) (value:int) = Html.h4 [ prop.className cn; prop.text value ]
126 |
127 | module H5 =
128 | let inline props (cn:string) (xs:IReactProperty list) = Html.h5 [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
129 | let inline children (cn:string) (children:seq) = Html.h5 [ prop.className cn; prop.children children ]
130 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
131 | let inline valueStr (cn:string) (value:string) = Html.h5 [ prop.className cn; prop.text value ]
132 | let inline valueInt (cn:string) (value:int) = Html.h5 [ prop.className cn; prop.text value ]
133 |
134 | module H6 =
135 | let inline props (cn:string) (xs:IReactProperty list) = Html.h6 [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
136 | let inline children (cn:string) (children:seq) = Html.h6 [ prop.className cn; prop.children children ]
137 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
138 | let inline valueStr (cn:string) (value:string) = Html.h6 [ prop.className cn; prop.text value ]
139 | let inline valueInt (cn:string) (value:int) = Html.h6 [ prop.className cn; prop.text value ]
140 |
141 | module Hr =
142 | let inline props (cn:string) (xs:IReactProperty list) = Html.hr [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
143 |
144 | module Aside =
145 | let inline props (cn:string) (xs:IReactProperty list) = Html.aside [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
146 | let inline children (cn:string) (children:seq) = Html.aside [ prop.className cn; prop.children children ]
147 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
148 |
149 | module P =
150 | let inline props (cn:string) (xs:IReactProperty list) = Html.p [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
151 | let inline children (cn:string) (children:seq) = Html.p [ prop.className cn; prop.children children ]
152 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
153 | let inline valueStr (cn:string) (value:string) = Html.p [ prop.className cn; prop.text value ]
154 | let inline valueInt (cn:string) (value:int) = Html.p [ prop.className cn; prop.text value ]
155 |
156 | module Ul =
157 | let inline props (cn:string) (xs:IReactProperty list) = Html.ul [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
158 | let inline children (cn:string) (children:seq) = Html.ul [ prop.className cn; prop.children children ]
159 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
160 |
161 | module Li =
162 | let inline props (cn:string) (xs:IReactProperty list) = Html.li [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
163 | let inline children (cn:string) (children:seq) = Html.li [ prop.className cn; prop.children children ]
164 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
165 |
166 | module Header =
167 | let inline props (cn:string) (xs:IReactProperty list) = Html.header [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
168 | let inline children (cn:string) (children:seq) = Html.header [ prop.className cn; prop.children children ]
169 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
170 |
171 | module A =
172 | let inline props (cn:string) (xs:IReactProperty list) = Html.a [ yield! Helpers.partitionClasses xs ||> (fun c p -> Helpers.combineClasses cn c :: p) ]
173 | let inline children (cn:string) (children:seq) = Html.a [ prop.className cn; prop.children children ]
174 | let inline valueElm (cn:string) (value:ReactElement) = value |> List.singleton |> children cn
175 | let inline valueStr (cn:string) (value:string) = Html.a [ prop.className cn; prop.text value ]
176 | let inline valueInt (cn:string) (value:int) = Html.a [ prop.className cn; prop.text value ]
177 |
--------------------------------------------------------------------------------
/Feliz.Bulma.ViewEngine/Feliz.Bulma.ViewEngine.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | Feliz.Bulma.ViewEngine
6 | Dag Brattli
7 | Brattli Labs
8 | Roman Provazník
9 | LICENSE
10 | https://github.com/dbrattli/Feliz.ViewEngine
11 | true
12 | true
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Feliz.Bulma.ViewEngine/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Roman Provazník
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 |
--------------------------------------------------------------------------------
/Feliz.Bulma.ViewEngine/Operators.fs:
--------------------------------------------------------------------------------
1 | module Feliz.Bulma.ViewEngine.Operators
2 |
3 | open Feliz.ViewEngine
4 |
5 | let (++) (prop1: IReactProperty) (prop2: IReactProperty) =
6 | ElementBuilders.Helpers.getClasses [prop1; prop2]
7 | |> prop.classes
--------------------------------------------------------------------------------
/Feliz.Bulma.ViewEngine/PropertyBuilders.fs:
--------------------------------------------------------------------------------
1 | module internal Feliz.Bulma.ViewEngine.PropertyBuilders
2 |
3 | open Feliz.ViewEngine
4 |
5 | let inline mkClass (value:string) = Interop.mkAttr "class" value
6 | let inline mkType (value:string) = Interop.mkAttr "type" value
7 | let inline mkValue (value:int) = Interop.mkAttr "value" value
8 | let inline mkMax (value:int) = Interop.mkAttr "max" value
--------------------------------------------------------------------------------
/Feliz.Bulma.ViewEngine/paket.references:
--------------------------------------------------------------------------------
1 | group Bulma
2 |
3 | FSharp.Core
4 | Feliz.ViewEngine
5 |
--------------------------------------------------------------------------------
/Feliz.ViewEngine.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26124.0
5 | MinimumVisualStudioVersion = 15.0.26124.0
6 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Feliz.ViewEngine", "src\Feliz.ViewEngine.fsproj", "{B9BCF160-840B-449C-B6D8-07909A4161EB}"
7 | EndProject
8 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Tests-Feliz.ViewEngine", "test\Tests.Feliz.ViewEngine.fsproj", "{477BDCE1-C00F-4A37-B52C-C2BC9AF05D57}"
9 | EndProject
10 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Feliz.Bulma.ViewEngine", "Feliz.Bulma.ViewEngine\Feliz.Bulma.ViewEngine.fsproj", "{69A365F4-9078-4421-8ABA-0D6E5B6A030E}"
11 | EndProject
12 | Global
13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 | Debug|Any CPU = Debug|Any CPU
15 | Debug|x64 = Debug|x64
16 | Debug|x86 = Debug|x86
17 | Release|Any CPU = Release|Any CPU
18 | Release|x64 = Release|x64
19 | Release|x86 = Release|x86
20 | EndGlobalSection
21 | GlobalSection(SolutionProperties) = preSolution
22 | HideSolutionNode = FALSE
23 | EndGlobalSection
24 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
25 | {B9BCF160-840B-449C-B6D8-07909A4161EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
26 | {B9BCF160-840B-449C-B6D8-07909A4161EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
27 | {B9BCF160-840B-449C-B6D8-07909A4161EB}.Debug|x64.ActiveCfg = Debug|Any CPU
28 | {B9BCF160-840B-449C-B6D8-07909A4161EB}.Debug|x64.Build.0 = Debug|Any CPU
29 | {B9BCF160-840B-449C-B6D8-07909A4161EB}.Debug|x86.ActiveCfg = Debug|Any CPU
30 | {B9BCF160-840B-449C-B6D8-07909A4161EB}.Debug|x86.Build.0 = Debug|Any CPU
31 | {B9BCF160-840B-449C-B6D8-07909A4161EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
32 | {B9BCF160-840B-449C-B6D8-07909A4161EB}.Release|Any CPU.Build.0 = Release|Any CPU
33 | {B9BCF160-840B-449C-B6D8-07909A4161EB}.Release|x64.ActiveCfg = Release|Any CPU
34 | {B9BCF160-840B-449C-B6D8-07909A4161EB}.Release|x64.Build.0 = Release|Any CPU
35 | {B9BCF160-840B-449C-B6D8-07909A4161EB}.Release|x86.ActiveCfg = Release|Any CPU
36 | {B9BCF160-840B-449C-B6D8-07909A4161EB}.Release|x86.Build.0 = Release|Any CPU
37 | {477BDCE1-C00F-4A37-B52C-C2BC9AF05D57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38 | {477BDCE1-C00F-4A37-B52C-C2BC9AF05D57}.Debug|Any CPU.Build.0 = Debug|Any CPU
39 | {477BDCE1-C00F-4A37-B52C-C2BC9AF05D57}.Debug|x64.ActiveCfg = Debug|Any CPU
40 | {477BDCE1-C00F-4A37-B52C-C2BC9AF05D57}.Debug|x64.Build.0 = Debug|Any CPU
41 | {477BDCE1-C00F-4A37-B52C-C2BC9AF05D57}.Debug|x86.ActiveCfg = Debug|Any CPU
42 | {477BDCE1-C00F-4A37-B52C-C2BC9AF05D57}.Debug|x86.Build.0 = Debug|Any CPU
43 | {477BDCE1-C00F-4A37-B52C-C2BC9AF05D57}.Release|Any CPU.ActiveCfg = Release|Any CPU
44 | {477BDCE1-C00F-4A37-B52C-C2BC9AF05D57}.Release|Any CPU.Build.0 = Release|Any CPU
45 | {477BDCE1-C00F-4A37-B52C-C2BC9AF05D57}.Release|x64.ActiveCfg = Release|Any CPU
46 | {477BDCE1-C00F-4A37-B52C-C2BC9AF05D57}.Release|x64.Build.0 = Release|Any CPU
47 | {477BDCE1-C00F-4A37-B52C-C2BC9AF05D57}.Release|x86.ActiveCfg = Release|Any CPU
48 | {477BDCE1-C00F-4A37-B52C-C2BC9AF05D57}.Release|x86.Build.0 = Release|Any CPU
49 | {69A365F4-9078-4421-8ABA-0D6E5B6A030E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50 | {69A365F4-9078-4421-8ABA-0D6E5B6A030E}.Debug|Any CPU.Build.0 = Debug|Any CPU
51 | {69A365F4-9078-4421-8ABA-0D6E5B6A030E}.Debug|x64.ActiveCfg = Debug|Any CPU
52 | {69A365F4-9078-4421-8ABA-0D6E5B6A030E}.Debug|x64.Build.0 = Debug|Any CPU
53 | {69A365F4-9078-4421-8ABA-0D6E5B6A030E}.Debug|x86.ActiveCfg = Debug|Any CPU
54 | {69A365F4-9078-4421-8ABA-0D6E5B6A030E}.Debug|x86.Build.0 = Debug|Any CPU
55 | {69A365F4-9078-4421-8ABA-0D6E5B6A030E}.Release|Any CPU.ActiveCfg = Release|Any CPU
56 | {69A365F4-9078-4421-8ABA-0D6E5B6A030E}.Release|Any CPU.Build.0 = Release|Any CPU
57 | {69A365F4-9078-4421-8ABA-0D6E5B6A030E}.Release|x64.ActiveCfg = Release|Any CPU
58 | {69A365F4-9078-4421-8ABA-0D6E5B6A030E}.Release|x64.Build.0 = Release|Any CPU
59 | {69A365F4-9078-4421-8ABA-0D6E5B6A030E}.Release|x86.ActiveCfg = Release|Any CPU
60 | {69A365F4-9078-4421-8ABA-0D6E5B6A030E}.Release|x86.Build.0 = Release|Any CPU
61 | EndGlobalSection
62 | EndGlobal
63 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache-2.0 OR MIT
2 |
3 | See LICENSE.Apache-2.0 or LICENSE.MIT for details.
--------------------------------------------------------------------------------
/LICENSE.Apache-2.0:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/LICENSE.MIT:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Dag Brattli, Zaid Ajaj
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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Feliz.ViewEngine
2 |
3 | 
4 | [](https://www.nuget.org/packages/Feliz.ViewEngine)
5 |
6 | Feliz.ViewEngine lets you render [Feliz](https://github.com/Zaid-Ajaj/Feliz) DSL to plain HTML (or XML). Use with e.g
7 | Giraffe for handling Server Side Rendering (SSR), returning HTML or XML. You can use it for e.g generating HTML emails
8 | or any other use-case where you need to generate HTML output.
9 |
10 | Feliz.ViewEngine have no dependencies, is Fable compatible, and can thus be used with both servers (e.g Node.js) or
11 | clients.
12 |
13 | ## Installation
14 |
15 | Feliz.ViewEngine is available as a [NuGet package](https://www.nuget.org/packages/Feliz.ViewEngine/). To install:
16 |
17 | Using Package Manager:
18 |
19 | ```powershell
20 | Install-Package Feliz.ViewEngine
21 | ```
22 |
23 | Using .NET CLI:
24 |
25 | ```bash
26 | dotnet add package Feliz.ViewEngine
27 | ```
28 |
29 | ## Getting started
30 |
31 | ```fs
32 | open Feliz.ViewEngine
33 |
34 | let html =
35 | Html.h1 [
36 | prop.style [ style.fontSize(100); style.color("#137373") ]
37 | prop.text "Hello, world!"
38 | ]
39 | |> Render.htmlView
40 |
41 | printfn "Output: %s" html
42 | // Will output "Hello, world!
"
43 | ```
44 |
45 | Giraffe example at
46 |
47 | ## Sharing views between client and server
48 |
49 | Feliz.ViewEngine re-implements Feliz DSL for server-side so you will need to choose Feliz for client side rendering and
50 | Feliz.ViewEngine for server side rendering:
51 |
52 | ```fs
53 | #if FABLE_COMPILER
54 | open Feliz
55 | #else
56 | open Feliz.ViewEngine
57 | #endif
58 |
59 | let view = ...
60 | ```
61 |
62 | ## Documentation
63 |
64 | The following API is available for converting a `ReactElement` view into a string that you can return from e.g a Giraffe
65 | HTTP handler.
66 |
67 | ```fs
68 | type Render
69 | /// Create HTML document view with
70 | static member htmlDocument: document: ReactElement -> string
71 | /// Create HTML view
72 | static member htmlView: node: ReactElement -> string (+ 1 overloads)
73 | /// Create XML document view with
74 | static member xmlDocument: document: ReactElement -> string
75 | /// Create XML view
76 | static member xmlView: node: ReactElement -> string (+ 1 overloads)
77 | ```
78 |
79 | Feliz has extensive documentation at with live examples along side code samples, check
80 | them out and if you have any question, let us know!
81 |
82 | ## Extensions
83 |
84 | - [Feliz.Bulma.ViewEngine](https://www.nuget.org/packages/Feliz.Bulma.ViewEngine/) - Port of
85 | [Feliz.Bulma](https://github.com/Dzoukr/Feliz.Bulma) to Feliz.ViewEngine.
86 |
87 | ## Common Pitfalls
88 |
89 | Feliz.ViewEngine (`ReactElement`) is not compatible with GiraffeViewEngine (`XmlNode`) so you cannot mix the two as you
90 | can with Feliz and Fable.React. Thus when you convert your existing server side rendering code, then all the elements
91 | must be converted to Feliz.
92 |
93 | ## Projects and Examples
94 |
95 | Projects and examples using Feliz.ViewEngine:
96 |
97 | - [Felizia](https://github.com/dbrattli/Felizia) - Uses Feliz.ViewEngine server-side for SSR and Feliz client-side
98 | - [Giraffe server](https://github.com/dbrattli/Feliz.ViewEngine/tree/master/examples/giraffe) - simple example
99 |
100 | ## Porting an Existing Feliz Library to Feliz.ViewEngine
101 |
102 | To port an existing `Feliz` library to `Feliz.ViewEngine` you basically need to reimplement everything from the library
103 | you want to port. However this is usually not a lot of work since you can reuse most of the files from the existing
104 | library, and you can do the work incrementally and add support for more elements and properties as needed.
105 |
106 | Start with the file that generates the HTML elements, comment out the whole file using `(* ... *)` and start enabling
107 | element by element. Then port properties, styles, colors, etc.
108 |
109 | The `Feliz.ViewEngine` types are different from `ReactElement`:
110 |
111 | ```fs
112 | type IReactProperty =
113 | | KeyValue of string * obj
114 | | Children of ReactElement list
115 | | Text of string
116 |
117 | and ReactElement =
118 | | Element of string * IReactProperty list
119 | | VoidElement of string * IReactProperty list
120 | | TextElement of string
121 | ```
122 |
123 | However you usually don't have to care about the difference since the `Interop` interface is very similar:
124 |
125 | ```fs
126 | module Interop =
127 | /// Output a string where the content has been HTML encoded.
128 | val mkText: content : 'a -> IReactProperty
129 | val mkChildren: props: #seq -> IReactProperty
130 | val reactElementWithChildren: name: string -> children: #seq -> ReactElement
131 | val reactElementWithChild: name: string -> child: 'a -> ReactElement
132 | val createElement: name: string -> props: IReactProperty list -> ReactElement
133 | val createVoidElement: name: string -> props: IReactProperty list -> ReactElement
134 | val createTextElement: content : string -> ReactElement
135 | val createRawTextElement: content : string -> ReactElement
136 | let mkAttr: key: string -> value: obj -> IReactProperty
137 | val mkStyle: key: string -> value: obj -> IStyleAttribute
138 | ```
139 |
140 | Using the `Interop` module, many elements is exactly the same for `Feliz` and `Feliz.ViewEngine`. E.g `Feliz` code such
141 | as:
142 |
143 | ```fs
144 | module Html =
145 | static member inline div xs = Interop.createElement "div" xs
146 | ```
147 |
148 | For `Feliz.ViewEngine` it will be exactly the same:
149 |
150 | ```fs
151 | module Html =
152 | static member inline div xs = Interop.createElement "div" xs
153 | ```
154 |
155 | However other elements may require some work. E.g all elements that use unboxing such as:
156 |
157 | ```fs
158 | static member inline none : ReactElement = unbox null
159 | static member inline text (value: int) : ReactElement = unbox value
160 | ```
161 |
162 | For `Feliz.ViewEngine` this needs to be rewritten as:
163 |
164 | ```fs
165 | static member inline none : ReactElement = Interop.createTextElement ""
166 | static member inline text (value: int) : ReactElement = Interop.createTextElement (value.ToString ())
167 | ```
168 |
169 | Properties may also require some work, e.g:
170 |
171 | ```fs
172 | []
173 | type prop =
174 | static member inline dangerouslySetInnerHTML (content: string) = Interop.mkAttr "dangerouslySetInnerHTML" (createObj [ "__html" ==> content ])
175 |
176 | ```
177 |
178 | For `Feliz.ViewEngine` this needs to be rewritten as:
179 |
180 | ```fs
181 | type prop =
182 | static member inline dangerouslySetInnerHTML (content: string) = Interop.mkChildren [ Interop.createRawTextElement content ]
183 |
184 | ```
185 |
186 | As you go along, always remember that `Feliz.ViewEngine` and SSR is about generating HTML that will become text. You
187 | just need to make sure that the elements and properties you add generate the expected text output when rendered. Thus
188 | you can add unit-tests to check the output is as expected by calling `Render.htmlView`:
189 |
190 | ```fs
191 | []
192 | let ``h1 element with text and style property with css unit is Ok``() =
193 | // Arrange / Act
194 | let result =
195 | Html.h1 [
196 | prop.style [ style.fontSize(length.em(100)) ]
197 | prop.text "examples"
198 | ]
199 | |> Render.htmlView
200 |
201 | // Assert
202 | test <@ result = "examples
" @>
203 | ```
204 |
205 | ## License
206 |
207 | This work is dual-licensed under Apache 2.0 and MIT. You can choose between one of them if you use this work.
208 |
209 | `SPDX-License-Identifier: Apache-2.0 OR MIT`
210 |
211 | ## Duplication of Code
212 |
213 | Yes, Feliz.ViewEngine duplicates a lot of code and violates the [DRY
214 | principle](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself). This is currently [by
215 | design](https://www.sandimetz.com/blog/2016/1/20/the-wrong-abstraction).
216 |
--------------------------------------------------------------------------------
/examples/giraffe/Program.fs:
--------------------------------------------------------------------------------
1 | module examples.App
2 |
3 | open System
4 | open Giraffe
5 |
6 | open Microsoft.AspNetCore.Hosting
7 | open Microsoft.Extensions.DependencyInjection
8 | open Microsoft.AspNetCore.Builder
9 | open Microsoft.Extensions.Logging
10 | open Microsoft.AspNetCore
11 |
12 | open Feliz.ViewEngine
13 |
14 | // ---------------------------------
15 | // Models
16 | // ---------------------------------
17 |
18 | type Message = {
19 | Text : string
20 | }
21 |
22 | // ---------------------------------
23 | // Views
24 | // ---------------------------------
25 |
26 | module Views =
27 | let layout (content: ReactElement list) =
28 | Html.html [
29 | Html.head [
30 | Html.title "examples"
31 | Html.link [
32 | prop.rel "stylesheet"
33 | prop.type' "text/css"
34 | prop.href "/main.css"
35 | ]
36 | ]
37 | Html.body [
38 | prop.style [ style.fontFamily("Arial, Helvetica, sans-serif"); style.color("#333") ]
39 | prop.children content
40 | ]
41 | ]
42 |
43 | let partial () =
44 | Html.h1 [
45 | prop.style [ style.fontSize(100); style.color("#137373") ]
46 | prop.text "examples"
47 | ]
48 |
49 | let index (model : Message) =
50 | [
51 | partial ()
52 | Html.p [ Html.text model.Text ]
53 | ] |> layout
54 |
55 | // ---------------------------------
56 | // Web app
57 | // ---------------------------------
58 |
59 | let indexHandler (name : string) =
60 | let greetings = sprintf "Hello %s, from Giraffe!" name
61 | let model = { Text = greetings }
62 | let view = Views.index model
63 |
64 | htmlString (Render.htmlDocument view)
65 |
66 | let webApp : HttpHandler =
67 | choose [
68 | GET >=>
69 | choose [
70 | route "/" >=> indexHandler "world"
71 | routef "/hello/%s" indexHandler
72 | ]
73 | setStatusCode 404 >=> text "Not Found" ]
74 |
75 | type Startup() =
76 | member __.ConfigureServices (services : IServiceCollection) =
77 | // Register default Giraffe dependencies
78 | services.AddGiraffe() |> ignore
79 |
80 | member __.Configure (app: IApplicationBuilder) (env: IWebHostEnvironment) (loggerFactory: ILoggerFactory) =
81 | // Add Giraffe to the ASP.NET Core pipeline
82 | app.UseGiraffe webApp
83 |
84 | let port = 8080
85 | []
86 | let main _ =
87 | WebHost
88 | .CreateDefaultBuilder()
89 | .UseStartup()
90 | .UseUrls("http://0.0.0.0:" + port.ToString () + "/")
91 | .Build()
92 | .Run()
93 |
94 | 0
--------------------------------------------------------------------------------
/examples/giraffe/README.md:
--------------------------------------------------------------------------------
1 | # examples
2 |
3 | A [Giraffe](https://github.com/giraffe-fsharp/Giraffe) web application, which has been created via the `dotnet new giraffe` command.
4 |
5 | ## Build and test the application
6 |
7 | ### Windows
8 |
9 | Run the `build.bat` script in order to restore, build and test (if you've selected to include tests) the application:
10 |
11 | ```
12 | > ./build.bat
13 | ```
14 |
15 | ### Linux/macOS
16 |
17 | Run the `build.sh` script in order to restore, build and test (if you've selected to include tests) the application:
18 |
19 | ```
20 | $ ./build.sh
21 | ```
22 |
23 | ## Run the application
24 |
25 | After a successful build you can start the web application by executing the following command in your terminal:
26 |
27 | ```
28 | dotnet run src/examples
29 | ```
30 |
31 | After the application has started visit [http://localhost:5000](http://localhost:5000) in your preferred browser.
--------------------------------------------------------------------------------
/examples/giraffe/build.bat:
--------------------------------------------------------------------------------
1 | dotnet restore
2 | dotnet build
3 |
4 |
--------------------------------------------------------------------------------
/examples/giraffe/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | dotnet restore
3 | dotnet build
4 |
5 |
--------------------------------------------------------------------------------
/examples/giraffe/giraffe.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 | portable
6 | examples
7 | Exe
8 | false
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/nuget-packages/Feliz.Bulma.ViewEngine.0.26.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dbrattli/Feliz.ViewEngine/66fa36f775ac2356d53fa75c0ce66745a9cce293/nuget-packages/Feliz.Bulma.ViewEngine.0.26.0.nupkg
--------------------------------------------------------------------------------
/nuget-packages/Feliz.ViewEngine.0.26.0.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dbrattli/Feliz.ViewEngine/66fa36f775ac2356d53fa75c0ce66745a9cce293/nuget-packages/Feliz.ViewEngine.0.26.0.nupkg
--------------------------------------------------------------------------------
/paket.dependencies:
--------------------------------------------------------------------------------
1 | source https://www.nuget.org/api/v2
2 | storage: none
3 |
4 | group Main
5 | source https://www.nuget.org/api/v2
6 | storage: none
7 | framework: netstandard2.0
8 | nuget FSharp.Core ~> 4.7 lowest_matching: true
9 |
10 | group Test
11 | source https://www.nuget.org/api/v2
12 | storage: none
13 |
14 | nuget FSharp.Core ~> 4.7
15 | nuget coverlet.msbuild
16 | nuget Unquote ~> 4
17 | nuget xunit ~> 2
18 | nuget xunit.runner.visualstudio ~> 2
19 | nuget Microsoft.NET.Test.Sdk ~> 16
20 | nuget MSTest.TestAdapter ~> 1
21 | nuget MSTest.TestFramework ~> 1
22 |
23 | group Bulma
24 | source https://www.nuget.org/api/v2
25 | storage: none
26 | framework: netstandard2.0
27 |
28 | nuget FSharp.Core ~> 4.7 lowest_matching: true
29 | nuget Feliz.ViewEngine >= 0.15
30 |
--------------------------------------------------------------------------------
/src/Colors.fs:
--------------------------------------------------------------------------------
1 | namespace Feliz.ViewEngine
2 |
3 | //fsharplint:disable
4 |
5 | /// Contains a list of HTML5 colors from https://htmlcolorcodes.com/color-names/
6 | module color =
7 | /// Creates a color from components [hue](https://en.wikipedia.org/wiki/Hue), [saturation](https://en.wikipedia.org/wiki/Colorfulness) and [lightness](https://en.wikipedia.org/wiki/Lightness) where hue is a number that goes from 0 to 360 and both
8 | /// the `saturation` and `lightness` go from 0 to 100 as they are percentages.
9 | let hsl (hue: float, saturation: float, lightness: float) =
10 | "hsl(" + (string hue) + "," + (string saturation) + "%," + (string lightness) + "%)"
11 | let rgb (r: int, g: int, b: int) =
12 | "rgb(" + (string r) + "," + (string g) + "," + (string b) + ")"
13 | let rgba (r: int, g: int, b: int, a) =
14 | "rgba(" + (string r) + "," + (string g) + "," + (string b) + "," + (string a) + ")"
15 | let [] indianRed = "#CD5C5C"
16 | let [] lightCoral = "#F08080"
17 | let [] salmon = "#FA8072"
18 | let [] darkSalmon = "#E9967A"
19 | let [] lightSalmon = "#FFA07A"
20 | let [] crimson = "#DC143C"
21 | let [] red = "#FF0000"
22 | let [] fireBrick = "#B22222"
23 | let [] darkRed = "#8B0000"
24 | let [] pink = "#FFC0CB"
25 | let [] lightPink = "#FFB6C1"
26 | let [] hotPink = "#FF69B4"
27 | let [] deepPink = "#FF1493"
28 | let [] mediumVioletRed = "#C71585"
29 | let [] paleVioletRed = "#DB7093"
30 | let [] coral = "#FF7F50"
31 | let [] tomato = "#FF6347"
32 | let [] orangeRed = "#FF4500"
33 | let [] darkOrange = "#FF8C00"
34 | let [] orange = "#FFA500"
35 | let [] gold = "#FFD700"
36 | let [] yellow = "#FFFF00"
37 | let [] lightYellow = "#FFFFE0"
38 | let [] limonChiffon = "#FFFACD"
39 | let [] lightGoldenRodYellow = "#FAFAD2"
40 | let [] papayaWhip = "#FFEFD5"
41 | let [] moccasin = "#FFE4B5"
42 | let [] peachPuff = "#FFDAB9"
43 | let [] paleGoldenRod = "#EEE8AA"
44 | let [] khaki = "#F0E68C"
45 | let [] darkKhaki = "#BDB76B"
46 | let [] lavender = "#E6E6FA"
47 | let [] thistle = "#D8BFD8"
48 | let [] plum = "#DDA0DD"
49 | let [] violet = "#EE82EE"
50 | let [] orchid = "#DA70D6"
51 | let [] fuchsia = "#FF00FF"
52 | let [] magenta = "#FF00FF"
53 | let [] mediumOrchid = "#BA55D3"
54 | let [] mediumPurple = "#9370DB"
55 | let [] rebeccaPurple = "#663399"
56 | let [] blueViolet = "#8A2BE2"
57 | let [] darkViolet = "#9400D3"
58 | let [] darkOrchid = "#9932CC"
59 | let [] darkMagenta = "#8B008B"
60 | let [] purple = "#800080"
61 | let [] indigo = "#4B0082"
62 | let [] slateBlue = "#6A5ACD"
63 | let [] darkSlateBlue = "#483D8B"
64 | let [] mediumSlateBlue = "#7B68EE"
65 | let [] greenYellow = "#ADFF2F"
66 | let [] chartreuse = "#7FFF00"
67 | let [] lawnGreen = "#7CFC00"
68 | let [] lime = "#00FF00"
69 | let [] limeGreen = "#32CD32"
70 | let [] paleGreen = "#98FB98"
71 | let [] lightGreen = "#90EE90"
72 | let [] mediumSpringGreen = "#00FA9A"
73 | let [] springGreen = "#00FF7F"
74 | let [] mediumSeaGreen = "#3CB371"
75 | let [] seaGreen = "#2E8B57"
76 | let [] forestGreen = "#228B22"
77 | let [] green = "#008000"
78 | let [] darkGreen = "#006400"
79 | let [] yellowGreen = "#9ACD32"
80 | let [] oliveDrab = "#6B8E23"
81 | let [] olive = "#808000"
82 | let [] darkOliveGreen = "#556B2F"
83 | let [] mediumAquamarine = "#66CDAA"
84 | let [] darkSeaGreen = "#8FBC8B"
85 | let [] lightSeaGreen = "#20B2AA"
86 | let [] darkCyan = "#008B8B"
87 | let [] teal = "#008080"
88 | let [] aqua = "#00FFFF"
89 | let [] cyan = "#00FFFF"
90 | let [] lightCyan = "#E0FFFF"
91 | let [] paleTurqouise = "#AFEEEE"
92 | let [] aquaMarine = "#7FFFD4"
93 | let [] turqouise = "#AFEEEE"
94 | let [] mediumTurqouise = "#48D1CC"
95 | let [] darkTurqouise = "#00CED1"
96 | let [] cadetBlue = "#5F9EA0"
97 | let [] steelBlue = "#4682B4"
98 | let [] lightSteelBlue = "#B0C4DE"
99 | let [] powederBlue = "#B0E0E6"
100 | let [] lightBlue = "#ADD8E6"
101 | let [] skyBlue = "#87CEEB"
102 | let [] lightSkyBlue = "#87CEFA"
103 | let [] deepSkyBlue = "#00BFFF"
104 | let [] dodgerBlue = "#1E90FF"
105 | let [] cornFlowerBlue = "#6495ED"
106 | let [] royalBlue = "#4169E1"
107 | let [] blue = "#0000FF"
108 | let [] mediumBlue = "#0000CD"
109 | let [] darkBlue = "#00008B"
110 | let [] navy = "#000080"
111 | let [] midnightBlue = "#191970"
112 | let [] cornSilk = "#FFF8DC"
113 | let [] blanchedAlmond = "#FFEBCD"
114 | let [] bisque = "#FFE4C4"
115 | let [] navajoWhite = "#FFDEAD"
116 | let [] wheat = "#F5DEB3"
117 | let [] burlyWood = "#DEB887"
118 | let [] tan = "#D2B48C"
119 | let [] rosyBrown = "#BC8F8F"
120 | let [] sandyBrown = "#F4A460"
121 | let [] goldenRod = "#DAA520"
122 | let [] darkGoldenRod = "#B8860B"
123 | let [] peru = "#CD853F"
124 | let [] chocolate = "#D2691E"
125 | let [] saddleBrown = "#8B4513"
126 | let [] sienna = "#A0522D"
127 | let [] brown = "#A52A2A"
128 | let [] maroon = "#A52A2A"
129 | let [] white = "#FFFFFF"
130 | let [] snow = "#FFFAFA"
131 | let [] honeyDew = "#F0FFF0"
132 | let [] mintCream = "#F5FFFA"
133 | let [] azure = "#F0FFFF"
134 | let [] aliceBlue = "#F0F8FF"
135 | let [] ghostWhite = "#F8F8FF"
136 | let [] whiteSmoke = "#F5F5F5"
137 | let [] seaShell = "#FFF5EE"
138 | let [] beige = "#F5F5DC"
139 | let [] oldLace = "#FDF5E6"
140 | let [] floralWhite = "#FFFAF0"
141 | let [] ivory = "#FFFFF0"
142 | let [] antiqueWhite = "#FAEBD7"
143 | let [] linen = "#FAF0E6"
144 | let [] lavenderBlush = "#FFF0F5"
145 | let [] mistyRose = "#FFE4E1"
146 | let [] gainsBoro = "#DCDCDC"
147 | let [] lightGray = "#D3D3D3"
148 | let [] silver = "#C0C0C0"
149 | let [] darkGray = "#A9A9A9"
150 | let [] gray = "#808080"
151 | let [] dimGray = "#696969"
152 | let [] lightSlateGray = "#778899"
153 | let [] slateGray = "#708090"
154 | let [] darkSlateGray = "#2F4F4F"
155 | let [] black = "#000000"
156 | let [] transparent = "transparent"
157 |
--------------------------------------------------------------------------------
/src/Feliz.ViewEngine.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | Feliz.ViewEngine
6 | Dag Brattli
7 | Brattli Labs
8 | Brattli Labs
9 | LICENSE
10 | https://github.com/dbrattli/Feliz.ViewEngine
11 | true
12 | true
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/Fonts.fs:
--------------------------------------------------------------------------------
1 | namespace Feliz.ViewEngine
2 |
3 | //fsharplint:disable
4 |
5 | //
6 | // Note that the rest of the file is manually copied directly from Feliz.
7 | //
8 |
9 | /// Contains a list of CSS Fonts from https://www.tutorialbrain.com/css_tutorial/css_font_family_list/
10 | module font =
11 | let [] abadiMTCondensedLight = "Abadi MT Condensed Light"
12 | let [] aharoni = "Aharoni"
13 | let [] aharoniBold = "Aharoni Bold"
14 | let [] aldhabi = "Aldhabi"
15 | let [] alternateGothic2BT = "AlternateGothic2 BT"
16 | let [] andaleMono = "Andale Mono"
17 | let [] andalus = "Andalus"
18 | let [] angsanaNew = "Angsana New"
19 | let [] angsanaUPC = "AngsanaUPC"
20 | let [] aparajita = "Aparajita"
21 | let [] appleChancery = "Apple Chancery"
22 | let [] arabicTypesetting = "Arabic Typesetting"
23 | let [] arial = "Arial"
24 | let [] arialBlack = "Arial Black"
25 | let [] arialNarrow = "Arial narrow"
26 | let [] arialNova = "Arial Nova"
27 | let [] arialRoundedMTBold = "Arial Rounded MT Bold"
28 | let [] arnoldboecklin = "Arnoldboecklin"
29 | let [] avantaGarde = "Avanta Garde"
30 | let [] bahnschrift = "Bahnschrift"
31 | let [] bahnschriftLight = "Bahnschrift Light"
32 | let [] bahnschriftSemiBold = "Bahnschrift SemiBold"
33 | let [] bahnschriftSemiLight = "Bahnschrift SemiLight"
34 | let [] baskerville = "Baskerville"
35 | let [] batang = "Batang"
36 | let [] batangChe = "BatangChe"
37 | let [] bigCaslon = "Big Caslon"
38 | let [] bizUDGothic = "BIZ UDGothic"
39 | let [] bizUDMinchoMedium = "BIZ UDMincho Medium"
40 | let [] blippo = "Blippo"
41 | let [] bodoniMT = "Bodoni MT"
42 | let [] bookAntiqua = "Book Antiqua"
43 | let [] Bookman = "Bookman"
44 | let [] bradlyHand = "Bradley Hand"
45 | let [] browalliaNew = "Browallia New"
46 | let [] browalliaUPC = "BrowalliaUPC"
47 | let [] brushScriptMT = "Brush Script MT"
48 | let [] brushScriptStd = "Brush Script Std"
49 | let [] brushStroke = "Brushstroke"
50 | let [] calibri = "Calibri"
51 | let [] calibriLight = "Calibri Light"
52 | let [] calistoMT = "Calisto MT"
53 | let [] cambodian = "Cambodian"
54 | let [] cambria = "Cambria"
55 | let [] cambriaMath = "Cambria Math"
56 | let [] candara = "Candara"
57 | let [] centuryGothic = "Century Gothic"
58 | let [] chalkDuster = "Chalkduster"
59 | let [] cherokee = "Cherokee"
60 | let [] comicSans = "Comic Sans"
61 | let [] comicSansMS = "Comic Sans MS"
62 | let [] consolas = "Consolas"
63 | let [] constantia = "Constantia"
64 | let [] copperPlate = "Copperplate"
65 | let [] copperPlateGothicLight = "Copperplate Gothic Light"
66 | let [] copperPlateGothicBold = "Copperplate Gothic Bold"
67 | let [] corbel = "Corbel"
68 | let [] cordiaNew = "Cordia New"
69 | let [] cordiaUPC = "CordiaUPC"
70 | let [] coronetScript = "Coronet script"
71 | let [] courier = "Courier"
72 | let [] courierNew = "Courier New"
73 | let [] daunPenh = "DaunPenh"
74 | let [] david = "David"
75 | let [] dengXian = "DengXian"
76 | let [] dfKaiSB = "DFKai-SB"
77 | let [] didot = "Didot"
78 | let [] dilleniaUPC = "DilleniaUPC"
79 | let [] dokChampa = "DokChampa"
80 | let [] dotum = "Dotum"
81 | let [] dotumChe = "DotumChe"
82 | let [] ebrima = "Ebrima"
83 | let [] estrangeloEdessa = "Estrangelo Edessa"
84 | let [] eucrosiaUPC = "EucrosiaUPC"
85 | let [] euphemia = "Euphemia"
86 | let [] fangSong = "FangSong"
87 | let [] florence = "Florence"
88 | let [] franklinGothicMedium = "Franklin Gothic Medium"
89 | let [] frankRuehl = "FrankRuehl"
90 | let [