@qwik.dev/core 2.0.0-beta.17 → 2.0.0-beta.19

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 (51) hide show
  1. package/bindings/qwik.darwin-arm64.node +0 -0
  2. package/bindings/qwik.linux-x64-gnu.node +0 -0
  3. package/bindings/qwik.win32-x64-msvc.node +0 -0
  4. package/bindings/qwik_wasm_bg.wasm +0 -0
  5. package/dist/backpatch/package.json +1 -1
  6. package/dist/build/package.json +1 -1
  7. package/dist/cli.mjs +57 -57
  8. package/dist/core-internal.d.ts +32 -32
  9. package/dist/core.min.mjs +1 -1
  10. package/dist/core.mjs +1234 -788
  11. package/dist/core.mjs.map +1 -1
  12. package/dist/core.prod.mjs +815 -553
  13. package/dist/loader/index.mjs +2 -2
  14. package/dist/loader/package.json +1 -1
  15. package/dist/optimizer.mjs +1007 -1000
  16. package/dist/qwikloader.debug.js +1 -1
  17. package/dist/qwikloader.js +1 -1
  18. package/dist/server.mjs +65 -106
  19. package/dist/starters/adapters/cloudflare-workers/README.md +52 -0
  20. package/dist/starters/adapters/cloudflare-workers/adapters/cloudflare-workers/vite.config.ts +15 -0
  21. package/dist/starters/adapters/cloudflare-workers/gitignore +3 -0
  22. package/dist/starters/adapters/cloudflare-workers/package.json +31 -0
  23. package/dist/starters/adapters/cloudflare-workers/public/.assetsignore +4 -0
  24. package/dist/starters/adapters/cloudflare-workers/public/_headers +11 -0
  25. package/dist/starters/adapters/cloudflare-workers/public/_redirects +1 -0
  26. package/dist/starters/adapters/cloudflare-workers/src/entry.cloudflare-pages.tsx +23 -0
  27. package/dist/starters/adapters/cloudflare-workers/worker-configuration.d.ts +5 -0
  28. package/dist/starters/adapters/cloudflare-workers/wrangler.jsonc +41 -0
  29. package/dist/starters/adapters/express/package.json +1 -1
  30. package/dist/starters/features/compiled-i18n/package.json +37 -0
  31. package/dist/starters/features/compiled-i18n/src/components/locale-selector/locale-selector.tsx +30 -0
  32. package/dist/starters/features/{localize → compiled-i18n}/src/entry.ssr.tsx +7 -2
  33. package/dist/starters/features/compiled-i18n/src/routes/plugin@compiled-i18n.ts +28 -0
  34. package/dist/starters/features/csr/package.json +1 -1
  35. package/dist/starters/features/cypress/src/actions/example.action.ts +5 -0
  36. package/dist/starters/features/cypress/src/components/example/example.cy.tsx +50 -8
  37. package/dist/starters/features/cypress/src/components/example/example.tsx +13 -3
  38. package/dist/starters/features/cypress/src/loaders/example.loader.ts +5 -0
  39. package/dist/starters/features/playwright/playwright-report/index.html +0 -19
  40. package/dist/testing/index.d.ts +11 -11
  41. package/dist/testing/index.mjs +2966 -2498
  42. package/dist/testing/package.json +1 -1
  43. package/package.json +14 -11
  44. package/bindings/qwik.darwin-x64.node +0 -0
  45. package/bindings/qwik.wasm.cjs +0 -471
  46. package/dist/starters/features/localize/package.json +0 -37
  47. package/dist/starters/features/localize/src/locales/message.en.json +0 -8
  48. package/dist/starters/features/localize/src/locales/message.it.json +0 -8
  49. package/dist/starters/features/localize/src/routes/[locale]/i18n-utils.ts +0 -94
  50. package/dist/starters/features/localize/src/routes/[locale]/index.tsx +0 -52
  51. package/dist/starters/features/localize/src/routes/[locale]/layout.tsx +0 -12
@@ -1,52 +0,0 @@
1
- import { component$, useStylesScoped$ } from "@qwik.dev/core";
2
-
3
- export default component$(() => {
4
- useStylesScoped$(`
5
- .card {
6
- width: 300px;
7
- border-radius: .5rem;
8
- border: 1px black solid;
9
- background-color: white;
10
- color: black;
11
- margin: auto;
12
- text-align:center;
13
- padding: 2rem;
14
- margin-top: 4rem;
15
- }
16
-
17
- .links {
18
- display: flex;
19
- justify-content: space-evenly;
20
- padding: 1.25rem 0;
21
- }
22
-
23
- .link {
24
- font-weight: 500;
25
- color: rgb(63 131 248/1);
26
- }
27
- `);
28
- const name = "Qwik";
29
- return (
30
- <div class="card">
31
- <div style="padding-bottom: 1.25rem;">
32
- <div style="font-weight: 700; font-size: 1.5rem;">{$localize`Hello from ${name}!`}</div>
33
- </div>
34
- <div style="padding-bottom: 1.25rem;">
35
- <div style="font-weight: 700; font-size: 1.0rem;">
36
- {$localize`Use the following links to change the translation.`}
37
- <div class="links">
38
- <a class="link" href="/en/">
39
- English
40
- </a>
41
- <a class="link" href="/it/">
42
- Italiano
43
- </a>
44
- </div>
45
- <div style="font-size: 1.0rem;">
46
- {$localize`Translation is performed as part of the build step so translated strings are inlined into the application, there is no need to load or look them up at runtime. However, these advantages mean that the user cannot change the language without refreshing the page.`}
47
- </div>
48
- </div>
49
- </div>
50
- </div>
51
- );
52
- });
@@ -1,12 +0,0 @@
1
- import type { RequestHandler } from "@qwik.dev/router";
2
- import { component$, Slot } from "@qwik.dev/core";
3
- import { extractLang, useI18n } from "~/routes/[locale]/i18n-utils";
4
-
5
- export const onRequest: RequestHandler = ({ locale, params }) => {
6
- locale(extractLang(params.locale));
7
- };
8
-
9
- export default component$(() => {
10
- useI18n();
11
- return <Slot />;
12
- });