@makeswift/runtime 0.25.0-canary.7 → 0.25.0-canary.9
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/cjs/api-handler/handlers/manifest.js +1 -1
- package/dist/cjs/components/builtin/Image/Image.js +4 -26
- package/dist/cjs/components/builtin/Image/Image.js.map +1 -1
- package/dist/cjs/components/builtin/Slot/Slot.js +1 -1
- package/dist/cjs/components/builtin/Slot/Slot.js.map +1 -1
- package/dist/cjs/components/shared/BackgroundsContainer/components/Backgrounds/index.js +4 -14
- package/dist/cjs/components/shared/BackgroundsContainer/components/Backgrounds/index.js.map +1 -1
- package/dist/cjs/next/components/framework-provider/app-router/index.js.map +1 -1
- package/dist/cjs/next/components/framework-provider/index.js +15 -1
- package/dist/cjs/next/components/framework-provider/index.js.map +1 -1
- package/dist/cjs/next/components/framework-provider/pages-router/index.js.map +1 -1
- package/dist/cjs/next/components/tests/__fixtures__/element-data/box-component.js +124 -0
- package/dist/cjs/next/components/tests/__fixtures__/element-data/box-component.js.map +1 -0
- package/dist/cjs/next/components/tests/__fixtures__/element-data/image-component.js +183 -0
- package/dist/cjs/next/components/tests/__fixtures__/element-data/image-component.js.map +1 -0
- package/dist/cjs/{runtimes/react/hooks/use-page-id.js → next/components/tests/__fixtures__/resources/files.js} +17 -20
- package/dist/cjs/next/components/tests/__fixtures__/resources/files.js.map +1 -0
- package/dist/cjs/next/components/tests/__fixtures__/resources/index.js +25 -0
- package/dist/cjs/next/components/tests/__fixtures__/resources/index.js.map +1 -0
- package/dist/cjs/{runtimes/react/components/PageProvider.js → next/components/tests/__fixtures__/resources/swatches.js} +13 -11
- package/dist/cjs/next/components/tests/__fixtures__/resources/swatches.js.map +1 -0
- package/dist/cjs/next/components/tests/controls/page-control-prop-rendering.js +1 -1
- package/dist/cjs/next/components/tests/controls/page-control-prop-rendering.js.map +1 -1
- package/dist/cjs/next/index.js +2 -2
- package/dist/cjs/next/index.js.map +1 -1
- package/dist/cjs/next/testing/page-rendering.js +15 -2
- package/dist/cjs/next/testing/page-rendering.js.map +1 -1
- package/dist/cjs/react.js +2 -6
- package/dist/cjs/react.js.map +1 -1
- package/dist/cjs/{next → runtimes/react}/components/MakeswiftComponent.js +4 -4
- package/dist/cjs/runtimes/react/components/MakeswiftComponent.js.map +1 -0
- package/dist/cjs/{next → runtimes/react}/components/Slot.js +4 -16
- package/dist/cjs/runtimes/react/components/Slot.js.map +1 -0
- package/dist/cjs/{next → runtimes/react}/components/SlotProvider.js +3 -3
- package/dist/cjs/runtimes/react/components/SlotProvider.js.map +1 -0
- package/dist/cjs/runtimes/react/components/framework-context.js +19 -1
- package/dist/cjs/runtimes/react/components/framework-context.js.map +1 -1
- package/dist/cjs/runtimes/react/index.js +0 -6
- package/dist/cjs/runtimes/react/index.js.map +1 -1
- package/dist/esm/api-handler/handlers/manifest.js +1 -1
- package/dist/esm/components/builtin/Image/Image.js +4 -16
- package/dist/esm/components/builtin/Image/Image.js.map +1 -1
- package/dist/esm/components/builtin/Slot/Slot.js +1 -1
- package/dist/esm/components/builtin/Slot/Slot.js.map +1 -1
- package/dist/esm/components/shared/BackgroundsContainer/components/Backgrounds/index.js +4 -14
- package/dist/esm/components/shared/BackgroundsContainer/components/Backgrounds/index.js.map +1 -1
- package/dist/esm/next/components/framework-provider/app-router/index.js.map +1 -1
- package/dist/esm/next/components/framework-provider/index.js +5 -1
- package/dist/esm/next/components/framework-provider/index.js.map +1 -1
- package/dist/esm/next/components/framework-provider/pages-router/index.js.map +1 -1
- package/dist/esm/next/components/tests/__fixtures__/element-data/box-component.js +99 -0
- package/dist/esm/next/components/tests/__fixtures__/element-data/box-component.js.map +1 -0
- package/dist/esm/next/components/tests/__fixtures__/element-data/image-component.js +159 -0
- package/dist/esm/next/components/tests/__fixtures__/element-data/image-component.js.map +1 -0
- package/dist/esm/next/components/tests/__fixtures__/resources/files.js +15 -0
- package/dist/esm/next/components/tests/__fixtures__/resources/files.js.map +1 -0
- package/dist/esm/next/components/tests/__fixtures__/resources/index.js +3 -0
- package/dist/esm/next/components/tests/__fixtures__/resources/index.js.map +1 -0
- package/dist/esm/next/components/tests/__fixtures__/resources/swatches.js +11 -0
- package/dist/esm/next/components/tests/__fixtures__/resources/swatches.js.map +1 -0
- package/dist/esm/next/components/tests/controls/page-control-prop-rendering.js +1 -1
- package/dist/esm/next/components/tests/controls/page-control-prop-rendering.js.map +1 -1
- package/dist/esm/next/index.js +2 -2
- package/dist/esm/next/index.js.map +1 -1
- package/dist/esm/next/testing/page-rendering.js +13 -1
- package/dist/esm/next/testing/page-rendering.js.map +1 -1
- package/dist/esm/react.js +2 -11
- package/dist/esm/react.js.map +1 -1
- package/dist/esm/{next → runtimes/react}/components/MakeswiftComponent.js +6 -4
- package/dist/esm/runtimes/react/components/MakeswiftComponent.js.map +1 -0
- package/dist/esm/{next → runtimes/react}/components/Slot.js +3 -5
- package/dist/esm/runtimes/react/components/Slot.js.map +1 -0
- package/dist/esm/{next → runtimes/react}/components/SlotProvider.js +1 -2
- package/dist/esm/runtimes/react/components/SlotProvider.js.map +1 -0
- package/dist/esm/runtimes/react/components/framework-context.js +18 -1
- package/dist/esm/runtimes/react/components/framework-context.js.map +1 -1
- package/dist/esm/runtimes/react/index.js +0 -4
- package/dist/esm/runtimes/react/index.js.map +1 -1
- package/dist/types/components/builtin/Image/Image.d.ts.map +1 -1
- package/dist/types/components/shared/BackgroundsContainer/components/Backgrounds/index.d.ts.map +1 -1
- package/dist/types/next/components/framework-provider/app-router/index.d.ts +1 -1
- package/dist/types/next/components/framework-provider/app-router/index.d.ts.map +1 -1
- package/dist/types/next/components/framework-provider/index.d.ts.map +1 -1
- package/dist/types/next/components/framework-provider/pages-router/index.d.ts +1 -1
- package/dist/types/next/components/framework-provider/pages-router/index.d.ts.map +1 -1
- package/dist/types/next/components/tests/__fixtures__/element-data/box-component.d.ts +8 -0
- package/dist/types/next/components/tests/__fixtures__/element-data/box-component.d.ts.map +1 -0
- package/dist/types/next/components/tests/__fixtures__/element-data/image-component.d.ts +7 -0
- package/dist/types/next/components/tests/__fixtures__/element-data/image-component.d.ts.map +1 -0
- package/dist/types/next/components/tests/__fixtures__/resources/files.d.ts +3 -0
- package/dist/types/next/components/tests/__fixtures__/resources/files.d.ts.map +1 -0
- package/dist/types/next/components/tests/__fixtures__/resources/index.d.ts +3 -0
- package/dist/types/next/components/tests/__fixtures__/resources/index.d.ts.map +1 -0
- package/dist/types/next/components/tests/__fixtures__/resources/swatches.d.ts +3 -0
- package/dist/types/next/components/tests/__fixtures__/resources/swatches.d.ts.map +1 -0
- package/dist/types/next/components/tests/components/box-component-rendering.test.d.ts +3 -0
- package/dist/types/next/components/tests/components/box-component-rendering.test.d.ts.map +1 -0
- package/dist/types/next/components/tests/components/image-component-rendering.test.d.ts +3 -0
- package/dist/types/next/components/tests/components/image-component-rendering.test.d.ts.map +1 -0
- package/dist/types/next/index.d.ts +2 -2
- package/dist/types/next/index.d.ts.map +1 -1
- package/dist/types/next/testing/page-rendering.d.ts +3 -0
- package/dist/types/next/testing/page-rendering.d.ts.map +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/react.d.ts.map +1 -1
- package/dist/types/{next → runtimes/react}/components/MakeswiftComponent.d.ts +1 -1
- package/dist/types/runtimes/react/components/MakeswiftComponent.d.ts.map +1 -0
- package/dist/types/{next → runtimes/react}/components/Slot.d.ts +2 -2
- package/dist/types/runtimes/react/components/Slot.d.ts.map +1 -0
- package/dist/types/{next → runtimes/react}/components/SlotProvider.d.ts +1 -2
- package/dist/types/runtimes/react/components/SlotProvider.d.ts.map +1 -0
- package/dist/types/runtimes/react/components/framework-context.d.ts +13 -1
- package/dist/types/runtimes/react/components/framework-context.d.ts.map +1 -1
- package/dist/types/runtimes/react/index.d.ts +0 -2
- package/dist/types/runtimes/react/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/cjs/next/components/MakeswiftComponent.js.map +0 -1
- package/dist/cjs/next/components/Slot.js.map +0 -1
- package/dist/cjs/next/components/SlotProvider.js.map +0 -1
- package/dist/cjs/runtimes/react/components/PageProvider.js.map +0 -1
- package/dist/cjs/runtimes/react/hooks/use-page-id.js.map +0 -1
- package/dist/esm/next/components/MakeswiftComponent.js.map +0 -1
- package/dist/esm/next/components/Slot.js.map +0 -1
- package/dist/esm/next/components/SlotProvider.js.map +0 -1
- package/dist/esm/runtimes/react/components/PageProvider.js +0 -9
- package/dist/esm/runtimes/react/components/PageProvider.js.map +0 -1
- package/dist/esm/runtimes/react/hooks/use-page-id.js +0 -17
- package/dist/esm/runtimes/react/hooks/use-page-id.js.map +0 -1
- package/dist/types/next/components/MakeswiftComponent.d.ts.map +0 -1
- package/dist/types/next/components/Slot.d.ts.map +0 -1
- package/dist/types/next/components/SlotProvider.d.ts.map +0 -1
- package/dist/types/runtimes/react/components/PageProvider.d.ts +0 -9
- package/dist/types/runtimes/react/components/PageProvider.d.ts.map +0 -1
- package/dist/types/runtimes/react/hooks/use-page-id.d.ts +0 -4
- package/dist/types/runtimes/react/hooks/use-page-id.d.ts.map +0 -1
|
@@ -28,7 +28,7 @@ async function manifestHandler(req, { apiKey, manifest }) {
|
|
|
28
28
|
return import_request_response.ApiResponse.json({ message: "Unauthorized" }, { status: 401 });
|
|
29
29
|
}
|
|
30
30
|
return import_request_response.ApiResponse.json({
|
|
31
|
-
version: "0.25.0-canary.
|
|
31
|
+
version: "0.25.0-canary.9",
|
|
32
32
|
previewMode: false,
|
|
33
33
|
draftMode: false,
|
|
34
34
|
interactionMode: true,
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
7
|
var __export = (target, all) => {
|
|
10
8
|
for (var name in all)
|
|
@@ -18,14 +16,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
16
|
}
|
|
19
17
|
return to;
|
|
20
18
|
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
20
|
var Image_exports = {};
|
|
31
21
|
__export(Image_exports, {
|
|
@@ -34,7 +24,6 @@ __export(Image_exports, {
|
|
|
34
24
|
module.exports = __toCommonJS(Image_exports);
|
|
35
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
26
|
var import_react = require("react");
|
|
37
|
-
var import_image = __toESM(require("next/image"));
|
|
38
27
|
var import_controls = require("@makeswift/controls");
|
|
39
28
|
var import_placeholders = require("../../utils/placeholders");
|
|
40
29
|
var import_Link = require("../../shared/Link");
|
|
@@ -42,10 +31,9 @@ var import_css = require("@emotion/css");
|
|
|
42
31
|
var import_use_style = require("../../../runtimes/react/use-style");
|
|
43
32
|
var import_responsive_style = require("../../utils/responsive-style");
|
|
44
33
|
var import_makeswift_api = require("../../../runtimes/react/hooks/makeswift-api");
|
|
45
|
-
var import_next_version = require("../../../next/next-version");
|
|
46
34
|
var import_use_breakpoints = require("../../../runtimes/react/hooks/use-breakpoints");
|
|
35
|
+
var import_use_framework_context = require("../../../runtimes/react/components/hooks/use-framework-context");
|
|
47
36
|
var import_ts_pattern = require("ts-pattern");
|
|
48
|
-
const NextLegacyImage = import_image.default;
|
|
49
37
|
function loadImage(src) {
|
|
50
38
|
return new Promise((resolve, reject) => {
|
|
51
39
|
const image = new Image();
|
|
@@ -120,21 +108,11 @@ const ImageComponent = (0, import_react.forwardRef)(function Image2({
|
|
|
120
108
|
boxShadow,
|
|
121
109
|
className
|
|
122
110
|
);
|
|
111
|
+
const { Image: Image3 } = (0, import_use_framework_context.useFrameworkContext)();
|
|
123
112
|
if (!dimensions)
|
|
124
113
|
return null;
|
|
125
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Container, { link, ref, id, className: containerClassName, children:
|
|
126
|
-
|
|
127
|
-
{
|
|
128
|
-
layout: "responsive",
|
|
129
|
-
src: imageSrc,
|
|
130
|
-
sizes: imageSizes(breakpoints, width),
|
|
131
|
-
alt: altText,
|
|
132
|
-
width: dimensions.width,
|
|
133
|
-
height: dimensions.height,
|
|
134
|
-
priority
|
|
135
|
-
}
|
|
136
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
137
|
-
import_image.default,
|
|
114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Container, { link, ref, id, className: containerClassName, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
115
|
+
Image3,
|
|
138
116
|
{
|
|
139
117
|
src: imageSrc,
|
|
140
118
|
priority,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/builtin/Image/Image.tsx"],"sourcesContent":["'use client'\n\nimport { useState, useEffect, Ref, forwardRef } from 'react'\
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/builtin/Image/Image.tsx"],"sourcesContent":["'use client'\n\nimport { useState, useEffect, Ref, forwardRef } from 'react'\n\nimport {\n LinkData,\n ResponsiveLengthData,\n ImageData,\n ResponsiveOpacityValue,\n} from '@makeswift/prop-controllers'\nimport { type Breakpoints, findBreakpointOverride } from '@makeswift/controls'\n\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 { useBreakpoints } from '../../../runtimes/react/hooks/use-breakpoints'\nimport { useFrameworkContext } from '../../../runtimes/react/components/hooks/use-framework-context'\nimport { match, P } from 'ts-pattern'\n\ntype Props = {\n id?: string\n file?: ImageData\n altText?: string\n link?: LinkData\n width?: ResponsiveLengthData\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 priority?: boolean\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 priority,\n }: Props,\n ref: Ref<HTMLAnchorElement & HTMLDivElement>,\n) {\n const fileId = match(file)\n .with(P.string, v => v)\n .with({ type: 'makeswift-file', version: 1 }, v => v.id)\n .otherwise(() => null)\n const fileData = useFile(fileId)\n const imageSrc = match([file, fileData])\n .with([P.any, P.not(P.nullish)], ([, fileData]) => fileData.publicUrl)\n .with([{ type: 'external-file', version: 1 }, P.any], ([file]) => file.url)\n .otherwise(() => placeholder.src)\n const dataDimensions = match([file, fileData, imageSrc])\n .with(\n [{ type: 'external-file', version: 1, width: P.number, height: P.number }, P.any, P.any],\n ([externalFile]) => ({ width: externalFile.width, height: externalFile.height }),\n )\n .with([P.any, P.not(P.nullish), P.any], ([, data]) => data.dimensions)\n .with([P.any, P.any, placeholder.src], () => placeholder.dimensions)\n .otherwise(() => null)\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 const { Image } = useFrameworkContext()\n\n if (!dimensions) return null\n\n return (\n <Container link={link} ref={ref} id={id} className={containerClassName}>\n <Image\n src={imageSrc}\n priority={priority}\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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AEpB,QAAI,YAAY;AAEhB,cAAU,QAAQ,EACf,KAAK,WAAS;AACb,UAAI,CAAC,WAAW;AACd,8BAAsB,EAAE,OAAO,MAAM,cAAc,QAAQ,MAAM,cAAc,CAAC;AAAA,MAClF;AAAA,IACF,CAAC,EACA,MAAM,QAAQ,KAAK;AAEtB,WAAO,MAAM;AACX,kBAAY;AAAA,IACd;AAAA,EACF,GAAG,CAAC,gBAAgB,QAAQ,CAAC;AAE7B,QAAM,aAAa,kBAAkB;AACrC,QAAM,YAAY,OAAO,mBAAO;AAChC,QAAM,yBAAqB;AAAA,QACzB,2BAAS,EAAE,YAAY,GAAG,UAAU,SAAS,CAAC;AAAA,QAC9C,+BAAS,4CAAmB,OAAO,YAAY,KAAK,CAAC;AAAA,QACrD,+BAAS,4CAAmB,CAAC,OAAO,GAAY,CAAC,CAACC,WAAU,CAAC,OAAO,EAAE,SAAAA,SAAQ,EAAE,CAAC;AAAA,IACjF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,EAAE,OAAAH,OAAM,QAAI,kDAAoB;AAEtC,MAAI,CAAC;AAAY,WAAO;AAExB,SACE,4CAAC,aAAU,MAAY,KAAU,IAAQ,WAAW,oBAClD;AAAA,IAACA;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL;AAAA,MACA,OAAO,WAAW,aAAa,KAAK;AAAA,MACpC,KAAK,WAAW;AAAA,MAChB,OAAO,WAAW;AAAA,MAClB,QAAQ,WAAW;AAAA,MACnB,OAAO;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,MACV;AAAA;AAAA,EACF,GACF;AAEJ,CAAC;AAED,IAAO,gBAAQ;","names":["Image","fileData","file","opacity"]}
|
|
@@ -24,7 +24,7 @@ __export(Slot_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(Slot_exports);
|
|
25
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
26
|
var import_react = require("react");
|
|
27
|
-
var import_SlotProvider = require("../../../
|
|
27
|
+
var import_SlotProvider = require("../../../runtimes/react/components/SlotProvider");
|
|
28
28
|
function Slot(props) {
|
|
29
29
|
const ctx = (0, import_react.useContext)(import_SlotProvider.PropsContext);
|
|
30
30
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: props.showFallback ? ctx.fallback : props.children });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/builtin/Slot/Slot.tsx"],"sourcesContent":["'use client'\n\nimport { ReactNode, useContext } from 'react'\nimport { PropsContext } from '../../../
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/builtin/Slot/Slot.tsx"],"sourcesContent":["'use client'\n\nimport { ReactNode, useContext } from 'react'\nimport { PropsContext } from '../../../runtimes/react/components/SlotProvider'\n\ntype Props = {\n children: ReactNode\n showFallback: boolean\n}\n\nfunction Slot(props: Props) {\n const ctx = useContext(PropsContext)\n\n return <>{props.showFallback ? ctx.fallback : props.children}</>\n}\n\nexport default Slot\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaS;AAXT,mBAAsC;AACtC,0BAA6B;AAO7B,SAAS,KAAK,OAAc;AAC1B,QAAM,UAAM,yBAAW,gCAAY;AAEnC,SAAO,2EAAG,gBAAM,eAAe,IAAI,WAAW,MAAM,UAAS;AAC/D;AAEA,IAAO,eAAQ;","names":[]}
|
|
@@ -33,14 +33,12 @@ __export(Backgrounds_exports, {
|
|
|
33
33
|
module.exports = __toCommonJS(Backgrounds_exports);
|
|
34
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
35
|
var import_react = require("react");
|
|
36
|
-
var import_image = __toESM(require("next/image"));
|
|
37
36
|
var import_colorToString = require("../../../../utils/colorToString");
|
|
38
37
|
var import_Parallax = __toESM(require("../Parallax"));
|
|
39
38
|
var import_BackgroundVideo = __toESM(require("../BackgroundVideo"));
|
|
40
39
|
var import_use_style = require("../../../../../runtimes/react/use-style");
|
|
41
40
|
var import_responsive_style = require("../../../../utils/responsive-style");
|
|
42
|
-
var
|
|
43
|
-
const NextLegacyImage = import_image.default;
|
|
41
|
+
var import_use_framework_context = require("../../../../../runtimes/react/components/hooks/use-framework-context");
|
|
44
42
|
function getColor(color) {
|
|
45
43
|
if (color == null)
|
|
46
44
|
return "black";
|
|
@@ -131,18 +129,10 @@ function ImageBackground({
|
|
|
131
129
|
}) {
|
|
132
130
|
const backgroundPosition = `${position.x}% ${position.y}%`;
|
|
133
131
|
const containerClassName = (0, import_use_style.useStyle)(containerStyle);
|
|
132
|
+
const { Image } = (0, import_use_framework_context.useFrameworkContext)();
|
|
134
133
|
if (repeat === "no-repeat" && size !== "auto" && publicUrl != null) {
|
|
135
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Parallax.default, { strength: parallax, children: (getParallaxProps) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...getParallaxProps({ style: { opacity, overflow: "hidden" } }), children:
|
|
136
|
-
|
|
137
|
-
{
|
|
138
|
-
src: publicUrl,
|
|
139
|
-
layout: "fill",
|
|
140
|
-
objectPosition: backgroundPosition,
|
|
141
|
-
objectFit: size,
|
|
142
|
-
priority
|
|
143
|
-
}
|
|
144
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
145
|
-
import_image.default,
|
|
134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Parallax.default, { strength: parallax, children: (getParallaxProps) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...getParallaxProps({ style: { opacity, overflow: "hidden" } }), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
135
|
+
Image,
|
|
146
136
|
{
|
|
147
137
|
src: publicUrl,
|
|
148
138
|
alt: "",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../src/components/shared/BackgroundsContainer/components/Backgrounds/index.tsx"],"sourcesContent":["import NextImage from 'next/image'\nimport type NextLegacyImageType from 'next/legacy/image'\n\nimport { BackgroundsPropControllerValue, BackgroundsData } from '../../../../hooks'\nimport { ResponsiveValue } from '../../../../../prop-controllers'\nimport { ColorValue as Color } from '../../../../utils/types'\nimport { colorToString } from '../../../../utils/colorToString'\nimport Parallax from '../Parallax'\nimport BackgroundVideo from '../BackgroundVideo'\nimport { CSSObject } from '@emotion/css'\nimport { useStyle } from '../../../../../runtimes/react/use-style'\nimport { useResponsiveStyle } from '../../../../utils/responsive-style'\nimport { major as nextMajorVersion } from '../../../../../next/next-version'\n\nconst NextLegacyImage = NextImage as typeof NextLegacyImageType\n\nfunction getColor(color: Color | null | undefined) {\n if (color == null) return 'black'\n\n if (color.swatch == null) {\n return colorToString({ ...color, swatch: { hue: 0, saturation: 0, lightness: 0 } })\n }\n\n return colorToString(color)\n}\n\ntype GradientStop = { color: Color | null | undefined; location: number }\n\nconst getStopsStyle = (stops: GradientStop[]) =>\n stops.map(({ color, location }) => `${getColor(color)} ${location}%`).join(',')\n\nconst absoluteFillStyle: CSSObject = {\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n}\n\nconst containerStyle: CSSObject = {\n ...absoluteFillStyle,\n borderRadius: 'inherit',\n}\n\ntype Props = { backgrounds: BackgroundsPropControllerValue | null | undefined }\n\nexport default function Backgrounds({ backgrounds }: Props): JSX.Element {\n if (backgrounds == null) return <></>\n\n return (\n <>\n {backgrounds.map(({ value, deviceId }) => {\n const visibility = backgrounds.map(v => ({\n deviceId: v.deviceId,\n value: v.deviceId === deviceId,\n }))\n\n return <BackgroundDeviceLayer key={deviceId} layer={value} visibility={visibility} />\n })}\n </>\n )\n}\n\ntype BackgroundLayerProps = {\n layer: BackgroundsData\n visibility: ResponsiveValue<boolean>\n}\n\nfunction BackgroundDeviceLayer({ layer, visibility }: BackgroundLayerProps) {\n const visibilityStyle = useResponsiveStyle([visibility], ([v]) => ({\n display: v === true ? 'block' : 'none',\n }))\n\n return (\n <div className={useStyle({ ...containerStyle, ...visibilityStyle, overflow: 'hidden' })}>\n {[...layer].reverse().map(bg => {\n if (bg.type === 'color') {\n return <ColorBackground key={bg.id} color={getColor(bg.payload)} />\n }\n\n if (bg.type === 'image' && bg.payload) {\n return <ImageBackground {...bg.payload} key={bg.id} />\n }\n\n if (bg.type === 'gradient' && bg.payload) {\n return (\n <GradientBackground\n {...bg.payload}\n key={bg.id}\n gradient={getStopsStyle(bg.payload.stops)}\n />\n )\n }\n\n if (bg.type === 'video' && bg.payload) {\n return (\n <VideoBackground\n {...bg.payload}\n key={bg.id}\n maskColor={getColor(bg.payload.maskColor)}\n />\n )\n }\n\n return null\n })}\n </div>\n )\n}\n\ntype ColorBackgroundProps = { color: string }\n\nfunction ColorBackground({ color }: ColorBackgroundProps) {\n return <div className={useStyle({ ...containerStyle, backgroundColor: color })} />\n}\n\nconst ImageBackgroundRepeat = {\n NoRepeat: 'no-repeat',\n RepeatX: 'repeat-x',\n RepeatY: 'repeat-y',\n Repeat: 'repeat',\n} as const\n\ntype ImageBackgroundRepeat = (typeof ImageBackgroundRepeat)[keyof typeof ImageBackgroundRepeat]\n\nconst ImageBackgroundSize = {\n Cover: 'cover',\n Contain: 'contain',\n Auto: 'auto',\n} as const\n\ntype ImageBackgroundSize = (typeof ImageBackgroundSize)[keyof typeof ImageBackgroundSize]\n\ntype ImageBackgroundProps = {\n publicUrl?: string\n position: { x: number; y: number }\n repeat?: ImageBackgroundRepeat\n size?: ImageBackgroundSize\n opacity?: number\n parallax?: number\n priority?: boolean\n}\n\nfunction ImageBackground({\n publicUrl,\n position,\n repeat = ImageBackgroundRepeat.NoRepeat,\n size = ImageBackgroundSize.Cover,\n opacity,\n parallax,\n priority,\n}: ImageBackgroundProps) {\n const backgroundPosition = `${position.x}% ${position.y}%`\n const containerClassName = useStyle(containerStyle)\n\n if (repeat === 'no-repeat' && size !== 'auto' && publicUrl != null) {\n return (\n <Parallax strength={parallax}>\n {getParallaxProps => (\n <div {...getParallaxProps({ style: { opacity, overflow: 'hidden' } })}>\n {nextMajorVersion < 13 ? (\n <NextLegacyImage\n src={publicUrl}\n layout=\"fill\"\n objectPosition={backgroundPosition}\n objectFit={size}\n priority={priority}\n />\n ) : (\n <NextImage\n src={publicUrl}\n alt={''}\n fill\n sizes=\"100vw\"\n style={{\n objectPosition: backgroundPosition,\n objectFit: size,\n }}\n priority={priority}\n />\n )}\n </div>\n )}\n </Parallax>\n )\n }\n\n return (\n <Parallax strength={parallax}>\n {getParallaxProps => (\n <div\n className={containerClassName}\n {...getParallaxProps({\n style: {\n backgroundImage: publicUrl != null ? `url('${publicUrl}')` : undefined,\n backgroundPosition,\n backgroundRepeat: repeat,\n backgroundSize: size,\n opacity,\n },\n })}\n />\n )}\n </Parallax>\n )\n}\n\ntype GradientBackgroundProps = {\n gradient: string\n angle?: number\n isRadial?: boolean\n}\n\nfunction GradientBackground({\n gradient,\n isRadial = false,\n angle = Math.PI,\n}: GradientBackgroundProps) {\n return (\n <div\n className={useStyle({\n ...containerStyle,\n background: isRadial\n ? `radial-gradient(${gradient})`\n : `linear-gradient(${angle}rad, ${gradient})`,\n })}\n />\n )\n}\n\nconst BackgroundVideoAspectRatio = {\n Wide: 'wide',\n Standard: 'standard',\n} as const\n\ntype BackgroundVideoAspectRatio =\n (typeof BackgroundVideoAspectRatio)[keyof typeof BackgroundVideoAspectRatio]\n\nfunction getAspectRatio(aspectRatio: BackgroundVideoAspectRatio | null | undefined): number {\n switch (aspectRatio) {\n case 'wide':\n return 16 / 9\n\n case 'standard':\n return 4 / 3\n\n default:\n return 16 / 9\n }\n}\n\ntype VideoBackgroundProps = {\n url?: string\n aspectRatio?: BackgroundVideoAspectRatio\n maskColor: string\n zoom?: number\n opacity?: number\n parallax?: number\n}\n\nfunction VideoBackground({\n url,\n aspectRatio,\n maskColor,\n zoom,\n opacity,\n parallax,\n}: VideoBackgroundProps) {\n return (\n <Parallax strength={parallax}>\n {getParallaxProps => (\n <div {...getParallaxProps({ className: useStyle(containerStyle) })}>\n <BackgroundVideo\n url={url}\n zoom={zoom}\n opacity={opacity}\n aspectRatio={getAspectRatio(aspectRatio)}\n maskColor={maskColor}\n />\n </div>\n )}\n </Parallax>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+CkC;AAkCjB;AAjFjB,mBAAsB;AAMtB,2BAA8B;AAC9B,sBAAqB;AACrB,6BAA4B;AAE5B,uBAAyB;AACzB,8BAAmC;AACnC,0BAA0C;AAE1C,MAAM,kBAAkB,aAAAA;AAExB,SAAS,SAAS,OAAiC;AACjD,MAAI,SAAS;AAAM,WAAO;AAE1B,MAAI,MAAM,UAAU,MAAM;AACxB,eAAO,oCAAc,EAAE,GAAG,OAAO,QAAQ,EAAE,KAAK,GAAG,YAAY,GAAG,WAAW,EAAE,EAAE,CAAC;AAAA,EACpF;AAEA,aAAO,oCAAc,KAAK;AAC5B;AAIA,MAAM,gBAAgB,CAAC,UACrB,MAAM,IAAI,CAAC,EAAE,OAAO,SAAS,MAAM,GAAG,SAAS,KAAK,CAAC,IAAI,QAAQ,GAAG,EAAE,KAAK,GAAG;AAEhF,MAAM,oBAA+B;AAAA,EACnC,UAAU;AAAA,EACV,KAAK;AAAA,EACL,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AACR;AAEA,MAAM,iBAA4B;AAAA,EAChC,GAAG;AAAA,EACH,cAAc;AAChB;AAIe,SAAR,YAA6B,EAAE,YAAY,GAAuB;AACvE,MAAI,eAAe;AAAM,WAAO,2EAAE;AAElC,SACE,2EACG,sBAAY,IAAI,CAAC,EAAE,OAAO,SAAS,MAAM;AACxC,UAAM,aAAa,YAAY,IAAI,QAAM;AAAA,MACvC,UAAU,EAAE;AAAA,MACZ,OAAO,EAAE,aAAa;AAAA,IACxB,EAAE;AAEF,WAAO,4CAAC,yBAAqC,OAAO,OAAO,cAAxB,QAAgD;AAAA,EACrF,CA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AACf,GAA4B;AAC1B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW,2BAAS;AAAA,QAClB,GAAG;AAAA,QACH,YAAY,WACR,mBAAmB,QAAQ,MAC3B,mBAAmB,KAAK,QAAQ,QAAQ;AAAA,MAC9C,CAAC;AAAA;AAAA,EACH;AAEJ;AAEA,MAAM,6BAA6B;AAAA,EACjC,MAAM;AAAA,EACN,UAAU;AACZ;AAKA,SAAS,eAAe,aAAoE;AAC1F,UAAQ,aAAa;AAAA,IACnB,KAAK;AACH,aAAO,KAAK;AAAA,IAEd,KAAK;AACH,aAAO,IAAI;AAAA,IAEb;AACE,aAAO,KAAK;AAAA,EAChB;AACF;AAWA,SAAS,gBAAgB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAyB;AACvB,SACE,4CAAC,gBAAAA,SAAA,EAAS,UAAU,UACjB,gCACC,4CAAC,SAAK,GAAG,iBAAiB,EAAE,eAAW,2BAAS,cAAc,EAAE,CAAC,GAC/D;AAAA,IAAC,uBAAAE;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa,eAAe,WAAW;AAAA,MACvC;AAAA;AAAA,EACF,GACF,GAEJ;AAEJ;","names":["NextImage","Parallax","nextMajorVersion","BackgroundVideo"]}
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/components/shared/BackgroundsContainer/components/Backgrounds/index.tsx"],"sourcesContent":["import { BackgroundsPropControllerValue, BackgroundsData } from '../../../../hooks'\nimport { ResponsiveValue } from '../../../../../prop-controllers'\nimport { ColorValue as Color } from '../../../../utils/types'\nimport { colorToString } from '../../../../utils/colorToString'\nimport Parallax from '../Parallax'\nimport BackgroundVideo from '../BackgroundVideo'\nimport { CSSObject } from '@emotion/css'\nimport { useStyle } from '../../../../../runtimes/react/use-style'\nimport { useResponsiveStyle } from '../../../../utils/responsive-style'\nimport { useFrameworkContext } from '../../../../../runtimes/react/components/hooks/use-framework-context'\n\nfunction getColor(color: Color | null | undefined) {\n if (color == null) return 'black'\n\n if (color.swatch == null) {\n return colorToString({ ...color, swatch: { hue: 0, saturation: 0, lightness: 0 } })\n }\n\n return colorToString(color)\n}\n\ntype GradientStop = { color: Color | null | undefined; location: number }\n\nconst getStopsStyle = (stops: GradientStop[]) =>\n stops.map(({ color, location }) => `${getColor(color)} ${location}%`).join(',')\n\nconst absoluteFillStyle: CSSObject = {\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n}\n\nconst containerStyle: CSSObject = {\n ...absoluteFillStyle,\n borderRadius: 'inherit',\n}\n\ntype Props = { backgrounds: BackgroundsPropControllerValue | null | undefined }\n\nexport default function Backgrounds({ backgrounds }: Props): JSX.Element {\n if (backgrounds == null) return <></>\n\n return (\n <>\n {backgrounds.map(({ value, deviceId }) => {\n const visibility = backgrounds.map(v => ({\n deviceId: v.deviceId,\n value: v.deviceId === deviceId,\n }))\n\n return <BackgroundDeviceLayer key={deviceId} layer={value} visibility={visibility} />\n })}\n </>\n )\n}\n\ntype BackgroundLayerProps = {\n layer: BackgroundsData\n visibility: ResponsiveValue<boolean>\n}\n\nfunction BackgroundDeviceLayer({ layer, visibility }: BackgroundLayerProps) {\n const visibilityStyle = useResponsiveStyle([visibility], ([v]) => ({\n display: v === true ? 'block' : 'none',\n }))\n\n return (\n <div className={useStyle({ ...containerStyle, ...visibilityStyle, overflow: 'hidden' })}>\n {[...layer].reverse().map(bg => {\n if (bg.type === 'color') {\n return <ColorBackground key={bg.id} color={getColor(bg.payload)} />\n }\n\n if (bg.type === 'image' && bg.payload) {\n return <ImageBackground {...bg.payload} key={bg.id} />\n }\n\n if (bg.type === 'gradient' && bg.payload) {\n return (\n <GradientBackground\n {...bg.payload}\n key={bg.id}\n gradient={getStopsStyle(bg.payload.stops)}\n />\n )\n }\n\n if (bg.type === 'video' && bg.payload) {\n return (\n <VideoBackground\n {...bg.payload}\n key={bg.id}\n maskColor={getColor(bg.payload.maskColor)}\n />\n )\n }\n\n return null\n })}\n </div>\n )\n}\n\ntype ColorBackgroundProps = { color: string }\n\nfunction ColorBackground({ color }: ColorBackgroundProps) {\n return <div className={useStyle({ ...containerStyle, backgroundColor: color })} />\n}\n\nconst ImageBackgroundRepeat = {\n NoRepeat: 'no-repeat',\n RepeatX: 'repeat-x',\n RepeatY: 'repeat-y',\n Repeat: 'repeat',\n} as const\n\ntype ImageBackgroundRepeat = (typeof ImageBackgroundRepeat)[keyof typeof ImageBackgroundRepeat]\n\nconst ImageBackgroundSize = {\n Cover: 'cover',\n Contain: 'contain',\n Auto: 'auto',\n} as const\n\ntype ImageBackgroundSize = (typeof ImageBackgroundSize)[keyof typeof ImageBackgroundSize]\n\ntype ImageBackgroundProps = {\n publicUrl?: string\n position: { x: number; y: number }\n repeat?: ImageBackgroundRepeat\n size?: ImageBackgroundSize\n opacity?: number\n parallax?: number\n priority?: boolean\n}\n\nfunction ImageBackground({\n publicUrl,\n position,\n repeat = ImageBackgroundRepeat.NoRepeat,\n size = ImageBackgroundSize.Cover,\n opacity,\n parallax,\n priority,\n}: ImageBackgroundProps) {\n const backgroundPosition = `${position.x}% ${position.y}%`\n const containerClassName = useStyle(containerStyle)\n const { Image } = useFrameworkContext()\n\n if (repeat === 'no-repeat' && size !== 'auto' && publicUrl != null) {\n return (\n <Parallax strength={parallax}>\n {getParallaxProps => (\n <div {...getParallaxProps({ style: { opacity, overflow: 'hidden' } })}>\n <Image\n src={publicUrl}\n alt={''}\n fill\n sizes=\"100vw\"\n style={{\n objectPosition: backgroundPosition,\n objectFit: size,\n }}\n priority={priority}\n />\n </div>\n )}\n </Parallax>\n )\n }\n\n return (\n <Parallax strength={parallax}>\n {getParallaxProps => (\n <div\n className={containerClassName}\n {...getParallaxProps({\n style: {\n backgroundImage: publicUrl != null ? `url('${publicUrl}')` : undefined,\n backgroundPosition,\n backgroundRepeat: repeat,\n backgroundSize: size,\n opacity,\n },\n })}\n />\n )}\n </Parallax>\n )\n}\n\ntype GradientBackgroundProps = {\n gradient: string\n angle?: number\n isRadial?: boolean\n}\n\nfunction GradientBackground({\n gradient,\n isRadial = false,\n angle = Math.PI,\n}: GradientBackgroundProps) {\n return (\n <div\n className={useStyle({\n ...containerStyle,\n background: isRadial\n ? `radial-gradient(${gradient})`\n : `linear-gradient(${angle}rad, ${gradient})`,\n })}\n />\n )\n}\n\nconst BackgroundVideoAspectRatio = {\n Wide: 'wide',\n Standard: 'standard',\n} as const\n\ntype BackgroundVideoAspectRatio =\n (typeof BackgroundVideoAspectRatio)[keyof typeof BackgroundVideoAspectRatio]\n\nfunction getAspectRatio(aspectRatio: BackgroundVideoAspectRatio | null | undefined): number {\n switch (aspectRatio) {\n case 'wide':\n return 16 / 9\n\n case 'standard':\n return 4 / 3\n\n default:\n return 16 / 9\n }\n}\n\ntype VideoBackgroundProps = {\n url?: string\n aspectRatio?: BackgroundVideoAspectRatio\n maskColor: string\n zoom?: number\n opacity?: number\n parallax?: number\n}\n\nfunction VideoBackground({\n url,\n aspectRatio,\n maskColor,\n zoom,\n opacity,\n parallax,\n}: VideoBackgroundProps) {\n return (\n <Parallax strength={parallax}>\n {getParallaxProps => (\n <div {...getParallaxProps({ className: useStyle(containerStyle) })}>\n <BackgroundVideo\n url={url}\n zoom={zoom}\n opacity={opacity}\n aspectRatio={getAspectRatio(aspectRatio)}\n maskColor={maskColor}\n />\n </div>\n )}\n </Parallax>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0CkC;AAkCjB;AAzEjB,2BAA8B;AAC9B,sBAAqB;AACrB,6BAA4B;AAE5B,uBAAyB;AACzB,8BAAmC;AACnC,mCAAoC;AAEpC,SAAS,SAAS,OAAiC;AACjD,MAAI,SAAS;AAAM,WAAO;AAE1B,MAAI,MAAM,UAAU,MAAM;AACxB,eAAO,oCAAc,EAAE,GAAG,OAAO,QAAQ,EAAE,KAAK,GAAG,YAAY,GAAG,W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,uBAAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,aAAa,eAAe,WAAW;AAAA,MACvC;AAAA;AAAA,EACF,GACF,GAEJ;AAEJ;","names":["Parallax","BackgroundVideo"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/next/components/framework-provider/app-router/index.ts"],"sourcesContent":["import {\n type FrameworkContext,\n DefaultHead,\n} from '../../../../runtimes/react/components/framework-context'\n\nimport { HeadSnippet } from './HeadSnippet'\n\nexport const context: FrameworkContext = {\n // The App Router uses built-in React Canary releases, which include all stable\n // React 19 features, so we can simply use our default head implementation\n Head: DefaultHead,\n HeadSnippet,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAGO;AAEP,yBAA4B;AAErB,MAAM,
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/next/components/framework-provider/app-router/index.ts"],"sourcesContent":["import {\n type FrameworkContext,\n DefaultHead,\n} from '../../../../runtimes/react/components/framework-context'\n\nimport { HeadSnippet } from './HeadSnippet'\n\nexport const context: Pick<FrameworkContext, 'Head' | 'HeadSnippet'> = {\n // The App Router uses built-in React Canary releases, which include all stable\n // React 19 features, so we can simply use our default head implementation\n Head: DefaultHead,\n HeadSnippet,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,+BAGO;AAEP,yBAA4B;AAErB,MAAM,UAA0D;AAAA;AAAA;AAAA,EAGrE,MAAM;AAAA,EACN;AACF;","names":[]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __export = (target, all) => {
|
|
8
10
|
for (var name in all)
|
|
@@ -16,6 +18,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
18
|
}
|
|
17
19
|
return to;
|
|
18
20
|
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
19
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
30
|
var framework_provider_exports = {};
|
|
21
31
|
__export(framework_provider_exports, {
|
|
@@ -24,6 +34,7 @@ __export(framework_provider_exports, {
|
|
|
24
34
|
module.exports = __toCommonJS(framework_provider_exports);
|
|
25
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
36
|
var import_react = require("react");
|
|
37
|
+
var import_image = __toESM(require("next/image"));
|
|
27
38
|
var import_use_is_pages_router = require("../../hooks/use-is-pages-router");
|
|
28
39
|
var import_app_router = require("./app-router");
|
|
29
40
|
var import_pages_router = require("./pages-router");
|
|
@@ -34,7 +45,10 @@ function FrameworkProvider({
|
|
|
34
45
|
}) {
|
|
35
46
|
const isPagesRouter = (0, import_use_is_pages_router.useIsPagesRouter)() || forcePagesRouter;
|
|
36
47
|
const context = (0, import_react.useMemo)(
|
|
37
|
-
() =>
|
|
48
|
+
() => ({
|
|
49
|
+
...isPagesRouter ? import_pages_router.context : import_app_router.context,
|
|
50
|
+
Image: import_image.default
|
|
51
|
+
}),
|
|
38
52
|
[isPagesRouter]
|
|
39
53
|
);
|
|
40
54
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framework_context.FrameworkContext.Provider, { value: context, children });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/next/components/framework-provider/index.tsx"],"sourcesContent":["'use client'\n\nimport { type PropsWithChildren, useMemo } from 'react'\nimport { useIsPagesRouter } from '../../hooks/use-is-pages-router'\n\nimport { context as appRouterContext } from './app-router'\nimport { context as pagesRouterContext } from './pages-router'\nimport { FrameworkContext } from '../../../runtimes/react/components/framework-context'\n\nexport function FrameworkProvider({\n children,\n forcePagesRouter,\n}: PropsWithChildren<{ forcePagesRouter?: boolean }>) {\n const isPagesRouter = useIsPagesRouter() || forcePagesRouter\n const context = useMemo(\n () => (isPagesRouter ? pagesRouterContext : appRouterContext),\n [isPagesRouter],\n )\n\n return <FrameworkContext.Provider value={context}>{children}</FrameworkContext.Provider>\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/next/components/framework-provider/index.tsx"],"sourcesContent":["'use client'\n\nimport { type PropsWithChildren, useMemo } from 'react'\nimport NextImage from 'next/image'\n\nimport { useIsPagesRouter } from '../../hooks/use-is-pages-router'\n\nimport { context as appRouterContext } from './app-router'\nimport { context as pagesRouterContext } from './pages-router'\nimport { FrameworkContext } from '../../../runtimes/react/components/framework-context'\n\nexport function FrameworkProvider({\n children,\n forcePagesRouter,\n}: PropsWithChildren<{ forcePagesRouter?: boolean }>) {\n const isPagesRouter = useIsPagesRouter() || forcePagesRouter\n const context = useMemo(\n () => ({\n ...(isPagesRouter ? pagesRouterContext : appRouterContext),\n Image: NextImage,\n }),\n [isPagesRouter],\n )\n\n return <FrameworkContext.Provider value={context}>{children}</FrameworkContext.Provider>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBS;AAtBT,mBAAgD;AAChD,mBAAsB;AAEtB,iCAAiC;AAEjC,wBAA4C;AAC5C,0BAA8C;AAC9C,+BAAiC;AAE1B,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AACF,GAAsD;AACpD,QAAM,oBAAgB,6CAAiB,KAAK;AAC5C,QAAM,cAAU;AAAA,IACd,OAAO;AAAA,MACL,GAAI,gBAAgB,oBAAAA,UAAqB,kBAAAC;AAAA,MACzC,OAAO,aAAAC;AAAA,IACT;AAAA,IACA,CAAC,aAAa;AAAA,EAChB;AAEA,SAAO,4CAAC,0CAAiB,UAAjB,EAA0B,OAAO,SAAU,UAAS;AAC9D;","names":["pagesRouterContext","appRouterContext","NextImage"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/next/components/framework-provider/pages-router/index.tsx"],"sourcesContent":["import Head from 'next/head'\n\nimport { type FrameworkContext } from '../../../../runtimes/react/components/framework-context'\n\nimport { HeadSnippet } from './HeadSnippet'\n\nexport const context: FrameworkContext = {\n Head,\n HeadSnippet,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAIjB,yBAA4B;AAErB,MAAM,
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/next/components/framework-provider/pages-router/index.tsx"],"sourcesContent":["import Head from 'next/head'\n\nimport { type FrameworkContext } from '../../../../runtimes/react/components/framework-context'\n\nimport { HeadSnippet } from './HeadSnippet'\n\nexport const context: Pick<FrameworkContext, 'Head' | 'HeadSnippet'> = {\n Head,\n HeadSnippet,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAIjB,yBAA4B;AAErB,MAAM,UAA0D;AAAA,EACrE,kBAAAA;AAAA,EACA;AACF;","names":["Head"]}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var box_component_exports = {};
|
|
20
|
+
__export(box_component_exports, {
|
|
21
|
+
boxComponentData: () => boxComponentData,
|
|
22
|
+
imageBackgroundData: () => imageBackgroundData
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(box_component_exports);
|
|
25
|
+
var import_components = require("../../../../../components");
|
|
26
|
+
const boxComponentData = ({
|
|
27
|
+
htmlId,
|
|
28
|
+
backgrounds = []
|
|
29
|
+
}) => ({
|
|
30
|
+
key: "a87eab9c-1c2b-462e-8f79-e836dd836271",
|
|
31
|
+
props: {
|
|
32
|
+
backgrounds: {
|
|
33
|
+
"@@makeswift/type": "prop-controllers::backgrounds::v2",
|
|
34
|
+
value: [
|
|
35
|
+
{
|
|
36
|
+
deviceId: "desktop",
|
|
37
|
+
value: backgrounds
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
id: {
|
|
42
|
+
"@@makeswift/type": "prop-controllers::element-id::v1",
|
|
43
|
+
value: htmlId
|
|
44
|
+
},
|
|
45
|
+
margin: {
|
|
46
|
+
"@@makeswift/type": "prop-controllers::margin::v1",
|
|
47
|
+
value: [
|
|
48
|
+
{
|
|
49
|
+
deviceId: "desktop",
|
|
50
|
+
value: {
|
|
51
|
+
marginBottom: {
|
|
52
|
+
unit: "px",
|
|
53
|
+
value: 60
|
|
54
|
+
},
|
|
55
|
+
marginTop: {
|
|
56
|
+
unit: "px",
|
|
57
|
+
value: 40
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
padding: {
|
|
64
|
+
"@@makeswift/type": "prop-controllers::padding::v1",
|
|
65
|
+
value: [
|
|
66
|
+
{
|
|
67
|
+
deviceId: "desktop",
|
|
68
|
+
value: {
|
|
69
|
+
paddingBottom: {
|
|
70
|
+
unit: "px",
|
|
71
|
+
value: 470
|
|
72
|
+
},
|
|
73
|
+
paddingLeft: {
|
|
74
|
+
unit: "px",
|
|
75
|
+
value: 10
|
|
76
|
+
},
|
|
77
|
+
paddingRight: {
|
|
78
|
+
unit: "px",
|
|
79
|
+
value: 10
|
|
80
|
+
},
|
|
81
|
+
paddingTop: {
|
|
82
|
+
unit: "px",
|
|
83
|
+
value: 10
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
width: {
|
|
90
|
+
"@@makeswift/type": "prop-controllers::width::v1",
|
|
91
|
+
value: [
|
|
92
|
+
{
|
|
93
|
+
deviceId: "desktop",
|
|
94
|
+
value: {
|
|
95
|
+
unit: "px",
|
|
96
|
+
value: 1160
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
type: import_components.MakeswiftComponentType.Box
|
|
103
|
+
});
|
|
104
|
+
const imageBackgroundData = (imageId) => ({
|
|
105
|
+
id: "d710554f-3b2a-4dc5-8785-44224d09e579",
|
|
106
|
+
payload: {
|
|
107
|
+
imageId,
|
|
108
|
+
opacity: 0.9,
|
|
109
|
+
parallax: 0,
|
|
110
|
+
position: {
|
|
111
|
+
x: 0,
|
|
112
|
+
y: 0
|
|
113
|
+
},
|
|
114
|
+
priority: true,
|
|
115
|
+
size: "contain"
|
|
116
|
+
},
|
|
117
|
+
type: "image"
|
|
118
|
+
});
|
|
119
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
120
|
+
0 && (module.exports = {
|
|
121
|
+
boxComponentData,
|
|
122
|
+
imageBackgroundData
|
|
123
|
+
});
|
|
124
|
+
//# sourceMappingURL=box-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/next/components/tests/__fixtures__/element-data/box-component.ts"],"sourcesContent":["import { type ElementData } from '@makeswift/controls'\nimport { type BackgroundData } from '@makeswift/prop-controllers'\n\nimport { MakeswiftComponentType } from '../../../../../components'\n\nexport const boxComponentData = ({\n htmlId,\n backgrounds = [],\n}: {\n htmlId: string\n backgrounds: BackgroundData[]\n}): ElementData => ({\n key: 'a87eab9c-1c2b-462e-8f79-e836dd836271',\n props: {\n backgrounds: {\n '@@makeswift/type': 'prop-controllers::backgrounds::v2',\n value: [\n {\n deviceId: 'desktop',\n value: backgrounds,\n },\n ],\n },\n id: {\n '@@makeswift/type': 'prop-controllers::element-id::v1',\n value: htmlId,\n },\n margin: {\n '@@makeswift/type': 'prop-controllers::margin::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n marginBottom: {\n unit: 'px',\n value: 60,\n },\n marginTop: {\n unit: 'px',\n value: 40,\n },\n },\n },\n ],\n },\n padding: {\n '@@makeswift/type': 'prop-controllers::padding::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n paddingBottom: {\n unit: 'px',\n value: 470,\n },\n paddingLeft: {\n unit: 'px',\n value: 10,\n },\n paddingRight: {\n unit: 'px',\n value: 10,\n },\n paddingTop: {\n unit: 'px',\n value: 10,\n },\n },\n },\n ],\n },\n width: {\n '@@makeswift/type': 'prop-controllers::width::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n unit: 'px',\n value: 1160,\n },\n },\n ],\n },\n },\n type: MakeswiftComponentType.Box,\n})\n\nexport const imageBackgroundData = (imageId: string): BackgroundData => ({\n id: 'd710554f-3b2a-4dc5-8785-44224d09e579',\n payload: {\n imageId,\n opacity: 0.9,\n parallax: 0,\n position: {\n x: 0,\n y: 0,\n },\n priority: true,\n size: 'contain',\n },\n type: 'image',\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAuC;AAEhC,MAAM,mBAAmB,CAAC;AAAA,EAC/B;AAAA,EACA,cAAc,CAAC;AACjB,OAGoB;AAAA,EAClB,KAAK;AAAA,EACL,OAAO;AAAA,IACL,aAAa;AAAA,MACX,oBAAoB;AAAA,MACpB,OAAO;AAAA,QACL;AAAA,UACE,UAAU;AAAA,UACV,OAAO;AAAA,QACT;AAAA,MACF;AAAA,IACF;AAAA,IACA,IAAI;AAAA,MACF,oBAAoB;AAAA,MACpB,OAAO;AAAA,IACT;AAAA,IACA,QAAQ;AAAA,MACN,oBAAoB;AAAA,MACpB,OAAO;AAAA,QACL;AAAA,UACE,UAAU;AAAA,UACV,OAAO;AAAA,YACL,cAAc;AAAA,cACZ,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,YACA,WAAW;AAAA,cACT,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP,oBAAoB;AAAA,MACpB,OAAO;AAAA,QACL;AAAA,UACE,UAAU;AAAA,UACV,OAAO;AAAA,YACL,eAAe;AAAA,cACb,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,YACA,aAAa;AAAA,cACX,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,YACA,cAAc;AAAA,cACZ,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,YACA,YAAY;AAAA,cACV,MAAM;AAAA,cACN,OAAO;AAAA,YACT;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL,oBAAoB;AAAA,MACpB,OAAO;AAAA,QACL;AAAA,UACE,UAAU;AAAA,UACV,OAAO;AAAA,YACL,MAAM;AAAA,YACN,OAAO;AAAA,UACT;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,MAAM,yCAAuB;AAC/B;AAEO,MAAM,sBAAsB,CAAC,aAAqC;AAAA,EACvE,IAAI;AAAA,EACJ,SAAS;AAAA,IACP;AAAA,IACA,SAAS;AAAA,IACT,UAAU;AAAA,IACV,UAAU;AAAA,MACR,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAAA,IACA,UAAU;AAAA,IACV,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AACR;","names":[]}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var image_component_exports = {};
|
|
20
|
+
__export(image_component_exports, {
|
|
21
|
+
imageComponentData: () => imageComponentData
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(image_component_exports);
|
|
24
|
+
var import_components = require("../../../../../components");
|
|
25
|
+
const imageComponentData = ({
|
|
26
|
+
htmlId,
|
|
27
|
+
swatchId,
|
|
28
|
+
fileId
|
|
29
|
+
}) => ({
|
|
30
|
+
key: "53d97944-87d4-4337-8260-a11c6bad827b",
|
|
31
|
+
props: {
|
|
32
|
+
altText: {
|
|
33
|
+
"@@makeswift/type": "prop-controllers::text-input::v1",
|
|
34
|
+
value: "Hill chart"
|
|
35
|
+
},
|
|
36
|
+
border: {
|
|
37
|
+
"@@makeswift/type": "prop-controllers::border::v1",
|
|
38
|
+
value: [
|
|
39
|
+
{
|
|
40
|
+
deviceId: "desktop",
|
|
41
|
+
value: {
|
|
42
|
+
borderBottom: {
|
|
43
|
+
color: {
|
|
44
|
+
alpha: 1,
|
|
45
|
+
swatchId
|
|
46
|
+
},
|
|
47
|
+
style: "solid",
|
|
48
|
+
width: 2
|
|
49
|
+
},
|
|
50
|
+
borderLeft: {
|
|
51
|
+
color: {
|
|
52
|
+
alpha: 1,
|
|
53
|
+
swatchId
|
|
54
|
+
},
|
|
55
|
+
style: "solid",
|
|
56
|
+
width: 2
|
|
57
|
+
},
|
|
58
|
+
borderRight: {
|
|
59
|
+
color: {
|
|
60
|
+
alpha: 1,
|
|
61
|
+
swatchId
|
|
62
|
+
},
|
|
63
|
+
style: "solid",
|
|
64
|
+
width: 2
|
|
65
|
+
},
|
|
66
|
+
borderTop: {
|
|
67
|
+
color: {
|
|
68
|
+
alpha: 1,
|
|
69
|
+
swatchId
|
|
70
|
+
},
|
|
71
|
+
style: "solid",
|
|
72
|
+
width: 2
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
borderRadius: {
|
|
79
|
+
"@@makeswift/type": "prop-controllers::border-radius::v1",
|
|
80
|
+
value: [
|
|
81
|
+
{
|
|
82
|
+
deviceId: "desktop",
|
|
83
|
+
value: {
|
|
84
|
+
borderBottomLeftRadius: {
|
|
85
|
+
unit: "px",
|
|
86
|
+
value: 6
|
|
87
|
+
},
|
|
88
|
+
borderBottomRightRadius: {
|
|
89
|
+
unit: "px",
|
|
90
|
+
value: 6
|
|
91
|
+
},
|
|
92
|
+
borderTopLeftRadius: {
|
|
93
|
+
unit: "px",
|
|
94
|
+
value: 6
|
|
95
|
+
},
|
|
96
|
+
borderTopRightRadius: {
|
|
97
|
+
unit: "px",
|
|
98
|
+
value: 6
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
file: {
|
|
105
|
+
"@@makeswift/type": "prop-controllers::image::v2",
|
|
106
|
+
value: {
|
|
107
|
+
id: fileId,
|
|
108
|
+
type: "makeswift-file",
|
|
109
|
+
version: 1
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
id: {
|
|
113
|
+
"@@makeswift/type": "prop-controllers::element-id::v1",
|
|
114
|
+
value: htmlId
|
|
115
|
+
},
|
|
116
|
+
margin: {
|
|
117
|
+
"@@makeswift/type": "prop-controllers::margin::v1",
|
|
118
|
+
value: [
|
|
119
|
+
{
|
|
120
|
+
deviceId: "desktop",
|
|
121
|
+
value: {
|
|
122
|
+
marginBottom: {
|
|
123
|
+
unit: "px",
|
|
124
|
+
value: 25
|
|
125
|
+
},
|
|
126
|
+
marginTop: {
|
|
127
|
+
unit: "px",
|
|
128
|
+
value: 20
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
padding: {
|
|
135
|
+
"@@makeswift/type": "prop-controllers::padding::v1",
|
|
136
|
+
value: [
|
|
137
|
+
{
|
|
138
|
+
deviceId: "desktop",
|
|
139
|
+
value: {
|
|
140
|
+
paddingBottom: {
|
|
141
|
+
unit: "px",
|
|
142
|
+
value: 5
|
|
143
|
+
},
|
|
144
|
+
paddingLeft: {
|
|
145
|
+
unit: "px",
|
|
146
|
+
value: 5
|
|
147
|
+
},
|
|
148
|
+
paddingRight: {
|
|
149
|
+
unit: "px",
|
|
150
|
+
value: 5
|
|
151
|
+
},
|
|
152
|
+
paddingTop: {
|
|
153
|
+
unit: "px",
|
|
154
|
+
value: 5
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
priority: {
|
|
161
|
+
"@@makeswift/type": "prop-controllers::checkbox::v1",
|
|
162
|
+
value: true
|
|
163
|
+
},
|
|
164
|
+
width: {
|
|
165
|
+
"@@makeswift/type": "prop-controllers::width::v1",
|
|
166
|
+
value: [
|
|
167
|
+
{
|
|
168
|
+
deviceId: "desktop",
|
|
169
|
+
value: {
|
|
170
|
+
unit: "%",
|
|
171
|
+
value: 90
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
type: import_components.MakeswiftComponentType.Image
|
|
178
|
+
});
|
|
179
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
180
|
+
0 && (module.exports = {
|
|
181
|
+
imageComponentData
|
|
182
|
+
});
|
|
183
|
+
//# sourceMappingURL=image-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/next/components/tests/__fixtures__/element-data/image-component.ts"],"sourcesContent":["import { type ElementData } from '@makeswift/controls'\n\nimport { MakeswiftComponentType } from '../../../../../components'\n\nexport const imageComponentData = ({\n htmlId,\n swatchId,\n fileId,\n}: {\n htmlId: string\n swatchId: string\n fileId: string\n}): ElementData => ({\n key: '53d97944-87d4-4337-8260-a11c6bad827b',\n props: {\n altText: {\n '@@makeswift/type': 'prop-controllers::text-input::v1',\n value: 'Hill chart',\n },\n border: {\n '@@makeswift/type': 'prop-controllers::border::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n borderBottom: {\n color: {\n alpha: 1,\n swatchId,\n },\n style: 'solid',\n width: 2,\n },\n borderLeft: {\n color: {\n alpha: 1,\n swatchId,\n },\n style: 'solid',\n width: 2,\n },\n borderRight: {\n color: {\n alpha: 1,\n swatchId,\n },\n style: 'solid',\n width: 2,\n },\n borderTop: {\n color: {\n alpha: 1,\n swatchId,\n },\n style: 'solid',\n width: 2,\n },\n },\n },\n ],\n },\n borderRadius: {\n '@@makeswift/type': 'prop-controllers::border-radius::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n borderBottomLeftRadius: {\n unit: 'px',\n value: 6,\n },\n borderBottomRightRadius: {\n unit: 'px',\n value: 6,\n },\n borderTopLeftRadius: {\n unit: 'px',\n value: 6,\n },\n borderTopRightRadius: {\n unit: 'px',\n value: 6,\n },\n },\n },\n ],\n },\n file: {\n '@@makeswift/type': 'prop-controllers::image::v2',\n value: {\n id: fileId,\n type: 'makeswift-file',\n version: 1,\n },\n },\n id: {\n '@@makeswift/type': 'prop-controllers::element-id::v1',\n value: htmlId,\n },\n margin: {\n '@@makeswift/type': 'prop-controllers::margin::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n marginBottom: {\n unit: 'px',\n value: 25,\n },\n marginTop: {\n unit: 'px',\n value: 20,\n },\n },\n },\n ],\n },\n padding: {\n '@@makeswift/type': 'prop-controllers::padding::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n paddingBottom: {\n unit: 'px',\n value: 5,\n },\n paddingLeft: {\n unit: 'px',\n value: 5,\n },\n paddingRight: {\n unit: 'px',\n value: 5,\n },\n paddingTop: {\n unit: 'px',\n value: 5,\n },\n },\n },\n ],\n },\n priority: {\n '@@makeswift/type': 'prop-controllers::checkbox::v1',\n value: true,\n },\n width: {\n '@@makeswift/type': 'prop-controllers::width::v1',\n value: [\n {\n deviceId: 'desktop',\n value: {\n unit: '%',\n value: 90,\n },\n },\n ],\n },\n },\n type: MakeswiftComponent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