@measured/puck-plugin-heading-analyzer 0.14.2-canary.23db292 → 0.14.2-canary.25a7c4b
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/dist/index.js +24 -29
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -35956,22 +35956,20 @@ function offsetPoint(x, y, win) {
|
|
35956
35956
|
let offsetY = 0;
|
35957
35957
|
if (win.parent !== win.self) {
|
35958
35958
|
const iframe = win.frameElement;
|
35959
|
-
|
35960
|
-
|
35961
|
-
|
35962
|
-
|
35963
|
-
|
35964
|
-
|
35965
|
-
|
35966
|
-
|
35967
|
-
|
35968
|
-
|
35969
|
-
|
35970
|
-
|
35971
|
-
|
35972
|
-
|
35973
|
-
return point2;
|
35974
|
-
}
|
35959
|
+
const rect = iframe.getBoundingClientRect();
|
35960
|
+
const transform = getTransform(iframe);
|
35961
|
+
offsetX = rect.left;
|
35962
|
+
offsetY = rect.top;
|
35963
|
+
if (transform) {
|
35964
|
+
const {
|
35965
|
+
x: transformedX,
|
35966
|
+
y: transformedY
|
35967
|
+
} = applyTransformPoint(x, y, transform.matrix, transform.origin);
|
35968
|
+
const point2 = {
|
35969
|
+
x: transformedX + offsetX,
|
35970
|
+
y: transformedY + offsetY
|
35971
|
+
};
|
35972
|
+
return point2;
|
35975
35973
|
}
|
35976
35974
|
}
|
35977
35975
|
const point = {
|
@@ -41052,7 +41050,7 @@ var init_dnd_esm = __esm({
|
|
41052
41050
|
}
|
41053
41051
|
if (!el.parentElement) {
|
41054
41052
|
const refWindow = el.ownerDocument.defaultView;
|
41055
|
-
if (refWindow && refWindow.self !== refWindow.parent
|
41053
|
+
if (refWindow && refWindow.self !== refWindow.parent) {
|
41056
41054
|
const iframe = refWindow.frameElement;
|
41057
41055
|
return findNearestTransform(iframe);
|
41058
41056
|
}
|
@@ -41174,7 +41172,7 @@ var init_dnd_esm = __esm({
|
|
41174
41172
|
}) => {
|
41175
41173
|
const el = querySelectorAllIframe(`[data-rfd-draggable-id="${state.critical.draggable.id}"]`)[0];
|
41176
41174
|
const win = (el == null ? void 0 : el.ownerDocument.defaultView) || window;
|
41177
|
-
const isInIframe = win !== window
|
41175
|
+
const isInIframe = win !== window;
|
41178
41176
|
if (isInIframe) {
|
41179
41177
|
const iframe = win.frameElement;
|
41180
41178
|
const viewportBox = getBox(iframe);
|
@@ -45922,7 +45920,6 @@ var require_dist = __commonJS({
|
|
45922
45920
|
}
|
45923
45921
|
return "";
|
45924
45922
|
};
|
45925
|
-
var defer = (fn) => setTimeout(fn, 0);
|
45926
45923
|
var CopyHostStyles = ({
|
45927
45924
|
children,
|
45928
45925
|
debug = false,
|
@@ -46010,7 +46007,7 @@ var require_dist = __commonJS({
|
|
46010
46007
|
if (node.nodeType === Node.TEXT_NODE || node.nodeType === Node.ELEMENT_NODE) {
|
46011
46008
|
const el = node.nodeType === Node.TEXT_NODE ? node.parentElement : node;
|
46012
46009
|
if (el && el.matches(styleSelector)) {
|
46013
|
-
|
46010
|
+
addEl(el);
|
46014
46011
|
}
|
46015
46012
|
}
|
46016
46013
|
});
|
@@ -46018,7 +46015,7 @@ var require_dist = __commonJS({
|
|
46018
46015
|
if (node.nodeType === Node.TEXT_NODE || node.nodeType === Node.ELEMENT_NODE) {
|
46019
46016
|
const el = node.nodeType === Node.TEXT_NODE ? node.parentElement : node;
|
46020
46017
|
if (el && el.matches(styleSelector)) {
|
46021
|
-
|
46018
|
+
removeEl(el);
|
46022
46019
|
}
|
46023
46020
|
}
|
46024
46021
|
});
|
@@ -46029,14 +46026,12 @@ var require_dist = __commonJS({
|
|
46029
46026
|
const collectedStyles = collectStyles(parentDocument);
|
46030
46027
|
let mountedCounter = 0;
|
46031
46028
|
collectedStyles.forEach((styleNode) => {
|
46032
|
-
|
46033
|
-
|
46034
|
-
|
46035
|
-
|
46036
|
-
|
46037
|
-
|
46038
|
-
})
|
46039
|
-
);
|
46029
|
+
addEl(styleNode, () => {
|
46030
|
+
mountedCounter += 1;
|
46031
|
+
if (mountedCounter === collectedStyles.length) {
|
46032
|
+
onStylesLoaded();
|
46033
|
+
}
|
46034
|
+
});
|
46040
46035
|
});
|
46041
46036
|
observer.observe(parentDocument.head, { childList: true, subtree: true });
|
46042
46037
|
return () => {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@measured/puck-plugin-heading-analyzer",
|
3
|
-
"version": "0.14.2-canary.
|
3
|
+
"version": "0.14.2-canary.25a7c4b",
|
4
4
|
"author": "Measured Corporation Ltd <hello@measured.co>",
|
5
5
|
"repository": "measuredco/puck",
|
6
6
|
"bugs": "https://github.com/measuredco/puck/issues",
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"dist"
|
19
19
|
],
|
20
20
|
"devDependencies": {
|
21
|
-
"@measured/puck": "^0.14.2-canary.
|
21
|
+
"@measured/puck": "^0.14.2-canary.25a7c4b",
|
22
22
|
"@types/react": "^18.2.0",
|
23
23
|
"@types/react-dom": "^18.2.0",
|
24
24
|
"eslint": "^7.32.0",
|