├── .npmrc ├── src ├── lib │ ├── _keys.ts │ ├── _stores.ts │ ├── _appwrite.ts │ ├── Avatars │ │ ├── Favicon.svelte │ │ ├── Flag.svelte │ │ ├── Image.svelte │ │ ├── Browser.svelte │ │ ├── CreditCard.svelte │ │ └── QR.svelte │ ├── stores │ │ ├── _user.ts │ │ └── _documents.ts │ ├── Auth │ │ ├── OAuth2.svelte │ │ └── Email.svelte │ ├── Locale │ │ ├── Locale.svelte │ │ ├── PhoneCodes.svelte │ │ ├── Languages.svelte │ │ ├── Continents.svelte │ │ ├── Currencies.svelte │ │ └── Countries.svelte │ ├── Account │ │ ├── CreateJWT.svelte │ │ ├── Preferences.svelte │ │ ├── Create.svelte │ │ ├── Verification.svelte │ │ ├── CreateAnonymousSession.svelte │ │ ├── Update.svelte │ │ ├── MagicURL.svelte │ │ ├── RecoverPassword.svelte │ │ └── User.svelte │ ├── Init.svelte │ ├── Realtime.svelte │ ├── Storage │ │ ├── Storage.svelte │ │ ├── FileList.svelte │ │ └── File.svelte │ ├── index.ts │ ├── Database │ │ ├── Document.svelte.d.ts │ │ ├── Document.svelte │ │ └── Collection.svelte │ └── Functions │ │ └── Function.svelte ├── app.html └── routes │ └── index.svelte ├── static ├── logo.png ├── favicon.png └── logo.svg ├── .prettierrc ├── .gitignore ├── examples ├── Avatars │ ├── Flag.svelte │ ├── Browser.svelte │ ├── CreditCard.svelte │ ├── Favicon.svelte │ ├── Image.svelte │ └── QR.svelte ├── Account │ ├── CreateJWT.svelte │ ├── CreateAnonymousSession.svelte │ ├── Verification.svelte │ ├── Preferences.svelte │ ├── Update.svelte │ ├── User.svelte │ ├── Create.svelte │ ├── MagicURL.svelte │ └── RecoverPassword.svelte ├── Database │ ├── Collection.svelte │ └── Document.svelte ├── Locale │ ├── Locale.svelte │ ├── PhoneCode.svelte │ ├── Languages.svelte │ ├── Continents.svelte │ ├── Currencies.svelte │ └── Countries.svelte ├── Auth │ ├── OAuth2.svelte │ └── Email.svelte ├── Realtime.svelte ├── Storage │ ├── FileList.svelte │ ├── Storage.svelte │ └── File.svelte └── Functions │ └── Function.svelte ├── .npmignore ├── .travis.yml ├── svelte.config.js ├── .eslintrc.cjs ├── .github ├── workflows │ └── npm-publish.yml └── ISSUE_TEMPLATE │ ├── documentation.yaml │ ├── feature.yaml │ └── bug.yaml ├── changelog.hbs ├── tsconfig.json ├── package.json ├── CODE_OF_CONDUCT.md ├── LICENSE ├── CHANGELOG.md └── README.md /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /src/lib/_keys.ts: -------------------------------------------------------------------------------- 1 | export const cacheKey = {}; 2 | -------------------------------------------------------------------------------- /static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koodeau/metawrite/HEAD/static/logo.png -------------------------------------------------------------------------------- /static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koodeau/metawrite/HEAD/static/favicon.png -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": true, 3 | "singleQuote": true, 4 | "trailingComma": "none", 5 | "printWidth": 100 6 | } 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | appwrite 10 | -------------------------------------------------------------------------------- /examples/Avatars/Flag.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | flag 7 | 8 | -------------------------------------------------------------------------------- /examples/Avatars/Browser.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | Browser 7 | 8 | -------------------------------------------------------------------------------- /examples/Avatars/CreditCard.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | card 7 | 8 | -------------------------------------------------------------------------------- /examples/Account/CreateJWT.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/Database/Collection.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | You have {documents.length} documents. 7 | 8 | -------------------------------------------------------------------------------- /examples/Avatars/Favicon.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | favicon 8 | 9 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .git 2 | CVS 3 | .svn 4 | .hg 5 | .lock-wscript 6 | .wafpickle-N 7 | .*.swp 8 | .DS_Store 9 | ._* 10 | npm-debug.log 11 | .npmrc 12 | node_modules 13 | config.gypi 14 | *.orig 15 | package-lock.json 16 | src 17 | static 18 | examples -------------------------------------------------------------------------------- /examples/Account/CreateAnonymousSession.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /examples/Avatars/Image.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | someImage 10 | 11 | -------------------------------------------------------------------------------- /src/lib/_stores.ts: -------------------------------------------------------------------------------- 1 | import { writable } from 'svelte/store'; 2 | import { UserStore } from './stores/_user'; 3 | import { DocumentsStore } from './stores/_documents'; 4 | 5 | export const active = writable(false); 6 | export const currentUser: any = new UserStore(); 7 | export const documents = new DocumentsStore(); 8 | -------------------------------------------------------------------------------- /examples/Locale/Locale.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 |

