create-qwik 0.0.18-4 → 0.0.18-6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-qwik",
3
- "version": "0.0.18-4",
3
+ "version": "0.0.18-6",
4
4
  "description": "Interactive CLI and API for generating Qwik projects.",
5
5
  "bin": {
6
6
  "create-qwik": "create-qwik"
@@ -16,7 +16,7 @@
16
16
  " return $(() => {",
17
17
  " return (",
18
18
  " <Host>",
19
- " <button on$:click={() => state.count += props.step}>",
19
+ " <button onClick$={() => state.count += props.step}>",
20
20
  " {state.count}",
21
21
  " </button>",
22
22
  " </Host>",
@@ -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, {}));
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "@types/node": "17.0.17",
18
- "@builder.io/qwik": "0.0.18-4",
18
+ "@builder.io/qwik": "0.0.18-6",
19
19
  "typescript": "4.5.5",
20
20
  "vite": "2.8.6"
21
21
  },
@@ -21,11 +21,14 @@ export function render(opts: RenderToStringOptions) {
21
21
  <meta charSet="utf-8" />
22
22
  <title>Qwik Blank App</title>
23
23
  </head>
24
- <body q:base="/">
24
+ <body>
25
25
  <Main />
26
26
  <QwikLoader debug={opts.debug} />
27
27
  </body>
28
28
  </html>,
29
- opts
29
+ {
30
+ ...opts,
31
+ // base: '/',
32
+ }
30
33
  );
31
34
  }
@@ -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
- on$:keyup={() => {
26
+ onKeyup$={() => {
27
27
  const event = useEvent<KeyboardEvent>();
28
28
  const input = event.target as HTMLInputElement;
29
29
  state.name = input.value;
@@ -21,13 +21,16 @@ export function render(opts: RenderToStringOptions) {
21
21
  <meta charSet="utf-8" />
22
22
  <title>Qwik Blank App</title>
23
23
  </head>
24
- <body q:base="/">
24
+ <body>
25
25
  <Main />
26
26
  <script>({fetchQwikBuilderContent.toString()})();</script>
27
27
  <QwikLoader debug={opts.debug} />
28
28
  </body>
29
29
  </html>,
30
- opts
30
+ {
31
+ ...opts,
32
+ // base: '/',
33
+ }
31
34
  );
32
35
  }
33
36
 
@@ -23,7 +23,7 @@ export function render(opts: RenderToStringOptions) {
23
23
  <title>Qwik + Partytown Blank App</title>
24
24
  <script children={partytownSnippet({ debug: true })} />
25
25
  </head>
26
- <body q:base="/">
26
+ <body>
27
27
  <Main />
28
28
  <script type="text/partytown">
29
29
  ({partyTownExampleWhichBlocksMainThreadForOneSecond.toString()})()
@@ -31,7 +31,10 @@ export function render(opts: RenderToStringOptions) {
31
31
  <QwikLoader debug={opts.debug} events={['click', 'keyup', 'expensiveComputationDone']} />
32
32
  </body>
33
33
  </html>,
34
- opts
34
+ {
35
+ ...opts,
36
+ // base: '/',
37
+ }
35
38
  );
36
39
  }
37
40
 
@@ -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" onDocument$:expensiveComputationDone={() => (state.running = false)}>
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
- on$:keyup={() => {
60
+ onKeyup$={() => {
61
61
  const event = useEvent<KeyboardEvent>();
62
62
  const input = event.target as HTMLInputElement;
63
63
  state.name = input.value;
@@ -18,11 +18,11 @@ export const Footer = component$(
18
18
  <li>
19
19
  <a
20
20
  class={{ selected: props.todos.filter == lMode }}
21
- on$:click={() => {
21
+ onClick$={() => {
22
22
  props.todos.filter = filter;
23
23
  }}
24
24
  >
25
- {filter[0].toUpperCase() + filter.substr(1)}
25
+ {filter[0].toUpperCase() + filter.slice(1)}
26
26
  </a>
27
27
  </li>
28
28
  );
@@ -44,7 +44,7 @@ export const Footer = component$(
44
44
  {remaining > 0 ? (
45
45
  <button
46
46
  class="clear-completed"
47
- on$:click={() => {
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
- on$:keyup={() => {
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
- on$:click={() => {
28
+ onClick$={() => {
29
29
  props.item.completed = !props.item.completed;
30
30
  }}
31
31
  />
32
32
  <label
33
- on$:dblclick={async () => {
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
- on$:click={() => {
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
- on$:blur={() => (state.editing = false)}
57
- on$:keyup={() => {
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;
@@ -20,11 +20,14 @@ export function render(opts: RenderToStringOptions) {
20
20
  <meta charSet="utf-8" />
21
21
  <title>Qwik Demo: ToDo</title>
22
22
  </head>
23
- <body q:base="/">
23
+ <body>
24
24
  <Main />
25
25
  <QwikLoader debug={opts.debug} />
26
26
  </body>
27
27
  </html>,
28
- opts
28
+ {
29
+ ...opts,
30
+ // base: '/',
31
+ }
29
32
  );
30
33
  }