calyx 0.17.1 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +5 -5
  2. data/docs/_data/breadcrumbs.yml +9 -0
  3. data/docs/_data/docs.yml +35 -0
  4. data/docs/_data/examples.yml +9 -0
  5. data/docs/_includes/breadcrumbs.html +36 -0
  6. data/docs/_includes/contents.html +12 -0
  7. data/docs/_includes/icon-github.html +4 -0
  8. data/docs/_includes/icon-rubygems.html +9 -0
  9. data/docs/_includes/navbar.html +24 -0
  10. data/docs/_includes/pagebar.html +12 -0
  11. data/docs/_layouts/default.html +3 -23
  12. data/docs/_layouts/docs.html +14 -0
  13. data/docs/_layouts/home.html +13 -0
  14. data/docs/_layouts/page.html +20 -0
  15. data/docs/_posts/2017-09-14-welcome-to-jekyll.markdown +1 -1
  16. data/docs/_posts/2017-09-21-0.17.0-released.md +10 -0
  17. data/docs/_styles/card.scss +7 -0
  18. data/docs/_styles/colors.scss +18 -0
  19. data/docs/_styles/content.scss +57 -0
  20. data/docs/_styles/cta.scss +25 -0
  21. data/docs/_styles/grid.scss +22 -0
  22. data/docs/_styles/media.scss +50 -0
  23. data/docs/_styles/menu.scss +54 -0
  24. data/docs/_styles/modifiers.scss +3 -0
  25. data/docs/_styles/navbar.scss +161 -0
  26. data/docs/_styles/pagebar.scss +32 -0
  27. data/docs/_styles/reset.scss +92 -0
  28. data/docs/_styles/scale.scss +23 -0
  29. data/docs/_styles/spread.scss +55 -0
  30. data/docs/_styles/styleguide.scss +52 -0
  31. data/docs/_styles/syntax.scss +84 -0
  32. data/docs/_styles/typography.scss +49 -0
  33. data/docs/_styles/yard.scss +36 -0
  34. data/docs/api.html +9662 -0
  35. data/docs/assets/calyx-docs.css +253 -162
  36. data/docs/assets/calyx-flower-outline.svg +202 -0
  37. data/docs/assets/calyx-flower-reverse.svg +202 -0
  38. data/docs/assets/calyx-flower.svg +202 -0
  39. data/docs/assets/logo-small.png +0 -0
  40. data/docs/assets/logos/calyx-flower-1.svg +22 -0
  41. data/docs/assets/logos/calyx-flower-2.svg +21 -0
  42. data/docs/content/documentation.html +20 -0
  43. data/docs/content/examples.html +12 -0
  44. data/docs/content/examples/any-gradient.md +32 -0
  45. data/docs/content/examples/faker.md +16 -0
  46. data/docs/content/examples/tiny-woodland-bot.md +24 -0
  47. data/docs/{guide → content/guides}/context.md +2 -2
  48. data/docs/{guide → content/guides}/expressions.md +2 -2
  49. data/docs/content/guides/features.md +50 -0
  50. data/docs/{guide → content/guides}/formats.md +1 -1
  51. data/docs/content/guides/installation.md +51 -0
  52. data/docs/{guide → content/guides}/random.md +1 -1
  53. data/docs/{guide → content/guides}/results.md +1 -1
  54. data/docs/content/index.html +44 -0
  55. data/docs/content/introduction.md +23 -0
  56. data/docs/content/introduction/concepts.md +82 -0
  57. data/docs/content/introduction/contributing.md +43 -0
  58. data/docs/content/introduction/tutorial.md +129 -0
  59. data/docs/content/styleguide.html +71 -0
  60. data/docs/docs.scss +94 -0
  61. data/docs/index.html +1 -23
  62. data/docs/package.json +1 -1
  63. data/lib/calyx/production/choices.rb +7 -0
  64. data/lib/calyx/production/unique.rb +0 -2
  65. data/lib/calyx/registry.rb +5 -0
  66. data/lib/calyx/rule.rb +4 -0
  67. data/lib/calyx/version.rb +1 -1
  68. metadata +59 -13
  69. data/docs/about.md +0 -18
  70. data/docs/calyx-docs.scss +0 -66
  71. data/docs/guide/examples.md +0 -59
  72. data/docs/guide/getting-started.md +0 -129
  73. data/docs/guide/installation.md +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 80489e301bc4d995dea429bda6759c17fe8c0311
