This commit is contained in:
Mark Eibes 2020-01-26 09:39:17 +01:00
parent b360daec25
commit 4e7334be70
124 changed files with 17506 additions and 483 deletions

3
.gitignore vendored
View File

@ -33,5 +33,8 @@ playground/.psa*
playground/.spago
playground/src/Main.purs
playgrounds/**
!playgrounds/.gitkeep
.DS_Store

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 775 B

After

Width:  |  Height:  |  Size: 775 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 508 B

After

Width:  |  Height:  |  Size: 508 B

View File

Before

Width:  |  Height:  |  Size: 907 B

After

Width:  |  Height:  |  Size: 907 B

View File

Before

Width:  |  Height:  |  Size: 622 B

After

Width:  |  Height:  |  Size: 622 B

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,12 +1,11 @@
import { configure, forceReRender } from '@storybook/react';
import equal from 'deep-equal';
import { configure, forceReRender } from "@storybook/react";
const req = require.context('../stories/', true, /Stories\.purs$/);
const req = require.context("../stories/", true, /Stories\.purs$/);
function loadStories() {
req.keys().forEach(filename => {
req(filename).stories();
})
});
}
configure(loadStories, module);

View File

@ -1,11 +1,11 @@
const express = require('express')
const request = require('request');
const express = require("express");
const request = require("request");
const expressMiddleWare = router => {
router.use('/api', (req, res) => {
router.use("/api", (req, res) => {
var url = "http://localhost:14188" + req.url;
req.pipe(request({ qs:req.query, uri: url, json: true })).pipe(res);
})
}
req.pipe(request({ qs: req.query, uri: url, json: true })).pipe(res);
});
};
module.exports = expressMiddleWare
module.exports = expressMiddleWare;

View File

@ -1,20 +1,4 @@
{
"editor.formatOnSave": false,
"regreplace.commands": [
{
"name": "replace double colon with unicode version",
"match": "\\.purs?$",
"regexp": " ::(\\s)",
"global": true,
"replace": " ∷$1"
},
{
"name": "replace forall with unicode version",
"match": "\\.purs?$",
"regexp": "forall(\\s)",
"global": true,
"replace": "∀$1"
},
],
"purescript.buildCommand": "spago build --purs-args '--json-errors'",
"editor.formatOnSave": true,
"purescript.buildCommand": "spago build --purs-args '--json-errors'"
}

1
client/assets Symbolic link
View File

@ -0,0 +1 @@
../assets/

66
client/dist/bundle.js vendored Normal file

File diff suppressed because one or more lines are too long

25
client/dist/index.html vendored Normal file
View File

@ -0,0 +1,25 @@
<!doctype>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Overpass|Playfair+Display|Montserrat:300,400,500,600,700,800,900&display=swap" rel="stylesheet">
<style>
html, body, #app {
margin: 0;
padding: 0;
overscroll-behavior: none;
background-color: pink;
}
@font-face {
font-family: "PragmataPro";
src: url('./fonts/PragmataProLiga-Regular.woff2') format('woff2'),
url('./fonts/PragmataProLiga-Regular.woff') format('woff');
font-weight: normal;
font-style: normal;
}
</style>
<title>Kleislove</title>
</head>
<body>
<div id="app"></div>
</body>
</html>

View File

@ -17,7 +17,7 @@
"webpack:watch": "DEBUG=purs-loader* DEBUG_DEPTH=100 webpack --config webpack.dev.js --progress --display-error-details --display verbose --watch",
"webpack:server": "webpack-dev-server --config webpack.dev.js --progress --inline --hot",
"webpack:server:debug": "DEBUG=purs-loader* DEBUG_DEPTH=100 webpack-dev-server --config webpack.dev.js --mode development --progress --inline --hot",
"storybook": "start-storybook -s ./server/static -p 9001",
"storybook": "start-storybook -s ./server/assets -p 9001",
"replace-module": "sed -i '' -e 's/\"__module__\"/module/g' output/*Stories/index.js"
},
"repository": {

View File

@ -1 +0,0 @@
../packages.dhall

189
client/packages.dhall Normal file
View File

@ -0,0 +1,189 @@
{-
Welcome to your new Dhall package-set!
Below are instructions for how to edit this file for most use
cases, so that you don't need to know Dhall to use it.
## Warning: Don't Move This Top-Level Comment!
Due to how `dhall format` currently works, this comment's
instructions cannot appear near corresponding sections below
because `dhall format` will delete the comment. However,
it will not delete a top-level comment like this one.
## Use Cases
Most will want to do one or both of these options:
1. Override/Patch a package's dependency
2. Add a package not already in the default package set
This file will continue to work whether you use one or both options.
Instructions for each option are explained below.
### Overriding/Patching a package
Purpose:
- Change a package's dependency to a newer/older release than the
default package set's release
- Use your own modified version of some dependency that may
include new API, changed API, removed API by
using your custom git repo of the library rather than
the package set's repo
Syntax:
Replace the overrides' "{=}" (an empty record) with the following idea
The "//" or "⫽" means "merge these two records and
when they have the same value, use the one on the right:"
-------------------------------
let override =
{ packageName =
upstream.packageName // { updateEntity1 = "new value", updateEntity2 = "new value" }
, packageName =
upstream.packageName // { version = "v4.0.0" }
, packageName =
upstream.packageName // { repo = "https://www.example.com/path/to/new/repo.git" }
}
-------------------------------
Example:
-------------------------------
let overrides =
{ halogen =
upstream.halogen // { version = "master" }
, halogen-vdom =
upstream.halogen-vdom // { version = "v4.0.0" }
}
-------------------------------
### Additions
Purpose:
- Add packages that aren't already included in the default package set
Syntax:
Replace the additions' "{=}" (an empty record) with the following idea:
-------------------------------
let additions =
{ "package-name" =
{ dependencies =
[ "dependency1"
, "dependency2"
]
, repo =
"https://example.com/path/to/git/repo.git"
, version =
"tag ('v4.0.0') or branch ('master')"
}
, "package-name" =
{ dependencies =
[ "dependency1"
, "dependency2"
]
, repo =
"https://example.com/path/to/git/repo.git"
, version =
"tag ('v4.0.0') or branch ('master')"
}
, etc.
}
-------------------------------
Example:
-------------------------------
let additions =
{ benchotron =
{ dependencies =
[ "arrays"
, "exists"
, "profunctor"
, "strings"
, "quickcheck"
, "lcg"
, "transformers"
, "foldable-traversable"
, "exceptions"
, "node-fs"
, "node-buffer"
, "node-readline"
, "datetime"
, "now"
],
, repo =
"https://github.com/hdgarrood/purescript-benchotron.git"
, version =
"v7.0.0"
}
}
-------------------------------
-}
let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.13.3-20190920/packages.dhall sha256:53873cf2fc4a343a41f335ee47c1706ecf755ac7c5a336e8eb03ad23165dfd28
let overrides =
{ react-basic-hooks =
upstream.react-basic-hooks // { version = "v2.0.1" }
, spec-discovery =
upstream.spec-discovery // { version = "1ca3416e6c0729eca8d5204f22cf0aa09c98df9d" }
, react-basic =
upstream.react-basic
// { repo =
"https://github.com/i-am-the-slime/purescript-react-basic"
, version =
"dda3f711d84cd5dc1817a71ff01f0426b04ed791"
}
}
let additions =
{ react-testing-library =
{ dependencies =
[ "aff-promise"
, "console"
, "debug"
, "effect"
, "foreign"
, "foreign-object"
, "psci-support"
, "react-basic-hooks"
, "remotedata"
, "run"
, "simple-json"
, "spec"
, "spec-discovery"
]
, repo =
"https://github.com/i-am-the-slime/purescript-react-testing-library.git"
, version =
"b872928414a887ccefbe857038af4e57227dad16"
}
, pseudo-random =
{ dependencies =
[ "prelude"
, "console"
, "effect"
, "lcg"
, "arrays"
, "st"
]
, repo =
"https://github.com/opyapeus/purescript-pseudo-random.git"
, version =
"7715e8a2c096c480a093a5e0a6df1ece4df5ed2a"
}
, matryoshka =
{ dependencies =
[ "prelude"
, "fixed-points"
, "free"
, "transformers"
, "profunctor"
]
, repo =
"https://github.com/slamdata/purescript-matryoshka.git"
, version =
"caaca2d836d52159ba7963333996286a00428394"
}
}
in upstream // overrides // additions

View File

@ -1,7 +1,6 @@
module Container.Component where
import Prelude
import CSS.Safer (cssSafer)
import CompileEditor.Component (mkCompileEditor)
import Container.Header (mkHeader)
@ -86,6 +85,6 @@ mkContainerContent = do
]
}
, element header {}
, R.div { className: classes.content, children: [element editor {}] <> children }
, R.div { className: classes.content, children: [ element editor {} ] <> children }
]
}

View File

@ -1,157 +0,0 @@
module React.Helpers where
import Prelude
import Data.Nullable (Nullable)
import Data.Symbol (SProxy(..))
import Foreign.Object (Object)
import Prim.Row (class Lacks, class Union)
import React.Basic (JSX)
import React.Basic.DOM (CSS)
import React.Basic.DOM as R
import React.Basic.Events (EventHandler)
import React.Basic.Hooks (Ref)
import Record (insert)
import Web.DOM (Node)
wrapperDiv ∷ ∀ attrs attrs_.
Lacks "children" attrs =>
Union attrs attrs_ Props_div_no_children =>
{|attrs}
-> JSX
-> JSX
wrapperDiv props child =
R.div $ insert (SProxy ∷ _ "children") [child] props
type Props_div_no_children =
( _data ∷ Object String
, about ∷ String
, acceptCharset ∷ String
, accessKey ∷ String
, allowFullScreen ∷ Boolean
, allowTransparency ∷ Boolean
, autoComplete ∷ Boolean
, autoFocus ∷ Boolean
, autoPlay ∷ Boolean
, capture ∷ Boolean
, cellPadding ∷ String
, cellSpacing ∷ String
, charSet ∷ String
, classID ∷ String
, className ∷ String
, colSpan ∷ Int
, contentEditable ∷ Boolean
, contextMenu ∷ String
, crossOrigin ∷ String
, dangerouslySetInnerHTML ∷ { __html ∷ String }
, datatype ∷ String
, dateTime ∷ String
, dir ∷ String
, draggable ∷ Boolean
, encType ∷ String
, formAction ∷ String
, formEncType ∷ String
, formMethod ∷ String
, formNoValidate ∷ Boolean
, formTarget ∷ String
, frameBorder ∷ String
, hidden ∷ Boolean
, hrefLang ∷ String
, htmlFor ∷ String
, httpEquiv ∷ String
, icon ∷ String
, id ∷ String
, inlist ∷ String
, inputMode ∷ String
, is ∷ String
, itemID ∷ String
, itemProp ∷ String
, itemRef ∷ String
, itemScope ∷ Boolean
, itemType ∷ String
, key ∷ String
, keyParams ∷ String
, keyType ∷ String
, lang ∷ String
, marginHeight ∷ String
, marginWidth ∷ String
, maxLength ∷ Int
, mediaGroup ∷ String
, minLength ∷ Int
, noValidate ∷ Boolean
, onAnimationEnd ∷ EventHandler
, onAnimationIteration ∷ EventHandler
, onAnimationStart ∷ EventHandler
, onBlur ∷ EventHandler
, onClick ∷ EventHandler
, onCompositionEnd ∷ EventHandler
, onCompositionStart ∷ EventHandler
, onCompositionUpdate ∷ EventHandler
, onContextMenu ∷ EventHandler
, onCopy ∷ EventHandler
, onCut ∷ EventHandler
, onDoubleClick ∷ EventHandler
, onDrag ∷ EventHandler
, onDragEnd ∷ EventHandler
, onDragEnter ∷ EventHandler
, onDragExit ∷ EventHandler
, onDragLeave ∷ EventHandler
, onDragOver ∷ EventHandler
, onDragStart ∷ EventHandler
, onDrop ∷ EventHandler
, onFocus ∷ EventHandler
, onGotPointerCapture ∷ EventHandler
, onInvalid ∷ EventHandler
, onKeyDown ∷ EventHandler
, onKeyPress ∷ EventHandler
, onKeyUp ∷ EventHandler
, onLostPointerCapture ∷ EventHandler
, onMouseDown ∷ EventHandler
, onMouseEnter ∷ EventHandler
, onMouseLeave ∷ EventHandler
, onMouseMove ∷ EventHandler
, onMouseOut ∷ EventHandler
, onMouseOver ∷ EventHandler
, onMouseUp ∷ EventHandler
, onPaste ∷ EventHandler
, onPointerCancel ∷ EventHandler
, onPointerDown ∷ EventHandler
, onPointerEnter ∷ EventHandler
, onPointerLeave ∷ EventHandler
, onPointerMove ∷ EventHandler
, onPointerOut ∷ EventHandler
, onPointerOver ∷ EventHandler
, onPointerUp ∷ EventHandler
, onSelect ∷ EventHandler
, onSubmit ∷ EventHandler
, onTouchCancel ∷ EventHandler
, onTouchEnd ∷ EventHandler
, onTouchMove ∷ EventHandler
, onTouchStart ∷ EventHandler
, onTransitionEnd ∷ EventHandler
, onWheel ∷ EventHandler
, prefix ∷ String
, property ∷ String
, radioGroup ∷ String
, readOnly ∷ Boolean
, ref ∷ Ref (Nullable Node)
, resource ∷ String
, role ∷ String
, rowSpan ∷ Int
, scoped ∷ Boolean
, seamless ∷ Boolean
, security ∷ String
, spellCheck ∷ Boolean
, srcDoc ∷ JSX
, srcLang ∷ String
, srcSet ∷ String
, style ∷ CSS
, suppressContentEditableWarning ∷ Boolean
, tabIndex ∷ Int
, title ∷ String
, typeof ∷ String
, unselectable ∷ Boolean
, useMap ∷ String
, vocab ∷ String
, wmode ∷ String
)

View File

@ -1,29 +0,0 @@
'use strict'
var alternative = require("../../assets/icons/alternative.svg");
var ap = require("../../assets/icons/ap.svg");
var append = require("../../assets/icons/append.svg");
var apply = require("../../assets/icons/apply.svg");
var applyflipped = require("../../assets/icons/applyflipped.svg");
var bind = require("../../assets/icons/bind.svg");
var compose = require("../../assets/icons/compose.svg");
var forall = require("../../assets/icons/forall.svg");
var kleisli = require("../../assets/icons/kleisli.svg");
var map = require("../../assets/icons/map.svg");
var mapflipped = require("../../assets/icons/mapflipped.svg");
var pslogo = require("../../assets/icons/pslogo.svg");
var trianglelogo = require("../../assets/icons/trianglelogo.svg");
exports.alternativeIconRaw = alternative.default;
exports.apIconRaw = ap.default;
exports.appendIconRaw = append.default;
exports.applyIconRaw = apply.default;
exports.applyflippedIconRaw = applyflipped.default;
exports.bindIconRaw = bind.default;
exports.composeIconRaw = compose.default;
exports.forallIconRaw = forall.default;
exports.kleisliIconRaw = kleisli.default;
exports.mapIconRaw = map.default;
exports.mapflippedIconRaw = mapflipped.default;
exports.pslogoIconRaw = pslogo.default;
exports.trianglelogoIconRaw = trianglelogo.default;

View File

@ -1,4 +0,0 @@
'use strict'
exports.landingPageLightRaw = require("../../assets/images/landingpagelight.svg").default;
exports.landingPageDarkRaw = require("../../assets/images/landingpagedark.svg").default;

View File

@ -1 +1 @@
../../shared/Shared
../../shared/Shared/

View File

@ -1,92 +0,0 @@
module Theme where
import Prelude
import CSS (ColorSpace(..), blue, brightness, contrast, darken, desaturate, isLight, lighten, mix, rotateHue, toHexString)
import Color (Color)
import Data.Foldable (intercalate)
import Data.Symbol (SProxy(..))
import Record.Builder as RB
import Theme.Types (Theme, CSSTheme)
increaseContrast ∷ Color -> Color -> Color
increaseContrast contrastWith = go 0
where
modify = if isLight contrastWith then darken else lighten
go i col
= if contrast contrastWith col >= 7.5 || i >= 20
then col
else go (i+1) (modify 0.1 col)
f ∷ ∀ fieldName. SProxy fieldName
f = SProxy
fromTheme ∷ Theme -> CSSTheme
fromTheme theme = RB.build (
-- background
RB.modify (f ∷ _ "backgroundColour") toHexString
>>> RB.insert (f ∷ _ "backgroundColourLighter")
(theme.backgroundColour # lighter >>> toHexString)
>>> RB.modify (f ∷ _ "interfaceColour") toHexString
>>> RB.insert (f ∷ _ "interfaceColourLighter")
(theme.interfaceColour # lighter >>> toHexString)
>>> RB.insert (f ∷ _ "interfaceColourLightest")
(theme.interfaceColour # lighter >>> lighter >>> toHexString)
>>> RB.insert (f ∷ _ "interfaceColourDarker")
(theme.interfaceColour # darker >>> toHexString)
>>> RB.insert (f ∷ _ "interfaceColourDarkest")
(theme.interfaceColour # darker >>> darker >>> toHexString)
-- foreground
>>> RB.modify (f ∷ _ "textColour") toHexString
>>> RB.insert (f ∷ _ "textColourLighter")
(theme.textColour # lighter >>> toHexString)
>>> RB.insert (f ∷ _ "textColourLightest")
(theme.textColour # lighter >>> lighter >>> toHexString)
>>> RB.insert (f ∷ _ "textColourDarker")
(theme.textColour # darker >>> toHexString)
>>> RB.insert (f ∷ _ "textColourDarkest")
(theme.textColour # darker >>> darker >>> toHexString)
-- highlight
>>> RB.modify (f ∷ _ "highlightColour") toHexString
>>> RB.insert (f ∷ _ "highlightColourDark")
(theme.highlightColour # darken 0.2 # rotateHue (-10.0) # toHexString)
-- altHighlight
>>> RB.modify (f ∷ _ "altHighlightColour") toHexString
>>> RB.insert (f ∷ _ "altHighlightColourDark")
(theme.altHighlightColour # darken 0.2 # toHexString)
-- palette
>>> RB.modify (f ∷ _ "yellow") toHexString
>>> RB.modify (f ∷ _ "green") toHexString
>>> RB.modify (f ∷ _ "pink") toHexString
>>> RB.modify (f ∷ _ "orange") toHexString
>>> RB.modify (f ∷ _ "turquoise") toHexString
>>> RB.modify (f ∷ _ "red") toHexString
>>> RB.modify (f ∷ _ "blue") toHexString
-- fonts
>>> RB.modify (f ∷ _ "textFontFamily") (intercalate ",")
>>> RB.modify (f ∷ _ "headingFontFamily") (intercalate ",")
>>> RB.insert (f ∷ _ "isLight") isLightTheme
) theme
where
isLightTheme = isLight theme.backgroundColour
yellower ∷ Color -> Color
yellower col =
if brightness col > 0.8
then
lighten 0.02 col
else
col
# lighten 0.1
# desaturate 0.03
bluer col =
mix HSL col blue 0.05
# darken 0.1
# desaturate 0.03
lighter ∷ Color -> Color
lighter = yellower
darker ∷ Color -> Color
darker = bluer

1
client/src/Yoga Symbolic link
View File

@ -0,0 +1 @@
../../components/src/Yoga/

11
components/.gitignore vendored Normal file
View File

@ -0,0 +1,11 @@
/bower_components/
/node_modules/
/.pulp-cache/
/output/
/generated-docs/
/.psc-package/
/.psc*
/.purs*
/.psa*
/.spago/
.DS_Store

View File

@ -0,0 +1,15 @@
import { configure, forceReRender } from '@storybook/react';
import equal from 'deep-equal';
const req = require.context('../stories/', true, /Stories\.purs$/);
function loadStories() {
req.keys().forEach(filename => {
req(filename).stories();
})
}
configure(loadStories, module);
if (module.hot) {
forceReRender();
}

View File

@ -0,0 +1,11 @@
const express = require("express");
const request = require("request");
const expressMiddleWare = router => {
router.use("/api", (req, res) => {
var url = "http://localhost:14188" + req.url;
req.pipe(request({ qs: req.query, uri: url, json: true })).pipe(res);
});
};
module.exports = expressMiddleWare;

View File

@ -0,0 +1,12 @@
const custom = require("../webpack.dev.js");
const path = require("path");
module.exports = async ({ config, mode }) => {
return {
...config,
module:
{ ...config.module
, rules: custom.module.rules
}
};
};

4
components/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,4 @@
{
"editor.formatOnSave": true,
"purescript.buildCommand": "spago build --purs-args '--json-errors'"
}

20
components/LICENSE Normal file
View File

@ -0,0 +1,20 @@
Copyright (c) 2016 Eric Thul
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), in the Software without restriction, including without
limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to
whom the Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect id="Artboard1" x="0" y="0" width="100" height="100" style="fill:none;"/><g id="Artboard11" serif:id="Artboard1"><g id="Alternative"><path d="M83.506,45.907l-15.824,-15.832l-4.268,4.269l13.688,13.696l-13.688,13.695l4.268,4.268l15.824,-15.826c0.57,-0.573 0.885,-1.332 0.885,-2.139c-0.002,-0.807 -0.315,-1.563 -0.885,-2.131" style="fill-rule:nonzero;"/><path d="M36.924,34.346l-4.27,-4.27l-15.83,15.829c-0.568,0.568 -0.882,1.328 -0.88,2.134c0,0.807 0.312,1.565 0.88,2.133l15.83,15.83l4.27,-4.267l-13.695,-13.696l13.695,-13.693Z" style="fill-rule:nonzero;"/><path d="M53.013,18.146c0,-0.714 -0.579,-1.294 -1.293,-1.294l-2.588,0c-0.714,0 -1.294,0.58 -1.294,1.294l0,59.785c0,0.714 0.58,1.294 1.294,1.294l2.588,0c0.714,0 1.293,-0.58 1.293,-1.294l0,-59.785Z" style=""/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect id="Artboard1" x="0" y="0" width="100" height="100" style="fill:none;"/><g id="Artboard11" serif:id="Artboard1"><g><g id="Ap"><g><path d="M90.506,47.156l-15.824,-15.832l-4.268,4.269l13.688,13.696l-13.688,13.695l4.268,4.268l15.824,-15.826c0.57,-0.573 0.885,-1.332 0.885,-2.139c-0.002,-0.807 -0.315,-1.563 -0.885,-2.131" style="fill-rule:nonzero;"/></g><path d="M29.924,35.595l-4.27,-4.27l-15.83,15.829c-0.568,0.568 -0.882,1.328 -0.88,2.134c0,0.807 0.312,1.565 0.88,2.133l15.83,15.83l4.27,-4.267l-13.695,-13.696l13.695,-13.693Z" style="fill-rule:nonzero;"/><path d="M47.276,31.405c0.168,-1.47 1.413,-2.58 2.893,-2.58c1.48,0 2.724,1.11 2.893,2.58l1.124,9.784l9.653,-1.954c1.451,-0.294 2.891,0.547 3.348,1.954c0.457,1.408 -0.214,2.934 -1.56,3.549l-8.958,4.093l4.842,8.576c0.727,1.289 0.373,2.918 -0.824,3.788c-1.198,0.87 -2.857,0.704 -3.858,-0.386l-6.66,-7.255l-6.661,7.255c-1,1.09 -2.66,1.256 -3.857,0.386c-1.197,-0.87 -1.552,-2.499 -0.824,-3.788l4.842,-8.576l-8.958,-4.093c-1.347,-0.615 -2.017,-2.141 -1.56,-3.549c0.457,-1.407 1.897,-2.248 3.348,-1.954l9.653,1.954l1.124,-9.784Z" style=""/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect id="Artboard1" x="0" y="0" width="100" height="100" style="fill:none;"/><g id="Artboard11" serif:id="Artboard1"><g><g id="append"><g><path d="M77.506,45.907l-15.824,-15.832l-4.268,4.269l13.688,13.696l-13.688,13.695l4.268,4.268l15.824,-15.826c0.57,-0.573 0.885,-1.332 0.885,-2.139c-0.002,-0.807 -0.315,-1.563 -0.885,-2.131" style="fill-rule:nonzero;"/></g><path d="M42.924,34.346l-4.27,-4.27l-15.83,15.829c-0.568,0.568 -0.882,1.328 -0.88,2.134c0,0.807 0.312,1.565 0.88,2.133l15.83,15.83l4.27,-4.267l-13.695,-13.696l13.695,-13.693Z" style="fill-rule:nonzero;"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.5;"><rect id="Artboard1" x="0" y="0" width="100" height="100" style="fill:none;"/><g id="Artboard11" serif:id="Artboard1"><g><g id="Apply"><g><path d="M37.344,58.583c0,5.756 5.739,10.422 12.819,10.422c7.075,0 12.818,-4.67 12.818,-10.422c0,-5.754 -5.733,-10.418 -12.807,-10.423l-0.013,0.002c-7.074,-0.005 -12.808,-4.67 -12.808,-10.423c0,-5.752 5.744,-10.423 12.819,-10.423c7.079,0 12.819,4.667 12.819,10.423" style="fill:none;stroke:#fff;stroke-width:6px;"/><path d="M53.012,18.146c0,-0.714 -0.58,-1.294 -1.294,-1.294l-2.588,0c-0.714,0 -1.293,0.58 -1.293,1.294l0,59.785c0,0.714 0.579,1.294 1.293,1.294l2.588,0c0.714,0 1.294,-0.58 1.294,-1.294l0,-59.785Z" style=""/></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect id="Artboard1" x="0" y="0" width="100" height="100" style="fill:none;"/><g id="Artboard11" serif:id="Artboard1"><g><g id="Map-Flipped" serif:id="Map Flipped"><path d="M48.556,27.619c0.113,-0.67 -0.34,-1.214 -1.01,-1.214l-2.429,0c-0.67,0 -1.306,0.544 -1.419,1.214l-6.89,40.839c-0.113,0.67 0.339,1.214 1.009,1.214l2.429,0c0.67,0 1.306,-0.544 1.419,-1.214l6.891,-40.839Z" style=""/><path d="M62.429,27.619c0.113,-0.67 -0.339,-1.214 -1.009,-1.214l-2.429,0c-0.67,0 -1.306,0.544 -1.419,1.214l-6.89,40.839c-0.113,0.67 0.339,1.214 1.009,1.214l2.429,0c0.67,0 1.306,-0.544 1.419,-1.214l6.89,-40.839Z" style=""/><path d="M67.974,43.53c0.69,0 1.341,-0.544 1.454,-1.214l0.41,-2.429c0.113,-0.67 -0.355,-1.214 -1.044,-1.214l-35.19,0c-0.69,0 -1.341,0.544 -1.454,1.214l-0.41,2.429c-0.113,0.67 0.355,1.214 1.044,1.214l35.19,0Z" style=""/><path d="M65.633,57.404c0.69,0 1.341,-0.544 1.454,-1.214l0.41,-2.429c0.113,-0.67 -0.355,-1.214 -1.044,-1.214l-35.19,0c-0.689,0 -1.341,0.544 -1.454,1.214l-0.41,2.429c-0.113,0.67 0.355,1.214 1.044,1.214l35.19,0Z" style=""/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect id="Artboard1" x="0" y="0" width="100" height="100" style="fill:none;"/><g id="Artboard11" serif:id="Artboard1"><g><g id="bind"><g><path d="M53.177,45.907l-15.824,-15.832l-4.268,4.269l13.688,13.696l-13.688,13.695l4.268,4.268l15.824,-15.826c0.57,-0.573 0.885,-1.332 0.885,-2.139c-0.002,-0.807 -0.315,-1.563 -0.885,-2.131" style="fill-rule:nonzero;"/></g><path d="M15.615,34.346l4.27,-4.27l15.83,15.829c0.568,0.568 0.882,1.328 0.88,2.134c0,0.807 -0.312,1.565 -0.88,2.133l-15.83,15.83l-4.27,-4.267l13.695,-13.696l-13.695,-13.693Z" style="fill-rule:nonzero;"/><path d="M59.808,43.694l24.911,0l0,-6.262l-31.146,0" style=""/><path d="M59.808,52.432l24.911,0l0,6.262l-31.146,0" style=""/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect id="Artboard1" x="0" y="0" width="100" height="100" style="fill:none;"/><g id="Artboard11" serif:id="Artboard1"><g><g id="compose"><g><path d="M21.829,45.907l15.824,-15.832l4.268,4.269l-13.688,13.696l13.688,13.695l-4.268,4.268l-15.824,-15.826c-0.57,-0.573 -0.885,-1.332 -0.885,-2.139c0.002,-0.807 0.315,-1.563 0.885,-2.131" style="fill-rule:nonzero;"/></g><path d="M79.391,34.346l-4.27,-4.27l-15.83,15.829c-0.568,0.568 -0.882,1.328 -0.88,2.134c0,0.807 0.312,1.565 0.88,2.133l15.83,15.83l4.27,-4.267l-13.695,-13.696l13.695,-13.693Z" style="fill-rule:nonzero;"/><path d="M60.656,34.346l-4.27,-4.27l-15.83,15.829c-0.568,0.568 -0.882,1.328 -0.88,2.134c0,0.807 0.312,1.565 0.88,2.133l15.83,15.83l4.27,-4.267l-13.695,-13.696l13.695,-13.693Z" style="fill-rule:nonzero;"/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect id="Artboard1" x="0" y="0" width="100" height="100" style="fill:none;"/><clipPath id="_clip1"><rect id="Artboard11" serif:id="Artboard1" x="0" y="0" width="100" height="100"/></clipPath><g clip-path="url(#_clip1)"><rect id="Background" x="-0.264" y="0.156" width="100.061" height="99.786" style="fill:#1e223f;"/><g id="kleisli"><g><path d="M79.506,47.808l-15.824,-15.832l-4.268,4.269l13.688,13.696l-13.688,13.695l4.268,4.268l15.824,-15.826c0.57,-0.573 0.885,-1.332 0.885,-2.139c-0.002,-0.807 -0.315,-1.563 -0.885,-2.131" style="fill-rule:nonzero;"/></g><path d="M21.944,36.247l4.27,-4.27l15.83,15.829c0.568,0.568 0.882,1.328 0.88,2.134c0,0.807 -0.312,1.565 -0.88,2.133l-15.83,15.83l-4.27,-4.267l13.695,-13.696l-13.695,-13.693Z" style="fill-rule:nonzero;"/><path d="M40.679,36.247l4.27,-4.27l15.83,15.829c0.568,0.568 0.882,1.328 0.88,2.134c0,0.807 -0.312,1.565 -0.88,2.133l-15.83,15.83l-4.27,-4.267l13.695,-13.696l-13.695,-13.693Z" style="fill-rule:nonzero;"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect id="Artboard1" x="0" y="0" width="100" height="100" style="fill:none;"/><g id="Artboard11" serif:id="Artboard1"><g><g id="forall"><path d="M29.639,24.185l6.269,0l5.743,15.779l17.032,0l5.743,-15.779l6.27,0l-17.363,47.707l-6.331,0l-17.363,-47.707Zm13.872,20.89l6.656,18.287l6.656,-18.287l-13.312,0Z" style=""/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 775 B

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect id="Artboard1" x="0" y="0" width="100" height="100" style="fill:none;"/><g id="Artboard11" serif:id="Artboard1"><g><g id="kleisli"><g><path d="M86.006,45.907l-15.824,-15.832l-4.268,4.269l13.688,13.696l-13.688,13.695l4.268,4.268l15.824,-15.826c0.57,-0.573 0.885,-1.332 0.885,-2.139c-0.002,-0.807 -0.315,-1.563 -0.885,-2.131" style="fill-rule:nonzero;"/></g><path d="M13.444,34.346l4.27,-4.27l15.83,15.829c0.568,0.568 0.882,1.328 0.88,2.134c0,0.807 -0.312,1.565 -0.88,2.133l-15.83,15.83l-4.27,-4.267l13.695,-13.696l-13.695,-13.693Z" style="fill-rule:nonzero;"/><path d="M38.637,43.694l30.063,-0.014l-6.152,-6.248l-30.146,0" style=""/><path d="M38.637,52.432l30.063,0l-6.152,6.262l-30.146,0" style=""/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 101 72" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect id="Artboard1" x="0" y="0" width="100.651" height="71.235" style="fill:none;"/><g id="Icon"><path d="M96.414,22.222l-18.005,-18.014l-4.857,4.857l15.576,15.585l-15.576,15.582l4.857,4.856l18.005,-18.007c0.649,-0.652 1.007,-1.516 1.007,-2.434c-0.003,-0.918 -0.358,-1.778 -1.007,-2.425" style="fill:#ccffd6;fill-rule:nonzero;"/><path d="M50.441,13.651c7.364,-7.356 19.315,-7.354 26.677,0.007c7.361,7.362 7.363,19.313 0.007,26.677l0.007,0.007l-26.684,26.684l-26.684,-26.684c-7.364,-7.363 -7.364,-19.32 0,-26.684c7.361,-7.361 19.312,-7.363 26.677,-0.007Z" style="fill:#c47dff;"/><path d="M27.102,26.276l-4.859,-4.858l-18.012,18.01c-0.647,0.647 -1.004,1.511 -1.002,2.428c0,0.919 0.355,1.781 1.002,2.428l18.012,18.012l4.859,-4.856l-15.583,-15.584l15.583,-15.58Z" style="fill:#ccffd6;fill-rule:nonzero;"/></g></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect id="Artboard1" x="0" y="0" width="100" height="100" style="fill:none;"/><g id="Artboard11" serif:id="Artboard1"><g id="Map"><path d="M90.506,45.907l-15.824,-15.832l-4.268,4.269l13.688,13.696l-13.688,13.695l4.268,4.268l15.824,-15.826c0.57,-0.573 0.885,-1.332 0.885,-2.139c-0.002,-0.807 -0.315,-1.563 -0.885,-2.131" style="fill-rule:nonzero;"/><path d="M29.924,34.346l-4.27,-4.27l-15.83,15.829c-0.568,0.568 -0.882,1.328 -0.88,2.134c0,0.807 0.312,1.565 0.88,2.133l15.83,15.83l4.27,-4.267l-13.695,-13.696l13.695,-13.693Z" style="fill-rule:nonzero;"/><path d="M51.304,22.848c0.484,0 0.878,0.393 0.878,0.878l0,4.969c5.339,0.735 10.415,4.272 10.951,10.001c0.027,0.289 0.039,0.579 0.041,0.869l-4.931,0.039c-0.023,-2.934 -2.79,-5.107 -6.061,-5.828l0,12.109c1.468,0.218 3.352,0.65 4.937,1.5c4.967,2.661 7.895,9.181 4.515,14.545c-1.991,3.157 -5.6,5.051 -9.452,5.574l0,4.847c0,0.485 -0.394,0.878 -0.878,0.878l-1.756,0c-0.485,0 -0.878,-0.393 -0.878,-0.878l0,-4.75c-4.77,-0.384 -9.281,-2.894 -10.969,-7.726c-0.351,-1.007 -0.529,-2.071 -0.537,-3.139l4.931,-0.039c0.024,3.085 3.085,5.33 6.575,5.927l0,-12.096c-0.618,-0.06 -1.308,-0.154 -1.945,-0.301c-5.207,-1.206 -10.046,-5.836 -9.512,-11.531c0.5,-5.342 5.647,-9.416 11.457,-10.055l0,-4.915c0,-0.485 0.393,-0.878 0.878,-0.878l1.756,0Zm0.878,27.969l0,11.83c2.136,-0.357 4.109,-1.432 5.32,-3.411c0.745,-1.22 0.945,-2.758 0.448,-4.118c-0.852,-2.328 -3.189,-3.791 -5.768,-4.301Zm-3.512,-17.235c-2.331,0.263 -4.527,1.346 -5.834,3.483c-0.745,1.22 -0.945,2.758 -0.448,4.118c0.908,2.482 3.504,3.981 6.282,4.389l0,-11.99Z" style=""/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 100 100" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><rect id="Artboard1" x="0" y="0" width="100" height="100" style="fill:none;"/><g id="Artboard11" serif:id="Artboard1"><g><g id="Map-Flipped" serif:id="Map Flipped"><g><path d="M90.506,47.151l-15.824,-15.832l-4.268,4.269l13.688,13.696l-13.688,13.695l4.268,4.268l15.824,-15.826c0.57,-0.573 0.885,-1.332 0.885,-2.139c-0.002,-0.807 -0.315,-1.563 -0.885,-2.131" style="fill-rule:nonzero;"/></g><path d="M29.924,35.59l-4.27,-4.27l-15.83,15.829c-0.568,0.568 -0.882,1.328 -0.88,2.134c0,0.807 0.312,1.565 0.88,2.133l15.83,15.83l4.27,-4.267l-13.695,-13.696l13.695,-13.693Z" style="fill-rule:nonzero;"/><path d="M48.556,27.619c0.113,-0.67 -0.34,-1.214 -1.01,-1.214l-2.429,0c-0.67,0 -1.306,0.544 -1.419,1.214l-6.89,40.839c-0.113,0.67 0.339,1.214 1.009,1.214l2.429,0c0.67,0 1.306,-0.544 1.419,-1.214l6.891,-40.839Z" style=""/><path d="M62.429,27.619c0.113,-0.67 -0.339,-1.214 -1.009,-1.214l-2.429,0c-0.67,0 -1.306,0.544 -1.419,1.214l-6.89,40.839c-0.113,0.67 0.339,1.214 1.009,1.214l2.429,0c0.67,0 1.306,-0.544 1.419,-1.214l6.89,-40.839Z" style=""/><path d="M67.974,43.53c0.69,0 1.341,-0.544 1.454,-1.214l0.41,-2.429c0.113,-0.67 -0.355,-1.214 -1.044,-1.214l-35.19,0c-0.69,0 -1.341,0.544 -1.454,1.214l-0.41,2.429c-0.113,0.67 0.355,1.214 1.044,1.214l35.19,0Z" style=""/><path d="M65.633,57.404c0.69,0 1.341,-0.544 1.454,-1.214l0.41,-2.429c0.113,-0.67 -0.355,-1.214 -1.044,-1.214l-35.19,0c-0.689,0 -1.341,0.544 -1.454,1.214l-0.41,2.429c-0.113,0.67 0.355,1.214 1.044,1.214l35.19,0Z" style=""/></g></g></g></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 100 100" fill-rule="nonzero" stroke-linejoin="round" stroke-miterlimit="2"><path d="M28.72 46.524l8.94.26-7.843 7.388h40.97l-7.87 6.732H29.753l7.64 7.302-8.76.267-10.928-10.88 11.013-11.07zM17.493 57.806l.213-.213-.213.213z" fill="#fafafa"/><path d="M71.3 53.472l-8.94-.26 7.843-7.388H29.4l7.723-6.732h33.163l-7.64-7.302 8.758-.267 10.93 10.88L71.3 53.472zM82.536 42.2l-.213.213.213-.213z" fill="#fff" fill-opacity=".14"/></svg>

After

Width:  |  Height:  |  Size: 508 B

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
<svg clip-rule="evenodd" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" version="1.1" viewBox="0 0 100 100" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g fill-rule="nonzero"><path d="m69.418 69.64l-7.256-6.775h-31.862l7.256 6.775h31.862z"/><path d="m37.556 45.889l-7.256 6.775h31.863l7.255-6.775h-31.862z"/><path d="m69.416 35.686l-7.254-6.777h-31.86l7.254 6.777h31.86z"/><path d="m26.948 42.391l-4.794-4.793-17.772 17.77c-0.638 0.638-0.99 1.491-0.988 2.396 0 0.906 0.35 1.757 0.988 2.395l17.772 17.772 4.794-4.791-15.375-15.376 15.375-15.373z"/><path d="m95.336 38.392l-17.765-17.774-4.792 4.792 15.368 15.377-15.368 15.374 4.792 4.792 17.765-17.767c0.64-0.644 0.994-1.496 0.994-2.402-3e-3 -0.906-0.354-1.754-0.994-2.392"/></g></svg>

After

Width:  |  Height:  |  Size: 907 B

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 39 34" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><path d="M0,33.021l12.425,-21.521l3.753,6.5l-8.672,15.021l-7.506,0Zm24.85,0l-11.571,0l5.785,-10.021l5.786,10.021Zm13.279,0l-7.506,0l-15.311,-26.521l3.752,-6.5l19.065,33.021Z"/></svg>

After

Width:  |  Height:  |  Size: 622 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 30 KiB

53
components/dist/bundle.js vendored Normal file

File diff suppressed because one or more lines are too long

25
components/index.html Normal file
View File

@ -0,0 +1,25 @@
<!doctype>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Overpass|Playfair+Display|Montserrat:300,400,500,600,700,800,900&display=swap" rel="stylesheet">
<style>
html, body, #app {
margin: 0;
padding: 0;
overscroll-behavior: none;
background-color: pink;
}
@font-face {
font-family: "PragmataPro";
src: url('./fonts/PragmataProLiga-Regular.woff2') format('woff2'),
url('./fonts/PragmataProLiga-Regular.woff') format('woff');
font-weight: normal;
font-style: normal;
}
</style>
<title>Kleislove</title>
</head>
<body>
<div id="app"></div>
</body>
</html>

13484
components/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

62
components/package.json Normal file
View File

@ -0,0 +1,62 @@
{
"name": "psfp",
"version": "1.0.0",
"private": true,
"description": "",
"directories": {
"test": "test"
},
"browser": {
"xhr2": false
},
"scripts": {
"test": "spago test",
"build": "spago build && webpack --config webpack.production.js",
"start:local": "webpack",
"webpack": "DEBUG=purs-loader* DEBUG_DEPTH=100 webpack --config webpack.dev.js --progress --bail",
"webpack:watch": "DEBUG=purs-loader* DEBUG_DEPTH=100 webpack --config webpack.dev.js --progress --display-error-details --display verbose --watch",
"webpack:server": "webpack-dev-server --config webpack.dev.js --progress --inline --hot",
"webpack:server:debug": "DEBUG=purs-loader* DEBUG_DEPTH=100 webpack-dev-server --config webpack.dev.js --mode development --progress --inline --hot",
"storybook": "start-storybook -s ./server/static -p 9001",
"replace-module": "sed -i '' -e 's/\"__module__\"/module/g' output/*Stories/index.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/i-am-the-slime/psfp.git"
},
"author": "mark.eibes@gmail.com",
"license": "ISC",
"bugs": {
"url": "https://github.com/i-am-the-slime/psfp/issues"
},
"homepage": "https://github.com/i-am-the-slime/psfp#readme",
"dependencies": {
"@material-ui/styles": "^4.4.3",
"@monaco-editor/react": "^1.2.2",
"purty": "^4.5.1",
"react": "^16.9.0",
"react-dom": "^16.9.0",
"react-hot-loader": "^4.12.15",
"smoothscroll-polyfill": "^0.4.4"
},
"devDependencies": {
"@babel/core": "^7.6.0",
"@storybook/react": "^5.2.0",
"@testing-library/react": "^9.1.4",
"babel-loader": "^8.0.6",
"css-loader": "^3.2.0",
"deep-equal": "^1.1.0",
"jsdom": "^15.1.1",
"jsdom-global": "^3.0.2",
"purescript": "^0.13.3",
"purescript-psa": "^0.7.3",
"purs-loader": "^3.6.0",
"react-svg-loader": "^3.0.3",
"spago": "^0.10.0",
"webpack": "^4.41.0",
"webpack-cli": "^3.3.6",
"webpack-dev-server": "^3.8.1",
"webpack-merge": "^4.2.2",
"wrappy": "^1.0.2"
}
}

1
components/packages.dhall Symbolic link
View File

@ -0,0 +1 @@
../packages.dhall

15
components/shell.nix Normal file
View File

@ -0,0 +1,15 @@
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
let
easyPS = import (pkgs.fetchFromGitHub {
owner = "justinwoo";
repo = "easy-purescript-nix";
rev = "ee8d4545c3eb14ea75b789dbfb84e4e8573941b5";
sha256 = "16bcllaf2ra0cbgkc5vlirkh2kkf16237xp4wng6314m3fsxmmag";
}) { inherit pkgs; };
in stdenv.mkDerivation {
name = "env";
buildInputs = with easyPS; [ purs spago ];
}

28
components/spago.dhall Normal file
View File

@ -0,0 +1,28 @@
{-
Welcome to a Spago project!
You can edit this file as you like.
-}
{ name =
"my-project"
, dependencies =
[ "console"
, "css"
, "debug"
, "effect"
, "matryoshka"
, "milkis"
, "psci-support"
, "pseudo-random"
, "react-basic"
, "react-basic-hooks"
, "react-testing-library"
, "record-extra"
, "spec-discovery"
, "string-parsers"
, "web-html"
]
, packages =
./packages.dhall
, sources =
[ "src/**/*.purs", "test/**/*.purs" ]
}

