From 0920710779503af0f1aac734726303fa053af9ba Mon Sep 17 00:00:00 2001 From: Ali Abid Date: Fri, 22 Jul 2022 12:49:21 +0100 Subject: [PATCH] change --- guides/1)getting_started/1)quickstart.md | 124 ++++++++++ .../1)providing_examples.md | 0 .../2)reactive_interfaces.md | 0 .../3)user_feedback_with_flagging.md | 0 .../2)building_interfaces/4)storing_state.md | 0 .../5)descriptive_content.md | 0 .../6)custom_CSS_and_JS.md | 0 .../7)advanced_interface_features.md | 0 .../1)components_and_event_listeners.md | 0 .../2)controlling_layout.md | 0 .../3)storing_state_in_blocks.md | 0 .../4)advanced_blocks_features.md | 0 .../building_a_pictionary_app.md | 0 .../create_your_own_friends_with_a_gan.md | 0 .../{ => 4)more_guides}/creating_a_chatbot.md | 0 .../developing_faster_with_reload_mode.md | 0 .../embedding_gradio_demos.md | 0 guides/assets/{guides => }/annotated.png | Bin guides/assets/{guides => }/flag_button.gif | Bin .../{guides => }/flagging-callback-hf.png | Bin guides/assets/{guides => }/hf_demo.gif | Bin guides/assets/{guides => }/logo.png | Bin guides/assets/{guides => }/sharing.svg | 0 .../{guides => }/view-the-api-button.gif | Bin .../Gradio_and_ONNX_on_Hugging_Face.md | 0 .../{ => etc}/adding_examples_to_your_app.md | 0 .../adding_rich_descriptions_to_your_demo.md | 0 .../{ => etc}/advanced_interface_features.md | 1 - guides/{ => etc}/getting_started.md | 1 - .../image_classification_in_pytorch.md | 0 .../image_classification_in_tensorflow.md | 0 ...classification_with_vision_transformers.md | 0 guides/{ => etc}/introduction_to_blocks.md | 1 - .../{ => etc}/real_time_speech_recognition.md | 0 .../{ => etc}/using_blocks_like_functions.md | 0 guides/{ => etc}/using_flagging.md | 0 .../using_hugging_face_integrations.md | 0 ui/pnpm-lock.yaml | 229 +++++++++--------- website/homepage/postcss.config.js | 2 +- website/homepage/src/docs/template.html | 116 +-------- website/homepage/src/guides/__init__.py | 175 ++++++++----- .../homepage/src/guides/gallery_template.html | 89 +++---- website/homepage/src/guides/template.html | 162 +++++-------- website/homepage/src/style.css | 15 +- website/homepage/src/templates/guide-color.js | 13 + website/homepage/src/templates/links.js | 91 +++++++ 46 files changed, 574 insertions(+), 445 deletions(-) create mode 100644 guides/1)getting_started/1)quickstart.md create mode 100644 guides/2)building_interfaces/1)providing_examples.md create mode 100644 guides/2)building_interfaces/2)reactive_interfaces.md create mode 100644 guides/2)building_interfaces/3)user_feedback_with_flagging.md create mode 100644 guides/2)building_interfaces/4)storing_state.md create mode 100644 guides/2)building_interfaces/5)descriptive_content.md create mode 100644 guides/2)building_interfaces/6)custom_CSS_and_JS.md create mode 100644 guides/2)building_interfaces/7)advanced_interface_features.md create mode 100644 guides/3)building_with_blocks/1)components_and_event_listeners.md create mode 100644 guides/3)building_with_blocks/2)controlling_layout.md create mode 100644 guides/3)building_with_blocks/3)storing_state_in_blocks.md create mode 100644 guides/3)building_with_blocks/4)advanced_blocks_features.md rename guides/{ => 4)more_guides}/building_a_pictionary_app.md (100%) rename guides/{ => 4)more_guides}/create_your_own_friends_with_a_gan.md (100%) rename guides/{ => 4)more_guides}/creating_a_chatbot.md (100%) rename guides/{ => 4)more_guides}/developing_faster_with_reload_mode.md (100%) rename guides/{ => 4)more_guides}/embedding_gradio_demos.md (100%) rename guides/assets/{guides => }/annotated.png (100%) rename guides/assets/{guides => }/flag_button.gif (100%) rename guides/assets/{guides => }/flagging-callback-hf.png (100%) rename guides/assets/{guides => }/hf_demo.gif (100%) rename guides/assets/{guides => }/logo.png (100%) rename guides/assets/{guides => }/sharing.svg (100%) rename guides/assets/{guides => }/view-the-api-button.gif (100%) rename guides/{ => etc}/Gradio_and_ONNX_on_Hugging_Face.md (100%) rename guides/{ => etc}/adding_examples_to_your_app.md (100%) rename guides/{ => etc}/adding_rich_descriptions_to_your_demo.md (100%) rename guides/{ => etc}/advanced_interface_features.md (99%) rename guides/{ => etc}/getting_started.md (99%) rename guides/{ => etc}/image_classification_in_pytorch.md (100%) rename guides/{ => etc}/image_classification_in_tensorflow.md (100%) rename guides/{ => etc}/image_classification_with_vision_transformers.md (100%) rename guides/{ => etc}/introduction_to_blocks.md (99%) rename guides/{ => etc}/real_time_speech_recognition.md (100%) rename guides/{ => etc}/using_blocks_like_functions.md (100%) rename guides/{ => etc}/using_flagging.md (100%) rename guides/{ => etc}/using_hugging_face_integrations.md (100%) create mode 100644 website/homepage/src/templates/guide-color.js create mode 100644 website/homepage/src/templates/links.js diff --git a/guides/1)getting_started/1)quickstart.md b/guides/1)getting_started/1)quickstart.md new file mode 100644 index 0000000000..dac3271742 --- /dev/null +++ b/guides/1)getting_started/1)quickstart.md @@ -0,0 +1,124 @@ +# Quickstart + +Docs: examples + +**Prerequisite**: Gradio requires Python 3.7 or above, that's it! + +## What Problem is Gradio Solving? + +One of the *best ways to share* your machine learning model, API, or data science workflow with others is to create an **interactive demo** that allows your users or colleagues to try out the demo in their browsers. + +A web-based demo is great as it allows anyone who can use a browser (not just technical people) to intuitively try their own inputs and understand what you've built. + +However, creating such web-based demos has traditionally been difficult, as you needed to know web hosting to serve the web app and web development (HTML, CSS, JavaScript) to build a GUI for your demo. + +Gradio allows you to **build demos and share them, all in Python.** And usually in just a few lines of code! So let's get started. + +## Hello, World + +To get Gradio running with a simple "Hello, World" example, follow these three steps: + +1. Install Gradio from pip. Note, the minimal supported Python version is 3.7. + +```bash +pip install gradio +``` + +2. Run the code below as a Python script or in a Python notebook (or in a [colab notebook](https://colab.research.google.com/drive/18ODkJvyxHutTN0P5APWyGFO_xwNcgHDZ?usp=sharing)). + +$code_hello_world + +3. The demo below will appear automatically within the Python notebook, or pop in a browser on [http://localhost:7860](http://localhost:7860/) if running from a script. + +$demo_hello_world + +## The `Interface` class + +You'll notice that in order to create the demo, we defined a `gradio.Interface` class. This `Interface` class can wrap almost any Python function with a user interface. In the example above, we saw a simple text-based function. But the function could be anything from music generator to a tax calculator to (most commonly) the prediction function of a pretrained machine learning model. + +The core `Interface` class is initialized with three required parameters: + +- `fn`: the function to wrap a UI around +- `inputs`: which component(s) to use for the input, e.g. `"text"` or `"image"` or `"audio"` +- `outputs`: which component(s) to use for the output, e.g. `"text"` or `"image"` `"label"` + +Gradio includes more than 20 different components, most of which can be used as inputs or outputs. ([See docs for complete list](https://gradio.app/docs)) + +## Components Attributes + +With these three arguments to `Interface`, you can quickly create user interfaces and `launch()` them. But what if you want to change how the UI components look or behave? + +Let's say you want to customize the input text field - for example, you wanted it to be larger and have a text hint. If we use the actual input class for `Textbox` instead of using the string shortcut, you have access to much more customizability through component attributes. + +$code_hello_world_2 +$demo_hello_world_2 + +To see a list of all the components Gradio supports and what attributes you can use to customize them, check out the [Docs](https://gradio.app/docs). + +## Multiple Inputs and Outputs + +Let's say you had a much more complex function, with multiple inputs and outputs. In the example below, we define a function that takes a string, boolean, and number, and returns a string and number. Take a look how you pass a list of input and output components. + +$code_hello_world_3 +$demo_hello_world_3 + +You simply wrap the components in a list. Each component in the `inputs` list corresponds to one of the parameters of the function, in order. Each component in the `outputs` list corresponds to one of the values returned by the function, again in order. + +## Images + +Let's try an image-to-image function! When using the `Image` component, your function will receive a numpy array of your specified size, with the shape `(width, height, 3)`, where the last dimension represents the RGB values. We'll return an image as well in the form of a numpy array. + +$code_sepia_filter +$demo_sepia_filter + +Additionally, our `Image` input interface comes with an 'edit' button ✏️ which opens tools for cropping and zooming into images. We've found that manipulating images in this way can help reveal biases or hidden flaws in a machine learning model! + +In addition to images, Gradio supports other media types, such as audio or video. Read about these in the [Docs](https://gradio.app/docs). + +## DataFrames and Graphs + +You can use Gradio to support inputs and outputs from your typical data libraries, such as numpy arrays, pandas dataframes, and plotly graphs. Take a look at the demo below (ignore the complicated data manipulation in the function!) + +$code_sales_projections +$demo_sales_projections + +## Blocks: More Flexibility and Control + +Gradio offers two APIs to users: (1) **Interface**, a high level abstraction for creating demos (that we've been discussing so far), and (2) **Blocks**, a low-level API for designing web apps with more flexible layouts and data flows. Blocks allows you to do things like: group together related demos, change where components appear on the page, handle complex data flows (e.g. outputs can serve as inputs to other functions), and update properties/visibility of components based on user interaction -- still all in Python. + +As an example, Blocks uses nested `with` statements in Python to lay out components on a page, like this: + +$code_blocks_flipper + +$demo_blocks_flipper + + +If you are interested in how Blocks works, [read its dedicated Guide](https://gradio.app/introduction_to_blocks/). + +## Sharing Demos + +Gradio demos can be easily shared publicly by setting `share=True` in the `launch()` method. Like this: + +```python +gr.Interface(classify_image, "image", "label").launch(share=True) +``` + +This generates a public, shareable link that you can send to anybody! When you send this link, the user on the other side can try out the model in their browser. Because the processing happens on your device (as long as your device stays on!), you don't have to worry about any packaging any dependencies. A share link usually looks something like this: **XXXXX.gradio.app**. Although the link is served through a Gradio URL, we are only a proxy for your local server, and do not store any data sent through the interfaces. + +Keep in mind, however, that these links are publicly accessible, meaning that anyone can use your model for prediction! Therefore, make sure not to expose any sensitive information through the functions you write, or allow any critical changes to occur on your device. If you set `share=False` (the default, except in colab notebooks), only a local link is created, which can be shared by [port-forwarding](https://www.ssh.com/ssh/tunneling/example) with specific users. + +Share links expire after 72 hours. For permanent hosting, see the next section. + +![Sharing diagram](/assets/guides/sharing.svg) + +## Hosting Gradio Demo on Spaces + +If you'd like to have a permanent link to your Gradio demo on the internet, use Huggingface Spaces. Hugging Face Spaces provides the infrastructure to permanently host your machine learning model for free! + +You can either drag and drop a folder containing your Gradio model and all related files, or you can point Spaces to your Git repository and Spaces will pull the Gradio interface from there. See [Huggingface Spaces](http://huggingface.co/spaces/) for more information. + +![Hosting Demo](/assets/guides/hf_demo.gif) + +## Next Steps + +Now that you're familiar with the basics of Gradio, here are some good next steps: diff --git a/guides/2)building_interfaces/1)providing_examples.md b/guides/2)building_interfaces/1)providing_examples.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/guides/2)building_interfaces/2)reactive_interfaces.md b/guides/2)building_interfaces/2)reactive_interfaces.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/guides/2)building_interfaces/3)user_feedback_with_flagging.md b/guides/2)building_interfaces/3)user_feedback_with_flagging.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/guides/2)building_interfaces/4)storing_state.md b/guides/2)building_interfaces/4)storing_state.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/guides/2)building_interfaces/5)descriptive_content.md b/guides/2)building_interfaces/5)descriptive_content.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/guides/2)building_interfaces/6)custom_CSS_and_JS.md b/guides/2)building_interfaces/6)custom_CSS_and_JS.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/guides/2)building_interfaces/7)advanced_interface_features.md b/guides/2)building_interfaces/7)advanced_interface_features.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/guides/3)building_with_blocks/1)components_and_event_listeners.md b/guides/3)building_with_blocks/1)components_and_event_listeners.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/guides/3)building_with_blocks/2)controlling_layout.md b/guides/3)building_with_blocks/2)controlling_layout.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/guides/3)building_with_blocks/3)storing_state_in_blocks.md b/guides/3)building_with_blocks/3)storing_state_in_blocks.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/guides/3)building_with_blocks/4)advanced_blocks_features.md b/guides/3)building_with_blocks/4)advanced_blocks_features.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/guides/building_a_pictionary_app.md b/guides/4)more_guides/building_a_pictionary_app.md similarity index 100% rename from guides/building_a_pictionary_app.md rename to guides/4)more_guides/building_a_pictionary_app.md diff --git a/guides/create_your_own_friends_with_a_gan.md b/guides/4)more_guides/create_your_own_friends_with_a_gan.md similarity index 100% rename from guides/create_your_own_friends_with_a_gan.md rename to guides/4)more_guides/create_your_own_friends_with_a_gan.md diff --git a/guides/creating_a_chatbot.md b/guides/4)more_guides/creating_a_chatbot.md similarity index 100% rename from guides/creating_a_chatbot.md rename to guides/4)more_guides/creating_a_chatbot.md diff --git a/guides/developing_faster_with_reload_mode.md b/guides/4)more_guides/developing_faster_with_reload_mode.md similarity index 100% rename from guides/developing_faster_with_reload_mode.md rename to guides/4)more_guides/developing_faster_with_reload_mode.md diff --git a/guides/embedding_gradio_demos.md b/guides/4)more_guides/embedding_gradio_demos.md similarity index 100% rename from guides/embedding_gradio_demos.md rename to guides/4)more_guides/embedding_gradio_demos.md diff --git a/guides/assets/guides/annotated.png b/guides/assets/annotated.png similarity index 100% rename from guides/assets/guides/annotated.png rename to guides/assets/annotated.png diff --git a/guides/assets/guides/flag_button.gif b/guides/assets/flag_button.gif similarity index 100% rename from guides/assets/guides/flag_button.gif rename to guides/assets/flag_button.gif diff --git a/guides/assets/guides/flagging-callback-hf.png b/guides/assets/flagging-callback-hf.png similarity index 100% rename from guides/assets/guides/flagging-callback-hf.png rename to guides/assets/flagging-callback-hf.png diff --git a/guides/assets/guides/hf_demo.gif b/guides/assets/hf_demo.gif similarity index 100% rename from guides/assets/guides/hf_demo.gif rename to guides/assets/hf_demo.gif diff --git a/guides/assets/guides/logo.png b/guides/assets/logo.png similarity index 100% rename from guides/assets/guides/logo.png rename to guides/assets/logo.png diff --git a/guides/assets/guides/sharing.svg b/guides/assets/sharing.svg similarity index 100% rename from guides/assets/guides/sharing.svg rename to guides/assets/sharing.svg diff --git a/guides/assets/guides/view-the-api-button.gif b/guides/assets/view-the-api-button.gif similarity index 100% rename from guides/assets/guides/view-the-api-button.gif rename to guides/assets/view-the-api-button.gif diff --git a/guides/Gradio_and_ONNX_on_Hugging_Face.md b/guides/etc/Gradio_and_ONNX_on_Hugging_Face.md similarity index 100% rename from guides/Gradio_and_ONNX_on_Hugging_Face.md rename to guides/etc/Gradio_and_ONNX_on_Hugging_Face.md diff --git a/guides/adding_examples_to_your_app.md b/guides/etc/adding_examples_to_your_app.md similarity index 100% rename from guides/adding_examples_to_your_app.md rename to guides/etc/adding_examples_to_your_app.md diff --git a/guides/adding_rich_descriptions_to_your_demo.md b/guides/etc/adding_rich_descriptions_to_your_demo.md similarity index 100% rename from guides/adding_rich_descriptions_to_your_demo.md rename to guides/etc/adding_rich_descriptions_to_your_demo.md diff --git a/guides/advanced_interface_features.md b/guides/etc/advanced_interface_features.md similarity index 99% rename from guides/advanced_interface_features.md rename to guides/etc/advanced_interface_features.md index c845656e04..fe5e0745d4 100644 --- a/guides/advanced_interface_features.md +++ b/guides/etc/advanced_interface_features.md @@ -1,6 +1,5 @@ # Advanced Interface Features -Pinned: 1 Docs: series, parallel **Prerequisite**: This Guide builds on the Quickstart. Make sure to [read the Quickstart first](/getting_started). diff --git a/guides/getting_started.md b/guides/etc/getting_started.md similarity index 99% rename from guides/getting_started.md rename to guides/etc/getting_started.md index c351568bd3..37b5b5d8a4 100644 --- a/guides/getting_started.md +++ b/guides/etc/getting_started.md @@ -1,6 +1,5 @@ # Quickstart -Pinned: 0 Docs: examples **Prerequisite**: Gradio requires Python 3.7 or above, that's it! diff --git a/guides/image_classification_in_pytorch.md b/guides/etc/image_classification_in_pytorch.md similarity index 100% rename from guides/image_classification_in_pytorch.md rename to guides/etc/image_classification_in_pytorch.md diff --git a/guides/image_classification_in_tensorflow.md b/guides/etc/image_classification_in_tensorflow.md similarity index 100% rename from guides/image_classification_in_tensorflow.md rename to guides/etc/image_classification_in_tensorflow.md diff --git a/guides/image_classification_with_vision_transformers.md b/guides/etc/image_classification_with_vision_transformers.md similarity index 100% rename from guides/image_classification_with_vision_transformers.md rename to guides/etc/image_classification_with_vision_transformers.md diff --git a/guides/introduction_to_blocks.md b/guides/etc/introduction_to_blocks.md similarity index 99% rename from guides/introduction_to_blocks.md rename to guides/etc/introduction_to_blocks.md index be62f53a0f..890a6b07dc 100644 --- a/guides/introduction_to_blocks.md +++ b/guides/etc/introduction_to_blocks.md @@ -1,6 +1,5 @@ # Introduction to Gradio Blocks 🧱 -Pinned: 2 Docs: update Gradio is a Python library that allows you to quickly build web-based machine learning demos, data science dashboards, or other kinds of web apps, **entirely in Python**. These web apps can be launched from wherever you use Python (jupyter notebooks, colab notebooks, Python terminal, etc.) and shared with anyone instantly using Gradio's auto-generated share links. diff --git a/guides/real_time_speech_recognition.md b/guides/etc/real_time_speech_recognition.md similarity index 100% rename from guides/real_time_speech_recognition.md rename to guides/etc/real_time_speech_recognition.md diff --git a/guides/using_blocks_like_functions.md b/guides/etc/using_blocks_like_functions.md similarity index 100% rename from guides/using_blocks_like_functions.md rename to guides/etc/using_blocks_like_functions.md diff --git a/guides/using_flagging.md b/guides/etc/using_flagging.md similarity index 100% rename from guides/using_flagging.md rename to guides/etc/using_flagging.md diff --git a/guides/using_hugging_face_integrations.md b/guides/etc/using_hugging_face_integrations.md similarity index 100% rename from guides/using_hugging_face_integrations.md rename to guides/etc/using_hugging_face_integrations.md diff --git a/ui/pnpm-lock.yaml b/ui/pnpm-lock.yaml index 42cb3a5a0a..557b5cf1f5 100644 --- a/ui/pnpm-lock.yaml +++ b/ui/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: 5.4 +lockfileVersion: 5.3 importers: @@ -41,7 +41,7 @@ importers: '@tailwindcss/forms': 0.5.0_tailwindcss@3.0.23 '@testing-library/dom': 8.11.3 '@testing-library/svelte': 3.1.0_svelte@3.47.0 - '@testing-library/user-event': 13.5.0_gzufz4q333be4gqfrvipwvqt6a + '@testing-library/user-event': 13.5.0_@testing-library+dom@8.11.3 autoprefixer: 10.4.4_postcss@8.4.6 babylonjs: 4.2.2 babylonjs-loaders: 4.2.2 @@ -53,13 +53,13 @@ importers: postcss: 8.4.6 postcss-nested: 5.0.6_postcss@8.4.6 prettier: 2.6.2 - prettier-plugin-svelte: 2.7.0_sqtt6dzjlskmywoml5ykunxlce + prettier-plugin-svelte: 2.7.0_prettier@2.6.2+svelte@3.47.0 sirv: 2.0.2 sirv-cli: 2.0.2 svelte: 3.47.0 - svelte-check: 2.7.0_xf35j26wmvzqzzfwect6yhmkcm + svelte-check: 2.7.0_postcss@8.4.6+svelte@3.47.0 svelte-i18n: 3.3.13_svelte@3.47.0 - svelte-preprocess: 4.10.6_xf35j26wmvzqzzfwect6yhmkcm + svelte-preprocess: 4.10.6_postcss@8.4.6+svelte@3.47.0 tailwindcss: 3.0.23_autoprefixer@10.4.4 tinyspy: 0.3.0 vite: 2.9.5 @@ -127,7 +127,7 @@ importers: '@gradio/video': link:../video mime-types: 2.1.34 playwright: 1.22.2 - svelte-i18n: 3.3.13 + svelte-i18n: 3.3.13_svelte@3.47.0 packages/atoms: specifiers: @@ -379,13 +379,13 @@ importers: '@gradio/upload': link:../upload '@gradio/video': link:../video devDependencies: - '@sveltejs/adapter-auto': 1.0.0-next.53 - '@sveltejs/kit': 1.0.0-next.318 + '@sveltejs/adapter-auto': 1.0.0-next.63 + '@sveltejs/kit': 1.0.0-next.318_svelte@3.47.0 autoprefixer: 10.4.2_postcss@8.4.6 postcss: 8.4.6 postcss-load-config: 3.1.1 - svelte-check: 2.4.1_2y4otvh2n6klv6metqycpfiuzy - svelte-preprocess: 4.10.2_bw7ic75prjd4umr4fb55sbospu + svelte-check: 2.4.1_1fac02bafd0682bb46b2470c9627a189 + svelte-preprocess: 4.10.2_7ea8a6d5efea3309cd53b5ce515684ac tailwindcss: 3.0.23_autoprefixer@10.4.2 tslib: 2.3.1 typescript: 4.5.5 @@ -924,6 +924,10 @@ packages: to-fast-properties: 2.0.0 dev: false + /@cloudflare/workers-types/3.14.1: + resolution: {integrity: sha512-B1/plF62pt+H2IJHvApK8fdOJAVsvojvacuac8x8s+JIyqbropMyqNqHTKLm3YD8ZFLGwYeFTudU+PQ7vGvBdA==} + dev: true + /@formatjs/ecma402-abstract/1.11.3: resolution: {integrity: sha512-kP/Buv5vVFMAYLHNvvUzr0lwRTU0u2WTy44Tqwku1X3C3lJ5dKqDCYVqA8wL+Y19Bq+MwHgxqd5FZJRCIsLRyQ==} dependencies: @@ -1076,52 +1080,54 @@ packages: estree-walker: 2.0.2 picomatch: 2.3.1 - /@sveltejs/adapter-auto/1.0.0-next.53: - resolution: {integrity: sha512-LyaeU0rkcymGWvV/3K26AZxqG/+ZQHwa+hrx3xsbmOykjQ2WQPTXRVwmH23zV4A5ABvni76LRMsQOoqWzP3G9Q==} + /@sveltejs/adapter-auto/1.0.0-next.63: + resolution: {integrity: sha512-9KguXwROEJMyyoKrsizAilVSmtfWxEDn2Hbxk44SP8Kj5cgN7tFCxzbL2kmmqyV1CO1tOh5iNC2oWbyTfikXmw==} dependencies: - '@sveltejs/adapter-cloudflare': 1.0.0-next.24 - '@sveltejs/adapter-netlify': 1.0.0-next.66 - '@sveltejs/adapter-vercel': 1.0.0-next.59 + '@sveltejs/adapter-cloudflare': 1.0.0-next.30 + '@sveltejs/adapter-netlify': 1.0.0-next.70 + '@sveltejs/adapter-vercel': 1.0.0-next.65 transitivePeerDependencies: - encoding - supports-color dev: true - /@sveltejs/adapter-cloudflare/1.0.0-next.24: - resolution: {integrity: sha512-g1QSrjWYjM6sfJB+pQn52EIfbVFjpk23GYsj5PLt2Gi3zRNfLRbpkFkPeyAOZbAfT4k/9lUqfLW+pkh+W3yxlg==} + /@sveltejs/adapter-cloudflare/1.0.0-next.30: + resolution: {integrity: sha512-jIclgb58n3Uoo8TTudXSa7wmLP7Rn/ESLQS+zOUe0xsti5DG/eDhELTnSvkoSa2lJY21ym5rej/GSERRyeuBVw==} dependencies: - esbuild: 0.14.42 + '@cloudflare/workers-types': 3.14.1 + esbuild: 0.14.49 worktop: 0.8.0-next.14 dev: true - /@sveltejs/adapter-netlify/1.0.0-next.66: - resolution: {integrity: sha512-UypTRnTd+R1O6SaDdc8l3A3c9/mQF8xLNoVb3Ay5ipb7uPU5WmjVYjfLVGyeVy67gztFfeFC/9Esu4OI2Ayx1A==} + /@sveltejs/adapter-netlify/1.0.0-next.70: + resolution: {integrity: sha512-lIXY6KIgIFBz4+mdvilx9Ny8oFV7T2iVTKLirJayoI/SqPWGAcxklvWvjGfS4QT8rS9pWKDaKRUQM4M/gl8LlA==} dependencies: '@iarna/toml': 2.2.5 - esbuild: 0.14.42 + esbuild: 0.14.49 set-cookie-parser: 2.4.8 tiny-glob: 0.2.9 dev: true - /@sveltejs/adapter-vercel/1.0.0-next.59: - resolution: {integrity: sha512-1lq5IFLWiLUXmNJVUXjwaInDb07BJg5er43xlMilpFpTA9BZI2hqjYCgtdtk7O6ee5EYJk876b2riM1m+y1M4Q==} + /@sveltejs/adapter-vercel/1.0.0-next.65: + resolution: {integrity: sha512-RV3HL7Ic7pGgIoBSHPwN1pBX96Km1X683oHImPHAKX9h/WOvJZ3bY5+IWNRcR8tx9rPB5gfMRg+msvPSBr3RVw==} dependencies: '@vercel/nft': 0.20.1 - esbuild: 0.14.42 + esbuild: 0.14.49 transitivePeerDependencies: - encoding - supports-color dev: true - /@sveltejs/kit/1.0.0-next.318: + /@sveltejs/kit/1.0.0-next.318_svelte@3.47.0: resolution: {integrity: sha512-/M/XNvEqK71KCGro1xLuiUuklsMPe+G5DiVMs39tpfFIFhH4oCzAt+YBaIZDKORogGz3QDaYc5BV+eFv9E5cyw==} engines: {node: '>=14.13'} hasBin: true peerDependencies: svelte: ^3.44.0 dependencies: - '@sveltejs/vite-plugin-svelte': 1.0.0-next.41_vite@2.9.5 + '@sveltejs/vite-plugin-svelte': 1.0.0-next.41_svelte@3.47.0+vite@2.9.5 sade: 1.8.1 + svelte: 3.47.0 vite: 2.9.5 transitivePeerDependencies: - diff-match-patch @@ -1131,7 +1137,7 @@ packages: - supports-color dev: true - /@sveltejs/vite-plugin-svelte/1.0.0-next.41_vite@2.9.5: + /@sveltejs/vite-plugin-svelte/1.0.0-next.41_svelte@3.47.0+vite@2.9.5: resolution: {integrity: sha512-2kZ49mpi/YW1PIPvKaJNSSwIFgmw9QUf1+yaNa4U8yJD6AsfSHXAU3goscWbi1jfWnSg2PhvwAf+bvLCdp2F9g==} engines: {node: ^14.13.1 || >= 16} peerDependencies: @@ -1146,7 +1152,8 @@ packages: debug: 4.3.4 kleur: 4.1.4 magic-string: 0.26.1 - svelte-hmr: 0.14.11 + svelte: 3.47.0 + svelte-hmr: 0.14.11_svelte@3.47.0 vite: 2.9.5 transitivePeerDependencies: - supports-color @@ -1222,7 +1229,7 @@ packages: svelte: 3.47.0 dev: false - /@testing-library/user-event/13.5.0_gzufz4q333be4gqfrvipwvqt6a: + /@testing-library/user-event/13.5.0_@testing-library+dom@8.11.3: resolution: {integrity: sha512-5Kwtbo3Y/NowpkbRuSepbyMFkZmHgD+vPzYB/RJ4oxt5Gj/avFFBYjhw27cqSVPVw/3a67NK1PbiIr9k4Gwmdg==} engines: {node: '>=10', npm: '>=6'} peerDependencies: @@ -2066,8 +2073,8 @@ packages: requiresBuild: true optional: true - /esbuild-android-64/0.14.42: - resolution: {integrity: sha512-P4Y36VUtRhK/zivqGVMqhptSrFILAGlYp0Z8r9UQqHJ3iWztRCNWnlBzD9HRx0DbueXikzOiwyOri+ojAFfW6A==} + /esbuild-android-64/0.14.49: + resolution: {integrity: sha512-vYsdOTD+yi+kquhBiFWl3tyxnj2qZJsl4tAqwhT90ktUdnyTizgle7TjNx6Ar1bN7wcwWqZ9QInfdk2WVagSww==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -2083,8 +2090,8 @@ packages: requiresBuild: true optional: true - /esbuild-android-arm64/0.14.42: - resolution: {integrity: sha512-0cOqCubq+RWScPqvtQdjXG3Czb3AWI2CaKw3HeXry2eoA2rrPr85HF7IpdU26UWdBXgPYtlTN1LUiuXbboROhg==} + /esbuild-android-arm64/0.14.49: + resolution: {integrity: sha512-g2HGr/hjOXCgSsvQZ1nK4nW/ei8JUx04Li74qub9qWrStlysaVmadRyTVuW32FGIpLQyc5sUjjZopj49eGGM2g==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -2100,8 +2107,8 @@ packages: requiresBuild: true optional: true - /esbuild-darwin-64/0.14.42: - resolution: {integrity: sha512-ipiBdCA3ZjYgRfRLdQwP82rTiv/YVMtW36hTvAN5ZKAIfxBOyPXY7Cejp3bMXWgzKD8B6O+zoMzh01GZsCuEIA==} + /esbuild-darwin-64/0.14.49: + resolution: {integrity: sha512-3rvqnBCtX9ywso5fCHixt2GBCUsogNp9DjGmvbBohh31Ces34BVzFltMSxJpacNki96+WIcX5s/vum+ckXiLYg==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -2117,8 +2124,8 @@ packages: requiresBuild: true optional: true - /esbuild-darwin-arm64/0.14.42: - resolution: {integrity: sha512-bU2tHRqTPOaoH/4m0zYHbFWpiYDmaA0gt90/3BMEFaM0PqVK/a6MA2V/ypV5PO0v8QxN6gH5hBPY4YJ2lopXgA==} + /esbuild-darwin-arm64/0.14.49: + resolution: {integrity: sha512-XMaqDxO846srnGlUSJnwbijV29MTKUATmOLyQSfswbK/2X5Uv28M9tTLUJcKKxzoo9lnkYPsx2o8EJcTYwCs/A==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -2134,8 +2141,8 @@ packages: requiresBuild: true optional: true - /esbuild-freebsd-64/0.14.42: - resolution: {integrity: sha512-75h1+22Ivy07+QvxHyhVqOdekupiTZVLN1PMwCDonAqyXd8TVNJfIRFrdL8QmSJrOJJ5h8H1I9ETyl2L8LQDaw==} + /esbuild-freebsd-64/0.14.49: + resolution: {integrity: sha512-NJ5Q6AjV879mOHFri+5lZLTp5XsO2hQ+KSJYLbfY9DgCu8s6/Zl2prWXVANYTeCDLlrIlNNYw8y34xqyLDKOmQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -2151,8 +2158,8 @@ packages: requiresBuild: true optional: true - /esbuild-freebsd-arm64/0.14.42: - resolution: {integrity: sha512-W6Jebeu5TTDQMJUJVarEzRU9LlKpNkPBbjqSu+GUPTHDCly5zZEQq9uHkmHHl7OKm+mQ2zFySN83nmfCeZCyNA==} + /esbuild-freebsd-arm64/0.14.49: + resolution: {integrity: sha512-lFLtgXnAc3eXYqj5koPlBZvEbBSOSUbWO3gyY/0+4lBdRqELyz4bAuamHvmvHW5swJYL7kngzIZw6kdu25KGOA==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -2168,8 +2175,8 @@ packages: requiresBuild: true optional: true - /esbuild-linux-32/0.14.42: - resolution: {integrity: sha512-Ooy/Bj+mJ1z4jlWcK5Dl6SlPlCgQB9zg1UrTCeY8XagvuWZ4qGPyYEWGkT94HUsRi2hKsXvcs6ThTOjBaJSMfg==} + /esbuild-linux-32/0.14.49: + resolution: {integrity: sha512-zTTH4gr2Kb8u4QcOpTDVn7Z8q7QEIvFl/+vHrI3cF6XOJS7iEI1FWslTo3uofB2+mn6sIJEQD9PrNZKoAAMDiA==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -2185,8 +2192,8 @@ packages: requiresBuild: true optional: true - /esbuild-linux-64/0.14.42: - resolution: {integrity: sha512-2L0HbzQfbTuemUWfVqNIjOfaTRt9zsvjnme6lnr7/MO9toz/MJ5tZhjqrG6uDWDxhsaHI2/nsDgrv8uEEN2eoA==} + /esbuild-linux-64/0.14.49: + resolution: {integrity: sha512-hYmzRIDzFfLrB5c1SknkxzM8LdEUOusp6M2TnuQZJLRtxTgyPnZZVtyMeCLki0wKgYPXkFsAVhi8vzo2mBNeTg==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -2202,8 +2209,8 @@ packages: requiresBuild: true optional: true - /esbuild-linux-arm/0.14.42: - resolution: {integrity: sha512-STq69yzCMhdRaWnh29UYrLSr/qaWMm/KqwaRF1pMEK7kDiagaXhSL1zQGXbYv94GuGY/zAwzK98+6idCMUOOCg==} + /esbuild-linux-arm/0.14.49: + resolution: {integrity: sha512-iE3e+ZVv1Qz1Sy0gifIsarJMQ89Rpm9mtLSRtG3AH0FPgAzQ5Z5oU6vYzhc/3gSPi2UxdCOfRhw2onXuFw/0lg==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -2219,8 +2226,8 @@ packages: requiresBuild: true optional: true - /esbuild-linux-arm64/0.14.42: - resolution: {integrity: sha512-c3Ug3e9JpVr8jAcfbhirtpBauLxzYPpycjWulD71CF6ZSY26tvzmXMJYooQ2YKqDY4e/fPu5K8bm7MiXMnyxuA==} + /esbuild-linux-arm64/0.14.49: + resolution: {integrity: sha512-KLQ+WpeuY+7bxukxLz5VgkAAVQxUv67Ft4DmHIPIW+2w3ObBPQhqNoeQUHxopoW/aiOn3m99NSmSV+bs4BSsdA==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -2236,8 +2243,8 @@ packages: requiresBuild: true optional: true - /esbuild-linux-mips64le/0.14.42: - resolution: {integrity: sha512-QuvpHGbYlkyXWf2cGm51LBCHx6eUakjaSrRpUqhPwjh/uvNUYvLmz2LgPTTPwCqaKt0iwL+OGVL0tXA5aDbAbg==} + /esbuild-linux-mips64le/0.14.49: + resolution: {integrity: sha512-n+rGODfm8RSum5pFIqFQVQpYBw+AztL8s6o9kfx7tjfK0yIGF6tm5HlG6aRjodiiKkH2xAiIM+U4xtQVZYU4rA==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -2253,8 +2260,8 @@ packages: requiresBuild: true optional: true - /esbuild-linux-ppc64le/0.14.42: - resolution: {integrity: sha512-8ohIVIWDbDT+i7lCx44YCyIRrOW1MYlks9fxTo0ME2LS/fxxdoJBwHWzaDYhjvf8kNpA+MInZvyOEAGoVDrMHg==} + /esbuild-linux-ppc64le/0.14.49: + resolution: {integrity: sha512-WP9zR4HX6iCBmMFH+XHHng2LmdoIeUmBpL4aL2TR8ruzXyT4dWrJ5BSbT8iNo6THN8lod6GOmYDLq/dgZLalGw==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -2270,8 +2277,8 @@ packages: requiresBuild: true optional: true - /esbuild-linux-riscv64/0.14.42: - resolution: {integrity: sha512-DzDqK3TuoXktPyG1Lwx7vhaF49Onv3eR61KwQyxYo4y5UKTpL3NmuarHSIaSVlTFDDpcIajCDwz5/uwKLLgKiQ==} + /esbuild-linux-riscv64/0.14.49: + resolution: {integrity: sha512-h66ORBz+Dg+1KgLvzTVQEA1LX4XBd1SK0Fgbhhw4akpG/YkN8pS6OzYI/7SGENiN6ao5hETRDSkVcvU9NRtkMQ==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -2287,8 +2294,8 @@ packages: requiresBuild: true optional: true - /esbuild-linux-s390x/0.14.42: - resolution: {integrity: sha512-YFRhPCxl8nb//Wn6SiS5pmtplBi4z9yC2gLrYoYI/tvwuB1jldir9r7JwAGy1Ck4D7sE7wBN9GFtUUX/DLdcEQ==} + /esbuild-linux-s390x/0.14.49: + resolution: {integrity: sha512-DhrUoFVWD+XmKO1y7e4kNCqQHPs6twz6VV6Uezl/XHYGzM60rBewBF5jlZjG0nCk5W/Xy6y1xWeopkrhFFM0sQ==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -2304,8 +2311,8 @@ packages: requiresBuild: true optional: true - /esbuild-netbsd-64/0.14.42: - resolution: {integrity: sha512-QYSD2k+oT9dqB/4eEM9c+7KyNYsIPgzYOSrmfNGDIyJrbT1d+CFVKvnKahDKNJLfOYj8N4MgyFaU9/Ytc6w5Vw==} + /esbuild-netbsd-64/0.14.49: + resolution: {integrity: sha512-BXaUwFOfCy2T+hABtiPUIpWjAeWK9P8O41gR4Pg73hpzoygVGnj0nI3YK4SJhe52ELgtdgWP/ckIkbn2XaTxjQ==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -2321,8 +2328,8 @@ packages: requiresBuild: true optional: true - /esbuild-openbsd-64/0.14.42: - resolution: {integrity: sha512-M2meNVIKWsm2HMY7+TU9AxM7ZVwI9havdsw6m/6EzdXysyCFFSoaTQ/Jg03izjCsK17FsVRHqRe26Llj6x0MNA==} + /esbuild-openbsd-64/0.14.49: + resolution: {integrity: sha512-lP06UQeLDGmVPw9Rg437Btu6J9/BmyhdoefnQ4gDEJTtJvKtQaUcOQrhjTq455ouZN4EHFH1h28WOJVANK41kA==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -2338,8 +2345,8 @@ packages: requiresBuild: true optional: true - /esbuild-sunos-64/0.14.42: - resolution: {integrity: sha512-uXV8TAZEw36DkgW8Ak3MpSJs1ofBb3Smkc/6pZ29sCAN1KzCAQzsje4sUwugf+FVicrHvlamCOlFZIXgct+iqQ==} + /esbuild-sunos-64/0.14.49: + resolution: {integrity: sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -2355,8 +2362,8 @@ packages: requiresBuild: true optional: true - /esbuild-windows-32/0.14.42: - resolution: {integrity: sha512-4iw/8qWmRICWi9ZOnJJf9sYt6wmtp3hsN4TdI5NqgjfOkBVMxNdM9Vt3626G1Rda9ya2Q0hjQRD9W1o+m6Lz6g==} + /esbuild-windows-32/0.14.49: + resolution: {integrity: sha512-q7Rb+J9yHTeKr9QTPDYkqfkEj8/kcKz9lOabDuvEXpXuIcosWCJgo5Z7h/L4r7rbtTH4a8U2FGKb6s1eeOHmJA==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -2372,8 +2379,8 @@ packages: requiresBuild: true optional: true - /esbuild-windows-64/0.14.42: - resolution: {integrity: sha512-j3cdK+Y3+a5H0wHKmLGTJcq0+/2mMBHPWkItR3vytp/aUGD/ua/t2BLdfBIzbNN9nLCRL9sywCRpOpFMx3CxzA==} + /esbuild-windows-64/0.14.49: + resolution: {integrity: sha512-+Cme7Ongv0UIUTniPqfTX6mJ8Deo7VXw9xN0yJEN1lQMHDppTNmKwAM3oGbD/Vqff+07K2gN0WfNkMohmG+dVw==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -2389,8 +2396,8 @@ packages: requiresBuild: true optional: true - /esbuild-windows-arm64/0.14.42: - resolution: {integrity: sha512-+lRAARnF+hf8J0mN27ujO+VbhPbDqJ8rCcJKye4y7YZLV6C4n3pTRThAb388k/zqF5uM0lS5O201u0OqoWSicw==} + /esbuild-windows-arm64/0.14.49: + resolution: {integrity: sha512-v+HYNAXzuANrCbbLFJ5nmO3m5y2PGZWLe3uloAkLt87aXiO2mZr3BTmacZdjwNkNEHuH3bNtN8cak+mzVjVPfA==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -2425,32 +2432,32 @@ packages: esbuild-windows-64: 0.14.31 esbuild-windows-arm64: 0.14.31 - /esbuild/0.14.42: - resolution: {integrity: sha512-V0uPZotCEHokJdNqyozH6qsaQXqmZEOiZWrXnds/zaH/0SyrIayRXWRB98CENO73MIZ9T3HBIOsmds5twWtmgw==} + /esbuild/0.14.49: + resolution: {integrity: sha512-/TlVHhOaq7Yz8N1OJrjqM3Auzo5wjvHFLk+T8pIue+fhnhIMpfAzsG6PLVMbFveVxqD2WOp3QHei+52IMUNmCw==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - esbuild-android-64: 0.14.42 - esbuild-android-arm64: 0.14.42 - esbuild-darwin-64: 0.14.42 - esbuild-darwin-arm64: 0.14.42 - esbuild-freebsd-64: 0.14.42 - esbuild-freebsd-arm64: 0.14.42 - esbuild-linux-32: 0.14.42 - esbuild-linux-64: 0.14.42 - esbuild-linux-arm: 0.14.42 - esbuild-linux-arm64: 0.14.42 - esbuild-linux-mips64le: 0.14.42 - esbuild-linux-ppc64le: 0.14.42 - esbuild-linux-riscv64: 0.14.42 - esbuild-linux-s390x: 0.14.42 - esbuild-netbsd-64: 0.14.42 - esbuild-openbsd-64: 0.14.42 - esbuild-sunos-64: 0.14.42 - esbuild-windows-32: 0.14.42 - esbuild-windows-64: 0.14.42 - esbuild-windows-arm64: 0.14.42 + esbuild-android-64: 0.14.49 + esbuild-android-arm64: 0.14.49 + esbuild-darwin-64: 0.14.49 + esbuild-darwin-arm64: 0.14.49 + esbuild-freebsd-64: 0.14.49 + esbuild-freebsd-arm64: 0.14.49 + esbuild-linux-32: 0.14.49 + esbuild-linux-64: 0.14.49 + esbuild-linux-arm: 0.14.49 + esbuild-linux-arm64: 0.14.49 + esbuild-linux-mips64le: 0.14.49 + esbuild-linux-ppc64le: 0.14.49 + esbuild-linux-riscv64: 0.14.49 + esbuild-linux-s390x: 0.14.49 + esbuild-netbsd-64: 0.14.49 + esbuild-openbsd-64: 0.14.49 + esbuild-sunos-64: 0.14.49 + esbuild-windows-32: 0.14.49 + esbuild-windows-64: 0.14.49 + esbuild-windows-arm64: 0.14.49 dev: true /escalade/3.1.1: @@ -3521,7 +3528,7 @@ packages: picocolors: 1.0.0 source-map-js: 1.0.2 - /prettier-plugin-svelte/2.7.0_sqtt6dzjlskmywoml5ykunxlce: + /prettier-plugin-svelte/2.7.0_prettier@2.6.2+svelte@3.47.0: resolution: {integrity: sha512-fQhhZICprZot2IqEyoiUYLTRdumULGRvw0o4dzl5jt0jfzVWdGqeYW27QTWAeXhoupEZJULmNoH3ueJwUWFLIA==} peerDependencies: prettier: ^1.16.4 || ^2.0.0 @@ -3982,7 +3989,7 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - /svelte-check/2.4.1_2y4otvh2n6klv6metqycpfiuzy: + /svelte-check/2.4.1_1fac02bafd0682bb46b2470c9627a189: resolution: {integrity: sha512-xhf3ShP5rnRwBokrgTBJ/0cO9QIc1DAVu1NWNRTfCDsDBNjGmkS3HgitgUadRuoMKj1+irZR/yHJ+Uqobnkbrw==} hasBin: true peerDependencies: @@ -3995,7 +4002,8 @@ packages: picocolors: 1.0.0 sade: 1.8.1 source-map: 0.7.3 - svelte-preprocess: 4.10.2_bw7ic75prjd4umr4fb55sbospu + svelte: 3.47.0 + svelte-preprocess: 4.10.2_7ea8a6d5efea3309cd53b5ce515684ac typescript: 4.5.5 transitivePeerDependencies: - '@babel/core' @@ -4010,7 +4018,7 @@ packages: - sugarss dev: true - /svelte-check/2.7.0_xf35j26wmvzqzzfwect6yhmkcm: + /svelte-check/2.7.0_postcss@8.4.6+svelte@3.47.0: resolution: {integrity: sha512-GrvG24j0+i8AOm0k0KyJ6Dqc+TAR2yzB7rtS4nljHStunVxCTr/1KYlv4EsOeoqtHLzeWMOd5D2O6nDdP/yw4A==} hasBin: true peerDependencies: @@ -4023,7 +4031,7 @@ packages: sade: 1.8.1 source-map: 0.7.3 svelte: 3.47.0 - svelte-preprocess: 4.10.6_bwx7acail2u6vixfjbtw6klhdi + svelte-preprocess: 4.10.6_0daff008085ea9eaa2e548676f29671a typescript: 4.5.5 transitivePeerDependencies: - '@babel/core' @@ -4038,13 +4046,6 @@ packages: - sugarss dev: false - /svelte-hmr/0.14.11: - resolution: {integrity: sha512-R9CVfX6DXxW1Kn45Jtmx+yUe+sPhrbYSUp7TkzbW0jI5fVPn6lsNG9NEs5dFg5qRhFNAoVdRw5qQDLALNKhwbQ==} - engines: {node: ^12.20 || ^14.13.1 || >= 16} - peerDependencies: - svelte: '>=3.19.0' - dev: true - /svelte-hmr/0.14.11_svelte@3.47.0: resolution: {integrity: sha512-R9CVfX6DXxW1Kn45Jtmx+yUe+sPhrbYSUp7TkzbW0jI5fVPn6lsNG9NEs5dFg5qRhFNAoVdRw5qQDLALNKhwbQ==} engines: {node: ^12.20 || ^14.13.1 || >= 16} @@ -4052,21 +4053,6 @@ packages: svelte: '>=3.19.0' dependencies: svelte: 3.47.0 - dev: false - - /svelte-i18n/3.3.13: - resolution: {integrity: sha512-RQM+ys4+Y9ztH//tX22H1UL2cniLNmIR+N4xmYygV6QpQ6EyQvloZiENRew8XrVzfvJ8HaE8NU6/yurLkl7z3g==} - engines: {node: '>= 11.15.0'} - hasBin: true - peerDependencies: - svelte: ^3.25.1 - dependencies: - deepmerge: 4.2.2 - estree-walker: 2.0.2 - intl-messageformat: 9.11.4 - sade: 1.8.1 - tiny-glob: 0.2.9 - dev: false /svelte-i18n/3.3.13_svelte@3.47.0: resolution: {integrity: sha512-RQM+ys4+Y9ztH//tX22H1UL2cniLNmIR+N4xmYygV6QpQ6EyQvloZiENRew8XrVzfvJ8HaE8NU6/yurLkl7z3g==} @@ -4083,7 +4069,7 @@ packages: tiny-glob: 0.2.9 dev: false - /svelte-preprocess/4.10.2_bw7ic75prjd4umr4fb55sbospu: + /svelte-preprocess/4.10.2_7ea8a6d5efea3309cd53b5ce515684ac: resolution: {integrity: sha512-aPpkCreSo8EL/y8kJSa1trhiX0oyAtTjlNNM7BNjRAsMJ8Yy2LtqHt0zyd4pQPXt+D4PzbO3qTjjio3kwOxDlA==} engines: {node: '>= 9.11.2'} requiresBuild: true @@ -4132,10 +4118,11 @@ packages: postcss-load-config: 3.1.1 sorcery: 0.10.0 strip-indent: 3.0.0 + svelte: 3.47.0 typescript: 4.5.5 dev: true - /svelte-preprocess/4.10.6_bwx7acail2u6vixfjbtw6klhdi: + /svelte-preprocess/4.10.6_0daff008085ea9eaa2e548676f29671a: resolution: {integrity: sha512-I2SV1w/AveMvgIQlUF/ZOO3PYVnhxfcpNyGt8pxpUVhPfyfL/CZBkkw/KPfuFix5FJ9TnnNYMhACK3DtSaYVVQ==} engines: {node: '>= 9.11.2'} requiresBuild: true @@ -4187,7 +4174,7 @@ packages: typescript: 4.5.5 dev: false - /svelte-preprocess/4.10.6_xf35j26wmvzqzzfwect6yhmkcm: + /svelte-preprocess/4.10.6_postcss@8.4.6+svelte@3.47.0: resolution: {integrity: sha512-I2SV1w/AveMvgIQlUF/ZOO3PYVnhxfcpNyGt8pxpUVhPfyfL/CZBkkw/KPfuFix5FJ9TnnNYMhACK3DtSaYVVQ==} engines: {node: '>= 9.11.2'} requiresBuild: true diff --git a/website/homepage/postcss.config.js b/website/homepage/postcss.config.js index efaacd8847..23a199eeeb 100644 --- a/website/homepage/postcss.config.js +++ b/website/homepage/postcss.config.js @@ -10,7 +10,7 @@ module.exports = { preset: 'default' }), purgecss({ - content: ['./src/**/*.html'], + content: ['./src/**/*.html', './src/**/*.js'], defaultExtractor: content => content.match(/[\w-/:]+(? {% include 'templates/footer.html' %} + + + diff --git a/website/homepage/src/guides/template.html b/website/homepage/src/guides/template.html index 34b0abaa9a..6be8ed1040 100644 --- a/website/homepage/src/guides/template.html +++ b/website/homepage/src/guides/template.html @@ -9,119 +9,87 @@ {% include "templates/navbar.html" %} -
- {% if spaces %} -
- - +
+ +
+ {% if spaces %} +
+ + + +

