@makeswift/runtime 0.9.0 → 0.9.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/dist/Box.cjs.js +15 -15
- package/dist/Box.cjs.js.map +1 -1
- package/dist/Box.es.js +10 -10
- package/dist/Button.cjs.js +12 -12
- package/dist/Button.cjs.js.map +1 -1
- package/dist/Button.es.js +10 -10
- package/dist/Carousel.cjs.js +28 -28
- package/dist/Carousel.cjs.js.map +1 -1
- package/dist/Carousel.es.js +7 -7
- package/dist/Countdown.cjs.js +15 -15
- package/dist/Countdown.cjs.js.map +1 -1
- package/dist/Countdown.es.js +7 -7
- package/dist/Divider.cjs.js +12 -12
- package/dist/Divider.cjs.js.map +1 -1
- package/dist/Divider.es.js +10 -10
- package/dist/Embed.cjs.js +3 -30
- package/dist/Embed.cjs.js.map +1 -1
- package/dist/Embed.es.js +2 -29
- package/dist/Embed.es.js.map +1 -1
- package/dist/Form.cjs.js +51 -51
- package/dist/Form.cjs.js.map +1 -1
- package/dist/Form.es.js +7 -7
- package/dist/Image.cjs.js +8 -8
- package/dist/Image.cjs.js.map +1 -1
- package/dist/Image.es.js +7 -7
- package/dist/LiveProvider.cjs.js +6 -6
- package/dist/LiveProvider.es.js +8 -8
- package/dist/Navigation.cjs.js +27 -27
- package/dist/Navigation.cjs.js.map +1 -1
- package/dist/Navigation.es.js +6 -6
- package/dist/PreviewProvider.cjs.js +7 -7
- package/dist/PreviewProvider.cjs.js.map +1 -1
- package/dist/PreviewProvider.es.js +7 -7
- package/dist/ReadOnlyText.cjs.js +16 -13
- package/dist/ReadOnlyText.cjs.js.map +1 -1
- package/dist/ReadOnlyText.es.js +11 -8
- package/dist/ReadOnlyText.es.js.map +1 -1
- package/dist/ReadOnlyTextV2.cjs.js +13 -10
- package/dist/ReadOnlyTextV2.cjs.js.map +1 -1
- package/dist/ReadOnlyTextV2.es.js +9 -6
- package/dist/ReadOnlyTextV2.es.js.map +1 -1
- package/dist/Root.cjs.js +8 -8
- package/dist/Root.cjs.js.map +1 -1
- package/dist/Root.es.js +6 -6
- package/dist/SocialLinks.cjs.js +14 -14
- package/dist/SocialLinks.cjs.js.map +1 -1
- package/dist/SocialLinks.es.js +10 -10
- package/dist/Text.cjs.js +4 -4
- package/dist/Text.es.js +5 -5
- package/dist/Video.cjs.js +3 -30
- package/dist/Video.cjs.js.map +1 -1
- package/dist/Video.es.js +2 -29
- package/dist/Video.es.js.map +1 -1
- package/dist/builder.cjs.js +4 -2
- package/dist/builder.cjs.js.map +1 -1
- package/dist/builder.es.js +4 -2
- package/dist/builder.es.js.map +1 -1
- package/dist/components.cjs.js +9 -9
- package/dist/components.es.js +9 -9
- package/dist/control-serialization.cjs.js +88 -12
- package/dist/control-serialization.cjs.js.map +1 -1
- package/dist/control-serialization.es.js +89 -13
- package/dist/control-serialization.es.js.map +1 -1
- package/dist/controls.cjs.js +15 -4
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +6 -3
- package/dist/controls.es.js.map +1 -1
- package/dist/deepEqual.cjs.js +40 -0
- package/dist/deepEqual.cjs.js.map +1 -0
- package/dist/deepEqual.es.js +39 -0
- package/dist/deepEqual.es.js.map +1 -0
- package/dist/index.cjs.js +102 -98
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs10.js +173 -249
- package/dist/index.cjs10.js.map +1 -1
- package/dist/index.cjs11.js +375 -0
- package/dist/index.cjs11.js.map +1 -0
- package/dist/index.cjs2.js +14 -16
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.cjs4.js +2 -1
- package/dist/index.cjs4.js.map +1 -1
- package/dist/index.cjs6.js +700 -22
- package/dist/index.cjs6.js.map +1 -1
- package/dist/index.cjs7.js +37 -13
- package/dist/index.cjs7.js.map +1 -1
- package/dist/index.cjs8.js +17 -41
- package/dist/index.cjs8.js.map +1 -1
- package/dist/index.cjs9.js +13 -266
- package/dist/index.cjs9.js.map +1 -1
- package/dist/index.es.js +85 -80
- package/dist/index.es.js.map +1 -1
- package/dist/index.es10.js +174 -250
- package/dist/index.es10.js.map +1 -1
- package/dist/index.es11.js +368 -0
- package/dist/index.es11.js.map +1 -0
- package/dist/index.es2.js +3 -5
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es3.js +1 -1
- package/dist/index.es4.js +2 -1
- package/dist/index.es4.js.map +1 -1
- package/dist/index.es6.js +695 -22
- package/dist/index.es6.js.map +1 -1
- package/dist/index.es7.js +33 -14
- package/dist/index.es7.js.map +1 -1
- package/dist/index.es8.js +17 -39
- package/dist/index.es8.js.map +1 -1
- package/dist/index.es9.js +12 -261
- package/dist/index.es9.js.map +1 -1
- package/dist/leaf.cjs.js +1 -1
- package/dist/leaf.cjs.js.map +1 -1
- package/dist/leaf.es.js +2 -2
- package/dist/main.cjs.js +4 -2
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +4 -2
- package/dist/main.es.js.map +1 -1
- package/dist/next.cjs.js +3 -3
- package/dist/next.es.js +4 -4
- package/dist/prop-controllers.cjs.js +4 -2
- package/dist/prop-controllers.cjs.js.map +1 -1
- package/dist/prop-controllers.es.js +4 -2
- package/dist/prop-controllers.es.js.map +1 -1
- package/dist/react-page.cjs.js +958 -1431
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +852 -1343
- package/dist/react-page.es.js.map +1 -1
- package/dist/react.cjs.js +3 -3
- package/dist/react.es.js +3 -3
- package/dist/select.cjs.js +21 -0
- package/dist/select.cjs.js.map +1 -0
- package/dist/select.es.js +16 -0
- package/dist/select.es.js.map +1 -0
- package/dist/slate.cjs.js +213 -12
- package/dist/slate.cjs.js.map +1 -1
- package/dist/slate.es.js +207 -6
- package/dist/slate.es.js.map +1 -1
- package/dist/types/src/api/react.d.ts.map +1 -1
- package/dist/types/src/builder/serialization/control-serialization.d.ts +3 -3
- package/dist/types/src/builder/serialization/control-serialization.d.ts.map +1 -1
- package/dist/types/src/builder/serialization/controls/rich-text-v2.d.ts +2 -2
- package/dist/types/src/builder/serialization/controls/rich-text-v2.d.ts.map +1 -1
- package/dist/types/src/builder/serialization/controls/style-v2.d.ts +5 -0
- package/dist/types/src/builder/serialization/controls/style-v2.d.ts.map +1 -0
- package/dist/types/src/components/builtin/Button/Button.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +1 -1
- package/dist/types/src/components/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
- package/dist/types/src/components/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -1
- package/dist/types/src/components/page/Page.d.ts.map +1 -1
- package/dist/types/src/controls/control.d.ts +4 -2
- package/dist/types/src/controls/control.d.ts.map +1 -1
- package/dist/types/src/controls/icon-radio-group.d.ts +29 -0
- package/dist/types/src/controls/icon-radio-group.d.ts.map +1 -0
- package/dist/types/src/controls/index.d.ts +2 -0
- package/dist/types/src/controls/index.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text/translation.d.ts +1 -1
- package/dist/types/src/controls/rich-text/translation.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts +12 -3
- package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
- package/dist/types/src/controls/shape.d.ts +1 -2
- package/dist/types/src/controls/shape.d.ts.map +1 -1
- package/dist/types/src/controls/style-v2.d.ts +64 -0
- package/dist/types/src/controls/style-v2.d.ts.map +1 -0
- package/dist/types/src/next/client.d.ts.map +1 -1
- package/dist/types/src/next/document.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/descriptors.d.ts +6 -3
- package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/instances.d.ts +2 -2
- package/dist/types/src/prop-controllers/instances.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/introspection.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/control.d.ts +5 -2
- package/dist/types/src/runtimes/react/controls/control.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/icon-radio-group.d.ts +4 -0
- package/dist/types/src/runtimes/react/controls/icon-radio-group.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts +2 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts +10 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts +10 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/style-v2.d.ts +13 -0
- package/dist/types/src/runtimes/react/controls/style-v2.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/index.d.ts.map +1 -1
- package/dist/types/src/slate/BlockPlugin/index.d.ts +4 -0
- package/dist/types/src/slate/BlockPlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/ColorPlugin/index.d.ts +10 -0
- package/dist/types/src/slate/ColorPlugin/index.d.ts.map +1 -0
- package/dist/types/src/slate/InlineModePlugin/index.d.ts +2 -0
- package/dist/types/src/slate/InlineModePlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/TextAlignPlugin/index.d.ts +9 -0
- package/dist/types/src/slate/TextAlignPlugin/index.d.ts.map +1 -0
- package/dist/types/src/slate/index.d.ts +2 -0
- package/dist/types/src/slate/index.d.ts.map +1 -1
- package/dist/types/src/slate/types.d.ts +39 -0
- package/dist/types/src/slate/types.d.ts.map +1 -1
- package/dist/types/src/slate/utils/responsive.d.ts +16 -0
- package/dist/types/src/slate/utils/responsive.d.ts.map +1 -0
- package/dist/useMediaQuery.es.js +1 -1
- package/package.json +1 -1
package/dist/Image.cjs.js
CHANGED
|
@@ -6,26 +6,26 @@ var state_breakpoints = require("./state/breakpoints.cjs.js");
|
|
|
6
6
|
var placeholders = require("./placeholders.cjs.js");
|
|
7
7
|
var index = require("./index.cjs3.js");
|
|
8
8
|
var css = require("@emotion/css");
|
|
9
|
+
var reactPage = require("./react-page.cjs.js");
|
|
9
10
|
var next = require("./index.cjs.js");
|
|
10
11
|
var nextVersion = require("./next-version.cjs.js");
|
|
11
12
|
var jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
require("./actions.cjs.js");
|
|
13
14
|
require("scroll-into-view-if-needed");
|
|
14
15
|
require("next/link");
|
|
15
|
-
require("use-sync-external-store/shim/with-selector");
|
|
16
|
-
require("next/dynamic");
|
|
17
|
-
require("./react-page.cjs.js");
|
|
18
16
|
require("redux");
|
|
19
17
|
require("redux-thunk");
|
|
20
|
-
require("slate");
|
|
21
|
-
require("is-hotkey");
|
|
22
|
-
require("slate-react");
|
|
23
18
|
require("@emotion/serialize");
|
|
24
19
|
require("@emotion/utils");
|
|
20
|
+
require("slate");
|
|
21
|
+
require("use-sync-external-store/shim/with-selector");
|
|
22
|
+
require("next/dynamic");
|
|
25
23
|
require("./text-input.cjs.js");
|
|
26
24
|
require("./combobox.cjs.js");
|
|
25
|
+
require("./select.cjs.js");
|
|
27
26
|
require("use-sync-external-store/shim");
|
|
28
27
|
require("./types.cjs.js");
|
|
28
|
+
require("./deepEqual.cjs.js");
|
|
29
29
|
require("./box-models.cjs.js");
|
|
30
30
|
require("css-box-model");
|
|
31
31
|
require("color");
|
|
@@ -107,10 +107,10 @@ const ImageComponent = React.forwardRef(function Image2({
|
|
|
107
107
|
}, [dataDimensions, imageSrc]);
|
|
108
108
|
const dimensions = dataDimensions != null ? dataDimensions : measuredDimensions;
|
|
109
109
|
const Container = link ? index.Link : "div";
|
|
110
|
-
const containerClassName = css.cx(
|
|
110
|
+
const containerClassName = css.cx(reactPage.useStyle({
|
|
111
111
|
lineHeight: 0,
|
|
112
112
|
overflow: "hidden"
|
|
113
|
-
}),
|
|
113
|
+
}), reactPage.useStyle(next.useResponsiveWidth(width, dimensions == null ? void 0 : dimensions.width)), reactPage.useStyle(next.useResponsiveStyle([opacity], ([opacity2 = 1]) => ({
|
|
114
114
|
opacity: opacity2
|
|
115
115
|
}))), margin, padding, border, borderRadius, boxShadow, className);
|
|
116
116
|
if (!dimensions)
|
package/dist/Image.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.cjs.js","sources":["../src/components/builtin/Image/Image.tsx"],"sourcesContent":["import { useState, useEffect, Ref, forwardRef } from 'react'\nimport NextImage from 'next/image'\nimport type NextLegacyImageType from 'next/legacy/image'\n\nimport {\n ElementIDValue,\n ImageValue,\n LinkValue,\n ResponsiveOpacityValue,\n TextInputValue,\n WidthValue,\n} from '../../../prop-controllers/descriptors'\nimport { Breakpoints, findBreakpointOverride } from '../../../state/modules/breakpoints'\nimport { placeholders } from '../../utils/placeholders'\nimport { Link } from '../../shared/Link'\nimport { cx } from '@emotion/css'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { useResponsiveStyle, useResponsiveWidth } from '../../utils/responsive-style'\nimport { useFile } from '../../../runtimes/react/hooks/makeswift-api'\nimport { major as nextMajorVersion } from '../../../next/next-version'\nimport { useBreakpoints } from '../../../runtimes/react'\n\nconst NextLegacyImage = NextImage as typeof NextLegacyImageType\n\ntype Props = {\n id?: ElementIDValue\n file?: ImageValue\n altText?: TextInputValue\n link?: LinkValue\n width?: WidthValue\n margin?: string\n padding?: string\n border?: string\n borderRadius?: string\n boxShadow?: string\n opacity?: ResponsiveOpacityValue\n placeholder?: { src: string; dimensions: { width: number; height: number } }\n className?: string\n}\n\nfunction loadImage(src: string): Promise<HTMLImageElement> {\n return new Promise<HTMLImageElement>((resolve, reject) => {\n const image = new Image()\n\n image.onload = () => resolve(image)\n image.onerror = reject\n image.src = src\n })\n}\n\nfunction imageSizes(breakpoints: Breakpoints, width?: Props['width']): string {\n const baseDevice = breakpoints.find(breakpoint => breakpoint.maxWidth == null)\n const baseWidth = baseDevice && width && findBreakpointOverride(breakpoints, width, baseDevice.id)\n const baseWidthSize =\n baseWidth == null || baseWidth.value.unit !== 'px' ? '100vw' : `${baseWidth.value.value}px`\n\n return breakpoints\n .map(breakpoint => {\n const override = findBreakpointOverride(breakpoints, width, breakpoint.id)\n\n if (override == null || breakpoint.maxWidth == null || override.value.unit !== 'px') {\n return null\n }\n\n return `(max-width: ${breakpoint.maxWidth}px) ${Math.min(\n breakpoint.maxWidth,\n override.value.value,\n )}px`\n })\n .filter((size): size is NonNullable<typeof size> => size != null)\n .reduce((sourceSizes, sourceSize) => `${sourceSize}, ${sourceSizes}`, baseWidthSize)\n}\n\ntype Dimensions = {\n width: number\n height: number\n}\n\nconst ImageComponent = forwardRef(function Image(\n {\n id,\n width,\n margin,\n padding,\n file,\n border,\n borderRadius,\n altText,\n link,\n opacity,\n boxShadow,\n placeholder = placeholders.image,\n className,\n }: Props,\n ref: Ref<HTMLAnchorElement & HTMLDivElement>,\n) {\n const fileData = useFile(file ?? null)\n const imageSrc = fileData?.publicUrl ? fileData.publicUrl : placeholder.src\n const dataDimensions = fileData?.publicUrl ? fileData?.dimensions : placeholder.dimensions\n const [measuredDimensions, setMeasuredDimensions] = useState<Dimensions | null>(null)\n const breakpoints = useBreakpoints()\n\n useEffect(() => {\n if (dataDimensions) return\n\n let cleanedUp = false\n\n loadImage(imageSrc)\n .then(image => {\n if (!cleanedUp) {\n setMeasuredDimensions({ width: image.naturalWidth, height: image.naturalHeight })\n }\n })\n .catch(console.error)\n\n return () => {\n cleanedUp = true\n }\n }, [dataDimensions, imageSrc])\n\n const dimensions = dataDimensions ?? measuredDimensions\n const Container = link ? Link : 'div'\n const containerClassName = cx(\n useStyle({ lineHeight: 0, overflow: 'hidden' }),\n useStyle(useResponsiveWidth(width, dimensions?.width)),\n useStyle(useResponsiveStyle([opacity] as const, ([opacity = 1]) => ({ opacity }))),\n margin,\n padding,\n border,\n borderRadius,\n boxShadow,\n className,\n )\n\n if (!dimensions) return null\n\n return (\n <Container link={link} ref={ref} id={id} className={containerClassName}>\n {nextMajorVersion < 13 ? (\n <NextLegacyImage\n layout=\"responsive\"\n src={imageSrc}\n sizes={imageSizes(breakpoints, width)}\n alt={altText}\n width={dimensions.width}\n height={dimensions.height}\n />\n ) : (\n <NextImage\n src={imageSrc}\n sizes={imageSizes(breakpoints, width)}\n alt={altText ?? ''}\n width={dimensions.width}\n height={dimensions.height}\n style={{\n width: '100%',\n height: 'auto',\n }}\n />\n )}\n </Container>\n )\n})\n\nexport default ImageComponent\n"],"names":["NextLegacyImage","NextImage","src","Promise","resolve","reject","image","Image","onload","onerror","breakpoints","width","baseDevice","find","breakpoint","maxWidth","baseWidth","findBreakpointOverride","id","baseWidthSize","value","unit","map","override","Math","min","filter","size","reduce","sourceSizes","sourceSize","ImageComponent","forwardRef","margin","padding","file","border","borderRadius","altText","link","opacity","boxShadow","placeholder","placeholders","className","ref","fileData","useFile","imageSrc","publicUrl","dataDimensions","dimensions","measuredDimensions","setMeasuredDimensions","useState","useBreakpoints","useEffect","cleanedUp","then","naturalWidth","height","naturalHeight","catch","console","error","Container","Link","containerClassName","cx","useStyle","lineHeight","overflow","useResponsiveWidth","useResponsiveStyle","nextMajorVersion","_jsx","imageSizes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAMA,kBAAkBC,mBAAAA;AAkBxB,mBAAmBC,KAAwC;AAClD,SAAA,IAAIC,QAA0B,CAACC,SAASC,WAAW;AAClDC,UAAAA,QAAQ,IAAIC;AAEZC,UAAAA,SAAS,MAAMJ,QAAQE,KAAD;AAC5BA,UAAMG,UAAUJ;AAChBC,UAAMJ,MAAMA;AAAAA,EAAAA,CALP;AAOR;AAED,oBAAoBQ,aAA0BC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A;AAAgB;AAEhBO,QAAAA,YAAY;AAENT,cAAAA,QAAD,EACNU,KAAKpD,CAAS,UAAA;AACT,UAAA,CAACmD,WAAW;AACQ,8BAAA;AAAA,UAAE9C,OAAOL,MAAMqD;AAAAA,UAAcC,QAAQtD,MAAMuD;AAAAA,QAAAA,CAA5C;AAAA,MACtB;AAAA,IAJL,CAAA,EAMGC,MAAMC,QAAQC,KANjB;AAQA,WAAO,MAAM;AACC,kBAAA;AAAA,IAAA;AAAA,EADd,GAGC,CAACd,gBAAgBF,QAAjB,CAhBM;AAkBT,QAAMG,aAAaD,0CAAkBE;AAC/Ba,QAAAA,YAAY1B,OAAO2B,MAAO,OAAA;AAC1BC,QAAAA,qBAAqBC,OACzBC,
|
|
1
|
+
{"version":3,"file":"Image.cjs.js","sources":["../src/components/builtin/Image/Image.tsx"],"sourcesContent":["import { useState, useEffect, Ref, forwardRef } from 'react'\nimport NextImage from 'next/image'\nimport type NextLegacyImageType from 'next/legacy/image'\n\nimport {\n ElementIDValue,\n ImageValue,\n LinkValue,\n ResponsiveOpacityValue,\n TextInputValue,\n WidthValue,\n} from '../../../prop-controllers/descriptors'\nimport { Breakpoints, findBreakpointOverride } from '../../../state/modules/breakpoints'\nimport { placeholders } from '../../utils/placeholders'\nimport { Link } from '../../shared/Link'\nimport { cx } from '@emotion/css'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { useResponsiveStyle, useResponsiveWidth } from '../../utils/responsive-style'\nimport { useFile } from '../../../runtimes/react/hooks/makeswift-api'\nimport { major as nextMajorVersion } from '../../../next/next-version'\nimport { useBreakpoints } from '../../../runtimes/react'\n\nconst NextLegacyImage = NextImage as typeof NextLegacyImageType\n\ntype Props = {\n id?: ElementIDValue\n file?: ImageValue\n altText?: TextInputValue\n link?: LinkValue\n width?: WidthValue\n margin?: string\n padding?: string\n border?: string\n borderRadius?: string\n boxShadow?: string\n opacity?: ResponsiveOpacityValue\n placeholder?: { src: string; dimensions: { width: number; height: number } }\n className?: string\n}\n\nfunction loadImage(src: string): Promise<HTMLImageElement> {\n return new Promise<HTMLImageElement>((resolve, reject) => {\n const image = new Image()\n\n image.onload = () => resolve(image)\n image.onerror = reject\n image.src = src\n })\n}\n\nfunction imageSizes(breakpoints: Breakpoints, width?: Props['width']): string {\n const baseDevice = breakpoints.find(breakpoint => breakpoint.maxWidth == null)\n const baseWidth = baseDevice && width && findBreakpointOverride(breakpoints, width, baseDevice.id)\n const baseWidthSize =\n baseWidth == null || baseWidth.value.unit !== 'px' ? '100vw' : `${baseWidth.value.value}px`\n\n return breakpoints\n .map(breakpoint => {\n const override = findBreakpointOverride(breakpoints, width, breakpoint.id)\n\n if (override == null || breakpoint.maxWidth == null || override.value.unit !== 'px') {\n return null\n }\n\n return `(max-width: ${breakpoint.maxWidth}px) ${Math.min(\n breakpoint.maxWidth,\n override.value.value,\n )}px`\n })\n .filter((size): size is NonNullable<typeof size> => size != null)\n .reduce((sourceSizes, sourceSize) => `${sourceSize}, ${sourceSizes}`, baseWidthSize)\n}\n\ntype Dimensions = {\n width: number\n height: number\n}\n\nconst ImageComponent = forwardRef(function Image(\n {\n id,\n width,\n margin,\n padding,\n file,\n border,\n borderRadius,\n altText,\n link,\n opacity,\n boxShadow,\n placeholder = placeholders.image,\n className,\n }: Props,\n ref: Ref<HTMLAnchorElement & HTMLDivElement>,\n) {\n const fileData = useFile(file ?? null)\n const imageSrc = fileData?.publicUrl ? fileData.publicUrl : placeholder.src\n const dataDimensions = fileData?.publicUrl ? fileData?.dimensions : placeholder.dimensions\n const [measuredDimensions, setMeasuredDimensions] = useState<Dimensions | null>(null)\n const breakpoints = useBreakpoints()\n\n useEffect(() => {\n if (dataDimensions) return\n\n let cleanedUp = false\n\n loadImage(imageSrc)\n .then(image => {\n if (!cleanedUp) {\n setMeasuredDimensions({ width: image.naturalWidth, height: image.naturalHeight })\n }\n })\n .catch(console.error)\n\n return () => {\n cleanedUp = true\n }\n }, [dataDimensions, imageSrc])\n\n const dimensions = dataDimensions ?? measuredDimensions\n const Container = link ? Link : 'div'\n const containerClassName = cx(\n useStyle({ lineHeight: 0, overflow: 'hidden' }),\n useStyle(useResponsiveWidth(width, dimensions?.width)),\n useStyle(useResponsiveStyle([opacity] as const, ([opacity = 1]) => ({ opacity }))),\n margin,\n padding,\n border,\n borderRadius,\n boxShadow,\n className,\n )\n\n if (!dimensions) return null\n\n return (\n <Container link={link} ref={ref} id={id} className={containerClassName}>\n {nextMajorVersion < 13 ? (\n <NextLegacyImage\n layout=\"responsive\"\n src={imageSrc}\n sizes={imageSizes(breakpoints, width)}\n alt={altText}\n width={dimensions.width}\n height={dimensions.height}\n />\n ) : (\n <NextImage\n src={imageSrc}\n sizes={imageSizes(breakpoints, width)}\n alt={altText ?? ''}\n width={dimensions.width}\n height={dimensions.height}\n style={{\n width: '100%',\n height: 'auto',\n }}\n />\n )}\n </Container>\n )\n})\n\nexport default ImageComponent\n"],"names":["NextLegacyImage","NextImage","src","Promise","resolve","reject","image","Image","onload","onerror","breakpoints","width","baseDevice","find","breakpoint","maxWidth","baseWidth","findBreakpointOverride","id","baseWidthSize","value","unit","map","override","Math","min","filter","size","reduce","sourceSizes","sourceSize","ImageComponent","forwardRef","margin","padding","file","border","borderRadius","altText","link","opacity","boxShadow","placeholder","placeholders","className","ref","fileData","useFile","imageSrc","publicUrl","dataDimensions","dimensions","measuredDimensions","setMeasuredDimensions","useState","useBreakpoints","useEffect","cleanedUp","then","naturalWidth","height","naturalHeight","catch","console","error","Container","Link","containerClassName","cx","useStyle","lineHeight","overflow","useResponsiveWidth","useResponsiveStyle","nextMajorVersion","_jsx","imageSizes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAMA,kBAAkBC,mBAAAA;AAkBxB,mBAAmBC,KAAwC;AAClD,SAAA,IAAIC,QAA0B,CAACC,SAASC,WAAW;AAClDC,UAAAA,QAAQ,IAAIC;AAEZC,UAAAA,SAAS,MAAMJ,QAAQE,K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AAAA,MACE,KAAK+C;AAAAA,MACL,OAAO4B,WAAWlE,aAAaC,KAAd;AAAA,MACjB,KAAK2B,4BAAW;AAAA,MAChB,OAAOa,WAAWxC;AAAAA,MAClB,QAAQwC,WAAWS;AAAAA,MACnB,OAAO;AAAA,QACLjD,OAAO;AAAA,QACPiD,QAAQ;AAAA,MAFH;AAAA,IAAA,CANT;AAAA,EAAA,CAZN;AA0BD,CApFgC;;"}
|
package/dist/Image.es.js
CHANGED
|
@@ -4,26 +4,26 @@ import { findBreakpointOverride } from "./state/breakpoints.es.js";
|
|
|
4
4
|
import { p as placeholders } from "./placeholders.es.js";
|
|
5
5
|
import { L as Link } from "./index.es3.js";
|
|
6
6
|
import { cx } from "@emotion/css";
|
|
7
|
-
import {
|
|
7
|
+
import { Z as useStyle } from "./react-page.es.js";
|
|
8
|
+
import { z as useFile, r as useBreakpoints, o as useResponsiveWidth, n as useResponsiveStyle } from "./index.es.js";
|
|
8
9
|
import { m as major } from "./next-version.es.js";
|
|
9
10
|
import { jsx } from "react/jsx-runtime";
|
|
10
11
|
import "./actions.es.js";
|
|
11
12
|
import "scroll-into-view-if-needed";
|
|
12
13
|
import "next/link";
|
|
13
|
-
import "use-sync-external-store/shim/with-selector";
|
|
14
|
-
import "next/dynamic";
|
|
15
|
-
import "./react-page.es.js";
|
|
16
14
|
import "redux";
|
|
17
15
|
import "redux-thunk";
|
|
18
|
-
import "slate";
|
|
19
|
-
import "is-hotkey";
|
|
20
|
-
import "slate-react";
|
|
21
16
|
import "@emotion/serialize";
|
|
22
17
|
import "@emotion/utils";
|
|
18
|
+
import "slate";
|
|
19
|
+
import "use-sync-external-store/shim/with-selector";
|
|
20
|
+
import "next/dynamic";
|
|
23
21
|
import "./text-input.es.js";
|
|
24
22
|
import "./combobox.es.js";
|
|
23
|
+
import "./select.es.js";
|
|
25
24
|
import "use-sync-external-store/shim";
|
|
26
25
|
import "./types.es.js";
|
|
26
|
+
import "./deepEqual.es.js";
|
|
27
27
|
import "./box-models.es.js";
|
|
28
28
|
import "css-box-model";
|
|
29
29
|
import "color";
|
package/dist/LiveProvider.cjs.js
CHANGED
|
@@ -7,22 +7,22 @@ var jsxRuntime = require("react/jsx-runtime");
|
|
|
7
7
|
require("use-sync-external-store/shim/with-selector");
|
|
8
8
|
require("next/dynamic");
|
|
9
9
|
require("./actions.cjs.js");
|
|
10
|
-
require("@emotion/css");
|
|
11
|
-
require("@emotion/serialize");
|
|
12
|
-
require("@emotion/utils");
|
|
13
10
|
require("./text-input.cjs.js");
|
|
14
11
|
require("./combobox.cjs.js");
|
|
12
|
+
require("./select.cjs.js");
|
|
15
13
|
require("slate");
|
|
16
|
-
require("./state/breakpoints.cjs.js");
|
|
17
|
-
require("is-hotkey");
|
|
18
|
-
require("slate-react");
|
|
19
14
|
require("use-sync-external-store/shim");
|
|
20
15
|
require("redux");
|
|
21
16
|
require("redux-thunk");
|
|
22
17
|
require("./types.cjs.js");
|
|
18
|
+
require("./deepEqual.cjs.js");
|
|
19
|
+
require("./state/breakpoints.cjs.js");
|
|
23
20
|
require("./box-models.cjs.js");
|
|
24
21
|
require("css-box-model");
|
|
25
22
|
require("color");
|
|
23
|
+
require("@emotion/css");
|
|
24
|
+
require("@emotion/serialize");
|
|
25
|
+
require("@emotion/utils");
|
|
26
26
|
require("scroll-into-view-if-needed");
|
|
27
27
|
require("react-dom");
|
|
28
28
|
require("html-react-parser");
|
package/dist/LiveProvider.es.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
|
-
import { a as ReactRuntime,
|
|
3
|
-
import {
|
|
2
|
+
import { a as ReactRuntime, L as StoreContext, M as MakeswiftProvider } from "./index.es.js";
|
|
3
|
+
import { al as configureStore } from "./react-page.es.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import "use-sync-external-store/shim/with-selector";
|
|
6
6
|
import "next/dynamic";
|
|
7
7
|
import "./actions.es.js";
|
|
8
|
-
import "@emotion/css";
|
|
9
|
-
import "@emotion/serialize";
|
|
10
|
-
import "@emotion/utils";
|
|
11
8
|
import "./text-input.es.js";
|
|
12
9
|
import "./combobox.es.js";
|
|
10
|
+
import "./select.es.js";
|
|
13
11
|
import "slate";
|
|
14
|
-
import "./state/breakpoints.es.js";
|
|
15
|
-
import "is-hotkey";
|
|
16
|
-
import "slate-react";
|
|
17
12
|
import "use-sync-external-store/shim";
|
|
18
13
|
import "redux";
|
|
19
14
|
import "redux-thunk";
|
|
20
15
|
import "./types.es.js";
|
|
16
|
+
import "./deepEqual.es.js";
|
|
17
|
+
import "./state/breakpoints.es.js";
|
|
21
18
|
import "./box-models.es.js";
|
|
22
19
|
import "css-box-model";
|
|
23
20
|
import "color";
|
|
21
|
+
import "@emotion/css";
|
|
22
|
+
import "@emotion/serialize";
|
|
23
|
+
import "@emotion/utils";
|
|
24
24
|
import "scroll-into-view-if-needed";
|
|
25
25
|
import "react-dom";
|
|
26
26
|
import "html-react-parser";
|
package/dist/Navigation.cjs.js
CHANGED
|
@@ -35,14 +35,12 @@ var React = require("react");
|
|
|
35
35
|
var index = require("./index.cjs4.js");
|
|
36
36
|
var Image = require("./Image.cjs.js");
|
|
37
37
|
var Button = require("./Button.cjs.js");
|
|
38
|
-
var
|
|
38
|
+
var reactPage = require("./react-page.cjs.js");
|
|
39
39
|
var jsxRuntime = require("react/jsx-runtime");
|
|
40
|
+
var next = require("./index.cjs.js");
|
|
40
41
|
require("use-sync-external-store/shim");
|
|
41
|
-
require("./react-page.cjs.js");
|
|
42
42
|
require("slate");
|
|
43
43
|
require("./state/breakpoints.cjs.js");
|
|
44
|
-
require("is-hotkey");
|
|
45
|
-
require("slate-react");
|
|
46
44
|
var index$1 = require("./index.cjs3.js");
|
|
47
45
|
var useIsomorphicLayoutEffect = require("./useIsomorphicLayoutEffect.cjs.js");
|
|
48
46
|
var css = require("@emotion/css");
|
|
@@ -53,15 +51,17 @@ require("next/package.json");
|
|
|
53
51
|
require("./actions.cjs.js");
|
|
54
52
|
require("scroll-into-view-if-needed");
|
|
55
53
|
require("next/link");
|
|
56
|
-
require("use-sync-external-store/shim/with-selector");
|
|
57
|
-
require("next/dynamic");
|
|
58
54
|
require("redux");
|
|
59
55
|
require("redux-thunk");
|
|
60
56
|
require("@emotion/serialize");
|
|
61
57
|
require("@emotion/utils");
|
|
58
|
+
require("use-sync-external-store/shim/with-selector");
|
|
59
|
+
require("next/dynamic");
|
|
62
60
|
require("./text-input.cjs.js");
|
|
63
61
|
require("./combobox.cjs.js");
|
|
62
|
+
require("./select.cjs.js");
|
|
64
63
|
require("./types.cjs.js");
|
|
64
|
+
require("./deepEqual.cjs.js");
|
|
65
65
|
require("./box-models.cjs.js");
|
|
66
66
|
require("css-box-model");
|
|
67
67
|
require("color");
|
|
@@ -129,7 +129,7 @@ function PlaceholderLink({
|
|
|
129
129
|
button
|
|
130
130
|
}) {
|
|
131
131
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
132
|
-
className:
|
|
132
|
+
className: reactPage.useStyle({
|
|
133
133
|
width,
|
|
134
134
|
height: button === true ? 32 : 8,
|
|
135
135
|
backgroundColor: "#a1a8c2",
|
|
@@ -269,7 +269,7 @@ function DropDownMenu$1(_a) {
|
|
|
269
269
|
"position"
|
|
270
270
|
]);
|
|
271
271
|
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
|
|
272
|
-
className: css.cx(DROP_DOWN_MENU_CLASS_NAME,
|
|
272
|
+
className: css.cx(DROP_DOWN_MENU_CLASS_NAME, reactPage.useStyle({
|
|
273
273
|
position: "absolute",
|
|
274
274
|
top: "100%",
|
|
275
275
|
left: position === "left" ? 0 : "auto",
|
|
@@ -308,7 +308,7 @@ const DropDownContainer = React.forwardRef(function DropDownContainer2(_c, ref)
|
|
|
308
308
|
]);
|
|
309
309
|
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
|
|
310
310
|
ref,
|
|
311
|
-
className: css.cx(
|
|
311
|
+
className: css.cx(reactPage.useStyle({
|
|
312
312
|
position: "relative",
|
|
313
313
|
[`&:hover .${DROP_DOWN_MENU_CLASS_NAME}`]: {
|
|
314
314
|
display: "block",
|
|
@@ -329,7 +329,7 @@ function DropDownItem$1(_e) {
|
|
|
329
329
|
]);
|
|
330
330
|
const colorData = next.useResponsiveColor(color);
|
|
331
331
|
return /* @__PURE__ */ jsxRuntime.jsx(index$1.Link, __spreadProps(__spreadValues({}, restOfProps), {
|
|
332
|
-
className: css.cx(
|
|
332
|
+
className: css.cx(reactPage.useStyle({
|
|
333
333
|
display: "block",
|
|
334
334
|
textDecoration: "none",
|
|
335
335
|
lineHeight: 1.4,
|
|
@@ -337,7 +337,7 @@ function DropDownItem$1(_e) {
|
|
|
337
337
|
color: "black",
|
|
338
338
|
backgroundColor: "transparent",
|
|
339
339
|
transition: "background-color 0.2s"
|
|
340
|
-
}),
|
|
340
|
+
}), reactPage.useStyle(next.useResponsiveTextStyle(textStyle)), reactPage.useStyle(next.useResponsiveStyle([colorData, textStyle], ([color2, textStyle2 = {}]) => {
|
|
341
341
|
const fontSize = textStyle2.fontSize || {
|
|
342
342
|
value: 14,
|
|
343
343
|
unit: "px"
|
|
@@ -354,7 +354,7 @@ function DropDownItem$1(_e) {
|
|
|
354
354
|
letterSpacing: letterSpacing == null ? "normal" : `${letterSpacing}px`,
|
|
355
355
|
textTransform: textTransform.includes("uppercase") ? "uppercase" : "none"
|
|
356
356
|
};
|
|
357
|
-
})),
|
|
357
|
+
})), reactPage.useStyle({
|
|
358
358
|
"&:hover": {
|
|
359
359
|
backgroundColor: "rgba(0, 0, 0, 0.04)"
|
|
360
360
|
}
|
|
@@ -453,7 +453,7 @@ function DropDownMenu(_i) {
|
|
|
453
453
|
"open"
|
|
454
454
|
]);
|
|
455
455
|
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
|
|
456
|
-
className: css.cx(
|
|
456
|
+
className: css.cx(reactPage.useStyle({
|
|
457
457
|
display: open ? "flex" : "none",
|
|
458
458
|
flexDirection: "column",
|
|
459
459
|
padding: 8
|
|
@@ -467,7 +467,7 @@ function ButtonLink$1(_k) {
|
|
|
467
467
|
"className"
|
|
468
468
|
]);
|
|
469
469
|
return /* @__PURE__ */ jsxRuntime.jsx(Button["default"], __spreadProps(__spreadValues({}, restOfProps), {
|
|
470
|
-
className: css.cx(
|
|
470
|
+
className: css.cx(reactPage.useStyle({
|
|
471
471
|
margin: "8px 0"
|
|
472
472
|
}), className)
|
|
473
473
|
}));
|
|
@@ -484,12 +484,12 @@ function DropDownItem(_m) {
|
|
|
484
484
|
]);
|
|
485
485
|
const colorData = next.useResponsiveColor(color);
|
|
486
486
|
return /* @__PURE__ */ jsxRuntime.jsx(index$1.Link, __spreadProps(__spreadValues({}, restOfProps), {
|
|
487
|
-
className: css.cx(
|
|
487
|
+
className: css.cx(reactPage.useStyle({
|
|
488
488
|
textDecoration: "none",
|
|
489
489
|
lineHeight: 1.4,
|
|
490
490
|
padding: "8px 16px",
|
|
491
491
|
color: "black"
|
|
492
|
-
}),
|
|
492
|
+
}), reactPage.useStyle(next.useResponsiveTextStyle(textStyle)), reactPage.useStyle(next.useResponsiveStyle([colorData], ([color2]) => ({
|
|
493
493
|
color: color2 == null ? "black" : next.colorToString(color2)
|
|
494
494
|
}))), className)
|
|
495
495
|
}));
|
|
@@ -560,7 +560,7 @@ function ButtonLink(_q) {
|
|
|
560
560
|
"color"
|
|
561
561
|
]);
|
|
562
562
|
return /* @__PURE__ */ jsxRuntime.jsx(Button["default"], __spreadProps(__spreadValues({}, restOfProps), {
|
|
563
|
-
className: css.cx(
|
|
563
|
+
className: css.cx(reactPage.useStyle({
|
|
564
564
|
margin: "8px 0"
|
|
565
565
|
}), className),
|
|
566
566
|
textColor: next.useResponsiveColor(textColor),
|
|
@@ -580,7 +580,7 @@ function Container$1(_s) {
|
|
|
580
580
|
"open"
|
|
581
581
|
]);
|
|
582
582
|
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
|
|
583
|
-
className: css.cx(
|
|
583
|
+
className: css.cx(reactPage.useStyle({
|
|
584
584
|
position: "fixed",
|
|
585
585
|
flexDirection: "column",
|
|
586
586
|
width: "100%",
|
|
@@ -589,7 +589,7 @@ function Container$1(_s) {
|
|
|
589
589
|
overflowY: "auto",
|
|
590
590
|
zIndex: 9999,
|
|
591
591
|
maxWidth: 575
|
|
592
|
-
}),
|
|
592
|
+
}), reactPage.useStyle(next.useResponsiveStyle([animation, backgroundColor], ([animation2, backgroundColor2]) => {
|
|
593
593
|
if (animation2 == null)
|
|
594
594
|
return {
|
|
595
595
|
display: "none"
|
|
@@ -625,7 +625,7 @@ function CloseIconContainer(_u) {
|
|
|
625
625
|
"color"
|
|
626
626
|
]);
|
|
627
627
|
return /* @__PURE__ */ jsxRuntime.jsx("button", __spreadProps(__spreadValues({}, restOfProps), {
|
|
628
|
-
className: css.cx(
|
|
628
|
+
className: css.cx(reactPage.useStyle({
|
|
629
629
|
position: "absolute",
|
|
630
630
|
top: 15,
|
|
631
631
|
right: 15,
|
|
@@ -634,7 +634,7 @@ function CloseIconContainer(_u) {
|
|
|
634
634
|
outline: 0,
|
|
635
635
|
background: "none",
|
|
636
636
|
fill: "currentcolor"
|
|
637
|
-
}),
|
|
637
|
+
}), reactPage.useStyle(next.useResponsiveStyle([color], ([color2]) => ({
|
|
638
638
|
color: color2 == null ? "rgba(161, 168, 194, 0.5)" : next.colorToString(color2)
|
|
639
639
|
}))), className)
|
|
640
640
|
}));
|
|
@@ -690,10 +690,10 @@ const Container = React.forwardRef(function Container2(_w, ref) {
|
|
|
690
690
|
]);
|
|
691
691
|
return /* @__PURE__ */ jsxRuntime.jsx("nav", __spreadProps(__spreadValues({}, restOfProps), {
|
|
692
692
|
ref,
|
|
693
|
-
className: css.cx(
|
|
693
|
+
className: css.cx(reactPage.useStyle({
|
|
694
694
|
display: "flex",
|
|
695
695
|
alignItems: "center"
|
|
696
|
-
}), width, margin,
|
|
696
|
+
}), width, margin, reactPage.useStyle(next.useResponsiveTextStyle(textStyle)), reactPage.useStyle(next.useResponsiveStyle([gutter], ([gutter2 = {
|
|
697
697
|
value: 0,
|
|
698
698
|
unit: "px"
|
|
699
699
|
}]) => ({
|
|
@@ -712,11 +712,11 @@ function LinksContainer(_y) {
|
|
|
712
712
|
"mobileMenuAnimation"
|
|
713
713
|
]);
|
|
714
714
|
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
|
|
715
|
-
className: css.cx(
|
|
715
|
+
className: css.cx(reactPage.useStyle({
|
|
716
716
|
display: "flex",
|
|
717
717
|
alignItems: "center",
|
|
718
718
|
flexGrow: 1
|
|
719
|
-
}),
|
|
719
|
+
}), reactPage.useStyle(next.useResponsiveStyle([alignment, mobileMenuAnimation], ([alignment2 = "flex-end", mobileMenuAnimation2]) => ({
|
|
720
720
|
display: mobileMenuAnimation2 == null ? "flex" : "none",
|
|
721
721
|
justifyContent: alignment2
|
|
722
722
|
}))), className)
|
|
@@ -735,7 +735,7 @@ function OpenIconContainer(_A) {
|
|
|
735
735
|
"color"
|
|
736
736
|
]);
|
|
737
737
|
return /* @__PURE__ */ jsxRuntime.jsx("button", __spreadProps(__spreadValues({}, restOfProps), {
|
|
738
|
-
className: css.cx(
|
|
738
|
+
className: css.cx(reactPage.useStyle({
|
|
739
739
|
display: "none",
|
|
740
740
|
flexGrow: 1,
|
|
741
741
|
alignItems: "center",
|
|
@@ -744,7 +744,7 @@ function OpenIconContainer(_A) {
|
|
|
744
744
|
border: 0,
|
|
745
745
|
padding: 0,
|
|
746
746
|
fill: "currentcolor"
|
|
747
|
-
}),
|
|
747
|
+
}), reactPage.useStyle(next.useResponsiveStyle([mobileMenuAnimation, alignment, color], ([mobileMenuAnimation2, alignment2 = "flex-end", color2]) => ({
|
|
748
748
|
display: mobileMenuAnimation2 == null ? "none" : "flex",
|
|
749
749
|
justifyContent: alignment2,
|
|
750
750
|
color: color2 == null ? "rgba(161, 168, 194, 0.5)" : next.colorToString(color2)
|