1
components/src/Shared Symbolic link
View File

@ -0,0 +1 @@
../../shared/Shared

View File

@ -90,7 +90,8 @@ mkButton = do
fromMaybe theme.textColour do
hlc <- theme.highlightColour # fromHexString
hlcd <- theme.highlightColourDark # fromHexString
let bg = if theme.isLight then hlc else mix HSL hlc hlcd 0.5
let
bg = if theme.isLight then hlc else mix HSL hlc hlcd 0.5
tc <- theme.textColour # fromHexString
pure $ increaseContrast bg tc # toHexString
, backgroundSize: "400% 400%, 100% 100%"

View File

@ -1,15 +1,14 @@
module CompileEditor.Component where
import Prelude hiding (add)
import Button.Component (ButtonType(..), mkButton)
import Card.Component (mkCard)
import Data.Array (intercalate)
import Data.Either (Either(..))
import Data.Foldable (for_)
import Data.Nullable (null)
import Data.Maybe (Maybe(..))
import Data.Tuple.Nested ((/\))
import Editor (getValue, mkEditor)
import Editor (getValue, mkEditor, setValue)
import Effect (Effect)
import Effect.Aff (Aff, error, launchAff_, throwError)
import Effect.Class (liftEffect)
@ -19,19 +18,32 @@ import React.Basic (ReactComponent)
import React.Basic.DOM (css)
import React.Basic.DOM as R
import React.Basic.Events (handler_)
import React.Basic.Hooks (component, element, fragment, readRefMaybe, useRef, useState)
import React.Basic.Hooks (component, element, fragment, useState)
import React.Basic.Hooks as React
import Shared.Json (readAff)
import Shared.Models.Body as Body
import Simple.JSON (writeJSON)
mkCompileEditor ∷ Effect (ReactComponent {})
type Props
= { initialCode :: String }
mkCompileEditor ∷ Effect (ReactComponent Props)
mkCompileEditor = do
editor <- mkEditor
card <- mkCard
button <- mkButton
component "StorybookEditor" \{} -> React.do
editorRef <- useRef null
component "StorybookEditor" \{ initialCode } -> React.do
maybeEditor /\ modifyEditor <- useState Nothing
let
onLoad e = do
setValue initialCode e
modifyEditor (const $ Just e)
-- useEffect editorLoaded do
-- maybeEditor <- readRefMaybe editorRef # liftEffect
-- let
-- _ = spy "No fucks given" maybeEditor
-- liftEffect $ for_ maybeEditor (setValue initialCode)
-- pure (pure unit)
compileResult /\ modifyCompileResult <- useState ""
let
setCompileResult = modifyCompileResult <<< const
@ -43,18 +55,18 @@ mkCompileEditor = do
, buttonProps:
{ onClick:
handler_ do
maybeEditor <- (readRefMaybe editorRef)
for_ maybeEditor \ed -> do
code <- getValue ed
launchAff_ do
res <- compileAndRun { code }
liftEffect $ setCompileResult case res of
Left cr -> (cr.result.errors <#> _.message # intercalate "/n")
Right r -> r.stdout
liftEffect
$ setCompileResult case res of
Left cr -> (cr.result.errors <#> _.message # intercalate "/n")
Right r -> r.stdout
}
}
, element card { children: [ R.text compileResult ] }
, R.div { children: [ element editor { editorRef } ], style: css { height: "100%" } }
, R.div { children: [ element editor { onLoad } ], style: css { height: "100%" } }
]
fetch ∷ M.Fetch
@ -69,6 +81,6 @@ compileAndRun body = do
, headers: M.makeHeaders { "Content-Type": "application/json" }
}
case M.statusCode response of
200 -> M.json response >>= readAff <#> Left
400 -> M.json response >>= readAff <#> Right
code -> throwError (error $ "Unexpected response code " <> show code)
200 -> M.json response >>= readAff <#> Right
422 -> M.json response >>= readAff <#> Left
code -> throwError (error $ "Unexpected response code " <> show code)

