@ui5/webcomponents-tools 0.0.0-dff5837d7 → 0.0.0-e03cd01f3

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 (160) hide show
  1. package/CHANGELOG.md +2415 -0
  2. package/LICENSE.txt +201 -0
  3. package/README.md +7 -10
  4. package/assets-meta.js +23 -5
  5. package/bin/dev.js +8 -6
  6. package/bin/ui5nps.js +274 -0
  7. package/components-package/eslint.js +66 -2
  8. package/components-package/nps.js +147 -49
  9. package/components-package/postcss.components.js +1 -21
  10. package/components-package/postcss.themes.js +1 -23
  11. package/components-package/vite.config.js +9 -0
  12. package/components-package/wdio.js +118 -41
  13. package/icons-collection/nps.js +64 -12
  14. package/lib/amd-to-es6/index.js +107 -0
  15. package/lib/amd-to-es6/no-remaining-require.js +33 -0
  16. package/lib/cem/cem.js +12 -0
  17. package/lib/cem/custom-elements-manifest.config.mjs +550 -0
  18. package/lib/cem/event.mjs +168 -0
  19. package/lib/cem/patch/@custom-elements-manifest/analyzer/cli.js +128 -0
  20. package/lib/cem/patch/@custom-elements-manifest/analyzer/package.json +59 -0
  21. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/browser-entrypoint.js +23 -0
  22. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/create.js +117 -0
  23. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/arrow-function.js +26 -0
  24. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/class-jsdoc.js +157 -0
  25. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/classes.js +20 -0
  26. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createArrowFunction.js +17 -0
  27. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createAttribute.js +24 -0
  28. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createClass.js +301 -0
  29. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createClassField.js +26 -0
  30. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createFunctionLike.js +73 -0
  31. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createMixin.js +33 -0
  32. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/createVariable.js +22 -0
  33. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/handlers.js +338 -0
  34. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/custom-elements-define-calls.js +90 -0
  35. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/exports.js +156 -0
  36. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/function-like.js +24 -0
  37. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/mixins.js +29 -0
  38. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/reexported-wrapped-mixin-exports.js +84 -0
  39. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/analyse-phase/variables.js +34 -0
  40. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/collect-phase/collect-imports.js +101 -0
  41. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/catalyst/catalyst.js +11 -0
  42. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/catalyst/controller.js +34 -0
  43. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/catalyst-major-2/catalyst.js +11 -0
  44. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/catalyst-major-2/controller.js +34 -0
  45. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/decorators/attr.js +53 -0
  46. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/decorators/custom-element-decorator.js +36 -0
  47. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/fast/fast.js +7 -0
  48. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/lit.js +13 -0
  49. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/member-denylist.js +21 -0
  50. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/method-denylist.js +20 -0
  51. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/property-decorator.js +94 -0
  52. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/static-properties.js +121 -0
  53. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/lit/utils.js +66 -0
  54. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/framework-plugins/stencil/stencil.js +129 -0
  55. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/index.js +80 -0
  56. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/link-phase/cleanup-classes.js +25 -0
  57. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/link-phase/field-denylist.js +22 -0
  58. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/link-phase/method-denylist.js +25 -0
  59. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/post-processing/apply-inheritance.js +78 -0
  60. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/post-processing/is-custom-element.js +34 -0
  61. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/post-processing/link-class-to-tagname.js +27 -0
  62. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/post-processing/remove-unexported-declarations.js +23 -0
  63. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/features/post-processing/resolve-initializers.js +52 -0
  64. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/ast-helpers.js +186 -0
  65. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/cli-helpers.js +164 -0
  66. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/exports.js +44 -0
  67. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/find-external-manifests.js +67 -0
  68. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/imports.js +25 -0
  69. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/index.js +71 -0
  70. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/jsdoc.js +19 -0
  71. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/manifest-helpers.js +194 -0
  72. package/lib/cem/patch/@custom-elements-manifest/analyzer/src/utils/mixins.js +112 -0
  73. package/lib/cem/schema-internal.json +1422 -0
  74. package/lib/cem/schema.json +1098 -0
  75. package/lib/cem/types-internal.d.ts +808 -0
  76. package/lib/cem/types.d.ts +736 -0
  77. package/lib/cem/utils.mjs +423 -0
  78. package/lib/cem/validate.js +76 -0
  79. package/lib/chokidar/chokidar.js +28 -0
  80. package/lib/copy-and-watch/index.js +128 -95
  81. package/lib/copy-list/index.js +34 -0
  82. package/lib/create-icons/index.js +131 -54
  83. package/lib/create-illustrations/index.js +204 -0
  84. package/lib/create-new-component/Component.js +74 -0
  85. package/lib/create-new-component/ComponentTemplate.js +12 -0
  86. package/lib/create-new-component/index.js +66 -93
  87. package/lib/css-processors/css-processor-components.mjs +92 -0
  88. package/lib/css-processors/css-processor-themes.mjs +102 -0
  89. package/lib/css-processors/scope-variables.mjs +49 -0
  90. package/lib/css-processors/shared.mjs +46 -0
  91. package/lib/dev-server/custom-hot-update-plugin.js +39 -0
  92. package/lib/dev-server/dev-server.mjs +78 -0
  93. package/lib/dev-server/virtual-index-html-plugin.js +56 -0
  94. package/lib/eslint/eslint.js +44 -0
  95. package/lib/generate-js-imports/illustrations.js +85 -0
  96. package/lib/generate-json-imports/i18n.js +73 -38
  97. package/lib/generate-json-imports/themes.js +58 -20
  98. package/lib/hbs2lit/src/compiler.js +24 -4
  99. package/lib/hbs2lit/src/includesReplacer.js +5 -5
  100. package/lib/hbs2lit/src/litVisitor2.js +125 -26
  101. package/lib/hbs2lit/src/svgProcessor.js +12 -5
  102. package/lib/hbs2ui5/RenderTemplates/LitRenderer.js +40 -7
  103. package/lib/hbs2ui5/index.js +68 -19
  104. package/lib/i18n/defaults.js +74 -60
  105. package/lib/i18n/toJSON.js +46 -19
  106. package/lib/icons-hash/icons-hash.mjs +149 -0
  107. package/lib/postcss-combine-duplicated-selectors/index.js +185 -0
  108. package/lib/remove-dev-mode/remove-dev-mode.mjs +51 -0
  109. package/lib/rimraf/rimraf.js +31 -0
  110. package/lib/scoping/get-all-tags.js +44 -0
  111. package/lib/scoping/lint-src.js +32 -0
  112. package/lib/scoping/missing-dependencies.js +65 -0
  113. package/lib/scoping/report-tags-usage.js +28 -0
  114. package/lib/scoping/scope-test-pages.js +41 -0
  115. package/lib/test-runner/test-runner.js +79 -0
  116. package/lib/vite-bundler/vite-bundler.mjs +35 -0
  117. package/package.json +62 -58
  118. package/tsconfig.json +18 -0
  119. package/bin/init-ui5-package.js +0 -3
  120. package/components-package/rollup.js +0 -134
  121. package/components-package/serve.json +0 -3
  122. package/lib/documentation/index.js +0 -143
  123. package/lib/documentation/templates/api-component-since.js +0 -3
  124. package/lib/documentation/templates/api-css-variables-section.js +0 -24
  125. package/lib/documentation/templates/api-events-section.js +0 -35
  126. package/lib/documentation/templates/api-methods-section.js +0 -26
  127. package/lib/documentation/templates/api-properties-section.js +0 -40
  128. package/lib/documentation/templates/api-slots-section.js +0 -28
  129. package/lib/documentation/templates/template.js +0 -38
  130. package/lib/init-package/index.js +0 -112
  131. package/lib/init-package/resources/.eslintignore +0 -3
  132. package/lib/init-package/resources/bundle.es5.js +0 -25
  133. package/lib/init-package/resources/bundle.esm.js +0 -34
  134. package/lib/init-package/resources/config/.eslintrc.js +0 -1
  135. package/lib/init-package/resources/config/postcss.components/postcss.config.js +0 -1
  136. package/lib/init-package/resources/config/postcss.themes/postcss.config.js +0 -1
  137. package/lib/init-package/resources/config/rollup.config.js +0 -1
  138. package/lib/init-package/resources/config/wdio.conf.js +0 -1
  139. package/lib/init-package/resources/package-scripts.js +0 -11
  140. package/lib/init-package/resources/src/Assets.js +0 -5
  141. package/lib/init-package/resources/src/Demo.hbs +0 -1
  142. package/lib/init-package/resources/src/Demo.js +0 -56
  143. package/lib/init-package/resources/src/i18n/messagebundle.properties +0 -2
  144. package/lib/init-package/resources/src/i18n/messagebundle_de.properties +0 -1
  145. package/lib/init-package/resources/src/i18n/messagebundle_en.properties +0 -1
  146. package/lib/init-package/resources/src/i18n/messagebundle_es.properties +0 -1
  147. package/lib/init-package/resources/src/i18n/messagebundle_fr.properties +0 -1
  148. package/lib/init-package/resources/src/themes/Demo.css +0 -11
  149. package/lib/init-package/resources/src/themes/sap_belize/parameters-bundle.css +0 -3
  150. package/lib/init-package/resources/src/themes/sap_belize_hcb/parameters-bundle.css +0 -3
  151. package/lib/init-package/resources/src/themes/sap_belize_hcw/parameters-bundle.css +0 -3
  152. package/lib/init-package/resources/src/themes/sap_fiori_3/parameters-bundle.css +0 -3
  153. package/lib/init-package/resources/src/themes/sap_fiori_3_dark/parameters-bundle.css +0 -3
  154. package/lib/init-package/resources/test/pages/index.html +0 -51
  155. package/lib/init-package/resources/test/specs/Demo.spec.js +0 -12
  156. package/lib/jsdoc/config.json +0 -29
  157. package/lib/jsdoc/plugin.js +0 -2407
  158. package/lib/jsdoc/template/publish.js +0 -4092
  159. package/lib/postcss-css-to-esm/index.js +0 -42
  160. package/lib/postcss-css-to-json/index.js +0 -27
