@makeswift/runtime 0.1.3 → 0.1.4

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.
Files changed (86) hide show
  1. package/dist/Box.cjs.js +1 -0
  2. package/dist/Box.cjs.js.map +1 -1
  3. package/dist/Box.es.js +1 -0
  4. package/dist/Box.es.js.map +1 -1
  5. package/dist/Button.cjs.js +1 -1
  6. package/dist/Button.es.js +2 -2
  7. package/dist/Carousel.cjs.js +1 -1
  8. package/dist/Carousel.es.js +2 -2
  9. package/dist/Countdown.cjs.js +1 -0
  10. package/dist/Countdown.cjs.js.map +1 -1
  11. package/dist/Countdown.es.js +2 -1
  12. package/dist/Countdown.es.js.map +1 -1
  13. package/dist/Divider.cjs.js +1 -0
  14. package/dist/Divider.cjs.js.map +1 -1
  15. package/dist/Divider.es.js +2 -1
  16. package/dist/Divider.es.js.map +1 -1
  17. package/dist/Embed.cjs.js +1 -0
  18. package/dist/Embed.cjs.js.map +1 -1
  19. package/dist/Embed.es.js +2 -1
  20. package/dist/Embed.es.js.map +1 -1
  21. package/dist/Form.cjs.js +1 -1
  22. package/dist/Form.es.js +2 -2
  23. package/dist/Image.cjs2.js +1 -1
  24. package/dist/Image.es2.js +2 -2
  25. package/dist/Navigation.cjs.js +1 -1
  26. package/dist/Navigation.es.js +2 -2
  27. package/dist/Root.cjs.js +1 -0
  28. package/dist/Root.cjs.js.map +1 -1
  29. package/dist/Root.es.js +1 -0
  30. package/dist/Root.es.js.map +1 -1
  31. package/dist/SocialLinks.es.js +1 -1
  32. package/dist/Text.cjs.js +1 -1
  33. package/dist/Text.es.js +2 -2
  34. package/dist/Video.cjs.js +1 -0
  35. package/dist/Video.cjs.js.map +1 -1
  36. package/dist/Video.es.js +1 -0
  37. package/dist/Video.es.js.map +1 -1
  38. package/dist/components.cjs.js +4 -4
  39. package/dist/components.es.js +4 -4
  40. package/dist/controls.cjs.js +2 -0
  41. package/dist/controls.cjs.js.map +1 -1
  42. package/dist/controls.es.js +1 -1
  43. package/dist/cssMediaRules.es.js +1 -1
  44. package/dist/descriptors.cjs.js.map +1 -1
  45. package/dist/descriptors.es.js.map +1 -1
  46. package/dist/index.cjs.js +85 -1
  47. package/dist/index.cjs.js.map +1 -1
  48. package/dist/index.cjs3.js +1 -12
  49. package/dist/index.cjs3.js.map +1 -1
  50. package/dist/index.es.js +86 -3
  51. package/dist/index.es.js.map +1 -1
  52. package/dist/index.es2.js +1 -1
  53. package/dist/index.es3.js +2 -12
  54. package/dist/index.es3.js.map +1 -1
  55. package/dist/next.cjs.js +1 -0
  56. package/dist/next.cjs.js.map +1 -1
  57. package/dist/next.es.js +1 -0
  58. package/dist/next.es.js.map +1 -1
  59. package/dist/react-builder-preview.cjs.js +1 -0
  60. package/dist/react-builder-preview.cjs.js.map +1 -1
  61. package/dist/react-builder-preview.es.js +1 -0
  62. package/dist/react-builder-preview.es.js.map +1 -1
  63. package/dist/react.cjs.js +1 -0
  64. package/dist/react.cjs.js.map +1 -1
  65. package/dist/react.es.js +1 -0
  66. package/dist/react.es.js.map +1 -1
  67. package/dist/text-input.cjs.js +6 -0
  68. package/dist/text-input.cjs.js.map +1 -1
  69. package/dist/text-input.es.js +5 -1
  70. package/dist/text-input.es.js.map +1 -1
  71. package/dist/types/controls/control.d.ts +3 -2
  72. package/dist/types/controls/control.d.ts.map +1 -1
  73. package/dist/types/controls/index.d.ts +1 -0
  74. package/dist/types/controls/index.d.ts.map +1 -1
  75. package/dist/types/controls/link.d.ts +50 -0
  76. package/dist/types/controls/link.d.ts.map +1 -0
  77. package/dist/types/prop-controllers/descriptors.d.ts +4 -3
  78. package/dist/types/prop-controllers/descriptors.d.ts.map +1 -1
  79. package/dist/types/runtimes/react/controls/control.d.ts +3 -2
  80. package/dist/types/runtimes/react/controls/control.d.ts.map +1 -1
  81. package/dist/types/runtimes/react/controls/link.d.ts +11 -0
  82. package/dist/types/runtimes/react/controls/link.d.ts.map +1 -0
  83. package/dist/types/runtimes/react/controls.d.ts.map +1 -1
  84. package/dist/useBoxShadow.es.js +1 -1
  85. package/dist/useMediaQuery.es.js +1 -1
  86. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Divider.cjs.js","sources":["../src/components/builtin/Divider/Divider.tsx"],"sourcesContent":["import { forwardRef, Ref } from 'react'\nimport styled, { css } from 'styled-components'\nimport { cx } from '@emotion/css'\n\nimport { cssMediaRules, cssMargin } from '../../utils/cssMediaRules'\nimport {\n ResponsiveValue,\n ElementIDValue,\n MarginValue,\n ResponsiveLengthValue,\n ResponsiveSelectValue,\n} from '../../../prop-controllers/descriptors'\nimport { colorToString } from '../../utils/colorToString'\nimport { ColorValue as Color } from '../../utils/types'\nimport { ResponsiveColor } from '../../../runtimes/react/controls'\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?: MarginValue\n}\n\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\nconst IE11MinHeightContainer = styled.div.withConfig({\n shouldForwardProp: prop => !['margin'].includes(prop),\n})<{ margin: Props['margin'] }>`\n display: flex;\n width: 100%;\n ${cssMargin()}\n`\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n min-height: 40px;\n width: 100%;\n`\n\nconst Line = styled.div.withConfig({\n shouldForwardProp: prop => !['variant', 'color', 'thickness'].includes(prop),\n})<{\n variant: Props['variant']\n color?: ResponsiveValue<Color> | null\n thickness: Props['thickness']\n}>`\n ${p =>\n cssMediaRules(\n [p.variant, p.thickness, p.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 css`\n border-bottom-width: ${thickness == null\n ? '1px'\n : `${thickness.value}${thickness.unit}`};\n border-bottom-style: ${variant};\n border-bottom-color: ${colorToString(color)};\n `\n\n case 'blended':\n return css`\n height: ${`${thickness.value}${thickness.unit}`};\n background: linear-gradient(\n ${[\n '90deg',\n colorToString({ swatch: color.swatch, alpha: 0 }),\n colorToString(color),\n colorToString({ swatch: color.swatch, alpha: 0 }),\n ].join(', ')}\n );\n `\n\n default:\n variant as never\n throw new Error(`Invalid variant ${variant}.`)\n }\n },\n )}\n`\n\nconst Divider = forwardRef(function Divider(\n { id, variant, thickness, color, width, margin }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n return (\n <IE11MinHeightContainer ref={ref} id={id} className={cx(width)} margin={margin}>\n <Container>\n {/* @ts-expect-error: HTMLDivElement `color` attribute conflicts with prop */}\n <Line variant={variant} thickness={thickness} color={color} />\n </Container>\n </IE11MinHeightContainer>\n )\n})\n\nexport default Divider\n"],"names":["IE11MinHeightContainer","styled","div","withConfig","shouldForwardProp","prop","includes","cssMargin","Container","Line","p","cssMediaRules","variant","thickness","color","value","unit","swatch","hue","saturation","lightness","alpha","css","colorToString","join","Error","Divider","forwardRef","id","width","margin","ref","cx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAMA,yBAAyBC,gBAAAA,WAAOC,IAAIC,WAAW;AAAA,EACnDC,mBAAmBC,CAAQ,SAAA,CAAC,CAAC,QAAD,EAAWC,SAASD,IAApB;AADuB,CAAtB;AAAA;AAAA;AAAA,IAK3BE,cAAY,UAAA;AAAA;AAGhB,MAAMC,YAAYP,gBAAOC,WAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAQzB,MAAMO,OAAOR,gBAAAA,WAAOC,IAAIC,WAAW;AAAA,EACjCC,mBAAmBC,UAAQ,CAAC,CAAC,WAAW,SAAS,WAArB,EAAkCC,SAASD,IAA3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CAFF;AAAA,EAAA,CAFJ;AAQD,CAZyB;;"}
1
+ {"version":3,"file":"Divider.cjs.js","sources":["../src/components/builtin/Divider/Divider.tsx"],"sourcesContent":["import { forwardRef, Ref } from 'react'\nimport styled, { css } from 'styled-components'\nimport { cx } from '@emotion/css'\n\nimport { cssMediaRules, cssMargin } from '../../utils/cssMediaRules'\nimport {\n ResponsiveValue,\n ElementIDValue,\n MarginValue,\n ResponsiveLengthValue,\n ResponsiveSelectValue,\n} from '../../../prop-controllers/descriptors'\nimport { colorToString } from '../../utils/colorToString'\nimport { ColorValue as Color } from '../../utils/types'\nimport { ResponsiveColor } from '../../../runtimes/react/controls'\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?: MarginValue\n}\n\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\nconst IE11MinHeightContainer = styled.div.withConfig({\n shouldForwardProp: prop => !['margin'].includes(prop),\n})<{ margin: Props['margin'] }>`\n display: flex;\n width: 100%;\n ${cssMargin()}\n`\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n min-height: 40px;\n width: 100%;\n`\n\nconst Line = styled.div.withConfig({\n shouldForwardProp: prop => !['variant', 'color', 'thickness'].includes(prop),\n})<{\n variant: Props['variant']\n color?: ResponsiveValue<Color> | null\n thickness: Props['thickness']\n}>`\n ${p =>\n cssMediaRules(\n [p.variant, p.thickness, p.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 css`\n border-bottom-width: ${thickness == null\n ? '1px'\n : `${thickness.value}${thickness.unit}`};\n border-bottom-style: ${variant};\n border-bottom-color: ${colorToString(color)};\n `\n\n case 'blended':\n return css`\n height: ${`${thickness.value}${thickness.unit}`};\n background: linear-gradient(\n ${[\n '90deg',\n colorToString({ swatch: color.swatch, alpha: 0 }),\n colorToString(color),\n colorToString({ swatch: color.swatch, alpha: 0 }),\n ].join(', ')}\n );\n `\n\n default:\n variant as never\n throw new Error(`Invalid variant ${variant}.`)\n }\n },\n )}\n`\n\nconst Divider = forwardRef(function Divider(\n { id, variant, thickness, color, width, margin }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n return (\n <IE11MinHeightContainer ref={ref} id={id} className={cx(width)} margin={margin}>\n <Container>\n {/* @ts-expect-error: HTMLDivElement `color` attribute conflicts with prop */}\n <Line variant={variant} thickness={thickness} color={color} />\n </Container>\n </IE11MinHeightContainer>\n )\n})\n\nexport default Divider\n"],"names":["IE11MinHeightContainer","styled","div","withConfig","shouldForwardProp","prop","includes","cssMargin","Container","Line","p","cssMediaRules","variant","thickness","color","value","unit","swatch","hue","saturation","lightness","alpha","css","colorToString","join","Error","Divider","forwardRef","id","width","margin","ref","cx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAMA,yBAAyBC,gBAAAA,WAAOC,IAAIC,WAAW;AAAA,EACnDC,mBAAmBC,CAAQ,SAAA,CAAC,CAAC,QAAD,EAAWC,SAASD,IAApB;AADuB,CAAtB;AAAA;AAAA;AAAA,IAK3BE,cAAY,UAAA;AAAA;AAGhB,MAAMC,YAAYP,gBAAOC,WAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAQzB,MAAMO,OAAOR,gBAAAA,WAAOC,IAAIC,WAAW;AAAA,EACjCC,mBAAmBC,UAAQ,CAAC,CAAC,WAAW,SAAS,WAArB,EAAkCC,SAASD,IAA3C;AADK,CAAtB;AAAA,IAOTK,CACAC,MAAAA,cAAAA,cACE,CAACD,EA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 import { forwardRef } from "react";
2
2
  import styled, { css } from "styled-components";
