@makeswift/runtime 0.5.0 → 0.5.1

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 (80) hide show
  1. package/dist/Box.cjs.js +30 -270
  2. package/dist/Box.cjs.js.map +1 -1
  3. package/dist/Box.es.js +29 -269
  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 +3 -4
  8. package/dist/Carousel.cjs.js.map +1 -1
  9. package/dist/Carousel.es.js +2 -3
  10. package/dist/Carousel.es.js.map +1 -1
  11. package/dist/Countdown.es.js +1 -1
  12. package/dist/Divider.es.js +1 -1
  13. package/dist/Embed.cjs.js +2 -1
  14. package/dist/Embed.cjs.js.map +1 -1
  15. package/dist/Embed.es.js +2 -1
  16. package/dist/Embed.es.js.map +1 -1
  17. package/dist/Form.cjs.js +1 -1
  18. package/dist/Form.es.js +2 -2
  19. package/dist/Image.cjs.js +1 -1
  20. package/dist/Image.es.js +2 -2
  21. package/dist/LiveProvider.es.js +1 -1
  22. package/dist/Navigation.cjs.js +4 -3
  23. package/dist/Navigation.cjs.js.map +1 -1
  24. package/dist/Navigation.es.js +4 -3
  25. package/dist/Navigation.es.js.map +1 -1
  26. package/dist/PreviewProvider.es.js +1 -1
  27. package/dist/Root.cjs.js +5 -5
  28. package/dist/Root.cjs.js.map +1 -1
  29. package/dist/Root.es.js +3 -3
  30. package/dist/SocialLinks.cjs.js +2 -2
  31. package/dist/SocialLinks.es.js +3 -3
  32. package/dist/Text.cjs.js +1 -1
  33. package/dist/Text.es.js +2 -2
  34. package/dist/Video.es.js +1 -1
  35. package/dist/components.cjs.js +10 -9
  36. package/dist/components.cjs.js.map +1 -1
  37. package/dist/components.es.js +9 -8
  38. package/dist/components.es.js.map +1 -1
  39. package/dist/index.cjs.js +31 -5
  40. package/dist/index.cjs.js.map +1 -1
  41. package/dist/index.cjs2.js +711 -92
  42. package/dist/index.cjs2.js.map +1 -1
  43. package/dist/index.cjs3.js +107 -20
  44. package/dist/index.cjs3.js.map +1 -1
  45. package/dist/index.cjs4.js +59 -0
  46. package/dist/index.cjs4.js.map +1 -0
  47. package/dist/index.es.js +32 -5
  48. package/dist/index.es.js.map +1 -1
  49. package/dist/index.es2.js +708 -93
  50. package/dist/index.es2.js.map +1 -1
  51. package/dist/index.es3.js +103 -21
  52. package/dist/index.es3.js.map +1 -1
  53. package/dist/index.es4.js +58 -0
  54. package/dist/index.es4.js.map +1 -0
  55. package/dist/next.es.js +1 -1
  56. package/dist/types/src/components/builtin/Box/Box.d.ts +18 -26
  57. package/dist/types/src/components/builtin/Box/Box.d.ts.map +1 -1
  58. package/dist/types/src/components/builtin/Box/animations.d.ts +13 -60
  59. package/dist/types/src/components/builtin/Box/animations.d.ts.map +1 -1
  60. package/dist/types/src/components/builtin/Button/Button.d.ts +1 -1
  61. package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +1 -1
  62. package/dist/types/src/components/hooks/useMediaQuery.d.ts +1 -1
  63. package/dist/types/src/components/hooks/useMediaQuery.d.ts.map +1 -1
  64. package/dist/types/src/components/shared/BackgroundsContainer/index.d.ts +1 -254
  65. package/dist/types/src/components/shared/BackgroundsContainer/index.d.ts.map +1 -1
  66. package/dist/types/src/components/shared/grid-item.d.ts +9 -6
  67. package/dist/types/src/components/shared/grid-item.d.ts.map +1 -1
  68. package/dist/useIsomorphicLayoutEffect.cjs.js +6 -0
  69. package/dist/useIsomorphicLayoutEffect.cjs.js.map +1 -0
  70. package/dist/useIsomorphicLayoutEffect.es.js +5 -0
  71. package/dist/useIsomorphicLayoutEffect.es.js.map +1 -0
  72. package/package.json +1 -1
  73. package/dist/grid-item.cjs.js +0 -603
  74. package/dist/grid-item.cjs.js.map +0 -1
  75. package/dist/grid-item.es.js +0 -595
  76. package/dist/grid-item.es.js.map +0 -1
  77. package/dist/useMediaQuery.cjs.js +0 -26
  78. package/dist/useMediaQuery.cjs.js.map +0 -1
  79. package/dist/useMediaQuery.es.js +0 -25
  80. package/dist/useMediaQuery.es.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Root.cjs.js","sources":["../src/components/builtin/Root/components/Placeholder/index.tsx","../src/runtimes/react/use-global-style.ts","../src/components/builtin/Root/Root.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useStyle } from '../../../../../runtimes/react/use-style'\n\nexport default forwardRef<HTMLDivElement>(function Placeholder(_props, ref) {\n return (\n <div\n ref={ref}\n className={useStyle({\n width: '100%',\n background: 'rgba(161, 168, 194, 0.18)',\n height: 80,\n padding: 8,\n })}\n >\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 </div>\n )\n})\n","import * as React from 'react'\nimport { useRef } from 'react'\nimport { cache, injectGlobal } from '@emotion/css'\nimport { CSSInterpolation, serializeStyles } from '@emotion/serialize'\nimport { StyleSheet } from '@emotion/sheet'\nimport { insertStyles } from '@emotion/utils'\n\nconst isServer = typeof window === 'undefined'\nconst useInsertionEffectSpecifier = 'useInsertionEffect'\nconst useInsertionEffect = React[useInsertionEffectSpecifier] ?? React.useLayoutEffect\n\nexport function useGlobalStyle(...args: CSSInterpolation[]): void {\n if (isServer) return injectGlobal(args)\n\n const serialized = serializeStyles(args, cache.registered)\n const sheetRef = useRef<[StyleSheet, boolean]>()\n\n // Hydration\n useInsertionEffect(() => {\n const key = `${cache.key}-global`\n\n const cacheSheet = cache.sheet as StyleSheet\n const sheet = new (cacheSheet.constructor as typeof StyleSheet)({\n key,\n nonce: cacheSheet.nonce,\n container: cacheSheet.container,\n speedy: cacheSheet.isSpeedy,\n })\n\n const node = document.querySelector<HTMLStyleElement>(\n `style[data-emotion=\"${key} ${serialized.name}\"]`,\n )\n\n if (cache.sheet.tags.length > 0) {\n sheet.before = cache.sheet.tags[0]\n }\n\n let rehydrating = false\n\n if (node != null) {\n rehydrating = true\n node.setAttribute('data-emotion', key)\n sheet.hydrate([node])\n }\n\n sheetRef.current = [sheet, rehydrating]\n\n return () => {\n sheet.flush()\n }\n })\n\n // Insertion\n useInsertionEffect(() => {\n const [sheet, rehydrating] = sheetRef.current ?? []\n\n if (sheet == null || rehydrating == null) return\n\n if (rehydrating) {\n sheetRef.current = [sheet, false]\n\n return\n }\n\n if (serialized.next != null) {\n insertStyles(cache, serialized.next, true)\n }\n\n if (sheet.tags.length > 0) {\n const element = sheet.tags[sheet.tags.length - 1].nextElementSibling\n\n sheet.before = element\n\n sheet.flush()\n }\n\n cache.insert('', serialized, sheet, false)\n })\n}\n","import { normalize } from 'polished'\nimport { forwardRef, Ref } from 'react'\n\nimport Placeholder from './components/Placeholder'\nimport type {\n GridValue,\n BackgroundsValue,\n GapXValue,\n GapYValue,\n} from '../../../prop-controllers/descriptors'\nimport { Element } from '../../../runtimes/react'\nimport BackgroundsContainer from '../../shared/BackgroundsContainer'\nimport { useGlobalStyle } from '../../../runtimes/react/use-global-style'\nimport { GridItem } from '../../shared/grid-item'\nimport { useStyle } from '../../../runtimes/react/use-style'\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 useGlobalStyle({\n html: {\n boxSizing: 'border-box',\n },\n '*, *::before, *::after': {\n boxSizing: 'inherit',\n },\n })\n\n useGlobalStyle(normalize())\n\n return (\n <BackgroundsContainer ref={ref} style={{ background: 'white' }} backgrounds={backgrounds}>\n <div className={useStyle({ display: 'flex', flexWrap: 'wrap', width: '100%' })}>\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 </div>\n </BackgroundsContainer>\n )\n})\n\nexport default Root\n"],"names":["forwardRef","_props","ref","useStyle","width","background","height","padding","overflow","React","injectGlobal","serializeStyles","cache","useRef","insertStyles","Root","children","backgrounds","rowGap","columnGap","html","boxSizing","useGlobalStyle","normalize","BackgroundsContainer","display","flexWrap","elements","length","map","child","index","GridItem","columns","Element","key","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAeA,cAAAA,MAAAA,WAA2B,sBAAqBC,QAAQC,KAAK;AAExE,wCAAA,OAAA;AAAA,IACE;AAAA,IACA,WAAWC,KAAAA,SAAS;AAAA,MAClBC,OAAO;AAAA,MACPC,YAAY;AAAA,MACZC,QAAQ;AAAA,MACRC,SAAS;AAAA,IAAA,CAJQ;AAAA,IAOnB,yCAAA,OAAA;AAAA,MACE,OAAM;AAAA,MACN,OAAM;AAAA,MACN,QAAO;AAAA,MACP,OAAO;AAAA,QAAEC,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,QACP,IAAG;AAAA,QACH,IAAG;AAAA,MAAA,CAVL;AAAA,IAAA,CANF;AAAA,EAAA,CAVJ;AA+BD,CAhCwB;ACIzB,MAAM,WAAW,OAAO,WAAW;AACnC,MAAM,8BAA8B;AACpC,MAAM,qBAAqBC,uBAAM,iCAANA,YAAsCA,iBAAM;AAEhE,2BAA2B,MAAgC;AAC5D,MAAA;AAAU,WAAOC,IAAAA,aAAa,IAAI;AAEt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AA,WAAW,cACtB;AAAA,EAAEgB;AAAAA,EAAUC;AAAAA,EAAaC;AAAAA,EAAQC;AAAAA,GACjCjB,KACA;AACe,iBAAA;AAAA,IACbkB,MAAM;AAAA,MACJC,WAAW;AAAA,IAFA;AAAA,IAIa,0BAAA;AAAA,MACxBA,WAAW;AAAA,IADa;AAAA,EAAA,CAJd;AASdC,iBAAeC,oBAAD;AAEd,wCACGC,SAAAA,sBAAD;AAAA,IAAsB;AAAA,IAAU,OAAO;AAAA,MAAEnB,YAAY;AAAA,IAArD;AAAA,IAAgE;AAAA,IAC9D,yCAAA,OAAA;AAAA,MAAK,WAAWF,KAAAA,SAAS;AAAA,QAAEsB,SAAS;AAAA,QAAQC,UAAU;AAAA,QAAQtB,OAAO;AAAA,MAAA,CAA7C;AAAA,MACrBY,UAAAA,YAAYA,SAASW,SAASC,SAAS,IACtCZ,SAASW,SAASE,IAAI,CAACC,OAAOC,yCAC3BC,SAAAA,UAAD;AAAA,QAEE,MAAMhB,SAASiB;AAAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QALF,yCAOGC,cAAD;AAAA,UAAS,SAASJ;AAAAA,QAAAA,CAAlB;AAAA,MAAA,GANKA,MAAMK,GADb,CADF,IAYCC,2BAAAA,IAAA,aAAD,CAAA,CAAA;AAAA,IAAA,CAdJ;AAAA,EAAA,CAFJ;AAqBD,CApCsB;;"}
1
+ {"version":3,"file":"Root.cjs.js","sources":["../src/components/builtin/Root/components/Placeholder/index.tsx","../src/runtimes/react/use-global-style.ts","../src/components/builtin/Root/Root.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useStyle } from '../../../../../runtimes/react/use-style'\n\nexport default forwardRef<HTMLDivElement>(function Placeholder(_props, ref) {\n return (\n <div\n ref={ref}\n className={useStyle({\n width: '100%',\n background: 'rgba(161, 168, 194, 0.18)',\n height: 80,\n padding: 8,\n })}\n >\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 </div>\n )\n})\n","import * as React from 'react'\nimport { useRef } from 'react'\nimport { cache, injectGlobal } from '@emotion/css'\nimport { CSSInterpolation, serializeStyles } from '@emotion/serialize'\nimport { StyleSheet } from '@emotion/sheet'\nimport { insertStyles } from '@emotion/utils'\n\nconst isServer = typeof window === 'undefined'\nconst useInsertionEffectSpecifier = 'useInsertionEffect'\nconst useInsertionEffect = React[useInsertionEffectSpecifier] ?? React.useLayoutEffect\n\nexport function useGlobalStyle(...args: CSSInterpolation[]): void {\n if (isServer) return injectGlobal(args)\n\n const serialized = serializeStyles(args, cache.registered)\n const sheetRef = useRef<[StyleSheet, boolean]>()\n\n // Hydration\n useInsertionEffect(() => {\n const key = `${cache.key}-global`\n\n const cacheSheet = cache.sheet as StyleSheet\n const sheet = new (cacheSheet.constructor as typeof StyleSheet)({\n key,\n nonce: cacheSheet.nonce,\n container: cacheSheet.container,\n speedy: cacheSheet.isSpeedy,\n })\n\n const node = document.querySelector<HTMLStyleElement>(\n `style[data-emotion=\"${key} ${serialized.name}\"]`,\n )\n\n if (cache.sheet.tags.length > 0) {\n sheet.before = cache.sheet.tags[0]\n }\n\n let rehydrating = false\n\n if (node != null) {\n rehydrating = true\n node.setAttribute('data-emotion', key)\n sheet.hydrate([node])\n }\n\n sheetRef.current = [sheet, rehydrating]\n\n return () => {\n sheet.flush()\n }\n })\n\n // Insertion\n useInsertionEffect(() => {\n const [sheet, rehydrating] = sheetRef.current ?? []\n\n if (sheet == null || rehydrating == null) return\n\n if (rehydrating) {\n sheetRef.current = [sheet, false]\n\n return\n }\n\n if (serialized.next != null) {\n insertStyles(cache, serialized.next, true)\n }\n\n if (sheet.tags.length > 0) {\n const element = sheet.tags[sheet.tags.length - 1].nextElementSibling\n\n sheet.before = element\n\n sheet.flush()\n }\n\n cache.insert('', serialized, sheet, false)\n })\n}\n","import { normalize } from 'polished'\nimport { forwardRef, Ref } from 'react'\n\nimport Placeholder from './components/Placeholder'\nimport type {\n GridValue,\n BackgroundsValue,\n GapXValue,\n GapYValue,\n} from '../../../prop-controllers/descriptors'\nimport { Element } from '../../../runtimes/react'\nimport BackgroundsContainer from '../../shared/BackgroundsContainer'\nimport { useGlobalStyle } from '../../../runtimes/react/use-global-style'\nimport { GridItem } from '../../shared/grid-item'\nimport { useStyle } from '../../../runtimes/react/use-style'\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 useGlobalStyle({\n html: {\n boxSizing: 'border-box',\n },\n '*, *::before, *::after': {\n boxSizing: 'inherit',\n },\n })\n\n useGlobalStyle(normalize())\n\n return (\n <BackgroundsContainer ref={ref} style={{ background: 'white' }} backgrounds={backgrounds}>\n <div className={useStyle({ display: 'flex', flexWrap: 'wrap', width: '100%' })}>\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 </div>\n </BackgroundsContainer>\n )\n})\n\nexport default Root\n"],"names":["forwardRef","_props","ref","useStyle","width","background","height","padding","overflow","React","injectGlobal","serializeStyles","cache","useRef","insertStyles","Root","children","backgrounds","rowGap","columnGap","html","boxSizing","useGlobalStyle","normalize","BackgroundsContainer","display","flexWrap","elements","length","map","child","index","GridItem","columns","Element","key","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAeA,cAAAA,MA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,MAAA,CAA7C;AAAA,MACrBY,UAAAA,YAAYA,SAASW,SAASC,SAAS,IACtCZ,SAASW,SAASE,IAAI,CAACC,OAAOC,2CAC3BC,MAAAA,UAAD;AAAA,QAEE,MAAMhB,SAASiB;AAAAA,QAAAA,OACfF;AAAAA,QACA;AAAA,QACA;AAAA,QALF,yCAOGG,cAAD;AAAA,UAAS,SAASJ;AAAAA,QAAAA,CAAlB;AAAA,MAAA,GANKA,MAAMK,GADb,CADF,IAYCC,2BAAAA,IAAA,aAAD,CAAA,CAAA;AAAA,IAAA,CAdJ;AAAA,EAAA,CAFJ;AAqBD,CApCsB;;"}
package/dist/Root.es.js CHANGED
@@ -2,9 +2,9 @@ var _a;
2
2
  import { normalize } from "polished";
3
3
  import * as React from "react";
4
4
  import { forwardRef, useRef } from "react";
5
- import { n as useStyle, H as serializeStyles, I as insertStyles, E as Element } from "./index.es.js";
5
+ import { o as useStyle, H as serializeStyles, I as insertStyles, E as Element } from "./index.es.js";
6
6
  import { jsx } from "react/jsx-runtime";
7
- import { B as BackgroundsContainer, G as GridItem } from "./grid-item.es.js";
7
+ import { B as BackgroundsContainer, G as GridItem } from "./index.es2.js";
8
8
  import { injectGlobal, cache } from "@emotion/css";
9
9
  import "use-sync-external-store/shim/with-selector";
10
10
  import "next/dynamic";
@@ -34,8 +34,8 @@ import "http-proxy";
34
34
  import "set-cookie-parser";
35
35
  import "uuid/v4";
36
36
  import "corporate-ipsum";
37
- import "framer-motion";
38
37
  import "next/image";
38
+ import "./useIsomorphicLayoutEffect.es.js";
39
39
  import "react-player";
40
40
  import "./next-version.es.js";
41
41
  import "next/package.json";
@@ -32,10 +32,10 @@ var __objRest = (source, exclude) => {
32
32
  };
33
33
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
34
34
  var React = require("react");
35
- var index$1 = require("./index.cjs2.js");
35
+ var index$1 = require("./index.cjs3.js");
36
36
  var next = require("./index.cjs.js");
37
37
  var jsxRuntime = require("react/jsx-runtime");
38
- var index = require("./index.cjs3.js");
38
+ var index = require("./index.cjs4.js");
39
39
  var css = require("@emotion/css");
40
40
  require("scroll-into-view-if-needed");
41
41
  require("next/link");
@@ -31,10 +31,10 @@ var __objRest = (source, exclude) => {
31
31
  };
32
32
  import * as React from "react";
33
33
  import { forwardRef } from "react";
34
- import { L as Link } from "./index.es2.js";
35
- import { n as useStyle, r as responsiveStyle, q as colorToString } from "./index.es.js";
34
+ import { L as Link } from "./index.es3.js";
35
+ import { o as useStyle, r as responsiveStyle, s as colorToString } from "./index.es.js";
36
36
  import { jsx, Fragment } from "react/jsx-runtime";
37
- import { G as GutterContainer } from "./index.es3.js";
37
+ import { G as GutterContainer } from "./index.es4.js";
38
38
  import { cx } from "@emotion/css";
39
39
  import "scroll-into-view-if-needed";
40
40
  import "next/link";
package/dist/Text.cjs.js CHANGED
@@ -42,7 +42,7 @@ var next = require("./index.cjs.js");
42
42
  var reactPage = require("./react-page.cjs.js");
43
43
  var css = require("@emotion/css");
44
44
  var jsxRuntime = require("react/jsx-runtime");
45
- var index = require("./index.cjs2.js");
45
+ var index = require("./index.cjs3.js");
46
46
  require("use-sync-external-store/shim");
47
47
  require("./slot.cjs.js");
48
48
  require("css-box-model");
package/dist/Text.es.js CHANGED
@@ -36,11 +36,11 @@ import { isHotkey } from "is-hotkey";
36
36
  import { g as getBox } from "./box-models.es.js";
37
37
  import { Editor } from "slate-react";
38
38
  import Lists from "@convertkit/slate-lists";
39
- import { J as useTypography, K as useSwatches, G as findDeviceOverride, n as useStyle, r as responsiveStyle, L as shallowMergeFallbacks, q as colorToString, u as useIsInBuilder } from "./index.es.js";
39
+ import { J as useTypography, K as useSwatches, G as findDeviceOverride, o as useStyle, r as responsiveStyle, L as shallowMergeFallbacks, s as colorToString, u as useIsInBuilder } from "./index.es.js";
40
40
  import { w as getTypographyStyleSwatchIds, l as isNonNullable } from "./react-page.es.js";
41
41
  import { cx } from "@emotion/css";
42
42
  import { jsx } from "react/jsx-runtime";
43
- import { L as Link } from "./index.es2.js";
43
+ import { L as Link } from "./index.es3.js";
44
44
  import "use-sync-external-store/shim";
45
45
  import "./slot.es.js";
46
46
  import "css-box-model";
package/dist/Video.es.js CHANGED
@@ -20,7 +20,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { cx } from "@emotion/css";
21
21
  import { forwardRef } from "react";
22
22
  import ReactPlayer from "react-player";
23
- import { n as useStyle } from "./index.es.js";
23
+ import { o as useStyle } from "./index.es.js";
24
24
  import { p as placeholders } from "./placeholders.es.js";
25
25
  import { jsx } from "react/jsx-runtime";
26
26
  import "use-sync-external-store/shim/with-selector";
@@ -14,14 +14,11 @@ var Root = require("./Root.cjs.js");
14
14
  var SocialLinks = require("./SocialLinks.cjs.js");
15
15
  var Text = require("./Text.cjs.js");
16
16
  var Video = require("./Video.cjs.js");
17
- var gridItem = require("./grid-item.cjs.js");
18
- var useMediaQuery = require("./useMediaQuery.cjs.js");
17
+ var index = require("./index.cjs2.js");
19
18
  require("react");
20
- require("framer-motion");
21
19
  require("@emotion/css");
20
+ require("uuid");
22
21
  require("react/jsx-runtime");
23
- require("use-sync-external-store/shim");
24
- require("./slot.cjs.js");
25
22
  require("./box-models.cjs.js");
26
23
  require("css-box-model");
27
24
  require("./actions.cjs.js");
@@ -30,9 +27,11 @@ require("next/dynamic");
30
27
  require("./react-page.cjs.js");
31
28
  require("redux");
32
29
  require("redux-thunk");
30
+ require("./slot.cjs.js");
33
31
  require("./control.cjs.js");
34
32
  require("./text-input.cjs.js");
35
33
  require("./combobox.cjs.js");
34
+ require("use-sync-external-store/shim");
36
35
  require("slate");
37
36
  require("./types.cjs.js");
38
37
  require("color");
@@ -48,16 +47,18 @@ require("http-proxy");
48
47
  require("set-cookie-parser");
49
48
  require("uuid/v4");
50
49
  require("corporate-ipsum");
51
- require("./index.cjs2.js");
50
+ require("./index.cjs3.js");
52
51
  require("next/link");
52
+ require("framer-motion");
53
53
  require("react-use-gesture");
54
54
  require("@popmotion/popcorn");
55
+ require("./useIsomorphicLayoutEffect.cjs.js");
55
56
  require("formik");
56
57
  require("next/image");
57
58
  require("./placeholders.cjs.js");
58
59
  require("./next-version.cjs.js");
59
60
  require("next/package.json");
60
- require("./index.cjs3.js");
61
+ require("./index.cjs4.js");
61
62
  require("polished");
62
63
  require("slate-hotkeys");
63
64
  require("is-hotkey");
@@ -76,6 +77,7 @@ exports.MakeswiftComponentType = next.MakeswiftComponentType;
76
77
  exports.Page = next.Page;
77
78
  exports.useBorder = next.useBorder;
78
79
  exports.useBoxShadow = next.useBoxShadow;
80
+ exports.useMediaQuery = next.useMediaQuery;
79
81
  exports.useResponsiveColor = next.useResponsiveColor;
80
82
  exports.Button = Button["default"];
81
83
  exports.Carousel = Carousel["default"];
@@ -89,6 +91,5 @@ exports.Root = Root["default"];
89
91
  exports.SocialLinks = SocialLinks["default"];
90
92
  exports.Text = Text["default"];
91
93
  exports.Video = Video["default"];
92
- exports.useBackgrounds = gridItem.useBackgrounds;
93
- exports.useMediaQuery = useMediaQuery.useMediaQuery;
94
+ exports.useBackgrounds = index.useBackgrounds;
94
95
  //# sourceMappingURL=components.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"components.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -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 MakeswiftComponentType, m as Page, j as useBorder, k as useBoxShadow, l 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, M as MakeswiftComponentType, n as Page, j as useBorder, k as useBoxShadow, m as useMediaQuery, l 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";
@@ -12,14 +12,11 @@ export { default as Root } from "./Root.es.js";
12
12
  export { default as SocialLinks } from "./SocialLinks.es.js";
13
13
  export { default as Text } from "./Text.es.js";
14
14
  export { default as Video } from "./Video.es.js";
15
- export { u as useBackgrounds } from "./grid-item.es.js";
16
- export { u as useMediaQuery } from "./useMediaQuery.es.js";
15
+ export { u as useBackgrounds } from "./index.es2.js";
17
16
  import "react";
18
- import "framer-motion";
19
17
  import "@emotion/css";
18
+ import "uuid";
20
19
  import "react/jsx-runtime";
21
- import "use-sync-external-store/shim";
22
- import "./slot.es.js";
23
20
  import "./box-models.es.js";
24
21
  import "css-box-model";
25
22
  import "./actions.es.js";
@@ -28,9 +25,11 @@ import "next/dynamic";
28
25
  import "./react-page.es.js";
29
26
  import "redux";
30
27
  import "redux-thunk";
28
+ import "./slot.es.js";
31
29
  import "./control.es.js";
32
30
  import "./text-input.es.js";
33
31
  import "./combobox.es.js";
32
+ import "use-sync-external-store/shim";
34
33
  import "slate";
35
34
  import "./types.es.js";
36
35
  import "color";
@@ -46,16 +45,18 @@ import "http-proxy";
46
45
  import "set-cookie-parser";
47
46
  import "uuid/v4";
48
47
  import "corporate-ipsum";
49
- import "./index.es2.js";
48
+ import "./index.es3.js";
50
49
  import "next/link";
50
+ import "framer-motion";
51
51
  import "react-use-gesture";
52
52
  import "@popmotion/popcorn";
53
+ import "./useIsomorphicLayoutEffect.es.js";
53
54
  import "formik";
54
55
  import "next/image";
55
56
  import "./placeholders.es.js";
56
57
  import "./next-version.es.js";
57
58
  import "next/package.json";
58
- import "./index.es3.js";
59
+ import "./index.es4.js";
59
60
  import "polished";
60
61
  import "slate-hotkeys";
61
62
  import "is-hotkey";
@@ -1 +1 @@
1
- {"version":3,"file":"components.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"components.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.cjs.js CHANGED
@@ -1085,7 +1085,7 @@ class Document$1 extends NextDocument__default["default"] {
1085
1085
  });
1086
1086
  }
1087
1087
  }
