@cypress-design/vue-icon 3.3.1 → 3.3.2
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.
- package/.turbo/turbo-build.log +3 -3
- package/CHANGELOG.md +9 -0
- package/Icon.ts +7 -4
- package/_TreeShakableIcons.ts +689 -685
- package/dist/Icon.d.ts.map +1 -1
- package/dist/_TreeShakableIcons.d.ts +1705 -1023
- package/dist/_TreeShakableIcons.d.ts.map +1 -1
- package/dist/index.es.mjs +1855 -1856
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/generate-icons.js +12 -5
- package/package.json +3 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -4,7 +4,7 @@ transforming...
|
|
|
4
4
|
[32m✓[39m 17 modules transformed.
|
|
5
5
|
rendering chunks...
|
|
6
6
|
computing gzip size...
|
|
7
|
-
[2mdist/[22m[36mindex.es.mjs [39m[1m[
|
|
7
|
+
[2mdist/[22m[36mindex.es.mjs [39m[1m[2m478.80 kB[22m[1m[22m[2m │ gzip: 95.07 kB[22m[2m │ map: 803.51 kB[22m
|
|
8
8
|
Entry module "index.ts" is using named and default exports together. Consumers of your bundle will have to use `Icon.default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.
|
|
9
|
-
[2mdist/[22m[36mindex.umd.js [39m[1m[
|
|
10
|
-
[32m✓ built in
|
|
9
|
+
[2mdist/[22m[36mindex.umd.js [39m[1m[2m434.59 kB[22m[1m[22m[2m │ gzip: 93.68 kB[22m[2m │ map: 784.06 kB[22m
|
|
10
|
+
[32m✓ built in 10.77s[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @cypress-design/vue-icon
|
|
2
2
|
|
|
3
|
+
## 3.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#731](https://github.com/cypress-io/cypress-design/pull/731) [`677c0c0`](https://github.com/cypress-io/cypress-design/commit/677c0c00f3ea3e37e89b38710b919bc03cabec0c) Thanks [@jennifer-shehane](https://github.com/jennifer-shehane)! - Fix tree shaking in `@cypress-design/vue-icon`: importing a single named icon (for example `IconActionPlaySmall`) now bundles about 13 KB instead of every icon plus the full icon registry (about 960 KB). Both icon packages are now marked `"sideEffects": false`. The default `Icon` component still includes every icon because it looks icons up by name at runtime, so prefer named imports.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @cypress-design/icon-registry@3.3.2
|
|
11
|
+
|
|
3
12
|
## 3.3.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/Icon.ts
CHANGED
|
@@ -15,19 +15,22 @@ interface Props extends Pick<IconProps, 'name'>, Omit<OpenIconProps, 'name'> {
|
|
|
15
15
|
class?: any
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
// PURE so bundlers can drop this component (and the full icon set that
|
|
19
|
+
// compileIcon pulls in) when only the named per-icon components are used
|
|
20
|
+
export default /* @__PURE__ */ defineComponent<Props>({
|
|
19
21
|
// the props here need to exist because of runtime treatment
|
|
20
22
|
// if we don't have them explicit, vuejs will think it's attributes
|
|
21
23
|
// and not pass it down as props to the components
|
|
22
24
|
// but for typescript to pick up the correct prop types, we need to cast it to unknown
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
// concat() instead of an array spread: esbuild treats a spread as a possible
|
|
26
|
+
// side effect and would keep this component even when it is never imported
|
|
27
|
+
props: /* @__PURE__ */ (ICON_COLOR_PROP_NAMES as readonly string[]).concat([
|
|
25
28
|
'interactiveColorsOnGroup',
|
|
26
29
|
'size',
|
|
27
30
|
'name',
|
|
28
31
|
'alt',
|
|
29
32
|
'class',
|
|
30
|
-
] as unknown as undefined,
|
|
33
|
+
]) as unknown as undefined,
|
|
31
34
|
setup(
|
|
32
35
|
// the OpenIconProps helps volar extract the documentation from the props
|
|
33
36
|
// since the IconProps are more restrictive, it will not change the use behavior
|