3
3
  import { cx } from "@emotion/css";
4
4
  import { b as cssMargin, c as cssMediaRules } from "./cssMediaRules.es.js";
5
- import { o as colorToString } from "./index.es.js";
5
+ import { p as colorToString } from "./index.es.js";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  import "use-sync-external-store/shim/with-selector";
8
8
  import "./react-page.es.js";
@@ -23,6 +23,7 @@ import "./graphql.es.js";
23
23
  import "./text-input.es.js";
24
24
  import "./shape.es.js";
25
25
  import "color";
26
+ import "scroll-into-view-if-needed";
26
27
  import "react-dom";
27
28
  import "html-react-parser";
28
29
  import "next/head";
@@ -1 +1 @@
1
- {"version":3,"file":"Divider.es.js","sources":["../src/components/builtin/Divider/Divider.tsx"],"sourcesContent":["import { forwardRef, Ref } from 'react'\nimport styled, { css } from 'styled-components'\nimport { cx } from '@emotion/css'\n\nimport { cssMediaRules, cssMargin } from '../../utils/cssMediaRules'\nimport {\n ResponsiveValue,\n ElementIDValue,\n MarginValue,\n ResponsiveLengthValue,\n ResponsiveSelectValue,\n} from '../../../prop-controllers/descriptors'\nimport { colorToString } from '../../utils/colorToString'\nimport { ColorValue as Color } from '../../utils/types'\nimport { ResponsiveColor } from '../../../runtimes/react/controls'\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?: MarginValue\n}\n\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\nconst IE11MinHeightContainer = styled.div.withConfig({\n shouldForwardProp: prop => !['margin'].includes(prop),\n})<{ margin: Props['margin'] }>`\n display: flex;\n width: 100%;\n ${cssMargin()}\n`\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n min-height: 40px;\n width: 100%;\n`\n\nconst Line = styled.div.withConfig({\n shouldForwardProp: prop => !['variant', 'color', 'thickness'].includes(prop),\n})<{\n variant: Props['variant']\n color?: ResponsiveValue<Color> | null\n thickness: Props['thickness']\n}>`\n ${p =>\n cssMediaRules(\n [p.variant, p.thickness, p.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 css`\n border-bottom-width: ${thickness == null\n ? '1px'\n : `${thickness.value}${thickness.unit}`};\n border-bottom-style: ${variant};\n border-bottom-color: ${colorToString(color)};\n `\n\n case 'blended':\n return css`\n height: ${`${thickness.value}${thickness.unit}`};\n background: linear-gradient(\n ${[\n '90deg',\n colorToString({ swatch: color.swatch, alpha: 0 }),\n colorToString(color),\n colorToString({ swatch: color.swatch, alpha: 0 }),\n ].join(', ')}\n );\n `\n\n default:\n variant as never\n throw new Error(`Invalid variant ${variant}.`)\n }\n },\n )}\n`\n\nconst Divider = forwardRef(function Divider(\n { id, variant, thickness, color, width, margin }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n return (\n <IE11MinHeightContainer ref={ref} id={id} className={cx(width)} margin={margin}>\n <Container>\n {/* @ts-expect-error: HTMLDivElement `color` attribute conflicts with prop */}\n <Line variant={variant} thickness={thickness} color={color} />\n </Container>\n </IE11MinHeightContainer>\n )\n})\n\nexport default Divider\n"],"names":["IE11MinHeightContainer","styled","div","withConfig","shouldForwardProp","prop","includes","cssMargin","Container","Line","p","cssMediaRules","variant","thickness","color","value","unit","swatch","hue","saturation","lightness","alpha","css","colorToString","join","Error","Divider","forwardRef","id","width","margin","ref","cx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAMA,yBAAyBC,OAAOC,IAAIC,WAAW;AAAA,EACnDC,mBAAmBC,CAAQ,SAAA,CAAC,CAAC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AAA,EAAOe;AAAAA,EAAOC;AAAAA,GACxCC,KACA;AACA,6BACG,wBAAD;AAAA,IAAwB;AAAA,IAAU;AAAA,IAAQ,WAAWC,GAAGH,KAAD;AAAA,IAAS;AAAA,IAAhE,8BACG,WAAD;AAAA,MAAA,8BAEG,MAAD;AAAA,QAAM;AAAA,QAAkB;AAAA,QAAsB;AAAA,MAAA,CAA9C;AAAA,IAAA,CAFF;AAAA,EAAA,CAFJ;AAQD,CAZyB;;"}
1
+ {"version":3,"file":"Divider.es.js","sources":["../src/components/builtin/Divider/Divider.tsx"],"sourcesContent":["import { forwardRef, Ref } from 'react'\nimport styled, { css } from 'styled-components'\nimport { cx } from '@emotion/css'\n\nimport { cssMediaRules, cssMargin } from '../../utils/cssMediaRules'\nimport {\n ResponsiveValue,\n ElementIDValue,\n MarginValue,\n ResponsiveLengthValue,\n ResponsiveSelectValue,\n} from '../../../prop-controllers/descriptors'\nimport { colorToString } from '../../utils/colorToString'\nimport { ColorValue as Color } from '../../utils/types'\nimport { ResponsiveColor } from '../../../runtimes/react/controls'\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?: MarginValue\n}\n\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\nconst IE11MinHeightContainer = styled.div.withConfig({\n shouldForwardProp: prop => !['margin'].includes(prop),\n})<{ margin: Props['margin'] }>`\n display: flex;\n width: 100%;\n ${cssMargin()}\n`\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n min-height: 40px;\n width: 100%;\n`\n\nconst Line = styled.div.withConfig({\n shouldForwardProp: prop => !['variant', 'color', 'thickness'].includes(prop),\n})<{\n variant: Props['variant']\n color?: ResponsiveValue<Color> | null\n thickness: Props['thickness']\n}>`\n ${p =>\n cssMediaRules(\n [p.variant, p.thickness, p.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 css`\n border-bottom-width: ${thickness == null\n ? '1px'\n : `${thickness.value}${thickness.unit}`};\n border-bottom-style: ${variant};\n border-bottom-color: ${colorToString(color)};\n `\n\n case 'blended':\n return css`\n height: ${`${thickness.value}${thickness.unit}`};\n background: linear-gradient(\n ${[\n '90deg',\n colorToString({ swatch: color.swatch, alpha: 0 }),\n colorToString(color),\n colorToString({ swatch: color.swatch, alpha: 0 }),\n ].join(', ')}\n );\n `\n\n default:\n variant as never\n throw new Error(`Invalid variant ${variant}.`)\n }\n },\n )}\n`\n\nconst Divider = forwardRef(function Divider(\n { id, variant, thickness, color, width, margin }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n return (\n <IE11MinHeightContainer ref={ref} id={id} className={cx(width)} margin={margin}>\n <Container>\n {/* @ts-expect-error: HTMLDivElement `color` attribute conflicts with prop */}\n <Line variant={variant} thickness={thickness} color={color} />\n </Container>\n </IE11MinHeightContainer>\n )\n})\n\nexport default Divider\n"],"names":["IE11MinHeightContainer","styled","div","withConfig","shouldForwardProp","prop","includes","cssMargin","Container","Line","p","cssMediaRules","variant","thickness","color","value","unit","swatch","hue","saturation","lightness","alpha","css","colorToString","join","Error","Divider","forwardRef","id","width","margin","ref","cx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAMA,yBAAyBC,OAAOC,IAAIC,WAAW;AAAA,EACnDC,mBAAmBC,CAAQ,SAAA,CAAC,CAAC,QAAD,EAAWC,SAASD,IAApB;AADuB,CAAtB;AAAA;AAAA;AAAA,IAK3BE,UAAY;AAAA;AAGhB,MAAMC,YAAYP,OAAOC;AAAAA;AAAA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AD;AAAA,IAAS;AAAA,IAAhE,8BACG,WAAD;AAAA,MAAA,8BAEG,MAAD;AAAA,QAAM;AAAA,QAAkB;AAAA,QAAsB;AAAA,MAAA,CAA9C;AAAA,IAAA,CAFF;AAAA,EAAA,CAFJ;AAQD,CAZyB;;"}
package/dist/Embed.cjs.js CHANGED
@@ -25,6 +25,7 @@ require("./graphql.cjs.js");
25
25
  require("./text-input.cjs.js");
26
26
  require("./shape.cjs.js");
27
27
  require("color");
28
+ require("scroll-into-view-if-needed");
28
29
  require("react-dom");
29
30
  require("html-react-parser");
30
31
  require("next/head");
@@ -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'\nimport styled from 'styled-components'\nimport { cx } from '@emotion/css'\n\nimport { cssMargin } from '../../utils/cssMediaRules'\nimport { ElementIDValue, MarginValue, TextAreaValue } from '../../../prop-controllers/descriptors'\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect'\n\ntype Props = {\n id?: ElementIDValue\n html?: TextAreaValue\n width?: string\n margin?: MarginValue\n}\n\nconst Container = styled.div.withConfig({\n shouldForwardProp: prop => !['margin'].includes(prop),\n})<{ margin: Props['margin'] }>`\n min-height: 15px;\n ${cssMargin()}\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 if (shouldRender === false) return null\n\n return (\n <Container\n ref={setContainer}\n id={id}\n className={cx(width)}\n margin={margin}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n )\n})\n\nexport default Embed\n"],"names":["Container","styled","div","withConfig","shouldForwardProp","prop","includes","cssMargin","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","cx","__html"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAMA,YAAYC,gBAAAA,WAAOC,IAAIC,WAAW;AAAA,EACtCC,mBAAmBC,CAAQ,SAAA,CAAC,CAAC,QAAD,EAAWC,SAASD,IAApB;AADU,CAAtB;AAAA;AAAA,IAIdE,cAAY,UAAA;AAAA;AAGhB,MAAMC,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,OAAAA,0BAA0B,MAAM;AAC9BD,oBAAgB,IAAD;AAAA,EADQ,GAEtB,CAFsB,CAAA;AAIzBE,QAAAA,oBAAoBP,KAAK,MAAMC,WAAW,CAACA,SAAD,CAAvB;AA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AQjD;AAAAA,IAAV;AAAA,EAAA,CAN7B;AASD,CA1EuB;;"}
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'\nimport styled from 'styled-components'\nimport { cx } from '@emotion/css'\n\nimport { cssMargin } from '../../utils/cssMediaRules'\nimport { ElementIDValue, MarginValue, TextAreaValue } from '../../../prop-controllers/descriptors'\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect'\n\ntype Props = {\n id?: ElementIDValue\n html?: TextAreaValue\n width?: string\n margin?: MarginValue\n}\n\nconst Container = styled.div.withConfig({\n shouldForwardProp: prop => !['margin'].includes(prop),\n})<{ margin: Props['margin'] }>`\n min-height: 15px;\n ${cssMargin()}\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 if (shouldRender === false) return null\n\n return (\n <Container\n ref={setContainer}\n id={id}\n className={cx(width)}\n margin={margin}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n )\n})\n\nexport default Embed\n"],"names":["Container","styled","div","withConfig","shouldForwardProp","prop","includes","cssMargin","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","cx","__html"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAMA,YAAYC,gBAAAA,WAAOC,IAAIC,WAAW;AAAA,EACtCC,mBAAmBC,CAAQ,SAAA,CAAC,CAAC,QAAD,EAAWC,SAASD,IAApB;AADU,CAAtB;AAAA;AAAA,IAIdE,cAAY,UAAA;AAAA;AAGhB,MAAMC,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,OAAAA,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;AAkDT,MAAIK,iBAAiB;AAAc,WAAA;AAEnC,wCACG,WAAD;AAAA,IACE,KAAKF;AAAAA,IACL;AAAA,IACA,WAAW6C,OAAGlD,KAAD;AAAA,IACb;AAAA,IACA,yBAAyB;AAAA,MAAEmD,QAAQjD;AAAAA,IAAV;AAAA,EAAA,CAN7B;AASD,CA1EuB;;"}
package/dist/Embed.es.js CHANGED
@@ -2,7 +2,7 @@ import { forwardRef, useState, useImperativeHandle, useEffect } from "react";
2
2
  import styled from "styled-components";