1088
- const version = "0.5.0";
1088
+ const version = "0.5.1";
1089
1089
  function isErrorWithMessage(error) {
1090
1090
  return typeof error === "object" && error !== null && "message" in error && typeof error.message === "string";
1091
1091
  }
@@ -2881,8 +2881,35 @@ function useResponsiveColor(color) {
2881
2881
  return swatch == null ? null : __spreadProps(__spreadValues({}, rest), { value: { swatch, alpha } });
2882
2882
  }).filter(reactPage.isNonNullable);
2883
2883
  }
2884
- const isSSR = typeof window === "undefined" || /ServerSideRendering/.test(window.navigator && window.navigator.userAgent);
2885
- const useIsomorphicLayoutEffect = isSSR ? React.useEffect : React.useLayoutEffect;
2884
+ const DEVICE_QUERIES = DEVICES.map((device) => ({
2885
+ id: device.id,
2886
+ query: getDeviceMediaQuery(device).replace("@media", "")
2887
+ }));
2888
+ function subscribe(notify) {
2889
+ const cleanUpFns = DEVICE_QUERIES.map((q) => {
2890
+ const mediaQueryList = window.matchMedia(q.query);
2891
+ mediaQueryList.addEventListener("change", notify);
2892
+ return () => mediaQueryList.removeEventListener("change", notify);
2893
+ });
2894
+ return () => cleanUpFns.forEach((fn) => fn());
2895
+ }
2896
+ function useMediaQuery(responsiveValue) {
2897
+ const getServerSnapshot = () => {
2898
+ var _a;
2899
+ return (_a = findDeviceOverride(responsiveValue, DEVICES[0].id)) == null ? void 0 : _a.value;
2900
+ };
2901
+ function getSnapshot() {
2902
+ var _a;
2903
+ const deviceId = DEVICE_QUERIES.reduce((matchedDevice, deviceQueries) => {
2904
+ if (window.matchMedia(deviceQueries.query).matches) {
2905
+ return deviceQueries.id;
2906
+ }
2907
+ return matchedDevice;
2908
+ }, DEVICE_QUERIES[0].id);
2909
+ return (_a = findDeviceOverride(responsiveValue, deviceId)) == null ? void 0 : _a.value;
2910
+ }
2911
+ return shim.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
2912
+ }
2886
2913
  const getIndexes = (spans, index) => {
2887
2914
  const flattened = spans.reduce((a, s) => a.concat(s), []);
2888
2915
  if (index < 0 || index > flattened.length)
@@ -3999,7 +4026,6 @@ exports.colorToString = colorToString;
3999
4026
  exports.deepEqual = deepEqual;
4000
4027
  exports.findDeviceOverride = findDeviceOverride;
4001
4028
  exports.forwardNextDynamicRef = forwardNextDynamicRef;
4002
- exports.getDeviceMediaQuery = getDeviceMediaQuery;
4003
4029
  exports.getServerSideProps = getServerSideProps;
4004
4030
  exports.getStaticPaths = getStaticPaths;
4005
4031
  exports.getStaticProps = getStaticProps;
@@ -4018,8 +4044,8 @@ exports.useFile = useFile;
4018
4044
  exports.useFiles = useFiles;
4019
4045
  exports.useFormContext = useFormContext;
4020
4046
  exports.useIsInBuilder = useIsInBuilder;
4021
- exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
4022
4047
  exports.useMakeswiftClient = useMakeswiftClient;
4048
+ exports.useMediaQuery = useMediaQuery;
4023
4049
  exports.usePageId = usePageId;
4024
4050
  exports.usePagePathnameSlice = usePagePathnameSlice;
4025
4051
  exports.useResponsiveColor = useResponsiveColor;