create-feathersdev 0.11.4 → 0.13.1

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.
Files changed (102) hide show
  1. package/CHANGELOG.md +42 -83
  2. package/esm/actions/app.js +3 -3
  3. package/esm/actions/integrate.js +7 -5
  4. package/esm/actions/server.js +3 -3
  5. package/esm/base.js +5 -6
  6. package/esm/flows/check-login.js +4 -4
  7. package/esm/flows/with-application.js +8 -9
  8. package/esm/flows/with-organization.js +4 -4
  9. package/esm/index.js +3 -3
  10. package/package.json +13 -15
  11. package/examples/frontend/auth.ts +0 -39
  12. package/examples/frontend/react/.eslintrc.cjs +0 -18
  13. package/examples/frontend/react/README.md +0 -30
  14. package/examples/frontend/react/index.html +0 -18
  15. package/examples/frontend/react/package.json +0 -31
  16. package/examples/frontend/react/public/vite.svg +0 -1
  17. package/examples/frontend/react/src/App.css +0 -30
  18. package/examples/frontend/react/src/App.tsx +0 -33
  19. package/examples/frontend/react/src/Counter.tsx +0 -29
  20. package/examples/frontend/react/src/assets/feathers.svg +0 -24
  21. package/examples/frontend/react/src/auth.ts +0 -39
  22. package/examples/frontend/react/src/automerge.ts +0 -27
  23. package/examples/frontend/react/src/main.tsx +0 -9
  24. package/examples/frontend/react/src/vite-env.d.ts +0 -1
  25. package/examples/frontend/react/tsconfig.app.json +0 -27
  26. package/examples/frontend/react/tsconfig.json +0 -11
  27. package/examples/frontend/react/tsconfig.node.json +0 -13
  28. package/examples/frontend/react/vite.config.ts +0 -8
  29. package/examples/frontend/svelte/.vscode/extensions.json +0 -3
  30. package/examples/frontend/svelte/README.md +0 -47
  31. package/examples/frontend/svelte/index.html +0 -18
  32. package/examples/frontend/svelte/package.json +0 -25
  33. package/examples/frontend/svelte/public/vite.svg +0 -1
  34. package/examples/frontend/svelte/src/App.svelte +0 -30
  35. package/examples/frontend/svelte/src/Counter.svelte +0 -33
  36. package/examples/frontend/svelte/src/app.css +0 -30
  37. package/examples/frontend/svelte/src/assets/feathers.svg +0 -24
  38. package/examples/frontend/svelte/src/auth.ts +0 -39
  39. package/examples/frontend/svelte/src/automerge.ts +0 -27
  40. package/examples/frontend/svelte/src/main.ts +0 -9
  41. package/examples/frontend/svelte/src/vite-env.d.ts +0 -2
  42. package/examples/frontend/svelte/svelte.config.js +0 -7
  43. package/examples/frontend/svelte/tsconfig.json +0 -21
  44. package/examples/frontend/svelte/tsconfig.node.json +0 -12
  45. package/examples/frontend/svelte/vite.config.ts +0 -8
  46. package/examples/frontend/vanilla/index.html +0 -21
  47. package/examples/frontend/vanilla/package.json +0 -20
  48. package/examples/frontend/vanilla/public/feathers.svg +0 -24
  49. package/examples/frontend/vanilla/src/auth.ts +0 -39
  50. package/examples/frontend/vanilla/src/automerge.ts +0 -27
  51. package/examples/frontend/vanilla/src/main.ts +0 -35
  52. package/examples/frontend/vanilla/src/style.css +0 -30
  53. package/examples/frontend/vanilla/src/vite-env.d.ts +0 -1
  54. package/examples/frontend/vanilla/tsconfig.json +0 -23
  55. package/examples/frontend/vanilla/vite.config.ts +0 -8
  56. package/examples/frontend/vue/.vscode/extensions.json +0 -3
  57. package/examples/frontend/vue/README.md +0 -33
  58. package/examples/frontend/vue/env.d.ts +0 -1
  59. package/examples/frontend/vue/index.html +0 -18
  60. package/examples/frontend/vue/package.json +0 -29
  61. package/examples/frontend/vue/public/favicon.ico +0 -0
  62. package/examples/frontend/vue/src/App.vue +0 -34
  63. package/examples/frontend/vue/src/Counter.vue +0 -37
  64. package/examples/frontend/vue/src/assets/base.css +0 -30
  65. package/examples/frontend/vue/src/assets/feathers.svg +0 -24
  66. package/examples/frontend/vue/src/assets/main.css +0 -1
  67. package/examples/frontend/vue/src/auth.ts +0 -39
  68. package/examples/frontend/vue/src/automerge.ts +0 -27
  69. package/examples/frontend/vue/src/main.ts +0 -6
  70. package/examples/frontend/vue/tsconfig.app.json +0 -14
  71. package/examples/frontend/vue/tsconfig.json +0 -11
  72. package/examples/frontend/vue/tsconfig.node.json +0 -19
  73. package/examples/frontend/vue/vite.config.ts +0 -18
  74. package/examples/server/bun/README.md +0 -15
  75. package/examples/server/bun/bun.lockb +0 -0
  76. package/examples/server/bun/package.json +0 -17
  77. package/examples/server/bun/src/authenticate.ts +0 -17
  78. package/examples/server/bun/src/index.ts +0 -54
  79. package/examples/server/bun/tsconfig.json +0 -27
  80. package/examples/server/cloudflare/.editorconfig +0 -12
  81. package/examples/server/cloudflare/.prettierrc +0 -6
  82. package/examples/server/cloudflare/package.json +0 -22
  83. package/examples/server/cloudflare/src/authenticate.ts +0 -17
  84. package/examples/server/cloudflare/src/index.ts +0 -50
  85. package/examples/server/cloudflare/test/index.spec.ts +0 -25
  86. package/examples/server/cloudflare/test/tsconfig.json +0 -8
  87. package/examples/server/cloudflare/tsconfig.json +0 -105
  88. package/examples/server/cloudflare/vitest.config.mts +0 -11
  89. package/examples/server/cloudflare/worker-configuration.d.ts +0 -4
  90. package/examples/server/cloudflare/wrangler.toml +0 -108
  91. package/examples/server/deno/deno.lock +0 -79
  92. package/examples/server/deno/package.json +0 -13
  93. package/examples/server/deno/src/authenticate.ts +0 -17
  94. package/examples/server/deno/src/server.ts +0 -51
  95. package/examples/server/express/package.json +0 -24
  96. package/examples/server/express/src/app.ts +0 -26
  97. package/examples/server/express/src/authenticate.ts +0 -51
  98. package/examples/server/express/tsconfig.json +0 -108
  99. package/examples/server/nodejs/package.json +0 -20
  100. package/examples/server/nodejs/src/authenticate.ts +0 -28
  101. package/examples/server/nodejs/src/server.ts +0 -38
  102. package/examples/server/nodejs/tsconfig.json +0 -108
