@makeswift/runtime 0.12.0 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,8 +38,8 @@ var popcorn = require("@popmotion/popcorn");
38
38
  var next = require("./index.cjs.js");
39
39
  require("use-sync-external-store/shim");
40
40
  var reactPage = require("./react-page.cjs.js");
41
- require("./actions.cjs.js");
42
41
  require("ts-pattern");
42
+ require("./actions.cjs.js");
43
43
  require("uuid");
44
44
  require("slate");
45
45
  require("escape-html");
@@ -36,8 +36,8 @@ import { wrap } from "@popmotion/popcorn";
36
36
  import { r as useBreakpoints, n as useResponsiveStyle, q as colorToString } from "./index.es.js";
37
37
  import "use-sync-external-store/shim";
38
38
  import { _ as useStyle } from "./react-page.es.js";
39
- import "./actions.es.js";
40
39
  import "ts-pattern";
40
+ import "./actions.es.js";
41
41
  import "uuid";
42
42
  import "slate";
43
43
  import "escape-html";
@@ -39,8 +39,8 @@ var reactPage = require("./react-page.cjs.js");
39
39
  var jsxRuntime = require("react/jsx-runtime");
40
40
  var next = require("./index.cjs.js");
41
41
  require("use-sync-external-store/shim");
42
- require("./actions.cjs.js");
43
42
  require("ts-pattern");
43
+ require("./actions.cjs.js");
44
44
  require("uuid");
45
45
  require("slate");
46
46
  require("escape-html");
@@ -38,8 +38,8 @@ import { _ as useStyle } from "./react-page.es.js";
38
38
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
39
39
  import { l as useResponsiveColor, p as useResponsiveTextStyle, n as useResponsiveStyle, q as colorToString } from "./index.es.js";
40
40
  import "use-sync-external-store/shim";
41
- import "./actions.es.js";
42
41
  import "ts-pattern";
42
+ import "./actions.es.js";
43
43
  import "uuid";
44
44
  import "slate";
45
45
  import "escape-html";