View File

@ -13,6 +13,14 @@ exports.getValue = function(editor) {
};
};
exports.setValue = function(value) {
return function(editor) {
return function() {
editor.setValue(value);
};
};
};
exports.defineThemeImpl = function(monacoInstance) {
return function(name) {
return function(theme) {

View File

@ -1,11 +1,9 @@
module Editor where
import Prelude
import CSS.Safer (cssSafer)
import Control.Promise (Promise)
import Control.Promise as Promise
import Data.Nullable (Nullable, notNull)
import Effect (Effect)
import Effect.Aff (Aff)
import Effect.Class (liftEffect)
@ -13,7 +11,7 @@ import Effect.Uncurried (EffectFn2, mkEffectFn2)
import Foreign (Foreign, unsafeToForeign)
import Prim.Row (class Union)
import React.Basic (JSX, ReactComponent, element, fragment)
import React.Basic.Hooks (Ref, component, writeRef)
import React.Basic.Hooks (component)
import React.Basic.Hooks as React
import React.Basic.Hooks.Aff (useAff)
import React.Helpers (wrapperDiv)
@ -47,6 +45,8 @@ foreign import vsCodeTheme ∷ MonacoTheme
foreign import getValue ∷ Editor -> Effect String
foreign import setValue ∷ String -> Editor -> Effect Unit
foreign import data Monaco ∷ Type
foreign import data Editor ∷ Type
@ -81,7 +81,10 @@ initEditor = do
registerLanguageImpl monaco "purescript" # liftEffect
setMonarchTokensProviderImpl monaco "purescript" purescriptSyntax # liftEffect
mkEditor ∷ Effect (ReactComponent { editorRef ∷ Ref (Nullable _) })
type Props
= { onLoad ∷ Editor -> Effect Unit }
mkEditor ∷ Effect (ReactComponent Props)
mkEditor = do
useStyles <-
makeStyles \(theme ∷ CSSTheme) ->
@ -96,11 +99,12 @@ mkEditor = do
, backgroundColor: theme.backgroundColour
}
}
component "Editor" \{ editorRef } -> React.do
component "Editor" \{ onLoad } -> React.do
classes <- useStyles
useAff unit initEditor
theme <- useTheme
let themeName = if theme.isLight then lightThemeName else darkThemeName
let
themeName = if theme.isLight then lightThemeName else darkThemeName
pure
$ fragment
[ wrapperDiv { className: classes.wrapper }
@ -122,6 +126,6 @@ mkEditor = do
, language: "purescript"
-- https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages
, editorDidMount:
mkEffectFn2 \_ -> notNull >>> writeRef editorRef
mkEffectFn2 \_ -> onLoad
}
]