Related Spaces:

+ {% for space in spaces %} + + {% endfor %}
- {% endif %} -
- {% include "guides/temporary_template.html" %} + {% endif %} +
{% include "guides/temporary_template.html" %}
+
+ {% if prev_guide is not none %} + +
< Previous
+
{{ prev_guide['pretty_name'] }}
+
+ {% else %} +
+ {% endif %} + {% if next_guide is not none %} + +
Next >
+
{{ next_guide['pretty_name'] }}
+
+ {% else %} +
+ {% endif %} +
- + {% include 'templates/footer.html' %} + diff --git a/website/homepage/src/style.css b/website/homepage/src/style.css index bda3976d27..5deef723b9 100644 --- a/website/homepage/src/style.css +++ b/website/homepage/src/style.css @@ -72,16 +72,21 @@ display: none; } -/* docs */ -.selected-demo { - @apply font-semibold bg-gray-50 rounded text-orange-500; -} +/* docs & guides */ .thin-link.current-nav-link { - @apply border-orange-500 text-orange-500 md:border-l-2 pl-4; + @apply text-orange-500; +} +.thin-link.current-nav-link:not(.subheading) { + @apply border-orange-500 md:border-l-2 pl-4; } .link.current-nav-link { @apply border-orange-500 text-orange-500; } + +/* docs */ +.selected-demo { + @apply font-semibold bg-gray-50 rounded text-orange-500; +} code.language-python { @apply !leading-7 !whitespace-pre-wrap !break-all; } diff --git a/website/homepage/src/templates/guide-color.js b/website/homepage/src/templates/guide-color.js new file mode 100644 index 0000000000..2dbc0a4242 --- /dev/null +++ b/website/homepage/src/templates/guide-color.js @@ -0,0 +1,13 @@ +const COLOR_SETS = [ + ["from-green-100", "to-green-50"], + ["from-yellow-100", "to-yellow-50"], + ["from-red-100", "to-red-50"], + ["from-blue-100", "to-blue-50"], + ["from-pink-100", "to-pink-50"], + ["from-purple-100", "to-purple-50"], +] +document.querySelectorAll(".guide-box").forEach(guide => { + const [start_color, end_color] = COLOR_SETS[Math.floor(Math.random() * COLOR_SETS.length)] + guide.classList.add(start_color); + guide.classList.add(end_color); +}) diff --git a/website/homepage/src/templates/links.js b/website/homepage/src/templates/links.js new file mode 100644 index 0000000000..7494dc40c7 --- /dev/null +++ b/website/homepage/src/templates/links.js @@ -0,0 +1,91 @@ +let mainNavLinks = document.querySelectorAll(".navigation a"); +window.addEventListener("scroll", event => { + let fromTop = window.scrollY; + let lowest_link = null; + mainNavLinks.forEach(link => { + let section = document.querySelector(link.hash); + if (section.offsetTop <= fromTop * 1.01) { + lowest_link = link; + } + link.classList.remove("current-nav-link"); + }); + lowest_link.classList.add("current-nav-link"); +}); + + +// adds anchor button when hovering over headers, except on touch devices where instead the header becomes a link + +function createAnchorTag(link) { + let a = document.createElement('a'); + a.href = link; + a.classList.add("invisible", "group-hover-visible"); + let img = document.createElement('img'); + img.classList.add("anchor-img") + img.src = "/assets/img/anchor.svg"; + a.appendChild(img); + return a; +} +function createMobileAnchorTag(link) { + let a = document.createElement('a'); + a.href = link; + a.classList.add("no-underline") + return a; +} + +var headers = document.querySelectorAll("h2, h3"); + +function isTouchDevice() { + return (('ontouchstart' in window) || + (navigator.maxTouchPoints > 0) || + (navigator.msMaxTouchPoints > 0)); +} + +if (isTouchDevice()) { + for (let i = 0; i < headers.length; i++) { + let link = '#' + headers[i].id; + var parent = headers[i].parentNode; + var wrapper = createMobileAnchorTag(link); + parent.replaceChild(wrapper, headers[i]); + wrapper.appendChild(headers[i]); + } +} else { + for (let i = 0; i < headers.length; i++) { + headers[i].classList.add("group") + let link = '#' + headers[i].id; + var anchorTag = createAnchorTag(link); + headers[i].appendChild(createAnchorTag(link)); + } +} + +// add copy buttons to all codeblocks + +const svgCopy = + ''; +const svgCheck = + ''; + + +const addCopyButtons = (clipboard) => { + document.querySelectorAll("pre > code").forEach((codeBlock) => { + const button = document.createElement("button"); + button.classList.add("clipboard-button"); + button.type = "button"; + button.innerHTML = svgCopy; + button.addEventListener("click", () => { + clipboard.writeText(codeBlock.innerText).then( + () => { + button.blur(); + button.innerHTML = svgCheck; + setTimeout(() => (button.innerHTML = svgCopy), 2000); + }, + (error) => (button.innerHTML = "Error") + ); + }); + const pre = codeBlock.parentNode; + pre.parentNode.insertBefore(button, pre); + }); +}; + +if (navigator && navigator.clipboard) { + addCopyButtons(navigator.clipboard); +};