@makeswift/runtime 0.8.5 → 0.8.6
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 +11 -11
- package/dist/Box.cjs.js.map +1 -1
- package/dist/Box.es.js +9 -9
- package/dist/Box.es.js.map +1 -1
- package/dist/Button.cjs.js +36 -37
- package/dist/Button.cjs.js.map +1 -1
- package/dist/Button.es.js +13 -14
- package/dist/Button.es.js.map +1 -1
- package/dist/Carousel.cjs.js +38 -37
- package/dist/Carousel.cjs.js.map +1 -1
- package/dist/Carousel.es.js +19 -18
- package/dist/Carousel.es.js.map +1 -1
- package/dist/Countdown.cjs.js +55 -29
- package/dist/Countdown.cjs.js.map +1 -1
- package/dist/Countdown.es.js +35 -9
- package/dist/Countdown.es.js.map +1 -1
- package/dist/Divider.cjs.js +36 -10
- package/dist/Divider.cjs.js.map +1 -1
- package/dist/Divider.es.js +31 -5
- package/dist/Divider.es.js.map +1 -1
- package/dist/Embed.cjs.js +31 -5
- package/dist/Embed.cjs.js.map +1 -1
- package/dist/Embed.es.js +30 -4
- package/dist/Embed.es.js.map +1 -1
- package/dist/Form.cjs.js +72 -73
- package/dist/Form.cjs.js.map +1 -1
- package/dist/Form.es.js +32 -33
- package/dist/Form.es.js.map +1 -1
- package/dist/Image.cjs.js +22 -21
- package/dist/Image.cjs.js.map +1 -1
- package/dist/Image.es.js +20 -19
- package/dist/Image.es.js.map +1 -1
- package/dist/LiveProvider.cjs.js +8 -9
- package/dist/LiveProvider.cjs.js.map +1 -1
- package/dist/LiveProvider.es.js +8 -9
- package/dist/LiveProvider.es.js.map +1 -1
- package/dist/Navigation.cjs.js +33 -34
- package/dist/Navigation.cjs.js.map +1 -1
- package/dist/Navigation.es.js +14 -15
- package/dist/Navigation.es.js.map +1 -1
- package/dist/PreviewProvider.cjs.js +12 -10
- package/dist/PreviewProvider.cjs.js.map +1 -1
- package/dist/PreviewProvider.es.js +12 -10
- package/dist/PreviewProvider.es.js.map +1 -1
- package/dist/ReadOnlyText.cjs.js +15 -16
- package/dist/ReadOnlyText.cjs.js.map +1 -1
- package/dist/ReadOnlyText.es.js +11 -12
- package/dist/ReadOnlyText.es.js.map +1 -1
- package/dist/Root.cjs.js +10 -10
- package/dist/Root.cjs.js.map +1 -1
- package/dist/Root.es.js +8 -8
- package/dist/SocialLinks.cjs.js +12 -13
- package/dist/SocialLinks.cjs.js.map +1 -1
- package/dist/SocialLinks.es.js +7 -8
- package/dist/SocialLinks.es.js.map +1 -1
- package/dist/Text.cjs.js +3 -4
- package/dist/Text.cjs.js.map +1 -1
- package/dist/Text.es.js +4 -5
- package/dist/Text.es.js.map +1 -1
- package/dist/Video.cjs.js +31 -5
- package/dist/Video.cjs.js.map +1 -1
- package/dist/Video.es.js +30 -4
- package/dist/Video.es.js.map +1 -1
- package/dist/actions.cjs.js +6 -1
- package/dist/actions.cjs.js.map +1 -1
- package/dist/actions.es.js +6 -2
- package/dist/actions.es.js.map +1 -1
- package/dist/components.cjs.js +10 -10
- package/dist/components.es.js +10 -10
- package/dist/constants.cjs.js +7 -1
- package/dist/constants.cjs.js.map +1 -1
- package/dist/constants.es.js +7 -2
- package/dist/constants.es.js.map +1 -1
- package/dist/descriptors.cjs.js.map +1 -1
- package/dist/descriptors.es.js.map +1 -1
- package/dist/index.cjs.js +934 -120
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs2.js +29 -29
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.cjs3.js +1 -2
- package/dist/index.cjs3.js.map +1 -1
- package/dist/index.cjs4.js +2 -2
- package/dist/index.cjs4.js.map +1 -1
- package/dist/index.cjs5.js +6 -7
- package/dist/index.cjs5.js.map +1 -1
- package/dist/index.cjs6.js +3 -4
- package/dist/index.cjs6.js.map +1 -1
- package/dist/index.cjs7.js +16 -17
- package/dist/index.cjs7.js.map +1 -1
- package/dist/index.es.js +890 -92
- package/dist/index.es.js.map +1 -1
- package/dist/index.es2.js +6 -6
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es3.js +1 -2
- package/dist/index.es3.js.map +1 -1
- package/dist/index.es4.js +2 -2
- package/dist/index.es4.js.map +1 -1
- package/dist/index.es5.js +6 -7
- package/dist/index.es5.js.map +1 -1
- package/dist/index.es6.js +3 -4
- package/dist/index.es6.js.map +1 -1
- package/dist/index.es7.js +12 -13
- package/dist/index.es7.js.map +1 -1
- package/dist/introspection.cjs.js +5 -2
- package/dist/introspection.cjs.js.map +1 -1
- package/dist/introspection.es.js +4 -2
- package/dist/introspection.es.js.map +1 -1
- package/dist/leaf.cjs.js +15 -17
- package/dist/leaf.cjs.js.map +1 -1
- package/dist/leaf.es.js +10 -11
- package/dist/leaf.es.js.map +1 -1
- package/dist/main.cjs.js +2 -1
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +2 -2
- package/dist/next.cjs.js +5 -6
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +6 -7
- package/dist/next.es.js.map +1 -1
- package/dist/prop-controllers.cjs.js +0 -1
- package/dist/prop-controllers.cjs.js.map +1 -1
- package/dist/prop-controllers.es.js +0 -1
- package/dist/prop-controllers.es.js.map +1 -1
- package/dist/react.cjs.js +3 -4
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.es.js +3 -4
- package/dist/react.es.js.map +1 -1
- package/dist/slate.cjs.js +1 -12
- package/dist/slate.cjs.js.map +1 -1
- package/dist/slate.es.js +1 -12
- package/dist/slate.es.js.map +1 -1
- package/dist/state/breakpoints.cjs.js +175 -0
- package/dist/state/breakpoints.cjs.js.map +1 -0
- package/dist/state/breakpoints.es.js +160 -0
- package/dist/state/breakpoints.es.js.map +1 -0
- package/dist/types/src/components/builtin/Box/Box.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Box/register.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Button/Button.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Button/register.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Carousel/Carousel.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Carousel/register.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Countdown/register.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/Label/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Form/register.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Image/Image.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/components/MobileMenu/components/MobileDropDownButton/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/components/MobileMenu/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Navigation/register.d.ts.map +1 -1
- package/dist/types/src/components/builtin/SocialLinks/register.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts +0 -4
- package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/register.d.ts.map +1 -1
- package/dist/types/src/components/hooks/useMediaQuery.d.ts.map +1 -1
- package/dist/types/src/components/utils/drop-first.d.ts +2 -0
- package/dist/types/src/components/utils/drop-first.d.ts.map +1 -0
- package/dist/types/src/components/utils/responsive-style.d.ts +21 -10
- package/dist/types/src/components/utils/responsive-style.d.ts.map +1 -1
- package/dist/types/src/controls/types.d.ts +1 -1
- package/dist/types/src/controls/types.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/descriptors.d.ts +1 -1
- package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/index.d.ts +4 -0
- package/dist/types/src/runtimes/react/index.d.ts.map +1 -1
- package/dist/types/src/slate/BlockPlugin/setBlockKeyForDevice.d.ts +2 -1
- package/dist/types/src/slate/BlockPlugin/setBlockKeyForDevice.d.ts.map +1 -1
- package/dist/types/src/slate/TypographyPlugin/setActiveTypographyStyle.d.ts +2 -1
- package/dist/types/src/slate/TypographyPlugin/setActiveTypographyStyle.d.ts.map +1 -1
- package/dist/types/src/state/actions.d.ts +10 -1
- package/dist/types/src/state/actions.d.ts.map +1 -1
- package/dist/types/src/state/modules/breakpoints.d.ts +44 -0
- package/dist/types/src/state/modules/breakpoints.d.ts.map +1 -0
- package/dist/types/src/state/react-builder-preview.d.ts +2 -0
- package/dist/types/src/state/react-builder-preview.d.ts.map +1 -1
- package/dist/types/src/state/react-page.d.ts +3 -0
- package/dist/types/src/state/react-page.d.ts.map +1 -1
- package/dist/useMediaQuery.cjs.js +38 -0
- package/dist/useMediaQuery.cjs.js.map +1 -0
- package/dist/useMediaQuery.es.js +37 -0
- package/dist/useMediaQuery.es.js.map +1 -0
- package/package.json +10 -2
- package/state/breakpoints.js +1 -0
- package/dist/isNonNullable.cjs.js +0 -6
- package/dist/isNonNullable.cjs.js.map +0 -1
- package/dist/isNonNullable.es.js +0 -5
- package/dist/isNonNullable.es.js.map +0 -1
- package/dist/responsive-style.cjs.js +0 -917
- package/dist/responsive-style.cjs.js.map +0 -1
- package/dist/responsive-style.es.js +0 -853
- package/dist/responsive-style.es.js.map +0 -1
- package/dist/types/src/components/utils/devices.d.ts +0 -17
- package/dist/types/src/components/utils/devices.d.ts.map +0 -1
package/dist/Divider.cjs.js
CHANGED
|
@@ -1,16 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
var React = require("react");
|
|
4
|
-
var
|
|
4
|
+
var next = require("./index.cjs.js");
|
|
5
5
|
var css = require("@emotion/css");
|
|
6
6
|
var jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
require("use-sync-external-store/shim/with-selector");
|
|
8
|
+
require("next/dynamic");
|
|
9
|
+
require("./constants.cjs.js");
|
|
10
|
+
require("redux");
|
|
11
|
+
require("redux-thunk");
|
|
12
|
+
require("./actions.cjs.js");
|
|
13
|
+
require("./descriptors.cjs.js");
|
|
14
|
+
require("slate");
|
|
15
|
+
require("slate-react");
|
|
16
|
+
require("./state/breakpoints.cjs.js");
|
|
17
|
+
require("./introspection.cjs.js");
|
|
7
18
|
require("@emotion/serialize");
|
|
8
19
|
require("@emotion/utils");
|
|
20
|
+
require("./text-input.cjs.js");
|
|
21
|
+
require("./combobox.cjs.js");
|
|
9
22
|
require("use-sync-external-store/shim");
|
|
10
|
-
require("redux");
|
|
11
|
-
require("redux-thunk");
|
|
12
23
|
require("./types.cjs.js");
|
|
13
|
-
require("./
|
|
24
|
+
require("./box-models.cjs.js");
|
|
25
|
+
require("css-box-model");
|
|
26
|
+
require("color");
|
|
27
|
+
require("scroll-into-view-if-needed");
|
|
28
|
+
require("react-dom");
|
|
29
|
+
require("html-react-parser");
|
|
30
|
+
require("next/head");
|
|
31
|
+
require("@emotion/server/create-instance");
|
|
32
|
+
require("next/document");
|
|
33
|
+
require("cors");
|
|
34
|
+
require("path-to-regexp");
|
|
35
|
+
require("cookie");
|
|
36
|
+
require("http-proxy");
|
|
37
|
+
require("set-cookie-parser");
|
|
38
|
+
require("uuid");
|
|
39
|
+
require("corporate-ipsum");
|
|
14
40
|
const Divider = React.forwardRef(function Divider2({
|
|
15
41
|
id,
|
|
16
42
|
variant,
|
|
@@ -22,12 +48,12 @@ const Divider = React.forwardRef(function Divider2({
|
|
|
22
48
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
23
49
|
ref,
|
|
24
50
|
id,
|
|
25
|
-
className: css.cx(
|
|
51
|
+
className: css.cx(next.useStyle({
|
|
26
52
|
display: "flex",
|
|
27
53
|
width: "100%"
|
|
28
54
|
}), width, margin),
|
|
29
55
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
30
|
-
className:
|
|
56
|
+
className: next.useStyle({
|
|
31
57
|
display: "flex",
|
|
32
58
|
flexDirection: "column",
|
|
33
59
|
justifyContent: "center",
|
|
@@ -35,7 +61,7 @@ const Divider = React.forwardRef(function Divider2({
|
|
|
35
61
|
width: "100%"
|
|
36
62
|
}),
|
|
37
63
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
38
|
-
className:
|
|
64
|
+
className: next.useStyle(next.useResponsiveStyle([variant, thickness, color], ([variant2 = "solid", thickness2 = {
|
|
39
65
|
value: 1,
|
|
40
66
|
unit: "px"
|
|
41
67
|
}, color2 = {
|
|
@@ -53,15 +79,15 @@ const Divider = React.forwardRef(function Divider2({
|
|
|
53
79
|
return {
|
|
54
80
|
borderBottomWidth: thickness2 == null ? 1 : `${thickness2.value}${thickness2.unit}`,
|
|
55
81
|
borderBottomStyle: variant2,
|
|
56
|
-
borderBottomColor:
|
|
82
|
+
borderBottomColor: next.colorToString(color2)
|
|
57
83
|
};
|
|
58
84
|
case "blended":
|
|
59
85
|
return {
|
|
60
86
|
height: `${thickness2.value}${thickness2.unit}`,
|
|
61
|
-
background: `linear-gradient(${["90deg",
|
|
87
|
+
background: `linear-gradient(${["90deg", next.colorToString({
|
|
62
88
|
swatch: color2.swatch,
|
|
63
89
|
alpha: 0
|
|
64
|
-
}),
|
|
90
|
+
}), next.colorToString(color2), next.colorToString({
|
|
65
91
|
swatch: color2.swatch,
|
|
66
92
|
alpha: 0
|
|
67
93
|
})].join(", ")})`
|
package/dist/Divider.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.cjs.js","sources":["../src/components/builtin/Divider/Divider.tsx"],"sourcesContent":["import { forwardRef, Ref } from 'react'\n\nimport {\n ElementIDValue,\n ResponsiveLengthValue,\n ResponsiveSelectValue,\n} from '../../../prop-controllers/descriptors'\nimport { colorToString } from '../../utils/colorToString'\nimport { ResponsiveColor } from '../../../runtimes/react/controls'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { cx } from '@emotion/css'\nimport {
|
|
1
|
+
{"version":3,"file":"Divider.cjs.js","sources":["../src/components/builtin/Divider/Divider.tsx"],"sourcesContent":["import { forwardRef, Ref } from 'react'\n\nimport {\n ElementIDValue,\n ResponsiveLengthValue,\n ResponsiveSelectValue,\n} from '../../../prop-controllers/descriptors'\nimport { colorToString } from '../../utils/colorToString'\nimport { ResponsiveColor } from '../../../runtimes/react/controls'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { cx } from '@emotion/css'\nimport { useResponsiveStyle } from '../../utils/responsive-style'\n\ntype DividerVariant = 'solid' | 'dashed' | 'dotted' | 'blended'\n\ntype Props = {\n id?: ElementIDValue\n variant?: ResponsiveSelectValue<DividerVariant>\n thickness?: ResponsiveLengthValue\n color?: ResponsiveColor | null\n width?: string\n margin?: string\n}\n\nconst Divider = forwardRef(function Divider(\n { id, variant, thickness, color, width, margin }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n return (\n // IE11 has a bug with Flexbox vertical centering with min height if height is not set.\n // Wrapping it in another flex container fixes it for some reason, read more here:\n // https://stackoverflow.com/questions/19371626/flexbox-not-centering-vertically-in-ie\n <div\n ref={ref}\n id={id}\n className={cx(useStyle({ display: 'flex', width: '100%' }), width, margin)}\n >\n <div\n className={useStyle({\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n minHeight: 40,\n width: '100%',\n })}\n >\n <div\n className={useStyle(\n useResponsiveStyle(\n [variant, thickness, color] as const,\n ([\n variant = 'solid',\n thickness = { value: 1, unit: 'px' },\n color = { swatch: { hue: 0, saturation: 0, lightness: 0 }, alpha: 1 },\n ]) => {\n switch (variant) {\n case 'solid':\n case 'dashed':\n case 'dotted':\n return {\n borderBottomWidth:\n thickness == null ? 1 : `${thickness.value}${thickness.unit}`,\n borderBottomStyle: variant,\n borderBottomColor: colorToString(color),\n }\n\n case 'blended':\n return {\n height: `${thickness.value}${thickness.unit}`,\n background: `linear-gradient(${[\n '90deg',\n colorToString({ swatch: color.swatch, alpha: 0 }),\n colorToString(color),\n colorToString({ swatch: color.swatch, alpha: 0 }),\n ].join(', ')})`,\n }\n\n default:\n variant as never\n throw new Error(`Invalid variant ${variant}.`)\n }\n },\n ),\n )}\n />\n </div>\n </div>\n )\n})\n\nexport default Divider\n"],"names":["Divider","forwardRef","id","variant","thickness","color","width","margin","ref","cx","useStyle","display","flexDirection","justifyContent","minHeight","useResponsiveStyle","value","unit","swatch","hue","saturation","lightness","alpha","borderBottomWidth","borderBottomStyle","borderBottomColor","colorToString","height","background","join","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBMA,MAAAA,UAAUC,MAAAA,WAAW,kBACzB;AAAA,EAAEC;AAAAA,EAAIC;AAAAA,EAASC;AAAAA,EAAWC;AAAAA,EAAOC;AAAAA,EAAOC;AAAAA,GACxCC,KACA;AACA,wCAIE,OAAA;AAAA,IACE;AAAA,IACA;AAAA,IACA,WAAWC,OAAGC,cAAS;AAAA,MAAEC,SAAS;AAAA,MAAQL,OAAO;AAAA,IAAA,CAA3B,GAAsCA,OAAOC,MAAtD;AAAA,IAEb,yCAAA,OAAA;AAAA,MACE,WAAWG,KAAAA,SAAS;AAAA,QAClBC,SAAS;AAAA,QACTC,eAAe;AAAA,QACfC,gBAAgB;AAAA,QAChBC,WAAW;AAAA,QACXR,OAAO;AAAA,MAAA,CALU;AAAA,MAQnB,yCAAA,OAAA;AAAA,QACE,WAAWI,KAAAA,SACTK,wBACE,CAACZ,SAASC,WAAWC,KAArB,GACA,CAAC,CACCF,WAAU,SACVC,aAAY;AAAA,UAAEY,OAAO;AAAA,UAAGC,MAAM;AAAA,WAC9BZ,SAAQ;AAAA,UAAEa,QAAQ;AAAA,YAAEC,KAAK;AAAA,YAAGC,YAAY;AAAA,YAAGC,WAAW;AAAA,UAA9C;AAAA,UAAmDC,OAAO;AAAA,QAAA,OAC9D;AACInB,kBAAAA;AAAAA,iBACD;AAAA,iBACA;AAAA,iBACA;AACI,qBAAA;AAAA,gBACLoB,mBACEnB,cAAa,OAAO,IAAK,GAAEA,WAAUY,QAAQZ,WAAUa;AAAAA,gBACzDO,mBAAmBrB;AAAAA,gBACnBsB,mBAAmBC,mBAAcrB,MAAD;AAAA,cAAA;AAAA,iBAG/B;AACI,qBAAA;AAAA,gBACLsB,QAAS,GAAEvB,WAAUY,QAAQZ,WAAUa;AAAAA,gBACvCW,YAAa,mBAAkB,CAC7B,SACAF,KAAAA,cAAc;AAAA,kBAAER,QAAQb,OAAMa;AAAAA,kBAAQI,OAAO;AAAA,gBAAhC,CAAA,GACbI,KAAcrB,cAAAA,MAAD,GACbqB,mBAAc;AAAA,kBAAER,QAAQb,OAAMa;AAAAA,kBAAQI,OAAO;AAAA,gBAAhC,CAAA,CAJgB,EAK7BO,KAAK,IALwB;AAAA,cAAA;AAAA;AAU3B,oBAAA,IAAIC,MAAO,mBAAkB3B,WAA7B;AAAA;AAAA,QAAA,CA/BI,CADD;AAAA,MAAA,CADrB;AAAA,IAAA,CATF;AAAA,EAAA,CALF;AAwDH,CAhEyB;;"}
|
package/dist/Divider.es.js
CHANGED
|
@@ -1,14 +1,40 @@
|
|
|
1
1
|
import { forwardRef } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { n as useStyle, o as useResponsiveStyle, r as colorToString } from "./index.es.js";
|
|
3
3
|
import { cx } from "@emotion/css";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import "use-sync-external-store/shim/with-selector";
|
|
6
|
+
import "next/dynamic";
|
|
7
|
+
import "./constants.es.js";
|
|
8
|
+
import "redux";
|
|
9
|
+
import "redux-thunk";
|
|
10
|
+
import "./actions.es.js";
|
|
11
|
+
import "./descriptors.es.js";
|
|
12
|
+
import "slate";
|
|
13
|
+
import "slate-react";
|
|
14
|
+
import "./state/breakpoints.es.js";
|
|
15
|
+
import "./introspection.es.js";
|
|
5
16
|
import "@emotion/serialize";
|
|
6
17
|
import "@emotion/utils";
|
|
18
|
+
import "./text-input.es.js";
|
|
19
|
+
import "./combobox.es.js";
|
|
7
20
|
import "use-sync-external-store/shim";
|
|
8
|
-
import "redux";
|
|
9
|
-
import "redux-thunk";
|
|
10
21
|
import "./types.es.js";
|
|
11
|
-
import "./
|
|
22
|
+
import "./box-models.es.js";
|
|
23
|
+
import "css-box-model";
|
|
24
|
+
import "color";
|
|
25
|
+
import "scroll-into-view-if-needed";
|
|
26
|
+
import "react-dom";
|
|
27
|
+
import "html-react-parser";
|
|
28
|
+
import "next/head";
|
|
29
|
+
import "@emotion/server/create-instance";
|
|
30
|
+
import "next/document";
|
|
31
|
+
import "cors";
|
|
32
|
+
import "path-to-regexp";
|
|
33
|
+
import "cookie";
|
|
34
|
+
import "http-proxy";
|
|
35
|
+
import "set-cookie-parser";
|
|
36
|
+
import "uuid";
|
|
37
|
+
import "corporate-ipsum";
|
|
12
38
|
const Divider = forwardRef(function Divider2({
|
|
13
39
|
id,
|
|
14
40
|
variant,
|
|
@@ -33,7 +59,7 @@ const Divider = forwardRef(function Divider2({
|
|
|
33
59
|
width: "100%"
|
|
34
60
|
}),
|
|
35
61
|
children: /* @__PURE__ */ jsx("div", {
|
|
36
|
-
className: useStyle(
|
|
62
|
+
className: useStyle(useResponsiveStyle([variant, thickness, color], ([variant2 = "solid", thickness2 = {
|
|
37
63
|
value: 1,
|
|
38
64
|
unit: "px"
|
|
39
65
|
}, color2 = {
|
package/dist/Divider.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.es.js","sources":["../src/components/builtin/Divider/Divider.tsx"],"sourcesContent":["import { forwardRef, Ref } from 'react'\n\nimport {\n ElementIDValue,\n ResponsiveLengthValue,\n ResponsiveSelectValue,\n} from '../../../prop-controllers/descriptors'\nimport { colorToString } from '../../utils/colorToString'\nimport { ResponsiveColor } from '../../../runtimes/react/controls'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { cx } from '@emotion/css'\nimport {
|
|
1
|
+
{"version":3,"file":"Divider.es.js","sources":["../src/components/builtin/Divider/Divider.tsx"],"sourcesContent":["import { forwardRef, Ref } from 'react'\n\nimport {\n ElementIDValue,\n ResponsiveLengthValue,\n ResponsiveSelectValue,\n} from '../../../prop-controllers/descriptors'\nimport { colorToString } from '../../utils/colorToString'\nimport { ResponsiveColor } from '../../../runtimes/react/controls'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { cx } from '@emotion/css'\nimport { useResponsiveStyle } from '../../utils/responsive-style'\n\ntype DividerVariant = 'solid' | 'dashed' | 'dotted' | 'blended'\n\ntype Props = {\n id?: ElementIDValue\n variant?: ResponsiveSelectValue<DividerVariant>\n thickness?: ResponsiveLengthValue\n color?: ResponsiveColor | null\n width?: string\n margin?: string\n}\n\nconst Divider = forwardRef(function Divider(\n { id, variant, thickness, color, width, margin }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n return (\n // IE11 has a bug with Flexbox vertical centering with min height if height is not set.\n // Wrapping it in another flex container fixes it for some reason, read more here:\n // https://stackoverflow.com/questions/19371626/flexbox-not-centering-vertically-in-ie\n <div\n ref={ref}\n id={id}\n className={cx(useStyle({ display: 'flex', width: '100%' }), width, margin)}\n >\n <div\n className={useStyle({\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n minHeight: 40,\n width: '100%',\n })}\n >\n <div\n className={useStyle(\n useResponsiveStyle(\n [variant, thickness, color] as const,\n ([\n variant = 'solid',\n thickness = { value: 1, unit: 'px' },\n color = { swatch: { hue: 0, saturation: 0, lightness: 0 }, alpha: 1 },\n ]) => {\n switch (variant) {\n case 'solid':\n case 'dashed':\n case 'dotted':\n return {\n borderBottomWidth:\n thickness == null ? 1 : `${thickness.value}${thickness.unit}`,\n borderBottomStyle: variant,\n borderBottomColor: colorToString(color),\n }\n\n case 'blended':\n return {\n height: `${thickness.value}${thickness.unit}`,\n background: `linear-gradient(${[\n '90deg',\n colorToString({ swatch: color.swatch, alpha: 0 }),\n colorToString(color),\n colorToString({ swatch: color.swatch, alpha: 0 }),\n ].join(', ')})`,\n }\n\n default:\n variant as never\n throw new Error(`Invalid variant ${variant}.`)\n }\n },\n ),\n )}\n />\n </div>\n </div>\n )\n})\n\nexport default Divider\n"],"names":["Divider","forwardRef","id","variant","thickness","color","width","margin","ref","cx","useStyle","display","flexDirection","justifyContent","minHeight","useResponsiveStyle","value","unit","swatch","hue","saturation","lightness","alpha","borderBottomWidth","borderBottomStyle","borderBottomColor","colorToString","height","background","join","Error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBMA,MAAAA,UAAUC,WAAW,kBACzB;AAAA,EAAEC;AAAAA,EAAIC;AAAAA,EAASC;AAAAA,EAAWC;AAAAA,EAAOC;AAAAA,EAAOC;AAAAA,GACxCC,KACA;AACA,6BAIE,OAAA;AAAA,IACE;AAAA,IACA;AAAA,IACA,WAAWC,GAAGC,SAAS;AAAA,MAAEC,SAAS;AAAA,MAAQL,OAAO;AAAA,IAAA,CAA3B,GAAsCA,OAAOC,MAAtD;AAAA,IAEb,8BAAA,OAAA;AAAA,MACE,WAAWG,SAAS;AAAA,QAClBC,SAAS;AAAA,QACTC,eAAe;AAAA,QACfC,gBAAgB;AAAA,QAChBC,WAAW;AAAA,QACXR,OAAO;AAAA,MAAA,CALU;AAAA,MAQnB,8BAAA,OAAA;AAAA,QACE,WAAWI,SACTK,mBACE,CAACZ,SAASC,WAAWC,KAArB,GACA,CAAC,CACCF,WAAU,SACVC,aAAY;AAAA,UAAEY,OAAO;AAAA,UAAGC,MAAM;AAAA,WAC9BZ,SAAQ;AAAA,UAAEa,QAAQ;AAAA,YAAEC,KAAK;AAAA,YAAGC,YAAY;AAAA,YAAGC,WAAW;AAAA,UAA9C;AAAA,UAAmDC,OAAO;AAAA,QAAA,OAC9D;AACInB,kBAAAA;AAAAA,iBACD;AAAA,iBACA;AAAA,iBACA;AACI,qBAAA;AAAA,gBACLoB,mBACEnB,cAAa,OAAO,IAAK,GAAEA,WAAUY,QAAQZ,WAAUa;AAAAA,gBACzDO,mBAAmBrB;AAAAA,gBACnBsB,mBAAmBC,cAAcrB,MAAD;AAAA,cAAA;AAAA,iBAG/B;AACI,qBAAA;AAAA,gBACLsB,QAAS,GAAEvB,WAAUY,QAAQZ,WAAUa;AAAAA,gBACvCW,YAAa,mBAAkB,CAC7B,SACAF,cAAc;AAAA,kBAAER,QAAQb,OAAMa;AAAAA,kBAAQI,OAAO;AAAA,gBAAhC,CAAA,GACbI,cAAcrB,MAAD,GACbqB,cAAc;AAAA,kBAAER,QAAQb,OAAMa;AAAAA,kBAAQI,OAAO;AAAA,gBAAhC,CAAA,CAJgB,EAK7BO,KAAK,IALwB;AAAA,cAAA;AAAA;AAU3B,oBAAA,IAAIC,MAAO,mBAAkB3B,WAA7B;AAAA;AAAA,QAAA,CA/BI,CADD;AAAA,MAAA,CADrB;AAAA,IAAA,CATF;AAAA,EAAA,CALF;AAwDH,CAhEyB;;"}
|
package/dist/Embed.cjs.js
CHANGED
|
@@ -2,16 +2,42 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
var React = require("react");
|
|
4
4
|
var useIsomorphicLayoutEffect = require("./useIsomorphicLayoutEffect.cjs.js");
|
|
5
|
-
var
|
|
5
|
+
var next = require("./index.cjs.js");
|
|
6
6
|
var css = require("@emotion/css");
|
|
7
7
|
var jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
require("use-sync-external-store/shim/with-selector");
|
|
9
|
+
require("next/dynamic");
|
|
10
|
+
require("./constants.cjs.js");
|
|
11
|
+
require("redux");
|
|
12
|
+
require("redux-thunk");
|
|
13
|
+
require("./actions.cjs.js");
|
|
14
|
+
require("./descriptors.cjs.js");
|
|
15
|
+
require("slate");
|
|
16
|
+
require("slate-react");
|
|
17
|
+
require("./state/breakpoints.cjs.js");
|
|
18
|
+
require("./introspection.cjs.js");
|
|
8
19
|
require("@emotion/serialize");
|
|
9
20
|
require("@emotion/utils");
|
|
21
|
+
require("./text-input.cjs.js");
|
|
22
|
+
require("./combobox.cjs.js");
|
|
10
23
|
require("use-sync-external-store/shim");
|
|
11
|
-
require("redux");
|
|
12
|
-
require("redux-thunk");
|
|
13
24
|
require("./types.cjs.js");
|
|
14
|
-
require("./
|
|
25
|
+
require("./box-models.cjs.js");
|
|
26
|
+
require("css-box-model");
|
|
27
|
+
require("color");
|
|
28
|
+
require("scroll-into-view-if-needed");
|
|
29
|
+
require("react-dom");
|
|
30
|
+
require("html-react-parser");
|
|
31
|
+
require("next/head");
|
|
32
|
+
require("@emotion/server/create-instance");
|
|
33
|
+
require("next/document");
|
|
34
|
+
require("cors");
|
|
35
|
+
require("path-to-regexp");
|
|
36
|
+
require("cookie");
|
|
37
|
+
require("http-proxy");
|
|
38
|
+
require("set-cookie-parser");
|
|
39
|
+
require("uuid");
|
|
40
|
+
require("corporate-ipsum");
|
|
15
41
|
const defaultHtml = `<div style="padding: 24px; background-color: rgba(161, 168, 194, 0.18); overflow: hidden;">
|
|
16
42
|
<svg width="316" height="168" viewBox="0 0 316 168" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
17
43
|
<rect width="70" height="8" rx="2" fill="#A1A8C2" fill-opacity="0.5"/>
|
|
@@ -85,7 +111,7 @@ const Embed = React.forwardRef(function Embed2({
|
|
|
85
111
|
console.error(error);
|
|
86
112
|
});
|
|
87
113
|
}, [container, html]);
|
|
88
|
-
const className =
|
|
114
|
+
const className = next.useStyle({
|
|
89
115
|
minHeight: 15
|
|
90
116
|
});
|
|
91
117
|
if (shouldRender === false)
|
package/dist/Embed.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Embed.cjs.js","sources":["../src/components/builtin/Embed/Embed.tsx"],"sourcesContent":["/* eslint-env browser */\n\nimport { useState, useEffect, forwardRef, Ref, useImperativeHandle } from 'react'\n\nimport { ElementIDValue, TextAreaValue } from '../../../prop-controllers/descriptors'\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { cx } from '@emotion/css'\n\ntype Props = {\n id?: ElementIDValue\n html?: TextAreaValue\n width?: string\n margin?: string\n}\n\nconst defaultHtml = `<div style=\"padding: 24px; background-color: rgba(161, 168, 194, 0.18); overflow: hidden;\">\n<svg width=\"316\" height=\"168\" viewBox=\"0 0 316 168\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<rect width=\"70\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"78\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"116\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"20\" width=\"120\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"128\" y=\"20\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"166\" y=\"20\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"60\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"80\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"100\" width=\"110\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"206\" y=\"100\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"238\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"120\" width=\"50\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"146\" y=\"120\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"178\" y=\"120\" width=\"90\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"276\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"140\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect y=\"160\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n</svg>\n</div>`\nconst SCRIPT_TAG = 'script'\n\nconst Embed = forwardRef(function Embed(\n { id, width, margin, html = defaultHtml }: Props,\n ref: Ref<HTMLDivElement | null>,\n) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null)\n const [shouldRender, setShouldRender] = useState(false)\n\n useIsomorphicLayoutEffect(() => {\n setShouldRender(true)\n }, [])\n\n useImperativeHandle(ref, () => container, [container])\n\n useEffect(() => {\n // TODO: When we SSR the editor, we can remove the editor check\n // and not run this effect on the first render.\n if (!container) return\n\n const walker = container.ownerDocument.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode(node: Element) {\n return node.tagName.toLowerCase() === SCRIPT_TAG\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_REJECT\n },\n })\n\n const nodes: Element[] = []\n\n while (walker.nextNode()) nodes.push(walker.currentNode as Element)\n\n // By default scripts appended dynamically will execute asyncrhonously. Here we ensure that\n // scripts are loaded synchronously since that's what a user usually expects with scripts in\n // embedded in HTML which usually comes from the server.\n //\n // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#notes\n async function executeScriptsInOrder() {\n for (let i = 0; i < nodes.length; i++) {\n await new Promise<void>(resolve => {\n const node = nodes[i]\n const script = node.ownerDocument.createElement(SCRIPT_TAG)\n\n script.textContent = node.textContent\n Array.from(node.attributes).forEach(({ name, value }) => {\n script.setAttribute(name, value)\n })\n\n script.onload = () => resolve()\n script.onerror = () => resolve()\n\n node.parentNode?.insertBefore(script, node)\n node.parentNode?.removeChild(node)\n\n if (!script.hasAttribute('src')) resolve()\n })\n }\n }\n\n executeScriptsInOrder().catch(error => {\n // Ignore errors from user-provided code\n console.error(error)\n })\n }, [container, html])\n\n const className = useStyle({ minHeight: 15 })\n\n if (shouldRender === false) return null\n\n return (\n <div\n ref={setContainer}\n id={id}\n className={cx(className, width, margin)}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n )\n})\n\nexport default Embed\n"],"names":["defaultHtml","SCRIPT_TAG","Embed","forwardRef","id","width","margin","html","ref","container","setContainer","useState","shouldRender","setShouldRender","useIsomorphicLayoutEffect","useImperativeHandle","useEffect","walker","ownerDocument","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","node","tagName","toLowerCase","FILTER_ACCEPT","FILTER_REJECT","nodes","nextNode","push","currentNode","i","length","Promise","resolve","script","createElement","textContent","Array","from","attributes","forEach","name","value","setAttribute","onload","onerror","parentNode","insertBefore","removeChild","hasAttribute","catch","error","console","className","useStyle","minHeight","cx","__html"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Embed.cjs.js","sources":["../src/components/builtin/Embed/Embed.tsx"],"sourcesContent":["/* eslint-env browser */\n\nimport { useState, useEffect, forwardRef, Ref, useImperativeHandle } from 'react'\n\nimport { ElementIDValue, TextAreaValue } from '../../../prop-controllers/descriptors'\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { cx } from '@emotion/css'\n\ntype Props = {\n id?: ElementIDValue\n html?: TextAreaValue\n width?: string\n margin?: string\n}\n\nconst defaultHtml = `<div style=\"padding: 24px; background-color: rgba(161, 168, 194, 0.18); overflow: hidden;\">\n<svg width=\"316\" height=\"168\" viewBox=\"0 0 316 168\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<rect width=\"70\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"78\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"116\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"20\" width=\"120\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"128\" y=\"20\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"166\" y=\"20\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"60\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"80\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"100\" width=\"110\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"206\" y=\"100\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"238\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"120\" width=\"50\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"146\" y=\"120\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"178\" y=\"120\" width=\"90\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"276\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"140\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect y=\"160\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n</svg>\n</div>`\nconst SCRIPT_TAG = 'script'\n\nconst Embed = forwardRef(function Embed(\n { id, width, margin, html = defaultHtml }: Props,\n ref: Ref<HTMLDivElement | null>,\n) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null)\n const [shouldRender, setShouldRender] = useState(false)\n\n useIsomorphicLayoutEffect(() => {\n setShouldRender(true)\n }, [])\n\n useImperativeHandle(ref, () => container, [container])\n\n useEffect(() => {\n // TODO: When we SSR the editor, we can remove the editor check\n // and not run this effect on the first render.\n if (!container) return\n\n const walker = container.ownerDocument.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode(node: Element) {\n return node.tagName.toLowerCase() === SCRIPT_TAG\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_REJECT\n },\n })\n\n const nodes: Element[] = []\n\n while (walker.nextNode()) nodes.push(walker.currentNode as Element)\n\n // By default scripts appended dynamically will execute asyncrhonously. Here we ensure that\n // scripts are loaded synchronously since that's what a user usually expects with scripts in\n // embedded in HTML which usually comes from the server.\n //\n // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#notes\n async function executeScriptsInOrder() {\n for (let i = 0; i < nodes.length; i++) {\n await new Promise<void>(resolve => {\n const node = nodes[i]\n const script = node.ownerDocument.createElement(SCRIPT_TAG)\n\n script.textContent = node.textContent\n Array.from(node.attributes).forEach(({ name, value }) => {\n script.setAttribute(name, value)\n })\n\n script.onload = () => resolve()\n script.onerror = () => resolve()\n\n node.parentNode?.insertBefore(script, node)\n node.parentNode?.removeChild(node)\n\n if (!script.hasAttribute('src')) resolve()\n })\n }\n }\n\n executeScriptsInOrder().catch(error => {\n // Ignore errors from user-provided code\n console.error(error)\n })\n }, [container, html])\n\n const className = useStyle({ minHeight: 15 })\n\n if (shouldRender === false) return null\n\n return (\n <div\n ref={setContainer}\n id={id}\n className={cx(className, width, margin)}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n )\n})\n\nexport default Embed\n"],"names":["defaultHtml","SCRIPT_TAG","Embed","forwardRef","id","width","margin","html","ref","container","setContainer","useState","shouldRender","setShouldRender","useIsomorphicLayoutEffect","useImperativeHandle","useEffect","walker","ownerDocument","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","node","tagName","toLowerCase","FILTER_ACCEPT","FILTER_REJECT","nodes","nextNode","push","currentNode","i","length","Promise","resolve","script","createElement","textContent","Array","from","attributes","forEach","name","value","setAttribute","onload","onerror","parentNode","insertBefore","removeChild","hasAttribute","catch","error","console","className","useStyle","minHeight","cx","__html"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,MAAMA,cAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuBrB,MAAMC,aAAa;AAEbC,MAAAA,QAAQC,MAAAA,WAAW,gBACvB;AAAA,EAAEC;AAAAA,EAAIC;AAAAA,EAAOC;AAAAA,EAAQC,OAAOP;AAAAA,GAC5BQ,KACA;AACA,QAAM,CAACC,WAAWC,gBAAgBC,MAAAA,SAAgC,IAAxB;AACpC,QAAA,CAACC,cAAcC,mBAAmBF,MAAAA,SAAS,KAAD;AAEhDG,4BAAAA,0BAA0B,MAAM;AAC9BD,oBAAgB,IAAD;AAAA,EADQ,GAEtB,CAFsB,CAAA;AAIzBE,QAAAA,oBAAoBP,KAAK,MAAMC,WAAW,CAACA,SAAD,CAAvB;AAEnBO,QAAAA,UAAU,MAAM;AAGV,QAAA,CAACP;AAAW;AAEhB,UAAMQ,SAASR,UAAUS,cAAcC,iBAAiBV,WAAWW,WAAWC,cAAc;AAAA,MAC1FC,WAAWC,MAAe;AACxB,eAAOA,KAAKC,QAAQC,kBAAkBxB,aAClCmB,WAAWM,gBACXN,WAAWO;AAAAA,MAChB;AAAA,IAAA,CALY;AAQf,UAAMC,QAAmB,CAAA;AAEzB,WAAOX,OAAOY,SAAP;AAAyBC,YAAAA,KAAKb,OAAOc;AAOL,2CAAA;AACrC,eAASC,IAAI,GAAGA,IAAIJ,MAAMK,QAAQD,KAAK;AAC/B,cAAA,IAAIE,QAAcC,CAAW,YAAA;;AACjC,gBAAMZ,OAAOK,MAAMI;AACbI,gBAAAA,SAASb,KAAKL,cAAcmB,cAAcpC,UAAjC;AAEfmC,iBAAOE,cAAcf,KAAKe;AAC1BC,gBAAMC,KAAKjB,KAAKkB,UAAhB,EAA4BC,QAAQ,CAAC;AAAA,YAAEC;AAAAA,YAAMC;AAAAA,gBAAY;AAChDC,mBAAAA,aAAaF,MAAMC,KAA1B;AAAA,UAAA,CADF;AAIOE,iBAAAA,SAAS,MAAMX;AACfY,iBAAAA,UAAU,MAAMZ;AAElBa,qBAAAA,eAAAA,mBAAYC,aAAab,QAAQb;AACjCyB,qBAAAA,eAAAA,mBAAYE,YAAY3B;AAEzB,cAAA,CAACa,OAAOe,aAAa,KAApB;AAAmC;QAAA,CAfpC;AAAA,MAiBP;AAAA,IACF;AAEoB,0BAAA,EAAGC,MAAMC,CAAS,UAAA;AAErCC,cAAQD,MAAMA,KAAd;AAAA,IAAA,CAFF;AAAA,EAAA,GAIC,CAAC5C,WAAWF,IAAZ,CAhDM;AAkDHgD,QAAAA,YAAYC,KAAAA,SAAS;AAAA,IAAEC,WAAW;AAAA,EAAA,CAAd;AAE1B,MAAI7C,iBAAiB;AAAc,WAAA;AAGjC,wCAAA,OAAA;AAAA,IACE,KAAKF;AAAAA,IACL;AAAA,IACA,WAAWgD,IAAAA,GAAGH,WAAWlD,OAAOC,MAAnB;AAAA,IACb,yBAAyB;AAAA,MAAEqD,QAAQpD;AAAAA,IAAV;AAAA,EAAA,CAL7B;AAQD,CA3EuB;;"}
|
package/dist/Embed.es.js
CHANGED
|
@@ -1,15 +1,41 @@
|
|
|
1
1
|
import { forwardRef, useState, useImperativeHandle, useEffect } from "react";
|
|
2
2
|
import { u as useIsomorphicLayoutEffect } from "./useIsomorphicLayoutEffect.es.js";
|
|
3
|
-
import {
|
|
3
|
+
import { n as useStyle } from "./index.es.js";
|
|
4
4
|
import { cx } from "@emotion/css";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import "use-sync-external-store/shim/with-selector";
|
|
7
|
+
import "next/dynamic";
|
|
8
|
+
import "./constants.es.js";
|
|
9
|
+
import "redux";
|
|
10
|
+
import "redux-thunk";
|
|
11
|
+
import "./actions.es.js";
|
|
12
|
+
import "./descriptors.es.js";
|
|
13
|
+
import "slate";
|
|
14
|
+
import "slate-react";
|
|
15
|
+
import "./state/breakpoints.es.js";
|
|
16
|
+
import "./introspection.es.js";
|
|
6
17
|
import "@emotion/serialize";
|
|
7
18
|
import "@emotion/utils";
|
|
19
|
+
import "./text-input.es.js";
|
|
20
|
+
import "./combobox.es.js";
|
|
8
21
|
import "use-sync-external-store/shim";
|
|
9
|
-
import "redux";
|
|
10
|
-
import "redux-thunk";
|
|
11
22
|
import "./types.es.js";
|
|
12
|
-
import "./
|
|
23
|
+
import "./box-models.es.js";
|
|
24
|
+
import "css-box-model";
|
|
25
|
+
import "color";
|
|
26
|
+
import "scroll-into-view-if-needed";
|
|
27
|
+
import "react-dom";
|
|
28
|
+
import "html-react-parser";
|
|
29
|
+
import "next/head";
|
|
30
|
+
import "@emotion/server/create-instance";
|
|
31
|
+
import "next/document";
|
|
32
|
+
import "cors";
|
|
33
|
+
import "path-to-regexp";
|
|
34
|
+
import "cookie";
|
|
35
|
+
import "http-proxy";
|
|
36
|
+
import "set-cookie-parser";
|
|
37
|
+
import "uuid";
|
|
38
|
+
import "corporate-ipsum";
|
|
13
39
|
const defaultHtml = `<div style="padding: 24px; background-color: rgba(161, 168, 194, 0.18); overflow: hidden;">
|
|
14
40
|
<svg width="316" height="168" viewBox="0 0 316 168" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
15
41
|
<rect width="70" height="8" rx="2" fill="#A1A8C2" fill-opacity="0.5"/>
|
package/dist/Embed.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Embed.es.js","sources":["../src/components/builtin/Embed/Embed.tsx"],"sourcesContent":["/* eslint-env browser */\n\nimport { useState, useEffect, forwardRef, Ref, useImperativeHandle } from 'react'\n\nimport { ElementIDValue, TextAreaValue } from '../../../prop-controllers/descriptors'\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { cx } from '@emotion/css'\n\ntype Props = {\n id?: ElementIDValue\n html?: TextAreaValue\n width?: string\n margin?: string\n}\n\nconst defaultHtml = `<div style=\"padding: 24px; background-color: rgba(161, 168, 194, 0.18); overflow: hidden;\">\n<svg width=\"316\" height=\"168\" viewBox=\"0 0 316 168\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<rect width=\"70\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"78\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"116\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"20\" width=\"120\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"128\" y=\"20\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"166\" y=\"20\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"60\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"80\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"100\" width=\"110\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"206\" y=\"100\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"238\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"120\" width=\"50\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"146\" y=\"120\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"178\" y=\"120\" width=\"90\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"276\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"140\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect y=\"160\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n</svg>\n</div>`\nconst SCRIPT_TAG = 'script'\n\nconst Embed = forwardRef(function Embed(\n { id, width, margin, html = defaultHtml }: Props,\n ref: Ref<HTMLDivElement | null>,\n) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null)\n const [shouldRender, setShouldRender] = useState(false)\n\n useIsomorphicLayoutEffect(() => {\n setShouldRender(true)\n }, [])\n\n useImperativeHandle(ref, () => container, [container])\n\n useEffect(() => {\n // TODO: When we SSR the editor, we can remove the editor check\n // and not run this effect on the first render.\n if (!container) return\n\n const walker = container.ownerDocument.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode(node: Element) {\n return node.tagName.toLowerCase() === SCRIPT_TAG\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_REJECT\n },\n })\n\n const nodes: Element[] = []\n\n while (walker.nextNode()) nodes.push(walker.currentNode as Element)\n\n // By default scripts appended dynamically will execute asyncrhonously. Here we ensure that\n // scripts are loaded synchronously since that's what a user usually expects with scripts in\n // embedded in HTML which usually comes from the server.\n //\n // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#notes\n async function executeScriptsInOrder() {\n for (let i = 0; i < nodes.length; i++) {\n await new Promise<void>(resolve => {\n const node = nodes[i]\n const script = node.ownerDocument.createElement(SCRIPT_TAG)\n\n script.textContent = node.textContent\n Array.from(node.attributes).forEach(({ name, value }) => {\n script.setAttribute(name, value)\n })\n\n script.onload = () => resolve()\n script.onerror = () => resolve()\n\n node.parentNode?.insertBefore(script, node)\n node.parentNode?.removeChild(node)\n\n if (!script.hasAttribute('src')) resolve()\n })\n }\n }\n\n executeScriptsInOrder().catch(error => {\n // Ignore errors from user-provided code\n console.error(error)\n })\n }, [container, html])\n\n const className = useStyle({ minHeight: 15 })\n\n if (shouldRender === false) return null\n\n return (\n <div\n ref={setContainer}\n id={id}\n className={cx(className, width, margin)}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n )\n})\n\nexport default Embed\n"],"names":["defaultHtml","SCRIPT_TAG","Embed","forwardRef","id","width","margin","html","ref","container","setContainer","useState","shouldRender","setShouldRender","useIsomorphicLayoutEffect","useImperativeHandle","useEffect","walker","ownerDocument","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","node","tagName","toLowerCase","FILTER_ACCEPT","FILTER_REJECT","nodes","nextNode","push","currentNode","i","length","Promise","resolve","script","createElement","textContent","Array","from","attributes","forEach","name","value","setAttribute","onload","onerror","parentNode","insertBefore","removeChild","hasAttribute","catch","error","console","className","useStyle","minHeight","cx","__html"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Embed.es.js","sources":["../src/components/builtin/Embed/Embed.tsx"],"sourcesContent":["/* eslint-env browser */\n\nimport { useState, useEffect, forwardRef, Ref, useImperativeHandle } from 'react'\n\nimport { ElementIDValue, TextAreaValue } from '../../../prop-controllers/descriptors'\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { cx } from '@emotion/css'\n\ntype Props = {\n id?: ElementIDValue\n html?: TextAreaValue\n width?: string\n margin?: string\n}\n\nconst defaultHtml = `<div style=\"padding: 24px; background-color: rgba(161, 168, 194, 0.18); overflow: hidden;\">\n<svg width=\"316\" height=\"168\" viewBox=\"0 0 316 168\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<rect width=\"70\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"78\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"116\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"20\" width=\"120\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"128\" y=\"20\" width=\"30\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"166\" y=\"20\" width=\"78\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect y=\"60\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"80\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"100\" width=\"110\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"206\" y=\"100\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"238\" y=\"100\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"40\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"88\" y=\"120\" width=\"50\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"146\" y=\"120\" width=\"24\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"178\" y=\"120\" width=\"90\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.25\"/>\n<rect x=\"276\" y=\"120\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect x=\"20\" y=\"140\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n<rect y=\"160\" width=\"40\" height=\"8\" rx=\"2\" fill=\"#A1A8C2\" fill-opacity=\"0.5\"/>\n</svg>\n</div>`\nconst SCRIPT_TAG = 'script'\n\nconst Embed = forwardRef(function Embed(\n { id, width, margin, html = defaultHtml }: Props,\n ref: Ref<HTMLDivElement | null>,\n) {\n const [container, setContainer] = useState<HTMLDivElement | null>(null)\n const [shouldRender, setShouldRender] = useState(false)\n\n useIsomorphicLayoutEffect(() => {\n setShouldRender(true)\n }, [])\n\n useImperativeHandle(ref, () => container, [container])\n\n useEffect(() => {\n // TODO: When we SSR the editor, we can remove the editor check\n // and not run this effect on the first render.\n if (!container) return\n\n const walker = container.ownerDocument.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode(node: Element) {\n return node.tagName.toLowerCase() === SCRIPT_TAG\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_REJECT\n },\n })\n\n const nodes: Element[] = []\n\n while (walker.nextNode()) nodes.push(walker.currentNode as Element)\n\n // By default scripts appended dynamically will execute asyncrhonously. Here we ensure that\n // scripts are loaded synchronously since that's what a user usually expects with scripts in\n // embedded in HTML which usually comes from the server.\n //\n // See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#notes\n async function executeScriptsInOrder() {\n for (let i = 0; i < nodes.length; i++) {\n await new Promise<void>(resolve => {\n const node = nodes[i]\n const script = node.ownerDocument.createElement(SCRIPT_TAG)\n\n script.textContent = node.textContent\n Array.from(node.attributes).forEach(({ name, value }) => {\n script.setAttribute(name, value)\n })\n\n script.onload = () => resolve()\n script.onerror = () => resolve()\n\n node.parentNode?.insertBefore(script, node)\n node.parentNode?.removeChild(node)\n\n if (!script.hasAttribute('src')) resolve()\n })\n }\n }\n\n executeScriptsInOrder().catch(error => {\n // Ignore errors from user-provided code\n console.error(error)\n })\n }, [container, html])\n\n const className = useStyle({ minHeight: 15 })\n\n if (shouldRender === false) return null\n\n return (\n <div\n ref={setContainer}\n id={id}\n className={cx(className, width, margin)}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n )\n})\n\nexport default Embed\n"],"names":["defaultHtml","SCRIPT_TAG","Embed","forwardRef","id","width","margin","html","ref","container","setContainer","useState","shouldRender","setShouldRender","useIsomorphicLayoutEffect","useImperativeHandle","useEffect","walker","ownerDocument","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","node","tagName","toLowerCase","FILTER_ACCEPT","FILTER_REJECT","nodes","nextNode","push","currentNode","i","length","Promise","resolve","script","createElement","textContent","Array","from","attributes","forEach","name","value","setAttribute","onload","onerror","parentNode","insertBefore","removeChild","hasAttribute","catch","error","console","className","useStyle","minHeight","cx","__html"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,MAAMA,cAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuBrB,MAAMC,aAAa;AAEbC,MAAAA,QAAQC,WAAW,gBACvB;AAAA,EAAEC;AAAAA,EAAIC;AAAAA,EAAOC;AAAAA,EAAQC,OAAOP;AAAAA,GAC5BQ,KACA;AACA,QAAM,CAACC,WAAWC,gBAAgBC,SAAgC,IAAxB;AACpC,QAAA,CAACC,cAAcC,mBAAmBF,SAAS,KAAD;AAEhDG,4BAA0B,MAAM;AAC9BD,oBAAgB,IAAD;AAAA,EADQ,GAEtB,CAFsB,CAAA;AAIzBE,sBAAoBP,KAAK,MAAMC,WAAW,CAACA,SAAD,CAAvB;AAEnBO,YAAU,MAAM;AAGV,QAAA,CAACP;AAAW;AAEhB,UAAMQ,SAASR,UAAUS,cAAcC,iBAAiBV,WAAWW,WAAWC,cAAc;AAAA,MAC1FC,WAAWC,MAAe;AACxB,eAAOA,KAAKC,QAAQC,kBAAkBxB,aAClCmB,WAAWM,gBACXN,WAAWO;AAAAA,MAChB;AAAA,IAAA,CALY;AAQf,UAAMC,QAAmB,CAAA;AAEzB,WAAOX,OAAOY,SAAP;AAAyBC,YAAAA,KAAKb,OAAOc;AAOL,2CAAA;AACrC,eAASC,IAAI,GAAGA,IAAIJ,MAAMK,QAAQD,KAAK;AAC/B,cAAA,IAAIE,QAAcC,CAAW,YAAA;;AACjC,gBAAMZ,OAAOK,MAAMI;AACbI,gBAAAA,SAASb,KAAKL,cAAcmB,cAAcpC,UAAjC;AAEfmC,iBAAOE,cAAcf,KAAKe;AAC1BC,gBAAMC,KAAKjB,KAAKkB,UAAhB,EAA4BC,QAAQ,CAAC;AAAA,YAAEC;AAAAA,YAAMC;AAAAA,gBAAY;AAChDC,mBAAAA,aAAaF,MAAMC,KAA1B;AAAA,UAAA,CADF;AAIOE,iBAAAA,SAAS,MAAMX;AACfY,iBAAAA,UAAU,MAAMZ;AAElBa,qBAAAA,eAAAA,mBAAYC,aAAab,QAAQb;AACjCyB,qBAAAA,eAAAA,mBAAYE,YAAY3B;AAEzB,cAAA,CAACa,OAAOe,aAAa,KAApB;AAAmC;QAAA,CAfpC;AAAA,MAiBP;AAAA,IACF;AAEoB,0BAAA,EAAGC,MAAMC,CAAS,UAAA;AAErCC,cAAQD,MAAMA,KAAd;AAAA,IAAA,CAFF;AAAA,EAAA,GAIC,CAAC5C,WAAWF,IAAZ,CAhDM;AAkDHgD,QAAAA,YAAYC,SAAS;AAAA,IAAEC,WAAW;AAAA,EAAA,CAAd;AAE1B,MAAI7C,iBAAiB;AAAc,WAAA;AAGjC,6BAAA,OAAA;AAAA,IACE,KAAKF;AAAAA,IACL;AAAA,IACA,WAAWgD,GAAGH,WAAWlD,OAAOC,MAAnB;AAAA,IACb,yBAAyB;AAAA,MAAEqD,QAAQpD;AAAAA,IAAV;AAAA,EAAA,CAL7B;AAQD,CA3EuB;;"}
|