@@ -1,31 +0,0 @@
1
- {
2
- "name": "feathersdev-react",
3
- "type": "module",
4
- "version": "0.0.0",
5
- "private": true,
6
- "scripts": {
7
- "dev": "vite --port 4040",
8
- "build": "tsc -b && vite build",
9
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10
- "preview": "vite preview"
11
- },
12
- "dependencies": {
13
- "@feathersdev/auth": "^0.11.2",
14
- "@feathersdev/automerge": "^0.11.2",
15
- "react": "^18.3.1",
16
- "react-dom": "^18.3.1"
17
- },
18
- "devDependencies": {
19
- "vite-plugin-wasm": "^3.4.1",
20
- "@types/react": "^18.3.12",
21
- "@types/react-dom": "^18.3.1",
22
- "@typescript-eslint/eslint-plugin": "^8.14.0",
23
- "@typescript-eslint/parser": "^8.14.0",
24
- "@vitejs/plugin-react": "^4.3.3",
25
- "eslint": "^9.14.0",
26
- "eslint-plugin-react-hooks": "^5.0.0",
27
- "eslint-plugin-react-refresh": "^0.4.14",
28
- "typescript": "^5.6.3",
29
- "vite": "^5.4.11"
30
- }
31
- }
@@ -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="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -1,30 +0,0 @@
1
- :root {
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;
30
- }
@@ -1,33 +0,0 @@
1
- import { useEffect, useState } from 'react'
2
-
3
- import './App.css'
4
- import { auth } from './auth'
5
- import { loadAppDocument, AppDocumentHandle } from './automerge'
6
- import { FeathersAuthUser } from '@feathersdev/auth'
7
- import Counter from './Counter'
8
- import feathersLogo from './assets/feathers.svg'
9
-
10
- function App() {
11
- const [handle, setHandle] = useState<AppDocumentHandle>()
12
- const [user, setUser] = useState<FeathersAuthUser | null>(null)
13
-
14
- useEffect(() => {
15
- // Get the application document
16
- loadAppDocument().then(async handle => {
17
- setHandle(handle)
18
- // Once the app document is available we also know
19
- // we are logged in and can set the user
20
- setUser(await auth.getUser())
21
- })
22
- }, [])
23
-
24
- return (<div className="w-96 mx-auto flex flex-col gap-4 text-center pt-10">
25
- <img src={feathersLogo} alt="Feathers Logo" />
26
- {handle ? <>
27
- <h2 className="text-2xl">Hello <strong>{user?.email}</strong>!</h2>
28
- <Counter handle={handle} />
29
- </> : <div>Loading...</div>}
30
- </div>)
31
- }
32
-
33
- export default App
@@ -1,29 +0,0 @@
1
- import { useEffect, useState } from "react";
2
- import { AppDocumentHandle } from "./automerge";
3
-
4
- export default function Counter({ handle }: { handle: AppDocumentHandle }) {
5
- const [counter, setCounter] = useState(0)
6
-
7
- useEffect(() => {
8
- handle.on("change", ({ doc }) => {
9
- setCounter(doc.counter || 0)
10
- })
11
- }, [handle])
12
-
13
- const incrementCounter = () => {
14
- handle.change((doc) => {
15
- doc.counter = (doc.counter || 0) + 1
16
- })
17
- }
18
-
19
- return <div className="card bg-base-300 mx-auto rounded-4xl">
20
- <div className="card-body">
21
- <h2 className="text-2xl">Community Counter</h2>
22
- <p className="text-sm">Number of times clicked by everybody</p>
23
- <strong className="text-3xl pt-2 pb-3">{counter}</strong>
24
- <button className="btn btn-primary" onClick={incrementCounter}>
25
- Increment
26
- </button>
27
- </div>
28
- </div>
29
- }
@@ -1,24 +0,0 @@
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,39 +0,0 @@
1
- import { createClient } from '@feathersdev/auth'
2
-
3
- /**
4
- * This is your public application id
5
- */
6
- export const appId = '<your-app-id>'
7
-
8
- /**
9
- * The Feathers auth client instance. You can use it to get a token,
10
- * retrieve the current user and to log in and out.
11
- */
12
- export const auth = createClient({
13
- appId,
14
- onLoginRequired: async (error) => {
15
- // Redirect to login page if a login is required
16
- // You can also do other things here like show a modal before redirecting
17
- window.location.href = await auth.getLoginUrl(error)
18
- },
19
- })
20
-
21
- /**
22
- * Make an authenticated request to a server using the standard fetch API.
23
- * Will redirect to the login page instead if the user needs to log in.
24
- *
25
- * @param url The URL for the request
26
- * @param options Additional request options.
27
- * @returns The fetch response
28
- */
29
- export async function authFetch(url: string, options?: RequestInit) {
30
- const headers = new Headers(options?.headers)
31
-
32
- // Set the authorization header with the Feathers Auth token
33
- headers.set('Authorization', await auth.getHeader())
34
-
35
- return fetch(url, {
36
- ...options,
37
- headers,
38
- })
39
- }
@@ -1,27 +0,0 @@
1
- import { createAutomerge, DocHandle } from '@feathersdev/automerge'
2
- import { auth } from './auth.js'
3
-
4
- /**
5
- * The Feathers Automerge client. Use it to retrieve the document
6
- * for your application with `automerge.find()`.
7
- */
8
- export const automerge = createAutomerge(auth)
9
-
10
- /**
11
- * Add types for any data you want to store for your application
12
- */
13
- export interface AppData {
14
- counter: number
15
- }
16
-
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> {
26
- return automerge.find<AppData>()
27
- }
@@ -1,9 +0,0 @@
1
- import React from 'react'
2
- import ReactDOM from 'react-dom/client'
3
- import App from './App.tsx'
4
-
5
- ReactDOM.createRoot(document.getElementById('root')!).render(
6
- <React.StrictMode>
7
- <App />
8
- </React.StrictMode>,
9
- )
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />
@@ -1,27 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5
- "target": "ES2020",
6
- "jsx": "react-jsx",
7
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
8
- "moduleDetection": "force",
9
- "useDefineForClassFields": true,
10
- "module": "ESNext",
11
-
12
- /* Bundler mode */
13
- "moduleResolution": "bundler",
14
- "resolveJsonModule": true,
15
- "allowImportingTsExtensions": true,
16
-
17
- /* Linting */
18
- "strict": true,
19
- "noFallthroughCasesInSwitch": true,
20
- "noUnusedLocals": true,
21
- "noUnusedParameters": true,
22
- "noEmit": true,
23
- "isolatedModules": true,
24
- "skipLibCheck": true
25
- },
26
- "include": ["src"]
27
- }
@@ -1,11 +0,0 @@
1
- {
2
- "references": [
3
- {
4
- "path": "./tsconfig.app.json"
5
- },
6
- {
7
- "path": "./tsconfig.node.json"
8
- }
9
- ],
10
- "files": []
11
- }
@@ -1,13 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
5
- "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "strict": true,
8
- "noEmit": true,
9
- "allowSyntheticDefaultImports": true,
10
- "skipLibCheck": true
11
- },
12
- "include": ["vite.config.ts"]
13
- }
@@ -1,8 +0,0 @@
1
- import react from '@vitejs/plugin-react'
2
- import { defineConfig } from 'vite'
3
- import wasm from 'vite-plugin-wasm'
4
-
5
- // https://vitejs.dev/config/
6
- export default defineConfig({
7
- plugins: [wasm(), react()],
8
- })
@@ -1,3 +0,0 @@
1
- {
2
- "recommendations": ["svelte.svelte-vscode"]
3
- }
@@ -1,47 +0,0 @@
1
- # Svelte + TS + Vite
2
-
3
- This template should help get you started developing with Svelte and TypeScript in Vite.
4
-
5
- ## Recommended IDE Setup
6
-
7
- [VS Code](https://code.visualstudio.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode).
8
-
9
- ## Need an official Svelte framework?
10
-
11
- Check out [SvelteKit](https://github.com/sveltejs/kit#readme), which is also powered by Vite. Deploy anywhere with its serverless-first approach and adapt to various platforms, with out of the box support for TypeScript, SCSS, and Less, and easily-added support for mdsvex, GraphQL, PostCSS, Tailwind CSS, and more.
12
-
13
- ## Technical considerations
14
-
15
- **Why use this over SvelteKit?**
16
-
17
- - It brings its own routing solution which might not be preferable for some users.
18
- - It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.
19
-
20
- This template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.
21
-
22
- Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.
23
-
24
- **Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**
25
-
26
- Setting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information.
27
-
28
- **Why include `.vscode/extensions.json`?**
29
-
30
- Other templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.
31
-
32
- **Why enable `allowJs` in the TS template?**
33
-
34
- While `allowJs: false` would indeed prevent the use of `.js` files in the project, it does not prevent the use of JavaScript syntax in `.svelte` files. In addition, it would force `checkJs: false`, bringing the worst of both worlds: not being able to guarantee the entire codebase is TypeScript, and also having worse typechecking for the existing JavaScript. In addition, there are valid use cases in which a mixed codebase may be relevant.
35
-
36
- **Why is HMR not preserving my local component state?**
37
-
38
- HMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr).
39
-
40
- If you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.
41
-
42
- ```ts
43
- // store.ts
44
- // An extremely simple external store
45
- import { writable } from 'svelte/store'
46
- export default writable(0)
47
- ```
@@ -1,18 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8" />
6
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
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 Svelte 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,25 +0,0 @@
1
- {
2
- "name": "feathersdev-svelte",
3
- "type": "module",
4
- "version": "0.0.0",
5
- "private": true,
6
- "scripts": {
7
- "dev": "vite --port 4040",
8
- "build": "vite build",
9
- "preview": "vite preview",
10
- "check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json"
11
- },
12
- "dependencies": {
13
- "@feathersdev/auth": "^0.11.0",
14
- "@feathersdev/automerge": "^0.11.0"
15
- },
16
- "devDependencies": {
17
- "@sveltejs/vite-plugin-svelte": "^4.0.0",
18
- "@tsconfig/svelte": "^5.0.4",
19
- "svelte": "^5.0.0",
20
- "svelte-check": "^4.0.7",
21
- "tslib": "^2.8.1",
22
- "typescript": "^5.6.3",
23
- "vite": "^5.4.11"
24
- }
25
- }
@@ -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="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -1,30 +0,0 @@
1
- <script lang="ts">
2
- import type { FeathersAuthUser } from '@feathersdev/auth';
3
- import { loadAppDocument, type AppDocumentHandle } from './automerge.js';
4
- import Counter from './Counter.svelte';
5
- import { auth } from './auth';
6
- import feathersLogo from './assets/feathers.svg';
7
-
8
- let handle: AppDocumentHandle;
9
- let user: FeathersAuthUser | null = null;
10
-
11
- async function init() {
12
- // Get a handle to our app data document
13
- handle = await loadAppDocument();
14
- // Once the handle is available we are
15
- // logged in and can get the current user
16
- user = await auth.getUser();
17
- }
18
-
19
- init();
20
- </script>
21
-
22
- <main class="w-96 mx-auto flex flex-col gap-4 text-center pt-10">
23
- <img src={feathersLogo} alt="feathers.dev Logo" />
24
- {#if handle}
25
- <h2 class="text-2xl">Hello <strong>{user?.email}</strong></h2>
26
- <Counter {handle} />
27
- {:else}
28
- <p>Loading...</p>
29
- {/if}
30
- </main>
@@ -1,33 +0,0 @@
1
- <script lang="ts">
2
- import type { AppDocumentHandle } from './automerge.js';
3
-
4
- type CounterProps = {
5
- handle: AppDocumentHandle;
6
- };
7
- let { handle }: CounterProps = $props();
8
-
9
- let counter = $state(0);
10
-
11
- $effect(() => {
12
- handle.on('change', ({ doc }) => {
13
- counter = doc.counter || 0;
14
- });
15
- });
16
-
17
- function incrementCounter() {
18
- handle.change((doc) => {
19
- doc.counter = (doc.counter || 0) + 1;
20
- });
21
- }
22
- </script>
23
-
24
- <div class="card bg-base-300 mx-auto rounded-4xl">
25
- <div class="card-body">
26
- <h2 class="text-2xl">Community Counter</h2>
27
- <p class="text-sm">Number of times clicked by everybody</p>
28
- <strong class="text-3xl pt-2 pb-3">{counter}</strong>
29
- <button class="btn btn-primary" onclick={incrementCounter}>
30
- Increment
31
- </button>
32
- </div>
33
- </div>
@@ -1,30 +0,0 @@
1
- :root {
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;
30
- }
@@ -1,24 +0,0 @@
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,39 +0,0 @@
1
- import { createClient } from '@feathersdev/auth'
2
-
3
- /**
4
- * This is your public application id
5
- */
6
- export const appId = '<your-app-id>'
7
-
8
- /**
9
- * The Feathers auth client instance. You can use it to get a token,
10
- * retrieve the current user and to log in and out.
11
- */
12
- export const auth = createClient({
13
- appId,
14
- onLoginRequired: async (error) => {
15
- // Redirect to login page if a login is required
16
- // You can also do other things here like show a modal before redirecting
17
- window.location.href = await auth.getLoginUrl(error)
18
- },
19
- })
20
-
21
- /**
22
- * Make an authenticated request to a server using the standard fetch API.
23
- * Will redirect to the login page instead if the user needs to log in.
24
- *
25
- * @param url The URL for the request
26
- * @param options Additional request options.
27
- * @returns The fetch response
28
- */
29
- export async function authFetch(url: string, options?: RequestInit) {
30
- const headers = new Headers(options?.headers)
31
-
32
- // Set the authorization header with the Feathers Auth token
33
- headers.set('Authorization', await auth.getHeader())
34
-
35
- return fetch(url, {
36
- ...options,
37
- headers,
38
- })
39
- }
@@ -1,27 +0,0 @@
1
- import { createAutomerge, DocHandle } from '@feathersdev/automerge'
2
- import { auth } from './auth.js'
3
-
4
- /**
5
- * The Feathers Automerge client. Use it to retrieve the document
6
- * for your application with `automerge.find()`.
7
- */
8
- export const automerge = createAutomerge(auth)
9
-
10
- /**
11
- * Add types for any data you want to store for your application
12
- */
13
- export interface AppData {
14
- counter: number
15
- }
16
-
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> {
26
- return automerge.find<AppData>()
27
- }
@@ -1,9 +0,0 @@
1
- import { mount } from 'svelte'
2
- import App from './App.svelte'
3
- import './app.css'
4
-
5
- const app = mount(App, {
6
- target: document.getElementById('app')!,
7
- })
8
-
9
- export default app
@@ -1,2 +0,0 @@
1
- /// <reference types="svelte" />
2
- /// <reference types="vite/client" />
@@ -1,7 +0,0 @@
1
- import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'
2
-
3
- export default {
4
- // Consult https://svelte.dev/docs#compile-time-svelte-preprocess
5
- // for more information about preprocessors
6
- preprocess: vitePreprocess(),
7
- }