View File

@ -0,0 +1,156 @@
module React.Helpers where
import Prelude
import Data.Nullable (Nullable)
import Data.Symbol (SProxy(..))
import Foreign.Object (Object)
import Prim.Row (class Lacks, class Union)
import React.Basic (JSX)
import React.Basic.DOM (CSS)
import React.Basic.DOM as R
import React.Basic.Events (EventHandler)
import React.Basic.Hooks (Ref)
import Record (insert)
import Web.DOM (Node)
wrapperDiv ∷
∀ attrs attrs_.
Lacks "children" attrs =>
Union attrs attrs_ Props_div_no_children =>
{ | attrs } ->
JSX ->
JSX
wrapperDiv props child = R.div $ insert (SProxy ∷ _ "children") [ child ] props
type Props_div_no_children
= ( _data ∷ Object String
, about ∷ String
, acceptCharset ∷ String
, accessKey ∷ String
, allowFullScreen ∷ Boolean
, allowTransparency ∷ Boolean
, autoComplete ∷ Boolean
, autoFocus ∷ Boolean
, autoPlay ∷ Boolean
, capture ∷ Boolean
, cellPadding ∷ String
, cellSpacing ∷ String
, charSet ∷ String
, classID ∷ String
, className ∷ String
, colSpan ∷ Int
, contentEditable ∷ Boolean
, contextMenu ∷ String
, crossOrigin ∷ String
, dangerouslySetInnerHTML ∷ { __html ∷ String }
, datatype ∷ String
, dateTime ∷ String
, dir ∷ String
, draggable ∷ Boolean
, encType ∷ String
, formAction ∷ String
, formEncType ∷ String
, formMethod ∷ String
, formNoValidate ∷ Boolean
, formTarget ∷ String
, frameBorder ∷ String
, hidden ∷ Boolean
, hrefLang ∷ String
, htmlFor ∷ String
, httpEquiv ∷ String
, icon ∷ String
, id ∷ String
, inlist ∷ String
, inputMode ∷ String
, is ∷ String
, itemID ∷ String
, itemProp ∷ String
, itemRef ∷ String
, itemScope ∷ Boolean
, itemType ∷ String
, key ∷ String
, keyParams ∷ String
, keyType ∷ String
, lang ∷ String
, marginHeight ∷ String
, marginWidth ∷ String
, maxLength ∷ Int
, mediaGroup ∷ String
, minLength ∷ Int
, noValidate ∷ Boolean
, onAnimationEnd ∷ EventHandler
, onAnimationIteration ∷ EventHandler
, onAnimationStart ∷ EventHandler
, onBlur ∷ EventHandler
, onClick ∷ EventHandler
, onCompositionEnd ∷ EventHandler
, onCompositionStart ∷ EventHandler
, onCompositionUpdate ∷ EventHandler
, onContextMenu ∷ EventHandler
, onCopy ∷ EventHandler
, onCut ∷ EventHandler
, onDoubleClick ∷ EventHandler
, onDrag ∷ EventHandler
, onDragEnd ∷ EventHandler
, onDragEnter ∷ EventHandler
, onDragExit ∷ EventHandler
, onDragLeave ∷ EventHandler
, onDragOver ∷ EventHandler
, onDragStart ∷ EventHandler
, onDrop ∷ EventHandler
, onFocus ∷ EventHandler
, onGotPointerCapture ∷ EventHandler
, onInvalid ∷ EventHandler
, onKeyDown ∷ EventHandler
, onKeyPress ∷ EventHandler
, onKeyUp ∷ EventHandler
, onLostPointerCapture ∷ EventHandler
, onMouseDown ∷ EventHandler
, onMouseEnter ∷ EventHandler
, onMouseLeave ∷ EventHandler
, onMouseMove ∷ EventHandler
, onMouseOut ∷ EventHandler
, onMouseOver ∷ EventHandler
, onMouseUp ∷ EventHandler
, onPaste ∷ EventHandler
, onPointerCancel ∷ EventHandler
, onPointerDown ∷ EventHandler
, onPointerEnter ∷ EventHandler
, onPointerLeave ∷ EventHandler
, onPointerMove ∷ EventHandler
, onPointerOut ∷ EventHandler
, onPointerOver ∷ EventHandler
, onPointerUp ∷ EventHandler
, onSelect ∷ EventHandler
, onSubmit ∷ EventHandler
, onTouchCancel ∷ EventHandler
, onTouchEnd ∷ EventHandler
, onTouchMove ∷ EventHandler
, onTouchStart ∷ EventHandler
, onTransitionEnd ∷ EventHandler
, onWheel ∷ EventHandler
, prefix ∷ String
, property ∷ String
, radioGroup ∷ String
, readOnly ∷ Boolean
, ref ∷ Ref (Nullable Node)
, resource ∷ String
, role ∷ String
, rowSpan ∷ Int
, scoped ∷ Boolean
, seamless ∷ Boolean
, security ∷ String
, spellCheck ∷ Boolean
, srcDoc ∷ JSX
, srcLang ∷ String
, srcSet ∷ String
, style ∷ CSS
, suppressContentEditableWarning ∷ Boolean
, tabIndex ∷ Int
, title ∷ String
, typeof ∷ String
, unselectable ∷ Boolean
, useMap ∷ String
, vocab ∷ String
, wmode ∷ String
)