3
3
  import { cx } from "@emotion/css";
4
4
  import { b as cssMargin } from "./cssMediaRules.es.js";
5
- import { p as useIsomorphicLayoutEffect } from "./index.es.js";
5
+ import { q as useIsomorphicLayoutEffect } from "./index.es.js";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  import "use-sync-external-store/shim/with-selector";
8
8
  import "./react-page.es.js";
@@ -23,6 +23,7 @@ import "./graphql.es.js";
23
23
  import "./text-input.es.js";
24
24
  import "./shape.es.js";
25
25
  import "color";
26
+ import "scroll-into-view-if-needed";
26
27
  import "react-dom";
27
28
  import "html-react-parser";
28
29
  import "next/head";
@@ -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'\nimport styled from 'styled-components'\nimport { cx } from '@emotion/css'\n\nimport { cssMargin } from '../../utils/cssMediaRules'\nimport { ElementIDValue, MarginValue, TextAreaValue } from '../../../prop-controllers/descriptors'\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect'\n\ntype Props = {\n id?: ElementIDValue\n html?: TextAreaValue\n width?: string\n margin?: MarginValue\n}\n\nconst Container = styled.div.withConfig({\n shouldForwardProp: prop => !['margin'].includes(prop),\n})<{ margin: Props['margin'] }>`\n min-height: 15px;\n ${cssMargin()}\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 if (shouldRender === false) return null\n\n return (\n <Container\n ref={setContainer}\n id={id}\n className={cx(width)}\n margin={margin}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n )\n})\n\nexport default Embed\n"],"names":["Container","styled","div","withConfig","shouldForwardProp","prop","includes","cssMargin","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","cx","__html"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAMA,YAAYC,OAAOC,IAAIC,WAAW;AAAA,EACtCC,mBAAmBC,CAAQ,SAAA,CAAC,CAAC,QAAD,EAAWC,SAASD,IAApB;AADU,CAAtB;AAAA;AAAA,IAIdE,UAAY;AAAA;AAGhB,MAAMC,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;AAkDT,MAAIK,iBAAiB;AAAc,WAAA;AAEnC,6BACG,WAAD;AAAA,IACE,KAAKF;AAAAA,IACL;AAAA,IACA,WAAW6C,GAAGlD,KAAD;AAAA,IACb;AAAA,IACA,yBAAyB;AAAA,MAAEmD,QAAQjD;AAAAA,IAAV;AAAA,EAAA,CAN7B;AASD,CA1EuB;;"}
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'\nimport styled from 'styled-components'\nimport { cx } from '@emotion/css'\n\nimport { cssMargin } from '../../utils/cssMediaRules'\nimport { ElementIDValue, MarginValue, TextAreaValue } from '../../../prop-controllers/descriptors'\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect'\n\ntype Props = {\n id?: ElementIDValue\n html?: TextAreaValue\n width?: string\n margin?: MarginValue\n}\n\nconst Container = styled.div.withConfig({\n shouldForwardProp: prop => !['margin'].includes(prop),\n})<{ margin: Props['margin'] }>`\n min-height: 15px;\n ${cssMargin()}\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 if (shouldRender === false) return null\n\n return (\n <Container\n ref={setContainer}\n id={id}\n className={cx(width)}\n margin={margin}\n dangerouslySetInnerHTML={{ __html: html }}\n />\n )\n})\n\nexport default Embed\n"],"names":["Container","styled","div","withConfig","shouldForwardProp","prop","includes","cssMargin","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","cx","__html"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAMA,YAAYC,OAAOC,IAAIC,WAAW;AAAA,EACtCC,mBAAmBC,CA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C;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;AAkDT,MAAIK,iBAAiB;AAAc,WAAA;AAEnC,6BACG,WAAD;AAAA,IACE,KAAKF;AAAAA,IACL;AAAA,IACA,WAAW6C,GAAGlD,KAAD;AAAA,IACb;AAAA,IACA,yBAAyB;AAAA,MAAEmD,QAAQjD;AAAAA,IAAV;AAAA,EAAA,CAN7B;AASD,CA1EuB;;"}
package/dist/Form.cjs.js CHANGED
@@ -60,12 +60,12 @@ require("@apollo/client/link/batch-http");
60
60
  require("./graphql.cjs.js");
61
61
  require("./text-input.cjs.js");
62
62
  require("./shape.cjs.js");
63
+ require("scroll-into-view-if-needed");
63
64
  require("react-dom");
64
65
  require("html-react-parser");
65
66
  require("next/head");
66
67
  require("uuid/v4");
67
68
  require("corporate-ipsum");
68
- require("scroll-into-view-if-needed");
69
69
  require("next/link");
70
70
  require("css-box-model");
