@liascript/editor 1.1.6--0.15.12 → 1.1.7--0.16.0
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/CHANGELOG.md +9 -3
- package/README.md +1 -1
- package/dist/{Base.9a5d63ee.js → Base.605d9ab5.js} +1 -1
- package/dist/{Base.a9e738fa.js → Base.d8e1fc60.js} +1 -1
- package/dist/index.11182e74.js +1 -0
- package/dist/index.55026812.js +1 -0
- package/dist/index.691fb05c.js +1 -0
- package/dist/index.756a5816.css +1 -0
- package/dist/index.796e2c5e.js +1 -0
- package/dist/index.html +1 -1
- package/dist/jszip.min.0e12e848.js +13 -0
- package/dist/jszip.min.a7b69263.js +13 -0
- package/package.json +9 -2
- package/.elm/0.19.1/packages/BrianHicks/elm-string-graphemes/1.0.4/LICENSE +0 -11
- package/.elm/0.19.1/packages/BrianHicks/elm-string-graphemes/1.0.4/README.md +0 -172
- package/.elm/0.19.1/packages/BrianHicks/elm-string-graphemes/1.0.4/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/BrianHicks/elm-string-graphemes/1.0.4/docs.json +0 -1
- package/.elm/0.19.1/packages/NoRedInk/elm-json-decode-pipeline/1.0.1/LICENSE +0 -27
- package/.elm/0.19.1/packages/NoRedInk/elm-json-decode-pipeline/1.0.1/README.md +0 -107
- package/.elm/0.19.1/packages/NoRedInk/elm-json-decode-pipeline/1.0.1/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/NoRedInk/elm-json-decode-pipeline/1.0.1/docs.json +0 -1
- package/.elm/0.19.1/packages/andre-dietrich/elm-conditional/1.0.0/LICENSE +0 -29
- package/.elm/0.19.1/packages/andre-dietrich/elm-conditional/1.0.0/README.md +0 -51
- package/.elm/0.19.1/packages/andre-dietrich/elm-conditional/1.0.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/andre-dietrich/elm-conditional/1.0.0/docs.json +0 -1
- package/.elm/0.19.1/packages/andre-dietrich/elm-random-regex/1.0.9/LICENSE +0 -21
- package/.elm/0.19.1/packages/andre-dietrich/elm-random-regex/1.0.9/README.md +0 -313
- package/.elm/0.19.1/packages/andre-dietrich/elm-random-regex/1.0.9/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/andre-dietrich/elm-random-regex/1.0.9/docs.json +0 -1
- package/.elm/0.19.1/packages/andre-dietrich/elm-svgbob/5.0.2/LICENSE +0 -202
- package/.elm/0.19.1/packages/andre-dietrich/elm-svgbob/5.0.2/README.md +0 -820
- package/.elm/0.19.1/packages/andre-dietrich/elm-svgbob/5.0.2/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/andre-dietrich/elm-svgbob/5.0.2/docs.json +0 -1
- package/.elm/0.19.1/packages/andre-dietrich/parser-combinators/4.1.0/LICENSE +0 -24
- package/.elm/0.19.1/packages/andre-dietrich/parser-combinators/4.1.0/README.md +0 -7
- package/.elm/0.19.1/packages/andre-dietrich/parser-combinators/4.1.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/andre-dietrich/parser-combinators/4.1.0/docs.json +0 -1
- package/.elm/0.19.1/packages/avh4/elm-color/1.0.0/LICENSE +0 -11
- package/.elm/0.19.1/packages/avh4/elm-color/1.0.0/README.md +0 -57
- package/.elm/0.19.1/packages/avh4/elm-color/1.0.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/avh4/elm-color/1.0.0/docs.json +0 -1
- package/.elm/0.19.1/packages/danfishgold/base64-bytes/1.1.0/LICENSE +0 -11
- package/.elm/0.19.1/packages/danfishgold/base64-bytes/1.1.0/README.md +0 -58
- package/.elm/0.19.1/packages/danfishgold/base64-bytes/1.1.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/danfishgold/base64-bytes/1.1.0/docs.json +0 -1
- package/.elm/0.19.1/packages/elm/browser/1.0.2/LICENSE +0 -11
- package/.elm/0.19.1/packages/elm/browser/1.0.2/README.md +0 -21
- package/.elm/0.19.1/packages/elm/browser/1.0.2/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/elm/browser/1.0.2/docs.json +0 -1
- package/.elm/0.19.1/packages/elm/bytes/1.0.8/LICENSE +0 -30
- package/.elm/0.19.1/packages/elm/bytes/1.0.8/README.md +0 -56
- package/.elm/0.19.1/packages/elm/bytes/1.0.8/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/elm/bytes/1.0.8/docs.json +0 -1
- package/.elm/0.19.1/packages/elm/core/1.0.5/LICENSE +0 -11
- package/.elm/0.19.1/packages/elm/core/1.0.5/README.md +0 -30
- package/.elm/0.19.1/packages/elm/core/1.0.5/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/elm/core/1.0.5/docs.json +0 -1
- package/.elm/0.19.1/packages/elm/file/1.0.5/LICENSE +0 -30
- package/.elm/0.19.1/packages/elm/file/1.0.5/README.md +0 -127
- package/.elm/0.19.1/packages/elm/file/1.0.5/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/elm/file/1.0.5/docs.json +0 -1
- package/.elm/0.19.1/packages/elm/html/1.0.0/LICENSE +0 -30
- package/.elm/0.19.1/packages/elm/html/1.0.0/README.md +0 -50
- package/.elm/0.19.1/packages/elm/html/1.0.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/elm/html/1.0.0/docs.json +0 -1
- package/.elm/0.19.1/packages/elm/http/2.0.0/LICENSE +0 -30
- package/.elm/0.19.1/packages/elm/http/2.0.0/README.md +0 -36
- package/.elm/0.19.1/packages/elm/http/2.0.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/elm/http/2.0.0/docs.json +0 -1
- package/.elm/0.19.1/packages/elm/json/1.1.3/LICENSE +0 -30
- package/.elm/0.19.1/packages/elm/json/1.1.3/README.md +0 -63
- package/.elm/0.19.1/packages/elm/json/1.1.3/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/elm/json/1.1.3/docs.json +0 -1
- package/.elm/0.19.1/packages/elm/random/1.0.0/LICENSE +0 -30
- package/.elm/0.19.1/packages/elm/random/1.0.0/README.md +0 -46
- package/.elm/0.19.1/packages/elm/random/1.0.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/elm/random/1.0.0/docs.json +0 -1
- package/.elm/0.19.1/packages/elm/regex/1.0.0/LICENSE +0 -30
- package/.elm/0.19.1/packages/elm/regex/1.0.0/README.md +0 -59
- package/.elm/0.19.1/packages/elm/regex/1.0.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/elm/regex/1.0.0/docs.json +0 -1
- package/.elm/0.19.1/packages/elm/svg/1.0.1/LICENSE +0 -30
- package/.elm/0.19.1/packages/elm/svg/1.0.1/README.md +0 -62
- package/.elm/0.19.1/packages/elm/svg/1.0.1/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/elm/svg/1.0.1/docs.json +0 -1
- package/.elm/0.19.1/packages/elm/time/1.0.0/LICENSE +0 -30
- package/.elm/0.19.1/packages/elm/time/1.0.0/README.md +0 -94
- package/.elm/0.19.1/packages/elm/time/1.0.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/elm/time/1.0.0/docs.json +0 -1
- package/.elm/0.19.1/packages/elm/url/1.0.0/LICENSE +0 -27
- package/.elm/0.19.1/packages/elm/url/1.0.0/README.md +0 -32
- package/.elm/0.19.1/packages/elm/url/1.0.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/elm/url/1.0.0/docs.json +0 -1
- package/.elm/0.19.1/packages/elm/virtual-dom/1.0.3/LICENSE +0 -30
- package/.elm/0.19.1/packages/elm/virtual-dom/1.0.3/README.md +0 -5
- package/.elm/0.19.1/packages/elm/virtual-dom/1.0.3/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/elm/virtual-dom/1.0.3/docs.json +0 -1
- package/.elm/0.19.1/packages/elm-community/list-extra/8.7.0/LICENSE +0 -21
- package/.elm/0.19.1/packages/elm-community/list-extra/8.7.0/README.md +0 -19
- package/.elm/0.19.1/packages/elm-community/list-extra/8.7.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/elm-community/list-extra/8.7.0/docs.json +0 -1
- package/.elm/0.19.1/packages/elm-community/random-extra/3.2.0/LICENSE +0 -29
- package/.elm/0.19.1/packages/elm-community/random-extra/3.2.0/README.md +0 -31
- package/.elm/0.19.1/packages/elm-community/random-extra/3.2.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/elm-community/random-extra/3.2.0/docs.json +0 -1
- package/.elm/0.19.1/packages/f0i/statistics/2.0.0/LICENSE +0 -11
- package/.elm/0.19.1/packages/f0i/statistics/2.0.0/README.md +0 -73
- package/.elm/0.19.1/packages/f0i/statistics/2.0.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/f0i/statistics/2.0.0/docs.json +0 -1
- package/.elm/0.19.1/packages/folkertdev/elm-flate/2.0.5/LICENSE +0 -373
- package/.elm/0.19.1/packages/folkertdev/elm-flate/2.0.5/README.md +0 -77
- package/.elm/0.19.1/packages/folkertdev/elm-flate/2.0.5/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/folkertdev/elm-flate/2.0.5/docs.json +0 -1
- package/.elm/0.19.1/packages/justgook/elm-image/5.0.0/LICENSE +0 -9
- package/.elm/0.19.1/packages/justgook/elm-image/5.0.0/README.md +0 -112
- package/.elm/0.19.1/packages/justgook/elm-image/5.0.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/justgook/elm-image/5.0.0/docs.json +0 -1
- package/.elm/0.19.1/packages/jxxcarlson/elm-pseudorandom/1.0.3/LICENSE +0 -11
- package/.elm/0.19.1/packages/jxxcarlson/elm-pseudorandom/1.0.3/README.md +0 -67
- package/.elm/0.19.1/packages/jxxcarlson/elm-pseudorandom/1.0.3/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/jxxcarlson/elm-pseudorandom/1.0.3/docs.json +0 -1
- package/.elm/0.19.1/packages/lock +0 -0
- package/.elm/0.19.1/packages/pablohirafuji/elm-qrcode/4.0.2/LICENSE +0 -27
- package/.elm/0.19.1/packages/pablohirafuji/elm-qrcode/4.0.2/README.md +0 -32
- package/.elm/0.19.1/packages/pablohirafuji/elm-qrcode/4.0.2/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/pablohirafuji/elm-qrcode/4.0.2/docs.json +0 -1
- package/.elm/0.19.1/packages/pilatch/flip/1.0.0/LICENSE +0 -25
- package/.elm/0.19.1/packages/pilatch/flip/1.0.0/README.md +0 -14
- package/.elm/0.19.1/packages/pilatch/flip/1.0.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/pilatch/flip/1.0.0/docs.json +0 -1
- package/.elm/0.19.1/packages/registry.dat +0 -0
- package/.elm/0.19.1/packages/rtfeldman/elm-hex/1.0.0/LICENSE +0 -29
- package/.elm/0.19.1/packages/rtfeldman/elm-hex/1.0.0/README.md +0 -13
- package/.elm/0.19.1/packages/rtfeldman/elm-hex/1.0.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/rtfeldman/elm-hex/1.0.0/docs.json +0 -1
- package/.elm/0.19.1/packages/tesk9/accessible-html/4.1.1/LICENSE +0 -27
- package/.elm/0.19.1/packages/tesk9/accessible-html/4.1.1/README.md +0 -72
- package/.elm/0.19.1/packages/tesk9/accessible-html/4.1.1/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/tesk9/accessible-html/4.1.1/docs.json +0 -1
- package/.elm/0.19.1/packages/truqu/elm-base64/2.0.4/LICENSE +0 -22
- package/.elm/0.19.1/packages/truqu/elm-base64/2.0.4/README.md +0 -27
- package/.elm/0.19.1/packages/truqu/elm-base64/2.0.4/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/truqu/elm-base64/2.0.4/docs.json +0 -1
- package/.elm/0.19.1/packages/truqu/elm-md5/1.1.0/LICENSE +0 -27
- package/.elm/0.19.1/packages/truqu/elm-md5/1.1.0/README.md +0 -34
- package/.elm/0.19.1/packages/truqu/elm-md5/1.1.0/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/truqu/elm-md5/1.1.0/docs.json +0 -1
- package/.elm/0.19.1/packages/zwilias/elm-utf-tools/2.0.1/LICENSE +0 -29
- package/.elm/0.19.1/packages/zwilias/elm-utf-tools/2.0.1/README.md +0 -8
- package/.elm/0.19.1/packages/zwilias/elm-utf-tools/2.0.1/artifacts.dat +0 -0
- package/.elm/0.19.1/packages/zwilias/elm-utf-tools/2.0.1/docs.json +0 -1
- package/dist/index.270309fa.js +0 -1
- package/dist/index.2b67d179.js +0 -1
- package/dist/index.3d681c84.js +0 -1
- package/dist/index.72230c64.css +0 -1
- package/dist/index.d57ed7b9.js +0 -1
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# Pseudorandom
|
|
3
|
-
|
|
4
|
-
PseudoRandom is a package for creating lists of pseudorandom numbers — lists of integers or floats that resemble lists produced by random means, even though they are generated deterministically. This resemblance can be made precise using various statistical tests.
|
|
5
|
-
|
|
6
|
-
In this connection, we repeat John von Neumann's joke: *Anyone who attempts to generate random numbers by deterministic means is, of course, living in a state of sin.*
|
|
7
|
-
|
|
8
|
-
**Examples:**
|
|
9
|
-
|
|
10
|
-
```
|
|
11
|
-
floatSequence 3 7 (0, 1) |> List.map (roundTo 4)
|
|
12
|
-
== [0.448,0.0988,0.246]
|
|
13
|
-
|
|
14
|
-
integerSequence 3 8
|
|
15
|
-
== [123092948, 28845728, 98310392]
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
**NOTE:** the seed must be a positive integer.
|
|
19
|
-
|
|
20
|
-
We use the linear congruential generator of Lewis, Goodman, and Miller (1, section 3.2.1) for the integerSequence function. For floatSequence we use the triple linear congruential generator of (1, section 3.2.3). Reference (2) gives tables of parameters for linear congruential generator in case you want to "roll you own."
|
|
21
|
-
|
|
22
|
-
**FURTHER NOTE**
|
|
23
|
-
|
|
24
|
-
Ilias van Peer pointed out to me that one can get the same functionality as above using the `step` function of the standard `elm/random` library — with a bonus of a five to eight-fold increase in speed. The function `RNG.floatSequence`, based on Ilias' code, is a drop-in replacement for `PseudoRandom.floatSequence`. The function `RNG.floatSequence_` allows one to keep track of the seed if that is desired a well.
|
|
25
|
-
|
|
26
|
-
I recommend using `Random + RNG` rather than `PseudoRandom`.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
module RNG exposing (floatSequence, floatSequence_)
|
|
31
|
-
import Random
|
|
32
|
-
|
|
33
|
-
{-
|
|
34
|
-
|
|
35
|
-
Example:
|
|
36
|
-
|
|
37
|
-
> RNG.floatSequence 3 23 (0,1)
|
|
38
|
-
[0.07049563320325747,0.8633668118636881,0.6762363032990798]
|
|
39
|
-
|
|
40
|
-
-}
|
|
41
|
-
|
|
42
|
-
floatSequence : Int -> Int -> (Float, Float) -> List Float
|
|
43
|
-
floatSequence n k (a,b) =
|
|
44
|
-
floatSequence_ n (makeSeed k) (a,b)
|
|
45
|
-
|> Tuple.first
|
|
46
|
-
|
|
47
|
-
floatSequence_ : Int -> Random.Seed -> (Float, Float)
|
|
48
|
-
-> (List Float, Random.Seed)
|
|
49
|
-
floatSequence_ n seed (a,b) =
|
|
50
|
-
Random.step (gen n (a,b)) seed
|
|
51
|
-
|
|
52
|
-
gen : Int -> (Float, Float) -> Random.Generator (List Float)
|
|
53
|
-
gen n (a, b) =
|
|
54
|
-
Random.list n (Random.float a b)
|
|
55
|
-
|
|
56
|
-
makeSeed : Int -> Random.Seed
|
|
57
|
-
makeSeed k =
|
|
58
|
-
Random.initialSeed k
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
**References**
|
|
62
|
-
|
|
63
|
-
1. <https://www.math.arizona.edu/~tgk/mc/book_chap3.pdf>
|
|
64
|
-
|
|
65
|
-
2. <http://www.ams.org/journals/mcom/1999-68-225/S0025-5718-99-00996-5/S0025-5718-99-00996-5.pdf>
|
|
66
|
-
|
|
67
|
-
3. Von Neumann, John (1951). "Various techniques used in connection with random digits" (PDF). National Bureau of Standards Applied Mathematics Series. 12: 36–38.
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"name":"PseudoRandom","comment":" This module provides two pseudo-random number generators,\nfloatSequence and integerSequence. The first produces\na list of n floating point numbers in a specified range.\nThe second produces a list of positive integers in the range\n1 to 214748363. A pseudo-random sequence is a sequence\nof numbers that resembles a random sequence even though it is\nproduced by deterministic means. The notion \"resembles\" can\nbe made precise using various statistical tests.\n\nExamples:\n\nfloatSequence 3 7 (0, 1) |> List.map (roundTo 4) == [0.448,0.0988,0.246]\n\nintegerSequence 3 8 == [123092948, 28845728, 98310392]\n\nNOTE: the seed must be a positive integer.\n\nWe use the linear congruential generator of (1), Lewis, Goodman, and Miller, for the integerSequence function.\nFor floatSequence we use the triple linear congruential generator\nof (2).\n\nReferences:\n\n1. <https://www.math.arizona.edu/~tgk/mc/book_chap3.pdf>\n\n2. <http://www.ams.org/journals/mcom/1999-68-225/S0025-5718-99-00996-5/S0025-5718-99-00996-5.pdf>\n\n@docs integerSequence, floatSequence, m0, roundTo\n\n","unions":[],"aliases":[],"values":[{"name":"floatSequence","comment":" Using the seed, produce a list of n floats in the range [a,b)\n","type":"Basics.Int -> Basics.Int -> ( Basics.Float, Basics.Float ) -> List.List Basics.Float"},{"name":"integerSequence","comment":" Using the seed, produce a list of n integers k, where 0 <= k < m0.\n","type":"Basics.Int -> Basics.Int -> List.List Basics.Int"},{"name":"m0","comment":" The largest integer that integerSequence will produce is m0 - 1.\n","type":"Basics.Int"},{"name":"roundTo","comment":" Use this function if all those digits in the output of\nfloatSequence bother you.\n\nroundTo 2 1.2345 == 1.23\n\n","type":"Basics.Int -> Basics.Float -> Basics.Float"}],"binops":[]}]
|
|
File without changes
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2017, Pablo Hirafuji
|
|
2
|
-
All rights reserved.
|
|
3
|
-
|
|
4
|
-
Redistribution and use in source and binary forms, with or without
|
|
5
|
-
modification, are permitted provided that the following conditions are met:
|
|
6
|
-
|
|
7
|
-
* Redistributions of source code must retain the above copyright notice, this
|
|
8
|
-
list of conditions and the following disclaimer.
|
|
9
|
-
|
|
10
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
|
11
|
-
this list of conditions and the following disclaimer in the documentation
|
|
12
|
-
and/or other materials provided with the distribution.
|
|
13
|
-
|
|
14
|
-
* Neither the name of elm-qrcode nor the names of its
|
|
15
|
-
contributors may be used to endorse or promote products derived from
|
|
16
|
-
this software without specific prior written permission.
|
|
17
|
-
|
|
18
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
19
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
20
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
22
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
23
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
24
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
25
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
26
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
27
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# QR Code
|
|
2
|
-
|
|
3
|
-
QR Code encoding and rendering. [Demo](https://pablohirafuji.github.io/elm-qrcode/).
|
|
4
|
-
|
|
5
|
-
## Basic Usage
|
|
6
|
-
|
|
7
|
-
```elm
|
|
8
|
-
import Html exposing (Html)
|
|
9
|
-
import QRCode
|
|
10
|
-
import Svg.Attributes as SvgA
|
|
11
|
-
|
|
12
|
-
qrCodeView : String -> Html msg
|
|
13
|
-
qrCodeView message =
|
|
14
|
-
QRCode.fromString message
|
|
15
|
-
|> Result.map
|
|
16
|
-
(QRCode.toSvg
|
|
17
|
-
[ SvgA.width "100px"
|
|
18
|
-
, SvgA.height "100px"
|
|
19
|
-
]
|
|
20
|
-
)
|
|
21
|
-
|> Result.withDefault (Html.text "Error while encoding to QRCode.")
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
If you would like more functionalities, please open an issue on [GitHub](https://github.com/pablohirafuji/elm-qrcode/issues).
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## Thanks
|
|
29
|
-
|
|
30
|
-
Thank you Carolyn Eby, for creating [this great tutorial](http://www.thonky.com/qr-code-tutorial/) on how QR Code works.
|
|
31
|
-
|
|
32
|
-
Thank you Evan for bringing joy to the frontend.
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"name":"QRCode","comment":" QR Code encoding and rendering.\n\n@docs QRCode, ErrorCorrection\n\n\n# Encoding\n\n@docs fromString, fromStringWith\n\n\n# Rendering\n\n@docs toSvg, toSvgWithoutQuietZone, toImage, toImageWithOptions, ImageOptions, defaultImageOptions\n\n\n# Extracting\n\n@docs toMatrix, version\n\n\n# Error\n\n@docs Error\n\n","unions":[{"name":"Error","comment":" Possible encoding errors.\n","args":[],"cases":[["AlignmentPatternNotFound",[]],["InvalidNumericChar",[]],["InvalidAlphanumericChar",[]],["InvalidUTF8Char",[]],["LogTableException",["Basics.Int"]],["PolynomialMultiplyException",[]],["PolynomialModException",[]],["InputLengthOverflow",[]]]},{"name":"ErrorCorrection","comment":" Error correction level. Provides the following error\ncorrection capability:\n\n - **Low**: 7% of codewords can be restored.\n - **Medium**: 15% of codewords can be restored.\n - **Quartile**: 25% of codewords can be restored.\n - **High**: 30% of codewords can be restored.\n\n","args":[],"cases":[["Low",[]],["Medium",[]],["Quartile",[]],["High",[]]]},{"name":"QRCode","comment":" QRCode type.\n","args":[],"cases":[]}],"aliases":[{"name":"ImageOptions","comment":" Available options to transform a [QRCode](#QRCode) into an [Image](https://package.elm-lang.org/packages/justgook/elm-image/latest/Image#Image) with [toImageWithOptions](#toImageWithOptions).\n\n - `moduleSize` is the size of the module (the QRCode \"pixel\") in px;\n - `darkColor` and `lightColor` expects an `Int` as `0xRRGGBBAA`;\n - `quietZoneSize` is the number of modules the [quiet zone](https://en.wikipedia.org/wiki/QR_code#Standards) should have.\n\n","args":[],"type":"{ moduleSize : Basics.Int, darkColor : Basics.Int, lightColor : Basics.Int, quietZoneSize : Basics.Int }"}],"values":[{"name":"defaultImageOptions","comment":" Default options used by [toImage](#toImage).\n\n defaultImageOptions =\n { moduleSize = 5\n , darkColor = 0xFF\n , lightColor = 0xFFFFFFFF\n , quietZoneSize = 4\n }\n\n","type":"QRCode.ImageOptions"},{"name":"fromString","comment":" Transform a string into a result [Error](#Error)\nor a [QRCode](#QRCode) using `Quartile` [ErrorCorrection](#ErrorCorrection).\n","type":"String.String -> Result.Result QRCode.Error QRCode.QRCode"},{"name":"fromStringWith","comment":" Transform a string with a given [ErrorCorrection](#ErrorCorrection)\ninto a result [Error](#Error) or a [QRCode](#QRCode).\n","type":"QRCode.ErrorCorrection -> String.String -> Result.Result QRCode.Error QRCode.QRCode"},{"name":"toImage","comment":" Transform a [QRCode](#QRCode) into an [Image](https://package.elm-lang.org/packages/justgook/elm-image/latest/Image#Image). You can transform the Image into a [PNG](https://package.elm-lang.org/packages/justgook/elm-image/latest/Image#toPngUrl) or [BMP](https://package.elm-lang.org/packages/justgook/elm-image/latest/Image#toBmpUrl).\n\n import Html\n import Html.Attribute\n import Image\n import QRCode\n\n viewQRCode : String -> Html msg\n viewQRCode message =\n QRCode.fromString message\n |> Result.map\n (\\qrCode ->\n Html.img\n [ QRCode.toImage qrCode\n |> Image.toPngUrl\n |> Html.Attribute.src\n ]\n []\n )\n |> Result.withDefault\n (Html.text \"Error while encoding to QRCode.\")\n\n**Note**: You must install the [`justgook/elm-image`](https://package.elm-lang.org/packages/justgook/elm-image/latest) package in order to use the functions to convert the `Image` type to something else:\n\n```sh\nelm install \"justgook/elm-image\"\n```\n\n","type":"QRCode.QRCode -> Image.Image"},{"name":"toImageWithOptions","comment":" Transform a [QRCode](#QRCode) into an [Image](https://package.elm-lang.org/packages/justgook/elm-image/latest/Image#Image) with an [ImageOptions](#ImageOptions).\n","type":"QRCode.ImageOptions -> QRCode.QRCode -> Image.Image"},{"name":"toMatrix","comment":" Transform a [QRCode](#QRCode) into a list of list of booleans.\n\n \"Hello World!\"\n |> QRCode.fromString\n |> Result.map QRCode.toMatrix\n\n","type":"QRCode.QRCode -> List.List (List.List Basics.Bool)"},{"name":"toSvg","comment":" Transform a [QRCode](#QRCode) into a svg element.\n\n import Svg.Attributes as SvgA\n\n qrCodeView : String -> Html msg\n qrCodeView message =\n QRCode.fromString message\n |> Result.map\n (QRCode.toSvg\n [ SvgA.width \"500px\"\n , SvgA.height \"500px\"\n ]\n )\n |> Result.withDefault\n (Html.text \"Error while encoding to QRCode.\")\n\n**Beware**: You **must** set some width and height to render anything.\nYou can set it by defining `width` and `height` svg's CSS properties or\nby passing the `Svg.Attributes.width` and `Svg.Attributes.height`\nsvg attributes.\n\n","type":"List.List (Svg.Attribute msg) -> QRCode.QRCode -> Html.Html msg"},{"name":"toSvgWithoutQuietZone","comment":" Same as [toSvg](#toSvg), but without the [quiet zone](https://en.wikipedia.org/wiki/QR_code#/media/File:QR_Code_Structure_Example_3.svg).\n","type":"List.List (Svg.Attribute msg) -> QRCode.QRCode -> Html.Html msg"},{"name":"version","comment":" Get the [version](https://www.qrcode.com/en/about/version.html) of the [QRCode](#QRCode).\n\n \"Hello World!\"\n |> QRCode.fromString\n |> Result.map QRCode.version\n -- (==) Ok 1\n\n","type":"QRCode.QRCode -> Basics.Int"}],"binops":[]}]
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
BSD 2-Clause License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2018, Ethan B Martin
|
|
4
|
-
All rights reserved.
|
|
5
|
-
|
|
6
|
-
Redistribution and use in source and binary forms, with or without
|
|
7
|
-
modification, are permitted provided that the following conditions are met:
|
|
8
|
-
|
|
9
|
-
* Redistributions of source code must retain the above copyright notice, this
|
|
10
|
-
list of conditions and the following disclaimer.
|
|
11
|
-
|
|
12
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
-
this list of conditions and the following disclaimer in the documentation
|
|
14
|
-
and/or other materials provided with the distribution.
|
|
15
|
-
|
|
16
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
17
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
18
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
19
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
20
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
21
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
22
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
23
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
24
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
25
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Flip
|
|
2
|
-
|
|
3
|
-
The old flip function that was removed in 0.19. It takes a function with only two arguments, and returns another function that accepts the parameters in reverse order. Good for pipe chains where you have the function you want, but need its arguments, uh... flipped.
|
|
4
|
-
|
|
5
|
-
## Example
|
|
6
|
-
|
|
7
|
-
subtract a b =
|
|
8
|
-
a - b
|
|
9
|
-
|
|
10
|
-
subtract 5 2 --> 3
|
|
11
|
-
|
|
12
|
-
fliptract = flip subtract
|
|
13
|
-
|
|
14
|
-
fliptract 5 2 --> -3
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"name":"Flip","comment":" Reverse the arguments of a function with only two arguments.\n\n@docs flip\n\n","unions":[],"aliases":[],"values":[{"name":"flip","comment":" Take a function, the first argument, and return a new function that accepts the same parameters as the original function, but in reverse order.\n","type":"(a -> b -> c) -> b -> a -> c"}],"binops":[]}]
|
|
Binary file
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
BSD 3-Clause License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2016, Richard Feldman
|
|
4
|
-
All rights reserved.
|
|
5
|
-
|
|
6
|
-
Redistribution and use in source and binary forms, with or without
|
|
7
|
-
modification, are permitted provided that the following conditions are met:
|
|
8
|
-
|
|
9
|
-
* Redistributions of source code must retain the above copyright notice, this
|
|
10
|
-
list of conditions and the following disclaimer.
|
|
11
|
-
|
|
12
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
-
this list of conditions and the following disclaimer in the documentation
|
|
14
|
-
and/or other materials provided with the distribution.
|
|
15
|
-
|
|
16
|
-
* Neither the name of the copyright holder nor the names of its
|
|
17
|
-
contributors may be used to endorse or promote products derived from
|
|
18
|
-
this software without specific prior written permission.
|
|
19
|
-
|
|
20
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# hex
|
|
2
|
-
|
|
3
|
-
Convert integers to and from hexadecimal strings in Elm.
|
|
4
|
-
|
|
5
|
-
-- Convert a hexdecimal string such as "abc94f" to a decimal integer.
|
|
6
|
-
|
|
7
|
-
Hex.fromString "a5" == Ok 165
|
|
8
|
-
Hex.fromString "hat" == Err "invalid hexadecimal string"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-- Convert a decimal integer to a hexdecimal string such as `"abc94f"`.
|
|
12
|
-
|
|
13
|
-
Hex.toString 165 == "a5"
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{"name":"Hex","comment":" Convert to and from Hex strings.\n\n@docs fromString, toString\n\n","unions":[],"aliases":[],"values":[{"name":"fromString","comment":" Convert a hexdecimal string such as \"abc94f\" to a decimal integer.\n\n Hex.fromString \"a5\" == Ok 165\n Hex.fromString \"hat\" == Err \"invalid hexadecimal string\"\n\n","type":"String.String -> Result.Result String.String Basics.Int"},{"name":"toString","comment":" Convert a decimal integer to a hexdecimal string such as `\"abc94f\"`.\n\n Hex.toString 165 == \"a5\"\n\n","type":"Basics.Int -> String.String"}],"binops":[]}]
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2017, Tessa Kelly
|
|
2
|
-
All rights reserved.
|
|
3
|
-
|
|
4
|
-
Redistribution and use in source and binary forms, with or without
|
|
5
|
-
modification, are permitted provided that the following conditions are met:
|
|
6
|
-
|
|
7
|
-
* Redistributions of source code must retain the above copyright notice, this
|
|
8
|
-
list of conditions and the following disclaimer.
|
|
9
|
-
|
|
10
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
|
11
|
-
this list of conditions and the following disclaimer in the documentation
|
|
12
|
-
and/or other materials provided with the distribution.
|
|
13
|
-
|
|
14
|
-
* Neither the name of accessible-html nor the names of its
|
|
15
|
-
contributors may be used to endorse or promote products derived from
|
|
16
|
-
this software without specific prior written permission.
|
|
17
|
-
|
|
18
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
19
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
20
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
22
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
23
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
24
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
25
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
26
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
27
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
[](https://travis-ci.com/tesk9/accessible-html)
|
|
2
|
-
|
|
3
|
-
# accessible-html
|
|
4
|
-
|
|
5
|
-
`tesk9/accessible-html` makes writing accessible websites easier.
|
|
6
|
-
|
|
7
|
-
## Using this Library
|
|
8
|
-
|
|
9
|
-
Use the `Accessibility` module to encourage accessible practices:
|
|
10
|
-
|
|
11
|
-
import Accessibility as Html exposing (..)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
There are also attribute helpers that enable you to do some pretty advanced cool stuff! Many of these helpers are not necessary when writing semantically correct HTML5 code, but you will still need some of them when rolling your own dynamic widgets. The import expressions below point out some of the helpers that you are more likely to need:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
import Accessibility.Aria exposing (controls, labelledBy, describedBy)
|
|
18
|
-
import Accessibility.Key exposing (onKeyDown, left, right, enter, escape)
|
|
19
|
-
import Accessibility.Landmark exposing (search)
|
|
20
|
-
import Accessibility.Live exposing (atomic, busy, liveAssertive, livePolite)
|
|
21
|
-
import Accessibility.Role exposing (presentation)
|
|
22
|
-
import Accessibility.Style exposing (invisible)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
## Resources
|
|
26
|
-
|
|
27
|
-
A great place to start is reading about the [principles of accessibility](https://www.w3.org/TR/UNDERSTANDING-WCAG20/intro.html). By starting out with the design goals of Perceivable, Operable, Understandable, and Robust, you'll be able to find the information you need when reading the WAI-ARIA spec.
|
|
28
|
-
|
|
29
|
-
If you know you want to make a specific kind of widget, the Web Accessibility Initiative has specific [authoring best practices](https://www.w3.org/TR/wai-aria-practices-1.1/#aria_ex) and recommendations for you, along with really great examples.
|
|
30
|
-
|
|
31
|
-
For examples of how to use this library, check out [`accessible-html examples`](https://tesk9.github.io/accessible-html) and its [source code](https://github.com/tesk9/accessible-html).
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## Modules
|
|
35
|
-
|
|
36
|
-
### Accessibility
|
|
37
|
-
|
|
38
|
-
This section extends the html library to include `tab*` elements, `radio`, `inputText`, `checkbox`, and more. It also shadows the `elm/html` library to encourage limiting interactive behavior to html5 interactable elements.
|
|
39
|
-
|
|
40
|
-
### Accessibility.Aria
|
|
41
|
-
|
|
42
|
-
This section includes roles for working with sets, grids, controls, and more. You're most likely to want the helpers for connecting elements to each other, by specifying that one `controls` another, or that a figure has `details` somewhere else.
|
|
43
|
-
|
|
44
|
-
### Accessibility.Key
|
|
45
|
-
|
|
46
|
-
When making widgets, you will need to add keyboard shortcuts to make keyboard navigation possible.
|
|
47
|
-
|
|
48
|
-
For instance, `space` and on `enter` should activate a button,`space` should change a checkbox's state, `escape` should close a modal, and `up`, `down`, `left`, and `right` should navigate focus in a menu.
|
|
49
|
-
|
|
50
|
-
### Accessibility.Landmark
|
|
51
|
-
|
|
52
|
-
You're likely to only want `search` from this section unless you're not using HTML5 elements.
|
|
53
|
-
|
|
54
|
-
### Accessibility.Live
|
|
55
|
-
|
|
56
|
-
Describe which sections of the page are changing over time, and how aggressively assistive technologies should notify the user about those changes.
|
|
57
|
-
|
|
58
|
-
### Accessibility.Role
|
|
59
|
-
|
|
60
|
-
Much of the time, sticking with HTML5 is better than using these properties. However, the WAI-ARIA spec moves at a different pace than the HTML spec--and user agent technologies are another factor entirely! You are likely to find yourself using a combination of these `Accessibility.Role` attributes.
|
|
61
|
-
|
|
62
|
-
### Accessibility.Style
|
|
63
|
-
|
|
64
|
-
This section contains helpers for changing the look of your site without making it unusable.
|
|
65
|
-
|
|
66
|
-
For instance, if you prefer to use placeholders to convey what sort of values belong in an input, you can use the `invisible` helper to remove the label for screenviewers without removing it for screenreaders.
|
|
67
|
-
|
|
68
|
-
### Accessibility.Widget
|
|
69
|
-
|
|
70
|
-
Look here for managing widget state: is a given widget `expanded` or `disabled` or `pressed`?
|
|
71
|
-
|
|
72
|
-
If you're rolling your own widget, you need to take a peek at this section.
|
|
Binary file
|