4
- data.tar.gz: a16583ceeb4bc13711fe94fa5cecdde6167b4fde
2
+ SHA256:
3
+ metadata.gz: b68a7d92d201b48a71da29760bebeb4e6571a672593621356708a1ea7add2d3b
4
+ data.tar.gz: e78489cd83521b940642e64def32821f52d23830574360ca2fb3c532b626f388
5
5
  SHA512:
6
- metadata.gz: 3dd4f9428eae4ce7d454de3c9ea1572253dda2d43e97297c1daabdbb00ac3c1473ffe9e997af1ccce3988435a380d196071ea42d1eabeb35bec9b2e64c01211f
7
- data.tar.gz: 4fc6835c4986f63bf80d014bd787d6bc1160eb5e169f8bd2fcfd9c35da9ddfb04af4ab4341127c6fa2084f5654c3e28875f7a310f22376d03c93911bf5b06e39
6
+ metadata.gz: 2192ebdf78abb6998cb8d176a4a42a229cd21fa7c9023abbd3a82f8b27fec4b5fa076e8bcb3bb6e18570eac8ae4976e3b85c7a9cc832d1b610e62b7c7ce43968
7
+ data.tar.gz: 71d8a3847439e00a8a550bf70a2654bde7226c881449ac3a39e881ebcee6ffe1c4048318691c0b3435f89f4e4a34baf31dce8949f994e67fa26a7f400d026387
@@ -0,0 +1,9 @@
1
+ documentation:
2
+ title: Documentation
3
+ permalink: /documentation/
4
+ introduction:
5
+ title: Introduction
6
+ permalink: /introduction/
7
+ guides:
8
+ title: Guides
9
+ permalink: /guides/
@@ -0,0 +1,35 @@
1
+ - title: Introduction
2
+ permalink: /introduction/
3
+ pages:
4
+ - title: Tutorial
5
+ permalink: /introduction/tutorial
6
+ - title: Key Concepts
7
+ permalink: /introduction/concepts
8
+ - title: For Beginners
9
+ permalink: /introduction/beginners
10
+ - title: Contributing
11
+ permalink: /introduction/contributing
12
+ - title: Guides
13
+ permalink: /guides/
14
+ pages:
15
+ - title: Installation
16
+ permalink: /guides/installation
17
+ - title: Generating Results
18
+ permalink: /guides/results
19
+ - title: Dynamic Rules
20
+ permalink: /guides/dynamic-rules
21
+ - title: Template Expressions
22
+ permalink: /guides/template-expressions
23
+ - title: Weighted Choices
24
+ permalink: /guides/weighted-choices
25
+ - title: Extending Grammars
26
+ permalink: /guides/extending
27
+ - title: Random Seeds
28
+ permalink: /guides/random-seeds
29
+ - title: Reference
30
+ permalink: /reference/
31
+ pages:
32
+ - title: Configuration Options
33
+ permalink: /reference/config
34
+ - title: API Listing
35
+ permalink: /reference/api
@@ -0,0 +1,9 @@
1
+ - title: Tiny Woodland Bot
2
+ description: Minimalist Twitter emoji scenes.
3
+ permalink: /examples/tiny-woodland-bot
4
+ - title: Any Gradient
5
+ description: A web service making linear gradients.
6
+ permalink: /examples/any-gradient
7
+ - title: Faker
8
+ description: Generates fake names and email addresses.
9
+ permalink: /examples/faker
@@ -0,0 +1,36 @@
1
+ <ol itemscope itemtype="http://schema.org/BreadcrumbList">
2
+
3
+ {% assign counter=0 %}
4
+
5
+ {% for category in site.categories %}
6
+
7
+ {% capture category_url %}{{ site.category_dir }}/{{ category | first | slugize | downcase | replace:' ','-' }}{% endcapture %}
8
+ {% capture category_name %}{{ category | first}}{% endcapture %}
9
+
10
+ {% for catpagename in page.categories %}
11
+ {% if category_name == catpagename %}
12
+
13
+ {% assign counter=counter | plus:1 %}
14
+
15
+ <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
16
+ <a itemprop="item" href="{{ site.url }}{{ append:'/' | append:category_url | append:'/' }}">
17
+ <span itemprop="name">{{ catpagename }}</span>
18
+ </a>
19
+ <meta itemprop="position" content="{{counter}}" />
20
+ </li>
21
+
22
+ {% endif %}
23
+ {% endfor %}
24
+
25
+ {% endfor %}
26
+
27
+ {% assign counter=counter | plus:1 %}
28
+
29
+ <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
30
+ <a itemprop="item" href="{{ site.url }}{{ page.url }}">
31
+ <span itemprop="name">{{ page.title }}</span>
32
+ </a>
33
+ <meta itemprop="position" content="{{counter}}" />
34
+ </li>
35
+
36
+ </ol>
@@ -0,0 +1,12 @@
1
+ <div class="menu">
2
+ {% for section in site.data.docs %}
3
+ <p class="menu-label">
4
+ <a href="{{ section.permalink }}" class="{% if section.permalink == page.url %}is-active{% endif %}">{{ section.title }}</a>
5
+ </p>
6
+ <ul class="menu-list">
7
+ {% for doc_page in section.pages %}
8
+ <li><a href="{{ doc_page.permalink }}" class="{% if doc_page.permalink == page.url %}is-active{% endif %}">{{ doc_page.title }}</a></li>
9
+ {% endfor %}
10
+ </ul>
11
+ {% endfor %}
12
+ </div>
@@ -0,0 +1,4 @@
1
+ <svg aria-labelledby="simpleicons-github-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24">
2
+ <title id="simpleicons-github-icon">GitHub icon</title>
3
+ <path fill="#fff" d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/>
4
+ </svg>
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
2
+ viewBox="0 0 200 200" enable-background="new 0 0 200 200" width="28" height="28">
3
+ <g id="Logo">
4
+ <polygon fill="#fff" points="68.8,69.9 68.7,69.8 46.5,92 100.4,145.8 122.6,123.7 154.3,92 132.1,69.8 132.1,69.7 68.7,69.7
5
+ "/>
6
+ <path fill="#fff" d="M100.2,10.6l-78.5,45v90l78.5,45l78.5-45v-90L100.2,10.6z M163.7,137l-63.5,36.6L36.7,137V64l63.5-36.6
7
+ L163.7,64V137z"/>
8
+ </g>
9
+ </svg>
@@ -0,0 +1,24 @@
1
+ <div class="navbar">
2
+ <div class="nav-brand">
3
+ <div class="logo">
4
+ <button class="nav-toggle">☰</button>
5
+ <figure class="logo-mark">
6
+ <a href="/"><img src="/assets/calyx-flower.svg"></a>
7
+ </figure>
8
+ <h1 class="logo-type"><a href="/">Calyx</a></h1>
9
+ </div>
10
+ <div class="nav-menu">
11
+ <ul>
12
+ <li><a href="/documentation/">Documentation</a></li>
13
+ <li><a href="/examples/">Examples</a></li>
14
+ <li><a href="/changelog/">Changelog</a></li>
15
+ </ul>
16
+ </div>
17
+ </div>
18
+ <div class="nav-menu is-meta">
19
+ <ul>
20
+ <li><a href="https://github.com/maetl/calyx">{% include icon-github.html %}<span>GitHub Project</span></a></li>
21
+ <li><a href="https://rubygems.org/gems/calyx">{% include icon-rubygems.html %}<span>RubyGems Package</span></a></li>
22
+ </ul>
23
+ </div>
24
+ </div>
@@ -0,0 +1,12 @@
1
+ {% assign crumbs = page.url | split: '/' %}
2
+ <div class="pagebar">
3
+ <ul class="breadcrumbs">
4
+ <li><a href="/">Home</a></li>
5
+ {% for crumb in crumbs offset: 1 %}
6
+ {% unless forloop.last %}
7
+ <li><a href="{% assign crumb_limit = forloop.index | plus: 1 %}{% for crumb in crumbs limit: crumb_limit %}{{ site.data.breadcrumbs[crumb].permalink }}{% endfor %}">{{ site.data.breadcrumbs[crumb].title }}</a></li>
8
+ {% endunless %}
9
+ {% endfor %}
10
+ </ul>
11
+ <h1>{{ page.title }}</h1>
12
+ </div>
@@ -1,33 +1,13 @@
1
1
  <!DOCTYPE html>
