create-instant-app 0.22.107 → 0.22.108-experimental.drewh-use-clone.21267978145.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.
- package/dist/index.js +12 -11
- package/package.json +6 -3
- package/template/base/expo/README.md +0 -15
- package/template/base/expo/_env +0 -2
- package/template/base/expo/_gitignore +0 -41
- package/template/base/expo/app/+not-found.tsx +0 -16
- package/template/base/expo/app/_layout.tsx +0 -37
- package/template/base/expo/app/index.tsx +0 -64
- package/template/base/expo/app.json +0 -42
- package/template/base/expo/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/template/base/expo/assets/images/adaptive-icon.png +0 -0
- package/template/base/expo/assets/images/favicon.png +0 -0
- package/template/base/expo/assets/images/icon.png +0 -0
- package/template/base/expo/assets/images/partial-react-logo.png +0 -0
- package/template/base/expo/assets/images/react-logo.png +0 -0
- package/template/base/expo/assets/images/react-logo@2x.png +0 -0
- package/template/base/expo/assets/images/react-logo@3x.png +0 -0
- package/template/base/expo/assets/images/splash-icon.png +0 -0
- package/template/base/expo/babel.config.js +0 -12
- package/template/base/expo/constants/Colors.ts +0 -26
- package/template/base/expo/eslint.config.js +0 -10
- package/template/base/expo/expo-env.d.ts +0 -3
- package/template/base/expo/global.css +0 -3
- package/template/base/expo/hooks/useColorScheme.ts +0 -1
- package/template/base/expo/hooks/useColorScheme.web.ts +0 -21
- package/template/base/expo/hooks/useThemeColor.ts +0 -21
- package/template/base/expo/instant.perms.ts +0 -24
- package/template/base/expo/instant.schema.ts +0 -44
- package/template/base/expo/lib/db.ts +0 -7
- package/template/base/expo/metro.config.js +0 -6
- package/template/base/expo/nativewind-env.d.ts +0 -1
- package/template/base/expo/package.json +0 -56
- package/template/base/expo/scripts/reset-project.js +0 -112
- package/template/base/expo/tailwind.config.js +0 -9
- package/template/base/expo/tsconfig.json +0 -18
- package/template/base/next-js-app-dir/README.md +0 -15
- package/template/base/next-js-app-dir/_env +0 -2
- package/template/base/next-js-app-dir/_gitignore +0 -41
- package/template/base/next-js-app-dir/next-env.d.ts +0 -5
- package/template/base/next-js-app-dir/next.config.ts +0 -7
- package/template/base/next-js-app-dir/package.json +0 -26
- package/template/base/next-js-app-dir/postcss.config.mjs +0 -5
- package/template/base/next-js-app-dir/public/file.svg +0 -1
- package/template/base/next-js-app-dir/public/globe.svg +0 -1
- package/template/base/next-js-app-dir/public/next.svg +0 -1
- package/template/base/next-js-app-dir/public/vercel.svg +0 -1
- package/template/base/next-js-app-dir/public/window.svg +0 -1
- package/template/base/next-js-app-dir/src/app/favicon.ico +0 -0
- package/template/base/next-js-app-dir/src/app/globals.css +0 -26
- package/template/base/next-js-app-dir/src/app/layout.tsx +0 -34
- package/template/base/next-js-app-dir/src/app/page.tsx +0 -169
- package/template/base/next-js-app-dir/src/instant.perms.ts +0 -24
- package/template/base/next-js-app-dir/src/instant.schema.ts +0 -50
- package/template/base/next-js-app-dir/src/lib/db.ts +0 -8
- package/template/base/next-js-app-dir/tsconfig.json +0 -27
- package/template/base/vite-vanilla/README.md +0 -15
- package/template/base/vite-vanilla/_env +0 -2
- package/template/base/vite-vanilla/_gitignore +0 -25
- package/template/base/vite-vanilla/index.html +0 -13
- package/template/base/vite-vanilla/package.json +0 -19
- package/template/base/vite-vanilla/public/vite.svg +0 -1
- package/template/base/vite-vanilla/src/instant.perms.ts +0 -24
- package/template/base/vite-vanilla/src/instant.schema.ts +0 -50
- package/template/base/vite-vanilla/src/lib/db.ts +0 -11
- package/template/base/vite-vanilla/src/main.ts +0 -242
- package/template/base/vite-vanilla/src/style.css +0 -96
- package/template/base/vite-vanilla/src/typescript.svg +0 -1
- package/template/base/vite-vanilla/src/vite-env.d.ts +0 -1
- package/template/base/vite-vanilla/tsconfig.json +0 -24
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Welcome to your InstantDB Vanilla JS app 👋
|
|
2
|
-
|
|
3
|
-
This is a Vite project scaffolded with create-instant-app.
|
|
4
|
-
|
|
5
|
-
To run the development server:
|
|
6
|
-
`npm run dev`
|
|
7
|
-
|
|
8
|
-
To push schema changes:
|
|
9
|
-
`npx instant-cli push`
|
|
10
|
-
|
|
11
|
-
To pull schema changes:
|
|
12
|
-
`npx instant-cli pull`
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Got any feedback or questions? Join our [Discord](https://discord.gg/hgVf9R6SBm)
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Logs
|
|
2
|
-
logs
|
|
3
|
-
*.log
|
|
4
|
-
npm-debug.log*
|
|
5
|
-
yarn-debug.log*
|
|
6
|
-
yarn-error.log*
|
|
7
|
-
pnpm-debug.log*
|
|
8
|
-
lerna-debug.log*
|
|
9
|
-
|
|
10
|
-
node_modules
|
|
11
|
-
dist
|
|
12
|
-
dist-ssr
|
|
13
|
-
*.local
|
|
14
|
-
|
|
15
|
-
# Editor directories and files
|
|
16
|
-
.vscode/*
|
|
17
|
-
!.vscode/extensions.json
|
|
18
|
-
.idea
|
|
19
|
-
.DS_Store
|
|
20
|
-
*.suo
|
|
21
|
-
*.ntvs*
|
|
22
|
-
*.njsproj
|
|
23
|
-
*.sln
|
|
24
|
-
*.sw?
|
|
25
|
-
.env
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>Create InstantDB Starter</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="app"></div>
|
|
11
|
-
<script type="module" src="/src/main.ts"></script>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vanilla-template",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
8
|
-
"build": "tsc && vite build",
|
|
9
|
-
"preview": "vite preview"
|
|
10
|
-
},
|
|
11
|
-
"devDependencies": {
|
|
12
|
-
"typescript": "~5.9.3",
|
|
13
|
-
"vite": "^7.1.2"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"@instantdb/core": "latest",
|
|
17
|
-
"@instantdb/admin": "latest"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -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,24 +0,0 @@
|
|
|
1
|
-
// Docs: https://www.instantdb.com/docs/permissions
|
|
2
|
-
|
|
3
|
-
import type { InstantRules } from "@instantdb/core";
|
|
4
|
-
|
|
5
|
-
const rules = {
|
|
6
|
-
/**
|
|
7
|
-
* Welcome to Instant's permission system!
|
|
8
|
-
* Right now your rules are empty. To start filling them in, check out the docs:
|
|
9
|
-
* https://www.instantdb.com/docs/permissions
|
|
10
|
-
*
|
|
11
|
-
* Here's an example to give you a feel:
|
|
12
|
-
* posts: {
|
|
13
|
-
* allow: {
|
|
14
|
-
* view: "true",
|
|
15
|
-
* create: "isOwner",
|
|
16
|
-
* update: "isOwner",
|
|
17
|
-
* delete: "isOwner",
|
|
18
|
-
* },
|
|
19
|
-
* bind: ["isOwner", "auth.id != null && auth.id == data.ownerId"],
|
|
20
|
-
* },
|
|
21
|
-
*/
|
|
22
|
-
} satisfies InstantRules;
|
|
23
|
-
|
|
24
|
-
export default rules;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
// Docs: https://www.instantdb.com/docs/modeling-data
|
|
2
|
-
|
|
3
|
-
import { i } from "@instantdb/core";
|
|
4
|
-
|
|
5
|
-
const _schema = i.schema({
|
|
6
|
-
entities: {
|
|
7
|
-
$files: i.entity({
|
|
8
|
-
path: i.string().unique().indexed(),
|
|
9
|
-
url: i.string(),
|
|
10
|
-
}),
|
|
11
|
-
$users: i.entity({
|
|
12
|
-
email: i.string().unique().indexed().optional(),
|
|
13
|
-
imageURL: i.string().optional(),
|
|
14
|
-
type: i.string().optional(),
|
|
15
|
-
}),
|
|
16
|
-
todos: i.entity({
|
|
17
|
-
text: i.string(),
|
|
18
|
-
done: i.boolean(),
|
|
19
|
-
createdAt: i.number(),
|
|
20
|
-
}),
|
|
21
|
-
},
|
|
22
|
-
links: {
|
|
23
|
-
$usersLinkedPrimaryUser: {
|
|
24
|
-
forward: {
|
|
25
|
-
on: "$users",
|
|
26
|
-
has: "one",
|
|
27
|
-
label: "linkedPrimaryUser",
|
|
28
|
-
onDelete: "cascade",
|
|
29
|
-
},
|
|
30
|
-
reverse: {
|
|
31
|
-
on: "$users",
|
|
32
|
-
has: "many",
|
|
33
|
-
label: "linkedGuestUsers",
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
rooms: {
|
|
38
|
-
todos: {
|
|
39
|
-
presence: i.entity({}),
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
// This helps TypeScript display nicer intellisense
|
|
45
|
-
type _AppSchema = typeof _schema;
|
|
46
|
-
interface AppSchema extends _AppSchema {}
|
|
47
|
-
const schema: AppSchema = _schema;
|
|
48
|
-
|
|
49
|
-
export type { AppSchema };
|
|
50
|
-
export default schema;
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
import { id, type InstaQLEntity } from "@instantdb/core";
|
|
2
|
-
import type { AppSchema } from "./instant.schema";
|
|
3
|
-
import { db } from "./lib/db";
|
|
4
|
-
|
|
5
|
-
type Todo = InstaQLEntity<AppSchema, "todos", {}, undefined, true>;
|
|
6
|
-
|
|
7
|
-
// Subscribe to data
|
|
8
|
-
// ---------
|
|
9
|
-
db.subscribeQuery({ todos: {} }, (resp) => {
|
|
10
|
-
if (resp.error) {
|
|
11
|
-
renderError(resp.error.message); // Pro-tip: Check you have the right appId!
|
|
12
|
-
return;
|
|
13
|
-
}
|
|
14
|
-
if (resp.data) {
|
|
15
|
-
render(resp.data);
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
// Write Data
|
|
20
|
-
// ---------
|
|
21
|
-
function addTodo(text: string) {
|
|
22
|
-
db.transact(
|
|
23
|
-
db.tx.todos[id()].update({
|
|
24
|
-
text,
|
|
25
|
-
done: false,
|
|
26
|
-
createdAt: Date.now(),
|
|
27
|
-
}),
|
|
28
|
-
);
|
|
29
|
-
focusInput();
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function deleteTodoItem(todo: Todo) {
|
|
33
|
-
db.transact(db.tx.todos[todo.id].delete());
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function toggleDone(todo: Todo) {
|
|
37
|
-
db.transact(db.tx.todos[todo.id].update({ done: !todo.done }));
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function deleteCompleted(todos: Todo[]) {
|
|
41
|
-
const completed = todos.filter((todo) => todo.done);
|
|
42
|
-
const txs = completed.map((todo) => db.tx.todos[todo.id].delete());
|
|
43
|
-
db.transact(txs);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function toggleAllTodos(todos: Todo[]) {
|
|
47
|
-
const newVal = !todos.every((todo) => todo.done);
|
|
48
|
-
db.transact(
|
|
49
|
-
todos.map((todo) => db.tx.todos[todo.id].update({ done: newVal })),
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Styles
|
|
54
|
-
// ---------
|
|
55
|
-
const styles: Record<string, string> = {
|
|
56
|
-
container: `
|
|
57
|
-
box-sizing: border-box;
|
|
58
|
-
background-color: #fafafa;
|
|
59
|
-
font-family: code, monospace;
|
|
60
|
-
height: 100vh;
|
|
61
|
-
display: flex;
|
|
62
|
-
justify-content: center;
|
|
63
|
-
align-items: center;
|
|
64
|
-
flex-direction: column;
|
|
65
|
-
`,
|
|
66
|
-
header: `
|
|
67
|
-
letter-spacing: 2px;
|
|
68
|
-
font-size: 50px;
|
|
69
|
-
color: lightgray;
|
|
70
|
-
margin-bottom: 10px;
|
|
71
|
-
`,
|
|
72
|
-
form: `
|
|
73
|
-
box-sizing: inherit;
|
|
74
|
-
display: flex;
|
|
75
|
-
border: 1px solid lightgray;
|
|
76
|
-
border-bottom-width: 0px;
|
|
77
|
-
width: 350px;
|
|
78
|
-
`,
|
|
79
|
-
toggleAll: `
|
|
80
|
-
font-size: 30px;
|
|
81
|
-
cursor: pointer;
|
|
82
|
-
margin-left: 11px;
|
|
83
|
-
margin-top: -6px;
|
|
84
|
-
width: 15px;
|
|
85
|
-
margin-right: 12px;
|
|
86
|
-
`,
|
|
87
|
-
input: `
|
|
88
|
-
background-color: transparent;
|
|
89
|
-
font-family: code, monospace;
|
|
90
|
-
width: 287px;
|
|
91
|
-
padding: 10px;
|
|
92
|
-
font-style: italic;
|
|
93
|
-
`,
|
|
94
|
-
todoList: `
|
|
95
|
-
box-sizing: inherit;
|
|
96
|
-
width: 350px;
|
|
97
|
-
`,
|
|
98
|
-
checkbox: `
|
|
99
|
-
font-size: 30px;
|
|
100
|
-
margin-left: 5px;
|
|
101
|
-
margin-right: 20px;
|
|
102
|
-
cursor: pointer;
|
|
103
|
-
`,
|
|
104
|
-
todo: `
|
|
105
|
-
display: flex;
|
|
106
|
-
align-items: center;
|
|
107
|
-
padding: 10px;
|
|
108
|
-
border: 1px solid lightgray;
|
|
109
|
-
border-bottom-width: 0px;
|
|
110
|
-
`,
|
|
111
|
-
todoText: `
|
|
112
|
-
flex-grow: 1;
|
|
113
|
-
overflow: hidden;
|
|
114
|
-
`,
|
|
115
|
-
delete: `
|
|
116
|
-
width: 25px;
|
|
117
|
-
cursor: pointer;
|
|
118
|
-
color: lightgray;
|
|
119
|
-
`,
|
|
120
|
-
actionBar: `
|
|
121
|
-
display: flex;
|
|
122
|
-
justify-content: space-between;
|
|
123
|
-
width: 328px;
|
|
124
|
-
padding: 10px;
|
|
125
|
-
border: 1px solid lightgray;
|
|
126
|
-
font-size: 10px;
|
|
127
|
-
`,
|
|
128
|
-
footer: `
|
|
129
|
-
margin-top: 20px;
|
|
130
|
-
font-size: 10px;
|
|
131
|
-
`,
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
// Render
|
|
135
|
-
// ---------
|
|
136
|
-
const app = document.getElementById("app")!;
|
|
137
|
-
app.style.cssText = styles.container;
|
|
138
|
-
|
|
139
|
-
function render(data: { todos: Todo[] }) {
|
|
140
|
-
app.innerHTML = "";
|
|
141
|
-
|
|
142
|
-
const { todos } = data;
|
|
143
|
-
|
|
144
|
-
const containerHTML = `
|
|
145
|
-
<div style="${styles.container}">
|
|
146
|
-
<div style="${styles.header}">todos</div>
|
|
147
|
-
${TodoForm()}
|
|
148
|
-
${TodoList(todos)}
|
|
149
|
-
${ActionBar(todos)}
|
|
150
|
-
<div style="${
|
|
151
|
-
styles.footer
|
|
152
|
-
}">Open another tab to see todos update in realtime!</div>
|
|
153
|
-
</div>
|
|
154
|
-
`;
|
|
155
|
-
|
|
156
|
-
app.innerHTML = containerHTML;
|
|
157
|
-
|
|
158
|
-
// Attach event listeners
|
|
159
|
-
document
|
|
160
|
-
.querySelector(".toggle-all")
|
|
161
|
-
?.addEventListener("click", () => toggleAllTodos(todos));
|
|
162
|
-
document.querySelector("form")?.addEventListener("submit", submitForm);
|
|
163
|
-
todos.forEach((todo) => {
|
|
164
|
-
document
|
|
165
|
-
.getElementById(`toggle-${todo.id}`)
|
|
166
|
-
?.addEventListener("change", () => toggleDone(todo));
|
|
167
|
-
document
|
|
168
|
-
.getElementById(`delete-${todo.id}`)
|
|
169
|
-
?.addEventListener("click", () => deleteTodoItem(todo));
|
|
170
|
-
});
|
|
171
|
-
document
|
|
172
|
-
.querySelector(".delete-completed")
|
|
173
|
-
?.addEventListener("click", () => deleteCompleted(todos));
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
function renderError(errorMessage: string) {
|
|
177
|
-
app.innerHTML = `
|
|
178
|
-
<div>${errorMessage}</div>
|
|
179
|
-
`;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function TodoForm() {
|
|
183
|
-
return `
|
|
184
|
-
<div style="${styles.form}">
|
|
185
|
-
<div class="toggle-all" style="${styles.toggleAll}">⌄</div>
|
|
186
|
-
<form>
|
|
187
|
-
<input style="${styles.input}" placeholder="What needs to be done?" type="text" autofocus>
|
|
188
|
-
</form>
|
|
189
|
-
</div>
|
|
190
|
-
`;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
function TodoList(todos: Todo[]) {
|
|
194
|
-
return `
|
|
195
|
-
<div style="${styles.todoList}">
|
|
196
|
-
${todos
|
|
197
|
-
.map(
|
|
198
|
-
(todo) => `
|
|
199
|
-
<div style="${styles.todo}">
|
|
200
|
-
<input id="toggle-${todo.id}" type="checkbox" style="${
|
|
201
|
-
styles.checkbox
|
|
202
|
-
}" ${todo.done ? "checked" : ""}>
|
|
203
|
-
<div style="${styles.todoText}">
|
|
204
|
-
${
|
|
205
|
-
todo.done
|
|
206
|
-
? `<span style="text-decoration: line-through;">${todo.text}</span>`
|
|
207
|
-
: `<span>${todo.text}</span>`
|
|
208
|
-
}
|
|
209
|
-
</div>
|
|
210
|
-
<span id="delete-${todo.id}" style="${styles.delete}">𝘟</span>
|
|
211
|
-
</div>
|
|
212
|
-
`,
|
|
213
|
-
)
|
|
214
|
-
.join("")}
|
|
215
|
-
</div>
|
|
216
|
-
`;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
function ActionBar(todos: Todo[]) {
|
|
220
|
-
return `
|
|
221
|
-
<div style="${styles.actionBar}">
|
|
222
|
-
<div>Remaining todos: ${todos.filter((todo) => !todo.done).length}</div>
|
|
223
|
-
<div class="delete-completed" style="cursor: pointer;">Delete Completed</div>
|
|
224
|
-
</div>
|
|
225
|
-
`;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
function focusInput() {
|
|
229
|
-
const input = document.querySelector<HTMLInputElement>('input[type="text"]');
|
|
230
|
-
if (input) {
|
|
231
|
-
input.focus();
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
function submitForm(event: Event) {
|
|
236
|
-
event.preventDefault();
|
|
237
|
-
const input = (event.target as HTMLFormElement).querySelector("input");
|
|
238
|
-
if (input && input.value.trim()) {
|
|
239
|
-
addTodo(input.value);
|
|
240
|
-
input.value = "";
|
|
241
|
-
}
|
|
242
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
|
|
6
|
-
color-scheme: light dark;
|
|
7
|
-
color: rgba(255, 255, 255, 0.87);
|
|
8
|
-
background-color: #242424;
|
|
9
|
-
|
|
10
|
-
font-synthesis: none;
|
|
11
|
-
text-rendering: optimizeLegibility;
|
|
12
|
-
-webkit-font-smoothing: antialiased;
|
|
13
|
-
-moz-osx-font-smoothing: grayscale;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
a {
|
|
17
|
-
font-weight: 500;
|
|
18
|
-
color: #646cff;
|
|
19
|
-
text-decoration: inherit;
|
|
20
|
-
}
|
|
21
|
-
a:hover {
|
|
22
|
-
color: #535bf2;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
body {
|
|
26
|
-
margin: 0;
|
|
27
|
-
display: flex;
|
|
28
|
-
place-items: center;
|
|
29
|
-
min-width: 320px;
|
|
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
|
-
}
|
|
96
|
-
}
|
|
@@ -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="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path fill="#007ACC" d="M0 128v128h256V0H0z"></path><path fill="#FFF" d="m56.612 128.85l-.081 10.483h33.32v94.68h23.568v-94.68h33.321v-10.28c0-5.69-.122-10.444-.284-10.566c-.122-.162-20.4-.244-44.983-.203l-44.74.122l-.121 10.443Zm149.955-10.742c6.501 1.625 11.459 4.51 16.01 9.224c2.357 2.52 5.851 7.111 6.136 8.208c.08.325-11.053 7.802-17.798 11.988c-.244.162-1.22-.894-2.317-2.52c-3.291-4.795-6.745-6.867-12.028-7.233c-7.76-.528-12.759 3.535-12.718 10.321c0 1.992.284 3.17 1.097 4.795c1.707 3.536 4.876 5.649 14.832 9.956c18.326 7.883 26.168 13.084 31.045 20.48c5.445 8.249 6.664 21.415 2.966 31.208c-4.063 10.646-14.14 17.879-28.323 20.276c-4.388.772-14.79.65-19.504-.203c-10.28-1.828-20.033-6.908-26.047-13.572c-2.357-2.6-6.949-9.387-6.664-9.874c.122-.163 1.178-.813 2.356-1.504c1.138-.65 5.446-3.129 9.509-5.485l7.355-4.267l1.544 2.276c2.154 3.29 6.867 7.801 9.712 9.305c8.167 4.307 19.383 3.698 24.909-1.26c2.357-2.153 3.332-4.388 3.332-7.68c0-2.966-.366-4.266-1.91-6.501c-1.99-2.845-6.054-5.242-17.595-10.24c-13.206-5.69-18.895-9.224-24.096-14.832c-3.007-3.25-5.852-8.452-7.03-12.8c-.975-3.617-1.22-12.678-.447-16.335c2.723-12.76 12.353-21.659 26.25-24.3c4.51-.853 14.994-.528 19.424.569Z"></path></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
/* Bundler mode */
|
|
9
|
-
"moduleResolution": "bundler",
|
|
10
|
-
"allowImportingTsExtensions": true,
|
|
11
|
-
"verbatimModuleSyntax": true,
|
|
12
|
-
"moduleDetection": "force",
|
|
13
|
-
"noEmit": true,
|
|
14
|
-
/* Linting */
|
|
15
|
-
"strict": true,
|
|
16
|
-
"noUnusedLocals": true,
|
|
17
|
-
"noUnusedParameters": true,
|
|
18
|
-
"erasableSyntaxOnly": true,
|
|
19
|
-
"noFallthroughCasesInSwitch": true,
|
|
20
|
-
"noUncheckedSideEffectImports": true,
|
|
21
|
-
"strictNullChecks": true
|
|
22
|
-
},
|
|
23
|
-
"include": ["src"]
|
|
24
|
-
}
|