@rindo/core 1.8.12 → 1.17.4

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 (545) hide show
  1. package/bin/rindo +53 -19
  2. package/cli/index.cjs.js +524 -0
  3. package/cli/index.d.ts +15 -0
  4. package/cli/index.js +500 -0
  5. package/cli/package.json +9 -0
  6. package/compiler/package.json +8 -6
  7. package/compiler/rindo.d.ts +111 -0
  8. package/compiler/rindo.js +62852 -6655
  9. package/compiler/rindo.min.js +17 -0
  10. package/dependencies.json +80 -0
  11. package/dev-server/client/app-error.d.ts +18 -0
  12. package/dev-server/client/events.d.ts +6 -0
  13. package/dev-server/client/hmr-components.d.ts +1 -0
  14. package/dev-server/client/hmr-external-styles.d.ts +1 -0
  15. package/dev-server/client/hmr-images.d.ts +1 -0
  16. package/dev-server/client/hmr-inline-styles.d.ts +1 -0
  17. package/dev-server/client/hmr-util.d.ts +9 -0
  18. package/dev-server/client/hmr-window.d.ts +10 -0
  19. package/dev-server/client/index.d.ts +6 -0
  20. package/dev-server/client/index.js +785 -0
  21. package/dev-server/client/logger.d.ts +5 -0
  22. package/dev-server/client/package.json +8 -0
  23. package/dev-server/client/progress.d.ts +3 -0
  24. package/dev-server/client/status.d.ts +4 -0
  25. package/dev-server/connector.html +6 -0
  26. package/dev-server/content-type-db.json +1 -0
  27. package/dev-server/index.d.ts +6 -0
  28. package/dev-server/index.js +260 -0
  29. package/dev-server/open-in-editor-api.js +1 -0
  30. package/dev-server/package.json +8 -0
  31. package/dev-server/server-worker.js +1570 -0
  32. package/{dist/dev-server → dev-server}/static/favicon.ico +0 -0
  33. package/{dist/dev-server → dev-server}/templates/directory-index.html +132 -132
  34. package/dev-server/templates/initial-load.html +160 -0
  35. package/{dist/sys/node → dev-server}/visualstudio.vbs +0 -0
  36. package/dev-server/ws.js +1 -0
  37. package/{dist/sys/node → dev-server}/xdg-open +0 -0
  38. package/internal/app-data/index.cjs.js +88 -0
  39. package/internal/app-data/index.d.ts +3 -0
  40. package/internal/{client/build-conditionals.mjs → app-data/index.js} +24 -21
  41. package/internal/app-data/package.json +9 -0
  42. package/internal/client/css-shim.js +4 -0
  43. package/internal/client/{dom.rindo-client.mjs → dom.js} +73 -137
  44. package/{dist/client/index.mjs → internal/client/index.js} +736 -736
  45. package/internal/client/package.json +7 -0
  46. package/internal/client/patch.js +136 -0
  47. package/internal/client/polyfills/core-js.js +11 -10
  48. package/internal/client/polyfills/css-shim.js +1 -656
  49. package/internal/client/polyfills/dom.js +79 -146
  50. package/internal/client/polyfills/es5-html-element.js +1 -18
  51. package/internal/client/polyfills/index.js +6 -7
  52. package/internal/client/{shadow-css.rindo-client.mjs → shadow-css.js} +14 -17
  53. package/internal/hydrate/index.js +1073 -0
  54. package/internal/hydrate/package.json +7 -0
  55. package/internal/hydrate/runner.d.ts +205 -0
  56. package/internal/hydrate/runner.js +748 -0
  57. package/internal/hydrate/shadow-css.js +146 -0
  58. package/internal/index.d.ts +4 -18
  59. package/internal/index.js +1 -1
  60. package/internal/package.json +8 -6
  61. package/internal/rindo-core/index.d.ts +2 -0
  62. package/{dist → internal/rindo-core}/index.js +0 -0
  63. package/internal/rindo-ext-modules.d.ts +39 -0
  64. package/internal/rindo-private.d.ts +2183 -0
  65. package/internal/rindo-public-compiler.d.ts +2094 -0
  66. package/{dist/declarations/docs.d.ts → internal/rindo-public-docs.d.ts} +13 -1
  67. package/internal/rindo-public-runtime.d.ts +1552 -0
  68. package/internal/testing/index.js +1032 -0
  69. package/internal/testing/package.json +7 -0
  70. package/internal/testing/shadow-css.js +146 -0
  71. package/mock-doc/index.cjs.js +4500 -0
  72. package/mock-doc/index.d.ts +905 -0
  73. package/mock-doc/index.js +4464 -2
  74. package/mock-doc/package.json +9 -10
  75. package/package.json +84 -137
  76. package/readme.md +3 -82
  77. package/screenshot/compare/build/app.css +1 -1
  78. package/screenshot/compare/build/app.esm.js +1 -1
  79. package/screenshot/compare/build/app.js +27 -812
  80. package/{dist/compiler/polyfills.d.ts → screenshot/compare/build/index.esm.js} +0 -0
  81. package/screenshot/compare/build/{p-113f7459.js → p-081b0641.js} +1 -1
  82. package/screenshot/compare/build/p-227a1e18.entry.js +1 -0
  83. package/screenshot/compare/build/p-2c298727.entry.js +1 -0
  84. package/screenshot/compare/build/p-5479268c.entry.js +1 -0
  85. package/screenshot/compare/build/p-573ec8a4.entry.js +1 -0
  86. package/screenshot/compare/build/p-6ba08604.entry.js +1 -0
  87. package/screenshot/compare/build/p-6bc63295.entry.js +1 -0
  88. package/screenshot/compare/build/p-7a3759fd.entry.js +1 -0
  89. package/screenshot/compare/build/{p-ejpsp3kx.js → p-7b4e3ba7.js} +1 -1
  90. package/screenshot/compare/build/p-988eb362.css +1 -0
  91. package/screenshot/compare/build/p-9b6a9315.js +1 -0
  92. package/screenshot/compare/build/p-b4cc611c.entry.js +1 -0
  93. package/screenshot/compare/build/p-d1bf53f5.entry.js +1 -0
  94. package/screenshot/compare/build/{p-efb0eac6.js → p-e2efe0df.js} +1 -1
  95. package/screenshot/compare/build/p-e8ca6d97.entry.js +1 -0
  96. package/screenshot/compare/build/p-ec2f13e0.entry.js +1 -0
  97. package/screenshot/compare/build/p-f0b99977.entry.js +1 -0
  98. package/screenshot/compare/build/p-f4745c2f.entry.js +1 -0
  99. package/screenshot/compare/build/p-fbbae598.js +1 -0
  100. package/screenshot/compare/host.config.json +14 -14
  101. package/screenshot/compare/index.html +1 -1
  102. package/{dist/screenshot → screenshot}/connector-base.d.ts +1 -1
  103. package/{dist/screenshot → screenshot}/connector-local.d.ts +1 -1
  104. package/screenshot/connector.js +2 -3
  105. package/{dist/screenshot → screenshot}/index.d.ts +1 -1
  106. package/screenshot/index.js +642 -2
  107. package/screenshot/local-connector.js +2 -3
  108. package/screenshot/package.json +8 -13
  109. package/{dist/screenshot → screenshot}/pixel-match.d.ts +0 -0
  110. package/screenshot/pixel-match.js +22 -6
  111. package/screenshot/screenshot-compare.d.ts +3 -0
  112. package/{dist/screenshot → screenshot}/screenshot-fs.d.ts +1 -1
  113. package/sys/node/autoprefixer.js +1 -0
  114. package/sys/node/glob.js +1 -0
  115. package/sys/node/graceful-fs.js +1 -0
  116. package/sys/node/index.d.ts +18 -0
  117. package/sys/node/index.js +1402 -2
  118. package/sys/node/node-fetch.js +1 -0
  119. package/sys/node/package.json +8 -5
  120. package/sys/node/prompts.js +1 -0
  121. package/sys/node/worker.js +33 -0
  122. package/{dist/testing → testing}/index.d.ts +5 -6
  123. package/testing/index.js +3903 -2
  124. package/testing/jest/jest-config.d.ts +92 -0
  125. package/{dist/testing → testing}/jest/jest-environment.d.ts +4 -2
  126. package/{dist/testing → testing}/jest/jest-preprocessor.d.ts +1 -0
  127. package/{dist/testing → testing}/jest/jest-runner.d.ts +1 -1
  128. package/{dist/testing → testing}/jest/jest-screenshot.d.ts +1 -1
  129. package/{dist/testing → testing}/jest/jest-serializer.d.ts +1 -1
  130. package/{dist/testing → testing}/jest/jest-setup-test-framework.d.ts +0 -0
  131. package/testing/jest-environment.js +3 -3
  132. package/testing/jest-preprocessor.js +3 -3
  133. package/testing/jest-preset.js +20 -28
  134. package/testing/jest-runner.js +3 -3
  135. package/testing/jest-setuptestframework.js +3 -3
  136. package/{dist/testing → testing}/matchers/attributes.d.ts +0 -0
  137. package/{dist/testing → testing}/matchers/class-list.d.ts +0 -0
  138. package/{dist/testing → testing}/matchers/events.d.ts +9 -1
  139. package/{dist/testing → testing}/matchers/html.d.ts +0 -0
  140. package/{dist/testing → testing}/matchers/index.d.ts +3 -1
  141. package/{dist/testing → testing}/matchers/screenshot.d.ts +1 -1
  142. package/{dist/testing → testing}/matchers/text.d.ts +0 -0
  143. package/testing/mock-fetch.d.ts +11 -0
  144. package/testing/mocks.d.ts +14 -0
  145. package/testing/package.json +8 -6
  146. package/testing/puppeteer/index.d.ts +2 -0
  147. package/{dist/testing → testing}/puppeteer/puppeteer-browser.d.ts +2 -2
  148. package/{dist/testing → testing}/puppeteer/puppeteer-declarations.d.ts +9 -9
  149. package/{dist/testing → testing}/puppeteer/puppeteer-element.d.ts +5 -3
  150. package/testing/puppeteer/puppeteer-emulate.d.ts +2 -0
  151. package/{dist/testing → testing}/puppeteer/puppeteer-events.d.ts +7 -7
  152. package/testing/puppeteer/puppeteer-page.d.ts +2 -0
  153. package/testing/puppeteer/puppeteer-screenshot.d.ts +4 -0
  154. package/testing/reset-build-conditionals.d.ts +2 -0
  155. package/testing/spec-page.d.ts +2 -0
  156. package/testing/test-transpile.d.ts +2 -0
  157. package/{dist/testing → testing}/testing-logger.d.ts +10 -8
  158. package/testing/testing-sys.d.ts +1 -0
  159. package/{dist/testing → testing}/testing-utils.d.ts +3 -2
  160. package/testing/testing.d.ts +2 -0
  161. package/build-conditionals/index.d.ts +0 -2
  162. package/build-conditionals/index.mjs +0 -66
  163. package/build-conditionals/package.json +0 -6
  164. package/compiler/index.js +0 -2
  165. package/dist/cli/index.js +0 -6068
  166. package/dist/client/css-shim-14a9812e.js +0 -656
  167. package/dist/client/css-shim-69821662.js +0 -658
  168. package/dist/client/declarations/rindo.core.d.ts +0 -1347
  169. package/dist/client/dom-68c8fe31.js +0 -139
  170. package/dist/client/dom-af01458a.js +0 -137
  171. package/dist/client/index.js +0 -2937
  172. package/dist/client/polyfills/core-js.js +0 -10
  173. package/dist/client/polyfills/css-shim.js +0 -656
  174. package/dist/client/polyfills/dom.js +0 -146
  175. package/dist/client/polyfills/es5-html-element.js +0 -18
  176. package/dist/client/polyfills/index.js +0 -35
  177. package/dist/client/polyfills/promise.js +0 -9
  178. package/dist/client/polyfills/system.js +0 -6
  179. package/dist/client/shadow-css-6ef31c68.js +0 -386
  180. package/dist/client/shadow-css-8fd1a9e4.js +0 -388
  181. package/dist/compiler/app-core/app-es5-disabled.d.ts +0 -2
  182. package/dist/compiler/app-core/app-polyfills.d.ts +0 -3
  183. package/dist/compiler/app-core/build-conditionals.d.ts +0 -6
  184. package/dist/compiler/app-core/bundle-app-core.d.ts +0 -6
  185. package/dist/compiler/app-core/component-styles.d.ts +0 -4
  186. package/dist/compiler/app-core/format-component-runtime-meta.d.ts +0 -4
  187. package/dist/compiler/app-core/optimize-module.d.ts +0 -7
  188. package/dist/compiler/browser/build-conditionals-client.d.ts +0 -3
  189. package/dist/compiler/browser/compile-options.d.ts +0 -12
  190. package/dist/compiler/browser/compile.d.ts +0 -2
  191. package/dist/compiler/browser/create-compiler.d.ts +0 -14
  192. package/dist/compiler/browser/index.d.ts +0 -11
  193. package/dist/compiler/build/build-ctx.d.ts +0 -74
  194. package/dist/compiler/build/build-finish.d.ts +0 -3
  195. package/dist/compiler/build/build-hmr.d.ts +0 -2
  196. package/dist/compiler/build/build-results.d.ts +0 -2
  197. package/dist/compiler/build/build-stats.d.ts +0 -3
  198. package/dist/compiler/build/build.d.ts +0 -2
  199. package/dist/compiler/build/cache-stats.d.ts +0 -4
  200. package/dist/compiler/build/compiler-build-id.d.ts +0 -6
  201. package/dist/compiler/build/compiler-ctx.d.ts +0 -44
  202. package/dist/compiler/build/init-index-html.d.ts +0 -2
  203. package/dist/compiler/build/validate-files.d.ts +0 -2
  204. package/dist/compiler/build/write-build.d.ts +0 -2
  205. package/dist/compiler/cache.d.ts +0 -22
  206. package/dist/compiler/compiler.d.ts +0 -27
  207. package/dist/compiler/component-hydrate/bundle-hydrate-factory.d.ts +0 -3
  208. package/dist/compiler/component-hydrate/generate-hydrate-app.d.ts +0 -2
  209. package/dist/compiler/component-hydrate/hydrate-factory-closure.d.ts +0 -2
  210. package/dist/compiler/component-hydrate/update-to-hydrate-components.d.ts +0 -2
  211. package/dist/compiler/component-hydrate/write-hydrate-outputs.d.ts +0 -3
  212. package/dist/compiler/component-lazy/generate-cjs.d.ts +0 -3
  213. package/dist/compiler/component-lazy/generate-esm-browser.d.ts +0 -3
  214. package/dist/compiler/component-lazy/generate-esm.d.ts +0 -3
  215. package/dist/compiler/component-lazy/generate-lazy-app.d.ts +0 -3
  216. package/dist/compiler/component-lazy/generate-lazy-module.d.ts +0 -4
  217. package/dist/compiler/component-lazy/generate-system.d.ts +0 -3
  218. package/dist/compiler/component-lazy/update-to-lazy-component.d.ts +0 -2
  219. package/dist/compiler/component-lazy/write-lazy-entry-module.d.ts +0 -2
  220. package/dist/compiler/component-native/update-to-native-component.d.ts +0 -2
  221. package/dist/compiler/config/config-reload.d.ts +0 -3
  222. package/dist/compiler/config/config-utils.d.ts +0 -4
  223. package/dist/compiler/config/validate-config.d.ts +0 -4
  224. package/dist/compiler/config/validate-copy.d.ts +0 -2
  225. package/dist/compiler/config/validate-dev-server.d.ts +0 -2
  226. package/dist/compiler/config/validate-docs.d.ts +0 -2
  227. package/dist/compiler/config/validate-namespace.d.ts +0 -3
  228. package/dist/compiler/config/validate-output-stats.d.ts +0 -2
  229. package/dist/compiler/config/validate-outputs-angular.d.ts +0 -2
  230. package/dist/compiler/config/validate-outputs-custom.d.ts +0 -2
  231. package/dist/compiler/config/validate-outputs-dist-module.d.ts +0 -2
  232. package/dist/compiler/config/validate-outputs-dist.d.ts +0 -2
  233. package/dist/compiler/config/validate-outputs-hydrate-script.d.ts +0 -2
  234. package/dist/compiler/config/validate-outputs-www.d.ts +0 -2
  235. package/dist/compiler/config/validate-outputs.d.ts +0 -2
  236. package/dist/compiler/config/validate-paths.d.ts +0 -2
  237. package/dist/compiler/config/validate-plugins.d.ts +0 -2
  238. package/dist/compiler/config/validate-prerender.d.ts +0 -2
  239. package/dist/compiler/config/validate-rollup-config.d.ts +0 -2
  240. package/dist/compiler/config/validate-service-worker.d.ts +0 -2
  241. package/dist/compiler/config/validate-testing.d.ts +0 -2
  242. package/dist/compiler/config/validate-workers.d.ts +0 -2
  243. package/dist/compiler/copy/assets-copy-tasks.d.ts +0 -3
  244. package/dist/compiler/copy/hashed-copy.d.ts +0 -2
  245. package/dist/compiler/copy/local-copy-tasks.d.ts +0 -3
  246. package/dist/compiler/docs/constants.d.ts +0 -2
  247. package/dist/compiler/docs/custom/index.d.ts +0 -2
  248. package/dist/compiler/docs/docs.d.ts +0 -2
  249. package/dist/compiler/docs/generate-doc-data.d.ts +0 -3
  250. package/dist/compiler/docs/json/index.d.ts +0 -3
  251. package/dist/compiler/docs/readme/docs-util.d.ts +0 -13
  252. package/dist/compiler/docs/readme/index.d.ts +0 -3
  253. package/dist/compiler/docs/readme/markdown-css-props.d.ts +0 -2
  254. package/dist/compiler/docs/readme/markdown-dependencies.d.ts +0 -2
  255. package/dist/compiler/docs/readme/markdown-events.d.ts +0 -2
  256. package/dist/compiler/docs/readme/markdown-methods.d.ts +0 -2
  257. package/dist/compiler/docs/readme/markdown-props.d.ts +0 -2
  258. package/dist/compiler/docs/readme/markdown-slots.d.ts +0 -2
  259. package/dist/compiler/docs/readme/markdown-usage.d.ts +0 -6
  260. package/dist/compiler/docs/readme/output-docs.d.ts +0 -3
  261. package/dist/compiler/docs/style-docs.d.ts +0 -2
  262. package/dist/compiler/docs/vscode/index.d.ts +0 -2
  263. package/dist/compiler/entries/component-bundles.d.ts +0 -3
  264. package/dist/compiler/entries/component-graph.d.ts +0 -2
  265. package/dist/compiler/entries/default-bundles.d.ts +0 -3
  266. package/dist/compiler/entries/entry-modules.d.ts +0 -6
  267. package/dist/compiler/entries/resolve-component-dependencies.d.ts +0 -2
  268. package/dist/compiler/events.d.ts +0 -15
  269. package/dist/compiler/fs-watch/fs-watch-init.d.ts +0 -2
  270. package/dist/compiler/fs-watch/fs-watch-log.d.ts +0 -2
  271. package/dist/compiler/fs-watch/fs-watch-rebuild.d.ts +0 -7
  272. package/dist/compiler/html/inject-module-preloads.d.ts +0 -3
  273. package/dist/compiler/html/inject-sw-script.d.ts +0 -4
  274. package/dist/compiler/html/inline-esm-import.d.ts +0 -2
  275. package/dist/compiler/html/inline-style-sheets.d.ts +0 -2
  276. package/dist/compiler/html/update-global-styles-link.d.ts +0 -2
  277. package/dist/compiler/html/used-components.d.ts +0 -2
  278. package/dist/compiler/html/utils.d.ts +0 -2
  279. package/dist/compiler/html/validate-manifest-json.d.ts +0 -2
  280. package/dist/compiler/index.d.ts +0 -10
  281. package/dist/compiler/index.js +0 -18008
  282. package/dist/compiler/output-targets/empty-dir.d.ts +0 -6
  283. package/dist/compiler/output-targets/index.d.ts +0 -2
  284. package/dist/compiler/output-targets/output-angular.d.ts +0 -4
  285. package/dist/compiler/output-targets/output-app.d.ts +0 -4
  286. package/dist/compiler/output-targets/output-collection.d.ts +0 -3
  287. package/dist/compiler/output-targets/output-copy.d.ts +0 -2
  288. package/dist/compiler/output-targets/output-custom.d.ts +0 -2
  289. package/dist/compiler/output-targets/output-docs.d.ts +0 -2
  290. package/dist/compiler/output-targets/output-hydrate.d.ts +0 -2
  291. package/dist/compiler/output-targets/output-lazy-loader.d.ts +0 -2
  292. package/dist/compiler/output-targets/output-module.d.ts +0 -4
  293. package/dist/compiler/output-targets/output-prerender.d.ts +0 -2
  294. package/dist/compiler/output-targets/output-service-workers.d.ts +0 -2
  295. package/dist/compiler/output-targets/output-types.d.ts +0 -2
  296. package/dist/compiler/output-targets/output-utils.d.ts +0 -54
  297. package/dist/compiler/output-targets/output-www.d.ts +0 -2
  298. package/dist/compiler/plugin/plugin.d.ts +0 -6
  299. package/dist/compiler/prerender/crawl-urls.d.ts +0 -3
  300. package/dist/compiler/prerender/host-config.d.ts +0 -12
  301. package/dist/compiler/prerender/prerender-config.d.ts +0 -2
  302. package/dist/compiler/prerender/prerender-main.d.ts +0 -2
  303. package/dist/compiler/prerender/prerender-queue.d.ts +0 -3
  304. package/dist/compiler/prerender/prerender-template-html.d.ts +0 -2
  305. package/dist/compiler/prerender/prerendered-write-path.d.ts +0 -2
  306. package/dist/compiler/prerender/robots-txt.d.ts +0 -2
  307. package/dist/compiler/prerender/sitemap-xml.d.ts +0 -3
  308. package/dist/compiler/rollup-plugins/component-entry.d.ts +0 -3
  309. package/dist/compiler/rollup-plugins/css-transformer.d.ts +0 -3
  310. package/dist/compiler/rollup-plugins/global-scripts.d.ts +0 -4
  311. package/dist/compiler/rollup-plugins/image-plugin.d.ts +0 -3
  312. package/dist/compiler/rollup-plugins/in-memory-fs-read.d.ts +0 -3
  313. package/dist/compiler/rollup-plugins/loader.d.ts +0 -4
  314. package/dist/compiler/rollup-plugins/plugin-helper.d.ts +0 -5
  315. package/dist/compiler/rollup-plugins/rindo-build-conditionals.d.ts +0 -7
  316. package/dist/compiler/rollup-plugins/rindo-client.d.ts +0 -3
  317. package/dist/compiler/rollup-plugins/rindo-external-runtime.d.ts +0 -2
  318. package/dist/compiler/rollup-plugins/rindo-hydrate.d.ts +0 -3
  319. package/dist/compiler/rollup-plugins/rindo-public-plugin.d.ts +0 -2
  320. package/dist/compiler/service-worker/generate-sw.d.ts +0 -7
  321. package/dist/compiler/service-worker/service-worker-util.d.ts +0 -2
  322. package/dist/compiler/style/cached-styles.d.ts +0 -5
  323. package/dist/compiler/style/component-styles.d.ts +0 -2
  324. package/dist/compiler/style/css-imports.d.ts +0 -9
  325. package/dist/compiler/style/css-to-esm.d.ts +0 -5
  326. package/dist/compiler/style/generate-styles.d.ts +0 -2
  327. package/dist/compiler/style/global-styles.d.ts +0 -3
  328. package/dist/compiler/style/normalize-styles.d.ts +0 -2
  329. package/dist/compiler/style/optimize-css.d.ts +0 -2
  330. package/dist/compiler/style/scope-css.d.ts +0 -3
  331. package/dist/compiler/style/style-utils.d.ts +0 -10
  332. package/dist/compiler/transformers/add-component-meta-proxy.d.ts +0 -3
  333. package/dist/compiler/transformers/add-component-meta-static.d.ts +0 -4
  334. package/dist/compiler/transformers/add-imports.d.ts +0 -3
  335. package/dist/compiler/transformers/collections/add-external-import.d.ts +0 -2
  336. package/dist/compiler/transformers/collections/parse-collection-components.d.ts +0 -2
  337. package/dist/compiler/transformers/collections/parse-collection-deprecated.d.ts +0 -2
  338. package/dist/compiler/transformers/collections/parse-collection-manifest.d.ts +0 -7
  339. package/dist/compiler/transformers/collections/parse-collection-module.d.ts +0 -2
  340. package/dist/compiler/transformers/component-build-conditionals.d.ts +0 -2
  341. package/dist/compiler/transformers/component-hydrate/hydrate-component.d.ts +0 -3
  342. package/dist/compiler/transformers/component-hydrate/hydrate-runtime-cmp-meta.d.ts +0 -3
  343. package/dist/compiler/transformers/component-hydrate/tranform-to-hydrate-component.d.ts +0 -2
  344. package/dist/compiler/transformers/component-lazy/lazy-component.d.ts +0 -3
  345. package/dist/compiler/transformers/component-lazy/lazy-constructor.d.ts +0 -3
  346. package/dist/compiler/transformers/component-lazy/lazy-element-getter.d.ts +0 -3
  347. package/dist/compiler/transformers/component-lazy/transform-lazy-component.d.ts +0 -4
  348. package/dist/compiler/transformers/component-native/native-component.d.ts +0 -3
  349. package/dist/compiler/transformers/component-native/native-connected-callback.d.ts +0 -3
  350. package/dist/compiler/transformers/component-native/native-constructor.d.ts +0 -3
  351. package/dist/compiler/transformers/component-native/native-element-getter.d.ts +0 -3
  352. package/dist/compiler/transformers/component-native/native-static-style.d.ts +0 -3
  353. package/dist/compiler/transformers/component-native/tranform-to-native-component.d.ts +0 -4
  354. package/dist/compiler/transformers/core-runtime-apis.d.ts +0 -30
  355. package/dist/compiler/transformers/create-event.d.ts +0 -3
  356. package/dist/compiler/transformers/decorators-to-static/component-decorator.d.ts +0 -3
  357. package/dist/compiler/transformers/decorators-to-static/convert-decorators.d.ts +0 -3
  358. package/dist/compiler/transformers/decorators-to-static/decorator-utils.d.ts +0 -10
  359. package/dist/compiler/transformers/decorators-to-static/element-decorator.d.ts +0 -3
  360. package/dist/compiler/transformers/decorators-to-static/event-decorator.d.ts +0 -4
  361. package/dist/compiler/transformers/decorators-to-static/listen-decorator.d.ts +0 -6
  362. package/dist/compiler/transformers/decorators-to-static/method-decorator.d.ts +0 -3
  363. package/dist/compiler/transformers/decorators-to-static/prop-decorator.d.ts +0 -4
  364. package/dist/compiler/transformers/decorators-to-static/state-decorator.d.ts +0 -3
  365. package/dist/compiler/transformers/decorators-to-static/style-to-static.d.ts +0 -3
  366. package/dist/compiler/transformers/decorators-to-static/watch-decorator.d.ts +0 -3
  367. package/dist/compiler/transformers/define-custom-element.d.ts +0 -3
  368. package/dist/compiler/transformers/host-data-transform.d.ts +0 -3
  369. package/dist/compiler/transformers/legacy-props.d.ts +0 -3
  370. package/dist/compiler/transformers/remove-static-meta-properties.d.ts +0 -2
  371. package/dist/compiler/transformers/reserved-public-members.d.ts +0 -3
  372. package/dist/compiler/transformers/rindo-import-path.d.ts +0 -3
  373. package/dist/compiler/transformers/static-to-meta/call-expression.d.ts +0 -3
  374. package/dist/compiler/transformers/static-to-meta/class-methods.d.ts +0 -3
  375. package/dist/compiler/transformers/static-to-meta/component.d.ts +0 -3
  376. package/dist/compiler/transformers/static-to-meta/element-ref.d.ts +0 -2
  377. package/dist/compiler/transformers/static-to-meta/encapsulation.d.ts +0 -3
  378. package/dist/compiler/transformers/static-to-meta/events.d.ts +0 -3
  379. package/dist/compiler/transformers/static-to-meta/import.d.ts +0 -3
  380. package/dist/compiler/transformers/static-to-meta/listeners.d.ts +0 -3
  381. package/dist/compiler/transformers/static-to-meta/methods.d.ts +0 -3
  382. package/dist/compiler/transformers/static-to-meta/props.d.ts +0 -3
  383. package/dist/compiler/transformers/static-to-meta/states.d.ts +0 -3
  384. package/dist/compiler/transformers/static-to-meta/string-literal.d.ts +0 -3
  385. package/dist/compiler/transformers/static-to-meta/styles.d.ts +0 -3
  386. package/dist/compiler/transformers/static-to-meta/vdom.d.ts +0 -3
  387. package/dist/compiler/transformers/static-to-meta/visitor.d.ts +0 -3
  388. package/dist/compiler/transformers/static-to-meta/watchers.d.ts +0 -3
  389. package/dist/compiler/transformers/style-imports.d.ts +0 -3
  390. package/dist/compiler/transformers/transform-utils.d.ts +0 -31
  391. package/dist/compiler/transformers/update-component-class.d.ts +0 -3
  392. package/dist/compiler/transformers/update-rindo-core-import.d.ts +0 -3
  393. package/dist/compiler/transformers/watcher-meta-transform.d.ts +0 -3
  394. package/dist/compiler/transpile/compiler-options.d.ts +0 -4
  395. package/dist/compiler/transpile/transpile-app.d.ts +0 -2
  396. package/dist/compiler/transpile/transpile-module.d.ts +0 -5
  397. package/dist/compiler/transpile/transpile-service.d.ts +0 -3
  398. package/dist/compiler/transpile/transpile-to-es5-main.d.ts +0 -2
  399. package/dist/compiler/transpile/validate-types-main.d.ts +0 -2
  400. package/dist/compiler/types/generate-app-types.d.ts +0 -2
  401. package/dist/compiler/types/generate-component-types.d.ts +0 -8
  402. package/dist/compiler/types/generate-event-types.d.ts +0 -2
  403. package/dist/compiler/types/generate-method-types.d.ts +0 -2
  404. package/dist/compiler/types/generate-prop-types.d.ts +0 -2
  405. package/dist/compiler/types/generate-types.d.ts +0 -2
  406. package/dist/compiler/types/rindo-types.d.ts +0 -3
  407. package/dist/compiler/types/types-utils.d.ts +0 -4
  408. package/dist/compiler/types/update-import-refs.d.ts +0 -11
  409. package/dist/compiler/types/validate-package-json.d.ts +0 -9
  410. package/dist/declarations/assets.d.ts +0 -17
  411. package/dist/declarations/browser-compile.d.ts +0 -47
  412. package/dist/declarations/build-conditionals.d.ts +0 -91
  413. package/dist/declarations/build-events.d.ts +0 -19
  414. package/dist/declarations/build.d.ts +0 -247
  415. package/dist/declarations/cache.d.ts +0 -11
  416. package/dist/declarations/collection-manifest.d.ts +0 -106
  417. package/dist/declarations/collection.d.ts +0 -139
  418. package/dist/declarations/compiler.d.ts +0 -53
  419. package/dist/declarations/component-compiler-meta.d.ts +0 -198
  420. package/dist/declarations/component-constructor.d.ts +0 -61
  421. package/dist/declarations/component-interfaces.d.ts +0 -123
  422. package/dist/declarations/config.d.ts +0 -409
  423. package/dist/declarations/css-var-shim.d.ts +0 -9
  424. package/dist/declarations/decorators.d.ts +0 -150
  425. package/dist/declarations/dev-server.d.ts +0 -135
  426. package/dist/declarations/diagnostics.d.ts +0 -21
  427. package/dist/declarations/entry.d.ts +0 -28
  428. package/dist/declarations/events.d.ts +0 -13
  429. package/dist/declarations/file-system.d.ts +0 -91
  430. package/dist/declarations/fs-watch.d.ts +0 -15
  431. package/dist/declarations/host-element.d.ts +0 -53
  432. package/dist/declarations/hydrate.d.ts +0 -99
  433. package/dist/declarations/in-memory-fs.d.ts +0 -59
  434. package/dist/declarations/index.d.ts +0 -45
  435. package/dist/declarations/jsdoc.d.ts +0 -16
  436. package/dist/declarations/jsx.d.ts +0 -1050
  437. package/dist/declarations/logger.d.ts +0 -25
  438. package/dist/declarations/minify-js.d.ts +0 -11
  439. package/dist/declarations/module.d.ts +0 -35
  440. package/dist/declarations/optimize-css.d.ts +0 -12
  441. package/dist/declarations/output-targets.d.ts +0 -189
  442. package/dist/declarations/plugin.d.ts +0 -23
  443. package/dist/declarations/prerender.d.ts +0 -79
  444. package/dist/declarations/render.d.ts +0 -62
  445. package/dist/declarations/runtime.d.ts +0 -92
  446. package/dist/declarations/screenshots.d.ts +0 -192
  447. package/dist/declarations/server.d.ts +0 -19
  448. package/dist/declarations/style.d.ts +0 -35
  449. package/dist/declarations/system.d.ts +0 -174
  450. package/dist/declarations/testing.d.ts +0 -523
  451. package/dist/declarations/transpile.d.ts +0 -24
  452. package/dist/declarations/types.d.ts +0 -24
  453. package/dist/declarations/vdom.d.ts +0 -55
  454. package/dist/declarations/worker.d.ts +0 -33
  455. package/dist/dev-server/content-type-db.json +0 -1
  456. package/dist/dev-server/index.js +0 -887
  457. package/dist/dev-server/static/app-error.css +0 -257
  458. package/dist/dev-server/static/dev-server-client.html +0 -13
  459. package/dist/dev-server/templates/initial-load.html +0 -160
  460. package/dist/hydrate/index.d.ts +0 -101
  461. package/dist/hydrate/index.mjs +0 -1281
  462. package/dist/hydrate/platform.mjs +0 -347
  463. package/dist/index.d.ts +0 -99
  464. package/dist/mock-doc/index.d.ts +0 -851
  465. package/dist/mock-doc/index.js +0 -3982
  466. package/dist/mock-doc/index.mjs +0 -3954
  467. package/dist/runtime/index.js +0 -2576
  468. package/dist/runtime/index.mjs +0 -2521
  469. package/dist/runtime/shadow-css-6ef31c68.js +0 -386
  470. package/dist/runtime/shadow-css-8fd1a9e4.js +0 -388
  471. package/dist/screenshot/index.js +0 -520
  472. package/dist/sys/node/graceful-fs.js +0 -975
  473. package/dist/sys/node/index.js +0 -33545
  474. package/dist/sys/node/node-fetch.js +0 -1779
  475. package/dist/sys/node/open-in-editor.js +0 -734
  476. package/dist/sys/node/sys-worker.js +0 -67035
  477. package/dist/sys/node/websocket.js +0 -3728
  478. package/dist/testing/build-conditionals.d.ts +0 -4
  479. package/dist/testing/build-conditionals.js +0 -43
  480. package/dist/testing/core.d.ts +0 -35
  481. package/dist/testing/core.js +0 -52
  482. package/dist/testing/index.js +0 -40511
  483. package/dist/testing/jest/jest-config.d.ts +0 -4
  484. package/dist/testing/mock-fetch.d.ts +0 -46
  485. package/dist/testing/mocks.d.ts +0 -12
  486. package/dist/testing/platform.d.ts +0 -23
  487. package/dist/testing/platform.js +0 -321
  488. package/dist/testing/puppeteer/puppeteer-emulate.d.ts +0 -2
  489. package/dist/testing/puppeteer/puppeteer-find.d.ts +0 -5
  490. package/dist/testing/puppeteer/puppeteer-page.d.ts +0 -2
  491. package/dist/testing/puppeteer/puppeteer-screenshot.d.ts +0 -4
  492. package/dist/testing/spec-page.d.ts +0 -5
  493. package/dist/testing/task-queue.d.ts +0 -15
  494. package/dist/testing/test-transpile.d.ts +0 -5
  495. package/dist/testing/testing-fs.d.ts +0 -31
  496. package/dist/testing/testing-sys.d.ts +0 -19
  497. package/dist/testing/testing.d.ts +0 -12
  498. package/dist/utils/index.js +0 -1575
  499. package/dist/utils/index.mjs +0 -1511
  500. package/internal/client/css-shim.rindo-client.mjs +0 -656
  501. package/internal/client/index.mjs +0 -2859
  502. package/internal/client/polyfills/promise.js +0 -9
  503. package/internal/images.d.ts +0 -5
  504. package/runtime/package.json +0 -5
  505. package/screenshot/compare/build/p-020f8d73.js +0 -1
  506. package/screenshot/compare/build/p-09qdknbg.system.entry.js +0 -1
  507. package/screenshot/compare/build/p-0a13mpsc.system.entry.js +0 -1
  508. package/screenshot/compare/build/p-168ec2c4.system.js +0 -1
  509. package/screenshot/compare/build/p-2ab1fdf1.system.js +0 -1
  510. package/screenshot/compare/build/p-2pxcsgrj.entry.js +0 -1
  511. package/screenshot/compare/build/p-42fb7034.system.js +0 -1
  512. package/screenshot/compare/build/p-54d9d7c2.system.js +0 -1
  513. package/screenshot/compare/build/p-67c1f911.js +0 -1
  514. package/screenshot/compare/build/p-68613371.system.js +0 -1
  515. package/screenshot/compare/build/p-7dvsjpu0.entry.js +0 -1
  516. package/screenshot/compare/build/p-aa67fb06.js +0 -1
  517. package/screenshot/compare/build/p-aeb3cec1.system.js +0 -1
  518. package/screenshot/compare/build/p-b6e44a24.js +0 -1
  519. package/screenshot/compare/build/p-c1c25b8a.js +0 -1
  520. package/screenshot/compare/build/p-c9bopbjy.system.entry.js +0 -1
  521. package/screenshot/compare/build/p-c9iqz1pp.system.entry.js +0 -1
  522. package/screenshot/compare/build/p-dizjz8rg.entry.js +0 -1
  523. package/screenshot/compare/build/p-dnta0rwp.system.entry.js +0 -1
  524. package/screenshot/compare/build/p-e9670d22.system.js +0 -1
  525. package/screenshot/compare/build/p-ei9jkpd0.system.entry.js +0 -1
  526. package/screenshot/compare/build/p-ejwcppol.entry.js +0 -1
  527. package/screenshot/compare/build/p-f6612d5d.system.js +0 -1
  528. package/screenshot/compare/build/p-foiivsfc.css +0 -1
  529. package/screenshot/compare/build/p-gpjjyogx.entry.js +0 -1
  530. package/screenshot/compare/build/p-howklem2.system.entry.js +0 -1
  531. package/screenshot/compare/build/p-knv9wvoc.entry.js +0 -1
  532. package/screenshot/compare/build/p-nsqsfhhy.entry.js +0 -1
  533. package/screenshot/compare/build/p-ojt278pp.entry.js +0 -1
  534. package/screenshot/compare/build/p-oywass99.entry.js +0 -1
  535. package/screenshot/compare/build/p-q3ujhub6.entry.js +0 -1
  536. package/screenshot/compare/build/p-qw4xnmxv.entry.js +0 -1
  537. package/screenshot/compare/build/p-t1wvevhc.system.entry.js +0 -1
  538. package/screenshot/compare/build/p-tnjarrex.system.entry.js +0 -1
  539. package/screenshot/compare/build/p-vhfpd6kk.system.entry.js +0 -1
  540. package/screenshot/compare/build/p-vk6rhemd.system.entry.js +0 -1
  541. package/screenshot/compare/build/p-w6bnm16k.entry.js +0 -1
  542. package/screenshot/compare/build/p-xje6d7zl.system.entry.js +0 -1
  543. package/screenshot/compare/build/p-y5jlrcha.system.entry.js +0 -1
  544. package/screenshot/compare/build/p-yh170wkt.entry.js +0 -1
  545. package/testing/jest.preprocessor.js +0 -7