2
- <html>
2
+ <html lang="en">
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <title>Calyx</title>
7
- <link href="https://fonts.googleapis.com/css?family=Oxygen+Mono" rel="stylesheet">
8
- <link href="https://fonts.googleapis.com/css?family=Arimo:400,700|Libre+Franklin:300,400,500,600,700|Work+Sans:700,800" rel="stylesheet">
7
+ <link href="https://fonts.googleapis.com/css?family=Cutive+Mono|Libre+Franklin:300,400,500,600,700|Work+Sans:700,800" rel="stylesheet">
9
8
  <link rel="stylesheet" href="/assets/calyx-docs.css">
10
9
  </head>
11
10
  <body>
12
- <div class="container">
13
- <div class="row">
14
- <div class="col docs-sidebar">
15
- {% include contents.html %}
16
- </div>
17
- <div class="col docs-content">
18
- <div class="content">
19
- {{ content }}
20
- </div>
21
- <div class="content-footer">
22
- <div class="content-footer-col">
23
- <a href="#">Prev</a>
24
- </div>
25
- <div class="content-footer-col">
26
- <a href="#">Next</a>
27
- </div>
28
- </div>
29
- </div>
30
- </div>
31
- </div>
11
+ {{ content }}
32
12
  </body>
33
13
  </html>
