j1-template 2022.4.1 → 2022.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/themes/j1/layouts/content_generator_article_navigator.html +1 -1
  3. data/_includes/themes/j1/layouts/content_generator_blog_archive.html +1 -1
  4. data/_includes/themes/j1/layouts/content_generator_news_panel_posts.html +1 -1
  5. data/assets/themes/j1/adapter/js/nbinteract.js +11 -0
  6. data/assets/themes/j1/modules/bokeh/README.md +380 -0
  7. data/assets/themes/j1/modules/bokeh/js/v2.4.3/bokeh.min.js +596 -0
  8. data/assets/themes/j1/modules/nbInteract/css/theme/uno/nbinteract-core.css +7 -0
  9. data/assets/themes/j1/modules/nbInteract/css/theme/uno/nbinteract-core.min.css +1 -1
  10. data/assets/themes/j1/modules/vega/js/vega/LICENSE +27 -0
  11. data/assets/themes/j1/modules/vega/js/vega/README.md +42 -0
  12. data/assets/themes/j1/modules/vega/js/vega/vega-core.js +34550 -0
  13. data/assets/themes/j1/modules/vega/js/vega/vega-core.min.js +2 -0
  14. data/assets/themes/j1/modules/vega/js/vega/vega-core.min.js.map +1 -0
  15. data/assets/themes/j1/modules/vega/js/vega/vega.js +49095 -0
  16. data/assets/themes/j1/modules/vega/js/vega/vega.min.js +2 -0
  17. data/assets/themes/j1/modules/vega/js/vega/vega.min.js.map +1 -0
  18. data/assets/themes/j1/modules/vega/js/vega-embed/LICENSE +27 -0
  19. data/assets/themes/j1/modules/vega/js/vega-embed/README.md +230 -0
  20. data/assets/themes/j1/modules/vega/js/vega-embed/vega-embed.js +6607 -0
  21. data/assets/themes/j1/modules/vega/js/vega-embed/vega-embed.js.map +1 -0
  22. data/assets/themes/j1/modules/vega/js/vega-embed/vega-embed.min.js +21 -0
  23. data/assets/themes/j1/modules/vega/js/vega-embed/vega-embed.min.js.map +1 -0
  24. data/assets/themes/j1/modules/vega/js/vega-lite/LICENSE +27 -0
  25. data/assets/themes/j1/modules/vega/js/vega-lite/README.md +34 -0
  26. data/assets/themes/j1/modules/vega/js/vega-lite/vega-lite-schema.json +30999 -0
  27. data/assets/themes/j1/modules/vega/js/vega-lite/vega-lite.js +24585 -0
  28. data/assets/themes/j1/modules/vega/js/vega-lite/vega-lite.js.map +1 -0
  29. data/assets/themes/j1/modules/vega/js/vega-lite/vega-lite.min.js +2 -0
  30. data/assets/themes/j1/modules/vega/js/vega-lite/vega-lite.min.js.map +1 -0
  31. data/lib/j1/version.rb +1 -1
  32. data/lib/starter_web/Gemfile +1 -1
  33. data/lib/starter_web/_config.yml +1 -1
  34. data/lib/starter_web/_data/modules/defaults/nbinteract.yml +1 -1
  35. data/lib/starter_web/_data/modules/navigator_menu.yml +40 -23
  36. data/lib/starter_web/_data/modules/nbinteract.yml +314 -295
  37. data/lib/starter_web/_data/resources.yml +101 -0
  38. data/lib/starter_web/_plugins/lunr_index.rb +1 -1
  39. data/lib/starter_web/assets/images/modules/attics/wrongtog-1920x1280.jpg +0 -0
  40. data/lib/starter_web/assets/images/modules/attics/yellow-cactus-1920x1280.jpg +0 -0
  41. data/lib/starter_web/assets/images/modules/icons/bokeh/bokeh-32x32.ico +0 -0
  42. data/lib/starter_web/assets/images/modules/icons/bokeh/bokeh.ico +0 -0
  43. data/lib/starter_web/assets/images/modules/icons/bokeh/logo-160x160.png +0 -0
  44. data/lib/starter_web/package.json +1 -1
  45. data/lib/starter_web/pages/public/jupyter/examples/{j1-circular-times-table.adoc → distributed/j1-circular-times-table.adoc} +7 -2
  46. data/lib/starter_web/pages/public/jupyter/examples/{j1-interactive-widgets.adoc → distributed/j1-common-used-widgets.adoc} +14 -6
  47. data/lib/starter_web/pages/public/jupyter/examples/{j1-odes-in-python.adoc → distributed/j1-odes-in-python.adoc} +7 -2
  48. data/lib/starter_web/pages/public/jupyter/examples/{j1_climate-change-forecast.adoc → localized/j1_climate-change-forecast.adoc} +10 -5
  49. data/lib/starter_web/pages/public/jupyter/where_to_go.adoc +239 -0
  50. data/lib/starter_web/pages/public/learn/where_to_go.adoc +23 -7
  51. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  52. data/lib/starter_web/utilsrv/package.json +1 -1
  53. metadata +35 -30
  54. data/lib/starter_web/pages/public/jupyter/docs/_includes/attributes.asciidoc +0 -58
  55. data/lib/starter_web/pages/public/jupyter/docs/_includes/documents/j1_docs_example_static.asciidoc +0 -232
  56. data/lib/starter_web/pages/public/jupyter/docs/j1-nbinteract-doc.adoc +0 -563
  57. data/lib/starter_web/pages/public/jupyter/docs/nbi-widget-manual.adoc +0 -465
  58. data/lib/starter_web/pages/public/jupyter/docs/nbinteract-doc.adoc +0 -473
  59. data/lib/starter_web/pages/public/jupyter/examples/j1-testing-plotly.adoc +0 -94
  60. data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_circular_times_table-checkpoint.ipynb +0 -12387
  61. data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_climate_change_forecast-checkpoint.ipynb +0 -1058
  62. data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_docs_example_dynamic-checkpoint.ipynb +0 -14478
  63. data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_interactive_widgets-checkpoint.ipynb +0 -738
  64. data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_ode_selected-checkpoint.ipynb +0 -14478
  65. data/lib/starter_web/pages/public/jupyter/notebooks/j1/.ipynb_checkpoints/j1_odes_in_python-checkpoint.ipynb +0 -15227
  66. data/lib/starter_web/pages/public/jupyter/notebooks/j1/factor_by_factor.mp4 +0 -0
  67. data/lib/starter_web/pages/public/jupyter/notebooks/j1/line_by_line.mp4 +0 -0
  68. data/lib/starter_web/pages/public/jupyter/notebooks/j1/point_by_point.mp4 +0 -0
  69. data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_examples_central_limit_theorem-checkpoint.ipynb +0 -247
  70. data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_examples_variability_of_the_sample_mean-checkpoint.ipynb +0 -323
  71. data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_graphing-checkpoint.ipynb +0 -387
  72. data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_interactive_questions-checkpoint.ipynb +0 -185
  73. data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_recipes_layout-checkpoint.ipynb +0 -384
  74. data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_tutorial_interact-checkpoint.ipynb +0 -254
  75. data/lib/starter_web/pages/public/jupyter/notebooks/nbi-docs/.ipynb_checkpoints/nbi_docs_tutorial_monty_hall-checkpoint.ipynb +0 -732
  76. data/lib/starter_web/pages/public/jupyter/services/binderhub.adoc +0 -564
  77. data/lib/starter_web/pages/public/jupyter/services/jupyterhub.adoc +0 -244