View File

@ -0,0 +1,29 @@
"use strict";
var alternative = require("../../../assets/icons/alternative.svg");
var ap = require("../../../assets/icons/ap.svg");
var append = require("../../../assets/icons/append.svg");
var apply = require("../../../assets/icons/apply.svg");
var applyflipped = require("../../../assets/icons/applyflipped.svg");
var bind = require("../../../assets/icons/bind.svg");
var compose = require("../../../assets/icons/compose.svg");
var forall = require("../../../assets/icons/forall.svg");
var kleisli = require("../../../assets/icons/kleisli.svg");
var map = require("../../../assets/icons/map.svg");
var mapflipped = require("../../../assets/icons/mapflipped.svg");
var pslogo = require("../../../assets/icons/pslogo.svg");
var trianglelogo = require("../../../assets/icons/trianglelogo.svg");
exports.alternativeIconRaw = alternative.default;
exports.apIconRaw = ap.default;
exports.appendIconRaw = append.default;
exports.applyIconRaw = apply.default;
exports.applyflippedIconRaw = applyflipped.default;
exports.bindIconRaw = bind.default;
exports.composeIconRaw = compose.default;
exports.forallIconRaw = forall.default;
exports.kleisliIconRaw = kleisli.default;
exports.mapIconRaw = map.default;
exports.mapflippedIconRaw = mapflipped.default;
exports.pslogoIconRaw = pslogo.default;
exports.trianglelogoIconRaw = trianglelogo.default;

