@measured/puck-plugin-heading-analyzer 0.14.2-canary.268ea53 → 0.14.2-canary.2b2ef32
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 +14 -23
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -34978,36 +34978,33 @@ 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(win, binding, options) {
|
34982
34982
|
let timer;
|
34983
|
-
if (
|
34983
|
+
if (!loaded) {
|
34984
34984
|
timer = setInterval(() => {
|
34985
|
-
|
34986
|
-
|
34987
|
-
|
34988
|
-
clearInterval(timer);
|
34985
|
+
if (win.document.readyState === "complete") {
|
34986
|
+
win.addEventListener(binding.eventName, binding.fn, options);
|
34987
|
+
loaded = true;
|
34989
34988
|
}
|
34990
34989
|
}, 100);
|
34991
|
-
|
34990
|
+
} else {
|
34991
|
+
win.addEventListener(binding.eventName, binding.fn, options);
|
34992
34992
|
}
|
34993
|
-
const win = getWin(el);
|
34994
|
-
win == null ? void 0 : win.addEventListener(binding.eventName, binding.fn, options);
|
34995
34993
|
return timer;
|
34996
34994
|
}
|
34997
34995
|
function bindEvents(el, bindings, sharedOptions) {
|
34998
34996
|
const unbindings = bindings.flatMap((binding) => {
|
34999
34997
|
const iframes = querySelectorAll(window.document, "[data-rfd-iframe]");
|
35000
|
-
const
|
35001
|
-
return
|
35002
|
-
if (!
|
34998
|
+
const windows = [el, ...iframes.map((iframe) => iframe.contentWindow)];
|
34999
|
+
return windows.map((win) => {
|
35000
|
+
if (!win)
|
35003
35001
|
return function unbind() {
|
35004
35002
|
};
|
35005
35003
|
const options = getOptions(sharedOptions, binding.options);
|
35006
|
-
const timer = bindEvent(
|
35004
|
+
const timer = bindEvent(win, binding, options);
|
35007
35005
|
return function unbind() {
|
35008
35006
|
clearInterval(timer);
|
35009
|
-
|
35010
|
-
win == null ? void 0 : win.removeEventListener(binding.eventName, binding.fn, options);
|
35007
|
+
win.removeEventListener(binding.eventName, binding.fn, options);
|
35011
35008
|
};
|
35012
35009
|
});
|
35013
35010
|
});
|
@@ -37621,7 +37618,7 @@ function getBody() {
|
|
37621
37618
|
!document.body ? process.env.NODE_ENV !== "production" ? invariant2(false, "document.body is not ready") : invariant2(false) : void 0;
|
37622
37619
|
return document.body;
|
37623
37620
|
}
|
37624
|
-
var import_react5, import_react_dom2, isProduction$1, spacesAndTabs, lineStartWithSpaces, clean$2, getDevMessage, getFormattedMessage, isDisabledFlag, warning2, error,
|
37621
|
+
var import_react5, import_react_dom2, isProduction$1, spacesAndTabs, lineStartWithSpaces, clean$2, getDevMessage, getFormattedMessage, isDisabledFlag, warning2, error, loaded, 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;
|
37625
37622
|
var init_dnd_esm = __esm({
|
37626
37623
|
"../../node_modules/@measured/dnd/dist/dnd.esm.js"() {
|
37627
37624
|
init_react_import();
|
@@ -37650,13 +37647,7 @@ var init_dnd_esm = __esm({
|
|
37650
37647
|
isDisabledFlag = "__@hello-pangea/dnd-disable-dev-warnings";
|
37651
37648
|
warning2 = log.bind(null, "warn");
|
37652
37649
|
error = log.bind(null, "error");
|
37653
|
-
|
37654
|
-
let win = el;
|
37655
|
-
if (el.nodeName === "IFRAME") {
|
37656
|
-
win = el.contentWindow;
|
37657
|
-
}
|
37658
|
-
return win;
|
37659
|
-
};
|
37650
|
+
loaded = false;
|
37660
37651
|
isProduction2 = process.env.NODE_ENV === "production";
|
37661
37652
|
prefix$1 = "Invariant failed";
|
37662
37653
|
RbdInvariant = class extends Error {
|
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.2b2ef32",
|
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.2b2ef32",
|
22
22
|
"@types/react": "^18.2.0",
|
23
23
|
"@types/react-dom": "^18.2.0",
|
24
24
|
"eslint": "^7.32.0",
|