@qwik.dev/core 0.0.0 → 2.0.0-alpha.0

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 (258) hide show
  1. package/LICENSE +22 -0
  2. package/bindings/qwik.linux-x64-gnu.node +0 -0
  3. package/bindings/qwik.wasm.cjs +484 -0
  4. package/bindings/qwik.wasm.mjs +477 -0
  5. package/bindings/qwik_wasm_bg.wasm +0 -0
  6. package/build.d.ts +2 -0
  7. package/dist/build/index.cjs +35 -0
  8. package/dist/build/index.cjs.map +7 -0
  9. package/dist/build/index.d.ts +22 -0
  10. package/dist/build/index.dev.cjs +37 -0
  11. package/dist/build/index.dev.cjs.map +7 -0
  12. package/dist/build/index.dev.mjs +12 -0
  13. package/dist/build/index.dev.mjs.map +7 -0
  14. package/dist/build/index.mjs +12 -0
  15. package/dist/build/index.mjs.map +7 -0
  16. package/dist/build/index.prod.cjs +37 -0
  17. package/dist/build/index.prod.cjs.map +7 -0
  18. package/dist/build/index.prod.mjs +12 -0
  19. package/dist/build/index.prod.mjs.map +7 -0
  20. package/dist/build/package.json +8 -0
  21. package/dist/cli.cjs +4890 -0
  22. package/dist/core-internal.d.ts +3895 -0
  23. package/dist/core.cjs +10923 -0
  24. package/dist/core.cjs.map +1 -0
  25. package/dist/core.min.mjs +1 -0
  26. package/dist/core.mjs +10819 -0
  27. package/dist/core.mjs.map +1 -0
  28. package/dist/core.prod.cjs +5181 -0
  29. package/dist/core.prod.mjs +6025 -0
  30. package/dist/index.d.ts +2 -0
  31. package/dist/insights/index.d.ts +1 -0
  32. package/dist/insights/index.qwik.cjs +751 -0
  33. package/dist/insights/index.qwik.mjs +751 -0
  34. package/dist/insights/insights.d.ts +59 -0
  35. package/dist/insights/vite/index.cjs +82 -0
  36. package/dist/insights/vite/index.d.ts +1 -0
  37. package/dist/insights/vite/index.mjs +55 -0
  38. package/dist/insights/vite/insights-plugin.d.ts +10 -0
  39. package/dist/jsx-runtime/index.d.ts +2 -0
  40. package/dist/jsx-runtime.d.ts +2 -0
  41. package/dist/loader/index.cjs +4 -0
  42. package/dist/loader/index.d.ts +2 -0
  43. package/dist/loader/index.mjs +3 -0
  44. package/dist/loader/package.json +8 -0
  45. package/dist/optimizer.cjs +9145 -0
  46. package/dist/optimizer.d.ts +707 -0
  47. package/dist/optimizer.mjs +9709 -0
  48. package/dist/prefetch/index.cjs +4 -0
  49. package/dist/prefetch/index.d.ts +2 -0
  50. package/dist/prefetch/index.mjs +3 -0
  51. package/dist/prefetch/package.json +8 -0
  52. package/dist/qwik-prefetch.debug.js +244 -0
  53. package/dist/qwik-prefetch.js +1 -0
  54. package/dist/qwikloader.debug.js +228 -0
  55. package/dist/qwikloader.js +3 -0
  56. package/dist/server-modules.d.ts +38 -0
  57. package/dist/server.cjs +8942 -0
  58. package/dist/server.d.ts +404 -0
  59. package/dist/server.mjs +8877 -0
  60. package/dist/starters/adapters/aws-lambda/.eslintignore +2 -0
  61. package/dist/starters/adapters/aws-lambda/.prettierignore +2 -0
  62. package/dist/starters/adapters/aws-lambda/adapters/aws-lambda/vite.config.mts +21 -0
  63. package/dist/starters/adapters/aws-lambda/gitignore +2 -0
  64. package/dist/starters/adapters/aws-lambda/package.json +23 -0
  65. package/dist/starters/adapters/aws-lambda/serverless.yml +31 -0
  66. package/dist/starters/adapters/aws-lambda/src/entry_aws-lambda.tsx +32 -0
  67. package/dist/starters/adapters/azure-swa/README.md +13 -0
  68. package/dist/starters/adapters/azure-swa/adapters/azure-swa/vite.config.mts +23 -0
  69. package/dist/starters/adapters/azure-swa/azure-functions/host.json +20 -0
  70. package/dist/starters/adapters/azure-swa/gitignore +3 -0
  71. package/dist/starters/adapters/azure-swa/package.json +28 -0
  72. package/dist/starters/adapters/azure-swa/public/staticwebapp.config.json +23 -0
  73. package/dist/starters/adapters/azure-swa/src/entry.azure-swa.tsx +22 -0
  74. package/dist/starters/adapters/azure-swa/swa-cli.config.json +11 -0
  75. package/dist/starters/adapters/bun/README.md +9 -0
  76. package/dist/starters/adapters/bun/adapters/bun/vite.config.mts +28 -0
  77. package/dist/starters/adapters/bun/package.json +27 -0
  78. package/dist/starters/adapters/bun/src/entry.bun.ts +46 -0
  79. package/dist/starters/adapters/cloud-run/Dockerfile +24 -0
  80. package/dist/starters/adapters/cloud-run/README.md +7 -0
  81. package/dist/starters/adapters/cloud-run/adapters/cloud-run/vite.config.mts +15 -0
  82. package/dist/starters/adapters/cloud-run/package.json +24 -0
  83. package/dist/starters/adapters/cloud-run/src/entry.cloud-run.tsx +96 -0
  84. package/dist/starters/adapters/cloudflare-pages/README.md +46 -0
  85. package/dist/starters/adapters/cloudflare-pages/adapters/cloudflare-pages/vite.config.mts +15 -0
  86. package/dist/starters/adapters/cloudflare-pages/gitignore +2 -0
  87. package/dist/starters/adapters/cloudflare-pages/package.json +28 -0
  88. package/dist/starters/adapters/cloudflare-pages/public/_headers +9 -0
  89. package/dist/starters/adapters/cloudflare-pages/public/_redirects +1 -0
  90. package/dist/starters/adapters/cloudflare-pages/src/entry.cloudflare-pages.tsx +24 -0
  91. package/dist/starters/adapters/deno/README.md +9 -0
  92. package/dist/starters/adapters/deno/adapters/deno/vite.config.mts +23 -0
  93. package/dist/starters/adapters/deno/package.json +24 -0
  94. package/dist/starters/adapters/deno/src/entry.deno.ts +45 -0
  95. package/dist/starters/adapters/express/README.md +9 -0
  96. package/dist/starters/adapters/express/adapters/express/vite.config.mts +15 -0
  97. package/dist/starters/adapters/express/package.json +33 -0
  98. package/dist/starters/adapters/express/src/entry.express.tsx +70 -0
  99. package/dist/starters/adapters/fastify/README.md +9 -0
  100. package/dist/starters/adapters/fastify/adapters/fastify/vite.config.mts +15 -0
  101. package/dist/starters/adapters/fastify/package.json +33 -0
  102. package/dist/starters/adapters/fastify/src/entry.fastify.tsx +48 -0
  103. package/dist/starters/adapters/fastify/src/plugins/fastify-qwik.ts +42 -0
  104. package/dist/starters/adapters/firebase/.eslintignore +1 -0
  105. package/dist/starters/adapters/firebase/.prettierignore +1 -0
  106. package/dist/starters/adapters/firebase/adapters/firebase/vite.config.mts +21 -0
  107. package/dist/starters/adapters/firebase/firebase.json +24 -0
  108. package/dist/starters/adapters/firebase/functions/.gitkeep +0 -0
  109. package/dist/starters/adapters/firebase/functions/index.js +5 -0
  110. package/dist/starters/adapters/firebase/functions/package.json +25 -0
  111. package/dist/starters/adapters/firebase/gitignore +3 -0
  112. package/dist/starters/adapters/firebase/package.json +24 -0
  113. package/dist/starters/adapters/firebase/src/entry-firebase.tsx +22 -0
  114. package/dist/starters/adapters/netlify-edge/README.md +64 -0
  115. package/dist/starters/adapters/netlify-edge/adapters/netlify-edge/vite.config.mts +16 -0
  116. package/dist/starters/adapters/netlify-edge/gitignore +2 -0
  117. package/dist/starters/adapters/netlify-edge/netlify.toml +3 -0
  118. package/dist/starters/adapters/netlify-edge/package.json +29 -0
  119. package/dist/starters/adapters/netlify-edge/public/_headers +2 -0
  120. package/dist/starters/adapters/netlify-edge/src/entry.netlify-edge.tsx +22 -0
  121. package/dist/starters/adapters/node-server/README.md +12 -0
  122. package/dist/starters/adapters/node-server/adapters/node-server/vite.config.mts +15 -0
  123. package/dist/starters/adapters/node-server/package.json +23 -0
  124. package/dist/starters/adapters/node-server/src/entry.node-server.tsx +39 -0
  125. package/dist/starters/adapters/static/README.md +5 -0
  126. package/dist/starters/adapters/static/adapters/static/vite.config.mts +19 -0
  127. package/dist/starters/adapters/static/package.json +19 -0
  128. package/dist/starters/adapters/vercel-edge/README.md +43 -0
  129. package/dist/starters/adapters/vercel-edge/adapters/vercel-edge/vite.config.mts +16 -0
  130. package/dist/starters/adapters/vercel-edge/gitignore +2 -0
  131. package/dist/starters/adapters/vercel-edge/package.json +28 -0
  132. package/dist/starters/adapters/vercel-edge/src/entry.vercel-edge.tsx +22 -0
  133. package/dist/starters/adapters/vercel-edge/vercel.json +22 -0
  134. package/dist/starters/features/auth/package.json +20 -0
  135. package/dist/starters/features/auth/src/routes/plugin@auth.ts +8 -0
  136. package/dist/starters/features/bootstrap/package.json +33 -0
  137. package/dist/starters/features/bootstrap/src/components/bootstrap/alert.tsx +8 -0
  138. package/dist/starters/features/bootstrap/src/components/bootstrap/button.tsx +8 -0
  139. package/dist/starters/features/bootstrap/src/components/bootstrap/index.ts +4 -0
  140. package/dist/starters/features/bootstrap/src/components/bootstrap/navbar.tsx +44 -0
  141. package/dist/starters/features/bootstrap/src/components/bootstrap/spinner.tsx +13 -0
  142. package/dist/starters/features/bootstrap/src/constants/data.ts +10 -0
  143. package/dist/starters/features/bootstrap/src/models/bootstrap.ts +8 -0
  144. package/dist/starters/features/bootstrap/src/routes/bootstrap/alerts/index.tsx +28 -0
  145. package/dist/starters/features/bootstrap/src/routes/bootstrap/buttons/index.tsx +32 -0
  146. package/dist/starters/features/bootstrap/src/routes/bootstrap/index.tsx +32 -0
  147. package/dist/starters/features/bootstrap/src/routes/bootstrap/layout.tsx +36 -0
  148. package/dist/starters/features/bootstrap/src/routes/bootstrap/spinners/index.tsx +45 -0
  149. package/dist/starters/features/builder.io/README.md +15 -0
  150. package/dist/starters/features/builder.io/package.json +27 -0
  151. package/dist/starters/features/builder.io/src/components/builder-registry.ts +25 -0
  152. package/dist/starters/features/builder.io/src/components/counter/counter.module.css +23 -0
  153. package/dist/starters/features/builder.io/src/components/counter/counter.tsx +81 -0
  154. package/dist/starters/features/builder.io/src/components/gauge/gauge.module.css +27 -0
  155. package/dist/starters/features/builder.io/src/components/gauge/index.tsx +38 -0
  156. package/dist/starters/features/builder.io/src/routes/[...index]/index.tsx +44 -0
  157. package/dist/starters/features/cypress/cypress/fixtures/example.json +5 -0
  158. package/dist/starters/features/cypress/cypress/support/commands.ts +37 -0
  159. package/dist/starters/features/cypress/cypress/support/component-index.html +12 -0
  160. package/dist/starters/features/cypress/cypress/support/component.ts +42 -0
  161. package/dist/starters/features/cypress/cypress/tsconfig.cy.json +17 -0
  162. package/dist/starters/features/cypress/cypress.config.ts +10 -0
  163. package/dist/starters/features/cypress/cypress.d.ts +14 -0
  164. package/dist/starters/features/cypress/package.json +28 -0
  165. package/dist/starters/features/cypress/src/components/example/example.cy.tsx +18 -0
  166. package/dist/starters/features/cypress/src/components/example/example.tsx +17 -0
  167. package/dist/starters/features/drizzle/drizzle/db/.gitkeep +0 -0
  168. package/dist/starters/features/drizzle/drizzle/migrations/.gitkeep +0 -0
  169. package/dist/starters/features/drizzle/drizzle/schema.ts +24 -0
  170. package/dist/starters/features/drizzle/drizzle.config.ts +9 -0
  171. package/dist/starters/features/drizzle/package.json +41 -0
  172. package/dist/starters/features/drizzle/src/routes/create/index.tsx +42 -0
  173. package/dist/starters/features/drizzle/src/routes/users/[userId]/index.tsx +36 -0
  174. package/dist/starters/features/drizzle/src/routes/users/index.tsx +30 -0
  175. package/dist/starters/features/leaflet-map/package.json +30 -0
  176. package/dist/starters/features/leaflet-map/src/components/leaflet-map/index.tsx +60 -0
  177. package/dist/starters/features/leaflet-map/src/helpers/boundary-box.tsx +6 -0
  178. package/dist/starters/features/leaflet-map/src/models/location.ts +9 -0
  179. package/dist/starters/features/leaflet-map/src/models/map.ts +7 -0
  180. package/dist/starters/features/leaflet-map/src/routes/basic-map/index.tsx +25 -0
  181. package/dist/starters/features/localize/package.json +37 -0
  182. package/dist/starters/features/localize/src/entry.ssr.tsx +32 -0
  183. package/dist/starters/features/localize/src/locales/message.en.json +8 -0
  184. package/dist/starters/features/localize/src/locales/message.it.json +8 -0
  185. package/dist/starters/features/localize/src/routes/[locale]/i18n-utils.ts +94 -0
  186. package/dist/starters/features/localize/src/routes/[locale]/index.tsx +52 -0
  187. package/dist/starters/features/localize/src/routes/[locale]/layout.tsx +12 -0
  188. package/dist/starters/features/orama/package.json +23 -0
  189. package/dist/starters/features/orama/src/orama/index.ts +41 -0
  190. package/dist/starters/features/orama/src/routes/orama/index.tsx +110 -0
  191. package/dist/starters/features/pandacss/.eslintignore +3 -0
  192. package/dist/starters/features/pandacss/.prettierignore +2 -0
  193. package/dist/starters/features/pandacss/gitignore +2 -0
  194. package/dist/starters/features/pandacss/package.json +31 -0
  195. package/dist/starters/features/pandacss/panda.config.ts +22 -0
  196. package/dist/starters/features/pandacss/postcss.config.js +5 -0
  197. package/dist/starters/features/pandacss/src/global.css +5 -0
  198. package/dist/starters/features/pandacss/src/routes/pandacss/index.tsx +18 -0
  199. package/dist/starters/features/partytown/package.json +41 -0
  200. package/dist/starters/features/partytown/src/components/partytown/partytown.tsx +19 -0
  201. package/dist/starters/features/playwright/package.json +18 -0
  202. package/dist/starters/features/playwright/playwright-report/index.html +22024 -0
  203. package/dist/starters/features/playwright/playwright.config.ts +40 -0
  204. package/dist/starters/features/playwright/tests/example.spec.ts +14 -0
  205. package/dist/starters/features/postcss/.vscode/settings.json +3 -0
  206. package/dist/starters/features/postcss/package.json +17 -0
  207. package/dist/starters/features/postcss/postcss.config.js +11 -0
  208. package/dist/starters/features/prisma/package.json +35 -0
  209. package/dist/starters/features/prisma/prisma/schema.prisma +17 -0
  210. package/dist/starters/features/prisma/src/routes/create/index.tsx +42 -0
  211. package/dist/starters/features/prisma/src/routes/users/[userId]/index.tsx +31 -0
  212. package/dist/starters/features/prisma/src/routes/users/index.tsx +27 -0
  213. package/dist/starters/features/react/package.json +41 -0
  214. package/dist/starters/features/react/src/integrations/react/mui.tsx +60 -0
  215. package/dist/starters/features/react/src/routes/react/index.tsx +45 -0
  216. package/dist/starters/features/storybook/.storybook/main.ts +22 -0
  217. package/dist/starters/features/storybook/.storybook/preview-head.html +3 -0
  218. package/dist/starters/features/storybook/.storybook/preview.tsx +19 -0
  219. package/dist/starters/features/storybook/.storybook/tsconfig.json +24 -0
  220. package/dist/starters/features/storybook/package.json +25 -0
  221. package/dist/starters/features/storybook/src/components/button/button.stories.tsx +17 -0
  222. package/dist/starters/features/storybook/src/components/button/button.tsx +27 -0
  223. package/dist/starters/features/styled-vanilla-extract/package.json +28 -0
  224. package/dist/starters/features/styled-vanilla-extract/src/routes/styled-flower/flower.css.ts +83 -0
  225. package/dist/starters/features/styled-vanilla-extract/src/routes/styled-flower/index.tsx +75 -0
  226. package/dist/starters/features/tailwind/.prettierrc.js +3 -0
  227. package/dist/starters/features/tailwind/.vscode/settings.json +3 -0
  228. package/dist/starters/features/tailwind/package.json +18 -0
  229. package/dist/starters/features/tailwind/postcss.config.cjs +6 -0
  230. package/dist/starters/features/tailwind/src/global.css +7 -0
  231. package/dist/starters/features/tailwind/tailwind.config.js +8 -0
  232. package/dist/starters/features/turso/.env.local +2 -0
  233. package/dist/starters/features/turso/package.json +30 -0
  234. package/dist/starters/features/turso/src/utils/turso.ts +21 -0
  235. package/dist/starters/features/vitest/package.json +20 -0
  236. package/dist/starters/features/vitest/src/components/example/example.spec.tsx +32 -0
  237. package/dist/starters/features/vitest/src/components/example/example.tsx +17 -0
  238. package/dist/templates/barrel/component/index.tsx.template +13 -0
  239. package/dist/templates/barrel/markdown/index.md.template +5 -0
  240. package/dist/templates/barrel/mdx/index.mdx.template +5 -0
  241. package/dist/templates/barrel/route/index.tsx.template +9 -0
  242. package/dist/templates/qwik/component/[slug].tsx.template +13 -0
  243. package/dist/templates/qwik/markdown/index.md.template +5 -0
  244. package/dist/templates/qwik/mdx/index.mdx.template +5 -0
  245. package/dist/templates/qwik/route/index.tsx.template +9 -0
  246. package/dist/testing/index.cjs +32425 -0
  247. package/dist/testing/index.d.ts +140 -0
  248. package/dist/testing/index.mjs +32389 -0
  249. package/dist/testing/package.json +9 -0
  250. package/jsx-dev-runtime.d.ts +2 -0
  251. package/jsx-runtime.d.ts +2 -0
  252. package/loader.d.ts +2 -0
  253. package/optimizer.d.ts +2 -0
  254. package/package.json +20 -12
  255. package/public.d.ts +68 -0
  256. package/qwik-cli.cjs +4 -0
  257. package/server.d.ts +15 -0
  258. package/testing.d.ts +2 -0
