@depup/lottie-react 2.4.1-depup.0 → 3.0.0-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +4 -10
  3. package/build/_virtual/_rolldown/runtime.cjs +23 -0
  4. package/build/animation/Lottie.cjs +39 -0
  5. package/build/animation/Lottie.d.cts +47 -0
  6. package/build/animation/Lottie.d.ts +47 -0
  7. package/build/animation/Lottie.js +37 -0
  8. package/build/animation/LottieDisplay.cjs +55 -0
  9. package/build/animation/LottieDisplay.d.cts +46 -0
  10. package/build/animation/LottieDisplay.d.ts +46 -0
  11. package/build/animation/LottieDisplay.js +53 -0
  12. package/build/animation/LottieInstanceContext.cjs +16 -0
  13. package/build/animation/LottieInstanceContext.js +17 -0
  14. package/build/animation/LottieLight.cjs +19 -0
  15. package/build/animation/LottieLight.d.cts +23 -0
  16. package/build/animation/LottieLight.d.ts +23 -0
  17. package/build/animation/LottieLight.js +17 -0
  18. package/build/animation/LottieRegistryContext.cjs +36 -0
  19. package/build/animation/LottieRegistryContext.js +35 -0
  20. package/build/animation/LottieSvg.cjs +20 -0
  21. package/build/animation/LottieSvg.d.cts +24 -0
  22. package/build/animation/LottieSvg.d.ts +24 -0
  23. package/build/animation/LottieSvg.js +18 -0
  24. package/build/animation/collectMarkerCrossings.cjs +38 -0
  25. package/build/animation/collectMarkerCrossings.js +38 -0
  26. package/build/animation/createLottieComponent.cjs +131 -0
  27. package/build/animation/createLottieComponent.d.cts +45 -0
  28. package/build/animation/createLottieComponent.d.ts +45 -0
  29. package/build/animation/createLottieComponent.js +131 -0
  30. package/build/animation/hasExpressions.cjs +25 -0
  31. package/build/animation/hasExpressions.js +25 -0
  32. package/build/animation/normalizeAnimationSource.cjs +38 -0
  33. package/build/animation/normalizeAnimationSource.js +38 -0
  34. package/build/animation/polymorphicForwardRef.cjs +18 -0
  35. package/build/animation/polymorphicForwardRef.js +19 -0
  36. package/build/animation/renderStyledElement.cjs +31 -0
  37. package/build/animation/renderStyledElement.js +31 -0
  38. package/build/animation/resolveSeekTarget.cjs +97 -0
  39. package/build/animation/resolveSeekTarget.js +95 -0
  40. package/build/animation/styleLayer.cjs +24 -0
  41. package/build/animation/styleLayer.js +24 -0
  42. package/build/animation/stylePrecedence.cjs +12 -0
  43. package/build/animation/stylePrecedence.js +12 -0
  44. package/build/animation/types.cjs +71 -0
  45. package/build/animation/types.d.cts +461 -0
  46. package/build/animation/types.d.ts +461 -0
  47. package/build/animation/types.js +68 -0
  48. package/build/animation/useLottie.cjs +40 -0
  49. package/build/animation/useLottie.d.cts +36 -0
  50. package/build/animation/useLottie.d.ts +36 -0
  51. package/build/animation/useLottie.js +38 -0
  52. package/build/animation/useLottieAnimation.cjs +434 -0
  53. package/build/animation/useLottieAnimation.d.cts +40 -0
  54. package/build/animation/useLottieAnimation.d.ts +40 -0
  55. package/build/animation/useLottieAnimation.js +434 -0
  56. package/build/animation/useLottieInstance.cjs +20 -0
  57. package/build/animation/useLottieInstance.d.cts +14 -0
  58. package/build/animation/useLottieInstance.d.ts +14 -0
  59. package/build/animation/useLottieInstance.js +20 -0
  60. package/build/animation/useLottieLight.cjs +20 -0
  61. package/build/animation/useLottieLight.d.cts +16 -0
  62. package/build/animation/useLottieLight.d.ts +16 -0
  63. package/build/animation/useLottieLight.js +18 -0
  64. package/build/animation/useLottieSvg.cjs +18 -0
  65. package/build/animation/useLottieSvg.d.cts +14 -0
  66. package/build/animation/useLottieSvg.d.ts +14 -0
  67. package/build/animation/useLottieSvg.js +16 -0
  68. package/build/controls/LottieControls.cjs +180 -0
  69. package/build/controls/LottieControls.d.cts +58 -0
  70. package/build/controls/LottieControls.d.ts +58 -0
  71. package/build/controls/LottieControls.js +178 -0
  72. package/build/controls/LottieDirectionButton.cjs +36 -0
  73. package/build/controls/LottieDirectionButton.js +35 -0
  74. package/build/controls/LottieFullscreenButton.cjs +35 -0
  75. package/build/controls/LottieFullscreenButton.js +34 -0
  76. package/build/controls/LottieLoopButton.cjs +32 -0
  77. package/build/controls/LottieLoopButton.js +31 -0
  78. package/build/controls/LottiePlayButton.cjs +34 -0
  79. package/build/controls/LottiePlayButton.js +33 -0
  80. package/build/controls/LottieReadout.cjs +61 -0
  81. package/build/controls/LottieReadout.d.cts +13 -0
  82. package/build/controls/LottieReadout.d.ts +13 -0
  83. package/build/controls/LottieReadout.js +60 -0
  84. package/build/controls/LottieSeekBar.cjs +87 -0
  85. package/build/controls/LottieSeekBar.js +86 -0
  86. package/build/controls/LottieSpeedSelect.cjs +51 -0
  87. package/build/controls/LottieSpeedSelect.js +50 -0
  88. package/build/controls/LottieStopButton.cjs +29 -0
  89. package/build/controls/LottieStopButton.js +28 -0
  90. package/build/controls/controlIcon.cjs +25 -0
  91. package/build/controls/controlIcon.js +25 -0
  92. package/build/controls/useFullscreen.cjs +46 -0
  93. package/build/controls/useFullscreen.js +46 -0
  94. package/build/controls/useShortcuts.cjs +70 -0
  95. package/build/controls/useShortcuts.js +70 -0
  96. package/build/index.cjs +36 -0
  97. package/build/index.d.cts +19 -0
  98. package/build/index.d.ts +19 -80
  99. package/build/index.js +17 -667
  100. package/build/interactions/LottieInteractions.cjs +41 -0
  101. package/build/interactions/LottieInteractions.d.cts +37 -0
  102. package/build/interactions/LottieInteractions.d.ts +37 -0
  103. package/build/interactions/LottieInteractions.js +41 -0
  104. package/build/interactions/coverProgress.cjs +55 -0
  105. package/build/interactions/coverProgress.js +53 -0
  106. package/build/interactions/lottieInView.cjs +109 -0
  107. package/build/interactions/lottieInView.d.cts +44 -0
  108. package/build/interactions/lottieInView.d.ts +44 -0
  109. package/build/interactions/lottieInView.js +109 -0
  110. package/build/interactions/lottieScrollScrub.cjs +152 -0
  111. package/build/interactions/lottieScrollScrub.d.cts +47 -0
  112. package/build/interactions/lottieScrollScrub.d.ts +47 -0
  113. package/build/interactions/lottieScrollScrub.js +152 -0
  114. package/build/interactions/types.d.cts +46 -0
  115. package/build/interactions/types.d.ts +46 -0
  116. package/build/interactions/useInteractionsRunner.cjs +142 -0
  117. package/build/interactions/useInteractionsRunner.js +141 -0
  118. package/build/interactions/useLottieInteractions.cjs +21 -0
  119. package/build/interactions/useLottieInteractions.d.cts +19 -0
  120. package/build/interactions/useLottieInteractions.d.ts +19 -0
  121. package/build/interactions/useLottieInteractions.js +21 -0
  122. package/build/overlays/LottieError.cjs +74 -0
  123. package/build/overlays/LottieError.d.cts +40 -0
  124. package/build/overlays/LottieError.d.ts +40 -0
  125. package/build/overlays/LottieError.js +72 -0
  126. package/build/overlays/LottieLoading.cjs +89 -0
  127. package/build/overlays/LottieLoading.d.cts +45 -0
  128. package/build/overlays/LottieLoading.d.ts +45 -0
  129. package/build/overlays/LottieLoading.js +87 -0
  130. package/build/overlays/overlayStyles.cjs +33 -0
  131. package/build/overlays/overlayStyles.js +33 -0
  132. package/build/utils/SubscriptionManager.cjs +42 -0
  133. package/build/utils/SubscriptionManager.d.cts +30 -0
  134. package/build/utils/SubscriptionManager.d.ts +30 -0
  135. package/build/utils/SubscriptionManager.js +42 -0
  136. package/build/utils/createLogger.cjs +25 -0
  137. package/build/utils/createLogger.js +25 -0
  138. package/build/utils/isSameJson.cjs +37 -0
  139. package/build/utils/isSameJson.js +37 -0
  140. package/build/utils/mergeRefs.cjs +37 -0
  141. package/build/utils/mergeRefs.js +37 -0
  142. package/build/utils/useStableValue.cjs +26 -0
  143. package/build/utils/useStableValue.js +26 -0
  144. package/changes.json +3 -8
  145. package/package.json +144 -89
  146. package/LICENSE +0 -46
  147. package/build/index.es.js +0 -653
  148. package/build/index.es.js.map +0 -1
  149. package/build/index.es.min.js +0 -3
  150. package/build/index.js.map +0 -1
  151. package/build/index.min.js +0 -3
  152. package/build/index.umd.js +0 -670
  153. package/build/index.umd.js.map +0 -1
  154. package/build/index.umd.min.js +0 -3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@depup/lottie-react",
