This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { Reference, StoreObject, TypedDocumentNode } from '@apollo/client'; | |
/** | |
* Returns an always-up-to-date view of whatever data the cache currently contains for a given fragment and useFragment | |
* never triggers network requests of its own. | |
* | |
* Based on https://www.apollographql.com/docs/react/api/react/hooks#usefragment code at https://github.com/apollographql/apollo-client/blob/a8fe0a1217d9784d3165e0ec2e88a2caca0f82d7/src/react/hooks/useFragment.ts#L1-L108 | |
* | |
* I've taken this from https://github.com/vuejs/apollo/issues/1510 with a bit more tweaks from the apollo react codebase. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
/// Bunch of not showing stuff | |
"editor.lineNumbers": "off", | |
"editor.minimap.enabled": false, | |
"editor.renderLineHighlight": "none", | |
"editor.occurrencesHighlight": "off", | |
"window.customTitleBarVisibility": "windowed", | |
"workbench.layoutControl.enabled": false, | |
"breadcrumbs.enabled": false, | |
"scm.diffDecorations": "none", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ╔═╡ 0518f61d-daa5-4d9d-a953-d05d8e1f2870 | |
import HypertextLiteral: @htl | |
# ╔═╡ 35f8353a-6fd6-4d66-8a76-17b3c51bc1ad | |
import Printf: @sprintf | |
# ╔═╡ 938f5064-ace6-4614-a6ec-b1b555d4fb1e | |
function displayround(number::Number; digits::Number) | |
@htl """ | |
<div style=$(Dict( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Plugin that makes line wrapping in the editor respect the identation of the line. | |
* It does this by adding a line decoration that adds padding-left (as much as there is indentation), | |
* and adds the same amount as negative "text-indent". The nice thing about text-indent is that it | |
* applies to the initial line of a wrapped line. | |
* | |
* The identation decorations have to happen in a StateField (without access to the editor), | |
* because they change the layout of the text :( The character width I need however, is in the editor... | |
* So I do this ugly hack where I, in `character_width_listener`, I fire an effect that gets picked up | |
* by another StateField (`extra_cycle_character_width`) that saves the character width into state, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A Pluto.jl notebook ### | |
# v0.17.1 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ 19f83c25-828c-4cf3-9086-9088e51f07f9 | |
import HypertextLiteral: @htl | |
# ╔═╡ fc30418d-ed9a-4287-be30-ed1fa4ec3fc7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A Pluto.jl notebook ### | |
# v0.17.1 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ 169b7cf5-e220-43e9-8041-6d22936bb5bd | |
import Pkg | |
# ╔═╡ e24a3b1f-bc46-44e6-83d7-fa0f98011fd8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A Pluto.jl notebook ### | |
# v0.17.1 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ 19f83c25-828c-4cf3-9086-9088e51f07f9 | |
import HypertextLiteral: @htl | |
# ╔═╡ fc30418d-ed9a-4287-be30-ed1fa4ec3fc7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A Pluto.jl notebook ### | |
# v0.17.1 | |
using Markdown | |
using InteractiveUtils | |
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). | |
macro bind(def, element) | |
quote | |
local el = $(esc(element)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import _ from "lodash" | |
import { StateEffect, StateField } from "@codemirror/state" | |
import { EditorView, Decoration } from "@codemirror/view" | |
/** | |
* Plugin that makes line wrapping in the editor respect the identation of the line. | |
* It does this by adding a line decoration that adds padding-left (as much as there is indentation), | |
* and adds the same amount as negative "text-indent". The nice thing about text-indent is that it | |
* applies to the initial line of a wrapped line. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### A Pluto.jl notebook ### | |
# v0.15.1 | |
using Markdown | |
using InteractiveUtils | |
# ╔═╡ 2da76520-1615-11ec-1ad7-8f93957b2e6e | |
import IOCapture | |
# ╔═╡ 7d63286d-2320-49bf-a8a1-e538f53ba829 |
NewerOlder