@@ -0,0 +1,14 @@
1
+ ---
2
+ layout: page
3
+ ---
4
+
5
+ <div class="row">
6
+ <div class="col docs-content">
7
+ <div class="content card">
8
+ {{ content }}
9
+ </div>
10
+ </div>
11
+ <div class="col docs-sidebar">
12
+ {% include contents.html %}
13
+ </div>
14
+ </div>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Calyx</title>
7
+ <link href="https://fonts.googleapis.com/css?family=Cutive+Mono|Libre+Franklin:300,400,500,600,700|Work+Sans:700,800" rel="stylesheet">
8
+ <link rel="stylesheet" href="/assets/calyx-docs.css">
9
+ </head>
10
+ <body>
11
+ {{ content }}
12
+ </body>
13
+ </html>
@@ -0,0 +1,20 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {% include navbar.html %}
6
+ <div class="page">
7
+ {% include pagebar.html %}
8
+ {{ content }}
9
+ </div>
10
+ <script>
11
+ window.addEventListener('load', function() {
12
+ var navbar = document.querySelector('.navbar');
13
+ var page = document.querySelector('.page');
14
+ var toggle = document.querySelector('.nav-toggle');
15
+ toggle.onclick = function(ev) {
16
+ navbar.classList.toggle('is-open');
17
+ page.classList.toggle('is-hidden');
18
+ }
19
+ });
20
+ </script>
@@ -1,5 +1,5 @@
1
1
  ---
2
- layout: post
2
+ layout: default
3
3
  title: "Welcome to Jekyll!"
4
4
  date: 2017-09-14 23:51:38 +1000
5
5
  categories: jekyll update