3
- "version": "2.4.1-depup.0",
4
- "description": "Lottie for React (with updated dependencies)",
3
+ "version": "3.0.0-depup.0",
4
+ "description": "Lottie animations in React: one component for the easy path, the whole engine when you need control. (with updated dependencies)",
5
5
  "keywords": [
6
6
  "lottie-react",
7
7
  "depup",
@@ -10,13 +10,13 @@
10
10
  "latest",
11
11
  "patched",
12
12
  "lottie",
13
- "react",
14
13
  "lottie react",
15
- "react lottie",
16
- "lottie web",
17
- "animation",
18
- "component",
19
- "hook"
14
+ "lottie animation",
15
+ "react animation",
16
+ "lottie component",
17
+ "lottie hook",
18
+ "lottie player",
19
+ "tree-shakeable"
20
20
  ],
21
21
  "homepage": "https://lottiereact.com",
22
22
  "bugs": {
@@ -28,99 +28,154 @@
28
28
  },
29
29
  "license": "MIT",
30
30
  "author": "David Gamote",
31
- "main": "build/index.js",
32
- "module": "build/index.es.js",
33
- "browser": "build/index.umd.js",
34
- "types": "build/index.d.ts",
35
- "style": "build/index.css",
31
+ "type": "module",
32
+ "devEngines": {
33
+ "packageManager": {
34
+ "name": "pnpm",
35
+ "version": "11.17.0",
36
+ "onFail": "warn"
37
+ },
38
+ "runtime": {
39
+ "name": "node",
40
+ "version": ">=24.18",
41
+ "onFail": "warn"
42
+ }
43
+ },
44
+ "sideEffects": false,
45
+ "types": "./build/index.d.ts",
46
+ "main": "./build/index.cjs",
47
+ "module": "./build/index.js",
48
+ "exports": {
49
+ ".": {
50
+ "import": {
51
+ "types": "./build/index.d.ts",
52
+ "default": "./build/index.js"
53
+ },
54
+ "require": {
55
+ "types": "./build/index.d.cts",
56
+ "default": "./build/index.cjs"
57
+ }
58
+ },
59
+ "./package.json": "./package.json"
60
+ },
36
61
  "files": [
37
- "/build",
62
+ "build",
38
63
  "changes.json",
39
64
  "README.md"
40
65
  ],