@@ -0,0 +1,2183 @@
1
+ import { BuildEvents, BuildLog, BuildOutput, CompilerBuildResults, CompilerBuildStart, CompilerFsStats, CompilerSystem, CompilerRequestResponse, Config, CopyResults, DevServerConfig, DevServerEditor, Diagnostic, FsWatcher, FsWriteOptions, Logger, LoggerTimeSpan, OptimizeCssInput, OptimizeCssOutput, OutputTargetWww, PageReloadStrategy, PrerenderConfig, StyleDoc, LoggerLineUpdater } from './rindo-public-compiler';
2
+ import { ComponentInterface, ListenOptions, ListenTargetOptions, VNode, VNodeData } from './rindo-public-runtime';
3
+ export interface PrintLine {
4
+ lineIndex: number;
5
+ lineNumber: number;
6
+ text?: string;
7
+ errorCharStart: number;
8
+ errorLength?: number;
9
+ }
10
+ export interface AssetsMeta {
11
+ absolutePath: string;
12
+ cmpRelativePath: string;
13
+ originalComponentPath: string;
14
+ }
15
+ export interface ParsedImport {
16
+ importPath: string;
17
+ basename: string;
18
+ ext: string;
19
+ data: ImportData;
20
+ }
21
+ export interface ImportData {
22
+ tag?: string;
23
+ encapsulation?: string;
24
+ mode?: string;
25
+ }
26
+ export interface SerializeImportData extends ImportData {
27
+ importeePath: string;
28
+ importerPath?: string;
29
+ }
30
+ export interface BuildFeatures {
31
+ style: boolean;
32
+ mode: boolean;
33
+ shadowDom: boolean;
34
+ shadowDelegatesFocus: boolean;
35
+ scoped: boolean;
36
+ /**
37
+ * Every component has a render function
38
+ */
39
+ allRenderFn: boolean;
40
+ /**
41
+ * At least one component has a render function
42
+ */
43
+ hasRenderFn: boolean;
44
+ vdomRender: boolean;
45
+ vdomAttribute: boolean;
46
+ vdomClass: boolean;
47
+ vdomFunctional: boolean;
48
+ vdomKey: boolean;
49
+ vdomListener: boolean;
50
+ vdomPropOrAttr: boolean;
51
+ vdomRef: boolean;
52
+ vdomStyle: boolean;
53
+ vdomText: boolean;
54
+ vdomXlink: boolean;
55
+ slotRelocation: boolean;
56
+ slot: boolean;
57
+ svg: boolean;
58
+ element: boolean;
59
+ event: boolean;
60
+ hostListener: boolean;
61
+ hostListenerTargetWindow: boolean;
62
+ hostListenerTargetDocument: boolean;
63
+ hostListenerTargetBody: boolean;
64
+ hostListenerTargetParent: boolean;
65
+ hostListenerTarget: boolean;
66
+ method: boolean;
67
+ prop: boolean;
68
+ propMutable: boolean;
69
+ state: boolean;
70
+ watchCallback: boolean;
71
+ member: boolean;
72
+ updatable: boolean;
73
+ propBoolean: boolean;
74
+ propNumber: boolean;
75
+ propString: boolean;
76
+ lifecycle: boolean;
77
+ cmpDidLoad: boolean;
78
+ cmpShouldUpdate: boolean;
79
+ cmpWillLoad: boolean;
80
+ cmpDidUpdate: boolean;
81
+ cmpWillUpdate: boolean;
82
+ cmpWillRender: boolean;
83
+ cmpDidRender: boolean;
84
+ cmpDidUnload: boolean;
85
+ connectedCallback: boolean;
86
+ disconnectedCallback: boolean;
87
+ asyncLoading: boolean;
88
+ observeAttribute: boolean;
89
+ reflect: boolean;
90
+ taskQueue: boolean;
91
+ }
92
+ export interface BuildConditionals extends Partial<BuildFeatures> {
93
+ hotModuleReplacement?: boolean;
94
+ isDebug?: boolean;
95
+ isTesting?: boolean;
96
+ isDev?: boolean;
97
+ devTools?: boolean;
98
+ hydrateServerSide?: boolean;
99
+ hydrateClientSide?: boolean;
100
+ lifecycleDOMEvents?: boolean;
101
+ cssAnnotations?: boolean;
102
+ lazyLoad?: boolean;
103
+ profile?: boolean;
104
+ cssVarShim?: boolean;
105
+ constructableCSS?: boolean;
106
+ appendChildSlotFix?: boolean;
107
+ slotChildNodesFix?: boolean;
108
+ cloneNodeFix?: boolean;
109
+ dynamicImportShim?: boolean;
110
+ hydratedAttribute?: boolean;
111
+ hydratedClass?: boolean;
112
+ initializeNextTick?: boolean;
113
+ safari10?: boolean;
114
+ scriptDataOpts?: boolean;
115
+ shadowDomShim?: boolean;
116
+ asyncQueue?: boolean;
117
+ transformTagName?: boolean;
118
+ attachStyles?: boolean;
119
+ }
120
+ export declare type ModuleFormat = 'amd' | 'cjs' | 'es' | 'iife' | 'system' | 'umd' | 'commonjs' | 'esm' | 'module' | 'systemjs';
121
+ export interface RollupResultModule {
122
+ id: string;
123
+ }
124
+ export interface RollupResults {
125
+ modules: RollupResultModule[];
126
+ }
127
+ export interface BuildCtx {
128
+ buildId: number;
129
+ buildResults: CompilerBuildResults;
130
+ buildMessages: string[];
131
+ bundleBuildCount: number;
132
+ collections: Collection[];
133
+ compilerCtx: CompilerCtx;
134
+ components: ComponentCompilerMeta[];
135
+ componentGraph: Map<string, string[]>;
136
+ config: Config;
137
+ createTimeSpan(msg: string, debug?: boolean): LoggerTimeSpan;
138
+ data: any;
139
+ debug: (msg: string) => void;
140
+ diagnostics: Diagnostic[];
141
+ dirsAdded: string[];
142
+ dirsDeleted: string[];
143
+ entryModules: EntryModule[];
144
+ filesAdded: string[];
145
+ filesChanged: string[];
146
+ filesDeleted: string[];
147
+ filesUpdated: string[];
148
+ filesWritten: string[];
149
+ globalStyle: string | undefined;
150
+ hasConfigChanges: boolean;
151
+ hasError: boolean;
152
+ hasFinished: boolean;
153
+ hasHtmlChanges: boolean;
154
+ hasPrintedResults: boolean;
155
+ hasServiceWorkerChanges: boolean;
156
+ hasScriptChanges: boolean;
157
+ hasStyleChanges: boolean;
158
+ hasWarning: boolean;
159
+ hydrateAppFilePath: string;
160
+ indexBuildCount: number;
161
+ indexDoc: Document;
162
+ isRebuild: boolean;
163
+ moduleFiles: Module[];
164
+ packageJson: PackageJsonData;
165
+ pendingCopyTasks: Promise<CopyResults>[];
166
+ progress(task: BuildTask): void;
167
+ requiresFullBuild: boolean;
168
+ rollupResults?: RollupResults;
169
+ scriptsAdded: string[];
170
+ scriptsDeleted: string[];
171
+ startTime: number;
172
+ styleBuildCount: number;
173
+ stylesPromise: Promise<void>;
174
+ stylesUpdated: BuildStyleUpdate[];
175
+ timeSpan: LoggerTimeSpan;
176
+ timestamp: string;
177
+ transpileBuildCount: number;
178
+ validateTypesBuild?(): Promise<void>;
179
+ validateTypesHandler?: (results: any) => Promise<void>;
180
+ validateTypesPromise?: Promise<any>;
181
+ }
182
+ export interface BuildStyleUpdate {
183
+ styleTag: string;
184
+ styleText: string;
185
+ styleMode: string;
186
+ }
187
+ export declare type BuildTask = any;
188
+ export declare type BuildStatus = 'pending' | 'error' | 'disabled' | 'default';
189
+ export interface BuildStats {
190
+ compiler: {
191
+ name: string;
192
+ version: string;
193
+ };
194
+ app: {
195
+ namespace: string;
196
+ fsNamespace: string;
197
+ components: number;
198
+ entries: number;
199
+ bundles: number;
200
+ };
201
+ options: {
202
+ minifyJs: boolean;
203
+ minifyCss: boolean;
204
+ hashFileNames: boolean;
205
+ hashedFileNameLength: number;
206
+ buildEs5: boolean;
207
+ };
208
+ components: BuildComponent[];
209
+ entries: BuildEntry[];
210
+ rollupResults: RollupResults;
211
+ sourceGraph: BuildSourceGraph;
212
+ collections: {
213
+ name: string;
214
+ source: string;
215
+ tags: string[];
216
+ }[];
217
+ }
218
+ export interface BuildEntry {
219
+ entryId: string;
220
+ components: BuildComponent[];
221
+ bundles: BuildBundle[];
222
+ inputs: string[];
223
+ modes?: string[];
224
+ encapsulations: Encapsulation[];
225
+ }
226
+ export interface BuildBundle {
227
+ fileName: string;
228
+ outputs: string[];
229
+ size?: number;
230
+ mode?: string;
231
+ scopedStyles?: boolean;
232
+ target?: string;
233
+ }
234
+ export interface BuildSourceGraph {
235
+ [filePath: string]: string[];
236
+ }
237
+ export interface BuildComponent {
238
+ tag: string;
239
+ dependencyOf?: string[];
240
+ dependencies?: string[];
241
+ }
242
+ export interface BundleOutputChunk {
243
+ code: string;
244
+ fileName: string;
245
+ isDynamicEntry: boolean;
246
+ isEntry: boolean;
247
+ map: any;
248
+ dynamicImports: string[];
249
+ imports: string[];
250
+ exports: string[];
251
+ modules: {
252
+ [modulePath: string]: {
253
+ renderedExports: string[];
254
+ removedExports: string[];
255
+ renderedLength: number;
256
+ originalLength: number;
257
+ };
258
+ };
259
+ name: string;
260
+ }
261
+ export declare type SourceTarget = 'es5' | 'es2017' | 'latest';
262
+ export interface BundleEntryInputs {
263
+ [entryKey: string]: string;
264
+ }
265
+ export declare type RollupResult = RollupChunkResult | RollupAssetResult;
266
+ export interface RollupAssetResult {
267
+ type: 'asset';
268
+ fileName: string;
269
+ content: string;
270
+ }
271
+ export interface RollupChunkResult {
272
+ type: 'chunk';
273
+ entryKey: string;
274
+ fileName: string;
275
+ code: string;
276
+ isEntry: boolean;
277
+ isComponent: boolean;
278
+ isCore: boolean;
279
+ isIndex: boolean;
280
+ isBrowserLoader: boolean;
281
+ imports: string[];
282
+ moduleFormat: ModuleFormat;
283
+ }
284
+ export interface BundleModule {
285
+ entryKey: string;
286
+ rollupResult: RollupChunkResult;
287
+ cmps: ComponentCompilerMeta[];
288
+ output: BundleModuleOutput;
289
+ }
290
+ export interface BundleModuleOutput {
291
+ bundleId: string;
292
+ fileName: string;
293
+ code: string;
294
+ }
295
+ export interface Cache {
296
+ get(key: string): Promise<string>;
297
+ put(key: string, value: string): Promise<boolean>;
298
+ has(key: string): Promise<boolean>;
299
+ createKey(domain: string, ...args: any[]): Promise<string>;
300
+ commit(): Promise<void>;
301
+ clear(): void;
302
+ clearDiskCache(): Promise<void>;
303
+ getMemoryStats(): string;
304
+ initCacheDir(): Promise<void>;
305
+ }
306
+ export interface CollectionCompilerMeta {
307
+ collectionName?: string;
308
+ moduleId?: string;
309
+ moduleDir?: string;
310
+ moduleFiles?: Module[];
311
+ global?: Module;
312
+ compiler?: CollectionCompilerVersion;
313
+ isInitialized?: boolean;
314
+ hasExports?: boolean;
315
+ dependencies?: string[];
316
+ bundles?: {
317
+ components: string[];
318
+ }[];
319
+ }
320
+ export interface CollectionCompilerVersion {
321
+ name: string;
322
+ version: string;
323
+ typescriptVersion?: string;
324
+ }
325
+ export interface CollectionManifest {
326
+ entries?: CollectionComponentEntryPath[];
327
+ collections?: CollectionDependencyManifest[];
328
+ global?: string;
329
+ compiler?: CollectionCompilerVersion;
330
+ bundles?: CollectionBundleManifest[];
331
+ /**
332
+ * DEPRECATED
333
+ */
334
+ components?: ComponentDataDeprecated[];
335
+ }
336
+ export declare type CollectionComponentEntryPath = string;
337
+ export interface CollectionBundleManifest {
338
+ components: string[];
339
+ }
340
+ export interface CollectionDependencyManifest {
341
+ name: string;
342
+ tags: string[];
343
+ }
344
+ /**** DEPRECATED *****/
345
+ export interface ComponentDataDeprecated {
346
+ tag?: string;
347
+ componentPath?: string;
348
+ componentClass?: string;
349
+ dependencies?: string[];
350
+ styles?: StylesDataDeprecated;
351
+ props?: PropManifestDeprecated[];
352
+ states?: StateManifestDeprecated[];
353
+ listeners?: ListenerManifestDeprecated[];
354
+ methods?: MethodManifestDeprecated[];
355
+ events?: EventManifestDeprecated[];
356
+ connect?: ConnectManifestDeprecated[];
357
+ context?: ContextManifestDeprecated[];
358
+ hostElement?: HostElementManifestDeprecated;
359
+ host?: any;
360
+ assetPaths?: string[];
361
+ slot?: 'hasSlots' | 'hasNamedSlots';
362
+ shadow?: boolean;
363
+ scoped?: boolean;
364
+ priority?: 'low';
365
+ }
366
+ export interface StylesDataDeprecated {
367
+ [modeName: string]: StyleDataDeprecated;
368
+ }
369
+ export interface StyleDataDeprecated {
370
+ stylePaths?: string[];
371
+ style?: string;
372
+ }
373
+ export interface PropManifestDeprecated {
374
+ name?: string;
375
+ type?: 'Boolean' | 'Number' | 'String' | 'Any';
376
+ mutable?: boolean;
377
+ attr?: string;
378
+ reflectToAttr?: boolean;
379
+ watch?: string[];
380
+ }
381
+ export interface StateManifestDeprecated {
382
+ name: string;
383
+ }
384
+ export interface ListenerManifestDeprecated {
385
+ event: string;
386
+ method: string;
387
+ capture?: boolean;
388
+ passive?: boolean;
389
+ enabled?: boolean;
390
+ }
391
+ export interface MethodManifestDeprecated {
392
+ name: string;
393
+ }
394
+ export interface EventManifestDeprecated {
395
+ event: string;
396
+ method?: string;
397
+ bubbles?: boolean;
398
+ cancelable?: boolean;
399
+ composed?: boolean;
400
+ }
401
+ export interface ConnectManifestDeprecated {
402
+ name: string;
403
+ tag?: string;
404
+ }
405
+ export interface ContextManifestDeprecated {
406
+ name: string;
407
+ id?: string;
408
+ }
409
+ export interface HostElementManifestDeprecated {
410
+ name: string;
411
+ }
412
+ /** OLD WAY */
413
+ export interface Collection {
414
+ collectionName?: string;
415
+ moduleDir?: string;
416
+ moduleFiles?: any[];
417
+ global?: any;
418
+ compiler?: CollectionCompiler;
419
+ isInitialized?: boolean;
420
+ hasExports?: boolean;
421
+ dependencies?: string[];
422
+ bundles?: {
423
+ components: string[];
424
+ }[];
425
+ }
426
+ export interface CollectionCompiler {
427
+ name: string;
428
+ version: string;
429
+ typescriptVersion?: string;
430
+ }
431
+ export interface AppRegistry {
432
+ namespace?: string;
433
+ fsNamespace?: string;
434
+ loader?: string;
435
+ core?: string;
436
+ corePolyfilled?: string;
437
+ global?: string;
438
+ components?: AppRegistryComponents;
439
+ }
440
+ export interface AppRegistryComponents {
441
+ [tagName: string]: {
442
+ bundleIds: ModeBundleIds;
443
+ encapsulation?: 'shadow' | 'scoped';
444
+ };
445
+ }
446
+ /** OLD WAY */
447
+ export interface ModuleFile {
448
+ sourceFilePath: string;
449
+ jsFilePath?: string;
450
+ dtsFilePath?: string;
451
+ cmpMeta?: any;
452
+ isCollectionDependency?: boolean;
453
+ excludeFromCollection?: boolean;
454
+ originalCollectionComponentPath?: string;
455
+ externalImports?: string[];
456
+ localImports?: string[];
457
+ potentialCmpRefs?: string[];
458
+ hasSlot?: boolean;
459
+ hasSvg?: boolean;
460
+ }
461
+ export interface ModuleBundles {
462
+ [bundleId: string]: string;
463
+ }
464
+ export interface CollectionData {
465
+ components?: ComponentData[];
466
+ collections?: CollectionDependencyData[];
467
+ global?: string;
468
+ modules?: string[];
469
+ compiler?: {
470
+ name: string;
471
+ version: string;
472
+ typescriptVersion?: string;
473
+ };
474
+ bundles?: CollectionBundle[];
475
+ }
476
+ export interface CollectionBundle {
477
+ components: string[];
478
+ }
479
+ export interface CollectionDependencyData {
480
+ name: string;
481
+ tags: string[];
482
+ }
483
+ export interface ComponentData {
484
+ tag?: string;
485
+ componentPath?: string;
486
+ componentClass?: string;
487
+ dependencies?: string[];
488
+ styles?: StylesData;
489
+ props?: PropData[];
490
+ states?: StateData[];
491
+ listeners?: ListenerData[];
492
+ methods?: MethodData[];
493
+ events?: EventData[];
494
+ connect?: ConnectData[];
495
+ context?: ContextData[];
496
+ hostElement?: HostElementData;
497
+ host?: any;
498
+ assetPaths?: string[];
499
+ slot?: 'hasSlots' | 'hasNamedSlots';
500
+ shadow?: boolean;
501
+ scoped?: boolean;
502
+ priority?: 'low';
503
+ }
504
+ export interface StylesData {
505
+ [modeName: string]: StyleData;
506
+ }
507
+ export interface StyleData {
508
+ stylePaths?: string[];
509
+ style?: string;
510
+ }
511
+ export interface PropData {
512
+ name?: string;
513
+ type?: 'Boolean' | 'Number' | 'String' | 'Any';
514
+ mutable?: boolean;
515
+ attr?: string;
516
+ reflectToAttr?: boolean;
517
+ watch?: string[];
518
+ }
519
+ export interface StateData {
520
+ name: string;
521
+ }
522
+ export interface ListenerData {
523
+ event: string;
524
+ method: string;
525
+ capture?: boolean;
526
+ passive?: boolean;
527
+ enabled?: boolean;
528
+ }
529
+ export interface MethodData {
530
+ name: string;
531
+ }
532
+ export interface EventData {
533
+ event: string;
534
+ method?: string;
535
+ bubbles?: boolean;
536
+ cancelable?: boolean;
537
+ composed?: boolean;
538
+ }
539
+ export interface ConnectData {
540
+ name: string;
541
+ tag?: string;
542
+ }
543
+ export interface ContextData {
544
+ name: string;
545
+ id?: string;
546
+ }
547
+ export interface HostElementData {
548
+ name: string;
549
+ }
550
+ export interface BuildOutputFile {
551
+ name: string;
552
+ content: string;
553
+ }
554
+ export declare type OnCallback = (buildStart: CompilerBuildStart) => void;
555
+ export declare type RemoveCallback = () => boolean;
556
+ export interface CompilerCtx {
557
+ version: number;
558
+ activeBuildId: number;
559
+ activeDirsAdded: string[];
560
+ activeDirsDeleted: string[];
561
+ activeFilesAdded: string[];
562
+ activeFilesDeleted: string[];
563
+ activeFilesUpdated: string[];
564
+ cache: Cache;
565
+ cachedStyleMeta: Map<string, StyleCompiler>;
566
+ cachedGlobalStyle: string;
567
+ collections: CollectionCompilerMeta[];
568
+ compilerOptions: any;
569
+ events: BuildEvents;
570
+ fs: InMemoryFileSystem;
571
+ fsWatcher: FsWatcher;
572
+ hasSuccessfulBuild: boolean;
573
+ isActivelyBuilding: boolean;
574
+ lastComponentStyleInput: Map<string, string>;
575
+ lastBuildResults: CompilerBuildResults;
576
+ lastBuildStyles: Map<string, string>;
577
+ moduleMap: ModuleMap;
578
+ nodeMap: NodeMap;
579
+ resolvedCollections: Set<string>;
580
+ rollupCacheHydrate: any;
581
+ rollupCacheLazy: any;
582
+ rollupCacheNative: any;
583
+ rootTsFiles: string[];
584
+ styleModeNames: Set<string>;
585
+ tsService: TsService;
586
+ changedModules: Set<string>;
587
+ changedFiles: Set<string>;
588
+ worker?: CompilerWorkerContext;
589
+ rollupCache: Map<string, any>;
590
+ reset(): void;
591
+ }
592
+ export declare type NodeMap = WeakMap<any, ComponentCompilerMeta>;
593
+ export declare type TsService = (compilerCtx: CompilerCtx, buildCtx: BuildCtx, tsFilePaths: string[], checkCacheKey: boolean, useFsCache: boolean) => Promise<boolean>;
594
+ /** Must be serializable to JSON!! */
595
+ export interface ComponentCompilerFeatures {
596
+ hasAttribute: boolean;
597
+ hasAttributeChangedCallbackFn: boolean;
598
+ hasComponentWillLoadFn: boolean;
599
+ hasComponentDidLoadFn: boolean;
600
+ hasComponentShouldUpdateFn: boolean;
601
+ hasComponentWillUpdateFn: boolean;
602
+ hasComponentDidUpdateFn: boolean;
603
+ hasComponentWillRenderFn: boolean;
604
+ hasComponentDidRenderFn: boolean;
605
+ hasComponentDidUnloadFn: boolean;
606
+ hasConnectedCallbackFn: boolean;
607
+ hasDisconnectedCallbackFn: boolean;
608
+ hasElement: boolean;
609
+ hasEvent: boolean;
610
+ hasLifecycle: boolean;
611
+ hasListener: boolean;
612
+ hasListenerTarget: boolean;
613
+ hasListenerTargetWindow: boolean;
614
+ hasListenerTargetDocument: boolean;
615
+ hasListenerTargetBody: boolean;
616
+ hasListenerTargetParent: boolean;
617
+ hasMember: boolean;
618
+ hasMethod: boolean;
619
+ hasMode: boolean;
620
+ hasProp: boolean;
621
+ hasPropBoolean: boolean;
622
+ hasPropNumber: boolean;
623
+ hasPropString: boolean;
624
+ hasPropMutable: boolean;
625
+ hasReflect: boolean;
626
+ hasRenderFn: boolean;
627
+ hasState: boolean;
628
+ hasStyle: boolean;
629
+ hasVdomAttribute: boolean;
630
+ hasVdomClass: boolean;
631
+ hasVdomFunctional: boolean;
632
+ hasVdomKey: boolean;
633
+ hasVdomListener: boolean;
634
+ hasVdomPropOrAttr: boolean;
635
+ hasVdomRef: boolean;
636
+ hasVdomRender: boolean;
637
+ hasVdomStyle: boolean;
638
+ hasVdomText: boolean;
639
+ hasVdomXlink: boolean;
640
+ hasWatchCallback: boolean;
641
+ htmlAttrNames: string[];
642
+ htmlTagNames: string[];
643
+ htmlParts: string[];
644
+ isUpdateable: boolean;
645
+ isPlain: boolean;
646
+ potentialCmpRefs: string[];
647
+ }
648
+ /** Must be serializable to JSON!! */
649
+ export interface ComponentCompilerMeta extends ComponentCompilerFeatures {
650
+ assetsDirs: CompilerAssetDir[];
651
+ componentClassName: string;
652
+ elementRef: string;
653
+ encapsulation: Encapsulation;
654
+ shadowDelegatesFocus: boolean;
655
+ excludeFromCollection: boolean;
656
+ isCollectionDependency: boolean;
657
+ isLegacy: boolean;
658
+ docs: CompilerJsDoc;
659
+ jsFilePath: string;
660
+ listeners: ComponentCompilerListener[];
661
+ events: ComponentCompilerEvent[];
662
+ methods: ComponentCompilerMethod[];
663
+ virtualProperties: ComponentCompilerVirtualProperty[];
664
+ properties: ComponentCompilerProperty[];
665
+ watchers: ComponentCompilerWatch[];
666
+ sourceFilePath: string;
667
+ states: ComponentCompilerState[];
668
+ styleDocs: CompilerStyleDoc[];
669
+ styles: StyleCompiler[];
670
+ tagName: string;
671
+ internal: boolean;
672
+ legacyConnect: ComponentCompilerLegacyConnect[];
673
+ legacyContext: ComponentCompilerLegacyContext[];
674
+ dependencies?: string[];
675
+ dependents?: string[];
676
+ directDependencies?: string[];
677
+ directDependents?: string[];
678
+ }
679
+ export interface ComponentCompilerLegacyConnect {
680
+ name: string;
681
+ connect: string;
682
+ }
683
+ export interface ComponentCompilerLegacyContext {
684
+ name: string;
685
+ context: string;
686
+ }
687
+ export declare type Encapsulation = 'shadow' | 'scoped' | 'none';
688
+ export interface ComponentCompilerStaticProperty {
689
+ mutable: boolean;
690
+ optional: boolean;
691
+ required: boolean;
692
+ type: ComponentCompilerPropertyType;
693
+ complexType: ComponentCompilerPropertyComplexType;
694
+ attribute?: string;
695
+ reflect?: boolean;
696
+ docs: CompilerJsDoc;
697
+ defaultValue?: string;
698
+ }
699
+ export interface ComponentCompilerProperty extends ComponentCompilerStaticProperty {
700
+ name: string;
701
+ internal: boolean;
702
+ }
703
+ export interface ComponentCompilerVirtualProperty {
704
+ name: string;
705
+ type: string;
706
+ docs: string;
707
+ }
708
+ export declare type ComponentCompilerPropertyType = 'any' | 'string' | 'boolean' | 'number' | 'unknown';
709
+ export interface ComponentCompilerPropertyComplexType {
710
+ original: string;
711
+ resolved: string;
712
+ references: ComponentCompilerTypeReferences;
713
+ }
714
+ export interface ComponentCompilerTypeReferences {
715
+ [key: string]: ComponentCompilerTypeReference;
716
+ }
717
+ export interface ComponentCompilerTypeReference {
718
+ location: 'local' | 'global' | 'import';
719
+ path?: string;
720
+ }
721
+ export interface ComponentCompilerStaticEvent {
722
+ name: string;
723
+ method: string;
724
+ bubbles: boolean;
725
+ cancelable: boolean;
726
+ composed: boolean;
727
+ docs: CompilerJsDoc;
728
+ complexType: ComponentCompilerEventComplexType;
729
+ }
730
+ export interface ComponentCompilerEvent extends ComponentCompilerStaticEvent {
731
+ internal: boolean;
732
+ }
733
+ export interface ComponentCompilerEventComplexType {
734
+ original: string;
735
+ resolved: string;
736
+ references: ComponentCompilerTypeReferences;
737
+ }
738
+ export interface ComponentCompilerListener {
739
+ name: string;
740
+ method: string;
741
+ capture: boolean;
742
+ passive: boolean;
743
+ target: ListenTargetOptions | undefined;
744
+ }
745
+ export interface ComponentCompilerStaticMethod {
746
+ docs: CompilerJsDoc;
747
+ complexType: ComponentCompilerMethodComplexType;
748
+ }
749
+ export interface ComponentCompilerMethodComplexType {
750
+ signature: string;
751
+ parameters: CompilerJsDoc[];
752
+ references: ComponentCompilerTypeReferences;
753
+ return: string;
754
+ }
755
+ export interface ComponentCompilerWatch {
756
+ propName: string;
757
+ methodName: string;
758
+ }
759
+ export interface ComponentCompilerMethod extends ComponentCompilerStaticMethod {
760
+ name: string;
761
+ internal: boolean;
762
+ }
763
+ export interface ComponentCompilerState {
764
+ name: string;
765
+ }
766
+ export interface CompilerJsDoc {
767
+ text: string;
768
+ tags: CompilerJsDocTagInfo[];
769
+ }
770
+ export interface CompilerJsDocTagInfo {
771
+ name: string;
772
+ text?: string;
773
+ }
774
+ export interface CompilerStyleDoc {
775
+ name: string;
776
+ docs: string;
777
+ annotation: 'prop';
778
+ }
779
+ export interface CompilerAssetDir {
780
+ absolutePath?: string;
781
+ cmpRelativePath?: string;
782
+ originalComponentPath?: string;
783
+ }
784
+ export interface ComponentCompilerData {
785
+ exportLine: string;
786
+ filePath: string;
787
+ cmp: ComponentCompilerMeta;
788
+ uniqueComponentClassName?: string;
789
+ importLine?: string;
790
+ }
791
+ export interface ComponentConstructor {
792
+ is?: string;
793
+ properties?: ComponentConstructorProperties;
794
+ watchers?: ComponentConstructorWatchers;
795
+ events?: ComponentConstructorEvent[];
796
+ listeners?: ComponentConstructorListener[];
797
+ style?: string;
798
+ styleId?: string;
799
+ encapsulation?: ComponentConstructorEncapsulation;
800
+ observedAttributes?: string[];
801
+ cmpMeta?: ComponentRuntimeMeta;
802
+ isProxied?: boolean;
803
+ isStyleRegistered?: boolean;
804
+ }
805
+ export interface ComponentConstructorWatchers {
806
+ [propName: string]: string[];
807
+ }
808
+ export interface ComponentTestingConstructor extends ComponentConstructor {
809
+ COMPILER_META: ComponentCompilerMeta;
810
+ prototype?: {
811
+ componentWillLoad?: Function;
812
+ componentWillUpdate?: Function;
813
+ componentWillRender?: Function;
814
+ __componentWillLoad?: Function;
815
+ __componentWillUpdate?: Function;
816
+ __componentWillRender?: Function;
817
+ };
818
+ }
819
+ export interface ComponentNativeConstructor extends ComponentConstructor {
820
+ cmpMeta: ComponentRuntimeMeta;
821
+ }
822
+ export declare type ComponentConstructorEncapsulation = 'shadow' | 'scoped' | 'none';
823
+ export interface ComponentConstructorProperties {
824
+ [propName: string]: ComponentConstructorProperty;
825
+ }
826
+ export interface ComponentConstructorProperty {
827
+ attribute?: string;
828
+ elementRef?: boolean;
829
+ method?: boolean;
830
+ mutable?: boolean;
831
+ reflect?: boolean;
832
+ state?: boolean;
833
+ type?: ComponentConstructorPropertyType;
834
+ watchCallbacks?: string[];
835
+ }
836
+ export declare type ComponentConstructorPropertyType = StringConstructor | BooleanConstructor | NumberConstructor | 'string' | 'boolean' | 'number';
837
+ export interface ComponentConstructorEvent {
838
+ name: string;
839
+ method: string;
840
+ bubbles: boolean;
841
+ cancelable: boolean;
842
+ composed: boolean;
843
+ }
844
+ export interface ComponentConstructorListener {
845
+ name: string;
846
+ method: string;
847
+ capture?: boolean;
848
+ passive?: boolean;
849
+ }
850
+ export interface HostConfig {
851
+ hosting?: {
852
+ rules?: HostRule[];
853
+ };
854
+ }
855
+ export interface HostRule {
856
+ include: string;
857
+ headers: HostRuleHeader[];
858
+ }
859
+ export interface HostRuleHeader {
860
+ name?: string;
861
+ value?: string;
862
+ }
863
+ export interface CssVarShim {
864
+ i(): Promise<any>;
865
+ addLink(linkEl: HTMLLinkElement): Promise<any>;
866
+ addGlobalStyle(styleEl: HTMLStyleElement): void;
867
+ createHostStyle(hostEl: HTMLElement, templateName: string, cssText: string, isScoped: boolean): HTMLStyleElement;
868
+ removeHost(hostEl: HTMLElement): void;
869
+ updateHost(hostEl: HTMLElement): void;
870
+ updateGlobal(): void;
871
+ }
872
+ export interface DevServerStartResponse {
873
+ address: string;
874
+ basePath: string;
875
+ browserUrl: string;
876
+ initialLoadUrl: string;
877
+ protocol: string;
878
+ port: number;
879
+ root: string;
880
+ error: string;
881
+ }
882
+ export interface DevClientWindow extends Window {
883
+ ['s-dev-server']: boolean;
884
+ ['s-initial-load']: boolean;
885
+ WebSocket: new (socketUrl: string, protos: string[]) => WebSocket;
886
+ devServerConfig?: DevClientConfig;
887
+ }
888
+ export interface DevClientConfig {
889
+ basePath: string;
890
+ editors: DevServerEditor[];
891
+ reloadStrategy: PageReloadStrategy;
892
+ socketUrl?: string;
893
+ }
894
+ export interface HttpRequest {
895
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'OPTIONS';
896
+ acceptHeader: string;
897
+ url: string;
898
+ pathname?: string;
899
+ filePath?: string;
900
+ stats?: CompilerFsStats;
901
+ headers?: {
902
+ [name: string]: string;
903
+ };
904
+ host?: string;
905
+ }
906
+ export interface DevServerMessage {
907
+ resolveId?: number;
908
+ startServer?: DevServerConfig;
909
+ serverStarted?: DevServerStartResponse;
910
+ buildLog?: BuildLog;
911
+ buildResults?: CompilerBuildResults;
912
+ requestBuildResults?: boolean;
913
+ error?: {
914
+ message?: string;
915
+ type?: string;
916
+ stack?: any;
917
+ };
918
+ isActivelyBuilding?: boolean;
919
+ compilerRequestPath?: string;
920
+ compilerRequestResults?: CompilerRequestResponse;
921
+ requestLog?: {
922
+ method: string;
923
+ url: string;
924
+ status: number;
925
+ };
926
+ }
927
+ export declare type DevServerDestroy = () => void;
928
+ export interface DevResponseHeaders {
929
+ 'cache-control'?: string;
930
+ 'expires'?: string;
931
+ 'content-type'?: string;
932
+ 'content-length'?: number;
933
+ 'date'?: string;
934
+ 'access-control-allow-origin'?: string;
935
+ 'access-control-expose-headers'?: string;
936
+ 'content-encoding'?: 'gzip';
937
+ 'vary'?: 'Accept-Encoding';
938
+ 'server'?: string;
939
+ 'x-directory-index'?: string;
940
+ 'x-source'?: string;
941
+ }
942
+ export interface OpenInEditorData {
943
+ file?: string;
944
+ line?: number;
945
+ column?: number;
946
+ open?: string;
947
+ editor?: string;
948
+ exists?: boolean;
949
+ error?: string;
950
+ }
951
+ export interface EntryModule {
952
+ entryKey: string;
953
+ cmps: ComponentCompilerMeta[];
954
+ }
955
+ export interface EntryBundle {
956
+ fileName: string;
957
+ text: string;
958
+ outputs: string[];
959
+ modeName: string;
960
+ isScopedStyles: boolean;
961
+ sourceTarget: string;
962
+ }
963
+ export interface EntryComponent {
964
+ tag: string;
965
+ dependencyOf?: string[];
966
+ }
967
+ export interface ComponentRef {
968
+ tag: string;
969
+ filePath: string;
970
+ }
971
+ export interface ModuleGraph {
972
+ filePath: string;
973
+ importPaths: string[];
974
+ }
975
+ export interface AddEventListener {
976
+ (elm: Element | Document | Window, eventName: string, cb: EventListenerCallback, opts?: ListenOptions): Function;
977
+ }
978
+ export interface EventListenerCallback {
979
+ (ev?: any): void;
980
+ }
981
+ export interface EventEmitterData<T = any> {
982
+ detail?: T;
983
+ bubbles?: boolean;
984
+ cancelable?: boolean;
985
+ composed?: boolean;
986
+ }
987
+ export interface FsReadOptions {
988
+ useCache?: boolean;
989
+ setHash?: boolean;
990
+ }
991
+ export interface FsReaddirOptions {
992
+ inMemoryOnly?: boolean;
993
+ recursive?: boolean;
994
+ /**
995
+ * Directory names to exclude. Just the basename,
996
+ * not the entire path. Basically for "node_moduels".
997
+ */
998
+ excludeDirNames?: string[];
999
+ /**
1000
+ * Extensions we know we can avoid. Each extension
1001
+ * should include the `.` so that we can test for both
1002
+ * `.d.ts.` and `.ts`. If `excludeExtensions` isn't provided it
1003
+ * doesn't try to exclude anything. This only checks against
1004
+ * the filename, not directory names when recursive.
1005
+ */
1006
+ excludeExtensions?: string[];
1007
+ }
1008
+ export interface FsReaddirItem {
1009
+ absPath: string;
1010
+ relPath: string;
1011
+ isDirectory: boolean;
1012
+ isFile: boolean;
1013
+ }
1014
+ export interface FsWriteResults {
1015
+ changedContent: boolean;
1016
+ queuedWrite: boolean;
1017
+ ignored: boolean;
1018
+ }
1019
+ export declare type FsItems = Map<string, FsItem>;
1020
+ export interface FsItem {
1021
+ fileText: string;
1022
+ isFile: boolean;
1023
+ isDirectory: boolean;
1024
+ size: number;
1025
+ mtimeMs: number;
1026
+ exists: boolean;
1027
+ queueCopyFileToDest: string;
1028
+ queueWriteToDisk: boolean;
1029
+ queueDeleteFromDisk?: boolean;
1030
+ useCache: boolean;
1031
+ }
1032
+ export interface HostElement extends HTMLElement {
1033
+ connectedCallback?: () => void;
1034
+ attributeChangedCallback?: (attribName: string, oldVal: string, newVal: string, namespace: string) => void;
1035
+ disconnectedCallback?: () => void;
1036
+ host?: Element;
1037
+ forceUpdate?: () => void;
1038
+ /**
1039
+ * Unique rindo id for this element
1040
+ */
1041
+ ['s-id']?: string;
1042
+ /**
1043
+ * Content Reference:
1044
+ * Reference to the HTML Comment that's placed inside of the
1045
+ * host element's original content. This comment is used to
1046
+ * always represent where host element's light dom is.
1047
+ */
1048
+ ['s-cr']?: RenderNode;
1049
+ /**
1050
+ * Lifecycle ready
1051
+ */
1052
+ ['s-lr']?: boolean;
1053
+ /**
1054
+ * On Render Callbacks:
1055
+ * Array of callbacks to fire off after it has rendered.
1056
+ */
1057
+ ['s-rc']?: (() => void)[];
1058
+ /**
1059
+ * Scope Id
1060
+ * The scope id of this component when using scoped css encapsulation
1061
+ * or using shadow dom but the browser doesn't support it
1062
+ */
1063
+ ['s-sc']?: string;
1064
+ /**
1065
+ * Hot Module Replacement, dev mode only
1066
+ */
1067
+ ['s-hmr']?: (versionId: string) => void;
1068
+ /**
1069
+ * Callback method for when HMR finishes
1070
+ */
1071
+ ['s-hmr-load']?: () => void;
1072
+ ['s-p']?: Promise<void>[];
1073
+ componentOnReady?: () => Promise<this>;
1074
+ }
1075
+ export interface InMemoryFileSystem {
1076
+ sys?: CompilerSystem;
1077
+ accessData(filePath: string): Promise<{
1078
+ exists: boolean;
1079
+ isDirectory: boolean;
1080
+ isFile: boolean;
1081
+ }>;
1082
+ access(filePath: string): Promise<boolean>;
1083
+ /**
1084
+ * Synchronous!!! Do not use!!!
1085
+ * (Only typescript transpiling is allowed to use)
1086
+ * @param filePath
1087
+ */
1088
+ accessSync(filePath: string): boolean;
1089
+ copyFile(srcFile: string, dest: string): Promise<void>;
1090
+ emptyDirs(dirPaths: string[]): Promise<void>;
1091
+ readdir(dirPath: string, opts?: FsReaddirOptions): Promise<FsReaddirItem[]>;
1092
+ readFile(filePath: string, opts?: FsReadOptions): Promise<string>;
1093
+ /**
1094
+ * Synchronous!!! Do not use!!!
1095
+ * (Only typescript transpiling is allowed to use)
1096
+ * @param filePath
1097
+ */
1098
+ readFileSync(filePath: string, opts?: FsReadOptions): string;
1099
+ remove(itemPath: string): Promise<void>;
1100
+ stat(itemPath: string): Promise<{
1101
+ isFile: boolean;
1102
+ isDirectory: boolean;
1103
+ }>;
1104
+ /**
1105
+ * Synchronous!!! Do not use!!!
1106
+ * (Only typescript transpiling is allowed to use)
1107
+ * @param itemPath
1108
+ */
1109
+ statSync(itemPath: string): {
1110
+ exists: boolean;
1111
+ isFile: boolean;
1112
+ isDirectory: boolean;
1113
+ };
1114
+ writeFile(filePath: string, content: string, opts?: FsWriteOptions): Promise<FsWriteResults>;
1115
+ writeFiles(files: {
1116
+ [filePath: string]: string;
1117
+ } | Map<string, String>, opts?: FsWriteOptions): Promise<FsWriteResults[]>;
1118
+ commit(): Promise<{
1119
+ filesWritten: string[];
1120
+ filesDeleted: string[];
1121
+ filesCopied: string[][];
1122
+ dirsDeleted: string[];
1123
+ dirsAdded: string[];
1124
+ }>;
1125
+ cancelDeleteFilesFromDisk(filePaths: string[]): void;
1126
+ cancelDeleteDirectoriesFromDisk(filePaths: string[]): void;
1127
+ clearDirCache(dirPath: string): void;
1128
+ clearFileCache(filePath: string): void;
1129
+ getItem(itemPath: string): FsItem;
1130
+ getBuildOutputs(): BuildOutput[];
1131
+ clearCache(): void;
1132
+ keys(): string[];
1133
+ getMemoryStats(): string;
1134
+ }
1135
+ export interface HydrateResults {
1136
+ diagnostics: Diagnostic[];
1137
+ url: string;
1138
+ host: string;
1139
+ hostname: string;
1140
+ href: string;
1141
+ port: string;
1142
+ pathname: string;
1143
+ search: string;
1144
+ hash: string;
1145
+ html: string;
1146
+ components: HydrateComponent[];
1147
+ anchors: HydrateAnchorElement[];
1148
+ styles: HydrateStyleElement[];
1149
+ scripts: HydrateScriptElement[];
1150
+ imgs: HydrateImgElement[];
1151
+ title: string;
1152
+ hydratedCount: number;
1153
+ httpStatus: number;
1154
+ }
1155
+ export interface HydrateComponent {
1156
+ tag: string;
1157
+ mode: string;
1158
+ count: number;
1159
+ depth: number;
1160
+ }
1161
+ export interface HydrateElement {
1162
+ [attrName: string]: string | undefined;
1163
+ }
1164
+ export interface HydrateAnchorElement extends HydrateElement {
1165
+ href?: string;
1166
+ target?: string;
1167
+ }
1168
+ export interface HydrateStyleElement extends HydrateElement {
1169
+ href?: string;
1170
+ }
1171
+ export interface HydrateScriptElement extends HydrateElement {
1172
+ src?: string;
1173
+ type?: string;
1174
+ }
1175
+ export interface HydrateImgElement extends HydrateElement {
1176
+ src?: string;
1177
+ }
1178
+ export interface JsDoc {
1179
+ name: string;
1180
+ documentation: string;
1181
+ type: string;
1182
+ tags: JSDocTagInfo[];
1183
+ default?: string;
1184
+ parameters?: JsDoc[];
1185
+ returns?: {
1186
+ type: string;
1187
+ documentation: string;
1188
+ };
1189
+ }
1190
+ export interface JSDocTagInfo {
1191
+ name: string;
1192
+ text?: string;
1193
+ }
1194
+ export interface MinifyJsResult {
1195
+ code: string;
1196
+ sourceMap: any;
1197
+ error: {
1198
+ message: string;
1199
+ filename: string;
1200
+ line: number;
1201
+ col: number;
1202
+ pos: number;
1203
+ };
1204
+ }
1205
+ export declare type ModuleMap = Map<string, Module>;
1206
+ /**
1207
+ * Module gets serialized/parsed as JSON
1208
+ * cannot use Map or Set
1209
+ */
1210
+ export interface Module {
1211
+ cmps: ComponentCompilerMeta[];
1212
+ coreRuntimeApis: string[];
1213
+ collectionName: string;
1214
+ dtsFilePath: string;
1215
+ excludeFromCollection: boolean;
1216
+ externalImports: string[];
1217
+ htmlAttrNames: string[];
1218
+ htmlTagNames: string[];
1219
+ htmlParts: string[];
1220
+ isCollectionDependency: boolean;
1221
+ isLegacy: boolean;
1222
+ jsFilePath: string;
1223
+ localImports: string[];
1224
+ originalImports: string[];
1225
+ originalCollectionComponentPath: string;
1226
+ potentialCmpRefs: string[];
1227
+ sourceFilePath: string;
1228
+ staticSourceFile: any;
1229
+ staticSourceFileText: string;
1230
+ hasVdomAttribute: boolean;
1231
+ hasVdomClass: boolean;
1232
+ hasVdomFunctional: boolean;
1233
+ hasVdomKey: boolean;
1234
+ hasVdomListener: boolean;
1235
+ hasVdomPropOrAttr: boolean;
1236
+ hasVdomRef: boolean;
1237
+ hasVdomRender: boolean;
1238
+ hasVdomStyle: boolean;
1239
+ hasVdomText: boolean;
1240
+ hasVdomXlink: boolean;
1241
+ }
1242
+ export interface Plugin {
1243
+ name?: string;
1244
+ pluginType?: string;
1245
+ load?: (id: string, context: PluginCtx) => Promise<string> | string;
1246
+ resolveId?: (importee: string, importer: string, context: PluginCtx) => Promise<string> | string;
1247
+ transform?: (sourceText: string, id: string, context: PluginCtx) => Promise<PluginTransformResults> | PluginTransformResults | string;
1248
+ }
1249
+ export interface PluginTransformResults {
1250
+ code?: string;
1251
+ map?: string;
1252
+ id?: string;
1253
+ diagnostics?: Diagnostic[];
1254
+ dependencies?: string[];
1255
+ }
1256
+ export interface PluginCtx {
1257
+ config: Config;
1258
+ sys: CompilerSystem;
1259
+ fs: InMemoryFileSystem;
1260
+ cache: Cache;
1261
+ diagnostics: Diagnostic[];
1262
+ }
1263
+ export interface PrerenderUrlResults {
1264
+ id: string;
1265
+ anchorUrls: string[];
1266
+ diagnostics: Diagnostic[];
1267
+ filePath: string;
1268
+ }
1269
+ export interface PrerenderUrlRequest {
1270
+ id: string;
1271
+ baseUrl: string;
1272
+ componentGraphPath: string;
1273
+ devServerHostUrl: string;
1274
+ hydrateAppFilePath: string;
1275
+ isDebug: boolean;
1276
+ prerenderConfigPath: string;
1277
+ staticSite: boolean;
1278
+ templateId: string;
1279
+ url: string;
1280
+ writeToFilePath: string;
1281
+ }
1282
+ export interface PrerenderManager {
1283
+ id: string;
1284
+ config: Config;
1285
+ prerenderUrlWorker: (prerenderRequest: PrerenderUrlRequest) => Promise<PrerenderUrlResults>;
1286
+ devServerHostUrl: string;
1287
+ diagnostics: Diagnostic[];
1288
+ hydrateAppFilePath: string;
1289
+ isDebug: boolean;
1290
+ logCount: number;
1291
+ outputTarget: OutputTargetWww;
1292
+ prerenderConfig: PrerenderConfig;
1293
+ prerenderConfigPath: string;
1294
+ progressLogger?: LoggerLineUpdater;
1295
+ resolve: Function;
1296
+ staticSite: boolean;
1297
+ templateId: string;
1298
+ componentGraphPath: string;
1299
+ urlsProcessing: Set<string>;
1300
+ urlsPending: Set<string>;
1301
+ urlsCompleted: Set<string>;
1302
+ maxConcurrency: number;
1303
+ }
1304
+ /**
1305
+ * Generic node that represents all of the
1306
+ * different types of nodes we'd see when rendering
1307
+ */
1308
+ export interface RenderNode extends HostElement {
1309
+ /**
1310
+ * Shadow root's host
1311
+ */
1312
+ host?: Element;
1313
+ /**
1314
+ * Is Content Reference Node:
1315
+ * This node is a content reference node.
1316
+ */
1317
+ ['s-cn']?: boolean;
1318
+ /**
1319
+ * Is a slot reference node:
1320
+ * This is a node that represents where a slots
1321
+ * was originally located.
1322
+ */
1323
+ ['s-sr']?: boolean;
1324
+ /**
1325
+ * Slot name
1326
+ */
1327
+ ['s-sn']?: string;
1328
+ /**
1329
+ * Host element tag name:
1330
+ * The tag name of the host element that this
1331
+ * node was created in.
1332
+ */
1333
+ ['s-hn']?: string;
1334
+ /**
1335
+ * Original Location Reference:
1336
+ * A reference pointing to the comment
1337
+ * which represents the original location
1338
+ * before it was moved to its slot.
1339
+ */
1340
+ ['s-ol']?: RenderNode;
1341
+ /**
1342
+ * Node reference:
1343
+ * This is a reference for a original location node
1344
+ * back to the node that's been moved around.
1345
+ */
1346
+ ['s-nr']?: RenderNode;
1347
+ /**
1348
+ * Scope Id
1349
+ */
1350
+ ['s-si']?: string;
1351
+ /**
1352
+ * Host Id (hydrate only)
1353
+ */
1354
+ ['s-host-id']?: number;
1355
+ /**
1356
+ * Node Id (hydrate only)
1357
+ */
1358
+ ['s-node-id']?: number;
1359
+ /**
1360
+ * Used to know the components encapsulation.
1361
+ * empty "" for shadow, "c" from scoped
1362
+ */
1363
+ ['s-en']?: '' | /*shadow*/ 'c';
1364
+ }
1365
+ export declare type LazyBundlesRuntimeData = LazyBundleRuntimeData[];
1366
+ export declare type LazyBundleRuntimeData = [
1367
+ /** bundleIds */
1368
+ string, ComponentRuntimeMetaCompact[]];
1369
+ export declare type ComponentRuntimeMetaCompact = [
1370
+ /** flags */
1371
+ number,
1372
+ /** tagname */
1373
+ string,
1374
+ /** members */
1375
+ {
1376
+ [memberName: string]: ComponentRuntimeMember;
1377
+ }?,
1378
+ /** listeners */
1379
+ ComponentRuntimeHostListener[]?];
1380
+ export interface ComponentRuntimeMeta {
1381
+ $flags$: number;
1382
+ $tagName$: string;
1383
+ $members$?: ComponentRuntimeMembers;
1384
+ $listeners$?: ComponentRuntimeHostListener[];
1385
+ $attrsToReflect$?: [string, string][];
1386
+ $watchers$?: ComponentConstructorWatchers;
1387
+ $lazyBundleId$?: string;
1388
+ }
1389
+ export interface ComponentRuntimeMembers {
1390
+ [memberName: string]: ComponentRuntimeMember;
1391
+ }
1392
+ export declare type ComponentRuntimeMember = [
1393
+ /**
1394
+ * flags data
1395
+ */
1396
+ number,
1397
+ /**
1398
+ * attribute name to observe
1399
+ */
1400
+ string?];
1401
+ export declare type ComponentRuntimeHostListener = [
1402
+ /**
1403
+ * event flags
1404
+ */
1405
+ number,
1406
+ /**
1407
+ * event name,
1408
+ */
1409
+ string,
1410
+ /**
1411
+ * event method,
1412
+ */
1413
+ string];
1414
+ export declare type ModeBundleId = ModeBundleIds | string;
1415
+ export interface ModeBundleIds {
1416
+ [modeName: string]: string;
1417
+ }
1418
+ export declare type RuntimeRef = HostElement | {};
1419
+ export interface HostRef {
1420
+ $ancestorComponent$?: HostElement;
1421
+ $flags$: number;
1422
+ $cmpMeta$: ComponentRuntimeMeta;
1423
+ $hostElement$?: HostElement;
1424
+ $instanceValues$?: Map<string, any>;
1425
+ $lazyInstance$?: ComponentInterface;
1426
+ $onReadyPromise$?: Promise<any>;
1427
+ $onReadyResolve$?: (elm: any) => void;
1428
+ $onInstancePromise$?: Promise<any>;
1429
+ $onInstanceResolve$?: (elm: any) => void;
1430
+ $onRenderResolve$?: () => void;
1431
+ $vnode$?: VNode;
1432
+ $queuedListeners$?: [string, any][];
1433
+ $rmListeners$?: (() => void)[];
1434
+ $modeName$?: string;
1435
+ $renderCount$?: number;
1436
+ }
1437
+ export interface PlatformRuntime {
1438
+ $cssShim$?: CssVarShim;
1439
+ $flags$: number;
1440
+ $orgLocNodes$?: Map<string, RenderNode>;
1441
+ $resourcesUrl$: string;
1442
+ jmp: (c: Function) => any;
1443
+ raf: (c: FrameRequestCallback) => number;
1444
+ ael: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
1445
+ rel: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
1446
+ ce: (eventName: string, opts?: any) => CustomEvent;
1447
+ }
1448
+ export declare type RefMap = WeakMap<any, HostRef>;
1449
+ export declare type StyleMap = Map<string, CSSStyleSheet | string>;
1450
+ export declare type RootAppliedStyleMap = WeakMap<Element, Set<string>>;
1451
+ export declare type AppliedStyleMap = Set<string>;
1452
+ export declare type ActivelyProcessingCmpMap = Set<Element>;
1453
+ export interface ScreenshotConnector {
1454
+ initBuild(opts: ScreenshotConnectorOptions): Promise<void>;
1455
+ completeBuild(masterBuild: ScreenshotBuild): Promise<ScreenshotBuildResults>;
1456
+ getMasterBuild(): Promise<ScreenshotBuild>;
1457
+ pullMasterBuild(): Promise<void>;
1458
+ publishBuild(buildResults: ScreenshotBuildResults): Promise<ScreenshotBuildResults>;
1459
+ getScreenshotCache(): Promise<ScreenshotCache>;
1460
+ updateScreenshotCache(screenshotCache: ScreenshotCache, buildResults: ScreenshotBuildResults): Promise<ScreenshotCache>;
1461
+ generateJsonpDataUris(build: ScreenshotBuild): Promise<void>;
1462
+ sortScreenshots(screenshots: Screenshot[]): Screenshot[];
1463
+ toJson(masterBuild: ScreenshotBuild, screenshotCache: ScreenshotCache): string;
1464
+ }
1465
+ export interface ScreenshotBuildResults {
1466
+ appNamespace: string;
1467
+ masterBuild: ScreenshotBuild;
1468
+ currentBuild: ScreenshotBuild;
1469
+ compare: ScreenshotCompareResults;
1470
+ }
1471
+ export interface ScreenshotCompareResults {
1472
+ id: string;
1473
+ a: {
1474
+ id: string;
1475
+ message: string;
1476
+ author: string;
1477
+ url: string;
1478
+ previewUrl: string;
1479
+ };
1480
+ b: {
1481
+ id: string;
1482
+ message: string;
1483
+ author: string;
1484
+ url: string;
1485
+ previewUrl: string;
1486
+ };
1487
+ timestamp: number;
1488
+ url: string;
1489
+ appNamespace: string;
1490
+ diffs: ScreenshotDiff[];
1491
+ }
1492
+ export interface ScreenshotConnectorOptions {
1493
+ buildId: string;
1494
+ buildMessage: string;
1495
+ buildAuthor?: string;
1496
+ buildUrl?: string;
1497
+ previewUrl?: string;
1498
+ appNamespace: string;
1499
+ buildTimestamp: number;
1500
+ logger: Logger;
1501
+ rootDir: string;
1502
+ cacheDir: string;
1503
+ packageDir: string;
1504
+ screenshotDirName?: string;
1505
+ imagesDirName?: string;
1506
+ buildsDirName?: string;
1507
+ currentBuildDir?: string;
1508
+ updateMaster?: boolean;
1509
+ allowableMismatchedPixels?: number;
1510
+ allowableMismatchedRatio?: number;
1511
+ pixelmatchThreshold?: number;
1512
+ waitBeforeScreenshot?: number;
1513
+ pixelmatchModulePath?: string;
1514
+ }
1515
+ export interface ScreenshotBuildData {
1516
+ buildId: string;
1517
+ rootDir: string;
1518
+ screenshotDir: string;
1519
+ imagesDir: string;
1520
+ buildsDir: string;
1521
+ currentBuildDir: string;
1522
+ updateMaster: boolean;
1523
+ allowableMismatchedPixels: number;
1524
+ allowableMismatchedRatio: number;
1525
+ pixelmatchThreshold: number;
1526
+ masterScreenshots: {
1527
+ [screenshotId: string]: string;
1528
+ };
1529
+ cache: {
1530
+ [cacheKey: string]: number;
1531
+ };
1532
+ timeoutBeforeScreenshot: number;
1533
+ pixelmatchModulePath: string;
1534
+ }
1535
+ export interface PixelMatchInput {
1536
+ imageAPath: string;
1537
+ imageBPath: string;
1538
+ width: number;
1539
+ height: number;
1540
+ pixelmatchThreshold: number;
1541
+ }
1542
+ export interface ScreenshotBuild {
1543
+ id: string;
1544
+ message: string;
1545
+ author?: string;
1546
+ url?: string;
1547
+ previewUrl?: string;
1548
+ appNamespace: string;
1549
+ timestamp: number;
1550
+ screenshots: Screenshot[];
1551
+ }
1552
+ export interface ScreenshotCache {
1553
+ timestamp?: number;
1554
+ lastBuildId?: string;
1555
+ size?: number;
1556
+ items?: {
1557
+ /**
1558
+ * Cache key
1559
+ */
1560
+ key: string;
1561
+ /**
1562
+ * Timestamp used to remove the oldest data
1563
+ */
1564
+ ts: number;
1565
+ /**
1566
+ * Mismatched pixels
1567
+ */
1568
+ mp: number;
1569
+ }[];
1570
+ }
1571
+ export interface Screenshot {
1572
+ id: string;
1573
+ desc?: string;
1574
+ image: string;
1575
+ device?: string;
1576
+ userAgent?: string;
1577
+ width?: number;
1578
+ height?: number;
1579
+ deviceScaleFactor?: number;
1580
+ hasTouch?: boolean;
1581
+ isLandscape?: boolean;
1582
+ isMobile?: boolean;
1583
+ testPath?: string;
1584
+ diff?: ScreenshotDiff;
1585
+ }
1586
+ export interface ScreenshotDiff {
1587
+ mismatchedPixels: number;
1588
+ id?: string;
1589
+ desc?: string;
1590
+ imageA?: string;
1591
+ imageB?: string;
1592
+ device?: string;
1593
+ userAgent?: string;
1594
+ width?: number;
1595
+ height?: number;
1596
+ deviceScaleFactor?: number;
1597
+ hasTouch?: boolean;
1598
+ isLandscape?: boolean;
1599
+ isMobile?: boolean;
1600
+ allowableMismatchedPixels: number;
1601
+ allowableMismatchedRatio: number;
1602
+ testPath?: string;
1603
+ cacheKey?: string;
1604
+ }
1605
+ export interface ScreenshotOptions {
1606
+ /**
1607
+ * When true, takes a screenshot of the full scrollable page.
1608
+ * Default: `false`
1609
+ */
1610
+ fullPage?: boolean;
1611
+ /**
1612
+ * An object which specifies clipping region of the page.
1613
+ */
1614
+ clip?: ScreenshotBoundingBox;
1615
+ /**
1616
+ * Hides default white background and allows capturing screenshots with transparency.
1617
+ * Default: `false`
1618
+ */
1619
+ omitBackground?: boolean;
1620
+ /**
1621
+ * Matching threshold, ranges from `0` to 1. Smaller values make the comparison
1622
+ * more sensitive. Defaults to the testing config `pixelmatchThreshold` value;
1623
+ */
1624
+ pixelmatchThreshold?: number;
1625
+ }
1626
+ export interface ScreenshotBoundingBox {
1627
+ /**
1628
+ * The x-coordinate of top-left corner.
1629
+ */
1630
+ x: number;
1631
+ /**
1632
+ * The y-coordinate of top-left corner.
1633
+ */
1634
+ y: number;
1635
+ /**
1636
+ * The width in pixels.
1637
+ */
1638
+ width: number;
1639
+ /**
1640
+ * The height in pixels.
1641
+ */
1642
+ height: number;
1643
+ }
1644
+ export interface ServerConfigInput {
1645
+ app: ExpressApp;
1646
+ configPath?: string;
1647
+ }
1648
+ export interface ServerConfigOutput {
1649
+ config: Config;
1650
+ logger: Logger;
1651
+ wwwDir: string;
1652
+ destroy?: () => void;
1653
+ }
1654
+ export interface ExpressApp {
1655
+ use?: Function;
1656
+ }
1657
+ export interface MiddlewareConfig {
1658
+ config: string | Config;
1659
+ destroy?: () => void;
1660
+ }
1661
+ export interface StyleCompiler {
1662
+ modeName: string;
1663
+ styleId: string;
1664
+ styleStr: string;
1665
+ styleIdentifier: string;
1666
+ externalStyles: ExternalStyleCompiler[];
1667
+ compiledStyleText: string;
1668
+ compiledStyleTextScoped: string;
1669
+ compiledStyleTextScopedCommented: string;
1670
+ }
1671
+ export interface ExternalStyleCompiler {
1672
+ absolutePath: string;
1673
+ relativePath: string;
1674
+ originalComponentPath: string;
1675
+ }
1676
+ export interface CompilerModeStyles {
1677
+ [modeName: string]: string[];
1678
+ }
1679
+ export interface CssImportData {
1680
+ srcImport: string;
1681
+ updatedImport?: string;
1682
+ url: string;
1683
+ filePath?: string;
1684
+ altFilePath?: string;
1685
+ styleText?: string;
1686
+ }
1687
+ export interface CssToEsmImportData {
1688
+ srcImportText: string;
1689
+ varName: string;
1690
+ url: string;
1691
+ filePath: string;
1692
+ }
1693
+ export interface TransformCssToEsmInput {
1694
+ input: string;
1695
+ module?: 'cjs' | 'esm' | string;
1696
+ file?: string;
1697
+ tag?: string;
1698
+ encapsulation?: string;
1699
+ mode?: string;
1700
+ commentOriginalSelector?: boolean;
1701
+ sourceMap?: boolean;
1702
+ minify?: boolean;
1703
+ docs?: boolean;
1704
+ autoprefixer?: any;
1705
+ styleImportData?: string;
1706
+ }
1707
+ export interface TransformCssToEsmOutput {
1708
+ styleText: string;
1709
+ output: string;
1710
+ map: any;
1711
+ diagnostics: Diagnostic[];
1712
+ defaultVarName: string;
1713
+ styleDocs: StyleDoc[];
1714
+ imports: {
1715
+ varName: string;
1716
+ importPath: string;
1717
+ }[];
1718
+ }
1719
+ export interface PackageJsonData {
1720
+ 'name'?: string;
1721
+ 'version'?: string;
1722
+ 'main'?: string;
1723
+ 'description'?: string;
1724
+ 'bin'?: {
1725
+ [key: string]: string;
1726
+ };
1727
+ 'browser'?: string;
1728
+ 'module'?: string;
1729
+ 'jsnext:main'?: string;
1730
+ 'collection:main'?: string;
1731
+ 'unpkg'?: string;
1732
+ 'collection'?: string;
1733
+ 'types'?: string;
1734
+ 'files'?: string[];
1735
+ ['dist-tags']?: {
1736
+ latest: string;
1737
+ };
1738
+ 'dependencies'?: {
1739
+ [moduleId: string]: string;
1740
+ };
1741
+ 'devDependencies'?: {
1742
+ [moduleId: string]: string;
1743
+ };
1744
+ 'lazyDependencies'?: {
1745
+ [moduleId: string]: string;
1746
+ };
1747
+ 'repository'?: {
1748
+ type?: string;
1749
+ url?: string;
1750
+ };
1751
+ 'private'?: boolean;
1752
+ 'scripts'?: {
1753
+ [runName: string]: string;
1754
+ };
1755
+ 'license'?: string;
1756
+ 'keywords'?: string[];
1757
+ }
1758
+ export interface Workbox {
1759
+ generateSW(swConfig: any): Promise<any>;
1760
+ generateFileManifest(): Promise<any>;
1761
+ getFileManifestEntries(): Promise<any>;
1762
+ injectManifest(swConfig: any): Promise<any>;
1763
+ copyWorkboxLibraries(wwwDir: string): Promise<any>;
1764
+ }
1765
+ export interface Url {
1766
+ href?: string;
1767
+ protocol?: string;
1768
+ auth?: string;
1769
+ hostname?: string;
1770
+ host?: string;
1771
+ port?: string;
1772
+ pathname?: string;
1773
+ path?: string;
1774
+ search?: string;
1775
+ query?: string | any;
1776
+ hash?: string;
1777
+ }
1778
+ declare global {
1779
+ namespace jest {
1780
+ interface Matchers<R, T> {
1781
+ /**
1782
+ * Compares HTML, but first normalizes the HTML so all
1783
+ * whitespace, attribute order and css class order are
1784
+ * the same. When given an element, it will compare
1785
+ * the element's `outerHTML`. When given a Document Fragment,
1786
+ * such as a Shadow Root, it'll compare its `innerHTML`.
1787
+ * Otherwise it'll compare two strings representing HTML.
1788
+ */
1789
+ toEqualHtml(expectHtml: string): void;
1790
+ /**
1791
+ * Compares HTML light DOKM only, but first normalizes the HTML so all
1792
+ * whitespace, attribute order and css class order are
1793
+ * the same. When given an element, it will compare
1794
+ * the element's `outerHTML`. When given a Document Fragment,
1795
+ * such as a Shadow Root, it'll compare its `innerHTML`.
1796
+ * Otherwise it'll compare two strings representing HTML.
1797
+ */
1798
+ toEqualLightHtml(expectLightHtml: string): void;
1799
+ /**
1800
+ * When given an element, it'll compare the element's
1801
+ * `textContent`. Otherwise it'll compare two strings. This
1802
+ * matcher will also `trim()` each string before comparing.
1803
+ */
1804
+ toEqualText(expectTextContent: string): void;
1805
+ /**
1806
+ * Checks if an element simply has the attribute. It does
1807
+ * not check any values of the attribute
1808
+ */
1809
+ toHaveAttribute(expectAttrName: string): void;
1810
+ /**
1811
+ * Checks if an element's attribute value equals the expect value.
1812
+ */
1813
+ toEqualAttribute(expectAttrName: string, expectAttrValue: any): void;
1814
+ /**
1815
+ * Checks if an element's has each of the expected attribute
1816
+ * names and values.
1817
+ */
1818
+ toEqualAttributes(expectAttrs: {
1819
+ [attrName: string]: any;
1820
+ }): void;
1821
+ /**
1822
+ * Checks if an element has the expected css class.
1823
+ */
1824
+ toHaveClass(expectClassName: string): void;
1825
+ /**
1826
+ * Checks if an element has each of the expected css classes
1827
+ * in the array.
1828
+ */
1829
+ toHaveClasses(expectClassNames: string[]): void;
1830
+ /**
1831
+ * Checks if an element has the exact same css classes
1832
+ * as the expected array of css classes.
1833
+ */
1834
+ toMatchClasses(expectClassNames: string[]): void;
1835
+ /**
1836
+ * When given an EventSpy, checks if the event has been
1837
+ * received or not.
1838
+ */
1839
+ toHaveReceivedEvent(): void;
1840
+ /**
1841
+ * When given an EventSpy, checks how many times the
1842
+ * event has been received.
1843
+ */
1844
+ toHaveReceivedEventTimes(count: number): void;
1845
+ /**
1846
+ * When given an EventSpy, checks the event has
1847
+ * received the correct custom event `detail` data.
1848
+ */
1849
+ toHaveReceivedEventDetail(eventDetail: any): void;
1850
+ /**
1851
+ * When given an EventSpy, checks the first event has
1852
+ * received the correct custom event `detail` data.
1853
+ */
1854
+ toHaveFirstReceivedEventDetail(eventDetail: any): void;
1855
+ /**
1856
+ * When given an EventSpy, checks the event at an index
1857
+ * has received the correct custom event `detail` data.
1858
+ */
1859
+ toHaveNthReceivedEventDetail(index: number, eventDetail: any): void;
1860
+ /**
1861
+ * Used to evaluate the results of `compareScreenshot()`, such as
1862
+ * `expect(compare).toMatchScreenshot()`. The `allowableMismatchedRatio`
1863
+ * value from the testing config is used by default if
1864
+ * `MatchScreenshotOptions` were not provided.
1865
+ */
1866
+ toMatchScreenshot(opts?: MatchScreenshotOptions): void;
1867
+ }
1868
+ }
1869
+ }
1870
+ export interface MatchScreenshotOptions {
1871
+ /**
1872
+ * The `allowableMismatchedPixels` value is the total number of pixels
1873
+ * that can be mismatched until the test fails. For example, if the value
1874
+ * is `100`, and if there were `101` pixels that were mismatched then the
1875
+ * test would fail. If the `allowableMismatchedRatio` is provided it will
1876
+ * take precedence, otherwise `allowableMismatchedPixels` will be used.
1877
+ */
1878
+ allowableMismatchedPixels?: number;
1879
+ /**
1880
+ * The `allowableMismatchedRatio` ranges from `0` to `1` and is used to
1881
+ * determine an acceptable ratio of pixels that can be mismatched before
1882
+ * the image is considered to have changes. Realistically, two screenshots
1883
+ * representing the same content may have a small number of pixels that
1884
+ * are not identical due to anti-aliasing, which is perfectly normal. The
1885
+ * `allowableMismatchedRatio` is the number of pixels that were mismatched,
1886
+ * divided by the total number of pixels in the screenshot. For example,
1887
+ * a ratio value of `0.06` means 6% of the pixels can be mismatched before
1888
+ * the image is considered to have changes. If the `allowableMismatchedRatio`
1889
+ * is provided it will take precedence, otherwise `allowableMismatchedPixels`
1890
+ * will be used.
1891
+ */
1892
+ allowableMismatchedRatio?: number;
1893
+ }
1894
+ export interface EventSpy {
1895
+ events: SerializedEvent[];
1896
+ eventName: string;
1897
+ firstEvent: SerializedEvent;
1898
+ lastEvent: SerializedEvent;
1899
+ length: number;
1900
+ next(): Promise<{
1901
+ done: boolean;
1902
+ value: SerializedEvent;
1903
+ }>;
1904
+ }
1905
+ export interface SerializedEvent {
1906
+ bubbles: boolean;
1907
+ cancelBubble: boolean;
1908
+ cancelable: boolean;
1909
+ composed: boolean;
1910
+ currentTarget: any;
1911
+ defaultPrevented: boolean;
1912
+ detail: any;
1913
+ eventPhase: any;
1914
+ isTrusted: boolean;
1915
+ returnValue: any;
1916
+ srcElement: any;
1917
+ target: any;
1918
+ timeStamp: number;
1919
+ type: string;
1920
+ isSerializedEvent: boolean;
1921
+ }
1922
+ export interface EventInitDict {
1923
+ bubbles?: boolean;
1924
+ cancelable?: boolean;
1925
+ composed?: boolean;
1926
+ detail?: any;
1927
+ }
1928
+ export interface JestEnvironmentGlobal {
1929
+ __NEW_TEST_PAGE__: () => Promise<any>;
1930
+ __CLOSE_OPEN_PAGES__: () => Promise<any>;
1931
+ Context: any;
1932
+ loadTestWindow: (testWindow: any) => Promise<void>;
1933
+ h: any;
1934
+ resourcesUrl: string;
1935
+ currentSpec?: {
1936
+ id: string;
1937
+ description: string;
1938
+ fullName: string;
1939
+ testPath: string;
1940
+ };
1941
+ screenshotDescriptions: Set<string>;
1942
+ }
1943
+ export interface E2EProcessEnv {
1944
+ RINDO_COMMIT_ID?: string;
1945
+ RINDO_COMMIT_MESSAGE?: string;
1946
+ RINDO_REPO_URL?: string;
1947
+ RINDO_SCREENSHOT_CONNECTOR?: string;
1948
+ RINDO_SCREENSHOT_SERVER?: string;
1949
+ __RINDO_EMULATE_CONFIGS__?: string;
1950
+ __RINDO_EMULATE__?: string;
1951
+ __RINDO_BROWSER_URL__?: string;
1952
+ __RINDO_APP_SCRIPT_URL__?: string;
1953
+ __RINDO_APP_STYLE_URL__?: string;
1954
+ __RINDO_BROWSER_WS_ENDPOINT__?: string;
1955
+ __RINDO_BROWSER_WAIT_UNTIL?: string;
1956
+ __RINDO_SCREENSHOT__?: 'true';
1957
+ __RINDO_SCREENSHOT_BUILD__?: string;
1958
+ __RINDO_E2E_TESTS__?: 'true';
1959
+ __RINDO_E2E_DEVTOOLS__?: 'true';
1960
+ __RINDO_SPEC_TESTS__?: 'true';
1961
+ __RINDO_PUPPETEER_MODULE__?: string;
1962
+ __RINDO_DEFAULT_TIMEOUT__?: string;
1963
+ }
1964
+ export interface AnyHTMLElement extends HTMLElement {
1965
+ [key: string]: any;
1966
+ }
1967
+ export interface SpecPage {
1968
+ /**
1969
+ * Mocked testing `document.body`.
1970
+ */
1971
+ body: HTMLBodyElement;
1972
+ /**
1973
+ * Mocked testing `document`.
1974
+ */
1975
+ doc: HTMLDocument;
1976
+ /**
1977
+ * The first component found within the mocked `document.body`. If a component isn't found, then it'll return `document.body.firstElementChild`.
1978
+ */
1979
+ root?: AnyHTMLElement;
1980
+ /**
1981
+ * Similar to `root`, except returns the component instance. If a root component was not found it'll return `null`.
1982
+ */
1983
+ rootInstance?: any;
1984
+ /**
1985
+ * Convenience function to set `document.body.innerHTML` and `waitForChanges()`. Function argument should be an html string.
1986
+ */
1987
+ setContent: (html: string) => Promise<any>;
1988
+ /**
1989
+ * After changes have been made to a component, such as a update to a property or attribute, the test page does not automatically apply the changes. In order to wait for, and apply the update, call `await page.waitForChanges()`.
1990
+ */
1991
+ waitForChanges: () => Promise<any>;
1992
+ /**
1993
+ * Mocked testing `window`.
1994
+ */
1995
+ win: Window;
1996
+ build: BuildConditionals;
1997
+ flushLoadModule: (bundleId?: string) => Promise<any>;
1998
+ flushQueue: () => Promise<any>;
1999
+ styles: Map<string, string>;
2000
+ }
2001
+ export interface NewSpecPageOptions {
2002
+ /**
2003
+ * An array of components to test. Component classes can be imported into the spec file, then their reference should be added to the `component` array in order to be used throughout the test.
2004
+ */
2005
+ components: any[];
2006
+ /**
2007
+ * Sets the mocked `document.cookie`.
2008
+ */
2009
+ cookie?: string;
2010
+ /**
2011
+ * Sets the mocked `dir` attribute on `<html>`.
2012
+ */
2013
+ direction?: string;
2014
+ flushQueue?: boolean;
2015
+ /**
2016
+ * The initial HTML used to generate the test. This can be useful to construct a collection of components working together, and assign HTML attributes. This value sets the mocked `document.body.innerHTML`.
2017
+ */
2018
+ html?: string;
2019
+ /**
2020
+ * The initial JSX used to generate the test.
2021
+ * Use `template` when you want to initialize a component using their properties, instead of their HTML attributes.
2022
+ * It will render the specified template (JSX) into `document.body`.
2023
+ */
2024
+ template?: () => any;
2025
+ /**
2026
+ * Sets the mocked `lang` attribute on `<html>`.
2027
+ */
2028
+ language?: string;
2029
+ /**
2030
+ * Useful for debugging hydrating components client-side. Sets that the `html` option already includes annotated prerender attributes and comments.
2031
+ */
2032
+ hydrateClientSide?: boolean;
2033
+ /**
2034
+ * Useful for debugging hydrating components server-side. The output HTML will also include prerender annotations.
2035
+ */
2036
+ hydrateServerSide?: boolean;
2037
+ /**
2038
+ * Sets the mocked `document.referrer`.
2039
+ */
2040
+ referrer?: string;
2041
+ /**
2042
+ * Manually set if the mocked document supports Shadow DOM or not. Default is `true`.
2043
+ */
2044
+ supportsShadowDom?: boolean;
2045
+ /**
2046
+ * When a component is prerendered it includes HTML annotations, such as `s-id` attributes and `<!-t.0->` comments. This information is used by clientside hydrating. Default is `false`.
2047
+ */
2048
+ includeAnnotations?: boolean;
2049
+ /**
2050
+ * Sets the mocked browser's `location.href`.
2051
+ */
2052
+ url?: string;
2053
+ /**
2054
+ * Sets the mocked browser's `navigator.userAgent`.
2055
+ */
2056
+ userAgent?: string;
2057
+ /**
2058
+ * By default, any changes to component properties and attributes must `page.waitForChanges()` in order to test the updates. As an option, `autoAppluChanges` continuously flushes the queue on the background. Default is `false`.
2059
+ */
2060
+ autoApplyChanges?: boolean;
2061
+ /**
2062
+ * By default, styles are not attached to the DOM and they are not reflected in the serialized HTML.
2063
+ * Setting this option to `true` will include the component's styles in the serializable output.
2064
+ */
2065
+ attachStyles?: boolean;
2066
+ strictBuild?: boolean;
2067
+ /** @deprecated */
2068
+ context?: {
2069
+ [key: string]: any;
2070
+ };
2071
+ }
2072
+ export interface TypesImportData {
2073
+ [key: string]: TypesMemberNameData[];
2074
+ }
2075
+ export interface TypesMemberNameData {
2076
+ localName: string;
2077
+ importName?: string;
2078
+ }
2079
+ export interface TypesModule {
2080
+ isDep: boolean;
2081
+ tagName: string;
2082
+ tagNameAsPascal: string;
2083
+ htmlElementName: string;
2084
+ component: string;
2085
+ jsx: string;
2086
+ element: string;
2087
+ }
2088
+ export declare type TypeInfo = {
2089
+ name: string;
2090
+ type: string;
2091
+ optional: boolean;
2092
+ required: boolean;
2093
+ internal: boolean;
2094
+ jsdoc?: string;
2095
+ }[];
2096
+ export interface Hyperscript {
2097
+ (sel: any): VNode;
2098
+ (sel: Node, data: VNodeData): VNode;
2099
+ (sel: any, data: VNodeData): VNode;
2100
+ (sel: any, text: string): VNode;
2101
+ (sel: any, children: Array<VNode | undefined | null>): VNode;
2102
+ (sel: any, data: VNodeData, text: string): VNode;
2103
+ (sel: any, data: VNodeData, children: Array<VNode | undefined | null>): VNode;
2104
+ (sel: any, data: VNodeData, children: VNode): VNode;
2105
+ }
2106
+ export declare type ChildType = VNode | number | string;
2107
+ export declare type PropsType = VNodeProdData | number | string | null;
2108
+ export interface VNodeProdData {
2109
+ key?: string | number;
2110
+ class?: {
2111
+ [className: string]: boolean;
2112
+ } | string;
2113
+ className?: {
2114
+ [className: string]: boolean;
2115
+ } | string;
2116
+ style?: any;
2117
+ [key: string]: any;
2118
+ }
2119
+ export interface CompilerWorkerContext {
2120
+ optimizeCss(inputOpts: OptimizeCssInput): Promise<OptimizeCssOutput>;
2121
+ prepareModule(typescriptPath: string, input: string, minifyOpts: any, transpile: boolean, inlineHelpers: boolean): Promise<{
2122
+ output: string;
2123
+ diagnostics: Diagnostic[];
2124
+ }>;
2125
+ prerenderWorker(prerenderRequest: PrerenderUrlRequest): Promise<PrerenderUrlResults>;
2126
+ transformCssToEsm(input: TransformCssToEsmInput): Promise<TransformCssToEsmOutput>;
2127
+ }
2128
+ export interface MsgToWorker {
2129
+ rindoId: number;
2130
+ args: any[];
2131
+ }
2132
+ export interface MsgFromWorker {
2133
+ rindoId?: number;
2134
+ rindoRtnValue: any;
2135
+ rindoRtnError: string;
2136
+ }
2137
+ export interface CompilerWorkerTask {
2138
+ rindoId?: number;
2139
+ inputArgs?: any[];
2140
+ resolve: (val: any) => any;
2141
+ reject: (msg: string) => any;
2142
+ retries?: number;
2143
+ }
2144
+ export declare type WorkerMsgHandler = (msgToWorker: MsgToWorker) => Promise<any>;
2145
+ export interface WorkerTask {
2146
+ taskId: number;
2147
+ method: string;
2148
+ args: any[];
2149
+ resolve: (val: any) => any;
2150
+ reject: (msg: string) => any;
2151
+ retries: number;
2152
+ isLongRunningTask: boolean;
2153
+ workerKey: string;
2154
+ }
2155
+ export interface WorkerMessage {
2156
+ taskId?: number;
2157
+ method?: string;
2158
+ args?: any[];
2159
+ value?: any;
2160
+ error?: string;
2161
+ exit?: boolean;
2162
+ }
2163
+ export declare type WorkerRunner = (methodName: string, args: any[]) => Promise<any>;
2164
+ export interface WorkerRunnerOptions {
2165
+ isLongRunningTask?: boolean;
2166
+ workerKey?: string;
2167
+ }
2168
+ export interface WorkerContext {
2169
+ tsHost?: any;
2170
+ tsProgram?: any;
2171
+ }
2172
+ export interface TranspileModuleResults {
2173
+ sourceFilePath: string;
2174
+ code: string;
2175
+ map: any;
2176
+ diagnostics: Diagnostic[];
2177
+ moduleFile: Module;
2178
+ }
2179
+ export interface ValidateTypesResults {
2180
+ diagnostics: Diagnostic[];
2181
+ dirPaths: string[];
2182
+ filePaths: string[];
2183
+ }