@@ -1,42 +0,0 @@
1
- const postcss = require('postcss');
2
- const fs = require('fs');
3
- const path = require('path');
4
- const mkdirp = require('mkdirp');
5
- const assets = require("../../assets-meta.js");
6
-
7
- const DEFAULT_THEME = assets.themes.default;
8
-
9
- const getDefaultThemeCode = packageName => {
10
- return `import { registerThemeProperties } from "@ui5/webcomponents-base/dist/asset-registries/Themes.js";
11
-
12
- import defaultThemeBase from "@ui5/webcomponents-theme-base/dist/generated/themes/${DEFAULT_THEME}/parameters-bundle.css.js";
13
- import defaultTheme from "./${DEFAULT_THEME}/parameters-bundle.css.js";
14
-
15
- registerThemeProperties("@ui5/webcomponents-theme-base", "${DEFAULT_THEME}", defaultThemeBase);
16
- registerThemeProperties("${packageName}", "${DEFAULT_THEME}", defaultTheme);
17
- `;
18
- };
19
-
20
- const proccessCSS = css => {
21
- css = css.replace(/\.sapThemeMeta[\s\S]*?:root/, ":root");
22
- css = css.replace(/\.background-image.*{.*}/, "");
23
- css = css.replace(/\.sapContrast[ ]*:root[\s\S]*?}/, "");
24
- css = css.replace(/--sapFontUrl.*\);?/, "");
25
- return JSON.stringify(css);
26
- }
27
-
28
- module.exports = postcss.plugin('add css to esm transform plugin', function (opts) {
29
- opts = opts || {};
30
-
31
- return function (root) {
32
- let css = root.toString();
33
- css = proccessCSS(css);
34
-
35
- const targetFile = root.source.input.from.replace(`/${opts.toReplace}/`, "/dist/generated/").replace(`\\${opts.toReplace}\\`, "\\dist\\generated\\");
36
- mkdirp.sync(path.dirname(targetFile));
37
-
38
- const filePath = `${targetFile}.js`;
39
- const defaultTheme = opts.includeDefaultTheme ? getDefaultThemeCode(opts.packageName) : ``;
40
- fs.writeFileSync(filePath, `${defaultTheme}export default ${css};`);
41
- }
42
- });
@@ -1,27 +0,0 @@
1
- const postcss = require('postcss');
2
- const fs = require('fs');
3
- const path = require('path');
4
- const mkdirp = require('mkdirp');
5
-
6
- const proccessCSS = css => {
7
- css = css.replace(/\.sapThemeMeta[\s\S]*?:root/, ":root");
8
- css = css.replace(/\.background-image.*{.*}/, "");
9
- css = css.replace(/\.sapContrast[ ]*:root[\s\S]*?}/, "");
10
- css = css.replace(/--sapFontUrl.*\);?/, "");
11
- return css;
12
- }
13
-
14
- module.exports = postcss.plugin('add css to JSON transform plugin', function (opts) {
15
- opts = opts || {};
16
-
17
- return function (root) {
18
- let css = root.toString();
19
- css = proccessCSS(css);
20
-
21
- const targetFile = root.source.input.from.replace(`/${opts.toReplace}/`, "/dist/generated/assets/").replace(`\\${opts.toReplace}\\`, "\\dist\\generated\\assets\\");
22
- mkdirp.sync(path.dirname(targetFile));
23
-
24
- const filePath = `${targetFile}.json`;
25
- fs.writeFileSync(filePath, JSON.stringify({_: css}));
26
- }
27
- });