66
+ "size-limit": [
67
+ {
68
+ "name": "import { Lottie }",
69
+ "path": "build/index.js",
70
+ "import": "{ Lottie }",
71
+ "ignore": [
72
+ "react",
73
+ "react-dom",
74
+ "lottie-web"
75
+ ],
76
+ "gzip": true,
77
+ "limit": "4.9 KB"
78
+ },
79
+ {
80
+ "name": "import { useLottie }",
81
+ "path": "build/index.js",
82
+ "import": "{ useLottie }",
83
+ "ignore": [
84
+ "react",
85
+ "react-dom",
86
+ "lottie-web"
87
+ ],
88
+ "gzip": true,
89
+ "limit": "3.85 KB"
90
+ },
91
+ {
92
+ "name": "import { Lottie, LottieControls }",
93
+ "path": "build/index.js",
94
+ "import": "{ Lottie, LottieControls }",
95
+ "ignore": [
96
+ "react",
97
+ "react-dom",
98
+ "lottie-web"
99
+ ],
100
+ "gzip": true,
101
+ "limit": "7.8 KB"
102
+ },
103
+ {
104
+ "name": "import { LottieSvg, useLottieSvg }, only its own engine external",
105
+ "path": "build/index.js",
106
+ "import": "{ LottieSvg, useLottieSvg }",
107
+ "ignore": [
108
+ "react",
109
+ "react-dom",
110
+ "lottie-web/build/player/lottie_svg.js"
111
+ ],
112
+ "gzip": true,
113
+ "limit": "4.9 KB"
114
+ },
115
+ {
116
+ "name": "import { LottieLight, useLottieLight }, only its own engine external",
117
+ "path": "build/index.js",
118
+ "import": "{ LottieLight, useLottieLight }",
119
+ "ignore": [
120
+ "react",
121
+ "react-dom",
122
+ "lottie-web/build/player/lottie_light.js"
123
+ ],
124
+ "gzip": true,
125
+ "limit": "4.9 KB"
126
+ }
127
+ ],
41
128
  "scripts": {
42
- "build": "run-s tsc:compile rollup:compile",
43
- "postbuild": "npm pack && tar -xvzf *.tgz && rm -rf package *.tgz",
44
- "build:watch": "run-p tsc:compile:watch rollup:compile:watch",
45
- "coverage": "jest --coverage && cat ./coverage/lcov.info | coveralls",
46
- "docz:build": "docz build",
47
- "deploy:docs": "echo 'lottiereact.com' > ./docs-dist/CNAME && gh-pages -d docs-dist",
48
- "docz:dev": "docz dev",
49
- "docz:serve": "docz build && docz serve",
50
- "rollup:compile": "rollup -c",
51
- "rollup:compile:watch": "rollup -c -w",
52
- "test": "jest",
53
- "test:watch": "jest --watch",
54
- "tsc:compile": "tsc",
55
- "tsc:compile:watch": "tsc --watch"
129
+ "check": "pnpm typecheck && pnpm format:check && pnpm test && pnpm build && pnpm check:size && pnpm --filter website check",
130
+ "check:package": "node scripts/check-package.mts",
131
+ "check:react18": "node scripts/check-react18.mts",
132
+ "check:size": "size-limit",
133
+ "typecheck": "tsc --noEmit",
134
+ "format:check": "biome check --error-on-warnings .",
135
+ "format": "biome check --write .",
136
+ "lint": "biome lint --error-on-warnings .",
137
+ "lint:fix": "biome lint --write .",
138
+ "deps:check": "pnpm -r outdated",
139
+ "deps:up": "pnpm -r update --latest",
140
+ "build": "tsdown",
141
+ "build:watch": "tsdown --watch",
142
+ "dev": "concurrently \"pnpm run build:watch\" \"pnpm --filter website dev\"",
143
+ "test": "vitest run --coverage",
144
+ "test:watch": "vitest"
56
145
  },
