@escape-game-over/atlas 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/NOT-BUILT.md +83 -8
- package/package.json +3 -2
- package/src/contact.ts +91 -9
- package/src/content/index.ts +40 -0
- package/src/content/marks.ts +408 -0
- package/src/content/rich.ts +550 -0
- package/src/countries.ts +314 -0
- package/src/i18n/define.ts +11 -10
- package/src/i18n/placeholders.ts +37 -10
- package/src/i18n/translate.ts +34 -11
- package/src/index.ts +25 -0
- package/src/site/api.ts +31 -0
- package/src/site/create.ts +49 -0
- package/src/url.ts +20 -0
package/src/url.ts
CHANGED
|
@@ -46,6 +46,26 @@ export function isUrlPath(path: string): path is UrlPath {
|
|
|
46
46
|
return path.startsWith("/");
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* A fragment on whatever page is being rendered: `#booking`, `#Scenarios`.
|
|
51
|
+
*
|
|
52
|
+
* The one link target lib cannot resolve and does not need to. A route id
|
|
53
|
+
* becomes a different path in every language and an `https://` URL points
|
|
54
|
+
* somewhere else entirely; a fragment names an element of the document it is
|
|
55
|
+
* written in, so it is already the whole answer and passes through untouched.
|
|
56
|
+
*
|
|
57
|
+
* Typed as its own shape rather than folded into `UrlPath` because they are not
|
|
58
|
+
* interchangeable: `/booking` navigates and `#booking` scrolls, and a leading
|
|
59
|
+
* character is the only thing that distinguishes them. See `LinkTarget`, which
|
|
60
|
+
* tells the four apart by exactly that.
|
|
61
|
+
*/
|
|
62
|
+
export type Hash = `#${string}`;
|
|
63
|
+
|
|
64
|
+
/** The runtime half of `Hash`. See `isHttpsUrl`. */
|
|
65
|
+
export function isHash(value: string): value is Hash {
|
|
66
|
+
return value.startsWith("#");
|
|
67
|
+
}
|
|
68
|
+
|
|
49
69
|
/**
|
|
50
70
|
* An origin without its trailing slash.
|
|
51
71
|
*
|