@@ -23,7 +23,7 @@ import { J as ElementImperativeHandle, a as ReactRuntime, K as StoreContext, M a
23
23
  import { createStore, applyMiddleware, combineReducers } from "redux";
24
24
  import thunk from "redux-thunk";
25
25
  import Router from "next/router";
26
- import { c7 as getInitialState$3, c8 as reducer$4, c9 as getDocument$1, c as createDocument, ca as getComponentsMeta$1, cb as getComponentPropControllerDescriptors$1, ax as getBreakpoints, f as deepEqual, aE as getBuilderEditMode, cc as BuilderEditMode, cd as getDocumentKeysSortedByDepth, ce as getPropController, cf as getPropControllersHandle, cg as getElement, ch as getElementPropControllerDescriptors, ci as createPropController, j as isElementReference, a4 as isPropControllersHandle, cj as reducer$5, ck as reducer$7, cl as reducer$8, cm as reducer$9, cn as reducer$a, co as reducer$b, cp as reducer$c, cq as getInitialState$4 } from "./react-page.es.js";
26
+ import { ca as getInitialState$3, cb as reducer$4, cc as getDocument$1, c as createDocument, cd as getComponentsMeta$1, ce as getComponentPropControllerDescriptors$1, ax as getBreakpoints, f as deepEqual, aE as getBuilderEditMode, cf as BuilderEditMode, cg as getDocumentKeysSortedByDepth, ch as getPropController, ci as getPropControllersHandle, cj as getElement, ck as getElementPropControllerDescriptors, cl as createPropController, j as isElementReference, a4 as isPropControllersHandle, cm as reducer$5, cn as reducer$7, co as reducer$8, cp as reducer$9, cq as reducer$a, cr as reducer$b, cs as reducer$c, ct as getInitialState$4 } from "./react-page.es.js";
27
27
  import { removeIn, setIn } from "immutable";
28
28
  import { A as ActionTypes, v as unregisterMeasurable, w as registerMeasurable, x as registerBuilderComponent, j as setBreakpoints, k as setLocale, y as changePathnameStart, z as changePathnameComplete, B as changeElementBoxModels, C as changeDocumentElementSize, D as handleWheel, E as handlePointerMove, F as elementFromPointChange, G as setIsInBuilder, H as unregisterBuilderComponent, I as unregisterPropControllers, J as registerPropControllers, K as registerPropControllersHandle, r as registerDocument, L as registerComponentHandle, M as messageBuilderPropController, N as registerDocumentEffect } from "./actions.es.js";
29
29
  import { i as isMeasurable, a as getMeasurables$1, b as getBoxModels$1, m as measure, d as getBoxModel$1, r as reducer$6 } from "./box-models.es.js";
@@ -3,10 +3,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  var css = require("@emotion/css");
4
4
  var React = require("react");
5
5
  var next = require("./index.cjs.js");
6
+ require("ts-pattern");
6
7
  var reactPage = require("./react-page.cjs.js");
7
8
  require("./actions.cjs.js");
8
9
  require("slate");
9
- require("ts-pattern");
10
10
  require("uuid");
11
11
  require("escape-html");
12
12
  require("slate-hyperscript");
@@ -1,10 +1,10 @@
1
1
  import { cx } from "@emotion/css";
2
2
  import { forwardRef } from "react";
3
3
  import { L as useEnhancedTypography, N as useTypographyClassName, n as useResponsiveStyle } from "./index.es.js";
4
- import { bA as richTextDTOtoDAO, _ as useStyle, b_ as BlockType, b$ as InlineType } from "./react-page.es.js";
4
+ import "ts-pattern";
5
+ import { bD as richTextDTOtoDAO, _ as useStyle, c1 as BlockType, c2 as InlineType } from "./react-page.es.js";
5
6
  import "./actions.es.js";
6
7
  import "slate";
7
- import "ts-pattern";
8
8
  import "uuid";
9
9
  import "escape-html";
10
10
  import "slate-hyperscript";
@@ -16,10 +16,10 @@ var __objRest = (source, exclude) => {
16
16
  };
17
17
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
18
18
  var React = require("react");
19
+ require("ts-pattern");
19
20
  var reactPage = require("./react-page.cjs.js");
20
21
  require("./actions.cjs.js");
21
22
  require("slate");
22
- require("ts-pattern");
23
23
  require("uuid");
24
24
  require("escape-html");
25
25
  require("slate-hyperscript");
@@ -14,10 +14,10 @@ var __objRest = (source, exclude) => {
14
14
  return target;
15
15
  };
16
16
  import { forwardRef } from "react";
17
- import { bD as RichTextV2Mode, bW as InlineModePlugin, bU as BlockPlugin, bP as TypographyPlugin, bY as TextAlignPlugin, c2 as InlinePlugin, _ as useStyle } from "./react-page.es.js";
17
+ import "ts-pattern";
18
+ import { bG as RichTextV2Mode, bZ as InlineModePlugin, bX as BlockPlugin, bS as TypographyPlugin, b$ as TextAlignPlugin, c5 as InlinePlugin, _ as useStyle } from "./react-page.es.js";
18
19
  import "./actions.es.js";
19
20
  import "slate";
20
- import "ts-pattern";
21
21
  import "uuid";
22
22
  import "escape-html";
23
23
  import "slate-hyperscript";
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  var controlSerialization = require("./control-serialization.cjs.js");
4
+ require("ts-pattern");
4
5
  require("./combobox.cjs.js");
5
6
  require("./react-page.cjs.js");
6
7
  require("redux");
@@ -8,7 +9,6 @@ require("redux-thunk");
8
9
  require("./actions.cjs.js");
9
10
  require("zod");
10
11
  require("./breakpoints.cjs.js");
11
- require("ts-pattern");
12
12
  require("corporate-ipsum");
13
13
  require("slate");
14
14
  require("uuid");
@@ -1,4 +1,5 @@
1
1
  export { d as deserializeControl, b as deserializeControls, e as deserializeFunction, i as isSerializedFunction, s as serializeControl, a as serializeControls, c as serializeFunction } from "./control-serialization.es.js";
2
+ import "ts-pattern";
2
3
  import "./combobox.es.js";
3
4
  import "./react-page.es.js";
4
5
  import "redux";
@@ -6,7 +7,6 @@ import "redux-thunk";
6
7
  import "./actions.es.js";
7
8
  import "zod";
8
9
  import "./breakpoints.es.js";
9
- import "ts-pattern";
10
10
  import "corporate-ipsum";
11
11
  import "slate";
12
12
  import "uuid";
@@ -30,9 +30,9 @@ var __objRest = (source, exclude) => {
30
30
  }
31
31
  return target;
32
32
  };
33
+ require("ts-pattern");
33
34
  var combobox = require("./combobox.cjs.js");
34
35
  var reactPage = require("./react-page.cjs.js");
35
- require("ts-pattern");
36
36
  require("./actions.cjs.js");
37
37
  require("uuid");
38
38
  require("slate");
@@ -30,9 +30,9 @@ var __objRest = (source, exclude) => {
30
30
  return target;
31
31
  };