Active Session

7 | 8 |

Location: {code.country}, {code.continentCode}

9 |

IP: {code.ip}

10 |
11 | -------------------------------------------------------------------------------- /examples/Avatars/QR.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | QR Code 12 | 13 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "14.18" 4 | 5 | jobs: 6 | include: 7 | - stage: npm release 8 | node_js: "14.18" 9 | script: echo "Deploying to npm ..." 10 | deploy: 11 | provider: npm 12 | email: $NPM_EMAIL 13 | api_key: $NPM_API_KEY 14 | on: 15 | tags: true 16 | -------------------------------------------------------------------------------- /examples/Account/Verification.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/Auth/OAuth2.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/Locale/PhoneCode.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 |

There are {codes.sum} phone codes:

8 | {#each codes.phones as phone} 9 |

{phone.code} - {phone.countyName}>

10 | {/each} 11 |
12 | -------------------------------------------------------------------------------- /src/lib/_appwrite.ts: -------------------------------------------------------------------------------- 1 | import { Appwrite } from 'appwrite'; 2 | 3 | export const SDK = { 4 | sdk: new Appwrite(), 5 | setConfig: (config: { endpoint: string; project: string; locale?: string; realtime?: string; }) => { 6 | SDK.sdk.setEndpoint(config.endpoint).setProject(config.project).setLocale(config.locale).setEndpointRealtime(config.realtime); 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /examples/Locale/Languages.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 |

There are {languages.sum} languages:

8 | {#each languages.languages as language} 9 |

{language.name}, {language.code}>

10 | {/each} 11 |
12 | -------------------------------------------------------------------------------- /examples/Realtime.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 |

{payload.timestamp}

7 | 8 | 9 |
10 | -------------------------------------------------------------------------------- /src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | %svelte.head% 9 | 10 | 11 |
%svelte.body%
12 | 13 | -------------------------------------------------------------------------------- /examples/Account/Preferences.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /examples/Locale/Continents.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 |

There are {continents.sum} continents:

8 | {#each continents.continents as continent} 9 |

{continent.name}, {continent.code}

10 | {/each} 11 |
12 | -------------------------------------------------------------------------------- /examples/Locale/Currencies.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 |

There are {currencies.sum} currencies:

8 | {#each currencies.currencies as currency} 9 |

{currency.symbol} - {currency.name} ({currency.code})

10 | {/each} 11 |
12 | -------------------------------------------------------------------------------- /examples/Account/Update.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/Storage/FileList.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | {#each files as file} 13 |

File: {file.name}

14 | {/each} 15 | 16 |
17 | -------------------------------------------------------------------------------- /examples/Storage/Storage.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/Database/Document.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | You have {documents.length} documents: 9 | {#each documents as document} 10 | 11 | Title: {document.title} 12 | Text: {document.text} 13 | 14 | 15 | {/each} 16 | 17 | -------------------------------------------------------------------------------- /examples/Auth/Email.svelte: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/Account/User.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Hi, {user.name}

14 |
15 | -------------------------------------------------------------------------------- /svelte.config.js: -------------------------------------------------------------------------------- 1 | import adapter from '@sveltejs/adapter-node'; 2 | import preprocess from 'svelte-preprocess'; 3 | 4 | /** @type {import('@sveltejs/kit').Config} */ 5 | /** @type {@type {import('vite').UserConfig}} */ 6 | const config = { 7 | // Consult https://github.com/sveltejs/svelte-preprocess 8 | // for more information about preprocessors 9 | preprocess: preprocess({ 10 | typescript: true 11 | }), 12 | kit: { 13 | adapter: adapter({ 14 | out: 'build', 15 | precompress: false 16 | }), 17 | package: { 18 | dir: 'package' 19 | // emitTypes: true 20 | }, 21 | } 22 | }; 23 | 24 | export default config; 25 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: '@typescript-eslint/parser', 4 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], 5 | plugins: ['svelte3', '@typescript-eslint'], 6 | ignorePatterns: ['*.cjs'], 7 | overrides: [{ files: ['*.svelte', "**/*.svelte"], processor: 'svelte3/svelte3' }], 8 | settings: { 9 | 'svelte3/typescript': () => require('typescript'), 10 | "svelte3/ignore-styles": () => true 11 | }, 12 | parserOptions: { 13 | sourceType: 'module', 14 | ecmaVersion: 2020 15 | }, 16 | env: { 17 | browser: true, 18 | amd: true, 19 | node: true, 20 | es6: true 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /src/lib/Avatars/Favicon.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 36 | -------------------------------------------------------------------------------- /examples/Functions/Function.svelte: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | {#each executions as execution} 10 |

11 | Execution ID: {execution.$id}, Function ID: {execution.functionId}, Date Created: {execution.dateCreated} 12 |

13 | {/each} 14 | 15 | 16 |
17 | -------------------------------------------------------------------------------- /examples/Account/Create.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /examples/Locale/Countries.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 |

There are {countries.sum} countries in the world:

10 | {#each countries.countries as country} 11 |

{country.name}, {country.code}

12 | {/each} 13 |
14 | 15 | 16 | 17 |

There are {countries.sum} countries in EU:

18 | {#each countries.countries as country} 19 |

{country.name}, {country.code}

20 | {/each} 21 |
22 | -------------------------------------------------------------------------------- /examples/Account/MagicURL.svelte: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/lib/Avatars/Flag.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 42 | -------------------------------------------------------------------------------- /src/lib/Avatars/Image.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 43 | -------------------------------------------------------------------------------- /src/lib/Avatars/Browser.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 42 | -------------------------------------------------------------------------------- /src/lib/Avatars/CreditCard.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 43 | -------------------------------------------------------------------------------- /.github/workflows/npm-publish.yml: -------------------------------------------------------------------------------- 1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages 3 | 4 | name: npm Package 5 | 6 | on: 7 | release: 8 | types: [created] 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v2 15 | - uses: actions/setup-node@v2 16 | with: 17 | node-version: 16 18 | - run: npm ci 19 | - run: npm test 20 | - run: npm run package 21 | 22 | publish-npm: 23 | needs: build 24 | runs-on: ubuntu-latest 25 | steps: 26 | - uses: actions/checkout@v2 27 | - uses: actions/setup-node@v2 28 | with: 29 | node-version: 16 30 | registry-url: https://registry.npmjs.org/ 31 | - run: npm ci 32 | - run: npm run release 33 | env: 34 | NODE_AUTH_TOKEN: ${{secrets.npm_token}} -------------------------------------------------------------------------------- /src/lib/stores/_user.ts: -------------------------------------------------------------------------------- 1 | import { SDK as Appwrite } from '../_appwrite'; 2 | import { writable } from 'svelte/store'; 3 | import type { Models } from 'appwrite'; 4 | 5 | export class UserStore { 6 | subscribe: any; 7 | set: (this: void, value: any) => void; 8 | update: (this: void, updater: any) => void; 9 | constructor() { 10 | const { subscribe, set, update } = writable(null); 11 | this.subscribe = subscribe; 12 | this.set = set; 13 | this.update = update; 14 | } 15 | 16 | /** 17 | * Reload the current User. 18 | * @returns {Promise>} 19 | */ 20 | async reload(): Promise> { 21 | const response = await Appwrite.sdk.account.get(); 22 | this.set(response); 23 | return response; 24 | } 25 | 26 | /** 27 | * Logout the current User. 28 | * @returns {Promise} 29 | */ 30 | async logout(): Promise { 31 | const response = await Appwrite.sdk.account.deleteSession('current'); 32 | this.set(null); 33 | return response; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /examples/Storage/File.svelte: -------------------------------------------------------------------------------- 1 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/lib/Avatars/QR.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 49 | -------------------------------------------------------------------------------- /src/lib/Auth/OAuth2.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 | 50 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation.yaml: -------------------------------------------------------------------------------- 1 | name: "📚 Documentation" 2 | description: "Report an issue related to documentation" 3 | title: "📚 Documentation: " 4 | labels: [documentation] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thanks for taking the time to make our documentation better 🙏 10 | - type: textarea 11 | id: issue-description 12 | validations: 13 | required: true 14 | attributes: 15 | label: "💭 Description" 16 | description: "A clear and concise description of what the issue is." 17 | placeholder: "Documentation should not ..." 18 | - type: checkboxes 19 | id: no-duplicate-issues 20 | attributes: 21 | label: "👀 Have you spent some time to check if this issue has been raised before?" 22 | description: "Have you Googled for a similar issue or checked our older issues for a similar bug?" 23 | options: 24 | - label: "I checked and didn't find similar issue" 25 | required: true 26 | - type: checkboxes 27 | id: read-code-of-conduct 28 | attributes: 29 | label: "🏢 Have you read the Code of Conduct?" 30 | options: 31 | - label: "I have read the [Code of Conduct](https://github.com/koodeau/metawrite/blob/main/CODE_OF_CONDUCT.md)" 32 | required: true -------------------------------------------------------------------------------- /src/lib/Locale/Locale.svelte: -------------------------------------------------------------------------------- 1 | 20 | 21 | {#await locale} 22 | 23 | {:then response} 24 | 25 | {:catch error} 26 | 27 | {/await} 28 | 29 | 64 | -------------------------------------------------------------------------------- /src/lib/Account/CreateJWT.svelte: -------------------------------------------------------------------------------- 1 | 26 | 27 | 55 | 56 | {#if $active} 57 | 58 | {/if} 59 | -------------------------------------------------------------------------------- /changelog.hbs: -------------------------------------------------------------------------------- 1 |

2 | Metawrite 3 |

4 | 5 | > Versions `x.x.n` neans some minor changes to package documentation or typings. 6 | > Versions `x.n.x` might include some minor breaking changes. 7 | > Versions `n.x.x` might include some major breaking changes. 8 | 9 | ### Changelog 10 | 11 | All notable changes to this project will be documented in this file. Dates are displayed in UTC. 12 | 13 | {{#unless options.hideCredit}} 14 | Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). 15 | {{/unless}} 16 | 17 | {{#each releases}} 18 | {{#if href}} 19 | ###{{#unless major}}#{{/unless}} [{{title}}]({{href}}) 20 | {{else}} 21 | #### {{title}} 22 | {{/if}} 23 | 24 | {{#if tag}} 25 | > {{niceDate}} 26 | {{/if}} 27 | 28 | {{#if summary}} 29 | {{summary}} 30 | {{/if}} 31 | 32 | {{#each merges}} 33 | - {{#if commit.breaking}}**Breaking change:** {{/if}}{{message}}{{#if href}} [`#{{id}}`]({{href}}){{/if}} 34 | {{/each}} 35 | {{#each fixes}} 36 | - {{#if commit.breaking}}**Breaking change:** {{/if}}{{commit.subject}}{{#each fixes}}{{#if href}} [`#{{id}}`]({{href}}){{/if}}{{/each}} 37 | {{/each}} 38 | {{#each commits}} 39 | - {{#if breaking}}**Breaking change:** {{/if}}{{subject}}{{#if href}} [`{{shorthash}}`]({{href}}){{/if}} 40 | {{/each}} 41 | 42 | {{/each}} -------------------------------------------------------------------------------- /src/lib/Locale/PhoneCodes.svelte: -------------------------------------------------------------------------------- 1 | 20 | 21 | {#await phoneCodes} 22 | 23 | {:then response} 24 | 25 | {:catch error} 26 | 27 | {/await} 28 | 29 | 65 | -------------------------------------------------------------------------------- /src/lib/Locale/Languages.svelte: -------------------------------------------------------------------------------- 1 | 20 | 21 | {#await languages} 22 | 23 | {:then response} 24 | 25 | {:catch error} 26 | 27 | {/await} 28 | 29 | 65 | -------------------------------------------------------------------------------- /src/lib/Init.svelte: -------------------------------------------------------------------------------- 1 | 25 | 26 | {#if $active} 27 | 28 | {/if} 29 | 30 | 61 | -------------------------------------------------------------------------------- /src/lib/Locale/Continents.svelte: -------------------------------------------------------------------------------- 1 | 20 | 21 | {#await continents} 22 | 23 | {:then response} 24 | 25 | {:catch error} 26 | 27 | {/await} 28 | 29 | 65 | -------------------------------------------------------------------------------- /src/lib/Locale/Currencies.svelte: -------------------------------------------------------------------------------- 1 | 20 | 21 | {#await currencies} 22 | 23 | {:then response} 24 | 25 | {:catch error} 26 | 27 | {/await} 28 | 29 | 65 | -------------------------------------------------------------------------------- /examples/Account/RecoverPassword.svelte: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature.yaml: -------------------------------------------------------------------------------- 1 | name: 🚀 Feature 2 | description: "Submit a proposal for a new feature" 3 | title: "🚀 Feature: " 4 | labels: [feature] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | Thanks for taking the time to fill out our feature request form 🙏 10 | - type: textarea 11 | id: feature-description 12 | validations: 13 | required: true 14 | attributes: 15 | label: "🔖 Feature description" 16 | description: "A clear and concise description of what the feature is." 17 | placeholder: "You should add ..." 18 | - type: textarea 19 | id: pitch 20 | validations: 21 | required: true 22 | attributes: 23 | label: "🎤 Pitch" 24 | description: "Please explain why this feature should be implemented and how it would be used. Add examples, if applicable." 25 | placeholder: "In my use-case, ..." 26 | - type: checkboxes 27 | id: no-duplicate-issues 28 | attributes: 29 | label: "👀 Have you spent some time to check if this issue has been raised before?" 30 | description: "Have you Googled for a similar issue or checked our older issues for a similar bug?" 31 | options: 32 | - label: "I checked and didn't find similar issue" 33 | required: true 34 | - type: checkboxes 35 | id: read-code-of-conduct 36 | attributes: 37 | label: "🏢 Have you read the Code of Conduct?" 38 | options: 39 | - label: "I have read the [Code of Conduct](https://github.com/koodeau/metawrite/blob/main/CODE_OF_CONDUCT.md)" 40 | required: true -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "moduleResolution": "node", 4 | "module": "esnext", 5 | "lib": ["ES2020", "ESNext", "DOM", "ESNext.Array"], 6 | "target": "es2019", 7 | "types": [ "svelte" ], 8 | // "allowSyntheticDefaultImports": true, 9 | // "declaration": true, 10 | // "emitDeclarationOnly": true, 11 | /** 12 | svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript 13 | to enforce using \`import type\` instead of \`import\` for Types. 14 | */ 15 | "importsNotUsedAsValues": "error", 16 | /** 17 | TypeScript doesn't know about import usages in the template because it only sees the 18 | script of a Svelte file. Therefore preserve all value imports. Requires TS 4.5 or higher. 19 | */ 20 | "preserveValueImports": true, 21 | "isolatedModules": true, 22 | "resolveJsonModule": true, 23 | /** 24 | To have warnings/errors of the Svelte compiler at the correct position, 25 | enable source maps by default. 26 | */ 27 | "sourceMap": true, 28 | "esModuleInterop": true, 29 | "skipLibCheck": true, 30 | "forceConsistentCasingInFileNames": true, 31 | "allowSyntheticDefaultImports": true, 32 | "baseUrl": ".", 33 | "allowJs": true, 34 | "checkJs": true, 35 | "paths": { 36 | "$lib": ["src/lib"], 37 | "$lib/*": ["src/lib/*"] 38 | } 39 | }, 40 | // "extends": "./.svelte-kit/tsconfig.json", 41 | "include": ["src/lib/*.d.ts", "src/lib/**/*.d.ts", "src/lib/**/*.js", "src/lib/*.js", "src/lib/**/*.ts", "src/lib/*.ts", "src/lib/**/*.svelte", "src/lib/*.svelte"], // "package" 42 | "exclude": ["examples/**/*.d.ts", "examples/**/*.js", "examples/**/*.ts", "examples/**/*.svelte"] 43 | } 44 | -------------------------------------------------------------------------------- /src/lib/Realtime.svelte: -------------------------------------------------------------------------------- 1 | 23 | 24 | 25 | 26 | 62 | 63 | -------------------------------------------------------------------------------- /src/lib/Locale/Countries.svelte: -------------------------------------------------------------------------------- 1 | 24 | 25 | {#await countries} 26 | 27 | {:then response} 28 | 29 | {:catch error} 30 | 31 | {/await} 32 | 33 | 83 | -------------------------------------------------------------------------------- /src/lib/Storage/Storage.svelte: -------------------------------------------------------------------------------- 1 | 35 | 36 | 37 | 38 | 71 | -------------------------------------------------------------------------------- /src/routes/index.svelte: -------------------------------------------------------------------------------- 1 | 26 | 27 | 28 |

Welcome to Metawrite SvelteKit Demo

29 |

30 | Visit Github repository to read the documentation 31 |

32 | 33 | 34 |

Create Note

35 | 36 |