57
146
  "dependencies": {
58
147
  "lottie-web": "^5.13.0"
59
148
  },
60
- "devDependencies": {
61
- "@babel/core": "^7.16.7",
62
- "@babel/preset-env": "^7.16.8",
63
- "@babel/preset-react": "^7.16.7",
64
- "@jest/types": "^27.4.2",
65
- "@rollup/plugin-commonjs": "^21.0.1",
66
- "@rollup/plugin-node-resolve": "^13.1.3",
67
- "@testing-library/jest-dom": "^5.16.1",
68
- "@testing-library/react": "^12.1.2",
69
- "@testing-library/react-hooks": "^7.0.2",
70
- "@types/jest": "^27.4.0",
71
- "@types/react": "^18.0.14",
72
- "@types/react-dom": "^18.0.5",
73
- "@typescript-eslint/eslint-plugin": "^5.29.0",
74
- "@typescript-eslint/parser": "^5.29.0",
75
- "autoprefixer": "^10.4.2",
76
- "babel-loader": "^8.2.3",
77
- "coveralls": "^3.1.1",
78
- "docz": "^2.3.1",
79
- "eslint": "^8.18.0",
80
- "eslint-config-prettier": "^8.5.0",
81
- "eslint-plugin-import": "^2.26.0",
82
- "eslint-plugin-jsx-a11y": "^6.5.1",
83
- "eslint-plugin-prettier": "^4.0.0",
84
- "eslint-plugin-promise": "^6.0.0",
85
- "eslint-plugin-react": "^7.30.0",
86
- "eslint-plugin-react-hooks": "^4.6.0",
87
- "get-pkg-repo": "^5.0.0",
88
- "gh-pages": "^3.2.3",
89
- "jest": "^27.4.7",
90
- "jest-canvas-mock": "^2.3.1",
91
- "sass": "^1.83.4",
92
- "npm-run-all": "4.1.5",
93
- "prettier": "^2.8.4",
94
- "react": "^18.2.0",
95
- "react-dom": "^18.2.0",
96
- "react-test-renderer": "^17.0.2",
97
- "rollup": "^2.64.0",
98
- "rollup-plugin-babel": "^4.4.0",
99
- "rollup-plugin-dts": "^4.1.0",
100
- "rollup-plugin-peer-deps-external": "^2.2.4",
101
- "rollup-plugin-postcss": "^4.0.2",
102
- "rollup-plugin-terser": "^7.0.2",
103
- "ts-jest": "^27.1.3",
104
- "ts-node": "^10.9.1",
105
- "tslib": "^2.5.0",
106
- "typescript": "^4.9.5"
107
- },
108
149
  "peerDependencies": {
109
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
110
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
150
+ "react": "^18.2.0 || ^19.0.0",
151
+ "react-dom": "^18.2.0 || ^19.0.0"
152
+ },
153
+ "devDependencies": {
154
+ "@arethetypeswrong/core": "^0.18.5",
155
+ "@biomejs/biome": "^2.5.8",
156
+ "@size-limit/preset-small-lib": "^13.0.3",
157
+ "@testing-library/jest-dom": "^7.0.1",
158
+ "@testing-library/react": "^16.3.2",
159
+ "@testing-library/user-event": "^14.6.3",
160
+ "@types/node": "^26.2.0",
161
+ "@types/react": "^19.2.18",
162
+ "@types/react-dom": "^19.2.4",
163
+ "@vitejs/plugin-react": "^6.0.5",
164
+ "@vitest/coverage-v8": "^4.1.10",
165
+ "concurrently": "^10.0.4",
166
+ "happy-dom": "^20.11.2",
167
+ "publint": "^0.3.23",
168
+ "size-limit": "^13.0.3",
169
+ "tsdown": "^0.22.14",
170
+ "typescript": "^7.0.2",
171
+ "vitest": "^4.1.10"
111
172
  },
