create-feathersdev 0.11.1 → 0.11.2
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/CHANGELOG.md +11 -0
- package/esm/index.js +2 -2
- package/examples/frontend/react/index.html +16 -11
- package/examples/frontend/react/package.json +2 -2
- package/examples/frontend/react/src/App.css +29 -41
- package/examples/frontend/react/src/App.tsx +8 -9
- package/examples/frontend/react/src/Counter.tsx +8 -4
- package/examples/frontend/react/src/assets/feathers.svg +24 -0
- package/examples/frontend/react/src/automerge.ts +9 -0
- package/examples/frontend/react/src/main.tsx +0 -1
- package/examples/frontend/svelte/index.html +16 -11
- package/examples/frontend/svelte/src/App.svelte +22 -22
- package/examples/frontend/svelte/src/Counter.svelte +33 -0
- package/examples/frontend/svelte/src/app.css +28 -77
- package/examples/frontend/svelte/src/assets/feathers.svg +24 -0
- package/examples/frontend/svelte/src/auth.ts +11 -5
- package/examples/frontend/svelte/src/automerge.ts +27 -0
- package/examples/frontend/vanilla/index.html +19 -11
- package/examples/frontend/vanilla/public/feathers.svg +24 -0
- package/examples/frontend/vanilla/src/automerge.ts +14 -3
- package/examples/frontend/vanilla/src/main.ts +25 -13
- package/examples/frontend/vanilla/src/style.css +28 -94
- package/examples/frontend/vue/index.html +16 -11
- package/examples/frontend/vue/src/App.vue +25 -21
- package/examples/frontend/vue/src/Counter.vue +37 -0
- package/examples/frontend/vue/src/assets/base.css +28 -84
- package/examples/frontend/vue/src/assets/feathers.svg +24 -0
- package/examples/frontend/vue/src/assets/main.css +0 -34
- package/examples/frontend/vue/src/auth.ts +1 -1
- package/examples/frontend/vue/src/automerge.ts +14 -3
- package/package.json +2 -2
- package/examples/frontend/react/src/assets/react.svg +0 -1
- package/examples/frontend/react/src/index.css +0 -68
- package/examples/frontend/svelte/src/assets/svelte.svg +0 -1
- package/examples/frontend/vanilla/public/vite.svg +0 -1
- package/examples/frontend/vue/src/assets/logo.svg +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<svg width="607" height="99" viewBox="0 0 607 99" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_3_192)">
|
|
3
|
+
<path d="M63.3 0C59.1 0 55 1.7 52 4.7L50.9 5.8C50.4 13.8 47.7 21.1 43.5 27.8C45 21.4 45.7 15.7 44.6 12.1L35.2 21.5C34.7 29.5 32 36.7 27.8 43.3C29.5 36.9 30 31.7 29.3 27.3L19.5 37.1C15.9 40.6 13.9 45.5 13.9 50.5V79.1L3.9 88.9C1.4 91.2 0 94.5 0 97.9V98.7L73.4 25.9C80.3 19.1 84.1 9.8 84.2 0.1H63.4L63.3 0Z" fill="white"/>
|
|
4
|
+
<path d="M57.6 61.4L77.8 41.3C81.8 37.4 84 32 84 26.4V14.2C83.3 16.9 82.4 19.4 81 21.4C78.3 25.1 75.4 28.5 72.1 31.8L37.4 66.3L50.8 64.7C53.3 64.4 55.7 63.3 57.4 61.5L57.6 61.4Z" fill="white"/>
|
|
5
|
+
<path d="M33.7 70L17.4 86.2L26.6 86.4C30.3 86.4 33.8 85 36.4 82.5L52.1 66.9C51 67.6 50.1 67.9 49 68.2L33.7 70Z" fill="white"/>
|
|
6
|
+
<path d="M189.7 64.6H153.8C154 67.8 155.1 70.3 156.9 72C158.7 73.7 161 74.5 163.6 74.5C167.6 74.5 170.3 72.8 171.8 69.5H188.7C187.8 72.9 186.3 76 184 78.7C181.7 81.4 178.9 83.5 175.5 85.1C172.1 86.6 168.3 87.4 164.1 87.4C159.9 87.4 154.5 86.3 150.6 84.2C146.6 82 143.6 79 141.3 74.9C139.1 70.9 138 66.2 138 60.8C138 55.4 139.1 50.7 141.3 46.7C143.5 42.7 146.6 39.6 150.5 37.4C154.5 35.2 159 34.2 164.1 34.2C169.2 34.2 173.6 35.3 177.4 37.4C181.3 39.5 184.3 42.5 186.5 46.4C188.7 50.3 189.8 54.8 189.8 60C189.8 65.2 189.8 63 189.5 64.6H189.7ZM173.8 55.8C173.8 53.1 172.9 50.9 171 49.3C169.1 47.7 166.8 46.9 164.1 46.9C161.4 46.9 159.2 47.7 157.4 49.2C155.6 50.7 154.4 52.9 154 55.8H173.8Z" fill="white"/>
|
|
7
|
+
<path d="M198.2 46.7C200.2 42.7 202.9 39.6 206.4 37.4C209.9 35.2 213.7 34.2 218 34.2C222.3 34.2 224.8 34.9 227.6 36.4C230.3 37.9 232.5 39.8 233.9 42.2V34.9H249.7V86.6H233.9V79.3C232.4 81.7 230.2 83.7 227.5 85.1C224.8 86.6 221.6 87.3 217.9 87.3C214.2 87.3 209.9 86.2 206.4 84C202.9 81.8 200.2 78.7 198.2 74.6C196.2 70.6 195.2 65.9 195.2 60.6C195.2 55.3 196.2 50.6 198.2 46.6V46.7ZM230.6 51.4C228.4 49.1 225.7 48 222.6 48C219.5 48 216.8 49.1 214.6 51.4C212.4 53.7 211.3 56.8 211.3 60.7C211.3 64.6 212.4 67.8 214.6 70.1C216.8 72.4 219.5 73.6 222.6 73.6C225.7 73.6 228.4 72.5 230.6 70.2C232.8 67.9 233.9 64.8 233.9 60.8C233.9 56.8 232.8 53.7 230.6 51.4Z" fill="white"/>
|
|
8
|
+
<path d="M290.1 73.2V86.6H282C276.3 86.6 271.8 85.2 268.6 82.4C265.4 79.6 263.8 75 263.8 68.6V48H257.5V34.8H263.8V22.2H279.6V34.8H290V48H279.6V68.8C279.6 70.3 280 71.5 280.7 72.1C281.4 72.8 282.7 73.1 284.4 73.1H290.1V73.2Z" fill="white"/>
|
|
9
|
+
<path d="M409.8 64.6H373.9C374.1 67.8 375.2 70.3 377 72C378.8 73.7 381.1 74.5 383.7 74.5C387.7 74.5 390.4 72.8 391.9 69.5H408.8C407.9 72.9 406.4 76 404.1 78.7C401.8 81.4 399 83.5 395.6 85.1C392.2 86.6 388.4 87.4 384.2 87.4C380 87.4 374.6 86.3 370.7 84.2C366.7 82 363.7 79 361.4 74.9C359.2 70.9 358.1 66.2 358.1 60.8C358.1 55.4 359.2 50.7 361.4 46.7C363.6 42.7 366.7 39.6 370.6 37.4C374.6 35.2 379.1 34.2 384.2 34.2C389.3 34.2 393.7 35.3 397.5 37.4C401.4 39.5 404.4 42.5 406.6 46.4C408.8 50.3 409.9 54.8 409.9 60C409.9 65.2 409.9 63 409.6 64.6H409.8ZM393.8 55.8C393.8 53.1 392.9 50.9 391 49.3C389.1 47.7 386.8 46.9 384.1 46.9C381.4 46.9 379.2 47.7 377.4 49.2C375.6 50.7 374.4 52.9 374 55.8H393.8Z" fill="white"/>
|
|
10
|
+
<path d="M467 85C463.5 83.5 460.7 81.3 458.7 78.7C456.7 76 455.5 73 455.3 69.7H471C471.2 71.5 472 72.9 473.5 74.1C475 75.2 476.8 75.8 479 75.8C481.2 75.8 482.5 75.4 483.6 74.6C484.7 73.8 485.2 72.8 485.2 71.6C485.2 70.4 484.4 69 482.9 68.3C481.4 67.6 478.9 66.8 475.4 65.9C471.7 65 468.6 64.1 466.1 63.2C463.6 62.2 461.5 60.7 459.7 58.7C457.9 56.6 457 53.8 457 50.3C457 46.8 457.8 44.6 459.5 42.2C461.1 39.8 463.5 37.8 466.7 36.4C469.9 35 473.7 34.3 478 34.3C484.5 34.3 489.6 35.9 493.3 39.1C497 42.3 499.2 46.6 499.7 51.9H485.1C484.9 50.1 484.1 48.7 482.7 47.6C481.4 46.6 479.6 46 477.5 46C475.4 46 474.2 46.4 473.2 47.1C472.2 47.8 471.7 48.8 471.7 50C471.7 51.2 472.5 52.6 474.1 53.3C475.7 54 478.1 54.8 481.5 55.5C485.3 56.5 488.4 57.5 490.9 58.4C493.3 59.4 495.4 60.9 497.2 63C499 65.1 500 68 500 71.6C500 74.6 499.2 77.3 497.5 79.7C495.8 82.1 493.4 83.9 490.2 85.3C487 86.7 483.3 87.3 479.1 87.3C474.9 87.3 470.6 86.5 467.1 85H467Z" fill="white"/>
|
|
11
|
+
<path d="M344.9 40.3C341.3 36.4 336.6 34.4 330.6 34.4C324.6 34.4 324 35.1 321.2 36.4C318.4 37.8 316.2 39.6 314.6 41.9V18.1H298.8V86.7H314.6V65.5C314.6 65.5 314.6 56.7 315 55.1C315.4 53.5 315.3 54.1 315.5 53.6C315.9 52.5 316.5 51.5 317.3 50.7C319.1 48.8 321.5 47.8 324.5 47.8C327.5 47.8 329.9 48.8 331.7 50.7C333.5 52.6 334.4 55.3 334.4 58.8V86.9H350.2V56.7C350.2 49.8 348.4 44.5 344.8 40.5L344.9 40.3Z" fill="white"/>
|
|
12
|
+
<path d="M113 75.8C118.7 72.3 125.1 66.9 125.3 60C125.3 58 125.3 55.8 125.3 53.5V48.2H133.8V35H125.3V34.5C125.3 31.8 125.9 29.9 127.2 28.8C128.4 27.8 130.6 27.3 133.6 27.5V14.1C133 14.1 132.2 14.1 131 14.1C124 14.1 118.6 15.8 115 19.1C111.4 22.4 109.5 27.2 109.5 33.6V35.1H103.8V48.3H109.5V86.8H125.3V74.5C121.1 76.2 116.7 76.9 113 75.9V75.8Z" fill="white"/>
|
|
13
|
+
<path d="M441.2 36.8C438.4 38.4 436.1 40.7 434.3 43.5V34.9H418.5V39.2C419.4 46.1 426.9 52.8 431.7 57.1C427.8 57.5 423 56.2 418.5 53.9V86.6H434.3V62.6C434.3 58.3 435.3 55.4 437.3 53.7C439.3 52 442.2 51.2 446.2 51.2H450.6V34.4C447.2 34.4 444.1 35.2 441.3 36.9L441.2 36.8Z" fill="white"/>
|
|
14
|
+
<path d="M509.4 84.2C508.8 83.6 508.4 82.8 508.4 81.8C508.4 80.8 508.7 80.1 509.4 79.4C510.1 78.7 510.8 78.4 511.8 78.4C512.8 78.4 513.5 78.7 514.1 79.4C514.7 80 515.1 80.8 515.1 81.8C515.1 82.8 514.8 83.5 514.1 84.2C513.5 84.8 512.7 85.2 511.8 85.2C510.9 85.2 510.1 84.9 509.4 84.2Z" fill="white"/>
|
|
15
|
+
<path d="M522 65.3C523.1 63.3 524.5 61.8 526.3 60.7C528.1 59.6 530.2 59.1 532.4 59.1C534.6 59.1 535.7 59.5 537.3 60.2C538.9 60.9 540.2 61.9 541.1 63.1V50.9H546.4V84.9H541.1V81.1C540.2 82.3 539.1 83.3 537.5 84.1C535.9 84.9 534.2 85.3 532.3 85.3C530.4 85.3 528.1 84.7 526.3 83.6C524.5 82.5 523 80.9 522 78.9C520.9 76.9 520.4 74.6 520.4 72.1C520.4 69.6 520.9 67.3 522 65.3ZM540 67.6C539.3 66.3 538.3 65.3 537.2 64.7C536 64 534.8 63.7 533.4 63.7C532 63.7 530.8 64 529.6 64.7C528.4 65.4 527.5 66.3 526.8 67.6C526.1 68.9 525.7 70.4 525.7 72.1C525.7 73.8 526.1 75.4 526.8 76.7C527.5 78 528.5 79 529.7 79.7C530.9 80.4 532.1 80.7 533.4 80.7C534.7 80.7 536 80.4 537.2 79.7C538.4 79 539.3 78 540 76.7C540.7 75.4 541.1 73.9 541.1 72.1C541.1 70.3 540.7 68.8 540 67.5V67.6Z" fill="white"/>
|
|
16
|
+
<path d="M577.7 74.1H558.3C558.5 76.1 559.2 77.7 560.6 79C561.9 80.2 563.6 80.8 565.6 80.8C568.4 80.8 570.4 79.6 571.6 77.3H577.3C576.5 79.6 575.1 81.5 573.1 83C571.1 84.5 568.6 85.2 565.6 85.2C562.6 85.2 561 84.7 559.1 83.6C557.2 82.5 555.7 81 554.6 79C553.5 77 553 74.7 553 72.1C553 69.5 553.5 67.2 554.6 65.2C555.7 63.2 557.1 61.7 559.1 60.6C561 59.5 563.2 59 565.7 59C568.2 59 570.2 59.5 572.1 60.6C574 61.6 575.4 63.1 576.5 65C577.5 66.9 578.1 69.1 578.1 71.5C578.1 73.9 578.1 73.3 577.9 74.1H577.7ZM572.4 69.9C572.4 68 571.7 66.4 570.3 65.3C568.9 64.1 567.3 63.6 565.3 63.6C563.3 63.6 561.9 64.2 560.7 65.3C559.4 66.5 558.6 68 558.4 70H572.4V69.9Z" fill="white"/>
|
|
17
|
+
<path d="M594.2 80.2L601.4 59.5H607L597.3 84.8H591L581.4 59.5H587L594.2 80.2Z" fill="white"/>
|
|
18
|
+
</g>
|
|
19
|
+
<defs>
|
|
20
|
+
<clipPath id="clip0_3_192">
|
|
21
|
+
<rect width="607" height="98.7" fill="white"/>
|
|
22
|
+
</clipPath>
|
|
23
|
+
</defs>
|
|
24
|
+
</svg>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createAutomerge } from '@feathersdev/automerge'
|
|
1
|
+
import { createAutomerge, DocHandle } from '@feathersdev/automerge'
|
|
2
2
|
import { auth } from './auth.js'
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -7,10 +7,21 @@ import { auth } from './auth.js'
|
|
|
7
7
|
*/
|
|
8
8
|
export const automerge = createAutomerge(auth)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Add types for any data you want to store for your application
|
|
12
|
+
*/
|
|
13
|
+
export interface AppData {
|
|
11
14
|
counter: number
|
|
12
15
|
}
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The document handle type for the application
|
|
19
|
+
*/
|
|
20
|
+
export type AppDocumentHandle = DocHandle<AppData>
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Load the document for the application
|
|
24
|
+
*/
|
|
25
|
+
export async function loadAppDocument(): Promise<AppDocumentHandle> {
|
|
15
26
|
return automerge.find<AppData>()
|
|
16
27
|
}
|
|
@@ -1,23 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { auth } from './auth.js'
|
|
2
|
+
import { loadAppDocument } from './automerge.js'
|
|
3
3
|
import './style.css'
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
async function main () {
|
|
6
|
+
const handle = await loadAppDocument()
|
|
7
|
+
const user = await auth.getUser()
|
|
8
|
+
|
|
6
9
|
document.querySelector<HTMLDivElement>('#app')!.innerHTML = `
|
|
7
|
-
|
|
8
|
-
<div class="
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
<h2 class="text-2xl">Hello <strong>${user?.email}</strong></h2>
|
|
11
|
+
<div class="card bg-base-300 mx-auto rounded-4xl">
|
|
12
|
+
<div class="card-body">
|
|
13
|
+
<h2 class="text-2xl">Community Counter</h2>
|
|
14
|
+
<p class="text-sm">Number of times clicked by everybody</p>
|
|
15
|
+
<strong id="counter" class="text-3xl pt-2 pb-3">0</strong>
|
|
16
|
+
<button id="increment" class="btn btn-primary">
|
|
17
|
+
Increment
|
|
18
|
+
</button>
|
|
19
|
+
</div>
|
|
12
20
|
</div>
|
|
13
|
-
</div>
|
|
14
21
|
`
|
|
15
22
|
|
|
16
23
|
handle.on('change', ({ doc }) => {
|
|
17
|
-
document.getElementById('
|
|
24
|
+
document.getElementById('counter')!.textContent = doc.counter.toString()
|
|
18
25
|
})
|
|
19
26
|
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
// Handle #increment button click
|
|
28
|
+
document.getElementById('increment')!.addEventListener('click', () => {
|
|
29
|
+
handle.change((doc) => {
|
|
30
|
+
doc.counter = (doc.counter || 0) + 1
|
|
31
|
+
})
|
|
22
32
|
})
|
|
23
|
-
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
main()
|
|
@@ -1,96 +1,30 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
color-
|
|
7
|
-
color:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
color:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
min-height: 100vh;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
h1 {
|
|
34
|
-
font-size: 3.2em;
|
|
35
|
-
line-height: 1.1;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
#app {
|
|
39
|
-
max-width: 1280px;
|
|
40
|
-
margin: 0 auto;
|
|
41
|
-
padding: 2rem;
|
|
42
|
-
text-align: center;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.logo {
|
|
46
|
-
height: 6em;
|
|
47
|
-
padding: 1.5em;
|
|
48
|
-
will-change: filter;
|
|
49
|
-
transition: filter 300ms;
|
|
50
|
-
}
|
|
51
|
-
.logo:hover {
|
|
52
|
-
filter: drop-shadow(0 0 2em #646cffaa);
|
|
53
|
-
}
|
|
54
|
-
.logo.vanilla:hover {
|
|
55
|
-
filter: drop-shadow(0 0 2em #3178c6aa);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.card {
|
|
59
|
-
padding: 2em;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.read-the-docs {
|
|
63
|
-
color: #888;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
button {
|
|
67
|
-
border-radius: 8px;
|
|
68
|
-
border: 1px solid transparent;
|
|
69
|
-
padding: 0.6em 1.2em;
|
|
70
|
-
font-size: 1em;
|
|
71
|
-
font-weight: 500;
|
|
72
|
-
font-family: inherit;
|
|
73
|
-
background-color: #1a1a1a;
|
|
74
|
-
cursor: pointer;
|
|
75
|
-
transition: border-color 0.25s;
|
|
76
|
-
}
|
|
77
|
-
button:hover {
|
|
78
|
-
border-color: #646cff;
|
|
79
|
-
}
|
|
80
|
-
button:focus,
|
|
81
|
-
button:focus-visible {
|
|
82
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
@media (prefers-color-scheme: light) {
|
|
86
|
-
:root {
|
|
87
|
-
color: #213547;
|
|
88
|
-
background-color: #ffffff;
|
|
89
|
-
}
|
|
90
|
-
a:hover {
|
|
91
|
-
color: #747bff;
|
|
92
|
-
}
|
|
93
|
-
button {
|
|
94
|
-
background-color: #f9f9f9;
|
|
95
|
-
}
|
|
2
|
+
--color-base-100: oklch(3.6% 0.01 270);
|
|
3
|
+
--color-base-200: oklch(15% 19% 307);
|
|
4
|
+
--color-base-300: oklch(35% 44% 287);
|
|
5
|
+
--color-base-300-old: oklch(17.6% 0.04 270);
|
|
6
|
+
--color-base-content: oklch(93.3% 0.01 260);
|
|
7
|
+
--color-primary: oklch(48% 39% 348);
|
|
8
|
+
--color-primary-content: oklch(100% 0 0);
|
|
9
|
+
--color-secondary: oklch(91.9% 0.13 99.9);
|
|
10
|
+
--color-secondary-content: oklch(0% 0 0);
|
|
11
|
+
--color-accent: oklch(34.1% 0.13 297.4);
|
|
12
|
+
--color-accent-content: oklch(100% 0 0);
|
|
13
|
+
--color-neutral: oklch(20.1% 0.05 260.7);
|
|
14
|
+
--color-neutral-content: oklch(100% 0 0);
|
|
15
|
+
--color-info: oklch(56.8% 0.14 255.1);
|
|
16
|
+
--color-info-content: oklch(94.5% 0.01 230);
|
|
17
|
+
--color-success: oklch(77.1% 0.13 149.9);
|
|
18
|
+
--color-warning-content: oklch(94.5% 0.01 230);
|
|
19
|
+
--color-error: oklch(64.1% 0.21 29.3);
|
|
20
|
+
--color-error-content: oklch(94.5% 0.01 230);
|
|
21
|
+
--radius-selector: 1rem;
|
|
22
|
+
--radius-field: 1rem;
|
|
23
|
+
--radius-box: 0.5rem;
|
|
24
|
+
--size-selector: 0.25rem;
|
|
25
|
+
--size-field: 0.25rem;
|
|
26
|
+
--border: 1px;
|
|
27
|
+
--depth: 1;
|
|
28
|
+
--noise: 0;
|
|
29
|
+
--invert-logo: 0;
|
|
96
30
|
}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<link rel="icon" href="/favicon.ico">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
8
|
+
<link href="https://cdn.jsdelivr.net/npm/daisyui@5" rel="stylesheet" type="text/css" />
|
|
9
|
+
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
|
10
|
+
<title>feathers.dev Vue App</title>
|
|
11
|
+
</head>
|
|
12
|
+
|
|
13
|
+
<body>
|
|
14
|
+
<div id="app"></div>
|
|
15
|
+
<script type="module" src="/src/main.ts"></script>
|
|
16
|
+
</body>
|
|
17
|
+
|
|
18
|
+
</html>
|
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { ref } from 'vue'
|
|
3
|
-
import {
|
|
2
|
+
import { ref, shallowRef } from 'vue'
|
|
3
|
+
import { auth } from './auth.js'
|
|
4
|
+
import { loadAppDocument, type AppDocumentHandle } from './automerge.js'
|
|
5
|
+
import Counter from './Counter.vue'
|
|
6
|
+
import type { FeathersAuthUser } from '@feathersdev/auth'
|
|
7
|
+
import feathersLogo from './assets/feathers.svg'
|
|
4
8
|
|
|
5
|
-
|
|
6
|
-
const
|
|
9
|
+
// State for the handle and user
|
|
10
|
+
const handle = shallowRef<AppDocumentHandle | null>(null)
|
|
11
|
+
const user = ref<FeathersAuthUser | null>(null)
|
|
7
12
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
doc.counter = (doc.counter || 0) + 1
|
|
15
|
-
})
|
|
13
|
+
// Initialize the application
|
|
14
|
+
async function init() {
|
|
15
|
+
// Get the document handle
|
|
16
|
+
handle.value = await loadAppDocument()
|
|
17
|
+
// Get the current user
|
|
18
|
+
user.value = await auth.getUser()
|
|
16
19
|
}
|
|
20
|
+
|
|
21
|
+
// Run initialization
|
|
22
|
+
init()
|
|
17
23
|
</script>
|
|
18
24
|
|
|
19
25
|
<template>
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
<button @click="incrementCounter">
|
|
26
|
-
Increment
|
|
27
|
-
</button>
|
|
26
|
+
<main class="w-96 mx-auto flex flex-col gap-4 text-center pt-10">
|
|
27
|
+
<img :src="feathersLogo" alt="feathers.dev Logo" />
|
|
28
|
+
<div v-if="handle" class="flex flex-col gap-4">
|
|
29
|
+
<h2 class="text-2xl">Hello <strong>{{ user?.email }}</strong></h2>
|
|
30
|
+
<Counter :handle="handle" />
|
|
28
31
|
</div>
|
|
29
|
-
|
|
32
|
+
<p v-else>Loading...</p>
|
|
33
|
+
</main>
|
|
30
34
|
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, onMounted, defineProps } from 'vue'
|
|
3
|
+
import type { AppDocumentHandle } from './automerge.js'
|
|
4
|
+
|
|
5
|
+
// Define props for the component
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
handle: AppDocumentHandle
|
|
8
|
+
}>()
|
|
9
|
+
|
|
10
|
+
// Initialize counter state
|
|
11
|
+
const counter = ref<number>(0)
|
|
12
|
+
|
|
13
|
+
// Set up listener for document changes
|
|
14
|
+
onMounted(() => {
|
|
15
|
+
props.handle.on('change', ({ doc }: { doc: { counter?: number } }) => {
|
|
16
|
+
counter.value = doc.counter || 0
|
|
17
|
+
})
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
// Function to increment the counter
|
|
21
|
+
function incrementCounter() {
|
|
22
|
+
props.handle.change((doc: { counter?: number }) => {
|
|
23
|
+
doc.counter = (doc.counter || 0) + 1
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<div class="card bg-base-300 mx-auto rounded-4xl">
|
|
30
|
+
<div class="card-body">
|
|
31
|
+
<h2 class="text-2xl">Community Counter</h2>
|
|
32
|
+
<p class="text-sm">Number of times clicked by everybody</p>
|
|
33
|
+
<strong class="text-3xl pt-2 pb-3">{{ counter }}</strong>
|
|
34
|
+
<button class="btn btn-primary" @click="incrementCounter">Increment</button>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
@@ -1,86 +1,30 @@
|
|
|
1
|
-
/* color palette from <https://github.com/vuejs/theme> */
|
|
2
1
|
:root {
|
|
3
|
-
--
|
|
4
|
-
--
|
|
5
|
-
--
|
|
6
|
-
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--
|
|
10
|
-
|
|
11
|
-
--
|
|
12
|
-
|
|
13
|
-
--
|
|
14
|
-
--
|
|
15
|
-
--
|
|
16
|
-
--
|
|
17
|
-
|
|
18
|
-
--
|
|
19
|
-
--
|
|
20
|
-
--
|
|
21
|
-
--
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
:
|
|
26
|
-
--
|
|
27
|
-
--
|
|
28
|
-
--
|
|
29
|
-
|
|
30
|
-
--
|
|
31
|
-
--color-border-hover: var(--vt-c-divider-light-1);
|
|
32
|
-
|
|
33
|
-
--color-heading: var(--vt-c-text-light-1);
|
|
34
|
-
--color-text: var(--vt-c-text-light-1);
|
|
35
|
-
|
|
36
|
-
--section-gap: 160px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@media (prefers-color-scheme: dark) {
|
|
40
|
-
:root {
|
|
41
|
-
--color-background: var(--vt-c-black);
|
|
42
|
-
--color-background-soft: var(--vt-c-black-soft);
|
|
43
|
-
--color-background-mute: var(--vt-c-black-mute);
|
|
44
|
-
|
|
45
|
-
--color-border: var(--vt-c-divider-dark-2);
|
|
46
|
-
--color-border-hover: var(--vt-c-divider-dark-1);
|
|
47
|
-
|
|
48
|
-
--color-heading: var(--vt-c-text-dark-1);
|
|
49
|
-
--color-text: var(--vt-c-text-dark-2);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
*,
|
|
54
|
-
*::before,
|
|
55
|
-
*::after {
|
|
56
|
-
box-sizing: border-box;
|
|
57
|
-
margin: 0;
|
|
58
|
-
font-weight: normal;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
body {
|
|
62
|
-
min-height: 100vh;
|
|
63
|
-
color: var(--color-text);
|
|
64
|
-
background: var(--color-background);
|
|
65
|
-
transition:
|
|
66
|
-
color 0.5s,
|
|
67
|
-
background-color 0.5s;
|
|
68
|
-
line-height: 1.6;
|
|
69
|
-
font-family:
|
|
70
|
-
Inter,
|
|
71
|
-
-apple-system,
|
|
72
|
-
BlinkMacSystemFont,
|
|
73
|
-
'Segoe UI',
|
|
74
|
-
Roboto,
|
|
75
|
-
Oxygen,
|
|
76
|
-
Ubuntu,
|
|
77
|
-
Cantarell,
|
|
78
|
-
'Fira Sans',
|
|
79
|
-
'Droid Sans',
|
|
80
|
-
'Helvetica Neue',
|
|
81
|
-
sans-serif;
|
|
82
|
-
font-size: 15px;
|
|
83
|
-
text-rendering: optimizeLegibility;
|
|
84
|
-
-webkit-font-smoothing: antialiased;
|
|
85
|
-
-moz-osx-font-smoothing: grayscale;
|
|
2
|
+
--color-base-100: oklch(3.6% 0.01 270);
|
|
3
|
+
--color-base-200: oklch(15% 19% 307);
|
|
4
|
+
--color-base-300: oklch(35% 44% 287);
|
|
5
|
+
--color-base-300-old: oklch(17.6% 0.04 270);
|
|
6
|
+
--color-base-content: oklch(93.3% 0.01 260);
|
|
7
|
+
--color-primary: oklch(48% 39% 348);
|
|
8
|
+
--color-primary-content: oklch(100% 0 0);
|
|
9
|
+
--color-secondary: oklch(91.9% 0.13 99.9);
|
|
10
|
+
--color-secondary-content: oklch(0% 0 0);
|
|
11
|
+
--color-accent: oklch(34.1% 0.13 297.4);
|
|
12
|
+
--color-accent-content: oklch(100% 0 0);
|
|
13
|
+
--color-neutral: oklch(20.1% 0.05 260.7);
|
|
14
|
+
--color-neutral-content: oklch(100% 0 0);
|
|
15
|
+
--color-info: oklch(56.8% 0.14 255.1);
|
|
16
|
+
--color-info-content: oklch(94.5% 0.01 230);
|
|
17
|
+
--color-success: oklch(77.1% 0.13 149.9);
|
|
18
|
+
--color-warning-content: oklch(94.5% 0.01 230);
|
|
19
|
+
--color-error: oklch(64.1% 0.21 29.3);
|
|
20
|
+
--color-error-content: oklch(94.5% 0.01 230);
|
|
21
|
+
--radius-selector: 1rem;
|
|
22
|
+
--radius-field: 1rem;
|
|
23
|
+
--radius-box: 0.5rem;
|
|
24
|
+
--size-selector: 0.25rem;
|
|
25
|
+
--size-field: 0.25rem;
|
|
26
|
+
--border: 1px;
|
|
27
|
+
--depth: 1;
|
|
28
|
+
--noise: 0;
|
|
29
|
+
--invert-logo: 0;
|
|
86
30
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<svg width="607" height="99" viewBox="0 0 607 99" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_3_192)">
|
|
3
|
+
<path d="M63.3 0C59.1 0 55 1.7 52 4.7L50.9 5.8C50.4 13.8 47.7 21.1 43.5 27.8C45 21.4 45.7 15.7 44.6 12.1L35.2 21.5C34.7 29.5 32 36.7 27.8 43.3C29.5 36.9 30 31.7 29.3 27.3L19.5 37.1C15.9 40.6 13.9 45.5 13.9 50.5V79.1L3.9 88.9C1.4 91.2 0 94.5 0 97.9V98.7L73.4 25.9C80.3 19.1 84.1 9.8 84.2 0.1H63.4L63.3 0Z" fill="white"/>
|
|
4
|
+
<path d="M57.6 61.4L77.8 41.3C81.8 37.4 84 32 84 26.4V14.2C83.3 16.9 82.4 19.4 81 21.4C78.3 25.1 75.4 28.5 72.1 31.8L37.4 66.3L50.8 64.7C53.3 64.4 55.7 63.3 57.4 61.5L57.6 61.4Z" fill="white"/>
|
|
5
|
+
<path d="M33.7 70L17.4 86.2L26.6 86.4C30.3 86.4 33.8 85 36.4 82.5L52.1 66.9C51 67.6 50.1 67.9 49 68.2L33.7 70Z" fill="white"/>
|
|
6
|
+
<path d="M189.7 64.6H153.8C154 67.8 155.1 70.3 156.9 72C158.7 73.7 161 74.5 163.6 74.5C167.6 74.5 170.3 72.8 171.8 69.5H188.7C187.8 72.9 186.3 76 184 78.7C181.7 81.4 178.9 83.5 175.5 85.1C172.1 86.6 168.3 87.4 164.1 87.4C159.9 87.4 154.5 86.3 150.6 84.2C146.6 82 143.6 79 141.3 74.9C139.1 70.9 138 66.2 138 60.8C138 55.4 139.1 50.7 141.3 46.7C143.5 42.7 146.6 39.6 150.5 37.4C154.5 35.2 159 34.2 164.1 34.2C169.2 34.2 173.6 35.3 177.4 37.4C181.3 39.5 184.3 42.5 186.5 46.4C188.7 50.3 189.8 54.8 189.8 60C189.8 65.2 189.8 63 189.5 64.6H189.7ZM173.8 55.8C173.8 53.1 172.9 50.9 171 49.3C169.1 47.7 166.8 46.9 164.1 46.9C161.4 46.9 159.2 47.7 157.4 49.2C155.6 50.7 154.4 52.9 154 55.8H173.8Z" fill="white"/>
|
|
7
|
+
<path d="M198.2 46.7C200.2 42.7 202.9 39.6 206.4 37.4C209.9 35.2 213.7 34.2 218 34.2C222.3 34.2 224.8 34.9 227.6 36.4C230.3 37.9 232.5 39.8 233.9 42.2V34.9H249.7V86.6H233.9V79.3C232.4 81.7 230.2 83.7 227.5 85.1C224.8 86.6 221.6 87.3 217.9 87.3C214.2 87.3 209.9 86.2 206.4 84C202.9 81.8 200.2 78.7 198.2 74.6C196.2 70.6 195.2 65.9 195.2 60.6C195.2 55.3 196.2 50.6 198.2 46.6V46.7ZM230.6 51.4C228.4 49.1 225.7 48 222.6 48C219.5 48 216.8 49.1 214.6 51.4C212.4 53.7 211.3 56.8 211.3 60.7C211.3 64.6 212.4 67.8 214.6 70.1C216.8 72.4 219.5 73.6 222.6 73.6C225.7 73.6 228.4 72.5 230.6 70.2C232.8 67.9 233.9 64.8 233.9 60.8C233.9 56.8 232.8 53.7 230.6 51.4Z" fill="white"/>
|
|
8
|
+
<path d="M290.1 73.2V86.6H282C276.3 86.6 271.8 85.2 268.6 82.4C265.4 79.6 263.8 75 263.8 68.6V48H257.5V34.8H263.8V22.2H279.6V34.8H290V48H279.6V68.8C279.6 70.3 280 71.5 280.7 72.1C281.4 72.8 282.7 73.1 284.4 73.1H290.1V73.2Z" fill="white"/>
|
|
9
|
+
<path d="M409.8 64.6H373.9C374.1 67.8 375.2 70.3 377 72C378.8 73.7 381.1 74.5 383.7 74.5C387.7 74.5 390.4 72.8 391.9 69.5H408.8C407.9 72.9 406.4 76 404.1 78.7C401.8 81.4 399 83.5 395.6 85.1C392.2 86.6 388.4 87.4 384.2 87.4C380 87.4 374.6 86.3 370.7 84.2C366.7 82 363.7 79 361.4 74.9C359.2 70.9 358.1 66.2 358.1 60.8C358.1 55.4 359.2 50.7 361.4 46.7C363.6 42.7 366.7 39.6 370.6 37.4C374.6 35.2 379.1 34.2 384.2 34.2C389.3 34.2 393.7 35.3 397.5 37.4C401.4 39.5 404.4 42.5 406.6 46.4C408.8 50.3 409.9 54.8 409.9 60C409.9 65.2 409.9 63 409.6 64.6H409.8ZM393.8 55.8C393.8 53.1 392.9 50.9 391 49.3C389.1 47.7 386.8 46.9 384.1 46.9C381.4 46.9 379.2 47.7 377.4 49.2C375.6 50.7 374.4 52.9 374 55.8H393.8Z" fill="white"/>
|
|
10
|
+
<path d="M467 85C463.5 83.5 460.7 81.3 458.7 78.7C456.7 76 455.5 73 455.3 69.7H471C471.2 71.5 472 72.9 473.5 74.1C475 75.2 476.8 75.8 479 75.8C481.2 75.8 482.5 75.4 483.6 74.6C484.7 73.8 485.2 72.8 485.2 71.6C485.2 70.4 484.4 69 482.9 68.3C481.4 67.6 478.9 66.8 475.4 65.9C471.7 65 468.6 64.1 466.1 63.2C463.6 62.2 461.5 60.7 459.7 58.7C457.9 56.6 457 53.8 457 50.3C457 46.8 457.8 44.6 459.5 42.2C461.1 39.8 463.5 37.8 466.7 36.4C469.9 35 473.7 34.3 478 34.3C484.5 34.3 489.6 35.9 493.3 39.1C497 42.3 499.2 46.6 499.7 51.9H485.1C484.9 50.1 484.1 48.7 482.7 47.6C481.4 46.6 479.6 46 477.5 46C475.4 46 474.2 46.4 473.2 47.1C472.2 47.8 471.7 48.8 471.7 50C471.7 51.2 472.5 52.6 474.1 53.3C475.7 54 478.1 54.8 481.5 55.5C485.3 56.5 488.4 57.5 490.9 58.4C493.3 59.4 495.4 60.9 497.2 63C499 65.1 500 68 500 71.6C500 74.6 499.2 77.3 497.5 79.7C495.8 82.1 493.4 83.9 490.2 85.3C487 86.7 483.3 87.3 479.1 87.3C474.9 87.3 470.6 86.5 467.1 85H467Z" fill="white"/>
|
|
11
|
+
<path d="M344.9 40.3C341.3 36.4 336.6 34.4 330.6 34.4C324.6 34.4 324 35.1 321.2 36.4C318.4 37.8 316.2 39.6 314.6 41.9V18.1H298.8V86.7H314.6V65.5C314.6 65.5 314.6 56.7 315 55.1C315.4 53.5 315.3 54.1 315.5 53.6C315.9 52.5 316.5 51.5 317.3 50.7C319.1 48.8 321.5 47.8 324.5 47.8C327.5 47.8 329.9 48.8 331.7 50.7C333.5 52.6 334.4 55.3 334.4 58.8V86.9H350.2V56.7C350.2 49.8 348.4 44.5 344.8 40.5L344.9 40.3Z" fill="white"/>
|
|
12
|
+
<path d="M113 75.8C118.7 72.3 125.1 66.9 125.3 60C125.3 58 125.3 55.8 125.3 53.5V48.2H133.8V35H125.3V34.5C125.3 31.8 125.9 29.9 127.2 28.8C128.4 27.8 130.6 27.3 133.6 27.5V14.1C133 14.1 132.2 14.1 131 14.1C124 14.1 118.6 15.8 115 19.1C111.4 22.4 109.5 27.2 109.5 33.6V35.1H103.8V48.3H109.5V86.8H125.3V74.5C121.1 76.2 116.7 76.9 113 75.9V75.8Z" fill="white"/>
|
|
13
|
+
<path d="M441.2 36.8C438.4 38.4 436.1 40.7 434.3 43.5V34.9H418.5V39.2C419.4 46.1 426.9 52.8 431.7 57.1C427.8 57.5 423 56.2 418.5 53.9V86.6H434.3V62.6C434.3 58.3 435.3 55.4 437.3 53.7C439.3 52 442.2 51.2 446.2 51.2H450.6V34.4C447.2 34.4 444.1 35.2 441.3 36.9L441.2 36.8Z" fill="white"/>
|
|
14
|
+
<path d="M509.4 84.2C508.8 83.6 508.4 82.8 508.4 81.8C508.4 80.8 508.7 80.1 509.4 79.4C510.1 78.7 510.8 78.4 511.8 78.4C512.8 78.4 513.5 78.7 514.1 79.4C514.7 80 515.1 80.8 515.1 81.8C515.1 82.8 514.8 83.5 514.1 84.2C513.5 84.8 512.7 85.2 511.8 85.2C510.9 85.2 510.1 84.9 509.4 84.2Z" fill="white"/>
|
|
15
|
+
<path d="M522 65.3C523.1 63.3 524.5 61.8 526.3 60.7C528.1 59.6 530.2 59.1 532.4 59.1C534.6 59.1 535.7 59.5 537.3 60.2C538.9 60.9 540.2 61.9 541.1 63.1V50.9H546.4V84.9H541.1V81.1C540.2 82.3 539.1 83.3 537.5 84.1C535.9 84.9 534.2 85.3 532.3 85.3C530.4 85.3 528.1 84.7 526.3 83.6C524.5 82.5 523 80.9 522 78.9C520.9 76.9 520.4 74.6 520.4 72.1C520.4 69.6 520.9 67.3 522 65.3ZM540 67.6C539.3 66.3 538.3 65.3 537.2 64.7C536 64 534.8 63.7 533.4 63.7C532 63.7 530.8 64 529.6 64.7C528.4 65.4 527.5 66.3 526.8 67.6C526.1 68.9 525.7 70.4 525.7 72.1C525.7 73.8 526.1 75.4 526.8 76.7C527.5 78 528.5 79 529.7 79.7C530.9 80.4 532.1 80.7 533.4 80.7C534.7 80.7 536 80.4 537.2 79.7C538.4 79 539.3 78 540 76.7C540.7 75.4 541.1 73.9 541.1 72.1C541.1 70.3 540.7 68.8 540 67.5V67.6Z" fill="white"/>
|
|
16
|
+
<path d="M577.7 74.1H558.3C558.5 76.1 559.2 77.7 560.6 79C561.9 80.2 563.6 80.8 565.6 80.8C568.4 80.8 570.4 79.6 571.6 77.3H577.3C576.5 79.6 575.1 81.5 573.1 83C571.1 84.5 568.6 85.2 565.6 85.2C562.6 85.2 561 84.7 559.1 83.6C557.2 82.5 555.7 81 554.6 79C553.5 77 553 74.7 553 72.1C553 69.5 553.5 67.2 554.6 65.2C555.7 63.2 557.1 61.7 559.1 60.6C561 59.5 563.2 59 565.7 59C568.2 59 570.2 59.5 572.1 60.6C574 61.6 575.4 63.1 576.5 65C577.5 66.9 578.1 69.1 578.1 71.5C578.1 73.9 578.1 73.3 577.9 74.1H577.7ZM572.4 69.9C572.4 68 571.7 66.4 570.3 65.3C568.9 64.1 567.3 63.6 565.3 63.6C563.3 63.6 561.9 64.2 560.7 65.3C559.4 66.5 558.6 68 558.4 70H572.4V69.9Z" fill="white"/>
|
|
17
|
+
<path d="M594.2 80.2L601.4 59.5H607L597.3 84.8H591L581.4 59.5H587L594.2 80.2Z" fill="white"/>
|
|
18
|
+
</g>
|
|
19
|
+
<defs>
|
|
20
|
+
<clipPath id="clip0_3_192">
|
|
21
|
+
<rect width="607" height="98.7" fill="white"/>
|
|
22
|
+
</clipPath>
|
|
23
|
+
</defs>
|
|
24
|
+
</svg>
|
|
@@ -1,35 +1 @@
|
|
|
1
1
|
@import './base.css';
|
|
2
|
-
|
|
3
|
-
#app {
|
|
4
|
-
max-width: 1280px;
|
|
5
|
-
margin: 0 auto;
|
|
6
|
-
padding: 2rem;
|
|
7
|
-
font-weight: normal;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
a,
|
|
11
|
-
.green {
|
|
12
|
-
text-decoration: none;
|
|
13
|
-
color: hsla(160, 100%, 37%, 1);
|
|
14
|
-
transition: 0.4s;
|
|
15
|
-
padding: 3px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@media (hover: hover) {
|
|
19
|
-
a:hover {
|
|
20
|
-
background-color: hsla(160, 100%, 37%, 0.2);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@media (min-width: 1024px) {
|
|
25
|
-
body {
|
|
26
|
-
display: flex;
|
|
27
|
-
place-items: center;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
#app {
|
|
31
|
-
display: grid;
|
|
32
|
-
grid-template-columns: 1fr 1fr;
|
|
33
|
-
padding: 0 2rem;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -3,7 +3,7 @@ import { createClient } from '@feathersdev/auth'
|
|
|
3
3
|
/**
|
|
4
4
|
* This is your public application id
|
|
5
5
|
*/
|
|
6
|
-
export const appId = '
|
|
6
|
+
export const appId = 'did:key:z6MkjJRXzXWPRHtSRc4NRWXZmJTbYBaWoUKK6Ros1975w6eo'
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The Feathers auth client instance. You can use it to get a token,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createAutomerge } from '@feathersdev/automerge'
|
|
1
|
+
import { createAutomerge, DocHandle } from '@feathersdev/automerge'
|
|
2
2
|
import { auth } from './auth.js'
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -7,10 +7,21 @@ import { auth } from './auth.js'
|
|
|
7
7
|
*/
|
|
8
8
|
export const automerge = createAutomerge(auth)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Add types for any data you want to store for your application
|
|
12
|
+
*/
|
|
13
|
+
export interface AppData {
|
|
11
14
|
counter: number
|
|
12
15
|
}
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The document handle type for the application
|
|
19
|
+
*/
|
|
20
|
+
export type AppDocumentHandle = DocHandle<AppData>
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Load the document for the application
|
|
24
|
+
*/
|
|
25
|
+
export async function loadAppDocument(): Promise<AppDocumentHandle> {
|
|
15
26
|
return automerge.find<AppData>()
|
|
16
27
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-feathersdev",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.2",
|
|
5
5
|
"description": "The feathers.dev CLI",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Feathers Cloud Inc.",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"shx": "^0.4.0",
|
|
64
64
|
"typescript": "^5.8.3"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "efd8eef064f67cd3bcafe16eddb028994fcb3140"
|
|
67
67
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
|