@f1studio/form-spec 5.0.0-alpha.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Designer.d.ts +89 -0
- package/FormSpec.TS/Components/HelloComponent.js +68 -0
- package/FormSpec.TS/Components/HelloComponent.js.map +1 -0
- package/FormSpec.TS/Components/HelloComponent.ts.map +1 -0
- package/FormSpec.TS/Designer.js +526 -0
- package/FormSpec.TS/Designer.js.map +1 -0
- package/FormSpec.TS/Designer.ts.map +1 -0
- package/FormSpec.TS/FormSpec.js +5400 -0
- package/FormSpec.TS/FormSpec.js.map +1 -0
- package/FormSpec.TS/FormSpec.ts.map +1 -0
- package/FormSpec.TS/FormSpecHelpers.js +382 -0
- package/FormSpec.TS/FormSpecHelpers.js.map +1 -0
- package/FormSpec.TS/FormSpecHelpers.ts.map +1 -0
- package/FormSpec.TS/Helpers.js +732 -0
- package/FormSpec.TS/Helpers.js.map +1 -0
- package/FormSpec.TS/Helpers.ts.map +1 -0
- package/FormSpec.TS/Interfaces.js +257 -0
- package/FormSpec.TS/Interfaces.js.map +1 -0
- package/FormSpec.TS/Interfaces.ts.map +1 -0
- package/FormSpec.TS/Interop/FormSpec.Api.Helpers.js +854 -0
- package/FormSpec.TS/Interop/FormSpec.Api.Helpers.js.map +1 -0
- package/FormSpec.TS/Interop/FormSpec.Api.Helpers.ts.map +1 -0
- package/FormSpec.TS/Interop/FormSpec.Api.Option.js +1961 -0
- package/FormSpec.TS/Interop/FormSpec.Api.Option.js.map +1 -0
- package/FormSpec.TS/Interop/FormSpec.Api.Option.ts.map +1 -0
- package/FormSpec.TS/Interop/FormSpec.Values.Api.Option.js +1367 -0
- package/FormSpec.TS/Interop/FormSpec.Values.Api.Option.js.map +1 -0
- package/FormSpec.TS/Interop/FormSpec.Values.Api.Option.ts.map +1 -0
- package/FormSpec.TS/Logging/LogTypes.js +347 -0
- package/FormSpec.TS/Logging/LogTypes.js.map +1 -0
- package/FormSpec.TS/Logging/LogTypes.ts.map +1 -0
- package/FormSpec.TS/Migrator.js +230 -0
- package/FormSpec.TS/Migrator.js.map +1 -0
- package/FormSpec.TS/Migrator.ts.map +1 -0
- package/FormSpec.TS/PathwayDataExtractor.js +361 -0
- package/FormSpec.TS/PathwayDataExtractor.js.map +1 -0
- package/FormSpec.TS/PathwayDataExtractor.ts.map +1 -0
- package/FormSpec.TS/PathwayExecutor.js +1321 -0
- package/FormSpec.TS/PathwayExecutor.js.map +1 -0
- package/FormSpec.TS/PathwayExecutor.ts.map +1 -0
- package/FormSpec.TS/PathwayValidator.js +346 -0
- package/FormSpec.TS/PathwayValidator.js.map +1 -0
- package/FormSpec.TS/PathwayValidator.ts.map +1 -0
- package/FormSpec.TS/PluginInterface.js +171 -0
- package/FormSpec.TS/PluginInterface.js.map +1 -0
- package/FormSpec.TS/PluginInterface.ts.map +1 -0
- package/FormSpec.TS/Prelude.js +59 -0
- package/FormSpec.TS/Prelude.js.map +1 -0
- package/FormSpec.TS/Prelude.ts.map +1 -0
- package/FormSpec.TS/Renderers/FormSpecMarkdownRenderer.js +958 -0
- package/FormSpec.TS/Renderers/FormSpecMarkdownRenderer.js.map +1 -0
- package/FormSpec.TS/Renderers/FormSpecMarkdownRenderer.ts.map +1 -0
- package/FormSpec.TS/Renderers/MermaidRenderer.js +228 -0
- package/FormSpec.TS/Renderers/MermaidRenderer.js.map +1 -0
- package/FormSpec.TS/Renderers/MermaidRenderer.ts.map +1 -0
- package/FormSpec.TS/Renderers/PathwayRenderers.js +190 -0
- package/FormSpec.TS/Renderers/PathwayRenderers.js.map +1 -0
- package/FormSpec.TS/Renderers/PathwayRenderers.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Base.fs +511 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Base.fs.js +437 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Base.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Base.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Error.fs +16 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Error.fs.js +73 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Error.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Error.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Extensions.fs +50 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Extensions.fs.js +72 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Extensions.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Extensions.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Fable.Form.fableproj +28 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Field.fs +24 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Field.fs.js +56 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Field.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.Form.3.0.0/Field.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.5.0.1/Fable.Form.Simple.fableproj +31 -0
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.5.0.1/Form.fs +178 -0
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.5.0.1/Form.fs.js +464 -0
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.5.0.1/Form.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.Form.Simple.5.0.1/Form.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Extensions.fs +17 -0
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Hooks.fs +152 -0
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Hooks.fs.js +25 -0
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Hooks.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Hooks.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.Types.fableproj +28 -0
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.fs +218 -0
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.fs.js +37 -0
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.Types.fableproj +27 -0
- package/FormSpec.TS/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.fs +82 -0
- package/FormSpec.TS/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.fs.js +7 -0
- package/FormSpec.TS/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/BorderStyle.fs +59 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Colors.fs +154 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Colors.fs.js +32 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Colors.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Colors.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Feliz.fableproj +42 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Fonts.fs +240 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/GridTypes.fs +24 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Html.fs +826 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Interop.fs +83 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Interop.fs.js +292 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Interop.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Interop.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Key.fs +65 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Key.fs.js +229 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Key.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Key.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Length.fs +91 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Locale.fs +876 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Properties.fs +4080 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Properties.fs.js +133 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Properties.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Properties.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/React.fs +656 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/React.fs.js +561 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/React.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/React.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactDOM.fs +25 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactDOM.fs.js +46 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactDOM.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactDOM.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactInterop.js +63 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactInterop.js.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactTypes.fs +41 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactTypes.fs.js +7 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactTypes.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/ReactTypes.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/StyleTypes.fs +53 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/StyleTypes.fs.js +7 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/StyleTypes.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/StyleTypes.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Styles.fs +5740 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Svg.fs +1455 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Svg.fs.js +39 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Svg.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Svg.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/TextDecorationLine.fs +13 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/TextDecorationStyle.fs +33 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Transform.fs +181 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/TransformOrigin.fs +17 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/TransitionProperty.fs +162 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Types.fs +13 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Types.fs.js +7 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Types.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Feliz.2.7.0/Types.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Decode.fs +1768 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Decode.fs.js +2337 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Decode.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Decode.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs +811 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.js +465 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Encode.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Extra.fs +47 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Extra.fs.js +18 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Extra.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Extra.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Thoth.Json.fableproj +34 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Types.fs +68 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Types.fs.js +355 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Types.fs.js.map +1 -0
- package/FormSpec.TS/fable_modules/Thoth.Json.10.4.1/Types.fs.ts.map +1 -0
- package/FormSpec.TS/fable_modules/project_cracked.json +1 -0
- package/FormSpec.d.ts +1257 -0
- package/FormSpecHelpers.d.ts +50 -0
- package/Helpers.d.ts +147 -0
- package/Interfaces.d.ts +70 -0
- package/Interop/FormSpec.Api.Helpers.d.ts +247 -0
- package/Interop/FormSpec.Api.Helpers.d.ts.map +1 -0
- package/Interop/FormSpec.Api.Option.d.ts +384 -0
- package/Interop/FormSpec.Api.Option.d.ts.map +1 -0
- package/Interop/FormSpec.Values.Api.Option.d.ts +324 -0
- package/Interop/FormSpec.Values.Api.Option.d.ts.map +1 -0
- package/Migrator.d.ts +59 -0
- package/PathwayDataExtractor.d.ts +19 -0
- package/PathwayExecutor.d.ts +210 -0
- package/PathwayValidator.d.ts +52 -0
- package/PluginInterface.d.ts +36 -0
- package/Prelude.d.ts +11 -0
- package/README.TS.md +622 -0
- package/README.md +85 -0
- package/package.json +39 -0
- package/src/Components/HelloComponent.ts +48 -0
- package/src/Components/HelloComponent.ts.map +1 -0
- package/src/Designer.ts +389 -0
- package/src/Designer.ts.map +1 -0
- package/src/FormSpec.ts +3114 -0
- package/src/FormSpec.ts.map +1 -0
- package/src/FormSpecHelpers.ts +374 -0
- package/src/FormSpecHelpers.ts.map +1 -0
- package/src/Helpers.ts +765 -0
- package/src/Helpers.ts.map +1 -0
- package/src/Interfaces.ts +166 -0
- package/src/Interfaces.ts.map +1 -0
- package/src/Interop/FormSpec.Api.Helpers.ts +872 -0
- package/src/Interop/FormSpec.Api.Helpers.ts.map +1 -0
- package/src/Interop/FormSpec.Api.Option.ts +1618 -0
- package/src/Interop/FormSpec.Api.Option.ts.map +1 -0
- package/src/Interop/FormSpec.Values.Api.Option.ts +1214 -0
- package/src/Interop/FormSpec.Values.Api.Option.ts.map +1 -0
- package/src/Logging/LogTypes.ts +212 -0
- package/src/Logging/LogTypes.ts.map +1 -0
- package/src/Migrator.ts +156 -0
- package/src/Migrator.ts.map +1 -0
- package/src/PathwayDataExtractor.ts +290 -0
- package/src/PathwayDataExtractor.ts.map +1 -0
- package/src/PathwayExecutor.ts +1102 -0
- package/src/PathwayExecutor.ts.map +1 -0
- package/src/PathwayValidator.ts +244 -0
- package/src/PathwayValidator.ts.map +1 -0
- package/src/PluginInterface.ts +79 -0
- package/src/PluginInterface.ts.map +1 -0
- package/src/Prelude.ts +21 -0
- package/src/Prelude.ts.map +1 -0
- package/src/Renderers/FormSpecMarkdownRenderer.ts +874 -0
- package/src/Renderers/FormSpecMarkdownRenderer.ts.map +1 -0
- package/src/Renderers/MermaidRenderer.ts +218 -0
- package/src/Renderers/MermaidRenderer.ts.map +1 -0
- package/src/Renderers/PathwayRenderers.ts +200 -0
- package/src/Renderers/PathwayRenderers.ts.map +1 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
|
3
|
+
<PropertyGroup>
|
|
4
|
+
<Version>18.3.0</Version>
|
|
5
|
+
<PackageVersion>18.3.0</PackageVersion>
|
|
6
|
+
<TargetFramework>netstandard2.0</TargetFramework>
|
|
7
|
+
<!-- <DefineConstants>$(DefineConstants);FABLE_COMPILER</DefineConstants> -->
|
|
8
|
+
<PackageTags>fsharp;fable;javascript;f#;js;react;fable-binding;fable-javascript</PackageTags>
|
|
9
|
+
</PropertyGroup>
|
|
10
|
+
<PropertyGroup>
|
|
11
|
+
<NpmDependencies>
|
|
12
|
+
<NpmPackage Name="react" Version="gte 18.0.0 lt 19.0.0" ResolutionStrategy="Max" />
|
|
13
|
+
</NpmDependencies>
|
|
14
|
+
</PropertyGroup>
|
|
15
|
+
<ItemGroup>
|
|
16
|
+
<Compile Include="Fable.React.fs" />
|
|
17
|
+
<Compile Include="Fable.React.Hooks.fs" />
|
|
18
|
+
<Compile Include="Fable.React.Extensions.fs" />
|
|
19
|
+
</ItemGroup>
|
|
20
|
+
<ItemGroup>
|
|
21
|
+
<PackageReference Include="Fable.Core" Version="3.2.7" />
|
|
22
|
+
<PackageReference Include="Fable.Browser.Dom" Version="2.4.4" />
|
|
23
|
+
<PackageReference Update="FSharp.Core" Version="4.7.2" />
|
|
24
|
+
</ItemGroup>
|
|
25
|
+
<ItemGroup>
|
|
26
|
+
<Content Include="*.fsproj; *.fs" PackagePath="fable\" />
|
|
27
|
+
</ItemGroup>
|
|
28
|
+
</Project>
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
namespace Fable.React
|
|
2
|
+
|
|
3
|
+
open System
|
|
4
|
+
open Fable.Core
|
|
5
|
+
|
|
6
|
+
type [<AllowNullLiteral>] ReactElement =
|
|
7
|
+
interface end
|
|
8
|
+
|
|
9
|
+
type ReactElementType =
|
|
10
|
+
interface end
|
|
11
|
+
|
|
12
|
+
type ReactElementType<'props> =
|
|
13
|
+
inherit ReactElementType
|
|
14
|
+
|
|
15
|
+
type IRefValue<'T> =
|
|
16
|
+
abstract current: 'T with get, set
|
|
17
|
+
|
|
18
|
+
type IContext<'T> =
|
|
19
|
+
interface end
|
|
20
|
+
|
|
21
|
+
type ISSRContext<'T> =
|
|
22
|
+
inherit IContext<'T>
|
|
23
|
+
abstract DefaultValue: 'T
|
|
24
|
+
|
|
25
|
+
type IReactExports =
|
|
26
|
+
/// Create and return a new React element of the given type. The type argument can be either a tag name string (such as 'div' or 'span'), a React component type (a class or a function), or a React fragment type.
|
|
27
|
+
abstract createElement: comp: obj * props: obj * [<ParamList>] children: ReactElement seq -> ReactElement
|
|
28
|
+
|
|
29
|
+
/// Creates a Context object. When React renders a component that subscribes to this Context object it will read the current context value from the closest matching Provider above it in the tree.
|
|
30
|
+
abstract createContext: defaultValue: 'T -> IContext<'T>
|
|
31
|
+
|
|
32
|
+
/// React.createRef creates a ref that can be attached to React elements via the ref attribute.
|
|
33
|
+
abstract createRef: initialValue: 'T -> IRefValue<'T>
|
|
34
|
+
|
|
35
|
+
/// React.forwardRef creates a React component that forwards the ref attribute it receives to another component below in the tree.
|
|
36
|
+
abstract forwardRef: fn: ('props -> IRefValue<'T> option -> ReactElement) -> ReactElementType<'props>
|
|
37
|
+
|
|
38
|
+
/// If your component renders the same result given the same props, you can wrap it in a call to React.memo for a performance boost in some cases by memoizing the result. This means that React will skip rendering the component, and reuse the last rendered result.
|
|
39
|
+
abstract memo: render: ('props -> ReactElement) * areEqual: ('props -> 'props -> bool) -> ReactElementType<'props>
|
|
40
|
+
|
|
41
|
+
/// The React.Fragment component lets you return multiple elements in a render() method without creating an additional DOM element.
|
|
42
|
+
abstract Fragment: ReactElementType<obj>
|
|
43
|
+
|
|
44
|
+
/// React.Suspense lets you specify the loading indicator in case some components in the tree below it are not yet ready to render. In the future we plan to let Suspense handle more scenarios such as data fetching.
|
|
45
|
+
abstract Suspense: ReactElementType<obj>
|
|
46
|
+
|
|
47
|
+
/// React.lazy() lets you define a component that is loaded dynamically. This helps reduce the bundle size to delay loading components that aren’t used during the initial render.
|
|
48
|
+
abstract ``lazy``: f: (unit -> JS.Promise<'TIn>) -> 'TOut
|
|
49
|
+
|
|
50
|
+
/// React.startTransition lets you mark updates inside the provided callback as transitions. This method is designed to be used when React.useTransition is not available.
|
|
51
|
+
/// Requires React 18.
|
|
52
|
+
abstract startTransition: callback: (unit -> unit) -> unit
|
|
53
|
+
|
|
54
|
+
/// The React version.
|
|
55
|
+
abstract version: string
|
|
56
|
+
|
|
57
|
+
module ReactBindings =
|
|
58
|
+
/// Mainly intended for internal use
|
|
59
|
+
#if FABLE_REPL_LIB
|
|
60
|
+
[<Global("React")>]
|
|
61
|
+
#else
|
|
62
|
+
[<Import("*", "react")>]
|
|
63
|
+
#endif
|
|
64
|
+
let React: IReactExports = jsNative
|
|
65
|
+
|
|
66
|
+
/// Create a React component by inheriting this class as follows
|
|
67
|
+
///
|
|
68
|
+
/// ```
|
|
69
|
+
/// type MyComponent(initialProps) =
|
|
70
|
+
/// inherit React.Component<MyProps, MyState>(initialProps)
|
|
71
|
+
/// base.setInitState({ value = 5 })
|
|
72
|
+
///
|
|
73
|
+
/// override this.render() =
|
|
74
|
+
/// // Don't use captured `initialProps` from constructor,
|
|
75
|
+
/// // use `this.props` instead (updated version)
|
|
76
|
+
/// let msg = sprintf "Hello %s, you have %i €"
|
|
77
|
+
/// this.props.name this.state.value
|
|
78
|
+
/// div [] [ofString msg]
|
|
79
|
+
/// ```
|
|
80
|
+
type [<AbstractClass; Import("Component", "react")>] Component<'P,'S>(initProps: 'P) =
|
|
81
|
+
[<Emit("$0.props")>]
|
|
82
|
+
member __.props: 'P = initProps
|
|
83
|
+
|
|
84
|
+
[<Emit("Array.prototype.concat($0.props.children || [])")>]
|
|
85
|
+
member val children: ReactElement array = [| |] with get, set
|
|
86
|
+
|
|
87
|
+
[<Emit("$0.state")>]
|
|
88
|
+
member val state: 'S = Unchecked.defaultof<'S> with get, set
|
|
89
|
+
|
|
90
|
+
/// ATTENTION: Within the constructor, use `setInitState`
|
|
91
|
+
/// Enqueues changes to the component state and tells React that this component and its children need to be re-rendered with the updated state. This is the primary method you use to update the user interface in response to event handlers and server responses.
|
|
92
|
+
/// Think of setState() as a request rather than an immediate command to update the component. For better perceived performance, React may delay it, and then update several components in a single pass. React does not guarantee that the state changes are applied immediately.
|
|
93
|
+
/// setState() does not always immediately update the component. It may batch or defer the update until later. This makes reading this.state right after calling setState() a potential pitfall. Instead, use componentDidUpdate or a setState callback (setState(updater, callback)), either of which are guaranteed to fire after the update has been applied. If you need to set the state based on the previous state, read about the updater argument below.
|
|
94
|
+
/// setState() will always lead to a re-render unless shouldComponentUpdate() returns false. If mutable objects are being used and conditional rendering logic cannot be implemented in shouldComponentUpdate(), calling setState() only when the new state differs from the previous state will avoid unnecessary re-renders.
|
|
95
|
+
[<Obsolete("This overload is unsafe because it forces use of this.state. Use this.setState(updater: 'S->'P->'S) instead.")>]
|
|
96
|
+
[<Emit("$0.setState($1)")>]
|
|
97
|
+
member x.setState(value: 'S): unit = x.state <- value
|
|
98
|
+
|
|
99
|
+
/// Overload of `setState` accepting updater function with the signature: `(prevState, props) => stateChange`
|
|
100
|
+
/// prevState is a reference to the previous state. It should not be directly mutated. Instead, changes should be represented by building a new object based on the input from prevState and props.
|
|
101
|
+
/// Both prevState and props received by the updater function are guaranteed to be up-to-date. The output of the updater is shallowly merged with prevState.
|
|
102
|
+
[<Emit("$0.setState($1)")>]
|
|
103
|
+
member x.setState(updater: 'S->'P->'S): unit = x.state <- updater x.state x.props
|
|
104
|
+
|
|
105
|
+
/// This method can only be called in the constructor
|
|
106
|
+
[<Emit("this.state = $1")>]
|
|
107
|
+
member x.setInitState(value: 'S): unit = x.state <- value
|
|
108
|
+
|
|
109
|
+
/// By default, when your component’s state or props change, your component will re-render. If your render() method depends on some other data, you can tell React that the component needs re-rendering by calling forceUpdate().
|
|
110
|
+
/// Calling forceUpdate() will cause render() to be called on the component, skipping shouldComponentUpdate(). This will trigger the normal lifecycle methods for child components, including the shouldComponentUpdate() method of each child. React will still only update the DOM if the markup changes.
|
|
111
|
+
/// Normally you should try to avoid all uses of forceUpdate() and only read from this.props and this.state in render().
|
|
112
|
+
[<Emit("$0.forceUpdate($1)")>]
|
|
113
|
+
member __.forceUpdate(?callBack: unit->unit): unit = ()
|
|
114
|
+
|
|
115
|
+
[<Emit("$0.isMounted()")>]
|
|
116
|
+
member __.isMounted(): bool = false
|
|
117
|
+
|
|
118
|
+
/// Invoked immediately before mounting occurs. It is called before render(), therefore calling setState() synchronously in this method will not trigger an extra rendering. Generally, we recommend using the constructor() instead.
|
|
119
|
+
/// Avoid introducing any side-effects or subscriptions in this method. For those use cases, use componentDidMount() instead.
|
|
120
|
+
/// This is the only lifecycle hook called on server rendering.
|
|
121
|
+
abstract componentWillMount: unit -> unit
|
|
122
|
+
default __.componentWillMount () = ()
|
|
123
|
+
|
|
124
|
+
/// Invoked immediately after a component is mounted. Initialization that requires DOM nodes should go here. If you need to load data from a remote endpoint, this is a good place to instantiate the network request.
|
|
125
|
+
/// This method is a good place to set up any subscriptions. If you do that, don’t forget to unsubscribe in componentWillUnmount().
|
|
126
|
+
/// Calling setState() in this method will trigger an extra rendering, but it is guaranteed to flush during the same tick. This guarantees that even though the render() will be called twice in this case, the user won’t see the intermediate state. Use this pattern with caution because it often causes performance issues. It can, however, be necessary for cases like modals and tooltips when you need to measure a DOM node before rendering something that depends on its size or position.
|
|
127
|
+
abstract componentDidMount: unit -> unit
|
|
128
|
+
default __.componentDidMount () = ()
|
|
129
|
+
|
|
130
|
+
/// Invoked before a mounted component receives new props. If you need to update the state in response to prop changes (for example, to reset it), you may compare this.props and nextProps and perform state transitions using this.setState() in this method.
|
|
131
|
+
/// Note that React may call this method even if the props have not changed, so make sure to compare the current and next values if you only want to handle changes. This may occur when the parent component causes your component to re-render.
|
|
132
|
+
/// React doesn’t call componentWillReceiveProps() with initial props during mounting. It only calls this method if some of component’s props may update. Calling this.setState() generally doesn’t trigger componentWillReceiveProps().
|
|
133
|
+
abstract componentWillReceiveProps: nextProps: 'P -> unit
|
|
134
|
+
default __.componentWillReceiveProps (_) = ()
|
|
135
|
+
|
|
136
|
+
/// Use shouldComponentUpdate() to let React know if a component’s output is not affected by the current change in state or props. The default behavior is to re-render on every state change, and in the vast majority of cases you should rely on the default behavior.
|
|
137
|
+
/// shouldComponentUpdate() is invoked before rendering when new props or state are being received. Defaults to true. This method is not called for the initial render or when forceUpdate() is used.
|
|
138
|
+
/// Returning false does not prevent child components from re-rendering when their state changes.
|
|
139
|
+
/// Currently, if shouldComponentUpdate() returns false, then componentWillUpdate(), render(), and componentDidUpdate() will not be invoked. Note that in the future React may treat shouldComponentUpdate() as a hint rather than a strict directive, and returning false may still result in a re-rendering of the component.
|
|
140
|
+
/// If you determine a specific component is slow after profiling, you may change it to inherit from React.PureComponent which implements shouldComponentUpdate() with a shallow prop and state comparison. If you are confident you want to write it by hand, you may compare this.props with nextProps and this.state with nextState and return false to tell React the update can be skipped.
|
|
141
|
+
/// We do not recommend doing deep equality checks or using JSON.stringify() in shouldComponentUpdate(). It is very inefficient and will harm performance.
|
|
142
|
+
abstract shouldComponentUpdate: nextProps: 'P * nextState: 'S -> bool
|
|
143
|
+
default __.shouldComponentUpdate (_, _) = true
|
|
144
|
+
|
|
145
|
+
/// Invoked immediately before rendering when new props or state are being received. Use this as an opportunity to perform preparation before an update occurs. This method is not called for the initial render.
|
|
146
|
+
/// Note that you cannot call this.setState() here; nor should you do anything else (e.g. dispatch a Redux action) that would trigger an update to a React component before componentWillUpdate() returns.
|
|
147
|
+
/// If you need to update state in response to props changes, use componentWillReceiveProps() instead.
|
|
148
|
+
/// > componentWillUpdate() will not be invoked if shouldComponentUpdate() returns false.
|
|
149
|
+
abstract componentWillUpdate: nextProps: 'P * nextState: 'S -> unit
|
|
150
|
+
default __.componentWillUpdate (_, _) = ()
|
|
151
|
+
|
|
152
|
+
/// Invoked immediately after updating occurs. This method is not called for the initial render.
|
|
153
|
+
/// Use this as an opportunity to operate on the DOM when the component has been updated. This is also a good place to do network requests as long as you compare the current props to previous props (e.g. a network request may not be necessary if the props have not changed).
|
|
154
|
+
/// > componentDidUpdate() will not be invoked if shouldComponentUpdate() returns false.
|
|
155
|
+
abstract componentDidUpdate: prevProps: 'P * prevState: 'S -> unit
|
|
156
|
+
default __.componentDidUpdate (_, _) = ()
|
|
157
|
+
|
|
158
|
+
/// Invoked immediately before a component is unmounted and destroyed. Perform any necessary cleanup in this method, such as invalidating timers, canceling network requests, or cleaning up any subscriptions that were created in componentDidMount().
|
|
159
|
+
abstract componentWillUnmount: unit -> unit
|
|
160
|
+
default __.componentWillUnmount () = ()
|
|
161
|
+
|
|
162
|
+
/// Error boundaries are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed. Error boundaries catch errors during rendering, in lifecycle methods, and in constructors of the whole tree below them.
|
|
163
|
+
/// A class component becomes an error boundary if it defines this lifecycle method. Calling setState() in it lets you capture an unhandled JavaScript error in the below tree and display a fallback UI. Only use error boundaries for recovering from unexpected exceptions; don’t try to use them for control flow.
|
|
164
|
+
/// For more details, see [Error Handling in React 16](https://reactjs.org/blog/2017/07/26/error-handling-in-react-16.html).
|
|
165
|
+
/// > Error boundaries only catch errors in the components below them in the tree. An error boundary can’t catch an error within itself.
|
|
166
|
+
abstract componentDidCatch: error: Exception * info: obj -> unit
|
|
167
|
+
default __.componentDidCatch (_, _) = ()
|
|
168
|
+
|
|
169
|
+
/// This function should be pure, meaning that it does not modify component state, it returns the same result each time it’s invoked, and it does not directly interact with the browser. If you need to interact with the browser, perform your work in componentDidMount() or the other lifecycle methods instead. Keeping render() pure makes components easier to think about.
|
|
170
|
+
/// > render() will not be invoked if shouldComponentUpdate() returns false.
|
|
171
|
+
abstract render: unit -> ReactElement
|
|
172
|
+
|
|
173
|
+
interface ReactElement
|
|
174
|
+
|
|
175
|
+
/// A react component that implements `shouldComponentUpdate()` with a shallow prop and state comparison.
|
|
176
|
+
///
|
|
177
|
+
/// Usage:
|
|
178
|
+
/// ```
|
|
179
|
+
/// type MyComponent(initialProps) =
|
|
180
|
+
/// inherit React.PureComponent<MyProps, MyState>(initialProps)
|
|
181
|
+
/// base.setInitState({ value = 5 })
|
|
182
|
+
/// override this.render() =
|
|
183
|
+
/// let msg = sprintf "Hello %s, you have %i €"
|
|
184
|
+
/// this.props.name this.state.value
|
|
185
|
+
/// div [] [ofString msg]
|
|
186
|
+
/// ```
|
|
187
|
+
type [<AbstractClass; Import("PureComponent", "react")>] PureComponent<'P, 'S>(props: 'P) =
|
|
188
|
+
inherit Component<'P, 'S>(props)
|
|
189
|
+
|
|
190
|
+
/// A react component that implements `shouldComponentUpdate()` with a shallow prop comparison.
|
|
191
|
+
///
|
|
192
|
+
/// Usage:
|
|
193
|
+
/// ```
|
|
194
|
+
/// type MyComponent(initialProps) =
|
|
195
|
+
/// inherit React.PureStatelessComponent<MyProps>(initialProps)
|
|
196
|
+
/// override this.render() =
|
|
197
|
+
/// let msg = sprintf "Hello %s, you have %i €"
|
|
198
|
+
/// this.props.name this.props.value
|
|
199
|
+
/// div [] [ofString msg]
|
|
200
|
+
/// ```
|
|
201
|
+
type [<AbstractClass; Import("PureComponent", "react")>] PureStatelessComponent<'P>(props: 'P) =
|
|
202
|
+
inherit Component<'P, obj>(props)
|
|
203
|
+
|
|
204
|
+
type FragmentProps = { key: string }
|
|
205
|
+
|
|
206
|
+
type [<Import("Fragment", "react")>] Fragment(props: FragmentProps) =
|
|
207
|
+
interface ReactElement
|
|
208
|
+
|
|
209
|
+
// These are not React interfaces but we add them here in case other Fable libraries need them
|
|
210
|
+
|
|
211
|
+
type IProp =
|
|
212
|
+
interface end
|
|
213
|
+
|
|
214
|
+
type IHTMLProp =
|
|
215
|
+
inherit IProp
|
|
216
|
+
|
|
217
|
+
type IFragmentProp =
|
|
218
|
+
inherit IProp
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get FragmentProps () {
|
|
13
|
+
return FragmentProps;
|
|
14
|
+
},
|
|
15
|
+
get FragmentProps_$reflection () {
|
|
16
|
+
return FragmentProps_$reflection;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _Types = require("@fable-org/fable-library-js/Types.js");
|
|
20
|
+
const _Reflection = require("@fable-org/fable-library-js/Reflection.js");
|
|
21
|
+
class FragmentProps extends _Types.Record {
|
|
22
|
+
constructor(key){
|
|
23
|
+
super();
|
|
24
|
+
this.key = key;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function FragmentProps_$reflection() {
|
|
28
|
+
return (0, _Reflection.record_type)("Fable.React.FragmentProps", [], FragmentProps, ()=>[
|
|
29
|
+
[
|
|
30
|
+
"key",
|
|
31
|
+
_Reflection.string_type
|
|
32
|
+
]
|
|
33
|
+
]);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=Fable.React.fs.ts.map
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=Fable.React.fs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../FormSpec.TS/fable_modules/Fable.React.Types.18.3.0/Fable.React.fs.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
|
3
|
+
<PropertyGroup>
|
|
4
|
+
<Version>18.2.0</Version>
|
|
5
|
+
<PackageVersion>18.2.0</PackageVersion>
|
|
6
|
+
<TargetFramework>netstandard2.0</TargetFramework>
|
|
7
|
+
<!-- <DefineConstants>$(DefineConstants);FABLE_COMPILER</DefineConstants> -->
|
|
8
|
+
<PackageTags>fsharp;fable;javascript;f#;js;react;fable-binding;fable-javascript</PackageTags>
|
|
9
|
+
</PropertyGroup>
|
|
10
|
+
<PropertyGroup>
|
|
11
|
+
<NpmDependencies>
|
|
12
|
+
<NpmPackage Name="react-dom" Version="gte 18.0.0 lt 19.0.0" ResolutionStrategy="Max" />
|
|
13
|
+
</NpmDependencies>
|
|
14
|
+
</PropertyGroup>
|
|
15
|
+
<ItemGroup>
|
|
16
|
+
<Compile Include="Fable.ReactDom.fs" />
|
|
17
|
+
</ItemGroup>
|
|
18
|
+
<ItemGroup>
|
|
19
|
+
<PackageReference Update="FSharp.Core" Version="4.7.2" />
|
|
20
|
+
</ItemGroup>
|
|
21
|
+
<ItemGroup>
|
|
22
|
+
<ProjectReference Include="..\Fable.React.Types\Fable.React.Types.fsproj" />
|
|
23
|
+
</ItemGroup>
|
|
24
|
+
<ItemGroup>
|
|
25
|
+
<Content Include="*.fsproj; *.fs" PackagePath="fable\" />
|
|
26
|
+
</ItemGroup>
|
|
27
|
+
</Project>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
namespace Fable.React
|
|
2
|
+
|
|
3
|
+
open Fable.Core
|
|
4
|
+
open Fable.React
|
|
5
|
+
open Browser.Types
|
|
6
|
+
|
|
7
|
+
type IReactRoot =
|
|
8
|
+
/// Render a React element into the root.
|
|
9
|
+
abstract render: element: ReactElement -> unit
|
|
10
|
+
|
|
11
|
+
/// Remove the root from the DOM.
|
|
12
|
+
abstract unmount: unit -> unit
|
|
13
|
+
|
|
14
|
+
type IRootOptions =
|
|
15
|
+
/// Optional callback called when React automatically recovers from errors.
|
|
16
|
+
abstract onRecoverableError: (obj -> unit) with get, set
|
|
17
|
+
|
|
18
|
+
/// Optional prefix React uses for ids generated by React.useId. Useful to avoid conflicts when using multiple roots on the same page. Must be the same prefix used on the server.
|
|
19
|
+
abstract identifierPrefix: string with get, set
|
|
20
|
+
|
|
21
|
+
type ICreateRootOptions =
|
|
22
|
+
inherit IRootOptions
|
|
23
|
+
|
|
24
|
+
type IHydrateRootOptions =
|
|
25
|
+
inherit IRootOptions
|
|
26
|
+
|
|
27
|
+
type IReactDom =
|
|
28
|
+
/// Render a React element into the DOM in the supplied container.
|
|
29
|
+
/// If the React element was previously rendered into container, this will perform an update on it and only mutate the DOM as necessary to reflect the latest React element.
|
|
30
|
+
/// If the optional callback is provided, it will be executed after the component is rendered or updated.
|
|
31
|
+
abstract render: element: ReactElement * container: Element * ?callback: (unit->unit) -> unit
|
|
32
|
+
|
|
33
|
+
/// Same as render(), but is used to hydrate a container whose HTML contents were rendered by ReactDOMServer. React will attempt to attach event listeners to the existing markup.
|
|
34
|
+
abstract hydrate: element: ReactElement * container: Element * ?callback: (unit->unit) -> unit
|
|
35
|
+
|
|
36
|
+
/// Remove a mounted React component from the DOM and clean up its event handlers and state. If no component was mounted in the container, calling this function does nothing. Returns true if a component was unmounted and false if there was no component to unmount.
|
|
37
|
+
abstract unmountComponentAtNode: container: Element -> bool
|
|
38
|
+
|
|
39
|
+
/// Creates a portal. Portals provide a way to render children into a DOM node that exists outside the hierarchy of the DOM component.
|
|
40
|
+
abstract createPortal: child: ReactElement * container: Element -> ReactElement
|
|
41
|
+
|
|
42
|
+
/// Force React to flush any updates inside the provided callback synchronously. This ensures that the DOM is updated immediately.
|
|
43
|
+
abstract flushSync: callback: (unit -> unit) -> unit
|
|
44
|
+
|
|
45
|
+
type IReactDomClient =
|
|
46
|
+
/// Create a React root for the supplied container and return the root. The root can be used to render a React element into the DOM with render.
|
|
47
|
+
/// Requires React 18.
|
|
48
|
+
abstract createRoot: container: Element * ?options: ICreateRootOptions -> IReactRoot
|
|
49
|
+
|
|
50
|
+
/// Same as createRoot(), but is used to hydrate a container whose HTML contents were rendered by ReactDOMServer. React will attempt to attach event listeners to the existing markup.
|
|
51
|
+
/// Requires React 18.
|
|
52
|
+
abstract hydrateRoot: container: Element * element: ReactElement * ?options: IHydrateRootOptions -> IReactRoot
|
|
53
|
+
|
|
54
|
+
type IReactDomServer =
|
|
55
|
+
/// Render a React element to its initial HTML. This should only be used on the server. React will return an HTML string. You can use this method to generate HTML on the server and send the markup down on the initial request for faster page loads and to allow search engines to crawl your pages for SEO purposes.
|
|
56
|
+
/// If you call ReactDOM.render() on a node that already has this server-rendered markup, React will preserve it and only attach event handlers, allowing you to have a very performant first-load experience.
|
|
57
|
+
abstract renderToString: element: ReactElement -> string
|
|
58
|
+
|
|
59
|
+
/// Similar to renderToString, except this doesn't create extra DOM attributes such as data-reactid, that React uses internally. This is useful if you want to use React as a simple static page generator, as stripping away the extra attributes can save lots of bytes.
|
|
60
|
+
abstract renderToStaticMarkup: element: ReactElement -> string
|
|
61
|
+
|
|
62
|
+
[<AutoOpen>]
|
|
63
|
+
module ReactDomBindings =
|
|
64
|
+
#if FABLE_REPL_LIB
|
|
65
|
+
[<Global("ReactDOM")>]
|
|
66
|
+
#else
|
|
67
|
+
[<Import("*", "react-dom")>]
|
|
68
|
+
#endif
|
|
69
|
+
let ReactDom: IReactDom = jsNative
|
|
70
|
+
|
|
71
|
+
/// Requires React 18.
|
|
72
|
+
#if FABLE_REPL_LIB
|
|
73
|
+
[<Global("ReactDOM")>]
|
|
74
|
+
#else
|
|
75
|
+
[<Import("*", "react-dom/client")>]
|
|
76
|
+
#endif
|
|
77
|
+
let ReactDomClient: IReactDomClient = jsNative
|
|
78
|
+
|
|
79
|
+
#if !FABLE_REPL_LIB
|
|
80
|
+
[<Import("default", "react-dom/server")>]
|
|
81
|
+
let ReactDomServer: IReactDomServer = jsNative
|
|
82
|
+
#endif
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../FormSpec.TS/fable_modules/Fable.ReactDom.Types.18.2.0/Fable.ReactDom.fs.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":null,"sourcesContent":null,"sourceRoot":null}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
namespace Feliz
|
|
2
|
+
|
|
3
|
+
open Fable.Core
|
|
4
|
+
open Feliz.Styles
|
|
5
|
+
|
|
6
|
+
[<Erase>]
|
|
7
|
+
type borderStyle =
|
|
8
|
+
/// Specifies a dashed border.
|
|
9
|
+
///
|
|
10
|
+
/// See example https://www.w3schools.com/cssref/playit.asp?filename=playcss_border-style&preval=dashed
|
|
11
|
+
static member inline dashed : IBorderStyle = unbox "dashed"
|
|
12
|
+
/// Specifies a dotted border.
|
|
13
|
+
///
|
|
14
|
+
/// See example https://www.w3schools.com/cssref/playit.asp?filename=playcss_border-style&preval=dotted
|
|
15
|
+
static member inline dotted : IBorderStyle = unbox "dotted"
|
|
16
|
+
/// Specifies a double border.
|
|
17
|
+
///
|
|
18
|
+
/// See example https://www.w3schools.com/cssref/playit.asp?filename=playcss_border-style&preval=double
|
|
19
|
+
static member inline double : IBorderStyle = unbox "double"
|
|
20
|
+
/// Specifies a 3D grooved border. The effect depends on the border-color value.
|
|
21
|
+
///
|
|
22
|
+
/// See example https://www.w3schools.com/cssref/playit.asp?filename=playcss_border-style&preval=groove
|
|
23
|
+
static member inline groove : IBorderStyle = unbox "groove"
|
|
24
|
+
/// The same as "none", except in border conflict resolution for table elements.
|
|
25
|
+
///
|
|
26
|
+
/// See example https://www.w3schools.com/cssref/playit.asp?filename=playcss_border-style&preval=hidden
|
|
27
|
+
static member inline hidden : IBorderStyle = unbox "hidden"
|
|
28
|
+
/// Inherits this property from its parent element.
|
|
29
|
+
///
|
|
30
|
+
/// See example https://www.w3schools.com/cssref/playit.asp?filename=playcss_border-style&preval=inherit
|
|
31
|
+
///
|
|
32
|
+
/// Read about inherit https://www.w3schools.com/cssref/css_inherit.asp
|
|
33
|
+
static member inline inheritFromParent : IBorderStyle = unbox "inherit"
|
|
34
|
+
/// Sets this property to its default value.
|
|
35
|
+
///
|
|
36
|
+
/// See example https://www.w3schools.com/cssref/playit.asp?filename=playcss_border-style&preval=initial
|
|
37
|
+
///
|
|
38
|
+
/// Read about initial value https://www.w3schools.com/cssref/css_initial.asp
|
|
39
|
+
static member inline initial : IBorderStyle = unbox "initial"
|
|
40
|
+
/// Specifies a 3D inset border. The effect depends on the border-color value.
|
|
41
|
+
///
|
|
42
|
+
/// See example https://www.w3schools.com/cssref/playit.asp?filename=playcss_border-style&preval=inset
|
|
43
|
+
static member inline inset : IBorderStyle = unbox "inset"
|
|
44
|
+
/// Default value. Specifies no border.
|
|
45
|
+
///
|
|
46
|
+
/// See example https://www.w3schools.com/cssref/playit.asp?filename=playcss_border-style&preval=none
|
|
47
|
+
static member inline none : IBorderStyle = unbox "none"
|
|
48
|
+
/// Specifies a 3D outset border. The effect depends on the border-color value.
|
|
49
|
+
///
|
|
50
|
+
/// See example https://www.w3schools.com/cssref/playit.asp?filename=playcss_border-style&preval=outset
|
|
51
|
+
static member inline outset : IBorderStyle = unbox "outset"
|
|
52
|
+
/// Specifies a 3D ridged border. The effect depends on the border-color value.
|
|
53
|
+
///
|
|
54
|
+
/// See example https://www.w3schools.com/cssref/playit.asp?filename=playcss_border-style&preval=ridge
|
|
55
|
+
static member inline ridge : IBorderStyle = unbox "ridge"
|
|
56
|
+
/// Specifies a solid border.
|
|
57
|
+
///
|
|
58
|
+
/// See example https://www.w3schools.com/cssref/playit.asp?filename=playcss_border-style&preval=solid
|
|
59
|
+
static member inline solid : IBorderStyle = unbox "solid"
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
namespace Feliz
|
|
2
|
+
|
|
3
|
+
/// Contains a list of HTML5 colors from https://htmlcolorcodes.com/color-names/
|
|
4
|
+
module color =
|
|
5
|
+
/// 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
|
|
6
|
+
/// the `saturation` and `lightness` go from 0 to 100 as they are percentages.
|
|
7
|
+
let hsl (hue: float, saturation: float, lightness: float) =
|
|
8
|
+
"hsl(" + (unbox<string> hue) + "," + (unbox<string> saturation) + "%," + (unbox<string> lightness) + "%)"
|
|
9
|
+
let rgb (r: int, g: int, b: int) =
|
|
10
|
+
"rgb(" + (unbox<string> r) + "," + (unbox<string> g) + "," + (unbox<string> b) + ")"
|
|
11
|
+
let rgba (r: int, g: int, b: int, a) =
|
|
12
|
+
"rgba(" + (unbox<string> r) + "," + (unbox<string> g) + "," + (unbox<string> b) + "," + (unbox<string> a) + ")"
|
|
13
|
+
let [<Literal>] indianRed = "#CD5C5C"
|
|
14
|
+
let [<Literal>] lightCoral = "#F08080"
|
|
15
|
+
let [<Literal>] salmon = "#FA8072"
|
|
16
|
+
let [<Literal>] darkSalmon = "#E9967A"
|
|
17
|
+
let [<Literal>] lightSalmon = "#FFA07A"
|
|
18
|
+
let [<Literal>] crimson = "#DC143C"
|
|
19
|
+
let [<Literal>] red = "#FF0000"
|
|
20
|
+
let [<Literal>] fireBrick = "#B22222"
|
|
21
|
+
let [<Literal>] darkRed = "#8B0000"
|
|
22
|
+
let [<Literal>] pink = "#FFC0CB"
|
|
23
|
+
let [<Literal>] lightPink = "#FFB6C1"
|
|
24
|
+
let [<Literal>] hotPink = "#FF69B4"
|
|
25
|
+
let [<Literal>] deepPink = "#FF1493"
|
|
26
|
+
let [<Literal>] mediumVioletRed = "#C71585"
|
|
27
|
+
let [<Literal>] paleVioletRed = "#DB7093"
|
|
28
|
+
let [<Literal>] coral = "#FF7F50"
|
|
29
|
+
let [<Literal>] tomato = "#FF6347"
|
|
30
|
+
let [<Literal>] orangeRed = "#FF4500"
|
|
31
|
+
let [<Literal>] darkOrange = "#FF8C00"
|
|
32
|
+
let [<Literal>] orange = "#FFA500"
|
|
33
|
+
let [<Literal>] gold = "#FFD700"
|
|
34
|
+
let [<Literal>] yellow = "#FFFF00"
|
|
35
|
+
let [<Literal>] lightYellow = "#FFFFE0"
|
|
36
|
+
let [<Literal>] limonChiffon = "#FFFACD"
|
|
37
|
+
let [<Literal>] lightGoldenRodYellow = "#FAFAD2"
|
|
38
|
+
let [<Literal>] papayaWhip = "#FFEFD5"
|
|
39
|
+
let [<Literal>] moccasin = "#FFE4B5"
|
|
40
|
+
let [<Literal>] peachPuff = "#FFDAB9"
|
|
41
|
+
let [<Literal>] paleGoldenRod = "#EEE8AA"
|
|
42
|
+
let [<Literal>] khaki = "#F0E68C"
|
|
43
|
+
let [<Literal>] darkKhaki = "#BDB76B"
|
|
44
|
+
let [<Literal>] lavender = "#E6E6FA"
|
|
45
|
+
let [<Literal>] thistle = "#D8BFD8"
|
|
46
|
+
let [<Literal>] plum = "#DDA0DD"
|
|
47
|
+
let [<Literal>] violet = "#EE82EE"
|
|
48
|
+
let [<Literal>] orchid = "#DA70D6"
|
|
49
|
+
let [<Literal>] fuchsia = "#FF00FF"
|
|
50
|
+
let [<Literal>] magenta = "#FF00FF"
|
|
51
|
+
let [<Literal>] mediumOrchid = "#BA55D3"
|
|
52
|
+
let [<Literal>] mediumPurple = "#9370DB"
|
|
53
|
+
let [<Literal>] rebeccaPurple = "#663399"
|
|
54
|
+
let [<Literal>] blueViolet = "#8A2BE2"
|
|
55
|
+
let [<Literal>] darkViolet = "#9400D3"
|
|
56
|
+
let [<Literal>] darkOrchid = "#9932CC"
|
|
57
|
+
let [<Literal>] darkMagenta = "#8B008B"
|
|
58
|
+
let [<Literal>] purple = "#800080"
|
|
59
|
+
let [<Literal>] indigo = "#4B0082"
|
|
60
|
+
let [<Literal>] slateBlue = "#6A5ACD"
|
|
61
|
+
let [<Literal>] darkSlateBlue = "#483D8B"
|
|
62
|
+
let [<Literal>] mediumSlateBlue = "#7B68EE"
|
|
63
|
+
let [<Literal>] greenYellow = "#ADFF2F"
|
|
64
|
+
let [<Literal>] chartreuse = "#7FFF00"
|
|
65
|
+
let [<Literal>] lawnGreen = "#7CFC00"
|
|
66
|
+
let [<Literal>] lime = "#00FF00"
|
|
67
|
+
let [<Literal>] limeGreen = "#32CD32"
|
|
68
|
+
let [<Literal>] paleGreen = "#98FB98"
|
|
69
|
+
let [<Literal>] lightGreen = "#90EE90"
|
|
70
|
+
let [<Literal>] mediumSpringGreen = "#00FA9A"
|
|
71
|
+
let [<Literal>] springGreen = "#00FF7F"
|
|
72
|
+
let [<Literal>] mediumSeaGreen = "#3CB371"
|
|
73
|
+
let [<Literal>] seaGreen = "#2E8B57"
|
|
74
|
+
let [<Literal>] forestGreen = "#228B22"
|
|
75
|
+
let [<Literal>] green = "#008000"
|
|
76
|
+
let [<Literal>] darkGreen = "#006400"
|
|
77
|
+
let [<Literal>] yellowGreen = "#9ACD32"
|
|
78
|
+
let [<Literal>] oliveDrab = "#6B8E23"
|
|
79
|
+
let [<Literal>] olive = "#808000"
|
|
80
|
+
let [<Literal>] darkOliveGreen = "#556B2F"
|
|
81
|
+
let [<Literal>] mediumAquamarine = "#66CDAA"
|
|
82
|
+
let [<Literal>] darkSeaGreen = "#8FBC8B"
|
|
83
|
+
let [<Literal>] lightSeaGreen = "#20B2AA"
|
|
84
|
+
let [<Literal>] darkCyan = "#008B8B"
|
|
85
|
+
let [<Literal>] teal = "#008080"
|
|
86
|
+
let [<Literal>] aqua = "#00FFFF"
|
|
87
|
+
let [<Literal>] cyan = "#00FFFF"
|
|
88
|
+
let [<Literal>] lightCyan = "#E0FFFF"
|
|
89
|
+
let [<Literal>] paleTurqouise = "#AFEEEE"
|
|
90
|
+
let [<Literal>] aquaMarine = "#7FFFD4"
|
|
91
|
+
let [<Literal>] turqouise = "#AFEEEE"
|
|
92
|
+
let [<Literal>] mediumTurqouise = "#48D1CC"
|
|
93
|
+
let [<Literal>] darkTurqouise = "#00CED1"
|
|
94
|
+
let [<Literal>] cadetBlue = "#5F9EA0"
|
|
95
|
+
let [<Literal>] steelBlue = "#4682B4"
|
|
96
|
+
let [<Literal>] lightSteelBlue = "#B0C4DE"
|
|
97
|
+
let [<Literal>] powederBlue = "#B0E0E6"
|
|
98
|
+
let [<Literal>] lightBlue = "#ADD8E6"
|
|
99
|
+
let [<Literal>] skyBlue = "#87CEEB"
|
|
100
|
+
let [<Literal>] lightSkyBlue = "#87CEFA"
|
|
101
|
+
let [<Literal>] deepSkyBlue = "#00BFFF"
|
|
102
|
+
let [<Literal>] dodgerBlue = "#1E90FF"
|
|
103
|
+
let [<Literal>] cornFlowerBlue = "#6495ED"
|
|
104
|
+
let [<Literal>] royalBlue = "#4169E1"
|
|
105
|
+
let [<Literal>] blue = "#0000FF"
|
|
106
|
+
let [<Literal>] mediumBlue = "#0000CD"
|
|
107
|
+
let [<Literal>] darkBlue = "#00008B"
|
|
108
|
+
let [<Literal>] navy = "#000080"
|
|
109
|
+
let [<Literal>] midnightBlue = "#191970"
|
|
110
|
+
let [<Literal>] cornSilk = "#FFF8DC"
|
|
111
|
+
let [<Literal>] blanchedAlmond = "#FFEBCD"
|
|
112
|
+
let [<Literal>] bisque = "#FFE4C4"
|
|
113
|
+
let [<Literal>] navajoWhite = "#FFDEAD"
|
|
114
|
+
let [<Literal>] wheat = "#F5DEB3"
|
|
115
|
+
let [<Literal>] burlyWood = "#DEB887"
|
|
116
|
+
let [<Literal>] tan = "#D2B48C"
|
|
117
|
+
let [<Literal>] rosyBrown = "#BC8F8F"
|
|
118
|
+
let [<Literal>] sandyBrown = "#F4A460"
|
|
119
|
+
let [<Literal>] goldenRod = "#DAA520"
|
|
120
|
+
let [<Literal>] darkGoldenRod = "#B8860B"
|
|
121
|
+
let [<Literal>] peru = "#CD853F"
|
|
122
|
+
let [<Literal>] chocolate = "#D2691E"
|
|
123
|
+
let [<Literal>] saddleBrown = "#8B4513"
|
|
124
|
+
let [<Literal>] sienna = "#A0522D"
|
|
125
|
+
let [<Literal>] brown = "#A52A2A"
|
|
126
|
+
let [<Literal>] maroon = "#A52A2A"
|
|
127
|
+
let [<Literal>] white = "#FFFFFF"
|
|
128
|
+
let [<Literal>] snow = "#FFFAFA"
|
|
129
|
+
let [<Literal>] honeyDew = "#F0FFF0"
|
|
130
|
+
let [<Literal>] mintCream = "#F5FFFA"
|
|
131
|
+
let [<Literal>] azure = "#F0FFFF"
|
|
132
|
+
let [<Literal>] aliceBlue = "#F0F8FF"
|
|
133
|
+
let [<Literal>] ghostWhite = "#F8F8FF"
|
|
134
|
+
let [<Literal>] whiteSmoke = "#F5F5F5"
|
|
135
|
+
let [<Literal>] seaShell = "#FFF5EE"
|
|
136
|
+
let [<Literal>] beige = "#F5F5DC"
|
|
137
|
+
let [<Literal>] oldLace = "#FDF5E6"
|
|
138
|
+
let [<Literal>] floralWhite = "#FFFAF0"
|
|
139
|
+
let [<Literal>] ivory = "#FFFFF0"
|
|
140
|
+
let [<Literal>] antiqueWhite = "#FAEBD7"
|
|
141
|
+
let [<Literal>] linen = "#FAF0E6"
|
|
142
|
+
let [<Literal>] lavenderBlush = "#FFF0F5"
|
|
143
|
+
let [<Literal>] mistyRose = "#FFE4E1"
|
|
144
|
+
let [<Literal>] gainsBoro = "#DCDCDC"
|
|
145
|
+
let [<Literal>] lightGray = "#D3D3D3"
|
|
146
|
+
let [<Literal>] silver = "#C0C0C0"
|
|
147
|
+
let [<Literal>] darkGray = "#A9A9A9"
|
|
148
|
+
let [<Literal>] gray = "#808080"
|
|
149
|
+
let [<Literal>] dimGray = "#696969"
|
|
150
|
+
let [<Literal>] lightSlateGray = "#778899"
|
|
151
|
+
let [<Literal>] slateGray = "#708090"
|
|
152
|
+
let [<Literal>] darkSlateGray = "#2F4F4F"
|
|
153
|
+
let [<Literal>] black = "#000000"
|
|
154
|
+
let [<Literal>] transparent = "transparent"
|