create-qwik 0.0.18-4 → 0.0.18-4-dev20220324145207
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/package.json +1 -1
- package/starters/apps/base/.vscode/qwik.code-snippets +1 -1
- package/starters/apps/base/index.html +3 -1
- package/starters/apps/base/package.json +1 -1
- package/starters/apps/starter/src/main.tsx +1 -1
- package/starters/apps/starter-partytown/src/main.tsx +2 -2
- package/starters/apps/todo/src/components/footer/footer.tsx +2 -2
- package/starters/apps/todo/src/components/header/header.tsx +1 -1
- package/starters/apps/todo/src/components/item/item.tsx +5 -5
package/package.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
|
+
<!-- THIS FILE IS ONLY USED DURING DEVELOPMENT -->
|
|
4
|
+
<!-- THIS FILE WILL NEVER SHOW UP IN PRODUCTION DEPLOYMENT -->
|
|
3
5
|
<head>
|
|
4
6
|
<meta charset="utf-8" />
|
|
5
7
|
<title>Qwik Client Dev Mode</title>
|
|
@@ -7,7 +9,7 @@
|
|
|
7
9
|
<body>
|
|
8
10
|
<script type="module">
|
|
9
11
|
// Vite Dev Mode Only
|
|
10
|
-
import '@builder.io/qwik/qwikloader.js';
|
|
12
|
+
import '@builder.io/qwik/qwikloader.debug.js';
|
|
11
13
|
import { render, jsx } from '@builder.io/qwik';
|
|
12
14
|
import { Main } from '/src/main.tsx';
|
|
13
15
|
render(document.body, jsx(Main, {}));
|
|
@@ -23,7 +23,7 @@ export const Main = component$(() => {
|
|
|
23
23
|
value={state.name}
|
|
24
24
|
class="border-2 border-solid border-blue-500"
|
|
25
25
|
placeholder="Write some text"
|
|
26
|
-
|
|
26
|
+
onKeyup$={() => {
|
|
27
27
|
const event = useEvent<KeyboardEvent>();
|
|
28
28
|
const input = event.target as HTMLInputElement;
|
|
29
29
|
state.name = input.value;
|
|
@@ -5,7 +5,7 @@ export const Main = component$(() => {
|
|
|
5
5
|
const state = useStore({ name: 'World', running: true });
|
|
6
6
|
return $(() => {
|
|
7
7
|
return (
|
|
8
|
-
<div id="my-app"
|
|
8
|
+
<div id="my-app" onDocumentExpensiveComputationDone$={() => (state.running = false)}>
|
|
9
9
|
<p style={{ 'text-align': 'center' }}>
|
|
10
10
|
<a href="https://github.com/builderio/qwik">
|
|
11
11
|
<img
|
|
@@ -57,7 +57,7 @@ export const Main = component$(() => {
|
|
|
57
57
|
Try interacting with this component by changing{' '}
|
|
58
58
|
<input
|
|
59
59
|
value={state.name}
|
|
60
|
-
|
|
60
|
+
onKeyup$={() => {
|
|
61
61
|
const event = useEvent<KeyboardEvent>();
|
|
62
62
|
const input = event.target as HTMLInputElement;
|
|
63
63
|
state.name = input.value;
|
|
@@ -18,7 +18,7 @@ export const Footer = component$(
|
|
|
18
18
|
<li>
|
|
19
19
|
<a
|
|
20
20
|
class={{ selected: props.todos.filter == lMode }}
|
|
21
|
-
|
|
21
|
+
onClick$={() => {
|
|
22
22
|
props.todos.filter = filter;
|
|
23
23
|
}}
|
|
24
24
|
>
|
|
@@ -44,7 +44,7 @@ export const Footer = component$(
|
|
|
44
44
|
{remaining > 0 ? (
|
|
45
45
|
<button
|
|
46
46
|
class="clear-completed"
|
|
47
|
-
|
|
47
|
+
onClick$={() => {
|
|
48
48
|
props.todos.items = props.todos.items.filter(FILTERS.active);
|
|
49
49
|
}}
|
|
50
50
|
>
|
|
@@ -18,7 +18,7 @@ export const Header = component$(
|
|
|
18
18
|
placeholder="What needs to be done?"
|
|
19
19
|
autoFocus
|
|
20
20
|
value={state.text}
|
|
21
|
-
|
|
21
|
+
onKeyup$={() => {
|
|
22
22
|
const event = useEvent<KeyboardEvent>();
|
|
23
23
|
const inputValue = (event.target as HTMLInputElement).value;
|
|
24
24
|
state.text = inputValue;
|
|
@@ -25,12 +25,12 @@ export const Item = component$(
|
|
|
25
25
|
class="toggle"
|
|
26
26
|
type="checkbox"
|
|
27
27
|
checked={props.item.completed}
|
|
28
|
-
|
|
28
|
+
onClick$={() => {
|
|
29
29
|
props.item.completed = !props.item.completed;
|
|
30
30
|
}}
|
|
31
31
|
/>
|
|
32
32
|
<label
|
|
33
|
-
|
|
33
|
+
onDblclick$={async () => {
|
|
34
34
|
state.editing = true;
|
|
35
35
|
const hostElement = useHostElement()!;
|
|
36
36
|
await notifyRender(hostElement);
|
|
@@ -43,7 +43,7 @@ export const Item = component$(
|
|
|
43
43
|
</label>
|
|
44
44
|
<button
|
|
45
45
|
class="destroy"
|
|
46
|
-
|
|
46
|
+
onClick$={() => {
|
|
47
47
|
const todoItem = props.item;
|
|
48
48
|
props.todos.items = props.todos.items.filter((i) => i != todoItem);
|
|
49
49
|
}}
|
|
@@ -53,8 +53,8 @@ export const Item = component$(
|
|
|
53
53
|
<input
|
|
54
54
|
class="edit"
|
|
55
55
|
value={props.item.title}
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
onBlur$={() => (state.editing = false)}
|
|
57
|
+
onKeyup$={() => {
|
|
58
58
|
const event = useEvent<KeyboardEvent>();
|
|
59
59
|
const inputValue = (event.target as HTMLInputElement).value;
|
|
60
60
|
props.item.title = inputValue;
|