on main help sign in
adding docs!
commitf5ced069f7e371f0a681c4913486bd09ee220468 authorJohn Hyde <johnhydefour@gmail.com> dateThu 21 Apr 2022, 12:56 (5 years ago) parent72d909c
30 files changed+766−150
desk/doc.clue+10−1 desk/doc/usr/astrolabe.udon+11 desk/doc/usr/azimuth.udon+48−1 desk/doc/usr/comet.udon+10 desk/doc/usr/galaxy.udon+33−2 desk/doc/usr/keys.udon+59−4 desk/doc/usr/l2.udon+58−2 desk/doc/usr/moon.udon+8 desk/doc/usr/patpee.udon+102−2 desk/doc/usr/phonemes.udon+45 desk/doc/usr/planet.udon+9 desk/doc/usr/star.udon+14 desk/doc/usr/urbit-id.udon+64−17 ui/package.json+1−1 ui/src/actions/docLinks.ts−1 ui/src/actions/tooltip.ts+40−8 ui/src/assets/astrolabe.svg+8−8 ui/src/components/GoldBadge.svelte+4−15 ui/src/components/ShipView.svelte+45−19 ui/src/components/Sigil.svelte−1 ui/src/components/Tooltip.svelte+38 ui/src/components/TooltipAndDocLink.svelte+14 ui/src/components/docs/DocHome.svelte+24−2 ui/src/components/docs/DocLink.svelte+16−4 ui/src/main.ts+2−2 ui/src/routes/ShipViewPage.svelte+3−11 ui/src/styles/docs.scss+6−4 ui/src/styles/styles.scss+3−1 ui/src/styles/tailwind-output.css+73−44 ui/tailwind.config.cjs+18
desk/doc.clue+10−1
@@ -2,7 +2,16 @@
22:: User docs
33::
44:~ [/urbit-id/udon 'What is an Urbit ID?']
5− :: [/bar/udon 'bar docs']
5+ [/galaxy/udon 'Galaxies']
6+ [/star/udon 'Stars']
7+ [/planet/udon 'Planets']
8+ [/moon/udon 'Moons']
9+ [/comet/udon 'Comets']
10+ [/patpee/udon 'What is a @p?']
11+ [/phonemes/udon 'Phonemes - Prefixes & Suffixes']
12+ [/azimuth/udon 'What is Azimuth?']
13+ [/l2/udon 'Layer 1 and Layer 2']
14+ [/keys/udon 'Networking Keys']
615 :: [/baz/udon 'baz docs']
716==
817:: Developer docs
desk/doc/usr/astrolabe.udonnew file+11
@@ -0,0 +1,11 @@
1+# Astrolabe
2+
3+## Feedback
4+
5+If you run into issues with the app, or want to voice comments or concerns,
6+please post in the group `~poster-hoster-midlev-mindyr/astrolabe`, send a DM to `~midlev-mindyr`,
7+or [create an Issue on GitHub](https://github.com/johnhyde/astrolabe/issues).
8+
9+If you see something you want to improve, please fork the [GitHub repository](https://github.com/johnhyde/astrolabe) and make a pull request.
10+
11+Thanks for using Astrolabe. I hope it serves you well.
desk/doc/usr/azimuth.udon+48−1
@@ -1,4 +1,51 @@
11;>
22# Azimuth
33
4−It's just NFTs!
4+_Adapted from [the Glossary](https://urbit.org/docs/glossary/azimuth)_
5+
6+Azimuth is Urbit's identity layer, built as a suite of smart contracts on
7+the Ethereum blockchain and several apps running locally on your
8+[ship](/~/scry/docs/usr/astrolabe/urbit-id.html).
9+It is Urbit's method of securing the digital identities that are required to use
10+the [Arvo](https://urbit.org/docs/glossary/arvo) peer-to-peer network,
11+without the need for a central authority.
12+Azimuth identities (also called points) exist as non-fungible tokens (NFTs),
13+which are owned by Ethereum addresses and can be transferred between such addresses.
14+Identities can use the [claims](https://urbit.org/docs/glossary/claims)
15+contract to make assertions – real-world or otherwise – about their owner.
16+
17+The primary way to interact with Azimuth and to manage your (also called points)
18+is through the [Bridge](https://bridge.urbit.org/) application.
19+Bridge is a front-end for [Ecliptic](https://urbit.org/docs/glossary/ecliptic),
20+the Azimuth contract that's used to perform actions on the blockchain.
21+
22+There are a limited number of Azimuth identities, which results in identities having value.
23+Users are therefore more careful to maintain a good reputation,
24+rather than using identities disposably.
25+Undesirable behavior—spamming, scamming, and malware-spreading—will generally result in
26+a [censure](https://urbit.org/docs/glossary/censure)
27+from [galaxies](/~/scry/docs/usr/astrolabe/galaxy.html)
28+and [stars](/~/scry/docs/usr/astrolabe/star.html), marking the bad actor.
29+
30+It should be noted that Azimuth isn't built just for Arvo.
31+It can be used as an identity system for other projects.
32+
33+## Layer 1 and Layer 2
34+
35+All Azimuth transactions that happen directly on Ethereum (the default) are considered to
36+be on "Layer 1", or L1 for short.
37+However, Ethereum gas prices can make simple L1 transactions like spawning a planet very
38+expensive.
39+In 2021, Tlon developed a "Layer 2" solution (a.k.a. L2) whereby many transactions can be
40+"rolled up" and posted to Ethereum at once, to be validated by each Urbit ship.
41+This dramatically reduces gas costs, and Tlon provides a roller which is free for public use.
42+
43+[Read More about L1 and L2](/~/scry/docs/usr/astrolabe/l2.html)
44+
45+## Further Reading
46+
47+- [The Azimuth concepts page](https://urbit.org/docs/azimuth/azimuth):
48+ A more in-depth explanation of Azimuth.
49+- [Install instructions](https://urbit.org/getting-started/):
50+ Guide to installing Urbit, which includes instructions on booting with your Urbit identity.
51+- [Understanding Urbit ID](https://urbit.org/understanding-urbit/urbit-id)
desk/doc/usr/comet.udonnew file+10
@@ -0,0 +1,10 @@
1+;>
2+[< What is an Urbit ID?](/~/scry/docs/usr/astrolabe/urbit-id.html)
3+
4+# Comets
5+
6+Comets are essentially unlimited, and can be created for free by anyone.
7+They're good for new people exploring the network, operating somewhat anonymously,
8+and testing things out. However, the keys for a comet can't be changed, so it's not
9+not a viable long-term ID. Also, since anyone can boot a comet, comets might be viewed
10+with distrust in some contexts.
desk/doc/usr/galaxy.udon+33−2
@@ -1,4 +1,35 @@
11;>
2−# Galaxy
2+[< What is an Urbit ID?](/~/scry/docs/usr/astrolabe/urbit-id.html)
33
4−A galaxy is a big boi.
4+# Galaxies
5+
6+Galaxies are the rarest and highest ranking class of Urbit ID, as there are only 256 of them.
7+Together, they form the [Galactic Senate](https://urbit.org/docs/glossary/senate)
8+which has the power make changes to the Urbit ID system.
9+Galaxies help route communication on the network, and each one can spawn 255 [stars](/~/scry/docs/usr/astrolabe/star.html).
10+
11+## @p
12+
13+A galaxy `@p` is just one phoneme, 3 letters. E.g. `~zod`, `~bus`, and `~fes` are galaxies.
14+
15+## Spawning
16+
17+Each galaxy can spawn 255 stars.
18+These stars will have 2-phoneme `@p`s starting with a prefix, and ending with the galaxy's `@p`.
19+E.g. `~zod` spawned `~marzod`, `~binzod`, and `~wanzod`, among others.
20+
21+## Sponsoring
22+
23+A galaxy can sponsor stars and planets, although usually planets are sponsored by stars.
24+By default, a galaxy will sponsor all its children, although it can sponsor others as well.
25+
26+Galaxies perform peer discovery for their sponsees, meaning that they tell other Urbit IDs
27+where they can find their sponsees so that they can communicate directly withthem—similar to
28+asking a DNS server to tell you where to look for google.com.
29+Thus, it is crucially important that galaxies be online and reachable.
30+
31+## [The Galactic Senate](https://urbit.org/docs/glossary/senate)
32+
33+Galaxy owners can [vote](https://urbit.org/docs/glossary/voting) on proposals
34+to upgrade the logic of [Azimuth](/~/scry/docs/usr/astrolabe/azimuth.html)
35+or approve the content of a document.
desk/doc/usr/keys.udon+59−4
@@ -1,8 +1,63 @@
11;>
2−# Public and Private Keys
2+# Networking Keys
33
4−You can use these for _cryptography_
4+Each Urbit ship proves its identity on the network by signing its messages
5+with a pair of networking keys. By signing a message with a private key,
6+you prove that you are the owner of the associated public key.
57
6−# What is Breaching?
8+Since public keys are stored in [Azimuth](/~/scry/docs/usr/astrolabe/azimuth.html),
9+other ships can verify your identity by checking your signatures.
710
8−That's when you not only reset your keys, but also everything else.
11+## Keyfile
12+
13+A keyfile is just a file containing your networking keys. It is used when
14+booting Arvo (Urbit's OS) for the first time, and the information within
15+is baked into the resulting ship. After this, the keyfile should be deleted
16+to prevent accidentally double-booting in the future.
17+
18+## Changing Keys
19+
20+If your private key is compromised, you can change your keys in Bridge and
21+update your ship by running `|rekey 'new-private-key-goes-here'` in Dojo (the terminal).
22+This will increase your `life` number in Azimuth, which is just a record of how many
23+times your keys have been revised. This number will also be incremented if you
24+set new keys in the course of performing a factory reset.
25+
26+Since keys must be set before a ship can be booted,
27+all active Urbit IDs will have a `life` of at least 1.
28+
29+# Performing a Factory Reset (a.k.a. Breaching)
30+
31+When using the network, ships keep track of the order of all the messages they've sent
32+and received, and use this to ensure that they process messages properly.
33+This is called continuity.
34+
35+Performing a factory reset means breaking continuity—asking the rest of the network
36+to forget your past messages and treat you like a new ship. It also involves clearing
37+your own event log, and consequently all apps and data on the ship.
38+Sometimes this is done to resolve networking errors, like those caused by double-booting.
39+This is also appropriate when transferring an ID to someone else, to give them a fresh start.
40+
41+Because factory resets involve booting a fresh ship, you'll need to rejoin groups,
42+reinstall apps, and generally start from scratch. Trying to continue using your old pier
43+(the folder containing your data) will just cause more networking issues.
44+There are, however, a few unofficial tools with which you can restore some data from
45+a previous pier, and more will likely be built over time.
46+
47+If you want to avoid breaching, avoid double-booting and don't delete your pier.
48+If you want to move your pier (e.g. to host your ship on a remote server), it is
49+crucial that you shut down your ship before you start it somewhere else.
50+If you have two different instances of the same ship trying to run at the same time,
51+other ships will get confused and you will need to breach to communicate with them properly.
52+Deleting your pier, or using an outdated archive of your pier will have the same effect.
53+
54+Breaching, or performing a factory reset, will increment your `rift` number in Azimuth,
55+so this number is an indicator of how many times a ship has breached.
56+Ships which have never breached have a `rift` of 0.
57+
58+# Further Reading
59+
60+- [Setting initial networking keys](https://urbit.org/using/id/using-bridge#set-your-networking-keys)
61+- [Guide to Factory Resets](https://urbit.org/using/id/guide-to-resets)
62+- [Life and Rift](https://urbit.org/docs/azimuth/life-and-rift)
63+- [Glossary: Keyfile](https://urbit.org/docs/glossary/keyfile)
desk/doc/usr/l2.udon+58−2
@@ -1,4 +1,60 @@
11;>
2−# Layer 2
2+# What are Layer 1 and Layer 2?
33
4−It's magic!
4+## Layer 1 (L1) - Azimuth smart contracts
5+
6+All Azimuth transactions that happen directly on Ethereum (the default) are considered to
7+be on "Layer 1", or L1 for short. The effects of these transactions are calculated and
8+stored on the Ethereum blockchain, so a nontrivial amount of "gas" must be expended for
9+each L1 transaction.
10+
11+## The need for a workaround
12+
13+In 2021, the Ethereum blockchain saw a large increase in traffic which caused
14+gas prices to skyrocket. It became prohibitively expensive for many to spawn or set keys
15+for new IDs, so Tlon started developing a workaround.
16+
17+## Layer 2 (L2) - Naive Rollups
18+
19+Tlon developed a "Layer 2" solution (a.k.a. L2) whereby many transactions can be
20+"rolled up" and posted to Ethereum at once, to be validated by each Urbit ship.
21+
22+The technical term for this is "naive rollups" because transactions are combined and
23+posted to Ethereum without being validated.
24+Each Urbit ship validates the transactions locally to determine who actually owns what.
25+
26+Combining transactions and offloading computation
27+from Ethereum to Urbit dramatically reduces gas costs.
28+Using L2 is so cheap that Tlon provides a free "roller" which is used when performing
29+L2 actions through Bridge.
30+
31+The introduction of L2 also makes it possible for new users to receive and start using
32+Urbit IDs without ever interacting with the blockchain themselves, making Urbit generally
33+more accessible.
34+
35+### Moving to Layer 2
36+
37+Most L2 actions require the ship to first "move to L2", which can be done through Bridge.
38+Technically, this consists of transferring the ID to `0x1111111111111111111111111111111111111111`.
39+This tells the Layer 2 code that the ship is on L2.
40+After that, all Azimuth transactions will be done on L2. It is not possible to move
41+an L2 ship back to L1.
42+
43+For galaxies and stars that want to spawn new IDs on L2, they can move only their spawn proxy
44+to L2. They will remain on L1, but any new children will be on L2. This change is also irreversible.
45+
46+Galaxies cannot move fully to L2, but they can move their spawn proxy to L2. Note, however, that
47+any stars locked in the Linear Release Contract are technically already spawned on L1,
48+and would need to be transferred to L2 separately.
49+
50+### Sponsorship between L1 and L2
51+
52+A sponsor and its sponsee can live on separate layers, but unless they are both on L1,
53+most sponsorship actions will need to take place on L2. This is the situation where an L1 ID
54+can take actions on L2 without moving to L2.
55+
56+# Further Reading
57+
58+- [Technical Overview of L2](https://urbit.org/docs/azimuth/l2/layer2)
59+- [Blog on Naive Rollups](https://urbit.org/blog/rollups)
60+- [Technical Details about which ships can perform which L2 actions](https://urbit.org/docs/azimuth/l2/l2-actions)
desk/doc/usr/moon.udonnew file+8
@@ -0,0 +1,8 @@
1+;>
2+[< What is an Urbit ID?](/~/scry/docs/usr/astrolabe/urbit-id.html)
3+
4+# Moons
5+
6+Moons are created, owned, and controlled by a parent ID, either a galaxy, star, or planet.
7+Moons are free and easy to create, and each Azimuth point can create about 4 billion.
8+Moons can use the Urbit network just like any other ID, but they are inextricably linked to their parents.
desk/doc/usr/patpee.udon+102−2
@@ -1,4 +1,104 @@
11;>
2−# What is a `@p`?
2+# What is a @p?
33
4−It's just a number written as some syllables!
4+First of all, it's pronounced "pat-pee", and we'll see why later.
5+
6+## It's a name
7+
8+Your `@p` is your name on Urbit, and it's designed to be pronounceable.
9+A `@p` starts with a tilde (`~`), and is made up of 3-letter phonemes/syllables, a combination of prefixes and suffixes.
10+There are 256 prefixes, and 256 suffixes.
11+`~zod` and `~bus` are galaxies, so their whole `@p`s are just one suffix.
12+
13+Most `@p`s are made up of 6-letter "words" ( a prefix + a suffix), joined by hyphens.
14+E.g. `~midlev-mindyr` has the prefixes `mid` and `min` and the suffixes `lev` and `dyr`.
15+You can see a list of prefixes and suffixes [here](/~/scry/docs/usr/astrolabe/phonemes.html).
16+
17+## It's a number
18+
19+A `@p` is actually just a way to write a non-negative integer with phonemes.
20+That means every `@p` can be written as a number, and any non-negative integer can be written as a `@p`.
21+- `~zod` is 0 (the first galaxy)
22+- `~marzod` is 256 (the first star)
23+- `~dapnep-ronmyl` is 65536 (256², the first planet)
24+- `~sampel-palnet` is 1624961343.
25+- `~doznec-dozzod-dozzod` is 4294967296 (256⁴, the first moon, moon of `~zod`)
26+
27+For [Azimuth points](/~/scry/docs/usr/astrolabe/azimuth.html), this number is also
28+called the Azimuth number, and it's stored on the blockchain instead of a `@p`.
29+The highest Azimuth number is 256⁴ - 1 (4294967295).
30+Everything above that is a moon, a comet, or not a valid ID number.
31+
32+## It's a username / email address / phone number
33+
34+A `@p` is the unique identifier for a ship, and it's used all throughout Urbit, in the code and in user-facing apps.
35+A `@p` can't be changed.
36+It will always refer to the same Urbit ID, and that Urbit ID will always have the same `@p`.
37+A given ID may change owners, however, and you can always buy a new ID with a new `@p`.
38+
39+## How to tell a ship's class
40+
41+It's easy to tell the class of a ship by looking at its `@p`.
42+- If it's just 1 phoneme, a suffix, like `~zod` or `~bus`, it's a [galaxy](/~/scry/docs/usr/astrolabe/galaxy.html).
43+
44+- If it has 2 phonemes, a prefix and a suffix, like `~marzod` or `~batbus`, it's a [star](/~/scry/docs/usr/astrolabe/star.html).
45+
46+ The suffix of a star `@p` is its parent galaxy, so the parent of `~marzod` is `~zod`, and the parent of `~batbus` is `~bus`.
47+
48+- If it has 4 phonemes separated by a hyphen, like `~sampel-palnet`, it's a [planet](/~/scry/docs/usr/astrolabe/planet.html).
49+
50+ Unlike stars, planet `@p`s don't contain the `@p` of their parent—the names are scrambled
51+ to give each star a good variety of planet `@p`s to spawn.
52+
53+- If it has 8 phonemes, like `~poster-hoster-midlev-mindyr`, it's a [moon](/~/scry/docs/usr/astrolabe/moon.html).
54+
55+ If it has 4 phonemes separated by a caret, like `~midlev^mindyr`, that's an abbreviated moon `@p`.
56+ The last 4 phonemes of a moon `@p` give its parent, and are used in the abbreviation.
57+
58+- If it has 16 phonemes, like `~dirbec-morfeb-ritlys-timsef--padnum-mapnep-nolfel-binzod`,
59+ or more likely 4 phonemes separated by an underscore, like `~dirbec_binzod`,
60+ it's a [comet](/~/scry/docs/usr/astrolabe/comet.html).
61+
62+ You may notice a double hyphen in the center of the full comet `@p`.
63+ This is part of the required syntax of a `@p`, and makes it easier to read.
64+ The abbreviation combines the first and last "words" of the `@p` with an underscore.
65+
66+
67+## The thing about `doz` and `zod`
68+
69+Remember that a `@p` is actually just a way of writing a number.
70+Technically, a `@p` is a base-256 number, as it's composed of prefixes and suffixes,
71+and there are 256 of each. Sure, you could write a number with just prefixes, or just suffixes,
72+but it wouldn't be as interesting to read, and it wouldn't be a valid `@p`.
73+
74+So each phoneme is equivalent to a number, 0-255.
75+`doz` is the prefix version of 0, and `zod` is the suffix version of 0.
76+Just as we usually don't write leading zeroes in our numbers, we omit the equivalent
77+of leading zeroes in `@p`s.
78+This is why you will never see `~dozler`, or `~dozzod-palnet`. It would be sort of like writing `000218` or `0000032591`. It's just `~ler` and `~palnet`. You might, however, run into `~dozler-palnet`, as planet `@p`s are never shortened to 3 phonemes.
79+
80+One place you're likely to see these show up is in moon `@p`s.
81+A moon `@p` is one or two "words" of the parent's choosing, plus the parent's `@p`.
82+E.g. `~sampel-palnet` could create `~dister-sampel-palnet` or `~mister-master-sampel-palnet`,
83+among others.
84+
85+If a galaxy or a star creates a moon,
86+its `@p` must be "padded out" to make up the last 4 phonemes of the moon `@p`.
87+`~ler` could thus create `~faster-dozzod-dozler` or `~poster-hoster-dozzod-dozler`.
88+See how `doz` and `zod` were used to pad out `ler` to 4 phonemes?
89+Similarly, `~palnet` could create `~walrus-dozzod-palnet` or `~doznec-tortul-dozzod-palnet`.
90+
91+## Why is it called a "patpee"?
92+
93+In Hoon, Urbit's typed programming language, numbers can have different "auras",
94+depending on what they represent. Some auras include `@u` for an unsigned integer,
95+`@t` for arbitrary text stored as a number, `@if` for an IPv4 address, and of course
96+`@p` for writing a number in phonemes.
97+
98+So why the "pat"?
99+Hoon involves a lot more symbols than most programming languages (e.g. `.!=?|+:%^$;~-` and so on).
100+To help programmers talk out loud about Hoon, each symbol is associated with a 3-letter phoneme.
101+In this system, `=/` is pronounced "tisfas", `%-` is "cenhep", and, you guessed it, `@` is "pat".
102+
103+In short, `@p` is originally a programming term, the programmers pronounce it "pat-pee",
104+so that's how it's pronounced.
desk/doc/usr/phonemes.udonnew file+45
@@ -0,0 +1,45 @@
1+;>
2+# Phonemes - Prefixes & Suffixes
3+
4+[< What is a @p?](/~/scry/docs/usr/astrolabe/patpee.html)
5+
6+`@p`s are made up of 3-letter phonemes, a mixture of prefixes and suffixes.
7+Here's an exhaustive list of each:
8+
9+## Prefixes
10+
11+`doz` `mar` `bin` `wan` `sam` `lit` `sig` `hid` `fid` `lis` `sog` `dir` `wac` `sab` `wis` `sib`
12+`rig` `sol` `dop` `mod` `fog` `lid` `hop` `dar` `dor` `lor` `hod` `fol` `rin` `tog` `sil` `mir`
13+`hol` `pas` `lac` `rov` `liv` `dal` `sat` `lib` `tab` `han` `tic` `pid` `tor` `bol` `fos` `dot`
14+`los` `dil` `for` `pil` `ram` `tir` `win` `tad` `bic` `dif` `roc` `wid` `bis` `das` `mid` `lop`
15+`ril` `nar` `dap` `mol` `san` `loc` `nov` `sit` `nid` `tip` `sic` `rop` `wit` `nat` `pan` `min`
16+`rit` `pod` `mot` `tam` `tol` `sav` `pos` `nap` `nop` `som` `fin` `fon` `ban` `mor` `wor` `sip`
17+`ron` `nor` `bot` `wic` `soc` `wat` `dol` `mag` `pic` `dav` `bid` `bal` `tim` `tas` `mal` `lig`
18+`siv` `tag` `pad` `sal` `div` `dac` `tan` `sid` `fab` `tar` `mon` `ran` `nis` `wol` `mis` `pal`
19+`las` `dis` `map` `rab` `tob` `rol` `lat` `lon` `nod` `nav` `fig` `nom` `nib` `pag` `sop` `ral`
20+`bil` `had` `doc` `rid` `moc` `pac` `rav` `rip` `fal` `tod` `til` `tin` `hap` `mic` `fan` `pat`
21+`tac` `lab` `mog` `sim` `son` `pin` `lom` `ric` `tap` `fir` `has` `bos` `bat` `poc` `hac` `tid`
22+`hav` `sap` `lin` `dib` `hos` `dab` `bit` `bar` `rac` `par` `lod` `dos` `bor` `toc` `hil` `mac`
23+`tom` `dig` `fil` `fas` `mit` `hob` `har` `mig` `hin` `rad` `mas` `hal` `rag` `lag` `fad` `top`
24+`mop` `hab` `nil` `nos` `mil` `fop` `fam` `dat` `nol` `din` `hat` `nac` `ris` `fot` `rib` `hoc`
25+`nim` `lar` `fit` `wal` `rap` `sar` `nal` `mos` `lan` `don` `dan` `lad` `dov` `riv` `bac` `pol`
26+`lap` `tal` `pit` `nam` `bon` `ros` `ton` `fod` `pon` `sov` `noc` `sor` `lav` `mat` `mip` `fip`
27+
28+## Suffixes
29+
30+`zod` `nec` `bud` `wes` `sev` `per` `sut` `let` `ful` `pen` `syt` `dur` `wep` `ser` `wyl` `sun`
31+`ryp` `syx` `dyr` `nup` `heb` `peg` `lup` `dep` `dys` `put` `lug` `hec` `ryt` `tyv` `syd` `nex`
32+`lun` `mep` `lut` `sep` `pes` `del` `sul` `ped` `tem` `led` `tul` `met` `wen` `byn` `hex` `feb`
33+`pyl` `dul` `het` `mev` `rut` `tyl` `wyd` `tep` `bes` `dex` `sef` `wyc` `bur` `der` `nep` `pur`
34+`rys` `reb` `den` `nut` `sub` `pet` `rul` `syn` `reg` `tyd` `sup` `sem` `wyn` `rec` `meg` `net`
35+`sec` `mul` `nym` `tev` `web` `sum` `mut` `nyx` `rex` `teb` `fus` `hep` `ben` `mus` `wyx` `sym`
36+`sel` `ruc` `dec` `wex` `syr` `wet` `dyl` `myn` `mes` `det` `bet` `bel` `tux` `tug` `myr` `pel`
37+`syp` `ter` `meb` `set` `dut` `deg` `tex` `sur` `fel` `tud` `nux` `rux` `ren` `wyt` `nub` `med`
38+`lyt` `dus` `neb` `rum` `tyn` `seg` `lyx` `pun` `res` `red` `fun` `rev` `ref` `mec` `ted` `rus`
39+`bex` `leb` `dux` `ryn` `num` `pyx` `ryg` `ryx` `fep` `tyr` `tus` `tyc` `leg` `nem` `fer` `mer`
40+`ten` `lus` `nus` `syl` `tec` `mex` `pub` `rym` `tuc` `fyl` `lep` `deb` `ber` `mug` `hut` `tun`
41+`byl` `sud` `pem` `dev` `lur` `def` `bus` `bep` `run` `mel` `pex` `dyt` `byt` `typ` `lev` `myl`
42+`wed` `duc` `fur` `fex` `nul` `luc` `len` `ner` `lex` `rup` `ned` `lec` `ryd` `lyd` `fen` `wel`
43+`nyd` `hus` `rel` `rud` `nes` `hes` `fet` `des` `ret` `dun` `ler` `nyr` `seb` `hul` `ryl` `lud`
44+`rem` `lys` `fyn` `wer` `ryc` `sug` `nys` `nyl` `lyn` `dyn` `dem` `lux` `fed` `sed` `bec` `mun`
45+`lyr` `tes` `mud` `nyt` `byr` `sen` `weg` `fyr` `mur` `tel` `rep` `teg` `pec` `nel` `nev` `fes`
desk/doc/usr/planet.udonnew file+9
@@ -0,0 +1,9 @@
1+;>
2+[< What is an Urbit ID?](/~/scry/docs/usr/astrolabe/urbit-id.html)
3+
4+# Planets
5+
6+There are about 4.3 billion potential planets, so while they are not unlimited, they are
7+widely accessible for the average user. Most people pilot a planet or a moon when using Urbit.
8+As planets are the lowest rank of Azimuth point, they cannot spawn other points. Like galaxies
9+and stars, however, they can create [moons](/~/scry/docs/usr/astrolabe/moon.html).
desk/doc/usr/star.udonnew file+14
@@ -0,0 +1,14 @@
1+;>
2+[< What is an Urbit ID?](/~/scry/docs/usr/astrolabe/urbit-id.html)
3+
4+# Stars
5+
6+Stars are scarce and valuable—a natural fit for businesses, communities, or other organizations.
7+The maximum supply of stars is 65,280.
8+
9+Each star can spawn 65,535 [planets](/~/scry/docs/usr/astrolabe/planet.html), and provides network routing, software updates,
10+and other services for the planets it sponsors.
11+Stars can also choose to de-sponsor planets which abuse the network.
12+
13+Stars are NFTs, but they can be exchanged 1:1 for WSTR at [star.market](https://star.market/),
14+and you can trade fractional amounts of WSTR for ETH [on Uniswap V3](https://info.uniswap.org/#/pools/0x7f4a0822a6e3c085df795a8d78acbcd36f210ebf).
desk/doc/usr/urbit-id.udon+64−17
@@ -1,4 +1,3 @@
1−:- ~[comments+&]
21;>
32# What is an Urbit ID?
43
@@ -6,7 +5,7 @@ An Urbit ID is like an account on the Urbit network. You can’t use Urbit witho
65
76Every active Urbit ID has a number of properties:
87
9−- `@p` (pronounced pat-pee) - A permanent, unique identifier, e.g. ~zod or ~midlev-mindyr.
8+- `@p` (pronounced pat-pee) - A permanent, unique identifier, e.g. `~zod` or `~midlev-mindyr`.
109 This often functions like a username or email address.
1110 Every `@p` is equivalent to a number ≥ 0 and > 256¹⁶, with longer `@p`s giving larger numbers.
1211 The length of a `@p` indicates what class of ID it is.
@@ -15,13 +14,42 @@ Every active Urbit ID has a number of properties:
1514- Public and Private Keys - These allow you to cryptographically prove your ownership of an ID.
1615 This is a bit like having a password for an account, or signing a document.
1716 All messages on Urbit are automatically signed and verified, so you know they’re authentic.
18− [Read More](/~/scry/docs/usr/astrolabe/keys.html)
1917
2018- Ship - A ship is an Urbit computer, which is always tied to the Urbit ID it was booted with.
2119 When you boot Urbit for the first time, you provide your keys and we call this booting a “ship”.
2220 When you use this computer on the network, you are “piloting” your “ship”.
2321 Your ship stores all your data and apps.
2422
23+## Azimuth Points
24+
25+An [Azimuth point](/~/scry/docs/usr/astrolabe/azimuth.html) is an Urbit ID which is secured on the Ethereum blockchain.
26+Azimuth points are NFTs, governed by the Azimuth smart contracts.
27+Owning an Azimuth point lets you reset your [keys](/~/scry/docs/usr/astrolabe/keys.html),
28+spawn new IDs, and transfer ownership to someone else, among other things.
29+
30+When Ethereum got popular and transactions became very expensive a
31+[Layer 2 solution](/~/scry/docs/usr/astrolabe/l2.html)
32+was developed (commonly called "L2"), which allows Azimuth points to be spawned, transferred,
33+etc. basically for free.
34+
35+### Spawning and Sponsoring
36+
37+By thinking about possible combinations of syllables, we can predict every Urbit ID that might exist.
38+But galaxies, stars, and planets, being Azimuth points, don't come into existence until
39+a transaction is posted to Azimuth which explicitly "spawns" that point.
40+
41+All 256 galaxies have already been spawned. Those galaxies can spawn stars.
42+Those stars can spawn planets. Planets can't spawn anything, but all Azimuth points can
43+create moons, which is sometimes called "spawning" even though it's not done through Azimuth.
44+
45+By default, a galaxy will sponsor any stars it spawns, and a star will sponsor any planets it spawns.
46+This means helping route network traffic between the sponsee and other ships, providing OTA (over the air)
47+software updates, and potentially providing other services.
48+
49+A sponsee (star or planet) may choose to leave their sponsor and find another one. Conversely,
50+a sponsor (galaxy or star) may choose to de-sponsor their sponsee or sponsor additional points
51+which they didn't spawn. This lets the network hierarchy adjust itself in case someone misbehaves.
52+
2553## Classes of Urbit ID
2654
2755There are 5 classes of Urbit ID:
@@ -32,40 +60,59 @@ There are 5 classes of Urbit ID:
3260[Comet](/~/scry/docs/usr/astrolabe/comet.html).
3361
3462Galaxies, stars, and planets are [Azimuth points](/~/scry/docs/usr/astrolabe/azimuth.html),
35−and work very similarly.
63+and are therefore very similar anatomically, although they have different roles.
3664Moons and comets are a bit different.
3765
66+### Galaxies (e.g. `~bus`)
3867
39−### Azimuth Points
68+Galaxies are the rarest and highest ranking class of ID, as there are only 256 of them.
69+Together, they form the Galactic Senate.
70+Galaxies help route communication on the network, and each one can spawn 255 stars.
4071
41−An [Azimuth point](/~/scry/docs/usr/astrolabe/azimuth.html) is just an Urbit ID which is secured on the Ethereum blockchain.
42−Galaxies, stars, and planets are NFTs, governed by the Azimuth smart contract.
43−Owning an Azimuth point lets you reset your keys, spawn new IDs, and transfer ownership
44−to someone else, among other things.
72+[Read More](/~/scry/docs/usr/astrolabe/galaxy.html)
4573
46−When Ethereum got popular and transactions became very expensive, a
47−[Layer 2 solution]((/~/scry/docs/usr/astrolabe/l2.html))
48−was developed (commonly called "L2"), which allows Azimuth points to be spawned, transferred,
49−etc. basically for free.
74+### Stars (e.g. `~batbus`)
75+
76+Stars are fairly scarce and valuable—a natural fit for businesses, communities, or other organizations.
77+Each star can spawn 65,535 planets, and provides network routing, software updates,
78+and other services for the planets it sponsors.
79+Stars can also choose to de-sponsor planets which abuse the network.
80+Stars are NFTs, but they can be exchanged 1:1 for WSTR at [star.market](https://star.market/),
81+and you can trade fractional amounts of WSTR for ETH [on Uniswap V3](https://info.uniswap.org/#/pools/0x7f4a0822a6e3c085df795a8d78acbcd36f210ebf).
82+
83+[Read More](/~/scry/docs/usr/astrolabe/star.html)
84+
85+### Planets (e.g. `~midlev-mindyr`)
5086
51−### Moons
87+There are about 4.3 billion potential planets, so while they are not unlimited, they are
88+widely accessible for the average user. Most people pilot a planet or a moon when using Urbit.
89+As planets are the lowest rank of Azimuth point, they cannot spawn other points. Like galaxies
90+and stars, however, they can create moons.
91+
92+[Read More](/~/scry/docs/usr/astrolabe/planet.html)
93+
94+### Moons (e.g. `~poster-hoster-midlev-mindyr` (`~midlev^mindyr` for short))
5295
5396Moons are created, owned, and controlled by a parent ID, either a galaxy, star, or planet.
5497Moons are free and easy to create, and each Azimuth point can create about 4 billion.
5598Moons can use the Urbit network just like any other ID, but they are inextricably linked to their parents.
99+
56100[Read More](/~/scry/docs/usr/astrolabe/moon.html)
57101
58−### Comets
102+### Comets (e.g. `~dirbec-morfeb-ritlys-timsef--padnum-mapnep-nolfel-binzod` (`~dirbec_binzod` for short))
59103
60104Comets are essentially unlimited, and can be created for free by anyone.
61105They're good for new people exploring the network, operating somewhat anonymously,
62−and testing things out. However, the keys for a comet can't be changed, so they are
106+and testing things out. However, the keys for a comet can't be changed, so it's not
63107not a viable long-term ID. Also, since anyone can boot a comet, comets might be viewed
64108with distrust in some contexts.
65109
66−# Further Reading:
110+[Read More](/~/scry/docs/usr/astrolabe/comet.html)
111+
112+# Further Reading
67113
68114- [A more technical overview](https://urbit.org/using/id/overview)
69115- From the Operator’s Guide:
70116 [Which ID should I buy?](https://operators.urbit.org/guides/which-id-should-i-buy)
71117- [Azimuth FAQ](https://azimuth.network/#faq)
118+- [Understanding Urbit ID](https://urbit.org/understanding-urbit/urbit-id)
ui/package.json+1−1
@@ -3,7 +3,7 @@
33 "version": "0.0.0",
44 "type": "module",
55 "scripts": {
6− "dev:only": "vite --port 4000",
6+ "dev:only": "vite --port 4000 --host",
77 "build:only": "vite build",
88 "tailwind:watch": "cross-env TAILWIND_MODE=watch cross-env NODE_ENV=development postcss src/styles/tailwind.css -o src/styles/tailwind-output.css -w",
99 "tailwind:build": "cross-env TAILWIND_MODE=build cross-env NODE_ENV=production postcss src/styles/tailwind.css -o src/styles/tailwind-output.css",
ui/src/actions/docLinks.ts−1
@@ -1,7 +1,6 @@
11const docLinkRegex = /\/~\/scry\/docs\/usr\/astrolabe\/([-~._\w\d]+).html/;
22
33function convertDocLinks(node, onPathChange) {
4− console.log(node);
54 const links = node.querySelectorAll('a');
65 for (let link of links) {
76 let match = link.href.match(docLinkRegex);
ui/src/actions/tooltip.ts+40−8
@@ -1,24 +1,45 @@
11import tippy from 'tippy.js';
2+// import DocLink from '../components/docs/DocLink.svelte'; // TODO try to add a link in the tooltip somehow or something, like:
3+// const app = new DocLink({
4+// target: document.getElementBySelector('.tippy')
5+// })
26
37const defaultParams = {
48 theme: 'astrolabe',
9+ delay: [500, 0],
510};
611
7−function getParams(paramsOrContent:any = {}) {
12+function getParams(paramsOrContent:any = {}, overrides = {}) {
13+ let params = paramsOrContent;
814 if (typeof paramsOrContent === 'string') {
9− return {
10− ...defaultParams,
11− content: paramsOrContent,
12− }
15+ params = { content: paramsOrContent };
1316 }
1417 return {
1518 ...defaultParams,
16− ...paramsOrContent,
19+ ...params,
20+ ...overrides,
1721 };
1822}
1923
2024export default function tooltip(node, paramsOrContent: any = {}) {
21− const params = getParams(paramsOrContent);
25+ const onTrigger = () => {
26+ console.log('triggered');
27+ node.dispatchEvent(new CustomEvent("tooltipTriggered"));
28+ };
29+ const onUntrigger = () => {
30+ console.log('untriggered');
31+ node.dispatchEvent(new CustomEvent("tooltipUntriggered"));
32+ };
33+ const onClickOutside = (_, e) => {
34+ e.stopPropagation();
35+ };
36+ const listeners = {
37+ onTrigger,
38+ onUntrigger,
39+ onClickOutside,
40+ }
41+
42+ const params = getParams(paramsOrContent, listeners);
2243 const { content } = params;
2344
2445 // Let's make sure the "aria-label" attribute
@@ -30,12 +51,23 @@ export default function tooltip(node, paramsOrContent: any = {}) {
3051 // Support any of the Tippy props by forwarding all "params":
3152 // https://atomiks.github.io/tippyjs/v6/all-props/
3253 const tip: any = tippy(node, params);
54+ const hideTip = (e) => {
55+ if (tip.state.isShown) {
56+ tip.hide();
57+ // e.stopPropagation();
58+ }
59+ }
60+ node.addEventListener('click', hideTip);
61+
3362
3463 return {
3564 // If the props change, let's update the Tippy instance:
3665 update: (newParams) => tip.setProps(getParams(newParams)),
3766
3867 // Clean up the Tippy instance on unmount:
39− destroy: () => tip.destroy(),
68+ destroy: () => {
69+ node.removeEventListener('click', hideTip);
70+ tip.destroy();
71+ }
4072 };
4173};
ui/src/assets/astrolabe.svg+8−8
@@ -28,8 +28,8 @@
2828 inkscape:document-units="mm"
2929 showgrid="false"
3030 inkscape:zoom="0.4798268"
31− inkscape:cx="377.21945"
32− inkscape:cy="262.59475"
31+ inkscape:cx="452.24652"
32+ inkscape:cy="416.81707"
3333 inkscape:window-width="1549"
3434 inkscape:window-height="1080"
3535 inkscape:window-x="490"
@@ -153,19 +153,19 @@
153153 x2="240"
154154 y2="120"
155155 gradientUnits="userSpaceOnUse"
156− gradientTransform="matrix(1.5,0,0,1.5,-59.999998,-59.999998)" />
156+ gradientTransform="matrix(1.8333333,0,0,1.8333333,-99.999996,-99.999996)" />
157157 </defs>
158158 <g
159159 inkscape:label="Layer 1"
160160 inkscape:groupmode="layer"
161161 id="layer1">
162162 <rect
163− style="display:inline;fill:url(#linearGradient4362);fill-opacity:1;stroke:none;stroke-width:10;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
163+ style="display:none;fill:url(#linearGradient4362);fill-opacity:1;stroke:none;stroke-width:10;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
164164 id="rect4185"
165− width="360"
166− height="360"
167− x="-60"
168− y="-60"
165+ width="440"
166+ height="440"
167+ x="-100"
168+ y="-100"
169169 inkscape:label="bg" />
170170 <circle
171171 style="display:inline;fill:none;fill-rule:evenodd;stroke:url(#linearGradient3030);stroke-width:10;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
ui/src/components/GoldBadge.svelte+4−15
@@ -1,21 +1,10 @@
11<script lang="ts">
2− import tooltip from "../actions/tooltip";
2+ import TooltipAndDocLink from "./TooltipAndDocLink.svelte";
33 export let title: string = '';
44 export let doc: string = '';
55
66</script>
7−{#if title}
8− <span
9− class="inline-block py-0.5 px-2 rounded-md bg-gold"
10− use:tooltip={title}
11− >
12− <slot></slot>
13− </span>
14−{:else}
15− <span
16− class="inline-block py-0.5 px-2 rounded-md bg-gold"
17− >
18− <slot></slot>
19− </span>
20−{/if}
217
8+<TooltipAndDocLink text={title} {doc} class="inline-block py-0.5 px-2 rounded-md bg-gold">
9+ <slot></slot>
10+</TooltipAndDocLink>
ui/src/components/ShipView.svelte+45−19
@@ -1,14 +1,13 @@
11<script lang="ts">
22
3− import type { Scry } from '@urbit/http-api';
43 import UrbitApi from '@urbit/http-api';
5− import { settings } from '@urbit/api';
64 import { clan, sein, patp2dec } from 'urbit-ob';
75
86 import { cite, normalizeId } from '../lib/id';
97 import tooltip from "../actions/tooltip";
108 import Sigil from "./Sigil.svelte";
119 import GoldBadge from './GoldBadge.svelte';
10+ import TooltipAndDocLink from "./TooltipAndDocLink.svelte";
1211 import ShipLink from './ShipLink.svelte';
1312 import EthAddressLink from './EthAddressLink.svelte';
1413 import CollapsibleContent from './CollapsibleContent.svelte';
@@ -81,6 +80,8 @@
8180 rawPointInfoPromise = api.scry<any>({ app: 'astrolabe', path: `/point/${patp}` });
8281 rawPointInfoPromise.then((info) => {
8382 rawPointInfo = info;
83+ }).catch((error) => {
84+ rawPointInfo.error = error;
8485 });
8586 }
8687 }
@@ -113,11 +114,13 @@
113114 if (sponsor.has) {
114115 pointInfo.sponsor = normalizeId(sponsor.who);
115116 }
116− } else {
117− layer = undefined;
117+ } else if (rawPointInfo.error) {
118+ // no info found
118119 spawnStatus = spawnStatusOptions.unspawned;
119120 life = 0;
120121 rift = 0;
122+ } else {
123+ // request pending
121124 }
122125 pointInfo = {
123126 ...pointInfo,
@@ -136,25 +139,40 @@
136139 <Sigil patp={patp} size={256} />
137140 </div>
138141 <div class="grow w-full min-w-0">
139− <h2 class="text-2xl text-center">{cite(patp)}</h2>
142+ <h2 class="text-2xl text-center">
143+ <TooltipAndDocLink
144+ text="The ship's @p (click to learn more)"
145+ doc="patpee" class="inline"
146+ >
147+ {cite(patp)}
148+ </TooltipAndDocLink>
149+ </h2>
140150 {#if (!azPoint)}
141151 <h3 class="text-lg text-center text-gray-700">{patp}</h3>
142152 {/if}
143− <h4 class="text-center text-gray-700 break-words" use:tooltip={"The integer representation of this ID"}>
144− {patp2dec(patp)}
153+ <h4 class="text-center text-gray-700 break-words">
154+ <!-- <TooltipAndDocLink
155+ text="The integer representation of this ID"
156+ doc="patpee" class="inline"
157+ > -->
158+ {patp2dec(patp)}
159+ <!-- </TooltipAndDocLink> -->
145160 </h4>
146− <div class="w-full text-center space-y-1.5 -mt-1.5">
147− <span></span>
148− <GoldBadge title={"it's a " + shipClass}>{shipClass}</GoldBadge>
161+ <div class="flex flex-wrap justify-center gap-1.5 my-1.5">
162+ <GoldBadge title={"it's a " + shipClass} doc={shipClass}>{shipClass}</GoldBadge>
149163 {#if azPoint}
150− <GoldBadge title={pointInfo.spawnStatus.tooltip}>{pointInfo.spawnStatus.text}</GoldBadge>
164+ {#if pointInfo.spawnStatus}
165+ <GoldBadge title={pointInfo.spawnStatus.tooltip}>
166+ {pointInfo.spawnStatus.text}
167+ </GoldBadge>
168+ {/if}
151169 {#if pointInfo.layer}
152− <GoldBadge title={pointInfo.layer.tooltip}>{pointInfo.layer.text}</GoldBadge>
170+ <GoldBadge title={pointInfo.layer.tooltip} doc="l2">{pointInfo.layer.text}</GoldBadge>
153171 {/if}
154172 {:else if (shipClass === 'moon')}
155173 <span>of</span>
156174 <ShipLink patp={parentChain.at(-1)}></ShipLink>
157− {:else if (shipClass === 'comet')}
175+ {:else if (shipClass === 'comet')}
158176 <span>under</span>
159177 <ShipLink patp={parentChain.at(-1)}></ShipLink>
160178 {/if}
@@ -175,7 +193,7 @@
175193 <div slot="content">
176194 {#await rawPointInfoPromise}
177195 Loading Azimuth info...
178− {:then value}
196+ {:then}
179197 {#if shipClass !== 'galaxy'}
180198 <p>
181199 {#if pointInfo.sponsor && shipClass !== 'galaxy'}
@@ -187,16 +205,24 @@
187205 </p>
188206 {/if}
189207 <p>
190− <span use:tooltip={"Number of times this ship's keys have been set. Must be at least 1 to use the network."}>
208+ <TooltipAndDocLink
209+ text="Number of times this ship's keys have been set. Must be at least 1 to use the network."
210+ doc="keys"
211+ class="inline"
212+ >
191213 Key Revision:
192214 {pointInfo.life}
193− </span>
215+ </TooltipAndDocLink>
194216 </p>
195217 <p>
196− <span use:tooltip={"Number of times this ship has breached."}>
197− Continuity:
218+ <TooltipAndDocLink
219+ text="Number of times this ship has breached."
220+ doc="keys"
221+ class="inline"
222+ >
223+ Factory Resets:
198224 {pointInfo.rift}
199− </span>
225+ </TooltipAndDocLink>
200226 </p>
201227 {#if pointInfo.proxies}
202228 <p>
ui/src/components/Sigil.svelte−1
@@ -28,7 +28,6 @@
2828 }
2929</script>
3030
31−<!-- <div style="height: {size}px; width: {size}px;" > -->
3231<div>
3332 {#if displaySigil}
3433 {@html svgString}
ui/src/components/Tooltip.sveltenew file+38
@@ -0,0 +1,38 @@
1+<script lang="ts">
2+ import { tick } from "svelte";
3+ import tooltip from "../actions/tooltip";
4+ export let text: string = '';
5+ let className: string = '';
6+ export { className as class };
7+ export let enabled: boolean = true;
8+ let tooltipActive: boolean = false;
9+
10+ let timer;
11+
12+ const debounce = v => {
13+ clearTimeout(timer);
14+ timer = setTimeout(() => {
15+ tooltipActive = v;
16+ }, 50);
17+ }
18+
19+ function onTrigger() {
20+ debounce(true);
21+ }
22+
23+ function onUntrigger() {
24+ debounce(false);
25+ }
26+
27+</script>
28+
29+{#if enabled}
30+ <div use:tooltip={text} on:tooltipTriggered={onTrigger} on:tooltipUntriggered={onUntrigger} class={className}>
31+ <slot {tooltipActive} />
32+ </div>
33+{:else}
34+ <div class={className}>
35+ <slot tooltipActive={false} />
36+ </div>
37+{/if}
38+
ui/src/components/TooltipAndDocLink.sveltenew file+14
@@ -0,0 +1,14 @@
1+<script lang="ts">
2+ import Tooltip from "./Tooltip.svelte";
3+ import DocLink from './docs/DocLink.svelte'; // TODO try to add a link in the tooltip somehow or something, like:
4+ export let text: string = '';
5+ export let doc: string = '';
6+ let className: string = '';
7+ export { className as class };
8+</script>
9+
10+<Tooltip text={text} enabled={text !== ''} let:tooltipActive={tooltipActive} class={className}>
11+ <DocLink modal path={doc} enabled={doc !== '' && tooltipActive}>
12+ <slot></slot>
13+ </DocLink>
14+</Tooltip>
ui/src/components/docs/DocHome.svelte+24−2
@@ -42,7 +42,29 @@
4242 </DocLink>
4343 </li>
4444 </ul>
45− <DocLink path="keys" on:navigate>
46− <h2>Keys</h2>
45+ <DocLink path="patpee" on:navigate>
46+ <h2>What is a @p?</h2>
4747 </DocLink>
48+ <ul>
49+ <li>
50+ <DocLink path="phonemes" on:navigate>
51+ <h3>Phonemes - Prefixes & Suffixes</h3>
52+ </DocLink>
53+ </li>
54+ </ul>
55+ <DocLink path="azimuth" on:navigate>
56+ <h2>What is Azimuth?</h2>
57+ </DocLink>
58+ <ul>
59+ <li>
60+ <DocLink path="l2" on:navigate>
61+ <h3>Layer 1 and Layer 2</h3>
62+ </DocLink>
63+ </li>
64+ <li>
65+ <DocLink path="keys" on:navigate>
66+ <h3>Networking Keys</h3>
67+ </DocLink>
68+ </li>
69+ </ul>
4870</div>
ui/src/components/docs/DocLink.svelte+16−4
@@ -1,14 +1,26 @@
11<script lang="ts">
2−
32 import { createEventDispatcher } from 'svelte';
3+ import docs from '../../stores/docs';
4+
45 export let path:string;
6+ export let modal:boolean = false;
7+ export let asLink:boolean = true;
8+ export let enabled:boolean = true;
59
610 const dispatch = createEventDispatcher();
711 function navigate() {
8− dispatch('navigate', path);
12+ if (modal) {
13+ docs.show(path);
14+ } else {
15+ dispatch('navigate', path);
16+ }
917 }
1018</script>
1119
12−<a href="javascript:void(0)" on:click={navigate}>
20+{#if enabled}
21+ <a class:no-underline={!asLink} href="javascript:void(0)" on:click={navigate}>
22+ <slot />
23+ </a>
24+{:else}
1325 <slot />
14−</a>
26+{/if}
ui/src/main.ts+2−2
@@ -1,7 +1,7 @@
11import App from './App.svelte'
22
33const app = new App({
4− target: document.getElementById('app')
4+ target: document.getElementById('app'),
55})
66
7−export default app
7+export default app;
ui/src/routes/ShipViewPage.svelte+3−11
@@ -1,12 +1,12 @@
11<script lang="ts">
2− import { link, replace } from 'svelte-spa-router'
2+ import { link, push } from 'svelte-spa-router'
33 import docs from '../stores/docs';
44 import { SearchAnalysis } from '../lib/id';
55 import { linkToShip } from '../lib/link';
66 import SearchBar from "../components/SearchBar.svelte";
77 import ShipView from '../components/ShipView.svelte';
88 import ValidationProblems from '../components/ValidationProblems.svelte';
9− import DocModal from '../components/docs/Doc.svelte';
9+ import DocLink from '../components/docs/DocLink.svelte';
1010 export let params: any = {};
1111 let patp: string;
1212 let analysis: SearchAnalysis = new SearchAnalysis();
@@ -24,7 +24,7 @@
2424 search = params.patp;
2525 } else {
2626 if (analysis.patpIsValid && analysis.search === search) {
27− replace(linkToShip(analysis.patp));
27+ push(linkToShip(analysis.patp));
2828 }
2929 }
3030 }
@@ -36,17 +36,9 @@
3636 <!-- <a use:link={"/"} class="p-4 bg-white rounded-lg text-center">Go Home</a> -->
3737 <!-- <SearchBar bind:searchText={search} bind:analysis /> -->
3838 <SearchBar bind:analysis bind:search />
39− <div class="flex">
40− <button class="bg-white" on:click={() => docs.show('urbit-id')}>urbit id</button>
41− <button class="bg-white" on:click={() => docs.show('keys')}>key</button>
42− </div>
4339 {#if analysis.patpIsValid}
4440 <ShipView patp={analysis.patp} />
4541 {:else if (search.length > 0)}
4642 <ValidationProblems problems={analysis.patpProblems} />
4743 {/if}
48− <div class="flex">
49− <button class="bg-white" on:click={() => docs.show('urbit-id')}>urbit id</button>
50− <button class="bg-white" on:click={() => docs.show('keys')}>key</button>
51− </div>
5244</div>
ui/src/styles/docs.scss+6−4
@@ -20,14 +20,14 @@
2020 }
2121
2222 ul, ol {
23− @apply list-inside;
23+ @apply pl-5;
2424
2525 li {
2626 @apply py-1;
2727
28− & * {
29− @apply inline;
30− }
28+ // & * {
29+ // @apply inline;
30+ // }
3131 }
3232 }
3333
@@ -41,5 +41,7 @@
4141
4242 code {
4343 @apply bg-orange-gold px-0.5 rounded;
44+ // @apply bg-gray-300 px-0.5 rounded;
45+ font-size: 0.9375em;
4446 }
4547}
ui/src/styles/styles.scss+3−1
@@ -7,5 +7,7 @@ body {
77}
88
99a {
10− @apply underline underline-offset-2;
10+ @apply underline underline-offset-2 decoration-gold-s2;
11+ // @apply underline underline-offset-2 decoration-gold;
12+ // @apply underline underline-offset-2 decoration-orange-gold;
1113}
ui/src/styles/tailwind-output.css+73−44
@@ -460,22 +460,34 @@ Ensure the default browser behavior of the `hidden` attribute.
460460.-m-2 {
461461 margin: -0.5rem;
462462}
463+.mx-4 {
464+ margin-left: 1rem;
465+ margin-right: 1rem;
466+}
463467.mx-8 {
464468 margin-left: 2rem;
465469 margin-right: 2rem;
466470}
471+.my-1\.5 {
472+ margin-top: 0.375rem;
473+ margin-bottom: 0.375rem;
474+}
475+.my-1 {
476+ margin-top: 0.25rem;
477+ margin-bottom: 0.25rem;
478+}
467479.mx-auto {
468480 margin-left: auto;
469481 margin-right: auto;
470482}
471−.mx-4 {
472− margin-left: 1rem;
473− margin-right: 1rem;
474−}
475483.my-4 {
476484 margin-top: 1rem;
477485 margin-bottom: 1rem;
478486}
487+.my-2 {
488+ margin-top: 0.5rem;
489+ margin-bottom: 0.5rem;
490+}
479491.mt-2 {
480492 margin-top: 0.5rem;
481493}
@@ -494,15 +506,12 @@ Ensure the default browser behavior of the `hidden` attribute.
494506.ml-4 {
495507 margin-left: 1rem;
496508}
497−.-mt-1\.5 {
498− margin-top: -0.375rem;
509+.mt-4 {
510+ margin-top: 1rem;
499511}
500512.-mt-1 {
501513 margin-top: -0.25rem;
502514}
503−.mt-4 {
504− margin-top: 1rem;
505−}
506515.ml-3 {
507516 margin-left: 0.75rem;
508517}
@@ -515,12 +524,12 @@ Ensure the default browser behavior of the `hidden` attribute.
515524.ml-2 {
516525 margin-left: 0.5rem;
517526}
518−.-mt-0\.5 {
519− margin-top: -0.125rem;
520−}
521527.-mt-0 {
522528 margin-top: -0px;
523529}
530+.-mt-0\.5 {
531+ margin-top: -0.125rem;
532+}
524533.block {
525534 display: block;
526535}
@@ -572,12 +581,12 @@ Ensure the default browser behavior of the `hidden` attribute.
572581.h-7 {
573582 height: 1.75rem;
574583}
575−.w-10 {
576− width: 2.5rem;
577−}
578584.w-full {
579585 width: 100%;
580586}
587+.w-10 {
588+ width: 2.5rem;
589+}
581590.w-12 {
582591 width: 3rem;
583592}
@@ -658,26 +667,27 @@ Ensure the default browser behavior of the `hidden` attribute.
658667.justify-center {
659668 justify-content: center;
660669}
670+.gap-1\.5 {
671+ gap: 0.375rem;
672+}
673+.gap-1 {
674+ gap: 0.25rem;
675+}
661676.space-y-4 > :not([hidden]) ~ :not([hidden]) {
662677 --tw-space-y-reverse: 0;
663678 margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
664679 margin-bottom: calc(1rem * var(--tw-space-y-reverse));
665680}
666−.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) {
681+.space-y-8 > :not([hidden]) ~ :not([hidden]) {
667682 --tw-space-y-reverse: 0;
668− margin-top: calc(0.375rem * calc(1 - var(--tw-space-y-reverse)));
669− margin-bottom: calc(0.375rem * var(--tw-space-y-reverse));
683+ margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));
684+ margin-bottom: calc(2rem * var(--tw-space-y-reverse));
670685}
671686.space-y-1 > :not([hidden]) ~ :not([hidden]) {
672687 --tw-space-y-reverse: 0;
673688 margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
674689 margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
675690}
676−.space-y-8 > :not([hidden]) ~ :not([hidden]) {
677− --tw-space-y-reverse: 0;
678− margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));
679− margin-bottom: calc(2rem * var(--tw-space-y-reverse));
680−}
681691.space-x-3 > :not([hidden]) ~ :not([hidden]) {
682692 --tw-space-x-reverse: 0;
683693 margin-right: calc(0.75rem * var(--tw-space-x-reverse));
@@ -709,21 +719,27 @@ Ensure the default browser behavior of the `hidden` attribute.
709719.break-all {
710720 word-break: break-all;
711721}
712−.rounded-lg {
713− border-radius: 0.5rem;
714−}
715722.rounded-md {
716723 border-radius: 0.375rem;
717724}
718725.rounded-full {
719726 border-radius: 9999px;
720727}
728+.rounded-lg {
729+ border-radius: 0.5rem;
730+}
721731.rounded {
722732 border-radius: 0.25rem;
723733}
734+.rounded-xl {
735+ border-radius: 0.75rem;
736+}
724737.border {
725738 border-width: 1px;
726739}
740+.border-4 {
741+ border-width: 4px;
742+}
727743.border-b {
728744 border-bottom-width: 1px;
729745}
@@ -739,9 +755,9 @@ Ensure the default browser behavior of the `hidden` attribute.
739755 --tw-border-opacity: 1;
740756 border-color: rgb(31 36 60 / var(--tw-border-opacity));
741757}
742−.bg-white {
743− --tw-bg-opacity: 1;
744− background-color: rgb(255 255 255 / var(--tw-bg-opacity));
758+.border-gold {
759+ --tw-border-opacity: 1;
760+ border-color: rgb(252 211 77 / var(--tw-border-opacity));
745761}
746762.bg-gold {
747763 --tw-bg-opacity: 1;
@@ -759,6 +775,10 @@ Ensure the default browser behavior of the `hidden` attribute.
759775 --tw-bg-opacity: 1;
760776 background-color: rgb(209 213 219 / var(--tw-bg-opacity));
761777}
778+.bg-white {
779+ --tw-bg-opacity: 1;
780+ background-color: rgb(255 255 255 / var(--tw-bg-opacity));
781+}
762782.bg-orange-gold {
763783 --tw-bg-opacity: 1;
764784 background-color: rgb(247 211 146 / var(--tw-bg-opacity));
@@ -799,8 +819,9 @@ Ensure the default browser behavior of the `hidden` attribute.
799819 --tw-bg-opacity: 1;
800820 background-color: rgb(253 230 138 / var(--tw-bg-opacity));
801821}
802−.p-8 {
803− padding: 2rem;
822+.bg-gray-200 {
823+ --tw-bg-opacity: 1;
824+ background-color: rgb(229 231 235 / var(--tw-bg-opacity));
804825}
805826.p-4 {
806827 padding: 1rem;
@@ -811,6 +832,9 @@ Ensure the default browser behavior of the `hidden` attribute.
811832.p-6 {
812833 padding: 1.5rem;
813834}
835+.p-8 {
836+ padding: 2rem;
837+}
814838.p-3 {
815839 padding: 0.75rem;
816840}
@@ -829,6 +853,10 @@ Ensure the default browser behavior of the `hidden` attribute.
829853 padding-top: 0px;
830854 padding-bottom: 0px;
831855}
856+.py-4 {
857+ padding-top: 1rem;
858+ padding-bottom: 1rem;
859+}
832860.py-2 {
833861 padding-top: 0.5rem;
834862 padding-bottom: 0.5rem;
@@ -853,10 +881,6 @@ Ensure the default browser behavior of the `hidden` attribute.
853881 padding-left: 0.25rem;
854882 padding-right: 0.25rem;
855883}
856−.py-4 {
857− padding-top: 1rem;
858− padding-bottom: 1rem;
859−}
860884.pb-8 {
861885 padding-bottom: 2rem;
862886}
@@ -872,6 +896,9 @@ Ensure the default browser behavior of the `hidden` attribute.
872896.pt-0 {
873897 padding-top: 0px;
874898}
899+.pl-5 {
900+ padding-left: 1.25rem;
901+}
875902.text-center {
876903 text-align: center;
877904}
@@ -896,10 +923,6 @@ Ensure the default browser behavior of the `hidden` attribute.
896923.font-mono {
897924 font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
898925}
899−.text-xl {
900− font-size: 1.25rem;
901− line-height: 1.75rem;
902−}
903926.text-3xl {
904927 font-size: 1.875rem;
905928 line-height: 2.25rem;
@@ -916,6 +939,10 @@ Ensure the default browser behavior of the `hidden` attribute.
916939 font-size: 0.875rem;
917940 line-height: 1.25rem;
918941}
942+.text-xl {
943+ font-size: 1.25rem;
944+ line-height: 1.75rem;
945+}
919946.text-base {
920947 font-size: 1rem;
921948 line-height: 1.5rem;
@@ -976,6 +1003,13 @@ Ensure the default browser behavior of the `hidden` attribute.
9761003 -webkit-text-decoration-line: underline;
9771004 text-decoration-line: underline;
9781005}
1006+.no-underline {
1007+ -webkit-text-decoration-line: none;
1008+ text-decoration-line: none;
1009+}
1010+.underline-offset-2 {
1011+ text-underline-offset: 2px;
1012+}
9791013.opacity-50 {
9801014 opacity: 0.5;
9811015}
@@ -1010,11 +1044,6 @@ Ensure the default browser behavior of the `hidden` attribute.
10101044 margin-right: 2rem;
10111045 }
10121046
1013− .\32xs\:my-8 {
1014− margin-top: 2rem;
1015− margin-bottom: 2rem;
1016− }
1017−
10181047 .\32xs\:py-8 {
10191048 padding-top: 2rem;
10201049 padding-bottom: 2rem;
ui/tailwind.config.cjs+18
@@ -11,6 +11,24 @@ module.exports = {
1111 colors: {
1212 navy: '#1f243c',
1313 gold: '#fcd34d',
14+ 'gold-s1': '#e3be45',
15+ 'gold-s2': '#caa93e',
16+ 'gold-s3': '#b09436',
17+ 'gold-s4': '#977f2e',
18+ 'gold-s5': '#7e6a27',
19+ 'gold-s6': '#65541f',
20+ 'gold-s7': '#4c3f17',
21+ 'gold-s8': '#322a0f',
22+ 'gold-s9': '#191508',
23+ 'gold-t1': '#fcd75f',
24+ 'gold-t2': '#fddc71',
25+ // 'gold-t3': 'b09436',
26+ 'gold-t4': '#fde594',
27+ // 'gold-t5': '7e6a27',
28+ 'gold-t6': '#feedb8',
29+ // 'gold-t7': '4c3f17',
30+ 'gold-t8': '#fef6db',
31+ // 'gold-t9': '191508',
1432 'orange-gold': '#f7d392',
1533 }
1634 },