71
71
  function _interopDefaultLegacy(e) {
package/dist/Form.es.js CHANGED
@@ -35,7 +35,7 @@ import styled, { css, keyframes } from "styled-components";
35
35
  import { Field as Field$1, getIn, Formik } from "formik";
36
36
  import { cx } from "@emotion/css";
37
37
  import { c as cssMediaRules, b as cssMargin, i as cssTextStyle, h as cssGridItem } from "./cssMediaRules.es.js";
38
- import { q as Shapes, s as Sizes, C as Contrasts, o as colorToString, t as useFormContext, u as useIsInBuilder, v as useQuery, T as TABLE_BY_ID, w as useMutation, x as Provider, A as Alignments } from "./index.es.js";
38
+ import { s as Shapes, t as Sizes, C as Contrasts, p as colorToString, v as useFormContext, u as useIsInBuilder, w as useQuery, T as TABLE_BY_ID, x as useMutation, y as Provider, A as Alignments } from "./index.es.js";
39
39
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
40
40
  import ColorHelper from "color";
41
41
  import Button$1 from "./Button.es.js";
@@ -59,12 +59,12 @@ import "@apollo/client/link/batch-http";
59
59
  import "./graphql.es.js";
60
60
  import "./text-input.es.js";
61
61
  import "./shape.es.js";
62
+ import "scroll-into-view-if-needed";
62
63
  import "react-dom";
63
64
  import "html-react-parser";
64
65
  import "next/head";
65
66
  import "uuid/v4";
66
67
  import "corporate-ipsum";
67
- import "scroll-into-view-if-needed";
68
68
  import "next/link";
69
69
  import "css-box-model";
70
70
  var _path;
@@ -29,12 +29,12 @@ require("./graphql.cjs.js");
29
29
  require("./text-input.cjs.js");
30
30
  require("./shape.cjs.js");
31
31
  require("color");
32
+ require("scroll-into-view-if-needed");
32
33
  require("react-dom");
33
34
  require("html-react-parser");
34
35
  require("next/head");
35
36
  require("uuid/v4");
36
37
  require("corporate-ipsum");
37
- require("scroll-into-view-if-needed");
38
38
  require("next/link");
39
39
  function _interopDefaultLegacy(e) {
40
40
  return e && typeof e === "object" && "default" in e ? e : { "default": e };
package/dist/Image.es2.js CHANGED
@@ -3,7 +3,7 @@ import { forwardRef, useState, useEffect } from "react";
3
3
  import NextImage from "next/image";
4
4
  import { css, cx } from "@emotion/css";
5
5
  import { b as cssMargin, d as cssPadding, e as cssBorder, f as cssBorderRadius, g as cssBoxShadow, c as cssMediaRules } from "./cssMediaRules.es.js";
6
- import { l as useFile, j as useBorder, u as useIsInBuilder, r as responsiveWidth, y as DEVICES, z as findDeviceOverride } from "./index.es.js";
6
+ import { l as useFile, j as useBorder, u as useIsInBuilder, r as responsiveWidth, z as DEVICES, B as findDeviceOverride } from "./index.es.js";
7
7
  import { u as useBoxShadow } from "./useBoxShadow.es.js";
8
8
  import { p as placeholders } from "./placeholders.es.js";
9
9
  import { L as Link } from "./index.es3.js";
@@ -27,12 +27,12 @@ import "./graphql.es.js";
27
27
  import "./text-input.es.js";
28
28
  import "./shape.es.js";
29
29
  import "color";
30
+ import "scroll-into-view-if-needed";
30
31
  import "react-dom";
31
32
  import "html-react-parser";
32
33
  import "next/head";
33
34
  import "uuid/v4";
34
35
  import "corporate-ipsum";
35
- import "scroll-into-view-if-needed";
36
36
  import "next/link";
37
37
  function loadImage(src) {
38
38
  return new Promise((resolve, reject) => {
@@ -63,12 +63,12 @@ require("./graphql.cjs.js");
63
63
  require("./text-input.cjs.js");
64
64
  require("./shape.cjs.js");
65
65
  require("color");
66
+ require("scroll-into-view-if-needed");
66
67
  require("react-dom");
67
68
  require("html-react-parser");
68
69
  require("next/head");
69
70
  require("uuid/v4");
70
71
  require("corporate-ipsum");
71
- require("scroll-into-view-if-needed");
72
72
  require("next/link");
73
73
  function _interopDefaultLegacy(e) {
74
74
  return e && typeof e === "object" && "default" in e ? e : { "default": e };
@@ -38,7 +38,7 @@ import ImageComponent from "./Image.es2.js";
38
38
  import Button from "./Button.es.js";
39
39
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
40
40
  import { i as cssTextStyle, c as cssMediaRules, b as cssMargin } from "./cssMediaRules.es.js";
41
- import { p as useIsomorphicLayoutEffect, k as useResponsiveColor, o as colorToString } from "./index.es.js";
41
+ import { q as useIsomorphicLayoutEffect, k as useResponsiveColor, p as colorToString } from "./index.es.js";
42
42
  import { L as Link } from "./index.es3.js";
43
43
  import "next/image";
44
44
  import "./useBoxShadow.es.js";
@@ -62,12 +62,12 @@ import "./graphql.es.js";
62
62
  import "./text-input.es.js";
63
63
  import "./shape.es.js";
64
64
  import "color";
65
+ import "scroll-into-view-if-needed";
65
66
  import "react-dom";
66
67
  import "html-react-parser";
67
68
  import "next/head";
68
69
  import "uuid/v4";
69
70
  import "corporate-ipsum";
70
- import "scroll-into-view-if-needed";
71
71
  import "next/link";
72
72
  var _path$5;
73
73
  function _extends$5() {
package/dist/Root.cjs.js CHANGED
@@ -46,6 +46,7 @@ require("./graphql.cjs.js");
46
46
  require("./text-input.cjs.js");
47
47
  require("./shape.cjs.js");
48
48
  require("color");
49
+ require("scroll-into-view-if-needed");
49
50
  require("react-dom");
50
51
  require("html-react-parser");
51
52
  require("next/head");
@@ -1 +1 @@
1
- {"version":3,"file":"Root.cjs.js","sources":["../src/components/builtin/Root/components/Placeholder/index.tsx","../src/components/builtin/Root/Root.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport styled from 'styled-components'\n\nconst PlaceholderBase = styled.div`\n width: 100%;\n background: rgba(161, 168, 194, 0.18);\n height: 80px;\n padding: 8px;\n`\n\ntype Props = Record<string, never>\n\nexport default forwardRef<HTMLDivElement, Props>(function Placeholder(props: Props, ref) {\n return (\n <PlaceholderBase {...props} ref={ref}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"100%\"\n height=\"100%\"\n style={{ overflow: 'visible' }}\n >\n <rect\n x={0}\n y={0}\n width=\"100%\"\n height=\"100%\"\n strokeWidth={2}\n strokeDasharray=\"4 2\"\n fill=\"none\"\n stroke=\"rgba(161, 168, 194, 0.40)\"\n rx=\"4\"\n ry=\"4\"\n />\n </svg>\n </PlaceholderBase>\n )\n})\n","import styled, { createGlobalStyle } from 'styled-components'\nimport { normalize } from 'polished'\nimport { forwardRef, Ref } from 'react'\n\nimport Placeholder from './components/Placeholder'\nimport {\n GridValue,\n BackgroundsValue,\n GapXValue,\n GapYValue,\n} from '../../../prop-controllers/descriptors'\nimport { Element } from '../../../runtimes/react'\nimport { cssGridItem } from '../../utils/cssMediaRules'\nimport BackgroundsContainer from '../../shared/BackgroundsContainer'\nimport { Props } from '../../../prop-controllers'\n\nconst Normalize = createGlobalStyle`\n html {\n box-sizing: border-box;\n }\n\n *, *::before, *::after {\n box-sizing: inherit;\n }\n\n ${normalize()}\n`\n\nconst Grid = styled.div`\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n`\n\nconst GridItem = styled.div.withConfig({\n shouldForwardProp: prop => !['grid', 'index', 'rowGap', 'columnGap'].includes(prop.toString()),\n})`\n display: flex;\n align-items: flex-start;\n ${cssGridItem()}\n`\n\ntype Props = {\n children?: GridValue\n backgrounds?: BackgroundsValue\n rowGap?: GapYValue\n columnGap?: GapXValue\n}\n\nconst Root = forwardRef(function Page(\n { children, backgrounds, rowGap, columnGap }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n return (\n <>\n <Normalize />\n <BackgroundsContainer ref={ref} style={{ background: 'white' }} backgrounds={backgrounds}>\n <Grid>\n {children && children.elements.length > 0 ? (\n children.elements.map((child, index) => (\n <GridItem\n key={child.key}\n grid={children.columns}\n index={index}\n columnGap={columnGap}\n rowGap={rowGap}\n >\n <Element element={child} />\n </GridItem>\n ))\n ) : (\n <Placeholder />\n )}\n </Grid>\n </BackgroundsContainer>\n </>\n )\n})\n\nexport default Root\n"],"names":["PlaceholderBase","styled","div","forwardRef","props","ref","overflow","Normalize","createGlobalStyle","normalize","Grid","GridItem","withConfig","shouldForwardProp","prop","includes","toString","cssGridItem","Root","children","backgrounds","rowGap","columnGap","_Fragment","_jsx","BackgroundsContainer","background","elements","length","map","child","index","columns","Element","key"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAMA,kBAAkBC,gBAAOC,WAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAS/B,IAAeC,cAAAA,MAAAA,WAAkC,sBAAqBC,OAAcC,KAAK;AAErF,wCAAC,iBAAD,iCAAqBD,QAArB;AAAA,IAA4B;AAAA,IAC1B,yCAAA,OAAA;AAAA,MACE,OAAM;AAAA,MACN,OAAM;AAAA,MACN,QAAO;AAAA,MACP,OAAO;AAAA,QAAEE,UAAU;AAAA,MAJrB;AAAA,MAME,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CADF,IAYCV,2BAAAA,IAAA,aAAD,CAAA,CAAA;AAAA,MAAA,CAdJ;AAAA,IAAA,CAHJ,CAAA;AAAA,EAAA,CADF;AAwBD,CA5BsB;;"}
1
+ {"version":3,"file":"Root.cjs.js","sources":["../src/components/builtin/Root/components/Placeholder/index.tsx","../src/components/builtin/Root/Root.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport styled from 'styled-components'\n\nconst PlaceholderBase = styled.div`\n width: 100%;\n background: rgba(161, 168, 194, 0.18);\n height: 80px;\n padding: 8px;\n`\n\ntype Props = Record<string, never>\n\nexport default forwardRef<HTMLDivElement, Props>(function Placeholder(props: Props, ref) {\n return (\n <PlaceholderBase {...props} ref={ref}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"100%\"\n height=\"100%\"\n style={{ overflow: 'visible' }}\n >\n <rect\n x={0}\n y={0}\n width=\"100%\"\n height=\"100%\"\n strokeWidth={2}\n strokeDasharray=\"4 2\"\n fill=\"none\"\n stroke=\"rgba(161, 168, 194, 0.40)\"\n rx=\"4\"\n ry=\"4\"\n />\n </svg>\n </PlaceholderBase>\n )\n})\n","import styled, { createGlobalStyle } from 'styled-components'\nimport { normalize } from 'polished'\nimport { forwardRef, Ref } from 'react'\n\nimport Placeholder from './components/Placeholder'\nimport {\n GridValue,\n BackgroundsValue,\n GapXValue,\n GapYValue,\n} from '../../../prop-controllers/descriptors'\nimport { Element } from '../../../runtimes/react'\nimport { cssGridItem } from '../../utils/cssMediaRules'\nimport BackgroundsContainer from '../../shared/BackgroundsContainer'\nimport { Props } from '../../../prop-controllers'\n\nconst Normalize = createGlobalStyle`\n html {\n box-sizing: border-box;\n }\n\n *, *::before, *::after {\n box-sizing: inherit;\n }\n\n ${normalize()}\n`\n\nconst Grid = styled.div`\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n`\n\nconst GridItem = styled.div.withConfig({\n shouldForwardProp: prop => !['grid', 'index', 'rowGap', 'columnGap'].includes(prop.toString()),\n})`\n display: flex;\n align-items: flex-start;\n ${cssGridItem()}\n`\n\ntype Props = {\n children?: GridValue\n backgrounds?: BackgroundsValue\n rowGap?: GapYValue\n columnGap?: GapXValue\n}\n\nconst Root = forwardRef(function Page(\n { children, backgrounds, rowGap, columnGap }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n return (\n <>\n <Normalize />\n <BackgroundsContainer ref={ref} style={{ background: 'white' }} backgrounds={backgrounds}>\n <Grid>\n {children && children.elements.length > 0 ? (\n children.elements.map((child, index) => (\n <GridItem\n key={child.key}\n grid={children.columns}\n index={index}\n columnGap={columnGap}\n rowGap={rowGap}\n >\n <Element element={child} />\n </GridItem>\n ))\n ) : (\n <Placeholder />\n )}\n </Grid>\n </BackgroundsContainer>\n </>\n )\n})\n\nexport default Root\n"],"names":["PlaceholderBase","styled","div","forwardRef","props","ref","overflow","Normalize","createGlobalStyle","normalize","Grid","GridItem","withConfig","shouldForwardProp","prop","includes","toString","cssGridItem","Root","children","backgrounds","rowGap","columnGap","_Fragment","_jsx","BackgroundsContainer","background","elements","length","map","child","index","columns","Element","key"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAMA,kBAAkBC,gBAAOC,WAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAS/B,IAAeC,cAAAA,MAAAA,WAAkC,sBAAqBC,OAAcC,KAAK;AAErF,wCAAC,iBAAD,iCAAqBD,QAArB;AAAA,IAA4B;AAAA,IAC1B,yCAAA,OAAA;AAAA,MACE,OAAM;AAAA,MACN,OAAM;AAAA,MACN,QAAO;AAAA,MACP,OAAO;AAAA,QAAEE,UAAU;AAAA,MAJrB;AAAA,MAME,yCAAA,QAAA;AAAA,QACE,GAAG;AAAA,QACH,GAAG;AAAA,QACH,OAAM;AAAA,QACN,QAAO;AAAA,QACP,aAAa;AAAA,QACb,iBAAgB;AAAA,QAChB,MAAK;AAAA,QACL,QAAO;AAAA,Q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,7 @@ import "./graphql.es.js";
44
44
  import "./text-input.es.js";
45
45
  import "./shape.es.js";
46
46
  import "color";
47
+ import "scroll-into-view-if-needed";
47
48
  import "react-dom";
48
49
  import "html-react-parser";
49
50
  import "next/head";
@@ -1 +1 @@
1
- {"version":3,"file":"Root.es.js","sources":["../src/components/builtin/Root/components/Placeholder/index.tsx","../src/components/builtin/Root/Root.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport styled from 'styled-components'\n\nconst PlaceholderBase = styled.div`\n width: 100%;\n background: rgba(161, 168, 194, 0.18);\n height: 80px;\n padding: 8px;\n`\n\ntype Props = Record<string, never>\n\nexport default forwardRef<HTMLDivElement, Props>(function Placeholder(props: Props, ref) {\n return (\n <PlaceholderBase {...props} ref={ref}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"100%\"\n height=\"100%\"\n style={{ overflow: 'visible' }}\n >\n <rect\n x={0}\n y={0}\n width=\"100%\"\n height=\"100%\"\n strokeWidth={2}\n strokeDasharray=\"4 2\"\n fill=\"none\"\n stroke=\"rgba(161, 168, 194, 0.40)\"\n rx=\"4\"\n ry=\"4\"\n />\n </svg>\n </PlaceholderBase>\n )\n})\n","import styled, { createGlobalStyle } from 'styled-components'\nimport { normalize } from 'polished'\nimport { forwardRef, Ref } from 'react'\n\nimport Placeholder from './components/Placeholder'\nimport {\n GridValue,\n BackgroundsValue,\n GapXValue,\n GapYValue,\n} from '../../../prop-controllers/descriptors'\nimport { Element } from '../../../runtimes/react'\nimport { cssGridItem } from '../../utils/cssMediaRules'\nimport BackgroundsContainer from '../../shared/BackgroundsContainer'\nimport { Props } from '../../../prop-controllers'\n\nconst Normalize = createGlobalStyle`\n html {\n box-sizing: border-box;\n }\n\n *, *::before, *::after {\n box-sizing: inherit;\n }\n\n ${normalize()}\n`\n\nconst Grid = styled.div`\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n`\n\nconst GridItem = styled.div.withConfig({\n shouldForwardProp: prop => !['grid', 'index', 'rowGap', 'columnGap'].includes(prop.toString()),\n})`\n display: flex;\n align-items: flex-start;\n ${cssGridItem()}\n`\n\ntype Props = {\n children?: GridValue\n backgrounds?: BackgroundsValue\n rowGap?: GapYValue\n columnGap?: GapXValue\n}\n\nconst Root = forwardRef(function Page(\n { children, backgrounds, rowGap, columnGap }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n return (\n <>\n <Normalize />\n <BackgroundsContainer ref={ref} style={{ background: 'white' }} backgrounds={backgrounds}>\n <Grid>\n {children && children.elements.length > 0 ? (\n children.elements.map((child, index) => (\n <GridItem\n key={child.key}\n grid={children.columns}\n index={index}\n columnGap={columnGap}\n rowGap={rowGap}\n >\n <Element element={child} />\n </GridItem>\n ))\n ) : (\n <Placeholder />\n )}\n </Grid>\n </BackgroundsContainer>\n </>\n )\n})\n\nexport default Root\n"],"names":["PlaceholderBase","styled","div","forwardRef","props","ref","overflow","Normalize","createGlobalStyle","normalize","Grid","GridItem","withConfig","shouldForwardProp","prop","includes","toString","cssGridItem","Root","children","backgrounds","rowGap","columnGap","_Fragment","_jsx","background","elements","length","map","child","index","columns","key"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAMA,kBAAkBC,OAAOC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAS/B,IAAeC,cAAAA,WAAkC,sBAAqBC,OAAcC,KAAK;AAErF,6BAAC,iBAAD,iCAAqBD,QAArB;AAAA,IAA4B;AAAA,IAC1B,8BAAA,OAAA;AAAA,MACE,OAAM;AAAA,MACN,OAAM;AAAA,MACN,QAAO;AAAA,MACP,OAAO;AAAA,QAAEE,UAAU;AAAA,MAJrB;AAAA,MAME,8BAAA,QAAA;AAAA,QACE,GAAG;AAAA,QACH,GAAG;AAAA,QACH,OAAM;AAAA,QACN,QAAO;AAAA,QACP,aAAa;AAAA,QACb,iBAAgB;AAAA,QAChB,MAAK;AAAA,QACL,QAAO;AAAA,QACP,IAAG;AAAA,QACH,IAAG;AAAA,MAAA,CAVL;AAAA,IAAA,CANF;AAAA,EAAA,EAFJ;AAuBD,CAxBwB;ACIzB,MAAMC,YAAYC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,IASdC,UAAY;AAAA;AAGhB,MAAMC,OAAOT,OAAOC;AAAAA;AAAAA;AAAAA;AAAAA;AAMpB,MAAMS,WAAWV,OAAOC,IAAIU,WAAW;AAAA,EACrCC,mBAAmBC,CAAAA,SAAQ,CAAC,CAAC,QAAQ,SAAS,UAAU,WAA5B,EAAyCC,SAASD,KAAKE,SAAAA,CAAvD;AADS,CAAtB;AAAA;AAAA;AAAA,IAKbC,YAAc;AAAA;AAUZC,MAAAA,OAAOf,WAAW,cACtB;AAAA,EAAEgB;AAAAA,EAAUC;AAAAA,EAAaC;AAAAA,EAAQC;AAAAA,GACjCjB,KACA;AAEE,8BAAAkB,UAAA;AAAA,IAAA,UAAA,CACGC,oBAAA,WADH,CAAA,CAAA,uBAEG,sBAAD;AAAA,MAAsB;AAAA,MAAU,OAAO;AAAA,QAAEC,YAAY;AAAA,MAArD;AAAA,MAAgE;AAAA,MAAhE,8BACG,MAAD;AAAA,QACGN,UAAAA,YAAYA,SAASO,SAASC,SAAS,IACtCR,SAASO,SAASE,IAAI,CAACC,OAAOC,8BAC3B,UAAD;AAAA,UAEE,MAAMX,SAASY;AAAAA,UACf;AAAA,UACA;AAAA,UACA;AAAA,UALF,8BAOG,SAAD;AAAA,YAAS,SAASF;AAAAA,UAAAA,CAAlB;AAAA,QAAA,GANKA,MAAMG,GADb,CADF,IAYCR,oBAAA,aAAD,CAAA,CAAA;AAAA,MAAA,CAdJ;AAAA,IAAA,CAHJ,CAAA;AAAA,EAAA,CADF;AAwBD,CA5BsB;;"}
1
+ {"version":3,"file":"Root.es.js","sources":["../src/components/builtin/Root/components/Placeholder/index.tsx","../src/components/builtin/Root/Root.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport styled from 'styled-components'\n\nconst PlaceholderBase = styled.div`\n width: 100%;\n background: rgba(161, 168, 194, 0.18);\n height: 80px;\n padding: 8px;\n`\n\ntype Props = Record<string, never>\n\nexport default forwardRef<HTMLDivElement, Props>(function Placeholder(props: Props, ref) {\n return (\n <PlaceholderBase {...props} ref={ref}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"100%\"\n height=\"100%\"\n style={{ overflow: 'visible' }}\n >\n <rect\n x={0}\n y={0}\n width=\"100%\"\n height=\"100%\"\n strokeWidth={2}\n strokeDasharray=\"4 2\"\n fill=\"none\"\n stroke=\"rgba(161, 168, 194, 0.40)\"\n rx=\"4\"\n ry=\"4\"\n />\n </svg>\n </PlaceholderBase>\n )\n})\n","import styled, { createGlobalStyle } from 'styled-components'\nimport { normalize } from 'polished'\nimport { forwardRef, Ref } from 'react'\n\nimport Placeholder from './components/Placeholder'\nimport {\n GridValue,\n BackgroundsValue,\n GapXValue,\n GapYValue,\n} from '../../../prop-controllers/descriptors'\nimport { Element } from '../../../runtimes/react'\nimport { cssGridItem } from '../../utils/cssMediaRules'\nimport BackgroundsContainer from '../../shared/BackgroundsContainer'\nimport { Props } from '../../../prop-controllers'\n\nconst Normalize = createGlobalStyle`\n html {\n box-sizing: border-box;\n }\n\n *, *::before, *::after {\n box-sizing: inherit;\n }\n\n ${normalize()}\n`\n\nconst Grid = styled.div`\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n`\n\nconst GridItem = styled.div.withConfig({\n shouldForwardProp: prop => !['grid', 'index', 'rowGap', 'columnGap'].includes(prop.toString()),\n})`\n display: flex;\n align-items: flex-start;\n ${cssGridItem()}\n`\n\ntype Props = {\n children?: GridValue\n backgrounds?: BackgroundsValue\n rowGap?: GapYValue\n columnGap?: GapXValue\n}\n\nconst Root = forwardRef(function Page(\n { children, backgrounds, rowGap, columnGap }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n return (\n <>\n <Normalize />\n <BackgroundsContainer ref={ref} style={{ background: 'white' }} backgrounds={backgrounds}>\n <Grid>\n {children && children.elements.length > 0 ? (\n children.elements.map((child, index) => (\n <GridItem\n key={child.key}\n grid={children.columns}\n index={index}\n columnGap={columnGap}\n rowGap={rowGap}\n >\n <Element element={child} />\n </GridItem>\n ))\n ) : (\n <Placeholder />\n )}\n </Grid>\n </BackgroundsContainer>\n </>\n )\n})\n\nexport default Root\n"],"names":["PlaceholderBase","styled","div","forwardRef","props","ref","overflow","Normalize","createGlobalStyle","normalize","Grid","GridItem","withConfig","shouldForwardProp","prop","includes","toString","cssGridItem","Root","children","backgrounds","rowGap","columnGap","_Fragment","_jsx","background","elements","length","map","child","index","columns","key"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAMA,kBAAkBC,OAAOC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAS/B,IAAeC,cAAAA,WAAkC,sBAAqBC,OAAcC,KAAK;AAErF,6BAAC,iBAAD,iCAAqBD,QAArB;AAAA,IAA4B;AAAA,IAC1B,8BAAA,OAAA;AAAA,MACE,OAAM;AAAA,MACN,OAAM;AAAA,MACN,QAAO;AAAA,MACP,OAAO;AAAA,QAAEE,UAAU;AAAA,MAJrB;AAAA,MAME,8BAAA,QAAA;AAAA,QACE,GAAG;AAAA,QACH,GAAG;AAAA,QACH,OAAM;AAAA,QACN,QAAO;AAAA,QACP,aAAa;AAAA,QACb,iBAAgB;AAAA,QAChB,MAAK;AAAA,QACL,QAAO;AAAA,QACP,IAAG;AAAA,QACH,IAAG;AAAA,MAAA,CAVL;AAAA,IAAA,CANF;AAAA,EAAA,EAFJ;AAuBD,CAxBwB;ACIzB,MAAMC,YAAYC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,IASdC,UAAY;AAAA;AAGhB,MAAMC,OAAOT,OAAOC;AAAAA;AAAAA;AAAAA;AAAAA;AAMpB,MAAMS,WAAWV,OAAOC,IAAIU,WAAW;AAAA,EACrCC,mBAAmBC,CAAAA,SAAQ,CAAC,CAAC,QAAQ,SAAS,UAAU,WAA5B,EAAyCC,SAASD,KAAKE,SAAAA,CAAvD;AADS,CAAtB;AAAA;AAAA;AAAA,IAKbC,YAAc;AAAA;AAUZC,MAAAA,OAAOf,WAAW,cACtB;AAAA,EAAEgB;AAAAA,EAAUC;AAAAA,EAAaC;AAAAA,EAAQC;AAAAA,GACjCjB,KACA;AAEE,8BAAAkB,UAAA;AAAA,IAAA,UAAA,CACGC,oBAAA,WADH,CAAA,CAAA,uBAEG,sBAAD;AAAA,MAAsB;AAAA,MAAU,OAAO;AAAA,QAAEC,YAAY;AAAA,MAArD;AAAA,MAAgE;AAAA,MAAhE,8BACG,MAAD;AAAA,QACGN,UAAAA,YAAYA,SAASO,SAASC,SAAS,IACtCR,SAASO,SAASE,IAAI,CAACC,OAAOC,8BAC3B,UAAD;AAAA,UAEE,MAAMX,SAASY;AAAAA,UACf;AAAA,UACA;AAAA,UACA;AAAA,UALF,8BAOG,SAAD;AAAA,YAAS,SAASF;AAAAA,UAAAA,CAAlB;AAAA,QAAA,GANKA,MAAMG,GADb,CADF,IAYCR,oBAAA,aAAD,CAAA,CAAA;AAAA,MAAA,CAdJ;AAAA,IAAA,CAHJ,CAAA;AAAA,EAAA,CADF;AAwBD,CA5BsB;;"}
@@ -4,7 +4,7 @@ import styled, { css } from "styled-components";
4
4
  import { cx } from "@emotion/css";
5
5
  import { L as Link } from "./index.es3.js";
6
6
  import { b as cssMargin, c as cssMediaRules } from "./cssMediaRules.es.js";
7
- import { o as colorToString } from "./index.es.js";
7
+ import { p as colorToString } from "./index.es.js";
8
8
  import { jsx, Fragment } from "react/jsx-runtime";
9
9
  import { G as GutterContainer } from "./index.es4.js";
10
10
  import "scroll-into-view-if-needed";
package/dist/Text.cjs.js CHANGED
@@ -63,12 +63,12 @@ require("./graphql.cjs.js");
63
63
  require("./text-input.cjs.js");
64
64
  require("./shape.cjs.js");
65
65
  require("color");
66
+ require("scroll-into-view-if-needed");
66
67
  require("react-dom");
67
68
  require("html-react-parser");
68
69
  require("next/head");
69
70
  require("uuid/v4");
70
71
  require("corporate-ipsum");
71
- require("scroll-into-view-if-needed");
72
72
  require("next/link");
73
73
  function _interopDefaultLegacy(e) {
74
74
  return e && typeof e === "object" && "default" in e ? e : { "default": e };
package/dist/Text.es.js CHANGED
@@ -39,7 +39,7 @@ import { c as cssMediaRules, b as cssMargin } from "./cssMediaRules.es.js";
39
39
  import { g as getBox } from "./box-models.es.js";
40
40
  import { Editor } from "slate-react";
41
41
  import Lists from "@convertkit/slate-lists";
42
- import { v as useQuery, B as TYPOGRAPHIES_BY_ID, F as SWATCHES_BY_ID, z as findDeviceOverride, G as shallowMergeFallbacks, o as colorToString, u as useIsInBuilder } from "./index.es.js";
42
+ import { w as useQuery, F as TYPOGRAPHIES_BY_ID, G as SWATCHES_BY_ID, B as findDeviceOverride, H as shallowMergeFallbacks, p as colorToString, u as useIsInBuilder } from "./index.es.js";
43
43
  import { jsx } from "react/jsx-runtime";
44
44
  import { L as Link } from "./index.es3.js";
45
45
  import "css-box-model";
@@ -61,12 +61,12 @@ import "./graphql.es.js";
61
61
  import "./text-input.es.js";
62
62
  import "./shape.es.js";
63
63
  import "color";
64
+ import "scroll-into-view-if-needed";
64
65
  import "react-dom";
65
66
  import "html-react-parser";
66
67
  import "next/head";
67
68
  import "uuid/v4";
68
69
  import "corporate-ipsum";
69
- import "scroll-into-view-if-needed";
70
70
  import "next/link";
71
71
  function useTypography(typographyId) {
72
72
  const { error, data } = useQuery(TYPOGRAPHIES_BY_ID, {
package/dist/Video.cjs.js CHANGED
@@ -46,6 +46,7 @@ require("./graphql.cjs.js");
46
46
  require("./text-input.cjs.js");
47
47
  require("./shape.cjs.js");
48
48
  require("color");
49
+ require("scroll-into-view-if-needed");
49
50
  require("react-dom");
50
51
  require("html-react-parser");
51
52
  require("next/head");
@@ -1 +1 @@
1
- {"version":3,"file":"Video.cjs.js","sources":["../src/components/builtin/Video/Video.tsx"],"sourcesContent":["import { forwardRef, Ref } from 'react'\nimport styled from 'styled-components'\nimport ReactPlayer from 'react-player'\nimport { cx } from '@emotion/css'\n\nimport {\n BorderRadiusValue,\n ElementIDValue,\n MarginValue,\n VideoValue,\n} from '../../../prop-controllers/descriptors'\nimport { cssBorderRadius, cssMargin } from '../../utils/cssMediaRules'\nimport { placeholders } from '../../utils/placeholders'\n\ntype Props = {\n id?: ElementIDValue\n video?: VideoValue\n width?: string\n margin?: MarginValue\n borderRadius?: BorderRadiusValue\n}\n\nconst Container = styled.div.withConfig({\n shouldForwardProp: prop => !['margin', 'borderRadius'].includes(prop.toString()),\n})<{ margin: Props['margin']; borderRadius: Props['borderRadius'] }>`\n display: flex;\n flex-direction: column;\n overflow: hidden;\n ${cssMargin()}\n ${cssBorderRadius()}\n`\n\nconst ASPECT_RATIO = 16 / 9\n\nconst Video = forwardRef(function Video(\n { id, video, width, margin, borderRadius }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n const canPlayUrl = video && video.url != null && ReactPlayer.canPlay(video.url)\n\n return (\n <Container ref={ref} id={id} className={cx(width)} margin={margin} borderRadius={borderRadius}>\n <div style={{ position: 'relative', paddingTop: `${100 / ASPECT_RATIO}%` }}>\n <div style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}>\n {canPlayUrl === true ? (\n <ReactPlayer\n {...video}\n width=\"100%\"\n height=\"100%\"\n config={{\n vimeo: { playerOptions: { background: video != null && !video.controls } },\n wistia: {\n options: {\n endVideoBehavior: video != null && video.loop === true ? 'loop' : 'default',\n },\n },\n }}\n />\n ) : (\n <img width=\"100%\" src={placeholders.video.src} alt=\"Video Placeholder\" />\n )}\n </div>\n </div>\n </Container>\n )\n})\n\nexport default Video\n"],"names":["Container","styled","div","withConfig","shouldForwardProp","prop","includes","toString","cssMargin","cssBorderRadius","ASPECT_RATIO","Video","forwardRef","id","video","width","margin","borderRadius","ref","canPlayUrl","url","ReactPlayer","canPlay","cx","position","paddingTop","top","left","right","bottom","_jsx","vimeo","playerOptions","background","controls","wistia","options","endVideoBehavior","loop","placeholders","src"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAMA,YAAYC,gBAAAA,WAAOC,IAAIC,WAAW;AAAA,EACtCC,mBAAmBC,CAAQ,SAAA,CAAC,CAAC,UAAU,cAAX,EAA2BC,SAASD,KAAKE,UAAzC;AADU,CAAtB;AAAA;AAAA;AAAA;AAAA,IAMdC,cAAY,UAAA;AAAA,IACZC,cAAkB,gBAAA;AAAA;AAGtB,MAAMC,eAAe,KAAK;AAEpBC,MAAAA,QAAQC,MAAAA,WAAW,gBACvB;AAAA,EAAEC;AAAAA,EAAIC;AAAAA,EAAOC;AAAAA,EAAOC;AAAAA,EAAQC;AAAAA,GAC5BC,KACA;AACMC,QAAAA,aAAaL,SAASA,MAAMM,OAAO,QAAQC,qBAAAA,WAAYC,QAAQR,MAAMM,GAA1B;AAEjD,wCACG,WAAD;AAAA,IAAW;AAAA,IAAU;AAAA,IAAQ,WAAWG,OAAGR,KAAD;AAAA,IAAS;AAAA,IAAgB;AAAA,IACjE,yCAAA,OAAA;AAAA,MAAK,OAAO;AAAA,QAAES,UAAU;AAAA,QAAYC,YAAa,GAAE,MAAMf;AAAAA,MAAzD;AAAA,MACE,yCAAA,OAAA;AAAA,QAAK,OAAO;AAAA,UAAEc,UAAU;AAAA,UAAYE,KAAK;AAAA,UAAGC,MAAM;AAAA,UAAGC,OAAO;AAAA,UAAGC,QAAQ;AAAA,QAAvE;AAAA,QAAA,UACGV,eAAe,OACdW,2BAAAA,IAACT,qBAAAA,6CACKP;UACJ,OAAM;AAAA,UACN,QAAO;AAAA,UACP,QAAQ;AAAA,YACNiB,OAAO;AAAA,cAAEC,eAAe;AAAA,gBAAEC,YAAYnB,SAAS,QAAQ,CAACA,MAAMoB;AAAAA,cAAtC;AAAA,YADlB;AAAA,YAENC,QAAQ;AAAA,cACNC,SAAS;AAAA,gBACPC,kBAAkBvB,SAAS,QAAQA,MAAMwB,SAAS,OAAO,SAAS;AAAA,cAD3D;AAAA,YADH;AAAA,UAFF;AAAA,QAAA,EAJV,IAcAR,2BAAA,IAAA,OAAA;AAAA,UAAK,OAAM;AAAA,UAAO,KAAKS,aAAAA,aAAazB,MAAM0B;AAAAA,UAAK,KAAI;AAAA,QAAA,CAAnD;AAAA,MAAA,CAhBJ;AAAA,IAAA,CADF;AAAA,EAAA,CAFJ;AAyBD,CA/BuB;;"}
1
+ {"version":3,"file":"Video.cjs.js","sources":["../src/components/builtin/Video/Video.tsx"],"sourcesContent":["import { forwardRef, Ref } from 'react'\nimport styled from 'styled-components'\nimport ReactPlayer from 'react-player'\nimport { cx } from '@emotion/css'\n\nimport {\n BorderRadiusValue,\n ElementIDValue,\n MarginValue,\n VideoValue,\n} from '../../../prop-controllers/descriptors'\nimport { cssBorderRadius, cssMargin } from '../../utils/cssMediaRules'\nimport { placeholders } from '../../utils/placeholders'\n\ntype Props = {\n id?: ElementIDValue\n video?: VideoValue\n width?: string\n margin?: MarginValue\n borderRadius?: BorderRadiusValue\n}\n\nconst Container = styled.div.withConfig({\n shouldForwardProp: prop => !['margin', 'borderRadius'].includes(prop.toString()),\n})<{ margin: Props['margin']; borderRadius: Props['borderRadius'] }>`\n display: flex;\n flex-direction: column;\n overflow: hidden;\n ${cssMargin()}\n ${cssBorderRadius()}\n`\n\nconst ASPECT_RATIO = 16 / 9\n\nconst Video = forwardRef(function Video(\n { id, video, width, margin, borderRadius }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n const canPlayUrl = video && video.url != null && ReactPlayer.canPlay(video.url)\n\n return (\n <Container ref={ref} id={id} className={cx(width)} margin={margin} borderRadius={borderRadius}>\n <div style={{ position: 'relative', paddingTop: `${100 / ASPECT_RATIO}%` }}>\n <div style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}>\n {canPlayUrl === true ? (\n <ReactPlayer\n {...video}\n width=\"100%\"\n height=\"100%\"\n config={{\n vimeo: { playerOptions: { background: video != null && !video.controls } },\n wistia: {\n options: {\n endVideoBehavior: video != null && video.loop === true ? 'loop' : 'default',\n },\n },\n }}\n />\n ) : (\n <img width=\"100%\" src={placeholders.video.src} alt=\"Video Placeholder\" />\n )}\n </div>\n </div>\n </Container>\n )\n})\n\nexport default Video\n"],"names":["Container","styled","div","withConfig","shouldForwardProp","prop","includes","toString","cssMargin","cssBorderRadius","ASPECT_RATIO","Video","forwardRef","id","video","width","margin","borderRadius","ref","canPlayUrl","url","ReactPlayer","canPlay","cx","position","paddingTop","top","left","right","bottom","_jsx","vimeo","playerOptions","background","controls","wistia","options","endVideoBehavior","loop","placeholders","src"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAMA,YAAYC,gBAAAA,WAAOC,IAAIC,WAAW;AAAA,EACtCC,mBAAmBC,CAAQ,SAAA,CAAC,CAAC,UAAU,cAAX,EAA2BC,SAASD,KAAKE,UAAzC;AADU,CAAtB;AAAA;AAAA;AAAA;AAAA,IAMdC,cAAY,UAAA;AAAA,IACZC,cAAkB,gBAAA;AAAA;AAGtB,MAAMC,eAAe,KAAK;AAEpBC,MAAAA,QAAQC,MAAAA,WAAW,gBACvB;AAAA,EAAEC;AAAAA,EAAIC;AAAAA,EAAOC;AAAAA,EAAOC;AAAAA,EAAQC;AAAAA,GAC5BC,KACA;AACMC,QAAAA,aAAaL,SAASA,MAAMM,OAAO,QAAQC,qBAAAA,WAAYC,QAAQR,MAAMM,GAA1B;AAEjD,wCACG,WAAD;AAAA,IAAW;AAAA,IAAU;AAAA,IAAQ,WAAWG,OAAGR,KAAD;AAAA,IAAS;AAAA,IAAgB;AAAA,IACjE,yCAAA,OAAA;AAAA,MAAK,OAAO;AAAA,QAAES,UAAU;AAAA,QAAYC,YAAa,GAAE,MAAMf;AAAAA,MAAzD;AAAA,MACE,yCAAA,OAAA;AAAA,QAAK,OAAO;AAAA,UAAEc,UAAU;AAAA,UAAYE,KAAK;AAAA,UAAGC,MAAM;AAAA,UAAGC,OAAO;AAAA,UAAGC,QAAQ;AAAA,QAAvE;AAAA,QAAA,UACGV,eAAe,OACdW,2BAAAA,IAACT,qBAAAA,6CACKP;UACJ,OAAM;AAAA,UACN,QAAO;AAAA,UACP,QAAQ;AAAA,YACNiB,OAAO;AAAA,cAAEC,eAAe;AAAA,gBAAEC,YAAYnB,SAAS,QAAQ,CAACA,MAAMoB;AAAAA,cAAtC;AAAA,YADlB;AAAA,YAENC,QAAQ;AAAA,cACNC,SAAS;AAAA,gBACPC,kBAAkBvB,SAAS,QAAQA,MAAMwB,SAAS,OAAO,SAAS;AAAA,cAD3D;AAAA,YADH;AAAA,UAFF;AAAA,QAAA,EAJV,IAcAR,2BAAA,IAAA,OAAA;AAAA,UAAK,OAAM;AAAA,UAAO,KAAKS,aAAAA,aAAazB,MAAM0B;AAAAA,UAAK,KAAI;AAAA,QAAA,CAAnD;AAAA,MAAA,CAhBJ;AAAA,IAAA,CADF;AAAA,EAAA,CAFJ;AAyBD,CA/BuB;;"}
package/dist/Video.es.js CHANGED
@@ -44,6 +44,7 @@ import "./graphql.es.js";
44
44
  import "./text-input.es.js";
45
45
  import "./shape.es.js";
46
46
  import "color";
47
+ import "scroll-into-view-if-needed";
47
48
  import "react-dom";
48
49
  import "html-react-parser";
49
50
  import "next/head";
@@ -1 +1 @@
1
- {"version":3,"file":"Video.es.js","sources":["../src/components/builtin/Video/Video.tsx"],"sourcesContent":["import { forwardRef, Ref } from 'react'\nimport styled from 'styled-components'\nimport ReactPlayer from 'react-player'\nimport { cx } from '@emotion/css'\n\nimport {\n BorderRadiusValue,\n ElementIDValue,\n MarginValue,\n VideoValue,\n} from '../../../prop-controllers/descriptors'\nimport { cssBorderRadius, cssMargin } from '../../utils/cssMediaRules'\nimport { placeholders } from '../../utils/placeholders'\n\ntype Props = {\n id?: ElementIDValue\n video?: VideoValue\n width?: string\n margin?: MarginValue\n borderRadius?: BorderRadiusValue\n}\n\nconst Container = styled.div.withConfig({\n shouldForwardProp: prop => !['margin', 'borderRadius'].includes(prop.toString()),\n})<{ margin: Props['margin']; borderRadius: Props['borderRadius'] }>`\n display: flex;\n flex-direction: column;\n overflow: hidden;\n ${cssMargin()}\n ${cssBorderRadius()}\n`\n\nconst ASPECT_RATIO = 16 / 9\n\nconst Video = forwardRef(function Video(\n { id, video, width, margin, borderRadius }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n const canPlayUrl = video && video.url != null && ReactPlayer.canPlay(video.url)\n\n return (\n <Container ref={ref} id={id} className={cx(width)} margin={margin} borderRadius={borderRadius}>\n <div style={{ position: 'relative', paddingTop: `${100 / ASPECT_RATIO}%` }}>\n <div style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}>\n {canPlayUrl === true ? (\n <ReactPlayer\n {...video}\n width=\"100%\"\n height=\"100%\"\n config={{\n vimeo: { playerOptions: { background: video != null && !video.controls } },\n wistia: {\n options: {\n endVideoBehavior: video != null && video.loop === true ? 'loop' : 'default',\n },\n },\n }}\n />\n ) : (\n <img width=\"100%\" src={placeholders.video.src} alt=\"Video Placeholder\" />\n )}\n </div>\n </div>\n </Container>\n )\n})\n\nexport default Video\n"],"names":["Container","styled","div","withConfig","shouldForwardProp","prop","includes","toString","cssMargin","cssBorderRadius","ASPECT_RATIO","Video","forwardRef","id","video","width","margin","borderRadius","ref","canPlayUrl","url","ReactPlayer","canPlay","cx","position","paddingTop","top","left","right","bottom","_jsx","vimeo","playerOptions","background","controls","wistia","options","endVideoBehavior","loop","placeholders","src"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAMA,YAAYC,OAAOC,IAAIC,WAAW;AAAA,EACtCC,mBAAmBC,CAAQ,SAAA,CAAC,CAAC,UAAU,cAAX,EAA2BC,SAASD,KAAKE,UAAzC;A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"file":"Video.es.js","sources":["../src/components/builtin/Video/Video.tsx"],"sourcesContent":["import { forwardRef, Ref } from 'react'\nimport styled from 'styled-components'\nimport ReactPlayer from 'react-player'\nimport { cx } from '@emotion/css'\n\nimport {\n BorderRadiusValue,\n ElementIDValue,\n MarginValue,\n VideoValue,\n} from '../../../prop-controllers/descriptors'\nimport { cssBorderRadius, cssMargin } from '../../utils/cssMediaRules'\nimport { placeholders } from '../../utils/placeholders'\n\ntype Props = {\n id?: ElementIDValue\n video?: VideoValue\n width?: string\n margin?: MarginValue\n borderRadius?: BorderRadiusValue\n}\n\nconst Container = styled.div.withConfig({\n shouldForwardProp: prop => !['margin', 'borderRadius'].includes(prop.toString()),\n})<{ margin: Props['margin']; borderRadius: Props['borderRadius'] }>`\n display: flex;\n flex-direction: column;\n overflow: hidden;\n ${cssMargin()}\n ${cssBorderRadius()}\n`\n\nconst ASPECT_RATIO = 16 / 9\n\nconst Video = forwardRef(function Video(\n { id, video, width, margin, borderRadius }: Props,\n ref: Ref<HTMLDivElement>,\n) {\n const canPlayUrl = video && video.url != null && ReactPlayer.canPlay(video.url)\n\n return (\n <Container ref={ref} id={id} className={cx(width)} margin={margin} borderRadius={borderRadius}>\n <div style={{ position: 'relative', paddingTop: `${100 / ASPECT_RATIO}%` }}>\n <div style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}>\n {canPlayUrl === true ? (\n <ReactPlayer\n {...video}\n width=\"100%\"\n height=\"100%\"\n config={{\n vimeo: { playerOptions: { background: video != null && !video.controls } },\n wistia: {\n options: {\n endVideoBehavior: video != null && video.loop === true ? 'loop' : 'default',\n },\n },\n }}\n />\n ) : (\n <img width=\"100%\" src={placeholders.video.src} alt=\"Video Placeholder\" />\n )}\n </div>\n </div>\n </Container>\n )\n})\n\nexport default Video\n"],"names":["Container","styled","div","withConfig","shouldForwardProp","prop","includes","toString","cssMargin","cssBorderRadius","ASPECT_RATIO","Video","forwardRef","id","video","width","margin","borderRadius","ref","canPlayUrl","url","ReactPlayer","canPlay","cx","position","paddingTop","top","left","right","bottom","_jsx","vimeo","playerOptions","background","controls","wistia","options","endVideoBehavior","loop","placeholders","src"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAMA,YAAYC,OAAOC,IAAIC,WAAW;AAAA,EACtCC,mBAAmBC,CAAQ,SAAA,CAAC,CAAC,UAAU,cAAX,EAA2BC,SAASD,KAAKE,UAAzC;AADU,CAAtB;AAAA;AAAA;AAAA;AAAA,IAMdC,UAAY;AAAA,IACZC,gBAAkB;AAAA;AAGtB,MAAMC,eAAe,KAAK;AAEpBC,MAAAA,QAAQC,WAAW,gBACvB;AAAA,EAAEC;AAAAA,EAAIC;AAAAA,EAAOC;AAAAA,EAAOC;AAAAA,EAAQC;AAAAA,GAC5BC,KACA;AACMC,QAAAA,aAAaL,SAASA,MAAMM,OAAO,QAAQC,YAAYC,QAAQR,MAAMM,GAA1B;AAEjD,6BACG,WAAD;AAAA,IAAW;AAAA,IAAU;AAAA,IAAQ,WAAWG,GAAGR,KAAD;AAAA,IAAS;AAAA,IAAgB;AAAA,IACjE,8BAAA,OAAA;AAAA,MAAK,OAAO;AAAA,QAAES,UAAU;AAAA,QAAYC,YAAa,GAAE,MAAMf;AAAAA,MAAzD;AAAA,MACE,8BAAA,OAAA;AAAA,QAAK,OAAO;AAAA,UAAEc,UAAU;AAAA,UAAYE,KAAK;AAAA,UAAGC,MAAM;AAAA,UAAGC,OAAO;AAAA,UAAGC,QAAQ;AAAA,QAAvE;AAAA,QAAA,UACGV,eAAe,OACdW,oBAAC,8CACKhB;UACJ,OAAM;AAAA,UACN,QAAO;AAAA,UACP,QAAQ;AAAA,YACNiB,OAAO;AAAA,cAAEC,eAAe;AAAA,gBAAEC,YAAYnB,SAAS,QAAQ,CAACA,MAAMoB;AAAAA,cAAtC;AAAA,YADlB;AAAA,YAENC,QAAQ;AAAA,cACNC,SAAS;AAAA,gBACPC,kBAAkBvB,SAAS,QAAQA,MAAMwB,SAAS,OAAO,SAAS;AAAA,cAD3D;AAAA,YADH;AAAA,UAFF;AAAA,QAAA,EAJV,IAcAR,oBAAA,OAAA;AAAA,UAAK,OAAM;AAAA,UAAO,KAAKS,aAAazB,MAAM0B;AAAAA,UAAK,KAAI;AAAA,QAAA,CAAnD;AAAA,MAAA,CAhBJ;AAAA,IAAA,CADF;AAAA,EAAA,CAFJ;AAyBD,CA/BuB;;"}
@@ -18,7 +18,6 @@ var cssMediaRules = require("./cssMediaRules.cjs.js");
18
18
  var index = require("./index.cjs2.js");
19
19
  var useBoxShadow = require("./useBoxShadow.cjs.js");
20
20
  var useMediaQuery = require("./useMediaQuery.cjs.js");
21
- var index$1 = require("./index.cjs3.js");
22
21
  require("react");
23
22
  require("styled-components");
24
23
  require("framer-motion");
@@ -45,11 +44,14 @@ require("./graphql.cjs.js");
45
44
  require("./text-input.cjs.js");
46
45
  require("./shape.cjs.js");
47
46
  require("color");
47
+ require("scroll-into-view-if-needed");
48
48
  require("react-dom");
49
49
  require("html-react-parser");
50
50
  require("next/head");
51
51
  require("uuid/v4");
52
52
  require("corporate-ipsum");
53
+ require("./index.cjs3.js");
54
+ require("next/link");
53
55
  require("react-use-gesture");
54
56
  require("@popmotion/popcorn");
55
57
  require("formik");
@@ -62,8 +64,6 @@ require("is-hotkey");
62
64
  require("slate-react");
63
65
  require("@convertkit/slate-lists");
64
66
  require("react-player");
65
- require("scroll-into-view-if-needed");
66
- require("next/link");
67
67
  exports.Box = Box["default"];
68
68
  exports.DEFAULT_BOX_ANIMATE_DELAY = next.DEFAULT_BOX_ANIMATE_DELAY;
69
69
  exports.DEFAULT_BOX_ANIMATE_DURATION = next.DEFAULT_BOX_ANIMATE_DURATION;
@@ -77,6 +77,7 @@ exports.Page = next.Page;
77
77
  exports.SITE_FONTS_QUERY = next.SITE_FONTS_QUERY;
78
78
  exports.useBorder = next.useBorder;
79
79
  exports.useFile = next.useFile;
80
+ exports.usePage = next.usePage;
80
81
  exports.useResponsiveColor = next.useResponsiveColor;
81
82
  exports.Button = Button["default"];
82
83
  exports.Carousel = Carousel["default"];
@@ -102,5 +103,4 @@ exports.cssWidth = cssMediaRules.cssWidth;
102
103
  exports.useBackgrounds = index.useBackgrounds;
103
104
  exports.useBoxShadow = useBoxShadow.useBoxShadow;
104
105
  exports.useMediaQuery = useMediaQuery.useMediaQuery;
105
- exports.usePage = index$1.usePage;
106
106
  //# sourceMappingURL=components.cjs.js.map
@@ -1,5 +1,5 @@
1
1
  export { default as Box } from "./Box.es.js";
2
- export { d as DEFAULT_BOX_ANIMATE_DELAY, e as DEFAULT_BOX_ANIMATE_DURATION, c as DEFAULT_BOX_ANIMATE_TYPE, g as DEFAULT_ITEM_ANIMATE_DELAY, h as DEFAULT_ITEM_ANIMATE_DURATION, f as DEFAULT_ITEM_ANIMATE_TYPE, i as DEFAULT_ITEM_STAGGER_DURATION, m as PAGE_SNIPPETS_QUERY, n as Page, S as SITE_FONTS_QUERY, j as useBorder, l as useFile, k as useResponsiveColor } from "./index.es.js";
2
+ export { d as DEFAULT_BOX_ANIMATE_DELAY, e as DEFAULT_BOX_ANIMATE_DURATION, c as DEFAULT_BOX_ANIMATE_TYPE, g as DEFAULT_ITEM_ANIMATE_DELAY, h as DEFAULT_ITEM_ANIMATE_DURATION, f as DEFAULT_ITEM_ANIMATE_TYPE, i as DEFAULT_ITEM_STAGGER_DURATION, n as PAGE_SNIPPETS_QUERY, o as Page, S as SITE_FONTS_QUERY, j as useBorder, l as useFile, m as usePage, k as useResponsiveColor } from "./index.es.js";
3
3
  export { default as Button } from "./Button.es.js";
4
4
  export { default as Carousel } from "./Carousel.es.js";
5
5
  export { default as Countdown } from "./Countdown.es.js";
@@ -16,7 +16,6 @@ export { e as cssBorder, f as cssBorderRadius, g as cssBoxShadow, h as cssGridIt
16
16
  export { u as useBackgrounds } from "./index.es2.js";
17
17
  export { u as useBoxShadow } from "./useBoxShadow.es.js";
18
18
  export { u as useMediaQuery } from "./useMediaQuery.es.js";
19
- export { u as usePage } from "./index.es3.js";
20
19
  import "react";
21
20
  import "styled-components";
22
21
  import "framer-motion";
@@ -43,11 +42,14 @@ import "./graphql.es.js";
43
42
  import "./text-input.es.js";
44
43
  import "./shape.es.js";
45
44
  import "color";
45
+ import "scroll-into-view-if-needed";
46
46
  import "react-dom";
47
47
  import "html-react-parser";
48
48
  import "next/head";
49
49
  import "uuid/v4";
50
50
  import "corporate-ipsum";
51
+ import "./index.es3.js";
52
+ import "next/link";
51
53
  import "react-use-gesture";
52
54
  import "@popmotion/popcorn";
53
55
  import "formik";
@@ -60,6 +62,4 @@ import "is-hotkey";
60
62
  import "slate-react";
61
63
  import "@convertkit/slate-lists";
62
64
  import "react-player";
63
- import "scroll-into-view-if-needed";
64
- import "next/link";
65
65
  //# sourceMappingURL=components.es.js.map