react-zoom-pan-pinch 3.0.5 → 3.0.6
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/.eslintignore +6 -0
- package/.github/CODEOWNERS +36 -0
- package/.github/FUNDING.yml +13 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/.github/workflows/docs.yml +34 -0
- package/.github/workflows/release.yml +46 -0
- package/.github/workflows/tests.yml +42 -0
- package/.prettierrc +10 -0
- package/.releaserc.json +63 -0
- package/.storybook/main.js +23 -0
- package/.storybook/preview-head.html +5 -0
- package/.storybook/preview.js +11 -0
- package/.storybook/theme-overrides.css +49 -0
- package/CHANGELOG.md +26 -0
- package/Code_of_Conduct.md +61 -0
- package/Contributing.md +236 -0
- package/__tests__/features/props.spec.tsx +11 -0
- package/__tests__/features/rendering.spec.tsx +36 -0
- package/__tests__/shared/render.shared.tsx +41 -0
- package/__tests__/utils/controls.utils.tsx +25 -0
- package/__tests__/utils/example.tsx +81 -0
- package/commitlint.config.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/jest.config.ts +45 -0
- package/package.json +2 -6
- package/rollup.config.js +51 -0
- package/src/hooks/use-transform-context.tsx +1 -1
- package/tsconfig.json +32 -0
package/Contributing.md
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
<!-- omit in toc -->
|
|
2
|
+
|
|
3
|
+
# Contributing to Zoom Pan Pinch
|
|
4
|
+
|
|
5
|
+
First off, thanks for taking the time to contribute! ❤️
|
|
6
|
+
|
|
7
|
+
All types of contributions are encouraged and valued. See the
|
|
8
|
+
[Table of Contents](#table-of-contents) for different ways to help and details
|
|
9
|
+
about how this project handles them. Please make sure to read the relevant
|
|
10
|
+
section before making your contribution. It will make it a lot easier for us
|
|
11
|
+
maintainers and smooth out the experience for all involved. The community looks
|
|
12
|
+
forward to your contributions. 🎉
|
|
13
|
+
|
|
14
|
+
> And if you like the project, but just don't have time to contribute, that's
|
|
15
|
+
> fine. There are other easy ways to support the project and show your
|
|
16
|
+
> appreciation, which we would also be very happy about:
|
|
17
|
+
>
|
|
18
|
+
> - Star the project
|
|
19
|
+
> - Tweet about it
|
|
20
|
+
> - Refer this project in your project's readme
|
|
21
|
+
> - Mention the project at local meetups and tell your friends/colleagues
|
|
22
|
+
|
|
23
|
+
<!-- omit in toc -->
|
|
24
|
+
|
|
25
|
+
## Table of Contents
|
|
26
|
+
|
|
27
|
+
- [Contributing to Zoom Pan Pinch](#contributing-to-zoom-pan-pinch)
|
|
28
|
+
- [Table of Contents](#table-of-contents)
|
|
29
|
+
- [I Have a Question](#i-have-a-question)
|
|
30
|
+
- [I Want To Contribute](#i-want-to-contribute)
|
|
31
|
+
- [Reporting Bugs](#reporting-bugs)
|
|
32
|
+
- [Before Submitting a Bug Report](#before-submitting-a-bug-report)
|
|
33
|
+
- [How Do I Submit a Good Bug Report?](#how-do-i-submit-a-good-bug-report)
|
|
34
|
+
- [Suggesting Enhancements](#suggesting-enhancements)
|
|
35
|
+
- [Before Submitting an Enhancement](#before-submitting-an-enhancement)
|
|
36
|
+
- [How Do I Submit a Good Enhancement Suggestion?](#how-do-i-submit-a-good-enhancement-suggestion)
|
|
37
|
+
- [Your First Code Contribution](#your-first-code-contribution)
|
|
38
|
+
- [Improving The Documentation](#improving-the-documentation)
|
|
39
|
+
- [Styleguides](#styleguides)
|
|
40
|
+
- [Commit Messages](#commit-messages)
|
|
41
|
+
- [Join The Project Team](#join-the-project-team)
|
|
42
|
+
- [Attribution](#attribution)
|
|
43
|
+
|
|
44
|
+
## I Have a Question
|
|
45
|
+
|
|
46
|
+
> If you want to ask a question, we assume that you have read the available
|
|
47
|
+
> [Documentation](https://prc5.github.io/react-zoom-pan-pinch/).
|
|
48
|
+
|
|
49
|
+
Before you ask a question, it is best to search for existing
|
|
50
|
+
[Issues](https://github.com/prc5/react-zoom-pan-pinch/issues) that might help
|
|
51
|
+
you. In case you have found a suitable issue and still need clarification, you
|
|
52
|
+
can write your question in this issue. It is also advisable to search the
|
|
53
|
+
internet for answers first.
|
|
54
|
+
|
|
55
|
+
If you then still feel the need to ask a question and need clarification, we
|
|
56
|
+
recommend the following:
|
|
57
|
+
|
|
58
|
+
- Open an [Issue](https://github.com/prc5/react-zoom-pan-pinch/issues/new).
|
|
59
|
+
- Provide as much context as you can about what you're running into.
|
|
60
|
+
- Provide project and platform versions (nodejs, npm, etc), depending on what
|
|
61
|
+
seems relevant.
|
|
62
|
+
|
|
63
|
+
We will then take care of the issue as soon as possible.
|
|
64
|
+
|
|
65
|
+
<!--
|
|
66
|
+
You might want to create a separate issue tag for questions and include it in this description. People should then tag their issues accordingly.
|
|
67
|
+
|
|
68
|
+
Depending on how large the project is, you may want to outsource the questioning, e.g. to Stack Overflow or Gitter. You may add additional contact and information possibilities:
|
|
69
|
+
- IRC
|
|
70
|
+
- Slack
|
|
71
|
+
- Gitter
|
|
72
|
+
- Stack Overflow tag
|
|
73
|
+
- Blog
|
|
74
|
+
- FAQ
|
|
75
|
+
- Roadmap
|
|
76
|
+
- E-Mail List
|
|
77
|
+
- Forum
|
|
78
|
+
-->
|
|
79
|
+
|
|
80
|
+
## I Want To Contribute
|
|
81
|
+
|
|
82
|
+
> ### Legal Notice <!-- omit in toc -->
|
|
83
|
+
>
|
|
84
|
+
> When contributing to this project, you must agree that you have authored 100%
|
|
85
|
+
> of the content, that you have the necessary rights to the content and that the
|
|
86
|
+
> content you contribute may be provided under the project license.
|
|
87
|
+
|
|
88
|
+
### Reporting Bugs
|
|
89
|
+
|
|
90
|
+
<!-- omit in toc -->
|
|
91
|
+
|
|
92
|
+
#### Before Submitting a Bug Report
|
|
93
|
+
|
|
94
|
+
A good bug report shouldn't leave others needing to chase you up for more
|
|
95
|
+
information. Therefore, we ask you to investigate carefully, collect information
|
|
96
|
+
and describe the issue in detail in your report. Please complete the following
|
|
97
|
+
steps in advance to help us fix any potential bug as fast as possible.
|
|
98
|
+
|
|
99
|
+
- Make sure that you are using the latest version.
|
|
100
|
+
- Determine if your bug is really a bug and not an error on your side e.g. using
|
|
101
|
+
incompatible environment components/versions (Make sure that you have read the
|
|
102
|
+
[documentation](https://prc5.github.io/react-zoom-pan-pinch/). If you are
|
|
103
|
+
looking for support, you might want to check
|
|
104
|
+
[this section](#i-have-a-question)).
|
|
105
|
+
- To see if other users have experienced (and potentially already solved) the
|
|
106
|
+
same issue you are having, check if there is not already a bug report existing
|
|
107
|
+
for your bug or error in the
|
|
108
|
+
[bug tracker](https://github.com/prc5/react-zoom-pan-pinchissues?q=label%3Abug).
|
|
109
|
+
- Also make sure to search the internet (including Stack Overflow) to see if
|
|
110
|
+
users outside of the GitHub community have discussed the issue.
|
|
111
|
+
- Collect information about the bug:
|
|
112
|
+
- Stack trace (Traceback)
|
|
113
|
+
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
|
|
114
|
+
- Version of the interpreter, compiler, SDK, runtime environment, package
|
|
115
|
+
manager, depending on what seems relevant.
|
|
116
|
+
- Possibly your input and the output
|
|
117
|
+
- Can you reliably reproduce the issue? And can you also reproduce it with older
|
|
118
|
+
versions?
|
|
119
|
+
|
|
120
|
+
<!-- omit in toc -->
|
|
121
|
+
|
|
122
|
+
#### How Do I Submit a Good Bug Report?
|
|
123
|
+
|
|
124
|
+
> You must never report security related issues, vulnerabilities or bugs
|
|
125
|
+
> including sensitive information to the issue tracker, or elsewhere in public.
|
|
126
|
+
> Instead sensitive bugs must be sent by email to <>.
|
|
127
|
+
|
|
128
|
+
<!-- You may add a PGP key to allow the messages to be sent encrypted as well. -->
|
|
129
|
+
|
|
130
|
+
We use GitHub issues to track bugs and errors. If you run into an issue with the
|
|
131
|
+
project:
|
|
132
|
+
|
|
133
|
+
- Open an [Issue](https://github.com/prc5/react-zoom-pan-pinch/issues/new).
|
|
134
|
+
(Since we can't be sure at this point whether it is a bug or not, we ask you
|
|
135
|
+
not to talk about a bug yet and not to label the issue.)
|
|
136
|
+
- Explain the behavior you would expect and the actual behavior.
|
|
137
|
+
- Please provide as much context as possible and describe the _reproduction
|
|
138
|
+
steps_ that someone else can follow to recreate the issue on their own. This
|
|
139
|
+
usually includes your code. For good bug reports you should isolate the
|
|
140
|
+
problem and create a reduced test case.
|
|
141
|
+
- Provide the information you collected in the previous section.
|
|
142
|
+
|
|
143
|
+
Once it's filed:
|
|
144
|
+
|
|
145
|
+
- The project team will label the issue accordingly.
|
|
146
|
+
- A team member will try to reproduce the issue with your provided steps. If
|
|
147
|
+
there are no reproduction steps or no obvious way to reproduce the issue, the
|
|
148
|
+
team will ask you for those steps and mark the issue as `needs-repro`. Bugs
|
|
149
|
+
with the `needs-repro` tag will not be addressed until they are reproduced.
|
|
150
|
+
- If the team is able to reproduce the issue, it will be marked `needs-fix`, as
|
|
151
|
+
well as possibly other tags (such as `critical`), and the issue will be left
|
|
152
|
+
to be [implemented by someone](#your-first-code-contribution).
|
|
153
|
+
|
|
154
|
+
<!-- You might want to create an issue template for bugs and errors that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
|
|
155
|
+
|
|
156
|
+
### Suggesting Enhancements
|
|
157
|
+
|
|
158
|
+
This section guides you through submitting an enhancement suggestion for Zoom
|
|
159
|
+
Pan Pinch, **including completely new features and minor improvements to
|
|
160
|
+
existing functionality**. Following these guidelines will help maintainers and
|
|
161
|
+
the community to understand your suggestion and find related suggestions.
|
|
162
|
+
|
|
163
|
+
<!-- omit in toc -->
|
|
164
|
+
|
|
165
|
+
#### Before Submitting an Enhancement
|
|
166
|
+
|
|
167
|
+
- Make sure that you are using the latest version.
|
|
168
|
+
- Read the [documentation](https://prc5.github.io/react-zoom-pan-pinch/)
|
|
169
|
+
carefully and find out if the functionality is already covered, maybe by an
|
|
170
|
+
individual configuration.
|
|
171
|
+
- Perform a [search](https://github.com/prc5/react-zoom-pan-pinch/issues) to see
|
|
172
|
+
if the enhancement has already been suggested. If it has, add a comment to the
|
|
173
|
+
existing issue instead of opening a new one.
|
|
174
|
+
- Find out whether your idea fits with the scope and aims of the project. It's
|
|
175
|
+
up to you to make a strong case to convince the project's developers of the
|
|
176
|
+
merits of this feature. Keep in mind that we want features that will be useful
|
|
177
|
+
to the majority of our users and not just a small subset. If you're just
|
|
178
|
+
targeting a minority of users, consider writing an add-on/plugin library.
|
|
179
|
+
|
|
180
|
+
<!-- omit in toc -->
|
|
181
|
+
|
|
182
|
+
#### How Do I Submit a Good Enhancement Suggestion?
|
|
183
|
+
|
|
184
|
+
Enhancement suggestions are tracked as
|
|
185
|
+
[GitHub issues](https://github.com/prc5/react-zoom-pan-pinch/issues).
|
|
186
|
+
|
|
187
|
+
- Use a **clear and descriptive title** for the issue to identify the
|
|
188
|
+
suggestion.
|
|
189
|
+
- Provide a **step-by-step description of the suggested enhancement** in as many
|
|
190
|
+
details as possible.
|
|
191
|
+
- **Describe the current behavior** and **explain which behavior you expected to
|
|
192
|
+
see instead** and why. At this point you can also tell which alternatives do
|
|
193
|
+
not work for you.
|
|
194
|
+
- You may want to **include screenshots and animated GIFs** which help you
|
|
195
|
+
demonstrate the steps or point out the part which the suggestion is related
|
|
196
|
+
to.
|
|
197
|
+
- **Explain why this enhancement would be useful** to most Zoom Pan Pinch users.
|
|
198
|
+
You may also want to point out the other projects that solved it better and
|
|
199
|
+
which could serve as inspiration.
|
|
200
|
+
|
|
201
|
+
### Your First Code Contribution
|
|
202
|
+
|
|
203
|
+
Checkout
|
|
204
|
+
[this tutorial](https://github.com/firstcontributions/first-contributions) of
|
|
205
|
+
how to contribute to any project.
|
|
206
|
+
|
|
207
|
+
### Improving The Documentation
|
|
208
|
+
|
|
209
|
+
Anyone can help improve the documentation - it is in this repository and is
|
|
210
|
+
available to everyone - if you have an idea how to improve it - send us a pull
|
|
211
|
+
request and we will try to consider it as soon as possible!
|
|
212
|
+
|
|
213
|
+
## Styleguides
|
|
214
|
+
|
|
215
|
+
Each contribution must meet the conditions of our linter and formatter. When
|
|
216
|
+
these criteria are not met, the creator will get the appropriate status from
|
|
217
|
+
github actions, if issues are not corrected within two weeks, the pull request
|
|
218
|
+
will be rejected and closed immediately.
|
|
219
|
+
|
|
220
|
+
### Commit Messages
|
|
221
|
+
|
|
222
|
+
Commit messages must follow the
|
|
223
|
+
[conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard
|
|
224
|
+
and present the best possible description of the changes made, which will later
|
|
225
|
+
be automatically placed in the release notes. They must not contain curses or
|
|
226
|
+
offensive sentences.
|
|
227
|
+
|
|
228
|
+
## Join The Project Team
|
|
229
|
+
|
|
230
|
+
Do you want to have a greater impact on the development of the library? Get in
|
|
231
|
+
touch with us!
|
|
232
|
+
|
|
233
|
+
## Attribution
|
|
234
|
+
|
|
235
|
+
This guide is based on the **contributing-gen**.
|
|
236
|
+
[Make your own](https://github.com/bttger/contributing-gen)!
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { renderExample } from "../shared/render.shared";
|
|
2
|
+
|
|
3
|
+
describe("Library components", () => {
|
|
4
|
+
describe("When library components have been rendered", () => {
|
|
5
|
+
test("it renders transform component without errors", () => {
|
|
6
|
+
const { content, wrapper } = renderExample();
|
|
7
|
+
expect(content).toBeDefined();
|
|
8
|
+
expect(wrapper).toBeDefined();
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { renderExample } from "../shared/render.shared";
|
|
2
|
+
|
|
3
|
+
describe("Example view", () => {
|
|
4
|
+
describe("When example view has been rendered", () => {
|
|
5
|
+
test("it renders entire example without errors", () => {
|
|
6
|
+
const { wrapper } = renderExample();
|
|
7
|
+
|
|
8
|
+
expect(wrapper).toBeDefined();
|
|
9
|
+
});
|
|
10
|
+
test("it renders center in button without errors", () => {
|
|
11
|
+
const { center } = renderExample();
|
|
12
|
+
|
|
13
|
+
expect(center).toBeDefined();
|
|
14
|
+
});
|
|
15
|
+
test("it renders zoom in button without errors", () => {
|
|
16
|
+
const { zoomInBtn } = renderExample();
|
|
17
|
+
|
|
18
|
+
expect(zoomInBtn).toBeDefined();
|
|
19
|
+
});
|
|
20
|
+
test("it renders zoom out button without errors", () => {
|
|
21
|
+
const { zoomOutBtn } = renderExample();
|
|
22
|
+
|
|
23
|
+
expect(zoomOutBtn).toBeDefined();
|
|
24
|
+
});
|
|
25
|
+
test("it renders reset button without errors", () => {
|
|
26
|
+
const { resetBtn } = renderExample();
|
|
27
|
+
|
|
28
|
+
expect(resetBtn).toBeDefined();
|
|
29
|
+
});
|
|
30
|
+
test("it renders transform component without errors", () => {
|
|
31
|
+
const { content } = renderExample();
|
|
32
|
+
|
|
33
|
+
expect(content).toBeDefined();
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { render, screen } from "@testing-library/react";
|
|
3
|
+
|
|
4
|
+
import { ReactZoomPanPinchProps } from "../../src";
|
|
5
|
+
import { Example } from "../utils/example";
|
|
6
|
+
|
|
7
|
+
export const renderExample = (props?: ReactZoomPanPinchProps) => {
|
|
8
|
+
let renders = 0;
|
|
9
|
+
let renderPropsValues = {};
|
|
10
|
+
|
|
11
|
+
render(
|
|
12
|
+
<Example
|
|
13
|
+
{...props}
|
|
14
|
+
onRender={() => {
|
|
15
|
+
renders += 1;
|
|
16
|
+
}}
|
|
17
|
+
onRenderProps={(ref) => {
|
|
18
|
+
renderPropsValues = ref;
|
|
19
|
+
}}
|
|
20
|
+
/>,
|
|
21
|
+
);
|
|
22
|
+
// controls buttons
|
|
23
|
+
const zoomInBtn = screen.getByTestId("zoom-in");
|
|
24
|
+
const zoomOutBtn = screen.getByTestId("zoom-out");
|
|
25
|
+
const resetBtn = screen.getByTestId("reset");
|
|
26
|
+
const center = screen.getByTestId("center");
|
|
27
|
+
// containers
|
|
28
|
+
const content = screen.getByTestId("content");
|
|
29
|
+
const wrapper = screen.getByTestId("wrapper");
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
renders,
|
|
33
|
+
renderPropsValues,
|
|
34
|
+
zoomInBtn,
|
|
35
|
+
zoomOutBtn,
|
|
36
|
+
resetBtn,
|
|
37
|
+
center,
|
|
38
|
+
content,
|
|
39
|
+
wrapper,
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { ReactZoomPanPinchContentRef } from "../../src";
|
|
4
|
+
|
|
5
|
+
export const Controls: React.FC<ReactZoomPanPinchContentRef> = ({
|
|
6
|
+
zoomIn,
|
|
7
|
+
zoomOut,
|
|
8
|
+
resetTransform,
|
|
9
|
+
centerView,
|
|
10
|
+
}: ReactZoomPanPinchContentRef) => (
|
|
11
|
+
<div>
|
|
12
|
+
<button type="button" onClick={() => zoomIn()} data-testid="zoom-in">
|
|
13
|
+
Zoom In +
|
|
14
|
+
</button>
|
|
15
|
+
<button type="button" onClick={() => zoomOut()} data-testid="zoom-out">
|
|
16
|
+
Zoom Out -
|
|
17
|
+
</button>
|
|
18
|
+
<button type="button" onClick={() => resetTransform()} data-testid="reset">
|
|
19
|
+
Reset
|
|
20
|
+
</button>
|
|
21
|
+
<button type="button" onClick={() => centerView()} data-testid="center">
|
|
22
|
+
Center
|
|
23
|
+
</button>
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
TransformWrapper,
|
|
5
|
+
TransformComponent,
|
|
6
|
+
ReactZoomPanPinchProps,
|
|
7
|
+
ReactZoomPanPinchContentRef,
|
|
8
|
+
} from "../../src";
|
|
9
|
+
import { Controls } from "./controls.utils";
|
|
10
|
+
|
|
11
|
+
export const Example = (options: {
|
|
12
|
+
props?: ReactZoomPanPinchProps;
|
|
13
|
+
onRender: () => void;
|
|
14
|
+
onRenderProps: (ref: ReactZoomPanPinchContentRef) => void;
|
|
15
|
+
}) => {
|
|
16
|
+
const { props = {}, onRender, onRenderProps } = options;
|
|
17
|
+
|
|
18
|
+
onRender();
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<TransformWrapper {...props}>
|
|
22
|
+
{(utils) => (
|
|
23
|
+
<div>
|
|
24
|
+
{onRenderProps(utils)}
|
|
25
|
+
<Controls {...utils} />
|
|
26
|
+
<TransformComponent
|
|
27
|
+
wrapperProps={
|
|
28
|
+
{
|
|
29
|
+
"data-testid": "wrapper",
|
|
30
|
+
} as React.HTMLAttributes<HTMLDivElement>
|
|
31
|
+
}
|
|
32
|
+
contentProps={
|
|
33
|
+
{
|
|
34
|
+
"data-testid": "content",
|
|
35
|
+
} as React.HTMLAttributes<HTMLDivElement>
|
|
36
|
+
}
|
|
37
|
+
wrapperStyle={{
|
|
38
|
+
width: "500px",
|
|
39
|
+
height: "500px",
|
|
40
|
+
maxWidth: "100%",
|
|
41
|
+
maxHeight: "calc(100vh - 50px)",
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
44
|
+
<div
|
|
45
|
+
style={{ background: "#444", color: "white", padding: "50px" }}
|
|
46
|
+
>
|
|
47
|
+
<h1>Title</h1>
|
|
48
|
+
<h2>Subtitle</h2>
|
|
49
|
+
<button
|
|
50
|
+
type="button"
|
|
51
|
+
onClick={() =>
|
|
52
|
+
alert("You can still interact with click events!")
|
|
53
|
+
}
|
|
54
|
+
>
|
|
55
|
+
Click me!
|
|
56
|
+
</button>
|
|
57
|
+
<p>
|
|
58
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
|
|
59
|
+
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
|
|
60
|
+
enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
61
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
|
|
62
|
+
in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
63
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident,
|
|
64
|
+
sunt in culpa qui officia deserunt mollit anim id est laborum
|
|
65
|
+
</p>
|
|
66
|
+
<p>
|
|
67
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
|
|
68
|
+
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
|
|
69
|
+
enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
70
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor
|
|
71
|
+
in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
72
|
+
nulla pariatur. Excepteur sint occaecat cupidatat non proident,
|
|
73
|
+
sunt in culpa qui officia deserunt mollit anim id est laborum
|
|
74
|
+
</p>
|
|
75
|
+
</div>
|
|
76
|
+
</TransformComponent>
|
|
77
|
+
</div>
|
|
78
|
+
)}
|
|
79
|
+
</TransformWrapper>
|
|
80
|
+
);
|
|
81
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = { extends: ["@commitlint/config-conventional"] };
|
package/dist/index.cjs.js
CHANGED
|
@@ -1910,7 +1910,7 @@ var TransformComponent = function (_a) {
|
|
|
1910
1910
|
var useTransformContext = function () {
|
|
1911
1911
|
var libraryContext = React.useContext(Context);
|
|
1912
1912
|
if (!libraryContext) {
|
|
1913
|
-
throw new Error("Transform context
|
|
1913
|
+
throw new Error("Transform context must be placed inside TransformWrapper");
|
|
1914
1914
|
}
|
|
1915
1915
|
return libraryContext;
|
|
1916
1916
|
};
|