32
32
  const import_meta = {};
33
+ import "ts-pattern";
33
34
  import { C as ComboboxControlType } from "./combobox.es.js";
34
35
  import { ad as ListControlType, ae as ShapeControlType, ac as StyleV2ControlType, a9 as RichTextV2ControlType, ao as Types } from "./react-page.es.js";
35
- import "ts-pattern";
36
36
  import "./actions.es.js";
37
37
  import "uuid";
38
38
  import "slate";
@@ -26,7 +26,10 @@ exports.CheckboxControlType = number.CheckboxControlType;
26
26
  exports.Number = number.Number;
27
27
  exports.NumberControlType = number.NumberControlType;
28
28
  exports.Color = reactPage.Color;
29
+ exports.ColorControlDataTypeKey = reactPage.ColorControlDataTypeKey;
30
+ exports.ColorControlDataTypeValueV1 = reactPage.ColorControlDataTypeValueV1;
29
31
  exports.ColorControlType = reactPage.ColorControlType;
32
+ exports.ControlDataTypeKey = reactPage.ControlDataTypeKey;
30
33
  exports.IconRadioGroupControlType = reactPage.IconRadioGroupControlType;
31
34
  exports.Image = reactPage.Image$1;
32
35
  exports.ImageControlType = reactPage.ImageControlType;