@@ -0,0 +1,707 @@
1
+ import type { Plugin as Plugin_2 } from 'vite';
2
+
3
+ /** @public */
4
+ export declare interface ComponentEntryStrategy {
5
+ type: 'component';
6
+ manual?: Record<string, string>;
7
+ }
8
+
9
+ /** @public */
10
+ export declare const createOptimizer: (optimizerOptions?: OptimizerOptions) => Promise<Optimizer>;
11
+
12
+ declare function createSymbolMapper(base: string): SymbolMapperFn;
13
+
14
+ /** @public */
15
+ export declare interface Diagnostic {
16
+ scope: string;
17
+ category: DiagnosticCategory;
18
+ code: string | null;
19
+ file: string;
20
+ message: string;
21
+ highlights: SourceLocation[];
22
+ suggestions: string[] | null;
23
+ }
24
+
25
+ /** @public */
26
+ export declare type DiagnosticCategory = 'error' | 'warning' | 'sourceError';
27
+
28
+ /** @public */
29
+ declare type EmitMode = 'dev' | 'prod' | 'lib';
30
+
31
+ /** @public */
32
+ export declare type EntryStrategy = InlineEntryStrategy | HoistEntryStrategy | SingleEntryStrategy | HookEntryStrategy_2 | SegmentEntryStrategy | ComponentEntryStrategy | SmartEntryStrategy;
33
+
34
+ /**
35
+ * Use `__EXPERIMENTAL__.x` to check if feature `x` is enabled. It will be replaced with `true` or
36
+ * `false` via an exact string replacement.
37
+ *
38
+ * Add experimental features to this enum definition.
39
+ *
40
+ * @public
41
+ */
42
+ export declare enum ExperimentalFeatures {
43
+ /** Enable the usePreventNavigate hook */
44
+ preventNavigate = "preventNavigate",
45
+ /** Enable the Valibot form validation */
46
+ valibot = "valibot",
47
+ /** Disable SPA navigation handler in Qwik Router */
48
+ noSPA = "noSPA",
49
+ /** Enable worker$ */
50
+ webWorker = "webWorker",
51
+ /** Enable the ability to use the Qwik Insights vite plugin and <Insights/> component */
52
+ insights = "insights"
53
+ }
54
+
55
+ /** @public */
56
+ export declare interface GlobalInjections {
57
+ tag: string;
58
+ attributes?: {
59
+ [key: string]: string;
60
+ };
61
+ location: 'head' | 'body';
62
+ }
63
+
64
+ /** @public */
65
+ declare interface HoistEntryStrategy {
66
+ type: 'hoist';
67
+ }
68
+
69
+ /** @deprecated Use SegmentStrategy instead */
70
+ declare interface HookEntryStrategy_2 {
71
+ type: 'hook';
72
+ manual?: Record<string, string>;
73
+ }
74
+
75
+ /** @public */
76
+ export declare interface InlineEntryStrategy {
77
+ type: 'inline';
78
+ }
79
+
80
+ /** @public */
81
+ export declare interface InsightManifest {
82
+ type: 'smart';
83
+ manual: Record<string, string>;
84
+ prefetch: {
85
+ route: string;
86
+ symbols: string[];
87
+ }[];
88
+ }
89
+
90
+ /** @public */
91
+ export declare type MinifyMode = 'simplify' | 'none';
92
+
93
+ declare interface NormalizedQwikPluginOptions extends Omit<Required<QwikPluginOptions>, 'vendorRoots' | 'experimental'> {
94
+ input: string[] | {
95
+ [entry: string]: string;
96
+ };
97
+ experimental?: Record<keyof typeof ExperimentalFeatures, boolean>;
98
+ }
99
+
100
+ /** @public */
101
+ export declare interface Optimizer {
102
+ /** Transforms the input code string, does not access the file system. */
103
+ transformModules(opts: TransformModulesOptions): Promise<TransformOutput>;
104
+ /** Optimizer system use. This can be updated with a custom file system. */
105
+ sys: OptimizerSystem;
106
+ }
107
+
108
+ /** @public */
109
+ export declare interface OptimizerOptions {
110
+ sys?: OptimizerSystem;
111
+ binding?: any;
112
+ /** Inline the global styles if they're smaller than this */
113
+ inlineStylesUpToBytes?: number;
114
+ /** Enable sourcemaps */
115
+ sourcemap?: boolean;
116
+ }
117
+
118
+ /** @public */
119
+ export declare interface OptimizerSystem {
120
+ cwd: () => string;
121
+ env: SystemEnvironment;
122
+ os: string;
123
+ dynamicImport: (path: string) => Promise<any>;
124
+ strictDynamicImport: (path: string) => Promise<any>;
125
+ getInputFiles?: (rootDir: string) => Promise<TransformModuleInput[]>;
126
+ path: Path;
127
+ }
128
+
129
+ /**
130
+ * Workaround to make the api be defined in the type.
131
+ *
132
+ * @internal
133
+ */
134
+ declare type P<T> = Plugin_2<T> & {
135
+ api: T;
136
+ config: Extract<Plugin_2<T>['config'], Function>;
137
+ };
138
+
139
+ /** @public */
140
+ export declare interface Path {
141
+ resolve(...paths: string[]): string;
142
+ normalize(path: string): string;
143
+ isAbsolute(path: string): boolean;
144
+ join(...paths: string[]): string;
145
+ relative(from: string, to: string): string;
146
+ dirname(path: string): string;
147
+ basename(path: string, ext?: string): string;
148
+ extname(path: string): string;
149
+ format(pathObject: {
150
+ root: string;
151
+ dir: string;
152
+ base: string;
153
+ ext: string;
154
+ name: string;
155
+ }): string;
156
+ parse(path: string): {
157
+ root: string;
158
+ dir: string;
159
+ base: string;
160
+ ext: string;
161
+ name: string;
162
+ };
163
+ readonly sep: string;
164
+ readonly delimiter: string;
165
+ readonly win32: null;
166
+ readonly posix: Path;
167
+ }
168
+
169
+ /** @public */
170
+ export declare type QwikBuildMode = 'production' | 'development';
171
+
172
+ /** @public */
173
+ export declare type QwikBuildTarget = 'client' | 'ssr' | 'lib' | 'test';
174
+
175
+ /** @public */
176
+ export declare interface QwikBundle {
177
+ size: number;
178
+ /** Not precise, but an indication of whether this import may be a task */
179
+ isTask?: boolean;
180
+ symbols?: string[];
181
+ imports?: string[];
182
+ dynamicImports?: string[];
183
+ origins?: string[];
184
+ }
185
+
186
+ /**
187
+ * The metadata of the build. One of its uses is storing where QRL symbols are located.
188
+ *
189
+ * @public
190
+ */
191
+ export declare interface QwikManifest {
192
+ /** Content hash of the manifest, if this changes, the code changed */
193
+ manifestHash: string;
194
+ /** QRL symbols */
195
+ symbols: {
196
+ [symbolName: string]: QwikSymbol;
197
+ };
198
+ /** Where QRLs are located */
199
+ mapping: {
200
+ [symbolName: string]: string;
201
+ };
202
+ /** All code bundles, used to know the import graph */
203
+ bundles: {
204
+ [fileName: string]: QwikBundle;
205
+ };
206
+ /** CSS etc to inject in the document head */
207
+ injections?: GlobalInjections[];
208
+ version: string;
209
+ options?: {
210
+ target?: string;
211
+ buildMode?: string;
212
+ entryStrategy?: {
213
+ [key: string]: any;
214
+ };
215
+ };
216
+ platform?: {
217
+ [name: string]: string;
218
+ };
219
+ }
220
+
221
+ declare interface QwikPluginDevTools {
222
+ imageDevTools?: boolean | true;
223
+ clickToSource?: string[] | false;
224
+ }
225
+
226
+ declare interface QwikPluginOptions {
227
+ csr?: boolean;
228
+ buildMode?: QwikBuildMode;
229
+ debug?: boolean;
230
+ entryStrategy?: EntryStrategy;
231
+ rootDir?: string;
232
+ tsconfigFileNames?: string[];
233
+ /** @deprecated No longer used */
234
+ vendorRoots?: string[];
235
+ manifestOutput?: ((manifest: QwikManifest) => Promise<void> | void) | null;
236
+ manifestInput?: QwikManifest | null;
237
+ insightsManifest?: InsightManifest | null;
238
+ input?: string[] | string | {
239
+ [entry: string]: string;
240
+ };
241
+ outDir?: string;
242
+ assetsDir?: string;
243
+ srcDir?: string | null;
244
+ scope?: string | null;
245
+ srcInputs?: TransformModuleInput[] | null;
246
+ sourcemap?: boolean;
247
+ resolveQwikBuild?: boolean;
248
+ target?: QwikBuildTarget;
249
+ transformedModuleOutput?: ((transformedModules: TransformModule[]) => Promise<void> | void) | null;
250
+ devTools?: QwikPluginDevTools;
251
+ /**
252
+ * Inline styles up to a certain size (in bytes) instead of using a separate file.
253
+ *
254
+ * Default: 20kb (20,000bytes)
255
+ */
256
+ inlineStylesUpToBytes?: number;
257
+ /**
258
+ * Run eslint on the source files for the ssr build or dev server. This can slow down startup on
259
+ * large projects. Defaults to `true`
260
+ */
261
+ lint?: boolean;
262
+ /**
263
+ * Experimental features. These can come and go in patch releases, and their API is not guaranteed
264
+ * to be stable between releases.
265
+ */
266
+ experimental?: (keyof typeof ExperimentalFeatures)[];
267
+ }
268
+
269
+ /** @public */
270
+ export declare function qwikRollup(qwikRollupOpts?: QwikRollupPluginOptions): any;
271
+
272
+ /** @public */
273
+ export declare interface QwikRollupPluginOptions {
274
+ csr?: boolean;
275
+ /**
276
+ * Build `production` or `development`.
277
+ *
278
+ * Default `development`
279
+ */
280
+ buildMode?: QwikBuildMode;
281
+ /**
282
+ * Target `client` or `ssr`.
283
+ *
284
+ * Default `client`
285
+ */
286
+ target?: QwikBuildTarget;
287
+ /**
288
+ * Prints verbose Qwik plugin debug logs.
289
+ *
290
+ * Default `false`
291
+ */
292
+ debug?: boolean;
293
+ /**
294
+ * The Qwik entry strategy to use while building for production. During development the type is
295
+ * always `segment`.
296
+ *
297
+ * Default `{ type: "smart" }`)
298
+ */
299
+ entryStrategy?: EntryStrategy;
300
+ /**
301
+ * The source directory to find all the Qwik components. Since Qwik does not have a single input,
302
+ * the `srcDir` is used to recursively find Qwik files.
303
+ *
304
+ * Default `src`
305
+ */
306
+ srcDir?: string;
307
+ /**
308
+ * Alternative to `srcDir`, where `srcInputs` is able to provide the files manually. This option
309
+ * is useful for an environment without a file system, such as a webworker.
310
+ *
311
+ * Default: `null`
312
+ */
313
+ srcInputs?: TransformModuleInput[] | null;
314
+ /**
315
+ * The root of the application, which is commonly the same directory as `package.json` and
316
+ * `rollup.config.js`.
317
+ *
318
+ * Default `process.cwd()`
319
+ */
320
+ rootDir?: string;
321
+ /**
322
+ * The client build will create a manifest and this hook is called with the generated build data.
323
+ *
324
+ * Default `undefined`
325
+ */
326
+ manifestOutput?: (manifest: QwikManifest) => Promise<void> | void;
327
+ /**
328
+ * The SSR build requires the manifest generated during the client build. The `manifestInput`
329
+ * option can be used to manually provide a manifest.
330
+ *
331
+ * Default `undefined`
332
+ */
333
+ manifestInput?: QwikManifest;
334
+ optimizerOptions?: OptimizerOptions;
335
+ /**
336
+ * Hook that's called after the build and provides all of the transformed modules that were used
337
+ * before bundling.
338
+ */
339
+ transformedModuleOutput?: ((transformedModules: TransformModule[]) => Promise<void> | void) | null;
340
+ /**
341
+ * Run eslint on the source files for the ssr build or dev server. This can slow down startup on
342
+ * large projects. Defaults to `true`
343
+ */
344
+ lint?: boolean;
345
+ /**
346
+ * Experimental features. These can come and go in patch releases, and their API is not guaranteed
347
+ * to be stable between releases.
348
+ */
349
+ experimental?: (keyof typeof ExperimentalFeatures)[];
350
+ }
351
+
352
+ /** @public */
353
+ export declare interface QwikSymbol {
354
+ origin: string;
355
+ displayName: string;
356
+ hash: string;
357
+ canonicalFilename: string;
358
+ ctxKind: 'function' | 'event';
359
+ ctxName: string;
360
+ captures: boolean;
361
+ parent: string | null;
362
+ loc: [number, number];
363
+ }
364
+
365
+ /**
366
+ * The types for Vite/Rollup don't allow us to be too specific about the return type. The correct
367
+ * return type is `[QwikVitePlugin, VitePlugin<never>]`, and if you search the plugin by name you'll
368
+ * get the `QwikVitePlugin`.
369
+ *
370
+ * @public
371
+ */
372
+ export declare function qwikVite(qwikViteOpts?: QwikVitePluginOptions): any;
373
+
374
+ /** @public */
375
+ export declare interface QwikViteDevResponse {
376
+ _qwikEnvData?: Record<string, any>;
377
+ _qwikRenderResolve?: () => void;
378
+ }
379
+
380
+ /**
381
+ * This is the type of the "pre" Qwik Vite plugin. `qwikVite` actually returns a tuple of two
382
+ * plugins, but after Vite flattens them, you can find the plugin by name.
383
+ *
384
+ * @public
385
+ */
386
+ export declare type QwikVitePlugin = P<QwikVitePluginApi> & {
387
+ name: 'vite-plugin-qwik';
388
+ };
389
+
390
+ /** @public */
391
+ export declare interface QwikVitePluginApi {
392
+ getOptimizer: () => Optimizer | null;
393
+ getOptions: () => NormalizedQwikPluginOptions;
394
+ getManifest: () => QwikManifest | null;
395
+ getInsightsManifest: (clientOutDir?: string | null) => Promise<InsightManifest | null>;
396
+ getRootDir: () => string | null;
397
+ getClientOutDir: () => string | null;
398
+ getClientPublicOutDir: () => string | null;
399
+ getAssetsDir: () => string | undefined;
400
+ }
401
+
402
+ declare interface QwikVitePluginCommonOptions {
403
+ /**
404
+ * Prints verbose Qwik plugin debug logs.
405
+ *
406
+ * Default `false`
407
+ */
408
+ debug?: boolean;
409
+ /**
410
+ * The Qwik entry strategy to use while building for production. During development the type is
411
+ * always `segment`.
412
+ *
413
+ * Default `{ type: "smart" }`)
414
+ */
415
+ entryStrategy?: EntryStrategy;
416
+ /**
417
+ * The source directory to find all the Qwik components. Since Qwik does not have a single input,
418
+ * the `srcDir` is used to recursively find Qwik files.
419
+ *
420
+ * Default `src`
421
+ */
422
+ srcDir?: string;
423
+ /**
424
+ * List of tsconfig.json files to use for ESLint warnings during development.
425
+ *
426
+ * Default `['tsconfig.json']`
427
+ */
428
+ tsconfigFileNames?: string[];
429
+ /**
430
+ * List of directories to recursively search for Qwik components or Vendors.
431
+ *
432
+ * Default `[]`
433
+ *
434
+ * @deprecated No longer used. Instead, any imported file with `.qwik.` in the name is processed.
435
+ */
436
+ vendorRoots?: string[];
437
+ /**
438
+ * Disables the automatic vendor roots scan. This is useful when you want to manually specify the
439
+ * vendor roots.
440
+ */
441
+ disableVendorScan?: boolean;
442
+ /**
443
+ * Options for the Qwik optimizer.
444
+ *
445
+ * Default `undefined`
446
+ */
447
+ optimizerOptions?: OptimizerOptions;
448
+ /**
449
+ * Hook that's called after the build and provides all of the transformed modules that were used
450
+ * before bundling.
451
+ */
452
+ transformedModuleOutput?: ((transformedModules: TransformModule[]) => Promise<void> | void) | null;
453
+ devTools?: {
454
+ /**
455
+ * Validates image sizes for CLS issues during development. In case of issues, provides you with
456
+ * a correct image size resolutions. If set to `false`, image dev tool will be disabled.
457
+ *
458
+ * Default `true`
459
+ */
460
+ imageDevTools?: boolean | true;
461
+ /**
462
+ * Press-hold the defined keys to enable qwik dev inspector. By default the behavior is
463
+ * activated by pressing the left or right `Alt` key. If set to `false`, qwik dev inspector will
464
+ * be disabled.
465
+ *
466
+ * Valid values are `KeyboardEvent.code` values. Please note that the 'Left' and 'Right'
467
+ * suffixes are ignored.
468
+ */
469
+ clickToSource?: string[] | false;
470
+ };
471
+ /**
472
+ * Predicate function to filter out files from the optimizer. hook for resolveId, load, and
473
+ * transform
474
+ */
475
+ fileFilter?: (id: string, hook: string) => boolean;
476
+ /**
477
+ * Run eslint on the source files for the ssr build or dev server. This can slow down startup on
478
+ * large projects. Defaults to `true`
479
+ */
480
+ lint?: boolean;
481
+ /**
482
+ * Experimental features. These can come and go in patch releases, and their API is not guaranteed
483
+ * to be stable between releases
484
+ */
485
+ experimental?: (keyof typeof ExperimentalFeatures)[];
486
+ }
487
+
488
+ declare interface QwikVitePluginCSROptions extends QwikVitePluginCommonOptions {
489
+ /** Client Side Rendering (CSR) mode. It will not support SSR, default to Vite's `index.html` file. */
490
+ csr: true;
491
+ client?: never;
492
+ devSsrServer?: never;
493
+ ssr?: never;
494
+ }
495
+
496
+ declare interface QwikVitePluginCSROptions extends QwikVitePluginCommonOptions {
497
+ /** Client Side Rendering (CSR) mode. It will not support SSR, default to Vite's `index.html` file. */
498
+ csr: true;
499
+ }
500
+
501
+ /** @public */
502
+ export declare type QwikVitePluginOptions = QwikVitePluginCSROptions | QwikVitePluginSSROptions;
503
+
504
+ declare interface QwikVitePluginSSROptions extends QwikVitePluginCommonOptions {
505
+ /** Client Side Rendering (CSR) mode. It will not support SSR, default to Vite's `index.html` file. */
506
+ csr?: false | undefined;
507
+ client?: {
508
+ /**
509
+ * The entry point for the client builds. This would be the application's root component
510
+ * typically.
511
+ *
512
+ * Default `src/components/app/app.tsx`
513
+ */
514
+ input?: string[] | string;
515
+ /**
516
+ * Entry input for client-side only development with hot-module reloading. This is for Vite
517
+ * development only and does not use SSR.
518
+ *
519
+ * Default `src/entry.dev.tsx`
520
+ */
521
+ devInput?: string;
522
+ /**
523
+ * Output directory for the client build.
524
+ *
525
+ * Default `dist`
526
+ */
527
+ outDir?: string;
528
+ /**
529
+ * The client build will create a manifest and this hook is called with the generated build
530
+ * data.
531
+ *
532
+ * Default `undefined`
533
+ */
534
+ manifestOutput?: (manifest: QwikManifest) => Promise<void> | void;
535
+ };
536
+ /**
537
+ * Qwik is SSR first framework. This means that Qwik requires either SSR or SSG. In dev mode the
538
+ * dev SSR server is responsible for rendering and pausing the application on the server.
539
+ *
540
+ * Under normal circumstances this should be on, unless you have your own SSR server which you
541
+ * would like to use instead and wish to disable this one.
542
+ *
543
+ * Default: true
544
+ */
545
+ devSsrServer?: boolean;
546
+ /** Controls the SSR behavior. */
547
+ ssr?: {
548
+ /**
549
+ * The entry point for the SSR renderer. This file should export a `render()` function. This
550
+ * entry point and `render()` export function is also used for Vite's SSR development and
551
+ * Node.js debug mode.
552
+ *
553
+ * Default `src/entry.ssr.tsx`
554
+ */
555
+ input?: string;
556
+ /**
557
+ * Output directory for the server build.
558
+ *
559
+ * Default `server`
560
+ */
561
+ outDir?: string;
562
+ /**
563
+ * The SSR build requires the manifest generated during the client build. By default, this
564
+ * plugin will wire the client manifest to the ssr build. However, the `manifestInput` option
565
+ * can be used to manually provide a manifest.
566
+ *
567
+ * Default `undefined`
568
+ */
569
+ manifestInput?: QwikManifest;
570
+ };
571
+ }
572
+
573
+ /** @public */
574
+ export declare interface ResolvedManifest {
575
+ mapper: SymbolMapper;
576
+ manifest: QwikManifest;
577
+ }
578
+
579
+ /** @public */
580
+ declare interface SegmentAnalysis {
581
+ origin: string;
582
+ name: string;
583
+ entry: string | null;
584
+ displayName: string;
585
+ hash: string;
586
+ canonicalFilename: string;
587
+ extension: string;
588
+ parent: string | null;
589
+ ctxKind: 'event' | 'function';
590
+ ctxName: string;
591
+ captures: boolean;
592
+ loc: [number, number];
593
+ }
594
+ export { SegmentAnalysis as HookAnalysis }
595
+ export { SegmentAnalysis }
596
+
597
+ /** @public */
598
+ declare interface SegmentEntryStrategy {
599
+ type: 'segment';
600
+ manual?: Record<string, string>;
601
+ }
602
+ export { SegmentEntryStrategy as HookEntryStrategy }
603
+ export { SegmentEntryStrategy }
604
+
605
+ /** @public */
606
+ export declare interface SingleEntryStrategy {
607
+ type: 'single';
608
+ manual?: Record<string, string>;
609
+ }
610
+
611
+ /** @public */
612
+ export declare interface SmartEntryStrategy {
613
+ type: 'smart';
614
+ manual?: Record<string, string>;
615
+ }
616
+
617
+ /** @public */
618
+ export declare interface SourceLocation {
619
+ hi: number;
620
+ lo: number;
621
+ startLine: number;
622
+ startCol: number;
623
+ endLine: number;
624
+ endCol: number;
625
+ }
626
+
627
+ /** @public */
628
+ export declare type SourceMapsOption = 'external' | 'inline' | undefined | null;
629
+
630
+ /** @public */
631
+ export declare type SymbolMapper = Record<string, readonly [symbol: string, chunk: string]>;
632
+
633
+ /**
634
+ * @beta
635
+ * For a given symbol (QRL such as `onKeydown$`) the server needs to know which bundle the symbol is in.
636
+ *
637
+ * Normally this is provided by Qwik's `q-manifest` . But `q-manifest` only exists after a full client build.
638
+ *
639
+ * This would be a problem in dev mode. So in dev mode the symbol is mapped to the expected URL using the symbolMapper function below. For Vite the given path is fixed for a given symbol.
640
+ */
641
+ export declare let symbolMapper: ReturnType<typeof createSymbolMapper>;
642
+
643
+ /** @public */
644
+ export declare type SymbolMapperFn = (symbolName: string, mapper: SymbolMapper | undefined, parent?: string) => readonly [symbol: string, chunk: string] | undefined;
645
+
646
+ /** @public */
647
+ export declare type SystemEnvironment = 'node' | 'deno' | 'bun' | 'webworker' | 'browsermain' | 'unknown';
648
+
649
+ /** @public */
650
+ export declare interface TransformModule {
651
+ path: string;
652
+ isEntry: boolean;
653
+ code: string;
654
+ map: string | null;
655
+ segment: SegmentAnalysis | null;
656
+ origPath: string | null;
657
+ }
658
+
659
+ /** @public */
660
+ export declare interface TransformModuleInput {
661
+ path: string;
662
+ devPath?: string;
663
+ code: string;
664
+ }
665
+
666
+ /** @public */
667
+ export declare interface TransformModulesOptions extends TransformOptions {
668
+ input: TransformModuleInput[];
669
+ }
670
+
671
+ /** @public */
672
+ export declare interface TransformOptions {
673
+ srcDir: string;
674
+ rootDir?: string;
675
+ entryStrategy?: EntryStrategy;
676
+ minify?: MinifyMode;
677
+ sourceMaps?: boolean;
678
+ transpileTs?: boolean;
679
+ transpileJsx?: boolean;
680
+ preserveFilenames?: boolean;
681
+ explicitExtensions?: boolean;
682
+ mode?: EmitMode;
683
+ scope?: string;
684
+ stripExports?: string[];
685
+ regCtxName?: string[];
686
+ stripCtxName?: string[];
687
+ stripEventHandlers?: boolean;
688
+ isServer?: boolean;
689
+ }
690
+
691
+ /** @public */
692
+ export declare interface TransformOutput {
693
+ modules: TransformModule[];
694
+ diagnostics: Diagnostic[];
695
+ isTypeScript: boolean;
696
+ isJsx: boolean;
697
+ }
698
+
699
+ /** @public */
700
+ export declare type TranspileOption = boolean | undefined | null;
701
+
702
+ /** @public */
703
+ export declare const versions: {
704
+ qwik: string;
705
+ };
706
+
707
+ export { }