@open-iframe-resizer/core 1.3.0 → 1.3.1

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 (2) hide show
  1. package/README.md +2 -31
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -41,39 +41,10 @@ A React component is also available:
41
41
  npm install @open-iframe-resizer/react
42
42
  ```
43
43
 
44
- ## Notes
44
+ ## Full documentation
45
45
 
46
- ### Performing actions after a resize
46
+ Explore the [full documentation](https://lemick.github.io/open-iframe-resizer/guides/getting-started/#_top)
47
47
 
48
- You can execute a custom function after an iframe has been resized. Also, you can use built-in functions
49
- like `updateParentScrollOnResize` to help keep the iframe within the viewport after resizing:
50
-
51
- ```javascript
52
- import { initialize, updateParentScrollOnResize } from "https://cdn.jsdelivr.net/npm/@open-iframe-resizer/core@latest/dist/index.min.js";
53
-
54
- initialize({ onIframeResize: updateParentScrollOnResize }, "#myIframe");
55
- ```
56
-
57
- ### Resize iframes from a different origin
58
-
59
- - If you have control over the embedded page, you need to load the script on your child page to enable messaging between the two windows (you do not need to call the initialize function in the child;
60
- loading the module is sufficient).
61
-
62
- Here is an example of the [parent page](https://codesandbox.io/p/sandbox/xj24pg) and the [child](https://codesandbox.io/p/sandbox/growing-iframe-msv4hr).
63
-
64
-
65
- - If you have no control over the child iframe domain, and, by chance, the child page loads the legacy *iframe-resizer* script, you can initialize the library with the compatibility mode; it will try
66
- to connect to the child iframe:
67
- ```javascript
68
- initialize({ enableLegacyLibSupport: true }, "#my-iframe");
69
- ```
70
-
71
- ### Comparison with iframe-resizer
72
-
73
- This library is very good, but it has changed its license, so it is no longer usable in closed-source projects for free.
74
- I decided to replicate some parts of the API, as it may facilitate migration to this project.
75
-
76
- Some features from this library are missing, but they could be implemented in future versions.
77
48
 
78
49
  ## Browser support
79
50
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@open-iframe-resizer/core",
3
3
  "private": false,
4
- "version": "1.3.0",
4
+ "version": "1.3.1",
5
5
  "description": "Open-source modern iframe resizer",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -21,14 +21,14 @@
21
21
  "responsive"
22
22
  ],
23
23
  "type": "module",
24
- "main": "./dist/index.cjs",
24
+ "main": "./dist/index.umd.cjs",
25
25
  "module": "./dist/index.js",
26
26
  "typings": "./dist/index.d.ts",
27
27
  "exports": {
28
28
  ".": {
29
29
  "types": "./dist/index.d.ts",
30
30
  "import": "./dist/index.js",
31
- "require": "./dist/index.cjs"
31
+ "require": "./dist/index.umd.cjs"
32
32
  }
33
33
  },
34
34
  "files": [