unframer 2.0.0 → 2.0.2
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/README.md +4 -5
- package/dist/cli.test.js +0 -37
- package/dist/cli.test.js.map +1 -1
- package/dist/exporter.d.ts.map +1 -1
- package/dist/exporter.js.map +1 -1
- package/dist/framer.d.ts.map +1 -1
- package/dist/framer.js +979 -725
- package/dist/framer.js.map +1 -1
- package/esm/cli.test.js +1 -35
- package/esm/cli.test.js.map +1 -1
- package/esm/exporter.d.ts.map +1 -1
- package/esm/exporter.js.map +1 -1
- package/esm/framer.d.ts.map +1 -1
- package/esm/framer.js +426 -178
- package/esm/framer.js.map +1 -1
- package/package.json +3 -2
- package/src/cli.test.ts +0 -47
- package/src/exporter.ts +1 -0
- package/src/framer.js +465 -181
package/src/framer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
// https :https://app.framerstatic.com/chunk-
|
|
2
|
+
// https :https://app.framerstatic.com/chunk-O7E5UDPD.js
|
|
3
3
|
import { createContext, } from 'react';
|
|
4
4
|
import { createContext as createContext2, } from 'react';
|
|
5
5
|
import { createContext as createContext3, } from 'react';
|
|
@@ -19,6 +19,7 @@ import { createElement as createElement2, Fragment, useMemo as useMemo4, } from
|
|
|
19
19
|
import { useMemo as useMemo2, } from 'react';
|
|
20
20
|
import { useMemo as useMemo3, } from 'react';
|
|
21
21
|
import React__default, { useContext as useContext6, } from 'react';
|
|
22
|
+
import React__default2 from 'react';
|
|
22
23
|
import { useCallback as useCallback2, useState, } from 'react';
|
|
23
24
|
import { useRef as useRef3, } from 'react';
|
|
24
25
|
import { useEffect as useEffect4, } from 'react';
|
|
@@ -1937,7 +1938,7 @@ var MotionValue = class {
|
|
|
1937
1938
|
* @internal
|
|
1938
1939
|
*/
|
|
1939
1940
|
constructor(init, options = {},) {
|
|
1940
|
-
this.version = '11.0.11-sync.
|
|
1941
|
+
this.version = '11.0.11-sync.5';
|
|
1941
1942
|
this.canTrackVelocity = false;
|
|
1942
1943
|
this.events = {};
|
|
1943
1944
|
this.updateAndNotify = (v, render = true,) => {
|
|
@@ -3386,8 +3387,8 @@ function updateMotionValuesFromProps(element, next, prev,) {
|
|
|
3386
3387
|
}
|
|
3387
3388
|
if (false) {
|
|
3388
3389
|
warnOnce(
|
|
3389
|
-
nextValue.version === '11.0.11-sync.
|
|
3390
|
-
`Attempting to mix Framer Motion versions ${nextValue.version} with 11.0.11-sync.
|
|
3390
|
+
nextValue.version === '11.0.11-sync.5',
|
|
3391
|
+
`Attempting to mix Framer Motion versions ${nextValue.version} with 11.0.11-sync.5 may not work as expected.`,
|
|
3391
3392
|
);
|
|
3392
3393
|
}
|
|
3393
3394
|
} else if (isMotionValue(prevValue,)) {
|
|
@@ -3418,6 +3419,12 @@ function updateMotionValuesFromProps(element, next, prev,) {
|
|
|
3418
3419
|
}
|
|
3419
3420
|
var featureNames = Object.keys(featureDefinitions,);
|
|
3420
3421
|
var numFeatures = featureNames.length;
|
|
3422
|
+
function getClosestProjectingNode(visualElement,) {
|
|
3423
|
+
if (!visualElement) {
|
|
3424
|
+
return void 0;
|
|
3425
|
+
}
|
|
3426
|
+
return visualElement.options.allowProjection !== false ? visualElement.projection : getClosestProjectingNode(visualElement.parent,);
|
|
3427
|
+
}
|
|
3421
3428
|
var propEventHandlers = [
|
|
3422
3429
|
'AnimationStart',
|
|
3423
3430
|
'AnimationComplete',
|
|
@@ -3575,7 +3582,7 @@ var VisualElement = class {
|
|
|
3575
3582
|
}
|
|
3576
3583
|
}
|
|
3577
3584
|
if ((this.type === 'html' || this.type === 'svg') && !this.projection && ProjectionNodeConstructor) {
|
|
3578
|
-
this.projection = new ProjectionNodeConstructor(this.latestValues, this.parent
|
|
3585
|
+
this.projection = new ProjectionNodeConstructor(this.latestValues, getClosestProjectingNode(this.parent,),);
|
|
3579
3586
|
const { layoutId, layout: layout2, drag: drag2, dragConstraints, layoutScroll, layoutRoot, } = renderedProps;
|
|
3580
3587
|
this.projection.setOptions({
|
|
3581
3588
|
layoutId,
|
|
@@ -5648,7 +5655,10 @@ function buildProjectionTransform(delta, treeScale, latestTransform,) {
|
|
|
5648
5655
|
transform2 += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `;
|
|
5649
5656
|
}
|
|
5650
5657
|
if (latestTransform) {
|
|
5651
|
-
const { rotate, rotateX, rotateY, skewX, skewY, } = latestTransform;
|
|
5658
|
+
const { transformPerspective, rotate, rotateX, rotateY, skewX, skewY, } = latestTransform;
|
|
5659
|
+
if (transformPerspective) {
|
|
5660
|
+
transform2 = `perspective(${transformPerspective}px) ${transform2}`;
|
|
5661
|
+
}
|
|
5652
5662
|
if (rotate) {
|
|
5653
5663
|
transform2 += `rotate(${rotate}deg) `;
|
|
5654
5664
|
}
|
|
@@ -7145,7 +7155,10 @@ var SVGVisualElement = class extends DOMVisualElement {
|
|
|
7145
7155
|
var createDomVisualElement = (Component23, options,) => {
|
|
7146
7156
|
return isSVGComponent(Component23,)
|
|
7147
7157
|
? new SVGVisualElement(options, { enableHardwareAcceleration: false, },)
|
|
7148
|
-
: new HTMLVisualElement(options, {
|
|
7158
|
+
: new HTMLVisualElement(options, {
|
|
7159
|
+
enableHardwareAcceleration: true,
|
|
7160
|
+
allowProjection: Component23 !== React__default2.Fragment,
|
|
7161
|
+
},);
|
|
7149
7162
|
};
|
|
7150
7163
|
var layout = {
|
|
7151
7164
|
layout: {
|
|
@@ -9076,7 +9089,7 @@ var cancelSync = stepsOrder.reduce((acc, key7,) => {
|
|
|
9076
9089
|
return acc;
|
|
9077
9090
|
}, {},);
|
|
9078
9091
|
|
|
9079
|
-
// https :https://app.framerstatic.com/framer.
|
|
9092
|
+
// https :https://app.framerstatic.com/framer.PRO3WDEJ.js
|
|
9080
9093
|
import { Component as Component2, } from 'react';
|
|
9081
9094
|
import React12 from 'react';
|
|
9082
9095
|
import { jsx as _jsx5, } from 'react/jsx-runtime';
|
|
@@ -9276,7 +9289,12 @@ import { jsx as jsx55, } from 'react/jsx-runtime';
|
|
|
9276
9289
|
import { jsx as jsx56, } from 'react/jsx-runtime';
|
|
9277
9290
|
import { jsx as jsx57, } from 'react/jsx-runtime';
|
|
9278
9291
|
import React85 from 'react';
|
|
9279
|
-
import { jsx as jsx58,
|
|
9292
|
+
import { jsx as jsx58, } from 'react/jsx-runtime';
|
|
9293
|
+
import { jsx as jsx59, } from 'react/jsx-runtime';
|
|
9294
|
+
import React86 from 'react';
|
|
9295
|
+
import { jsx as jsx60, jsxs as jsxs19, } from 'react/jsx-runtime';
|
|
9296
|
+
import React87 from 'react';
|
|
9297
|
+
import { jsx as jsx61, jsxs as jsxs20, } from 'react/jsx-runtime';
|
|
9280
9298
|
import {
|
|
9281
9299
|
Children as Children32,
|
|
9282
9300
|
cloneElement as cloneElement32,
|
|
@@ -9286,10 +9304,10 @@ import {
|
|
|
9286
9304
|
useInsertionEffect as useInsertionEffect42,
|
|
9287
9305
|
useRef as useRef19,
|
|
9288
9306
|
} from 'react';
|
|
9289
|
-
import * as
|
|
9307
|
+
import * as React88 from 'react';
|
|
9290
9308
|
import { useRef as useRef18, } from 'react';
|
|
9291
|
-
import { jsx as
|
|
9292
|
-
import { jsx as
|
|
9309
|
+
import { jsx as jsx62, } from 'react/jsx-runtime';
|
|
9310
|
+
import { jsx as jsx63, } from 'react/jsx-runtime';
|
|
9293
9311
|
import { useEffect as useEffect142, useState as useState22, } from 'react';
|
|
9294
9312
|
var require_hsluv = __commonJS({
|
|
9295
9313
|
'../../../node_modules/hsluv/hsluv.js'(exports, module,) {
|
|
@@ -10445,12 +10463,13 @@ var require_fontfaceobserver_standalone = __commonJS({
|
|
|
10445
10463
|
},
|
|
10446
10464
|
},);
|
|
10447
10465
|
function renderPage(Page4, defaultPageStyle,) {
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
: React12.createElement(Page4, { style: defaultPageStyle, },);
|
|
10466
|
+
const style = { style: defaultPageStyle, };
|
|
10467
|
+
return React12.isValidElement(Page4,) ? React12.cloneElement(Page4, style,) : React12.createElement(Page4, style,);
|
|
10451
10468
|
}
|
|
10452
10469
|
var NotFoundError = class extends Error {
|
|
10453
10470
|
};
|
|
10471
|
+
var ErrorBoundaryCaughtError = class extends Error {
|
|
10472
|
+
};
|
|
10454
10473
|
var ErrorBoundary = class extends Component2 {
|
|
10455
10474
|
constructor(props,) {
|
|
10456
10475
|
super(props,);
|
|
@@ -10477,7 +10496,9 @@ var ErrorBoundary = class extends Component2 {
|
|
|
10477
10496
|
return this.props.children;
|
|
10478
10497
|
}
|
|
10479
10498
|
if (!(this.state.error instanceof NotFoundError)) {
|
|
10480
|
-
|
|
10499
|
+
const error = new ErrorBoundaryCaughtError();
|
|
10500
|
+
error.cause = this.state.error;
|
|
10501
|
+
throw error;
|
|
10481
10502
|
}
|
|
10482
10503
|
const { notFoundPage, defaultPageStyle, } = this.props;
|
|
10483
10504
|
if (!notFoundPage) {
|
|
@@ -11359,17 +11380,17 @@ function RoutesProvider({ routes, children, },) {
|
|
|
11359
11380
|
return _jsx2(RouterContext.Provider, { value: { getRoute, }, children, },);
|
|
11360
11381
|
}
|
|
11361
11382
|
var SuspenseErrorBoundary = class extends Component22 {
|
|
11362
|
-
constructor(
|
|
11363
|
-
super(
|
|
11383
|
+
constructor() {
|
|
11384
|
+
super(...arguments,);
|
|
11364
11385
|
this.state = { error: void 0, };
|
|
11365
11386
|
}
|
|
11366
11387
|
static getDerivedStateFromError(error,) {
|
|
11367
|
-
console.error('
|
|
11388
|
+
console.error('Derived error in SuspenseErrorBoundary', error,);
|
|
11368
11389
|
return { error, };
|
|
11369
11390
|
}
|
|
11370
11391
|
componentDidCatch(error, errorInfo,) {
|
|
11371
11392
|
var _a;
|
|
11372
|
-
console.error('Caught error in
|
|
11393
|
+
console.error('Caught error in SuspenseErrorBoundary', error, errorInfo,);
|
|
11373
11394
|
(_a = window.__framer_events) === null || _a === void 0 ? void 0 : _a.push([
|
|
11374
11395
|
'published_site_load_recoverable_error',
|
|
11375
11396
|
{
|
|
@@ -11382,6 +11403,9 @@ var SuspenseErrorBoundary = class extends Component22 {
|
|
|
11382
11403
|
if (this.state.error === void 0) {
|
|
11383
11404
|
return this.props.children;
|
|
11384
11405
|
}
|
|
11406
|
+
if (this.state.error instanceof ErrorBoundaryCaughtError) {
|
|
11407
|
+
throw this.state.error.cause;
|
|
11408
|
+
}
|
|
11385
11409
|
return _jsx3(Suspense, { children: this.props.fallbackChildren, },);
|
|
11386
11410
|
}
|
|
11387
11411
|
};
|
|
@@ -12139,6 +12163,9 @@ function Point(x, y,) {
|
|
|
12139
12163
|
Point2.angle = (a, b,) => {
|
|
12140
12164
|
return Math.atan2(b.y - a.y, b.x - a.x,) * 180 / Math.PI - 90;
|
|
12141
12165
|
};
|
|
12166
|
+
Point2.angleFromX = (a, b,) => {
|
|
12167
|
+
return Math.atan2(b.y - a.y, b.x - a.x,) * 180 / Math.PI;
|
|
12168
|
+
};
|
|
12142
12169
|
Point2.isEqual = (a, b,) => {
|
|
12143
12170
|
return a.x === b.x && a.y === b.y;
|
|
12144
12171
|
};
|
|
@@ -12168,24 +12195,6 @@ function Point(x, y,) {
|
|
|
12168
12195
|
};
|
|
12169
12196
|
}
|
|
12170
12197
|
Point2.center = center;
|
|
12171
|
-
function insidePoints(point2, points,) {
|
|
12172
|
-
var _a, _b, _c, _d;
|
|
12173
|
-
const x = point2.x;
|
|
12174
|
-
const y = point2.y;
|
|
12175
|
-
let isInside = false;
|
|
12176
|
-
for (let i = 0, j = points.length - 1; i < points.length; j = i++) {
|
|
12177
|
-
const xi = ((_a = points[i]) == null ? void 0 : _a.x) ?? 0;
|
|
12178
|
-
const yi = ((_b = points[i]) == null ? void 0 : _b.y) ?? 0;
|
|
12179
|
-
const xj = ((_c = points[j]) == null ? void 0 : _c.x) ?? 0;
|
|
12180
|
-
const yj = ((_d = points[j]) == null ? void 0 : _d.y) ?? 0;
|
|
12181
|
-
const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
|
|
12182
|
-
if (intersect) {
|
|
12183
|
-
isInside = !isInside;
|
|
12184
|
-
}
|
|
12185
|
-
}
|
|
12186
|
-
return isInside;
|
|
12187
|
-
}
|
|
12188
|
-
Point2.insidePoints = insidePoints;
|
|
12189
12198
|
})(Point || (Point = {}),);
|
|
12190
12199
|
var BezierDefaults = {
|
|
12191
12200
|
curve: 'ease',
|
|
@@ -14908,15 +14917,18 @@ var ErrorBoundary2 = class extends Component3 {
|
|
|
14908
14917
|
__publicField(this, 'state', {},);
|
|
14909
14918
|
}
|
|
14910
14919
|
componentDidCatch(error, info,) {
|
|
14911
|
-
|
|
14920
|
+
var _a;
|
|
14921
|
+
let stack = (_a = info.componentStack) == null ? void 0 : _a.split('\n',).filter((line,) => line.length !== 0);
|
|
14912
14922
|
let currentIndex = 0;
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
|
|
14923
|
+
if (stack) {
|
|
14924
|
+
for (const line of stack) {
|
|
14925
|
+
if (line.startsWith(` in ${this.constructor.name}`,)) {
|
|
14926
|
+
break;
|
|
14927
|
+
}
|
|
14928
|
+
currentIndex++;
|
|
14916
14929
|
}
|
|
14917
|
-
currentIndex
|
|
14930
|
+
stack = stack.slice(0, currentIndex,);
|
|
14918
14931
|
}
|
|
14919
|
-
stack = stack.slice(0, currentIndex,);
|
|
14920
14932
|
this.setState({
|
|
14921
14933
|
lastError: {
|
|
14922
14934
|
error,
|
|
@@ -15325,13 +15337,18 @@ var Rect;
|
|
|
15325
15337
|
};
|
|
15326
15338
|
};
|
|
15327
15339
|
Rect2.boundingRectFromPoints = (ps,) => {
|
|
15328
|
-
|
|
15329
|
-
|
|
15330
|
-
|
|
15331
|
-
|
|
15332
|
-
|
|
15333
|
-
|
|
15334
|
-
|
|
15340
|
+
let minX2 = Infinity;
|
|
15341
|
+
let maxX2 = -Infinity;
|
|
15342
|
+
let minY2 = Infinity;
|
|
15343
|
+
let maxY2 = -Infinity;
|
|
15344
|
+
for (let i = 0; i < ps.length; i++) {
|
|
15345
|
+
const point2 = ps[i];
|
|
15346
|
+
minX2 = Math.min(minX2, point2.x,);
|
|
15347
|
+
maxX2 = Math.max(maxX2, point2.x,);
|
|
15348
|
+
minY2 = Math.min(minY2, point2.y,);
|
|
15349
|
+
maxY2 = Math.max(maxY2, point2.y,);
|
|
15350
|
+
}
|
|
15351
|
+
return { x: minX2, y: minY2, width: maxX2 - minX2, height: maxY2 - minY2, };
|
|
15335
15352
|
};
|
|
15336
15353
|
Rect2.fromPoints = (ps,) => {
|
|
15337
15354
|
const [tl, tr, _, bl,] = ps;
|
|
@@ -16153,6 +16170,8 @@ var ControlType = /* @__PURE__ */ ((ControlType2,) => {
|
|
|
16153
16170
|
ControlType2['CustomCursor'] = 'customcursor';
|
|
16154
16171
|
ControlType2['Border'] = 'border';
|
|
16155
16172
|
ControlType2['Cursor'] = 'cursor';
|
|
16173
|
+
ControlType2['Padding'] = 'padding';
|
|
16174
|
+
ControlType2['BorderRadius'] = 'borderradius';
|
|
16156
16175
|
return ControlType2;
|
|
16157
16176
|
})(ControlType || {},);
|
|
16158
16177
|
var isFlexboxGapSupportedCached;
|
|
@@ -17017,6 +17036,7 @@ var hideScrollbars = [
|
|
|
17017
17036
|
`[data-hide-scrollbars="true"]::-webkit-scrollbar { width: 0px; height: 0px; }`,
|
|
17018
17037
|
`[data-hide-scrollbars="true"]::-webkit-scrollbar-thumb { background: transparent; }`,
|
|
17019
17038
|
];
|
|
17039
|
+
var formInputRules = [`[data-framer-component-type="Form"] input { padding: var(--input-padding); }`,];
|
|
17020
17040
|
var frameCSSRules = (isPreview,) => {
|
|
17021
17041
|
return isPreview ? frameCSS : [];
|
|
17022
17042
|
};
|
|
@@ -17038,6 +17058,7 @@ var combineCSSRules = (isPreview,) => [
|
|
|
17038
17058
|
...svgCSSRules,
|
|
17039
17059
|
...resetCSS,
|
|
17040
17060
|
...hideScrollbars,
|
|
17061
|
+
...formInputRules,
|
|
17041
17062
|
];
|
|
17042
17063
|
export var combinedCSSRules = combineCSSRules(false,);
|
|
17043
17064
|
var combinedCSSRulesForPreview = combineCSSRules(true,);
|
|
@@ -17099,6 +17120,8 @@ function getControlDefaultValue(control,) {
|
|
|
17099
17120
|
case 'date':
|
|
17100
17121
|
case 'link':
|
|
17101
17122
|
case 'boxshadow':
|
|
17123
|
+
case 'padding':
|
|
17124
|
+
case 'borderradius':
|
|
17102
17125
|
return isString22(control.defaultValue,) ? control.defaultValue : void 0;
|
|
17103
17126
|
case 'boolean':
|
|
17104
17127
|
return isBoolean(control.defaultValue,) ? control.defaultValue : void 0;
|
|
@@ -20044,7 +20067,7 @@ function setTranslateZHack(style, enabled,) {
|
|
|
20044
20067
|
if (!useTranslateZHack || !onCanvas) {
|
|
20045
20068
|
return;
|
|
20046
20069
|
}
|
|
20047
|
-
const transform2 = style.transform || '';
|
|
20070
|
+
const transform2 = isString22(style.transform,) ? style.transform || '' : '';
|
|
20048
20071
|
if (enabled) {
|
|
20049
20072
|
const hasTranslateZ = transform2.includes(translateZ,);
|
|
20050
20073
|
if (!hasTranslateZ) {
|
|
@@ -20659,7 +20682,7 @@ var VisibleFrame = /* @__PURE__ */ forwardRef4(function VisibleFrame2(props, for
|
|
|
20659
20682
|
const fallbackRef = useRef62(null,);
|
|
20660
20683
|
const ref = forwardedRef ?? fallbackRef;
|
|
20661
20684
|
const dataProps = {
|
|
20662
|
-
'data-framer-component-type': 'Frame',
|
|
20685
|
+
'data-framer-component-type': props.componentType ?? 'Frame',
|
|
20663
20686
|
'data-framer-cursor': cursor,
|
|
20664
20687
|
'data-framer-highlight': cursor === 'pointer' ? true : void 0,
|
|
20665
20688
|
'data-layoutid': layoutId,
|
|
@@ -24558,6 +24581,9 @@ function makePaddingString({
|
|
|
24558
24581
|
bottom,
|
|
24559
24582
|
right,
|
|
24560
24583
|
},) {
|
|
24584
|
+
if (top === right && right === bottom && bottom === left) {
|
|
24585
|
+
return `${top}px`;
|
|
24586
|
+
}
|
|
24561
24587
|
return `${top}px ${right}px ${bottom}px ${left}px`;
|
|
24562
24588
|
}
|
|
24563
24589
|
function triggerStackReflow(element, display,) {
|
|
@@ -27682,7 +27708,7 @@ function getTransition(value,) {
|
|
|
27682
27708
|
}
|
|
27683
27709
|
return value == null ? void 0 : value.transition;
|
|
27684
27710
|
}
|
|
27685
|
-
async function runEffectAnimation(target, effect, shouldReduceMotion, ref, appearId,) {
|
|
27711
|
+
async function runEffectAnimation(target, effect, shouldReduceMotion, ref, appearId, instant,) {
|
|
27686
27712
|
const transition = getTransition(target,);
|
|
27687
27713
|
return Promise.all(
|
|
27688
27714
|
effectValuesKeys.map((key7,) => {
|
|
@@ -27709,14 +27735,17 @@ async function runEffectAnimation(target, effect, shouldReduceMotion, ref, appea
|
|
|
27709
27735
|
elapsed: safeWindow.HandoffAppearAnimations(appearId, key7, motionValue2, frame,),
|
|
27710
27736
|
}
|
|
27711
27737
|
: void 0;
|
|
27712
|
-
|
|
27713
|
-
|
|
27714
|
-
|
|
27715
|
-
|
|
27716
|
-
|
|
27717
|
-
|
|
27718
|
-
|
|
27719
|
-
|
|
27738
|
+
if (instant) {
|
|
27739
|
+
motionValue2.set(value,);
|
|
27740
|
+
} else {
|
|
27741
|
+
animate(motionValue2, value, {
|
|
27742
|
+
...transition,
|
|
27743
|
+
velocity: 0,
|
|
27744
|
+
elapsed: 0,
|
|
27745
|
+
...handoff,
|
|
27746
|
+
onComplete: () => resolve(),
|
|
27747
|
+
},);
|
|
27748
|
+
}
|
|
27720
27749
|
},);
|
|
27721
27750
|
},),
|
|
27722
27751
|
);
|
|
@@ -27726,16 +27755,6 @@ var presenceOptionsKeys = /* @__PURE__ */ new Set([
|
|
|
27726
27755
|
'presenceAnimate',
|
|
27727
27756
|
'presenceExit',
|
|
27728
27757
|
],);
|
|
27729
|
-
function getVisualElementBase(visualElement, style,) {
|
|
27730
|
-
const ctx = visualElement.getVariantContext();
|
|
27731
|
-
const base = { ...style, };
|
|
27732
|
-
if (Array.isArray(ctx == null ? void 0 : ctx.animate,)) {
|
|
27733
|
-
for (const variant of ctx.animate) {
|
|
27734
|
-
Object.assign(base, visualElement.getVariant(variant,),);
|
|
27735
|
-
}
|
|
27736
|
-
}
|
|
27737
|
-
return base;
|
|
27738
|
-
}
|
|
27739
27758
|
function usePresenceAnimation(
|
|
27740
27759
|
{
|
|
27741
27760
|
initial: motionInitial,
|
|
@@ -27754,6 +27773,9 @@ function usePresenceAnimation(
|
|
|
27754
27773
|
const animateConfig = presenceAnimate ?? motionAnimate;
|
|
27755
27774
|
const exit = presenceExit ?? motionExit;
|
|
27756
27775
|
const hasMounted = useRef122(false,);
|
|
27776
|
+
const lastAnimate = useRef122(animateConfig,);
|
|
27777
|
+
const [isPresent2, safeToRemove,] = usePresence();
|
|
27778
|
+
const lastPresence = useRef122(false,);
|
|
27757
27779
|
const effect = useConstant2(() => {
|
|
27758
27780
|
var _a;
|
|
27759
27781
|
const base = initial ?? style;
|
|
@@ -27770,43 +27792,51 @@ function usePresenceAnimation(
|
|
|
27770
27792
|
}
|
|
27771
27793
|
return { values: makeFXValues(defaults,), };
|
|
27772
27794
|
},);
|
|
27773
|
-
const [isPresent2, safeToRemove,] = usePresence();
|
|
27774
|
-
const shouldReduceMotion = useReducedMotionConfig();
|
|
27775
|
-
useLayoutEffect22(() => {
|
|
27776
|
-
hasMounted.current = true;
|
|
27777
|
-
if (!enabled) {
|
|
27778
|
-
safeToRemove == null ? void 0 : safeToRemove();
|
|
27779
|
-
return;
|
|
27780
|
-
}
|
|
27781
|
-
if (isPresent2) {
|
|
27782
|
-
if (initial && animateConfig) {
|
|
27783
|
-
runEffectAnimation(animateConfig, effect, shouldReduceMotion, ref, appearId,);
|
|
27784
|
-
}
|
|
27785
|
-
} else {
|
|
27786
|
-
if (exit) {
|
|
27787
|
-
runEffectAnimation(exit, effect, shouldReduceMotion, ref,).then(() => safeToRemove());
|
|
27788
|
-
} else {
|
|
27789
|
-
safeToRemove();
|
|
27790
|
-
}
|
|
27791
|
-
}
|
|
27792
|
-
}, [isPresent2,],);
|
|
27793
27795
|
useLayoutEffect22(() => {
|
|
27794
|
-
if (
|
|
27796
|
+
if (hasMounted.current && animateConfig) {
|
|
27795
27797
|
return;
|
|
27796
27798
|
}
|
|
27797
27799
|
const visualElement = visualElementStore.get(ref.current,);
|
|
27798
27800
|
if (!visualElement) {
|
|
27799
27801
|
return;
|
|
27800
27802
|
}
|
|
27801
|
-
|
|
27803
|
+
hasMounted.current = true;
|
|
27802
27804
|
for (const key7 in effect.values) {
|
|
27803
27805
|
if (!isFXValuesKey(key7,)) {
|
|
27804
27806
|
continue;
|
|
27805
27807
|
}
|
|
27806
|
-
const value =
|
|
27808
|
+
const value = style == null ? void 0 : style[key7];
|
|
27807
27809
|
visualElement.setBaseTarget(key7, isNumber2(value,) ? value : defaultFXValues[key7],);
|
|
27808
27810
|
}
|
|
27809
|
-
}, [
|
|
27811
|
+
}, [animateConfig,],);
|
|
27812
|
+
const shouldReduceMotion = useReducedMotionConfig();
|
|
27813
|
+
useLayoutEffect22(() => {
|
|
27814
|
+
if (!enabled) {
|
|
27815
|
+
safeToRemove == null ? void 0 : safeToRemove();
|
|
27816
|
+
return;
|
|
27817
|
+
}
|
|
27818
|
+
if (isPresent2 !== lastPresence.current) {
|
|
27819
|
+
lastPresence.current = isPresent2;
|
|
27820
|
+
if (isPresent2) {
|
|
27821
|
+
if (initial && animateConfig) {
|
|
27822
|
+
runEffectAnimation(animateConfig, effect, shouldReduceMotion, ref, appearId,);
|
|
27823
|
+
}
|
|
27824
|
+
} else {
|
|
27825
|
+
if (exit) {
|
|
27826
|
+
runEffectAnimation(exit, effect, shouldReduceMotion, ref, appearId,).then(() => safeToRemove());
|
|
27827
|
+
} else {
|
|
27828
|
+
safeToRemove();
|
|
27829
|
+
}
|
|
27830
|
+
}
|
|
27831
|
+
} else {
|
|
27832
|
+
const hasAnimateChanged = !isEqual(animateConfig, lastAnimate.current,);
|
|
27833
|
+
if (!hasAnimateChanged || !animateConfig) {
|
|
27834
|
+
return;
|
|
27835
|
+
}
|
|
27836
|
+
lastAnimate.current = animateConfig;
|
|
27837
|
+
runEffectAnimation(animateConfig, effect, shouldReduceMotion, ref, appearId, true,);
|
|
27838
|
+
}
|
|
27839
|
+
},);
|
|
27810
27840
|
return effect;
|
|
27811
27841
|
}
|
|
27812
27842
|
function calcOffsetTop(element, container,) {
|
|
@@ -28201,6 +28231,9 @@ function useStyleTransform({
|
|
|
28201
28231
|
if (pageInputRange.length !== outputRange[key7].length) {
|
|
28202
28232
|
continue;
|
|
28203
28233
|
}
|
|
28234
|
+
if (outputRange[key7][0] === void 0) {
|
|
28235
|
+
continue;
|
|
28236
|
+
}
|
|
28204
28237
|
effect.values[key7].set(transform(scrollY.progress, pageInputRange, outputRange[key7],),);
|
|
28205
28238
|
}
|
|
28206
28239
|
},
|
|
@@ -28230,6 +28263,9 @@ function useStyleTransform({
|
|
|
28230
28263
|
if (scrollYInputRange.length !== effectKeyOutputRange[key7].length) {
|
|
28231
28264
|
continue;
|
|
28232
28265
|
}
|
|
28266
|
+
if (effectKeyOutputRange[key7][0] === void 0) {
|
|
28267
|
+
continue;
|
|
28268
|
+
}
|
|
28233
28269
|
effect.values[key7].set(transform(scrollY.current, scrollYInputRange, effectKeyOutputRange[key7],),);
|
|
28234
28270
|
}
|
|
28235
28271
|
},);
|
|
@@ -28909,6 +28945,181 @@ function useCustomCursors(webPageCursors,) {
|
|
|
28909
28945
|
registerCursors(cursors,);
|
|
28910
28946
|
}, [cursors, registerCursors,],);
|
|
28911
28947
|
}
|
|
28948
|
+
function degreesToRadians(degrees2,) {
|
|
28949
|
+
return degrees2 * (Math.PI / 180);
|
|
28950
|
+
}
|
|
28951
|
+
var Line = /* @__PURE__ */ (() => {
|
|
28952
|
+
function Line2(a, b,) {
|
|
28953
|
+
return { a, b, };
|
|
28954
|
+
}
|
|
28955
|
+
Line2.offset = (line, offset,) => {
|
|
28956
|
+
const angle = Point.angleFromX(line.a, line.b,);
|
|
28957
|
+
const rad = degreesToRadians(angle,);
|
|
28958
|
+
const x = offset * Math.sin(rad,);
|
|
28959
|
+
const y = offset * Math.cos(rad,);
|
|
28960
|
+
return Line2(
|
|
28961
|
+
{ x: line.a.x + x, y: line.a.y - y, },
|
|
28962
|
+
{
|
|
28963
|
+
x: line.b.x + x,
|
|
28964
|
+
y: line.b.y - y,
|
|
28965
|
+
},
|
|
28966
|
+
);
|
|
28967
|
+
};
|
|
28968
|
+
Line2.intersection = (lineA, lineB,) => {
|
|
28969
|
+
const x1 = lineA.a.x;
|
|
28970
|
+
const y1 = lineA.a.y;
|
|
28971
|
+
const x2 = lineA.b.x;
|
|
28972
|
+
const y2 = lineA.b.y;
|
|
28973
|
+
const x3 = lineB.a.x;
|
|
28974
|
+
const y3 = lineB.a.y;
|
|
28975
|
+
const x4 = lineB.b.x;
|
|
28976
|
+
const y4 = lineB.b.y;
|
|
28977
|
+
const d = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);
|
|
28978
|
+
if (d === 0) {
|
|
28979
|
+
return null;
|
|
28980
|
+
}
|
|
28981
|
+
const xi = ((x3 - x4) * (x1 * y2 - y1 * x2) - (x1 - x2) * (x3 * y4 - y3 * x4)) / d;
|
|
28982
|
+
const yi = ((y3 - y4) * (x1 * y2 - y1 * x2) - (y1 - y2) * (x3 * y4 - y3 * x4)) / d;
|
|
28983
|
+
return { x: xi, y: yi, };
|
|
28984
|
+
};
|
|
28985
|
+
Line2.intersectionAngle = (lineA, lineB,) => {
|
|
28986
|
+
const deltaAX = lineA.b.x - lineA.a.x;
|
|
28987
|
+
const deltaAY = lineA.b.y - lineA.a.y;
|
|
28988
|
+
const deltaBX = lineB.b.x - lineB.a.x;
|
|
28989
|
+
const deltaBY = lineB.b.y - lineB.a.y;
|
|
28990
|
+
const angle = Math.atan2(deltaAX * deltaBY - deltaAY * deltaBX, deltaAX * deltaBX + deltaAY * deltaBY,);
|
|
28991
|
+
return angle * (180 / Math.PI);
|
|
28992
|
+
};
|
|
28993
|
+
Line2.isOrthogonal = (line,) => {
|
|
28994
|
+
return line.a.x === line.b.x || line.a.y === line.b.y;
|
|
28995
|
+
};
|
|
28996
|
+
Line2.perpendicular = (line, pointOnLine,) => {
|
|
28997
|
+
const deltaX = line.a.x - line.b.x;
|
|
28998
|
+
const deltaY = line.a.y - line.b.y;
|
|
28999
|
+
const pointB = Point(pointOnLine.x - deltaY, pointOnLine.y + deltaX,);
|
|
29000
|
+
return Line2(pointB, pointOnLine,);
|
|
29001
|
+
};
|
|
29002
|
+
Line2.projectPoint = (line, point2,) => {
|
|
29003
|
+
const perp = Line2.perpendicular(line, point2,);
|
|
29004
|
+
return Line2.intersection(line, perp,);
|
|
29005
|
+
};
|
|
29006
|
+
Line2.pointAtPercentDistance = (line, distance2,) => {
|
|
29007
|
+
const hypotenuse = Line2.distance(line,);
|
|
29008
|
+
const r = distance2 * hypotenuse / hypotenuse;
|
|
29009
|
+
return {
|
|
29010
|
+
x: r * line.b.x + (1 - r) * line.a.x,
|
|
29011
|
+
y: r * line.b.y + (1 - r) * line.a.y,
|
|
29012
|
+
};
|
|
29013
|
+
};
|
|
29014
|
+
Line2.distance = (line,) => {
|
|
29015
|
+
return Point.distance(line.a, line.b,);
|
|
29016
|
+
};
|
|
29017
|
+
return Line2;
|
|
29018
|
+
})();
|
|
29019
|
+
var Polygon = {
|
|
29020
|
+
/**
|
|
29021
|
+
* Determine if the vertices are ordered clockwise or counter-clockwise. This works for simple
|
|
29022
|
+
* (non-self-intersecting) convex polygons. If the polygon is collapsed into a line (signedArea = 0), we consider it
|
|
29023
|
+
* clockwise for it works with how Framer draws the polygons.
|
|
29024
|
+
* See: https://paulbourke.net/geometry/polygonmesh/
|
|
29025
|
+
* @internal */
|
|
29026
|
+
isClockwise: (points,) => {
|
|
29027
|
+
return Polygon.signedArea(points,) <= 0;
|
|
29028
|
+
},
|
|
29029
|
+
/**
|
|
29030
|
+
* Calculate the signed area to determine if the vertices go clockwise or counter clockwise. We flip all the y
|
|
29031
|
+
* values because the y axis in our canvas coordinate is fipped.
|
|
29032
|
+
* See: https://mathworld.wolfram.com/PolygonArea.html
|
|
29033
|
+
* @internal */
|
|
29034
|
+
signedArea: (points,) => {
|
|
29035
|
+
let sum = 0;
|
|
29036
|
+
const len = points.length;
|
|
29037
|
+
for (let i = 0; i < len; i++) {
|
|
29038
|
+
const pointA = points[i];
|
|
29039
|
+
const pointB = points[(i + 1) % len];
|
|
29040
|
+
if (!pointA || !pointB) {
|
|
29041
|
+
continue;
|
|
29042
|
+
}
|
|
29043
|
+
sum += pointA.x * -pointB.y - pointB.x * -pointA.y;
|
|
29044
|
+
}
|
|
29045
|
+
return 1 / 2 * sum;
|
|
29046
|
+
},
|
|
29047
|
+
/**
|
|
29048
|
+
* Determine if some Point lies inside the polygon formed by other Points.
|
|
29049
|
+
* The other points must be provided in a clockwise/counter clockwise order.
|
|
29050
|
+
*
|
|
29051
|
+
* Ray-casting algorithm based on
|
|
29052
|
+
* https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html
|
|
29053
|
+
*
|
|
29054
|
+
* @internal */
|
|
29055
|
+
containsPoint: (polygonPoints2, point2,) => {
|
|
29056
|
+
var _a, _b, _c, _d;
|
|
29057
|
+
const x = point2.x;
|
|
29058
|
+
const y = point2.y;
|
|
29059
|
+
let isInside = false;
|
|
29060
|
+
for (let i = 0, j = polygonPoints2.length - 1; i < polygonPoints2.length; j = i++) {
|
|
29061
|
+
const xi = ((_a = polygonPoints2[i]) == null ? void 0 : _a.x) ?? 0;
|
|
29062
|
+
const yi = ((_b = polygonPoints2[i]) == null ? void 0 : _b.y) ?? 0;
|
|
29063
|
+
const xj = ((_c = polygonPoints2[j]) == null ? void 0 : _c.x) ?? 0;
|
|
29064
|
+
const yj = ((_d = polygonPoints2[j]) == null ? void 0 : _d.y) ?? 0;
|
|
29065
|
+
const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
|
|
29066
|
+
if (intersect) {
|
|
29067
|
+
isInside = !isInside;
|
|
29068
|
+
}
|
|
29069
|
+
}
|
|
29070
|
+
return isInside;
|
|
29071
|
+
},
|
|
29072
|
+
/** @internal */
|
|
29073
|
+
intersect: (pointsA, pointsB,) => {
|
|
29074
|
+
if (pointsA.length < 1 || pointsB.length < 1) {
|
|
29075
|
+
return false;
|
|
29076
|
+
}
|
|
29077
|
+
const boundingRectA = Rect.boundingRectFromPoints(pointsA,);
|
|
29078
|
+
const boundingRectB = Rect.boundingRectFromPoints(pointsB,);
|
|
29079
|
+
if (!Rect.intersects(boundingRectA, boundingRectB,)) {
|
|
29080
|
+
return false;
|
|
29081
|
+
}
|
|
29082
|
+
const edgesA = [];
|
|
29083
|
+
const pointsALength = pointsA.length;
|
|
29084
|
+
pointsA.forEach((point2, index,) => {
|
|
29085
|
+
const nextPoint = pointsA[(index + 1) % pointsALength];
|
|
29086
|
+
if (!nextPoint) {
|
|
29087
|
+
return;
|
|
29088
|
+
}
|
|
29089
|
+
edgesA.push(Line(point2, nextPoint,),);
|
|
29090
|
+
},);
|
|
29091
|
+
const edgesB = [];
|
|
29092
|
+
const pointsBLength = pointsB.length;
|
|
29093
|
+
pointsB.forEach((point2, index,) => {
|
|
29094
|
+
const nextPoint = pointsB[(index + 1) % pointsBLength];
|
|
29095
|
+
if (!nextPoint) {
|
|
29096
|
+
return;
|
|
29097
|
+
}
|
|
29098
|
+
edgesB.push(Line(point2, nextPoint,),);
|
|
29099
|
+
},);
|
|
29100
|
+
for (const edgeA of edgesA) {
|
|
29101
|
+
for (const edgeB of edgesB) {
|
|
29102
|
+
const intersection2 = segmentsIntersect(edgeA, edgeB,);
|
|
29103
|
+
if (intersection2) {
|
|
29104
|
+
return true;
|
|
29105
|
+
}
|
|
29106
|
+
}
|
|
29107
|
+
}
|
|
29108
|
+
if (Polygon.containsPoint(pointsB, pointsA[0],)) {
|
|
29109
|
+
return true;
|
|
29110
|
+
}
|
|
29111
|
+
if (Polygon.containsPoint(pointsA, pointsB[0],)) {
|
|
29112
|
+
return true;
|
|
29113
|
+
}
|
|
29114
|
+
return false;
|
|
29115
|
+
},
|
|
29116
|
+
};
|
|
29117
|
+
function segmentsIntersect(segmentA, segmentB,) {
|
|
29118
|
+
const { a, b, } = segmentA;
|
|
29119
|
+
const { a: c, b: d, } = segmentB;
|
|
29120
|
+
return Polygon.isClockwise([a, c, d,],) !== Polygon.isClockwise([b, c, d,],) &&
|
|
29121
|
+
Polygon.isClockwise([a, b, c,],) !== Polygon.isClockwise([a, b, d,],);
|
|
29122
|
+
}
|
|
28912
29123
|
function invertPlacement(placement,) {
|
|
28913
29124
|
switch (placement) {
|
|
28914
29125
|
case 'top':
|
|
@@ -29020,7 +29231,7 @@ function getSafePlacementFloatingPositionRect(
|
|
|
29020
29231
|
];
|
|
29021
29232
|
}
|
|
29022
29233
|
function preferredPoint(a, b, points,) {
|
|
29023
|
-
if (
|
|
29234
|
+
if (Polygon.containsPoint([b, ...points,], a,)) {
|
|
29024
29235
|
return b;
|
|
29025
29236
|
}
|
|
29026
29237
|
return a;
|
|
@@ -33264,6 +33475,10 @@ function useQueryData(query,) {
|
|
|
33264
33475
|
result = useExecuteSelect(result, query.select,);
|
|
33265
33476
|
return result;
|
|
33266
33477
|
}
|
|
33478
|
+
function useQueryCount(query,) {
|
|
33479
|
+
const collection = useQueryData(query,);
|
|
33480
|
+
return collection.length;
|
|
33481
|
+
}
|
|
33267
33482
|
function evaluateExpression(expression, context,) {
|
|
33268
33483
|
switch (expression.type) {
|
|
33269
33484
|
case 'Identifier':
|
|
@@ -33872,15 +34087,18 @@ var DeprecatedComponentContainer = /* @__PURE__ */ (() => {
|
|
|
33872
34087
|
},);
|
|
33873
34088
|
}
|
|
33874
34089
|
componentDidCatch(error, info,) {
|
|
33875
|
-
|
|
34090
|
+
var _a2;
|
|
34091
|
+
let stack = (_a2 = info.componentStack) == null ? void 0 : _a2.split('\n',).filter((line,) => line.length !== 0);
|
|
33876
34092
|
let currentIndex = 0;
|
|
33877
|
-
|
|
33878
|
-
|
|
33879
|
-
|
|
34093
|
+
if (stack) {
|
|
34094
|
+
for (const line of stack) {
|
|
34095
|
+
if (line.startsWith(` in ${this.constructor.name}`,)) {
|
|
34096
|
+
break;
|
|
34097
|
+
}
|
|
34098
|
+
currentIndex++;
|
|
33880
34099
|
}
|
|
33881
|
-
currentIndex
|
|
34100
|
+
stack = stack.slice(0, currentIndex,);
|
|
33882
34101
|
}
|
|
33883
|
-
stack = stack.slice(0, currentIndex,);
|
|
33884
34102
|
this.setState({
|
|
33885
34103
|
lastError: {
|
|
33886
34104
|
children: this.props.children,
|
|
@@ -34043,61 +34261,6 @@ function isPageOrScroll(identifier,) {
|
|
|
34043
34261
|
}
|
|
34044
34262
|
return false;
|
|
34045
34263
|
}
|
|
34046
|
-
var Line = /* @__PURE__ */ (() => {
|
|
34047
|
-
function Line2(a, b,) {
|
|
34048
|
-
return { a, b, };
|
|
34049
|
-
}
|
|
34050
|
-
Line2.intersection = (lineA, lineB,) => {
|
|
34051
|
-
const x1 = lineA.a.x;
|
|
34052
|
-
const y1 = lineA.a.y;
|
|
34053
|
-
const x2 = lineA.b.x;
|
|
34054
|
-
const y2 = lineA.b.y;
|
|
34055
|
-
const x3 = lineB.a.x;
|
|
34056
|
-
const y3 = lineB.a.y;
|
|
34057
|
-
const x4 = lineB.b.x;
|
|
34058
|
-
const y4 = lineB.b.y;
|
|
34059
|
-
const d = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);
|
|
34060
|
-
if (d === 0) {
|
|
34061
|
-
return null;
|
|
34062
|
-
}
|
|
34063
|
-
const xi = ((x3 - x4) * (x1 * y2 - y1 * x2) - (x1 - x2) * (x3 * y4 - y3 * x4)) / d;
|
|
34064
|
-
const yi = ((y3 - y4) * (x1 * y2 - y1 * x2) - (y1 - y2) * (x3 * y4 - y3 * x4)) / d;
|
|
34065
|
-
return { x: xi, y: yi, };
|
|
34066
|
-
};
|
|
34067
|
-
Line2.intersectionAngle = (lineA, lineB,) => {
|
|
34068
|
-
const deltaAX = lineA.b.x - lineA.a.x;
|
|
34069
|
-
const deltaAY = lineA.b.y - lineA.a.y;
|
|
34070
|
-
const deltaBX = lineB.b.x - lineB.a.x;
|
|
34071
|
-
const deltaBY = lineB.b.y - lineB.a.y;
|
|
34072
|
-
const angle = Math.atan2(deltaAX * deltaBY - deltaAY * deltaBX, deltaAX * deltaBX + deltaAY * deltaBY,);
|
|
34073
|
-
return angle * (180 / Math.PI);
|
|
34074
|
-
};
|
|
34075
|
-
Line2.isOrthogonal = (line,) => {
|
|
34076
|
-
return line.a.x === line.b.x || line.a.y === line.b.y;
|
|
34077
|
-
};
|
|
34078
|
-
Line2.perpendicular = (line, pointOnLine,) => {
|
|
34079
|
-
const deltaX = line.a.x - line.b.x;
|
|
34080
|
-
const deltaY = line.a.y - line.b.y;
|
|
34081
|
-
const pointB = Point(pointOnLine.x - deltaY, pointOnLine.y + deltaX,);
|
|
34082
|
-
return Line2(pointB, pointOnLine,);
|
|
34083
|
-
};
|
|
34084
|
-
Line2.projectPoint = (line, point2,) => {
|
|
34085
|
-
const perp = Line2.perpendicular(line, point2,);
|
|
34086
|
-
return Line2.intersection(line, perp,);
|
|
34087
|
-
};
|
|
34088
|
-
Line2.pointAtPercentDistance = (line, distance2,) => {
|
|
34089
|
-
const hypotenuse = Line2.distance(line,);
|
|
34090
|
-
const r = distance2 * hypotenuse / hypotenuse;
|
|
34091
|
-
return {
|
|
34092
|
-
x: r * line.b.x + (1 - r) * line.a.x,
|
|
34093
|
-
y: r * line.b.y + (1 - r) * line.a.y,
|
|
34094
|
-
};
|
|
34095
|
-
};
|
|
34096
|
-
Line2.distance = (line,) => {
|
|
34097
|
-
return Point.distance(line.a, line.b,);
|
|
34098
|
-
};
|
|
34099
|
-
return Line2;
|
|
34100
|
-
})();
|
|
34101
34264
|
function linearGradientLine(angle,) {
|
|
34102
34265
|
var _a, _b;
|
|
34103
34266
|
const rad = angle * Math.PI / 180;
|
|
@@ -37512,19 +37675,131 @@ function CustomProperties({
|
|
|
37512
37675
|
},) {
|
|
37513
37676
|
return /* @__PURE__ */ jsx57('div', { style: customProperties, children, },);
|
|
37514
37677
|
}
|
|
37515
|
-
var
|
|
37678
|
+
var FormButton = /* @__PURE__ */ React85.forwardRef(function FormButon(props, ref,) {
|
|
37679
|
+
const [submitting, setSubmitting,] = React85.useState(false,);
|
|
37680
|
+
const { style: baseStyle2, } = props;
|
|
37681
|
+
const style = mergeWithDefaultStyle(baseStyle2 ?? {},);
|
|
37682
|
+
const onSubmit = () => {
|
|
37683
|
+
setSubmitting(true,);
|
|
37684
|
+
setTimeout(() => {
|
|
37685
|
+
setSubmitting(false,);
|
|
37686
|
+
}, 500,);
|
|
37687
|
+
};
|
|
37688
|
+
return /* @__PURE__ */ jsx58(
|
|
37689
|
+
motion.input,
|
|
37690
|
+
{
|
|
37691
|
+
type: props.type,
|
|
37692
|
+
'data-submitting': submitting,
|
|
37693
|
+
disabled: props.isDisabled || submitting,
|
|
37694
|
+
ref,
|
|
37695
|
+
style,
|
|
37696
|
+
value: submitting ? 'Submitting' : props.value ?? 'Submit',
|
|
37697
|
+
onClick: onSubmit,
|
|
37698
|
+
},
|
|
37699
|
+
);
|
|
37700
|
+
},);
|
|
37701
|
+
function mergeWithDefaultStyle(style,) {
|
|
37702
|
+
return {
|
|
37703
|
+
display: 'block',
|
|
37704
|
+
padding: '12px',
|
|
37705
|
+
fontSize: '14px',
|
|
37706
|
+
width: '100%',
|
|
37707
|
+
fontWeight: 'bold',
|
|
37708
|
+
cursor: 'pointer',
|
|
37709
|
+
background: '#222',
|
|
37710
|
+
color: '#fff',
|
|
37711
|
+
borderRadius: '10px',
|
|
37712
|
+
border: '1px solid rgba(0,0,0,0.05)',
|
|
37713
|
+
...style,
|
|
37714
|
+
};
|
|
37715
|
+
}
|
|
37716
|
+
var FormContainer = ({ action: _, formId, ...props },) => {
|
|
37717
|
+
const handleSubmit = async (event,) => {
|
|
37718
|
+
event.preventDefault();
|
|
37719
|
+
const data2 = new URLSearchParams();
|
|
37720
|
+
for (const [key7, value,] of new FormData(event.currentTarget,)) {
|
|
37721
|
+
data2.append(key7, value,);
|
|
37722
|
+
}
|
|
37723
|
+
await fetch('https://hooks.zapier.com/hooks/catch/8935032/3pzgf76/', {
|
|
37724
|
+
body: new URLSearchParams(data2,),
|
|
37725
|
+
method: 'POST',
|
|
37726
|
+
},);
|
|
37727
|
+
};
|
|
37728
|
+
return /* @__PURE__ */ jsx59(motion.form, { ...props, 'data-formid': formId, onSubmit: handleSubmit, children: props.children, },);
|
|
37729
|
+
};
|
|
37730
|
+
var passwordManagerIgnoreDataProps = {
|
|
37731
|
+
// 1Password
|
|
37732
|
+
'data-1p-ignore': true,
|
|
37733
|
+
// LastPass
|
|
37734
|
+
'data-lpignore': true,
|
|
37735
|
+
};
|
|
37736
|
+
var sensibleInputDefaults = {
|
|
37737
|
+
autocomplete: 'off',
|
|
37738
|
+
};
|
|
37739
|
+
var labelStyles = {
|
|
37740
|
+
display: 'block',
|
|
37741
|
+
marginBottom: 8,
|
|
37742
|
+
fontSize: 12,
|
|
37743
|
+
color: '#000',
|
|
37744
|
+
width: '100%',
|
|
37745
|
+
fontWeight: 'bold',
|
|
37746
|
+
textTransform: 'capitalize',
|
|
37747
|
+
};
|
|
37748
|
+
var FormPlainTextInput = /* @__PURE__ */ React86.forwardRef(function FormPlainTextInput2(props, ref,) {
|
|
37749
|
+
const dataProps = {
|
|
37750
|
+
...sensibleInputDefaults,
|
|
37751
|
+
...passwordManagerIgnoreDataProps,
|
|
37752
|
+
};
|
|
37753
|
+
const baseStyle2 = {
|
|
37754
|
+
fontSize: '14px',
|
|
37755
|
+
width: '100%',
|
|
37756
|
+
background: '#f5f5f5',
|
|
37757
|
+
borderRadius: '10px',
|
|
37758
|
+
border: '1px solid rgba(0,0,0,0.05)',
|
|
37759
|
+
};
|
|
37760
|
+
const input = /* @__PURE__ */ jsx60(
|
|
37761
|
+
motion.input,
|
|
37762
|
+
{
|
|
37763
|
+
id: props.inputName,
|
|
37764
|
+
disabled: props.isDisabled,
|
|
37765
|
+
...dataProps,
|
|
37766
|
+
type: props.type,
|
|
37767
|
+
required: props.required,
|
|
37768
|
+
autoFocus: props.autoFocus,
|
|
37769
|
+
name: props.inputName,
|
|
37770
|
+
style: baseStyle2,
|
|
37771
|
+
placeholder: props.placeholder,
|
|
37772
|
+
},
|
|
37773
|
+
);
|
|
37774
|
+
if (props.label) {
|
|
37775
|
+
return /* @__PURE__ */ jsx60('div', {
|
|
37776
|
+
ref,
|
|
37777
|
+
style: { width: '100%', },
|
|
37778
|
+
children: /* @__PURE__ */ jsxs19('label', {
|
|
37779
|
+
style: { width: '100%', },
|
|
37780
|
+
htmlFor: props.inputName,
|
|
37781
|
+
children: [
|
|
37782
|
+
/* @__PURE__ */ jsx60('span', { style: labelStyles, children: props.label, },),
|
|
37783
|
+
input,
|
|
37784
|
+
],
|
|
37785
|
+
},),
|
|
37786
|
+
},);
|
|
37787
|
+
}
|
|
37788
|
+
return /* @__PURE__ */ jsx60('div', { ref, style: { width: '100%', }, children: input, },);
|
|
37789
|
+
},);
|
|
37790
|
+
var Image2 = /* @__PURE__ */ React87.forwardRef(function Image3(props, ref,) {
|
|
37516
37791
|
const { background, children, alt, ...rest } = props;
|
|
37517
37792
|
const style = { ...rest.style, };
|
|
37518
37793
|
if (background) {
|
|
37519
37794
|
delete style.background;
|
|
37520
37795
|
}
|
|
37521
37796
|
const MotionComponent = htmlElementAsMotionComponent(props.as,);
|
|
37522
|
-
return /* @__PURE__ */
|
|
37797
|
+
return /* @__PURE__ */ jsxs20(MotionComponent, {
|
|
37523
37798
|
...rest,
|
|
37524
37799
|
style,
|
|
37525
37800
|
ref,
|
|
37526
37801
|
children: [
|
|
37527
|
-
background && /* @__PURE__ */
|
|
37802
|
+
background && /* @__PURE__ */ jsx61(BackgroundImageComponent, { image: background, alt, },),
|
|
37528
37803
|
children,
|
|
37529
37804
|
],
|
|
37530
37805
|
},);
|
|
@@ -37659,7 +37934,7 @@ function escapeHTML2(str,) {
|
|
|
37659
37934
|
}
|
|
37660
37935
|
var deprecatedRichTextPlaceholder = '{{ text-placeholder }}';
|
|
37661
37936
|
var richTextWrapperClassName = 'rich-text-wrapper';
|
|
37662
|
-
var DeprecatedRichText = /* @__PURE__ */
|
|
37937
|
+
var DeprecatedRichText = /* @__PURE__ */ React88.forwardRef(
|
|
37663
37938
|
function Text3(props, forwardedRef,) {
|
|
37664
37939
|
const {
|
|
37665
37940
|
id: id3,
|
|
@@ -37707,7 +37982,7 @@ var DeprecatedRichText = /* @__PURE__ */ React86.forwardRef(
|
|
|
37707
37982
|
const currentRoute = useCurrentRoute();
|
|
37708
37983
|
useRoutePreloader(props.preload ?? [],);
|
|
37709
37984
|
useMeasureLayout(props, layoutRef,);
|
|
37710
|
-
const inCodeComponent =
|
|
37985
|
+
const inCodeComponent = React88.useContext(ComponentContainerContext,);
|
|
37711
37986
|
const isOnCanvas = useIsOnFramerCanvas();
|
|
37712
37987
|
let textOrOverride = text;
|
|
37713
37988
|
const forwardedOverrideId = _forwardedOverrideId ?? id3;
|
|
@@ -37730,13 +38005,13 @@ var DeprecatedRichText = /* @__PURE__ */ React86.forwardRef(
|
|
|
37730
38005
|
innerHTML = htmlFromDesign;
|
|
37731
38006
|
}
|
|
37732
38007
|
const implicitPathVariables = useImplicitPathVariables();
|
|
37733
|
-
const innerHTMLWithReplacedFramerPageLinks =
|
|
38008
|
+
const innerHTMLWithReplacedFramerPageLinks = React88.useMemo(() => {
|
|
37734
38009
|
if (isOnCanvas || !getRoute || !currentRoute) {
|
|
37735
38010
|
return innerHTML;
|
|
37736
38011
|
}
|
|
37737
38012
|
return replaceFramerPageLinks(innerHTML, getRoute, currentRoute, implicitPathVariables,);
|
|
37738
38013
|
}, [isOnCanvas, innerHTML, getRoute, currentRoute, implicitPathVariables,],);
|
|
37739
|
-
|
|
38014
|
+
React88.useEffect(() => {
|
|
37740
38015
|
const container = layoutRef.current;
|
|
37741
38016
|
if (container === null) {
|
|
37742
38017
|
return;
|
|
@@ -37757,7 +38032,7 @@ var DeprecatedRichText = /* @__PURE__ */ React86.forwardRef(
|
|
|
37757
38032
|
};
|
|
37758
38033
|
}, [navigate, implicitPathVariables,],);
|
|
37759
38034
|
useLoadFonts(fonts, __fromCanvasComponent, layoutRef,);
|
|
37760
|
-
|
|
38035
|
+
React88.useInsertionEffect(() => {
|
|
37761
38036
|
injectComponentCSSRules();
|
|
37762
38037
|
}, [],);
|
|
37763
38038
|
if (!visible) {
|
|
@@ -37813,7 +38088,7 @@ var DeprecatedRichText = /* @__PURE__ */ React86.forwardRef(
|
|
|
37813
38088
|
forceLayerBackingWithCSSProperties(style,);
|
|
37814
38089
|
}
|
|
37815
38090
|
Object.assign(style, props.style,);
|
|
37816
|
-
return /* @__PURE__ */
|
|
38091
|
+
return /* @__PURE__ */ jsx62(
|
|
37817
38092
|
motion.div,
|
|
37818
38093
|
{
|
|
37819
38094
|
id: id3,
|
|
@@ -37857,11 +38132,11 @@ function useLoadFonts(fonts, fromCanvasComponent, containerRef,) {
|
|
|
37857
38132
|
}
|
|
37858
38133
|
var FitText = /* @__PURE__ */ forwardRef52(
|
|
37859
38134
|
({ viewBoxScale, viewBox, children, ...props }, ref,) => {
|
|
37860
|
-
return /* @__PURE__ */
|
|
38135
|
+
return /* @__PURE__ */ jsx63(motion.svg, {
|
|
37861
38136
|
ref,
|
|
37862
38137
|
...props,
|
|
37863
38138
|
viewBox,
|
|
37864
|
-
children: /* @__PURE__ */
|
|
38139
|
+
children: /* @__PURE__ */ jsx63(
|
|
37865
38140
|
motion.foreignObject,
|
|
37866
38141
|
{
|
|
37867
38142
|
width: '100%',
|
|
@@ -37944,8 +38219,9 @@ var RichTextContainer = /* @__PURE__ */ forwardRef52(
|
|
|
37944
38219
|
const template = hasTransformTemplate ? props.transformTemplate ?? transformTemplate(center,) : void 0;
|
|
37945
38220
|
if (!withExternalLayout) {
|
|
37946
38221
|
if (frame2 && restrictedRenderTarget && !isAutoSized2) {
|
|
37947
|
-
|
|
37948
|
-
containerStyle.
|
|
38222
|
+
containerStyle.x = frame2.x;
|
|
38223
|
+
containerStyle.y = frame2.y;
|
|
38224
|
+
containerStyle.rotate = Animatable.getNumber(rotation,);
|
|
37949
38225
|
containerStyle.width = frame2.width;
|
|
37950
38226
|
containerStyle.minWidth = frame2.width;
|
|
37951
38227
|
containerStyle.height = frame2.height;
|
|
@@ -37984,7 +38260,7 @@ var RichTextContainer = /* @__PURE__ */ forwardRef52(
|
|
|
37984
38260
|
const Component15 = htmlElementAsMotionComponent(props.as,);
|
|
37985
38261
|
if (isString22(props.viewBox,)) {
|
|
37986
38262
|
if (props.as !== void 0) {
|
|
37987
|
-
return /* @__PURE__ */
|
|
38263
|
+
return /* @__PURE__ */ jsx63(
|
|
37988
38264
|
Component15,
|
|
37989
38265
|
{
|
|
37990
38266
|
...rest,
|
|
@@ -37994,7 +38270,7 @@ var RichTextContainer = /* @__PURE__ */ forwardRef52(
|
|
|
37994
38270
|
transformTemplate: template,
|
|
37995
38271
|
'data-framer-name': name,
|
|
37996
38272
|
'data-framer-component-type': 'RichTextContainer',
|
|
37997
|
-
children: /* @__PURE__ */
|
|
38273
|
+
children: /* @__PURE__ */ jsx63(
|
|
37998
38274
|
FitText,
|
|
37999
38275
|
{
|
|
38000
38276
|
viewBox,
|
|
@@ -38006,7 +38282,7 @@ var RichTextContainer = /* @__PURE__ */ forwardRef52(
|
|
|
38006
38282
|
},
|
|
38007
38283
|
);
|
|
38008
38284
|
} else {
|
|
38009
|
-
return /* @__PURE__ */
|
|
38285
|
+
return /* @__PURE__ */ jsx63(
|
|
38010
38286
|
FitText,
|
|
38011
38287
|
{
|
|
38012
38288
|
...rest,
|
|
@@ -38023,7 +38299,7 @@ var RichTextContainer = /* @__PURE__ */ forwardRef52(
|
|
|
38023
38299
|
);
|
|
38024
38300
|
}
|
|
38025
38301
|
}
|
|
38026
|
-
return /* @__PURE__ */
|
|
38302
|
+
return /* @__PURE__ */ jsx63(
|
|
38027
38303
|
Component15,
|
|
38028
38304
|
{
|
|
38029
38305
|
...rest,
|
|
@@ -38071,7 +38347,7 @@ var RichText = /* @__PURE__ */ forwardRef52(
|
|
|
38071
38347
|
// We need to use the original prop name.
|
|
38072
38348
|
[isString22(html,) ? 'html' : 'htmlFromDesign']: content,
|
|
38073
38349
|
};
|
|
38074
|
-
return /* @__PURE__ */
|
|
38350
|
+
return /* @__PURE__ */ jsx63(DeprecatedRichText, { ...props, ...contentProp, ref, },);
|
|
38075
38351
|
}
|
|
38076
38352
|
if (!props.stylesPresetsClassNames && isString22(props.stylesPresetsClassName,)) {
|
|
38077
38353
|
const [h1, h2, h3, p, a,] = props.stylesPresetsClassName.split(' ',);
|
|
@@ -38081,7 +38357,7 @@ var RichText = /* @__PURE__ */ forwardRef52(
|
|
|
38081
38357
|
props.stylesPresetsClassNames = { h1, h2, h3, p, a, };
|
|
38082
38358
|
}
|
|
38083
38359
|
}
|
|
38084
|
-
return /* @__PURE__ */
|
|
38360
|
+
return /* @__PURE__ */ jsx63(RichTextContainer, { ...props, ref, children: isValidElement32(content,) ? content : void 0, },);
|
|
38085
38361
|
},
|
|
38086
38362
|
);
|
|
38087
38363
|
var key6 = 'calculatedPaths';
|
|
@@ -38481,7 +38757,9 @@ var package_default = {
|
|
|
38481
38757
|
scripts: {
|
|
38482
38758
|
prepublishOnly: 'make build',
|
|
38483
38759
|
coverage: 'yarn :jest --coverage',
|
|
38484
|
-
lint: 'yarn :eslint ./src --ext .ts,.tsx --format codeframe --quiet',
|
|
38760
|
+
lint: 'yarn format-check:ts && yarn :eslint ./src --ext .ts,.tsx --format codeframe --quiet',
|
|
38761
|
+
'format:ts': 'yarn :format "src/**/*.{ts,tsx}"',
|
|
38762
|
+
'format-check:ts': 'yarn :format-check "src/**/*.{ts,tsx}"',
|
|
38485
38763
|
'lint:fix': 'yarn lint --fix --cache',
|
|
38486
38764
|
test: 'yarn :jest',
|
|
38487
38765
|
watch: 'yarn :jest --watch',
|
|
@@ -38504,8 +38782,8 @@ var package_default = {
|
|
|
38504
38782
|
'@types/google.fonts': '1.0.3',
|
|
38505
38783
|
'@types/hsluv': 'https://github.com/framer/typed_hsluv#bump',
|
|
38506
38784
|
'@types/node': '^18.17.15',
|
|
38507
|
-
'@types/react': '^18.
|
|
38508
|
-
'@types/react-dom': '^18.
|
|
38785
|
+
'@types/react': '^18.2.67',
|
|
38786
|
+
'@types/react-dom': '^18.2.22',
|
|
38509
38787
|
'@types/yargs': '^17.0.19',
|
|
38510
38788
|
'@typescript-eslint/eslint-plugin': '^6.16.0',
|
|
38511
38789
|
'@typescript-eslint/parser': '^6.16.0',
|
|
@@ -38521,7 +38799,7 @@ var package_default = {
|
|
|
38521
38799
|
yargs: '^17.6.2',
|
|
38522
38800
|
},
|
|
38523
38801
|
peerDependencies: {
|
|
38524
|
-
'framer-motion': '11.0.
|
|
38802
|
+
'framer-motion': '11.0.11-sync.4',
|
|
38525
38803
|
react: '^18.2.0',
|
|
38526
38804
|
'react-dom': '^18.2.0',
|
|
38527
38805
|
},
|
|
@@ -38639,6 +38917,7 @@ export {
|
|
|
38639
38917
|
DataObserverContext,
|
|
38640
38918
|
debounce,
|
|
38641
38919
|
defaultDeviceProps,
|
|
38920
|
+
degreesToRadians,
|
|
38642
38921
|
delay,
|
|
38643
38922
|
DeprecatedComponentContainer,
|
|
38644
38923
|
DeprecatedFrameWithEvents,
|
|
@@ -38671,6 +38950,9 @@ export {
|
|
|
38671
38950
|
FontSourceNames,
|
|
38672
38951
|
fontStore,
|
|
38673
38952
|
forceLayerBackingWithCSSProperties,
|
|
38953
|
+
FormButton,
|
|
38954
|
+
FormContainer,
|
|
38955
|
+
FormPlainTextInput,
|
|
38674
38956
|
fraction,
|
|
38675
38957
|
Frame,
|
|
38676
38958
|
frame,
|
|
@@ -38778,6 +39060,7 @@ export {
|
|
|
38778
39060
|
PathVariablesContext,
|
|
38779
39061
|
pipe,
|
|
38780
39062
|
Point,
|
|
39063
|
+
Polygon,
|
|
38781
39064
|
PresenceContext,
|
|
38782
39065
|
print,
|
|
38783
39066
|
progress,
|
|
@@ -38885,6 +39168,7 @@ export {
|
|
|
38885
39168
|
usePresence,
|
|
38886
39169
|
usePrototypeNavigate,
|
|
38887
39170
|
useProvidedWindow,
|
|
39171
|
+
useQueryCount,
|
|
38888
39172
|
useQueryData,
|
|
38889
39173
|
useReducedMotion,
|
|
38890
39174
|
useReducedMotionConfig,
|