@measured/puck-plugin-heading-analyzer 0.14.2-canary.64303c8 → 0.14.2-canary.9008b70
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +33 -18
- 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 {
|
@@ -74635,7 +74650,7 @@ var require_dist2 = __commonJS({
|
|
74635
74650
|
var import_react72 = require("react");
|
74636
74651
|
var import_dnd3 = (init_dnd_esm(), __toCommonJS(dnd_esm_exports));
|
74637
74652
|
init_react_import2();
|
74638
|
-
var styles_module_default32 = { "DraggableComponent": "
|
74653
|
+
var styles_module_default32 = { "DraggableComponent": "_DraggableComponent_59z7f_1", "DraggableComponent--isDragging": "_DraggableComponent--isDragging_59z7f_11", "DraggableComponent-contents": "_DraggableComponent-contents_59z7f_16", "DraggableComponent-overlay": "_DraggableComponent-overlay_59z7f_29", "DraggableComponent-loadingOverlay": "_DraggableComponent-loadingOverlay_59z7f_49", "DraggableComponent--isLocked": "_DraggableComponent--isLocked_59z7f_65", "DraggableComponent--forceHover": "_DraggableComponent--forceHover_59z7f_71", "DraggableComponent--isSelected": "_DraggableComponent--isSelected_59z7f_76", "DraggableComponent--indicativeHover": "_DraggableComponent--indicativeHover_59z7f_81", "DraggableComponent-actionsOverlay": "_DraggableComponent-actionsOverlay_59z7f_97", "DraggableComponent-actions": "_DraggableComponent-actions_59z7f_97", "DraggableComponent-actionsLabel": "_DraggableComponent-actionsLabel_59z7f_127", "DraggableComponent-action": "_DraggableComponent-action_59z7f_97" };
|
74639
74654
|
init_react_import2();
|
74640
74655
|
init_react_import2();
|
74641
74656
|
var import_react52 = require("react");
|
@@ -74976,7 +74991,7 @@ var require_dist2 = __commonJS({
|
|
74976
74991
|
);
|
74977
74992
|
};
|
74978
74993
|
init_react_import2();
|
74979
|
-
var styles_module_default42 = { "DropZone": "
|
74994
|
+
var styles_module_default42 = { "DropZone": "_DropZone_1fmd4_1", "DropZone-content": "_DropZone-content_1fmd4_10", "DropZone--userIsDragging": "_DropZone--userIsDragging_1fmd4_15", "DropZone--draggingOverArea": "_DropZone--draggingOverArea_1fmd4_19", "DropZone--draggingNewComponent": "_DropZone--draggingNewComponent_1fmd4_20", "DropZone--isAreaSelected": "_DropZone--isAreaSelected_1fmd4_26", "DropZone--hoveringOverArea": "_DropZone--hoveringOverArea_1fmd4_27", "DropZone--isDisabled": "_DropZone--isDisabled_1fmd4_28", "DropZone--isRootZone": "_DropZone--isRootZone_1fmd4_29", "DropZone--hasChildren": "_DropZone--hasChildren_1fmd4_30", "DropZone--isDestination": "_DropZone--isDestination_1fmd4_40", "DropZone-item": "_DropZone-item_1fmd4_52", "DropZone-hitbox": "_DropZone-hitbox_1fmd4_56" };
|
74980
74995
|
init_react_import2();
|
74981
74996
|
var import_react82 = require("react");
|
74982
74997
|
var import_use_debounce = (init_index_module(), __toCommonJS(index_module_exports));
|
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.9008b70",
|
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.9008b70",
|
22
22
|
"@types/react": "^18.2.0",
|
23
23
|
"@types/react-dom": "^18.2.0",
|
24
24
|
"eslint": "^7.32.0",
|