View File

@ -0,0 +1,4 @@
"use strict";
exports.landingPageLightRaw = require("../../../assets/images/landingpagelight.svg").default;
exports.landingPageDarkRaw = require("../../../assets/images/landingpagedark.svg").default;

View File

@ -0,0 +1,99 @@
module Theme where
import Prelude
import CSS (ColorSpace(..), blue, brightness, contrast, darken, desaturate, isLight, lighten, mix, rotateHue, toHexString)
import Color (Color)
import Data.Foldable (intercalate)
import Data.Symbol (SProxy(..))
import Record.Builder as RB
import Theme.Types (Theme, CSSTheme)
increaseContrast ∷ Color -> Color -> Color
increaseContrast contrastWith = go 0
where
modify = if isLight contrastWith then darken else lighten
go i col =
if contrast contrastWith col >= 7.5 || i >= 20 then
col
else
go (i + 1) (modify 0.1 col)
f ∷ ∀ fieldName. SProxy fieldName
f = SProxy
fromTheme ∷ Theme -> CSSTheme
fromTheme theme =
RB.build
( -- background
RB.modify (f ∷ _ "backgroundColour") toHexString
>>> RB.insert (f ∷ _ "backgroundColourLighter")
(theme.backgroundColour # lighter >>> toHexString)
>>> RB.modify (f ∷ _ "interfaceColour") toHexString
>>> RB.insert (f ∷ _ "interfaceColourLighter")
(theme.interfaceColour # lighter >>> toHexString)
>>> RB.insert (f ∷ _ "interfaceColourLightest")
(theme.interfaceColour # lighter >>> lighter >>> toHexString)
>>> RB.insert (f ∷ _ "interfaceColourDarker")
(theme.interfaceColour # darker >>> toHexString)
>>> RB.insert (f ∷ _ "interfaceColourDarkest")
(theme.interfaceColour # darker >>> darker >>> toHexString)
-- foreground
>>> RB.modify (f ∷ _ "textColour") toHexString
>>> RB.insert (f ∷ _ "textColourLighter")
(theme.textColour # lighter >>> toHexString)
>>> RB.insert (f ∷ _ "textColourLightest")
(theme.textColour # lighter >>> lighter >>> toHexString)
>>> RB.insert (f ∷ _ "textColourDarker")
(theme.textColour # darker >>> toHexString)
>>> RB.insert (f ∷ _ "textColourDarkest")
(theme.textColour # darker >>> darker >>> toHexString)
-- highlight
>>> RB.modify (f ∷ _ "highlightColour") toHexString
>>> RB.insert (f ∷ _ "highlightColourDark")
(theme.highlightColour # darken 0.2 # rotateHue (-10.0) # toHexString)
-- altHighlight
>>> RB.modify (f ∷ _ "altHighlightColour") toHexString
>>> RB.insert (f ∷ _ "altHighlightColourDark")
(theme.altHighlightColour # darken 0.2 # toHexString)
-- palette
>>> RB.modify (f ∷ _ "yellow") toHexString
>>> RB.modify (f ∷ _ "green") toHexString
>>> RB.modify (f ∷ _ "pink") toHexString
>>> RB.modify (f ∷ _ "orange") toHexString
>>> RB.modify (f ∷ _ "turquoise") toHexString
>>> RB.modify (f ∷ _ "red") toHexString
>>> RB.modify (f ∷ _ "blue") toHexString
-- fonts
>>> RB.modify (f ∷ _ "textFontFamily") (intercalate ",")
>>> RB.modify (f ∷ _ "headingFontFamily") (intercalate ",")
>>> RB.insert (f ∷ _ "isLight") isLightTheme
)
theme
where
isLightTheme = isLight theme.backgroundColour
yellower ∷ Color -> Color
yellower col =
if brightness col > 0.8 then
lighten 0.02 col
else
col
# lighten 0.1
# desaturate 0.03
bluer col =
mix HSL col blue 0.05
# darken 0.1
# desaturate 0.03
lighter ∷ Color -> Color
lighter = yellower
darker ∷ Color -> Color
darker = bluer

View File

@ -0,0 +1,115 @@
module Decorator.FullScreen where
import Prelude
import CSS.Safer (cssSafer)
import Data.Array (find)
import Data.Map (Map)
import Data.Maybe (Maybe, fromMaybe)
import Data.Traversable (traverse_)
import Effect (Effect)
import React.Basic (JSX)
import React.Basic.DOM (css)
import React.Basic.DOM as R
import React.Basic.DOM.Events (targetValue)
import React.Basic.Events (handler)
import React.Basic.Hooks (ReactComponent, component, element, useState, (/\))
import React.Basic.Hooks as React
import Simple.JSON (readJSON_, writeJSON)
import Theme (fromTheme)
import Theme.Default (darkTheme, lightTheme)
import Theme.Provider (mkThemeProvider)
import Theme.Styles (makeStyles_)
import Theme.Types (CSSTheme)
import Web.HTML (window)
import Web.HTML.Window (localStorage)
import Web.Storage.Storage (getItem, setItem)
fullScreenDecorator ∷ Effect JSX -> Effect JSX
fullScreenDecorator mkChild = do
let
dark = fromTheme darkTheme
light = fromTheme lightTheme
child <- mkChild
themeSwitcher <- mkThemeSwitcher
pure
$ R.div
{ style:
css
{ minWidth: "100vw"
, height: "100vh"
}
, children:
[ element themeSwitcher
{ children: [ child ]
, defaultTheme: { name: "Dark", theme: dark }
, themes:
[ { name: "Dark", theme: dark }
, { name: "Light", theme: light }
]
}
]
}
type ThemesWithNames
= Map String CSSTheme
type DefaultTheme
= { name ∷ String, theme ∷ CSSTheme }
mkThemeSwitcher ∷
Effect
( ReactComponent { defaultTheme ∷ DefaultTheme, themes ∷ Array DefaultTheme, children ∷ Array JSX }
)
mkThemeSwitcher = do
themeProvider <- mkThemeProvider
useStyles <-
makeStyles_
{ selector:
cssSafer
{ position: "absolute"
, zIndex: 20
, top: 10
, right: 10
}
}
storage <- window >>= localStorage
saved ∷ (Maybe DefaultTheme) <- getItem "theme" storage <#> (_ >>= readJSON_)
component "ThemeSwitcher" \{ defaultTheme, themes, children } -> React.do
classes <- useStyles
{ theme, name } /\ modTheme <- useState $ fromMaybe defaultTheme saved
let
setTheme newTheme = do
setItem "theme" (writeJSON newTheme) storage
modTheme (const newTheme)
let
handleClicked maybeValue =
traverse_ setTheme do
value <- maybeValue
themes # find \x -> x.name == value
let
themeSelect =
R.select
{ onChange: handler targetValue handleClicked
, value: name
, className: classes.selector
, children:
themes
<#> \x ->
R.option
{ value: x.name
, key: x.name
, children: [ R.text x.name ]
}
}
pure
$ element themeProvider
{ theme
, children:
[ R.div
{ style: css { backgroundColor: theme.backgroundColour, width: "100%", height: "100%" }
, children:
[ themeSelect ] <> children
}
]
}

View File

@ -1,16 +1,24 @@
module EditorStories where
import Prelude hiding (add)
import CompileEditor.Component (mkCompileEditor)
import Decorator.FullScreen (fullScreenDecorator)
import Effect (Effect)
import Storybook.React (Storybook, add, addDecorator, storiesOf)
initialCode :: String
initialCode =
"""module Main where
import Batteries
main :: Effect Unit
main ="""
stories ∷ Effect Storybook
stories = do
storiesOf "Editor" do
addDecorator fullScreenDecorator
add "The Editor" mkCompileEditor
[ {}
[ { initialCode }
]

Some files were not shown because too many files have changed in this diff Show More