112
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
113
173
  "depup": {
114
- "changes": {
115
- "lottie-web": {
116
- "from": "^5.10.2",
117
- "to": "^5.13.0"
118
- }
119
- },
120
- "depsUpdated": 1,
174
+ "changes": {},
175
+ "depsUpdated": 0,
121
176
  "originalPackage": "lottie-react",
122
- "originalVersion": "2.4.1",
123
- "processedAt": "2026-03-18T22:41:23.224Z",
124
- "smokeTest": "failed"
177
+ "originalVersion": "3.0.0",
178
+ "processedAt": "2026-08-16T00:26:07.347Z",
179
+ "smokeTest": "passed"
125
180
  }
126
181
  }
package/LICENSE DELETED
@@ -1,46 +0,0 @@
1
- The MIT License
2
-
3
- Copyright David Gamote and other contributors.
4
-
5
- This software consists of voluntary contributions made by many
6
- individuals. For exact contribution history, see the revision history
7
- available on GitHub.
8
-
9
- The following license applies to all parts of this software except as
10
- documented below:
11
-
12
- ====
13
-
14
- Permission is hereby granted, free of charge, to any person obtaining
15
- a copy of this software and associated documentation files (the
16
- "Software"), to deal in the Software without restriction, including
17
- without limitation the rights to use, copy, modify, merge, publish,
18
- distribute, sublicense, and/or sell copies of the Software, and to
19
- permit persons to whom the Software is furnished to do so, subject to
20
- the following conditions:
21
-
22
- The above copyright notice and this permission notice shall be
23
- included in all copies or substantial portions of the Software.
24
-
25
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
29
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
30
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
31
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32
-
33
- ====
34
-
35
- Copyright and related rights for sample code are waived via CC0. Sample
36
- code is defined as all source code displayed within the prose of the
37
- documentation.
38
-
39
- CC0: http://creativecommons.org/publicdomain/zero/1.0/
40
-
41
- ====
42
-
43
- Files located in the node_modules and vendor directories are externally
44
- maintained libraries used by this software which have their own
45
- licenses; we recommend you read them, as their terms may differ from the
46
- terms above.