@@ -0,0 +1,27 @@
1
+ Copyright (c) 2015, University of Washington Interactive Data Lab
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
+ 1. Redistributions of source code must retain the above copyright notice, this
8
+ list of conditions and the following disclaimer.
9
+
10
+ 2. 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
+ 3. Neither the name of the copyright holder nor the names of its contributors
15
+ may be used to endorse or promote products derived from this software
16
+ 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 OWNER 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.
@@ -0,0 +1,230 @@
1
+ # Vega-Embed
2
+
3
+ [![npm version](https://img.shields.io/npm/v/vega-embed.svg)](https://www.npmjs.com/package/vega-embed)
4
+ [![](https://data.jsdelivr.com/v1/package/npm/vega-embed/badge?style=rounded)](https://www.jsdelivr.com/package/npm/vega-embed)
5
+ [![Build Status](https://github.com/vega/vega-embed/workflows/Test/badge.svg)](https://github.com/vega/vega-embed/actions)
6
+ [![codecov](https://codecov.io/gh/vega/vega-embed/branch/master/graph/badge.svg)](https://codecov.io/gh/vega/vega-embed)
7
+ [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=rounded)](https://github.com/prettier/prettier)
8
+
9
+ [Vega-Embed](http://github.com/vega/vega-embed) makes it easy to embed interactive [Vega](https://vega.github.io/vega) and [Vega-Lite](https://vega.github.io/vega-lite) views into web pages. With Vega Embed, you can:
10
+
11
+ - Load Vega/Vega-Lite specs from source text, parsed JSON, or URLs.
12
+ - Patch Vega specs (even ones generated from Vega-Lite) to add additional functionality; for example, see [Rotating Earth](https://observablehq.com/@domoritz/rotating-earth).
13
+ - Add action links such as "View Source" and "Open in Vega Editor".
14
+ - Includes [Vega Tooltip](https://github.com/vega/vega-tooltip).
15
+ - Includes [Vega Themes](https://github.com/vega/vega-themes). **Experimental: themes are not stable yet**
16
+
17
+ **Vega-Lite works well with [Observable](https://beta.observablehq.com/). Learn how to use it in [our example notebook](https://beta.observablehq.com/@domoritz/hello-vega-embed).**
18
+
19
+ <img src="embed.gif" width="500">
20
+
21
+ ## Basic Examples
22
+
23
+ ### Directly in the Browser
24
+
25
+ You can import Vega-Embed from a local copy or (as shown below) [from jsDelivr](https://www.jsdelivr.com/package/npm/vega-embed). Please replace `[VERSION]` with the correct [Vega](https://www.jsdelivr.com/package/npm/vega), [Vega-Lite](https://www.jsdelivr.com/package/npm/vega-lite), and [Vega-Embed](https://www.jsdelivr.com/package/npm/vega-embed) versions. We recommend that you specify the major versions (`vega@5`, `vega-lite@4`, `vega-embed@6`).
26
+
27
+ ```html
28
+ <!DOCTYPE html>
29
+ <html>
30
+ <head>
31
+ <!-- Import Vega & Vega-Lite (does not have to be from CDN) -->
32
+ <script src="https://cdn.jsdelivr.net/npm/vega@[VERSION]"></script>
33
+ <script src="https://cdn.jsdelivr.net/npm/vega-lite@[VERSION]"></script>
34
+ <!-- Import vega-embed -->
35
+ <script src="https://cdn.jsdelivr.net/npm/vega-embed@[VERSION]"></script>
36
+ </head>
37
+ <body>
38
+
39
+ <div id="vis"></div>
40
+
41
+ <script type="text/javascript">
42
+ var spec = "https://raw.githubusercontent.com/vega/vega/master/docs/examples/bar-chart.vg.json";
43
+ vegaEmbed('#vis', spec).then(function(result) {
44
+ // Access the Vega view instance (https://vega.github.io/vega/docs/api/view/) as result.view
45
+ }).catch(console.error);
46
+ </script>
47
+ </body>
48
+ </html>
49
+ ```
50
+
51
+ Look at the example online in the [Vega-Embed Block](https://bl.ocks.org/domoritz/455e1c7872c4b38a58b90df0c3d7b1b9).
52
+
53
+ ### JavaScript or TypeScript
54
+
55
+ The basic example below needs to be transpiled and bundled (using rollup, webpack, etc..) before it can be loaded in a browser.
56
+
57
+ ```ts
58
+ import embed from 'vega-embed';
59
+
60
+ const spec = {
61
+ ...
62
+ }
63
+
64
+ const result = await embed('#vis', spec);
65
+
66
+ console.log(result.view);
67
+ ```
68
+
69
+ ### In Observable
70
+
71
+ You can require embed with `embed = require('vega-embed@6')` and then embed a chart with `viewof view = embed(...)`. Check the [our example notebook](https://beta.observablehq.com/@domoritz/hello-vega-embed) for more details.
72
+
73
+ ## API Reference
74
+
75
+ When using a `script` tag, the default export of Vega-Embed is a wrapper function that automatically chooses between [`embed`](#embed) and [`container`](#container) based on the provided arguments. Vega-Embed provides this convenience for imports in interactive environments like [Observable](https://www.observablehq.com/). When using the Vega-Embed npm package, the default export is the [`embed`](#embed) function.
76
+
77
+ <a href="#embed" name="embed">#</a>
78
+ <b>embed</b>(<i>el</i>, <i>spec</i>[, <i>opt</i>])
79
+ [<>](https://github.com/vega/vega-embed/blob/master/src/embed.ts "Source")
80
+
81
+ Returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) that resolves to a result object. The result object contains:
82
+
83
+ | Property| Type | Description |
84
+ | :------ | :---------- | :------------- |
85
+ | `view` | String | The instantiated [Vega `View` instance](https://github.com/vega/vega-view#vega-view). |
86
+ | `spec` | Object | A copy of the parsed JSON Vega or Vega-Lite spec. |
87
+ | `vgSpec` | Object | The compiled Vega spec. |
88
+ | `finalize` | Function | A method to prepare embed to be removed. To prevent unwanted behaviors and memory leaks, this method unregisters any timers and removes any event listeners the visualization has registered on external DOM elements. Applications should invoke this method when a Embed or the View instance is no longer needed. This method calls [`view.finalize`](https://vega.github.io/vega/docs/api/view/#view_finalize). |
89
+
90
+ The `embed` function accepts the following arguments:
91
+
92
+ | Property| Type | Description |
93
+ | :------ | :--------- | :------------- |
94
+ | `el` | String | A DOM element or CSS selector indicating the element on the page in which to add the embedded view. |
95
+ | `spec` | String / Object | _String_ : A URL string from which to load the Vega specification. This URL will be subject to standard browser security restrictions. Typically this URL will point to a file on the same host and port number as the web page itself. <br> _Object_ : The Vega/Vega-Lite specification as a parsed JSON object. |
96
+ | `opt` | Object | _(Optional)_ A JavaScript object containing options for embedding. |
97
+
98
+ _Note: Internet Explorer does not support [the ES6 Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) feature. To make it work correctly, please follow [the instructions on the Vega website](https://vega.github.io/vega/usage/#ie)._
99
+
100
+ <a href="#container" name="container">#</a>
101
+ <b>container</b>(<i>spec</i>[, <i>opt</i>])
102
+ [<>](https://github.com/vega/vega-embed/blob/master/src/container.ts "Source")
103
+
104
+ Returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)* that resolves to an HTML element with the [Vega `View` instance](https://github.com/vega/vega-view#vega-view) as the `value` property. The function is designed to work with [Observable](https://observablehq.com/). The `container` function accepts the following arguments:
105
+
106
+ | Property| Type | Description |
107
+ | :------ | :--------- | :------------- |
108
+ | `spec` | String / Object | _String_ : A URL string from which to load the Vega specification. This URL will be subject to standard browser security restrictions. Typically this URL will point to a file on the same host and port number as the web page itself. <br> _Object_ : The Vega/Vega-Lite specification as a parsed JSON object. |
109
+ | `opt` | Object | _(Optional)_ A JavaScript object containing options for embedding. |
110
+
111
+ ### Options
112
+
113
+ You can configure Vega Embed with an options object. You can pass options as an argument to the [embed function](#api-reference) or as `usermeta.embedOptions` as part of the Vega or Vega-Lite specification.
114
+
115
+ ```js
116
+ var opt = {
117
+ mode: ...,
118
+
119
+ config: ...,
120
+ theme: ...,
121
+
122
+ defaultStyle: ...,
123
+
124
+ bind: ...,
125
+
126
+ // view config options
127
+ renderer: ...,
128
+ loader: ...,
129
+ logLevel: ...,
130
+
131
+ tooltip: ...,
132
+
133
+ patch: ...,
134
+
135
+ width: ...,
136
+ height: ...,
137
+ padding: ...,
138
+
139
+ actions: {
140
+ export: ...,
141
+ source: ...,
142
+ compiled: ...,
143
+ editor: ...
144
+ },
145
+
146
+ scaleFactor: ...,
147
+
148
+ editorUrl: ...,
149
+
150
+ sourceHeader: ...,
151
+ sourceFooter: ...,
152
+
153
+ hover: {
154
+ hoverSet: ...,
155
+ updateSet: ...,
156
+ },
157
+
158
+ downloadFileName: ...,
159
+
160
+ formatLocale: ...,
161
+ timeFormatLocale: ...,
162
+
163
+ ast: ...,
164
+ expr: ...,
165
+
166
+ i18n: {
167
+ COMPILED_ACTION: ...,
168
+ EDITOR_ACTION: ...,
169
+ PNG_ACTION: ...,
170
+ SOURCE_ACTION: ...,
171
+ SVG_ACTION: ...
172
+ }
173
+ }
174
+ ```
175
+
176
+ | Property | Type | Description |
177
+ | :------- | :--------------- | :------------- |
178
+ | `mode` | String | If specified, tells Vega-Embed to parse the spec as `vega` or `vega-lite`. Vega-Embed will parse the [`$schema` url](https://github.com/vega/schema) if the mode is not specified. Vega-Embed will default to `vega` if neither `mode`, nor `$schema` are specified. |
179
+ | `config` | String / Object | _String_ : A URL string from which to load a [Vega](https://vega.github.io/vega/docs/config/)/[Vega-Lite](https://vega.github.io/vega-lite/docs/config.html) or [Vega-Lite](https://vega.github.io/vega-lite/docs/config.html) configuration file. This URL will be subject to standard browser security restrictions. Typically this URL will point to a file on the same host and port number as the web page itself. <br> _Object_ : A Vega/Vega-Lite configuration as a parsed JSON object to override the default configuration options. |
180
+ | `theme` | String | If specified, tells Vega-Embed use the theme from [Vega Themes](https://github.com/vega/vega-themes). **Experimental: we may update themes with minor version updates of Vega-Embed.** |
181
+ | `defaultStyle` | Boolean or String | If set to `true` (default), the embed actions are shown in a menu. Set to `false` to use simple links. Provide a string to set the style sheet (not supported in usermeta). |
182
+ | `bind` | String or Element | The element that should contain any input elements bound to signals. |
183
+ | `renderer` | String | The renderer to use for the view. One of `"canvas"` (default) or `"svg"`. See [Vega docs](https://vega.github.io/vega/docs/api/view/#view_renderer) for details. May be a custom value if passing your own `viewClass` option. |
184
+ | `logLevel` | Level | Sets the current log level. See [Vega docs](https://vega.github.io/vega/docs/api/view/#view_logLevel) for details. |
185
+ | `tooltip` | Handler or Boolean or Object | Provide a [tooltip handler](https://vega.github.io/vega/docs/api/view/#view_tooltip), customize the default [Vega Tooltip](https://github.com/vega/vega-tooltip) handler, or disable the default handler. |
186
+ | `loader` | Loader / Object | _Loader_ : Sets a custom Vega loader. _Object_ : Vega loader options for a loader that will be created. <br> See [Vega docs](https://vega.github.io/vega/docs/api/view/#view) for details. |
187
+ | `patch` | Function / Object[] / String | A function to modify the Vega specification before it is parsed. Alternatively, a [JSON-Patch RFC6902](https://tools.ietf.org/html/rfc6902) to modify the Vega specification. If you use Vega-Lite, the compiled Vega will be patched. Alternatively to the function or the object, a URL string from which to load the patch can be provided. This URL will be subject to standard browser security restrictions. Typically this URL will point to a file on the same host and port number as the web page itself. |
188
+ | `width` | Number | Sets the view width in pixels. See [Vega docs](https://vega.github.io/vega/docs/api/view/#view_width) for details. Note that Vega-Lite overrides this option. |
189
+ | `height` | Number | Sets the view height in pixels. See [Vega docs](https://vega.github.io/vega/docs/api/view/#view_height) for details. Note that Vega-Lite overrides this option. |
190
+ | `padding` | Object | Sets the view padding in pixels. See [Vega docs](https://vega.github.io/vega/docs/api/view/#view_padding) for details. |
191
+ | `actions` | Boolean / Object | Determines if action links ("Export as PNG/SVG", "View Source", "View Vega" (only for Vega-Lite), "Open in Vega Editor") are included with the embedded view. If the value is `true`, all action links will be shown and none if the value is `false`. This property can take a key-value mapping object that maps keys (`export`, `source`, `compiled`, `editor`) to boolean values for determining if each action link should be shown. By default, `export`, `source`, and `editor` are true and `compiled` is false. These defaults can be overridden: for example, if `actions` is `{export: false, source: true}`, the embedded visualization will have two links – "View Source" and "Open in Vega Editor". The `export` property can take a key-value mapping object that maps keys (svg, png) to boolean values for determining if each export action link should be shown. By default, `svg` and `png` are true. |
192
+ | `scaleFactor` | Number | The number by which to multiply the width and height (default `1`) of an exported PNG or SVG image. |
193
+ | `editorUrl` | String | The URL at which to open embedded Vega specs in a Vega editor. Defaults to `"http://vega.github.io/editor/"`. Internally, Vega-Embed uses [HTML5 postMessage](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage) to pass the specification information to the editor. |
194
+ | `sourceHeader` | String | HTML to inject into the `head` tag of the page generated by the "View Source" and "View Vega" action link. For example, this can be used to add code for [syntax highlighting](https://highlightjs.org/). |
195
+ | `sourceFooter` | String | HTML to inject into the end of the page generated by the "View Source" and "View Vega" action link. The text will be added immediately before the closing `body` tag. |
196
+ | `hover` | Boolean or Object | Enable [hover event processing](https://vega.github.io/vega/docs/api/view/#view_hover). Hover event processing is enabled on Vega by default.<br> _Boolean_: Enables/disables hover event processing.<br> _Object_: Optional keys (`hoverSet`, `updateSet`) to specify which named encoding sets to invoke upon mouseover and mouseout. |
197
+ | `i18n` | Object | This property maps keys (`COMPILED_ACTION`, `EDITOR_ACTION`, `PNG_ACTION`, `SOURCE_ACTION`, `SVG_ACTION`) to string values for the action's text. By default, the text is in English. |
198
+ | `downloadFileName` | String | Sets the file name (default: `visualization`) for charts downloaded using the `png` or `svg` action. |
199
+ | `formatLocale` | Object | Sets the default locale definition for number formatting. See the [d3-format locale collection](https://github.com/d3/d3-format/tree/master/locale) for definition files for a variety of languages. Note that this is a global setting. |
200
+ | `timeFormatLocale` | Object | Sets the default locale definition for date/time formatting. See the [d3-time-format locale collection](https://github.com/d3/d3-time-format/tree/master/locale) for definition files for a variety of languages. Note that this is a global setting. |
201
+ | `ast` | Boolean | Generate an [Abstract Syntax Tree (AST)](https://en.wikipedia.org/wiki/Abstract_syntax_tree) instead of expressions and use an interpreter instead of native evaluation. While the interpreter is slower, it adds support for Vega expressions that are [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)-compliant. |
202
+ | `expr` | Object | Custom Vega Expression interpreter. |
203
+ | `viewClass` | Class | Class which extends [Vega `View`](https://vega.github.io/vega/docs/api/view/#view) for custom rendering. |
204
+
205
+ ## Common questions
206
+
207
+ ### How do I send cookies when loading data?
208
+
209
+ By default, the Vega loader does not send the credentials of the current page with requests. You can override this behavior by passing `{loader: { http: { credentials: 'same-origin' }}}` as the embed option.
210
+
211
+ ### What CSS should I use to support `container` sizing?
212
+
213
+ When using [container](https://vega.github.io/vega-lite/docs/size.html#specifying-responsive-width-and-height) sizing in Vega-Lite, make sure to set the width of the DOM element you passed to Embed.
214
+
215
+ ## Build Process
216
+
217
+ To build `vega-embed.js` and view the test examples, you must have [yarn](https://yarnpkg.com/en/) installed.
218
+
219
+ 1. Run `yarn` in the Vega-Embed folder to install dependencies.
220
+ 2. Run `yarn build`. This will create `vega-embed.js` and the minified `vega-embed.min.js`.
221
+ 3. Run a local webserver with `yarn start` then point your web browser at the test page (e.g., `http://localhost:8000/test-vg.html`(Vega) or `http://localhost:8000/test-vl.html`(Vega-Lite)).
222
+
223
+ ## Release Process
224
+
225
+ Publishing is handled by a 2-branch [pre-release process](https://intuit.github.io/auto/docs/generated/shipit#next-branch-default), configured in `publish.yml`. All changes should be based off the default `next` branch, and are published automatically.
226
+
227
+ - PRs made into the default branch that [would trigger a version bump](https://intuit.github.io/auto/docs/generated/conventional-commits) are auto-deployed to the `next` pre-release tag on NPM. The result can be installed with `npm install vega-embed/@next`.
228
+ - When merging into `next`, please use the `squash and merge` strategy.
229
+ - To release a new stable version, open a PR from `next` into `stable` using this [compare link](https://github.com/vega/vega-embed/compare/stable...next).
230
+ - When merging from `next` into `stable`, please use the `create a merge commit` strategy.