@@ -1 +1 @@
1
- {"version":3,"file":"controls.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"controls.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  export { a as Checkbox, C as CheckboxControlType, b as Number, N as NumberControlType } from "./number.es.js";
2
- export { aI as Color, ai as ColorControlType, ah as IconRadioGroupControlType, aQ as Image, ag as ImageControlType, a3 as ImageControlValueFormat, aS as Link, af as LinkControlType, aU as List, aW as ListControl, aV as ListControlMessageType, ad as ListControlType, bw as ObjectType, Y as RichText, by as RichTextControl, bx as RichTextControlMessageType, aa as RichTextControlType, bF as RichTextV2Control, bE as RichTextV2ControlMessageType, a9 as RichTextV2ControlType, bD as RichTextV2Mode, b3 as Select, aj as SelectControlType, b4 as Shape, b6 as ShapeControl, b5 as ShapeControlMessageType, ae as ShapeControlType, bf as Slot, bh as SlotControl, bg as SlotControlMessageType, ab as SlotControlType, bl as Style, bn as StyleControl, bm as StyleControlMessageType, a2 as StyleControlProperty, a8 as StyleControlType, bs as StyleV2Control, br as StyleV2ControlMessageType, ac as StyleV2ControlType, bt as TextArea, ak as TextAreaControlType, bu as TextInput, al as TextInputControlType, a7 as TypographyControlType, aK as copy, aJ as copyColorData, aR as copyImageData, aT as copyLinkData, aX as copyListData, bv as copyRichTextData, b7 as copyShapeData, bi as copySlotData, bo as copyStyleData, bI as createRichTextV2Plugin, aY as getListElementChildren, a_ as getListFileIds, b0 as getListPageIds, aZ as getListSwatchIds, b1 as getListTranslatableData, a$ as getListTypographyIds, b8 as getShapeElementChildren, bc as getShapeFileIds, bb as getShapePageIds, b9 as getShapeSwatchIds, bd as getShapeTranslatableData, ba as getShapeTypographyIds, aM as getTranslatableData, bK as getTypographySwatchIds, bL as getTypographyTypographyIds, a5 as isRichTextV1Data, aL as merge, b2 as mergeListTranslatedData, be as mergeShapeTranslatedData, bk as mergeSlotControlTranslatedData, bj as mergeSlotData, aN as mergeTranslatedData, bC as richTextDAOToDTO, bA as richTextDTOtoDAO, bz as richTextDTOtoSelection, bG as richTextV2DataToDescendents, bH as richTextV2DescendentsToData, bB as toSelectionDTO, aP as unstable_IconRadioGroup, aO as unstable_IconRadioGroupIcon, bq as unstable_StyleV2, bJ as unstable_Typography, bp as unstable_useStyleV2ClassName } from "./react-page.es.js";
2
+ export { aL as Color, aJ as ColorControlDataTypeKey, aK as ColorControlDataTypeValueV1, ai as ColorControlType, aI as ControlDataTypeKey, ah as IconRadioGroupControlType, aT as Image, ag as ImageControlType, a3 as ImageControlValueFormat, aV as Link, af as LinkControlType, aX as List, aZ as ListControl, aY as ListControlMessageType, ad as ListControlType, bz as ObjectType, Y as RichText, bB as RichTextControl, bA as RichTextControlMessageType, aa as RichTextControlType, bI as RichTextV2Control, bH as RichTextV2ControlMessageType, a9 as RichTextV2ControlType, bG as RichTextV2Mode, b6 as Select, aj as SelectControlType, b7 as Shape, b9 as ShapeControl, b8 as ShapeControlMessageType, ae as ShapeControlType, bi as Slot, bk as SlotControl, bj as SlotControlMessageType, ab as SlotControlType, bo as Style, bq as StyleControl, bp as StyleControlMessageType, a2 as StyleControlProperty, a8 as StyleControlType, bv as StyleV2Control, bu as StyleV2ControlMessageType, ac as StyleV2ControlType, bw as TextArea, ak as TextAreaControlType, bx as TextInput, al as TextInputControlType, a7 as TypographyControlType, aN as copy, aM as copyColorData, aU as copyImageData, aW as copyLinkData, a_ as copyListData, by as copyRichTextData, ba as copyShapeData, bl as copySlotData, br as copyStyleData, bL as createRichTextV2Plugin, a$ as getListElementChildren, b1 as getListFileIds, b3 as getListPageIds, b0 as getListSwatchIds, b4 as getListTranslatableData, b2 as getListTypographyIds, bb as getShapeElementChildren, bf as getShapeFileIds, be as getShapePageIds, bc as getShapeSwatchIds, bg as getShapeTranslatableData, bd as getShapeTypographyIds, aP as getTranslatableData, bN as getTypographySwatchIds, bO as getTypographyTypographyIds, a5 as isRichTextV1Data, aO as merge, b5 as mergeListTranslatedData, bh as mergeShapeTranslatedData, bn as mergeSlotControlTranslatedData, bm as mergeSlotData, aQ as mergeTranslatedData, bF as richTextDAOToDTO, bD as richTextDTOtoDAO, bC as richTextDTOtoSelection, bJ as richTextV2DataToDescendents, bK as richTextV2DescendentsToData, bE as toSelectionDTO, aS as unstable_IconRadioGroup, aR as unstable_IconRadioGroupIcon, bt as unstable_StyleV2, bM as unstable_Typography, bs as unstable_useStyleV2ClassName } from "./react-page.es.js";
3
3
  export { a as Combobox, C as ComboboxControlType } from "./combobox.es.js";
4
4
  import "redux";
5
5
  import "redux-thunk";
package/dist/index.cjs.js CHANGED
@@ -1251,7 +1251,7 @@ async function fonts(_req, res, { getFonts } = {}) {
1251
1251
  const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
1252
1252
  return res.json(fonts2);
1253
1253
  }
1254
- const version = "0.12.0";
1254
+ const version = "0.12.2";
1255
1255
  async function handler(req, res, { apiKey, siteVersions }) {
1256
1256
  if (req.query.secret !== apiKey) {
1257
1257
  return res.status(401).json({ message: "Unauthorized" });
@@ -1269,12 +1269,13 @@ async function handler(req, res, { apiKey, siteVersions }) {
1269
1269
  });
1270
1270
  }
1271
1271
  async function proxyPreviewMode(req, res, { apiKey }) {
1272
+ var _a, _b;
1272
1273
  const previewModeProxy = httpProxy.createProxyServer();
1273
1274
  const NextRequestMetaSymbol = Reflect.ownKeys(req).find((key) => key.toString() === "Symbol(NextRequestMeta)" || key.toString() === "Symbol(NextInternalRequestMeta)");
1274
1275
  if (NextRequestMetaSymbol) {
1275
1276
  const nextRequestMeta = req[NextRequestMetaSymbol];
1276
- const initUrl = nextRequestMeta == null ? void 0 : nextRequestMeta.__NEXT_INIT_URL;
1277
- const isLocaleStripped = nextRequestMeta == null ? void 0 : nextRequestMeta.__nextStrippedLocale;
1277
+ const initUrl = (_a = nextRequestMeta == null ? void 0 : nextRequestMeta.__NEXT_INIT_URL) != null ? _a : nextRequestMeta == null ? void 0 : nextRequestMeta.initURL;
1278
+ const isLocaleStripped = (_b = nextRequestMeta == null ? void 0 : nextRequestMeta.__nextStrippedLocale) != null ? _b : nextRequestMeta == null ? void 0 : nextRequestMeta.didStripLocale;
1278
1279
  try {
1279
1280
  if (isLocaleStripped && initUrl)
1280
1281
  req.url = new URL(initUrl).pathname;