@measured/puck-plugin-heading-analyzer 0.14.2-canary.03ab0bd → 0.14.2-canary.268ea53
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +32 -17
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -34978,33 +34978,36 @@ function querySelectorAll(parentNode, selector) {
|
|
34978
34978
|
function getOptions(shared2, fromBinding) {
|
34979
34979
|
return __spreadValues(__spreadValues({}, shared2), fromBinding);
|
34980
34980
|
}
|
34981
|
-
function bindEvent(
|
34981
|
+
function bindEvent(el, binding, options) {
|
34982
34982
|
let timer;
|
34983
|
-
if (
|
34983
|
+
if (el.nodeName === "IFRAME") {
|
34984
34984
|
timer = setInterval(() => {
|
34985
|
-
|
34986
|
-
|
34987
|
-
|
34985
|
+
const currentWin = getWin(el);
|
34986
|
+
if ((currentWin == null ? void 0 : currentWin.document.readyState) === "complete") {
|
34987
|
+
currentWin.addEventListener(binding.eventName, binding.fn, options);
|
34988
|
+
clearInterval(timer);
|
34988
34989
|
}
|
34989
34990
|
}, 100);
|
34990
|
-
|
34991
|
-
win.addEventListener(binding.eventName, binding.fn, options);
|
34991
|
+
return timer;
|
34992
34992
|
}
|
34993
|
+
const win = getWin(el);
|
34994
|
+
win == null ? void 0 : win.addEventListener(binding.eventName, binding.fn, options);
|
34993
34995
|
return timer;
|
34994
34996
|
}
|
34995
34997
|
function bindEvents(el, bindings, sharedOptions) {
|
34996
34998
|
const unbindings = bindings.flatMap((binding) => {
|
34997
34999
|
const iframes = querySelectorAll(window.document, "[data-rfd-iframe]");
|
34998
|
-
const
|
34999
|
-
return
|
35000
|
-
if (!
|
35000
|
+
const els = [el, ...iframes];
|
35001
|
+
return els.map((currentEl) => {
|
35002
|
+
if (!currentEl)
|
35001
35003
|
return function unbind() {
|
35002
35004
|
};
|
35003
35005
|
const options = getOptions(sharedOptions, binding.options);
|
35004
|
-
const timer = bindEvent(
|
35006
|
+
const timer = bindEvent(currentEl, binding, options);
|
35005
35007
|
return function unbind() {
|
35006
35008
|
clearInterval(timer);
|
35007
|
-
win
|
35009
|
+
const win = getWin(currentEl);
|
35010
|
+
win == null ? void 0 : win.removeEventListener(binding.eventName, binding.fn, options);
|
35008
35011
|
};
|
35009
35012
|
});
|
35010
35013
|
});
|
@@ -35470,7 +35473,10 @@ function querySelectorAllIframe(selector) {
|
|
35470
35473
|
iframes = iframes.filter((iframe) => iframe.hasAttribute("data-rfd-iframe"));
|
35471
35474
|
iframeCache.set("iframes", iframes);
|
35472
35475
|
}
|
35473
|
-
const iframePossible = iframes.reduce((acc, iframe) =>
|
35476
|
+
const iframePossible = iframes.reduce((acc, iframe) => {
|
35477
|
+
var _a3;
|
35478
|
+
return [...acc, ...((_a3 = iframe.contentWindow) == null ? void 0 : _a3.document) ? querySelectorAll(iframe.contentWindow.document, selector) : []];
|
35479
|
+
}, []);
|
35474
35480
|
return [...querySelectorAll(document, selector), ...iframePossible];
|
35475
35481
|
}
|
35476
35482
|
function useStyleMarshal(contextId, nonce) {
|
@@ -35492,7 +35498,10 @@ function useStyleMarshal(contextId, nonce) {
|
|
35492
35498
|
useLayoutEffect2(() => {
|
35493
35499
|
const alwaysSelector = `[${alwaysDataAttr}="${contextId}"]`;
|
35494
35500
|
const dynamicSelector = `[${dynamicDataAttr}="${contextId}"]`;
|
35495
|
-
const heads = [getHead(document), ...querySelectorAll(document, `[${prefix2}-iframe]`).
|
35501
|
+
const heads = [getHead(document), ...querySelectorAll(document, `[${prefix2}-iframe]`).filter((iframe) => {
|
35502
|
+
var _a3;
|
35503
|
+
return (_a3 = iframe.contentWindow) == null ? void 0 : _a3.document;
|
35504
|
+
}).map((iframe) => getHead(iframe.contentWindow.document))];
|
35496
35505
|
heads.forEach((head) => {
|
35497
35506
|
if (!head)
|
35498
35507
|
return;
|
@@ -37612,7 +37621,7 @@ function getBody() {
|
|
37612
37621
|
!document.body ? process.env.NODE_ENV !== "production" ? invariant2(false, "document.body is not ready") : invariant2(false) : void 0;
|
37613
37622
|
return document.body;
|
37614
37623
|
}
|
37615
|
-
var import_react5, import_react_dom2, isProduction$1, spacesAndTabs, lineStartWithSpaces, clean$2, getDevMessage, getFormattedMessage, isDisabledFlag, warning2, error,
|
37624
|
+
var import_react5, import_react_dom2, isProduction$1, spacesAndTabs, lineStartWithSpaces, clean$2, getDevMessage, getFormattedMessage, isDisabledFlag, warning2, error, getWin, isProduction2, prefix$1, RbdInvariant, ErrorBoundary, dragHandleUsageInstructions, position, onDragStart, withLocation, withCombine, onDragUpdate, returnedToStart, onDragEnd, preset, preset$1, origin, add, subtract, isEqual$1, negate, patch, distance2, closest$1, apply, executeClip, offsetByPosition, getCorners, noSpacing2, scroll$1, increase, clip2, getSubject, scrollDroppable, toDroppableMap, toDraggableMap, toDroppableList, toDraggableList, getDraggablesInsideDroppable, removeDraggableFromList, moveToNextCombine, isHomeOf, noDisplacedBy, emptyGroups, noImpact, noImpact$1, isWithin, isPartiallyVisibleThroughFrame, isTotallyVisibleThroughFrame, vertical, horizontal, isTotallyVisibleThroughFrameOnAxis, getDroppableDisplaced, isVisibleInDroppable, isVisibleInViewport, isVisible$1, isPartiallyVisible, isTotallyVisible, isTotallyVisibleOnAxis, getShouldAnimate, fromCombine, fromReorder, moveToNextIndex, getCombinedItemDisplacement, whenCombining, distanceFromStartToBorderBoxCenter, distanceFromEndToBorderBoxCenter, getCrossAxisBorderBoxCenter, goAfter, goBefore, goIntoStart, whenReordering, withDroppableDisplacement, getResultWithoutDroppableDisplacement, getPageBorderBoxCenterFromImpact, scrollViewport, speculativelyIncrease, withViewportDisplacement, getClientFromPageBorderBoxCenter, isTotallyVisibleInNewLocation, moveToNextPlace, getKnownActive, getBestCrossAxisDroppable, getCurrentPageBorderBoxCenter, getCurrentPageBorderBox, getClosestDraggable, getDisplacedBy, getRequiredGrowthForPlaceholder, withMaxScroll, addPlaceholder, removePlaceholder, moveToNewDroppable, moveCrossAxis, whatIsDraggedOver, getDroppableOver$1, moveInDirection, offsetRectByPosition, withDroppableScroll, getReorderImpact, combineThresholdDivisor, getCombineImpact, getDragImpact, patchDroppableMap, clearUnusedPlaceholder, recomputePlaceholders, update, recompute, getClientBorderBoxCenter, refreshSnap, getHomeLocation, getLiftEffect, patchDimensionMap, start, finish, offsetDraggable, getFrame, adjustAdditionsForScrollChanges, timingsKey, publishWhileDraggingInVirtual, isSnapping, postDroppableChange, idle$2, reducer, beforeInitialCapture, lift$1, initialPublish, publishWhileDragging, collectionStarting, updateDroppableScroll, updateDroppableIsEnabled, updateDroppableIsCombineEnabled, move, moveByWindowScroll, updateViewportMaxScroll, moveUp, moveDown, moveRight, moveLeft, flush, animateDrop, completeDrop, drop$1, dropPending, dropAnimationFinished, lift, style, curves, combine, timings, outOfTheWayTiming, transitions, moveTo, transforms, minDropTime, maxDropTime, dropTimeRange, maxDropTimeAtDistance, cancelDropModifier, getDropDuration, getNewHomeClientOffset, getDropImpact, dropMiddleware, drop, getWindowScroll3, shouldEnd, scrollListener, scrollListener$1, getExpiringAnnounce, getAsyncMarshal, areLocationsEqual, isCombineEqual, isCriticalEqual, withTimings, getDragStart, getPublisher, responders, dropAnimationFinishMiddleware, dropAnimationFinish, dropAnimationFlushOnScrollMiddleware, dropAnimationFlushOnScroll, dimensionMarshalStopper, focus, shouldStop, autoScroll, pendingDrop, pendingDrop$1, composeEnhancers, createStore2, clean$1, getMaxScroll, getDocumentElement, getMaxWindowScroll, getViewport, getInitialPublish, createDimensionMarshal, canStartDrag, scrollWindow, getScrollableDroppables, getScrollableDroppableOver, getBestScrollableDroppable, defaultAutoScrollerOptions, getDistanceThresholds, getPercentage, minScroll, getValueFromDistance, dampenValueByTime, getValue, getScrollOnAxis, adjustForSizeLimits, clean, getScroll$1, smallestSigned, getOverlap, canPartiallyScroll, canScrollWindow, getWindowOverlap, canScrollDroppable, getDroppableOverlap, getWindowScrollChange, getDroppableScrollChange, iframeCache, createCol, matrixPattern, getMatrix, getOrigin, findNearestTransform, defaultTransform, getTransform, applyTransformPoint, applyTransformRect, applyTransformSpacing, applyTransformBox, resetToOrigin, getIframeScroll, scroll, createFluidScroller, createJumpScroller, createAutoScroller, prefix2, dragHandle, draggable, droppable, scrollContainer, makeGetSelector, getStyles, noPointerEvents, getStyles$1, useIsomorphicLayoutEffect2, useLayoutEffect2, getHead, createStyleEl, alwaysDataAttr, dynamicDataAttr, getWindowFromEl, dragHandleCache, StoreContext, getBodyElement, visuallyHidden, visuallyHidden$1, getId, count$1, defaults, useUniqueId$1, AppContext, peerDependencies, semver, getVersion, isSatisfied, checkReactVersion, suffix, checkDoctype, tab, enter, escape, space, pageUp, pageDown, end, home, arrowLeft, arrowUp, arrowRight, arrowDown, preventedKeys, preventStandardKeyEvents, supportedEventName, supportedPageVisibilityEventName, primaryButton, sloppyClickThreshold, idle$1, scrollJumpKeys, idle, timeForLongPress, forcePressThreshold, interactiveTagNames, getBorderBoxCenterPosition, supportedMatchesName, defaultSensors, createResponders, createAutoScrollerOptions, count, useUniqueContextId$1, zIndexOptions, getDraggingTransition, getDraggingOpacity, getShouldDraggingAnimate, applyOffsetBox, DroppableContext, Draggable, Draggable$1, isStrictEqual, whatIsDraggedOverFromResult, getCombineWithFromResult, getCombineWithFromImpact, atRest, makeMapStateToProps$1, mapDispatchToProps$1, ConnectedDraggable, ConnectedDraggable$1, getScroll, isEqual2, isScroll, isAuto, isVisible, isEither, isBoth, isElementScrollable, isBodyScrollable, getClosestScrollable, getClosestScrollable$1, getIsFixed, getEnv, getDroppableDimension, getClient, getDimension, immediate, delayed, getListenerOptions, getScrollable, getClosestScrollableFromDrag, empty, getSize, getStyle, Placeholder, Placeholder$1, shared, standard, virtual, AnimateInOut, Droppable, Droppable$1, defaultProps, attachDefaultPropsToOwnProps, isMatchingType, getDraggable, makeMapStateToProps, mapDispatchToProps, ConnectedDroppable, ConnectedDroppable$1;
|
37616
37625
|
var init_dnd_esm = __esm({
|
37617
37626
|
"../../node_modules/@measured/dnd/dist/dnd.esm.js"() {
|
37618
37627
|
init_react_import();
|
@@ -37641,7 +37650,13 @@ var init_dnd_esm = __esm({
|
|
37641
37650
|
isDisabledFlag = "__@hello-pangea/dnd-disable-dev-warnings";
|
37642
37651
|
warning2 = log.bind(null, "warn");
|
37643
37652
|
error = log.bind(null, "error");
|
37644
|
-
|
37653
|
+
getWin = (el) => {
|
37654
|
+
let win = el;
|
37655
|
+
if (el.nodeName === "IFRAME") {
|
37656
|
+
win = el.contentWindow;
|
37657
|
+
}
|
37658
|
+
return win;
|
37659
|
+
};
|
37645
37660
|
isProduction2 = process.env.NODE_ENV === "production";
|
37646
37661
|
prefix$1 = "Invariant failed";
|
37647
37662
|
RbdInvariant = class extends Error {
|
@@ -78150,7 +78165,7 @@ var require_dist2 = __commonJS({
|
|
78150
78165
|
{
|
78151
78166
|
className: getClassName24("root"),
|
78152
78167
|
style: {
|
78153
|
-
width: iframe.enabled ? ui.viewports.current.width :
|
78168
|
+
width: iframe.enabled ? ui.viewports.current.width : "100%",
|
78154
78169
|
height: zoomConfig.rootHeight,
|
78155
78170
|
transform: iframe.enabled ? `scale(${zoomConfig.zoom})` : void 0,
|
78156
78171
|
transition: showTransition ? "width 150ms ease-out, height 150ms ease-out, transform 150ms ease-out" : "",
|
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.268ea53",
|
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.268ea53",
|
22
22
|
"@types/react": "^18.2.0",
|
23
23
|
"@types/react-dom": "^18.2.0",
|
24
24
|
"eslint": "^7.32.0",
|