@@ -0,0 +1,10 @@
1
+ ---
2
+ layout: default
3
+ title: 0.17.0 Released
4
+ date: 2017-09-21 23:51:38 +1000
5
+ categories: jekyll update
6
+ ---
7
+
8
+ New version released.
9
+
10
+ Deprecation of string returned from `#generate`.
@@ -0,0 +1,7 @@
1
+ .card {
2
+ margin: $scale-p0;
3
+ background-color: $color-content-background;
4
+ padding: $scale-p1;
5
+ border: 1px solid #e9e9e9;
6
+ box-shadow: 1px 1px 6px 0px rgba(#e9e9e9, 0.2);
7
+ }
@@ -0,0 +1,18 @@
1
+ $color-white: #fff;
2
+ $color-light: #fafafa;
3
+ $color-dark: #333;
4
+ $color-edge: #e9e9e9;
5
+
6
+ $color-aquamarine: #76FABB;
7
+ $color-meadow: #1BDE81;
8
+ $color-eucalyptus: #218764;
9
+ $color-stromboli: #2F5E52;
10
+
11
+ $color-link: #555;
12
+
13
+ $color-sidebar-background: $color-light;
14
+ $color-sidebar-link: $color-eucalyptus;
15
+ $color-sidebar-link-background-hover: $color-edge;
16
+
17
+ $color-content-background: $color-white;
18
+ $color-page-background: $color-light;
@@ -0,0 +1,57 @@
1
+ .content {
2
+ //margin: $scale-p0;
3
+ //background-color: $color-content-background;
4
+ //padding: $scale-p1;
5
+ max-width: 800px;
6
+ //border: 1px solid #e9e9e9;
7
+ //box-shadow: 1px 1px 6px 0px rgba(#e9e9e9, 0.2);
8
+
9
+ a {
10
+ color: $color-stromboli;
11
+ border-bottom: 1px solid $color-eucalyptus;
12
+ }
13
+
14
+ h1, h2, h3 {
15
+ color: $color-eucalyptus;
16
+ margin-top: $scale-p1;
17
+
18
+ &:first-of-type {
19
+ margin-top: 0;
20
+ }
21
+ }
22
+
23
+ h2 {
24
+ font-size: $scale-p1;
25
+ }
26
+
27
+ h3 {
28
+ font-size: $scale-p0;
29
+ }
30
+
31
+ .highlighter-rouge {
32
+ margin-bottom: 1rem;
33
+ }
34
+
35
+ pre {
36
+ font-family: $font-code-family;
37
+ overflow-x: scroll;
38
+ padding: $scale-m2 $scale-m1;
39
+ border-radius: 2px;
40
+ line-height: 1.4;
41
+
42
+ code {
43
+ font-family: $font-code-family;
44
+ font-size: $scale-p0;
45
+ }
46
+ }
47
+
48
+ p, li {
49
+ color: $color-dark;
50
+ }
51
+
52
+ li {
53
+ display: list-item;
54
+ margin-left: $scale-p0;
55
+ list-style: disc;
56
+ }
57
+ }
@@ -0,0 +1,25 @@
1
+ .cta-list {
2
+ display: flex;
3
+ align-items: center;
4
+
5
+ li {
6
+ margin-right: $scale-p1;
7
+ }
8
+ }
9
+
10
+ .cta-button {
11
+ display: inline-block;
12
+ padding: $scale-m1 $scale-p0;
13
+ border: 2px solid $color-white;
14
+ border-radius: $scale-m1;
15
+ font-weight: 700;
16
+
17
+ &:hover {
18
+ border: 2px solid $color-aquamarine;
19
+ color: $color-aquamarine;
20
+ }
21
+
22
+ &:active {
23
+ box-shadow: 0 0 4px $color-aquamarine;
24
+ }
25
+ }
@@ -0,0 +1,22 @@
1
+ .container {
2
+ width: 100%;
3
+ }
4
+
5
+ .row {
6
+ display: block;
7
+
8
+ @include tablet {
9
+ display: flex;
10
+ }
11
+
12
+ @include desktop {
13
+ display: flex;
14
+ }
15
+
16
+ }
17
+
18
+ .col {
19
+ flex-basis: 0;
20
+ flex-grow: 1;
21
+ flex-shrink: 1;
22
+ }
@@ -0,0 +1,50 @@
1
+ $min-tablet: 768px;
2
+ $min-desktop: 1024px;
3
+
4
+ @mixin tablet {
5
+ @media (min-width: 768px) and (max-width: 1024px) {
6
+ @content;
7
+ }
8
+ }
9
+
10
+ @mixin at-least-tablet {
11
+ @include at-least($min-tablet) {
12
+ @content;
13
+ }
14
+ }
15
+
16
+ @mixin until-tablet {
17
+ @include until($min-tablet) {
18
+ @content;
19
+ }
20
+ }
21
+
22
+ @mixin at-least-desktop {
23
+ @include at-least($min-desktop) {
24
+ @content;
25
+ }
26
+ }
27
+
28
+ @mixin desktop {
29
+ @media (min-width: 1024px) {
30
+ @content;
31
+ }
32
+ }
33
+
34
+ @mixin at-least($device-width) {
35
+ @media (min-width: $device-width) {
36
+ @content;
37
+ }
38
+ }
39
+
40
+ @mixin until($device-width) {
41
+ @media (max-width: $device-width) {
42
+ @content;
43
+ }
44
+ }
45
+
46
+ @mixin between($min-width, $max-width) {
47
+ @media (min-width: $min-width) and (max-width: $max-width) {
48
+ @content;
49
+ }
50
+ }