Skip to content

Commit bc9ca6a

Browse files
committed
Add relationaltext to website
1 parent 9568d34 commit bc9ca6a

13 files changed

Lines changed: 1317 additions & 0 deletions

apps/website/next.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const withNextra = nextra({
1616

1717
const nextConfig: NextConfig = {
1818
reactStrictMode: true,
19+
serverExternalPackages: ["@automerge/automerge"],
1920
async redirects() {
2021
return DOCS_REDIRECTS;
2122
},
@@ -35,6 +36,13 @@ const nextConfig: NextConfig = {
3536
},
3637
];
3738
},
39+
webpack: (config) => {
40+
config.experiments = {
41+
...config.experiments,
42+
asyncWebAssembly: true,
43+
};
44+
return config;
45+
},
3846
};
3947

4048
export default withNextra(nextConfig);

apps/website/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"test:integration:nodb": "vitest run --config vitest.integration.config.ts --tags-filter '!database'"
1717
},
1818
"dependencies": {
19+
"@automerge/automerge": "^3.2.4",
1920
"@repo/database": "workspace:*",
2021
"@repo/ui": "workspace:*",
2122
"@supabase/ssr": "catalog:",
@@ -32,6 +33,7 @@
3233
"posthog-node": "^5.34.2",
3334
"react": "catalog:",
3435
"react-dom": "catalog:",
36+
"relational-text": "0.1.1",
3537
"resend": "^4.0.1",
3638
"sonner": "^2.0.7",
3739
"zod": "^3.24.1"
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
{
2+
"$type": "org.relationaltext.lens",
3+
"id": "com.roamresearch.to.relationaltext.v1",
4+
"description": "Transform Roam Research facets to RelationalText facets",
5+
"source": "com.roamresearch.facet",
6+
"target": "org.relationaltext.facet",
7+
"rules": [
8+
{
9+
"match": {
10+
"name": "bold"
11+
},
12+
"replace": {
13+
"name": "bold"
14+
}
15+
},
16+
{
17+
"match": {
18+
"name": "italic"
19+
},
20+
"replace": {
21+
"name": "italic"
22+
}
23+
},
24+
{
25+
"match": {
26+
"name": "highlight"
27+
},
28+
"replace": {
29+
"name": "highlight"
30+
}
31+
},
32+
{
33+
"match": {
34+
"name": "code"
35+
},
36+
"replace": {
37+
"name": "code"
38+
}
39+
},
40+
{
41+
"match": {
42+
"name": "link"
43+
},
44+
"replace": {
45+
"name": "link",
46+
"renameAttrs": {
47+
"uri": "url"
48+
}
49+
}
50+
},
51+
{
52+
"match": {
53+
"name": "image"
54+
},
55+
"replace": {
56+
"name": "image",
57+
"renameAttrs": {
58+
"src": "src",
59+
"alt": "alt"
60+
}
61+
}
62+
},
63+
{
64+
"match": {
65+
"name": "page-ref"
66+
},
67+
"replace": {
68+
"name": "link",
69+
"renameAttrs": {
70+
"title": "url"
71+
}
72+
}
73+
},
74+
{
75+
"match": {
76+
"name": "tag"
77+
},
78+
"replace": {
79+
"name": "hashtag",
80+
"renameAttrs": {
81+
"tag": "tag"
82+
}
83+
}
84+
},
85+
{
86+
"match": {
87+
"name": "block"
88+
},
89+
"replace": {
90+
"name": "paragraph"
91+
}
92+
},
93+
{
94+
"match": {
95+
"name": "page"
96+
},
97+
"replace": {
98+
"name": "heading",
99+
"addAttrs": {
100+
"level": 1
101+
}
102+
}
103+
}
104+
]
105+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"$type": "org.relationaltext.format-lexicon",
3+
"id": "com.roamresearch.facet",
4+
"version": "1.0",
5+
"specUrl": "https://roamresearch.com/",
6+
"implicitBlockType": "block",
7+
"features": [
8+
{
9+
"typeId": "com.roamresearch.facet#bold",
10+
"featureClass": "inline",
11+
"expandStart": true,
12+
"expandEnd": true
13+
},
14+
{
15+
"typeId": "com.roamresearch.facet#italic",
16+
"featureClass": "inline",
17+
"expandStart": true,
18+
"expandEnd": true
19+
},
20+
{
21+
"typeId": "com.roamresearch.facet#highlight",
22+
"featureClass": "inline",
23+
"expandStart": true,
24+
"expandEnd": true
25+
},
26+
{
27+
"typeId": "com.roamresearch.facet#code",
28+
"featureClass": "inline",
29+
"expandStart": false,
30+
"expandEnd": false
31+
},
32+
{
33+
"typeId": "com.roamresearch.facet#page-ref",
34+
"featureClass": "entity"
35+
},
36+
{
37+
"typeId": "com.roamresearch.facet#block-ref",
38+
"featureClass": "entity"
39+
},
40+
{
41+
"typeId": "com.roamresearch.facet#tag",
42+
"featureClass": "entity"
43+
},
44+
{
45+
"typeId": "com.roamresearch.facet#link",
46+
"featureClass": "entity"
47+
},
48+
{
49+
"typeId": "com.roamresearch.facet#image",
50+
"featureClass": "entity"
51+
},
52+
{
53+
"typeId": "com.roamresearch.facet#block",
54+
"featureClass": "block"
55+
},
56+
{
57+
"typeId": "com.roamresearch.facet#page",
58+
"featureClass": "block"
59+
}
60+
],
61+
"wasmLens": {
62+
"$type": "org.relationaltext.lens",
63+
"id": "com.roamresearch.facet.wasm.v1",
64+
"source": "raw:com.roamresearch.facet",
65+
"target": "com.roamresearch.facet",
66+
"wasmModule": {
67+
"data": "",
68+
"importFn": "import",
69+
"exportFn": "export"
70+
}
71+
}
72+
}

apps/website/public/formats/com.roamresearch/roam.wasm.b64

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

apps/website/public/formats/md.obsidian/markdown.wasm.b64

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)