@ui5/webcomponents-tools 0.0.0-918b4fbe7 → 0.0.0-9261ac932

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 (69) hide show
  1. package/CHANGELOG.md +1305 -0
  2. package/README.md +3 -5
  3. package/assets-meta.js +15 -10
  4. package/components-package/cypress/support/commands.js +39 -0
  5. package/components-package/cypress/support/component-index.html +17 -0
  6. package/components-package/cypress/support/component.d.ts +23 -0
  7. package/components-package/cypress/support/component.js +34 -0
  8. package/components-package/cypress.config.js +19 -0
  9. package/components-package/eslint.js +61 -15
  10. package/components-package/nps.js +68 -49
  11. package/components-package/postcss.components.js +1 -21
  12. package/components-package/postcss.themes.js +1 -26
  13. package/components-package/vite.config.js +6 -5
  14. package/components-package/wdio.js +42 -13
  15. package/icons-collection/nps.js +13 -8
  16. package/lib/amd-to-es6/index.js +102 -0
  17. package/lib/amd-to-es6/no-remaining-require.js +33 -0
  18. package/lib/cem/custom-elements-manifest.config.mjs +527 -0
  19. package/lib/cem/event.mjs +148 -0
  20. package/lib/cem/schema-internal.json +1413 -0
  21. package/lib/cem/schema.json +1098 -0
  22. package/lib/cem/types-internal.d.ts +808 -0
  23. package/lib/cem/types.d.ts +736 -0
  24. package/lib/cem/utils.mjs +398 -0
  25. package/lib/cem/validate.js +70 -0
  26. package/lib/copy-list/index.js +2 -2
  27. package/lib/create-icons/index.js +38 -13
  28. package/lib/create-illustrations/index.js +51 -30
  29. package/lib/create-new-component/index.js +59 -101
  30. package/lib/create-new-component/tsFileContentTemplate.js +71 -0
  31. package/lib/css-processors/css-processor-components.mjs +77 -0
  32. package/lib/css-processors/css-processor-themes.mjs +79 -0
  33. package/lib/css-processors/scope-variables.mjs +49 -0
  34. package/lib/css-processors/shared.mjs +76 -0
  35. package/lib/dev-server/custom-hot-update-plugin.js +39 -0
  36. package/lib/dev-server/{dev-server.js → dev-server.mjs} +4 -4
  37. package/lib/dev-server/virtual-index-html-plugin.js +2 -2
  38. package/lib/generate-js-imports/illustrations.js +78 -64
  39. package/lib/generate-json-imports/i18n.js +45 -61
  40. package/lib/generate-json-imports/themes.js +16 -33
  41. package/lib/hbs2lit/src/compiler.js +9 -6
  42. package/lib/hbs2lit/src/litVisitor2.js +42 -17
  43. package/lib/hbs2lit/src/svgProcessor.js +12 -5
  44. package/lib/hbs2ui5/RenderTemplates/LitRenderer.js +32 -4
  45. package/lib/hbs2ui5/index.js +23 -6
  46. package/lib/i18n/defaults.js +11 -3
  47. package/lib/i18n/toJSON.js +1 -1
  48. package/lib/postcss-combine-duplicated-selectors/index.js +12 -5
  49. package/lib/remove-dev-mode/remove-dev-mode.mjs +37 -0
  50. package/lib/scoping/get-all-tags.js +10 -3
  51. package/lib/scoping/lint-src.js +8 -7
  52. package/lib/scoping/scope-test-pages.js +2 -1
  53. package/lib/test-runner/test-runner.js +10 -2
  54. package/package.json +26 -12
  55. package/tsconfig.json +16 -0
  56. package/types/index.d.ts +1 -0
  57. package/components-package/wdio.sync.js +0 -360
  58. package/lib/esm-abs-to-rel/index.js +0 -58
  59. package/lib/generate-custom-elements-manifest/index.js +0 -369
  60. package/lib/jsdoc/config.json +0 -29
  61. package/lib/jsdoc/configTypescript.json +0 -29
  62. package/lib/jsdoc/plugin.js +0 -2468
  63. package/lib/jsdoc/preprocess.js +0 -60
  64. package/lib/jsdoc/template/publish.js +0 -4120
  65. package/lib/postcss-css-to-esm/index.js +0 -57
  66. package/lib/postcss-css-to-json/index.js +0 -47
  67. package/lib/postcss-new-files/index.js +0 -36
  68. package/lib/postcss-p/postcss-p.mjs +0 -14
  69. package/lib/replace-global-core/index.js +0 -25
@@ -1,60 +0,0 @@
1
- const process = require("process");
2
- const path = require("path");
3
- const fs = require("fs/promises");
4
-
5
- const inputDir = process.argv[2];
6
-
7
- const preprocess = async () => {
8
- try {
9
- const { globby } = await import("globby");
10
- const fileNames = await globby(inputDir + "**/types/*.js");
11
-
12
- return Promise.all(fileNames.map(processFile));
13
- } catch(e) {
14
- console.log("JSDoc preprocess failed: ", e);
15
- }
16
- };
17
-
18
- const processFile = async (fileName) => {
19
- let fileContent = `${await fs.readFile(fileName)}`;
20
-
21
- const re = new RegExp(`(\\/\\*\\*[^\\/]+\\s+\\*\\/)?\\s+\\s+.*?\\["([\\w\\d]+)"\\].*?"([\\w\\d]+)";`, "gm")
22
- let matches = [...fileContent.matchAll(re)];
23
-
24
- // Get all type values
25
- const typeData = matches.map(match => {
26
- return {
27
- comment: match[1],
28
- key: match[2],
29
- value: match[3],
30
- };
31
- });
32
- if (typeData.length === 0) {
33
- return;
34
- }
35
-
36
- const typeName = path.parse(fileName).name;
37
-
38
- matches = fileContent.match(/^\/\*\*[^\/]+\//gm);
39
- const comment = matches[0];
40
-
41
- const propsCode = typeData.map(item => {
42
- return `${item.comment}\n get ${item.key}() { return "${item.value}"; }`;
43
- }).join("\n");
44
-
45
- const newClassCode = `
46
- ${comment}
47
- class ${typeName} {
48
- ${propsCode}
49
- };
50
-
51
- export default ${typeName};`;
52
-
53
- fileContent = newClassCode;
54
-
55
- return fs.writeFile(fileName, fileContent);
56
- };
57
-
58
- preprocess().then(() => {
59
- console.log("JSDoc preprocess ready.");
60
- });