@makeswift/runtime 0.9.6 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LiveProvider.es.js +1 -1
- package/dist/PreviewProvider.es.js +1 -1
- package/dist/ReadOnlyText.es.js +1 -1
- package/dist/ReadOnlyTextV2.es.js +1 -1
- package/dist/control-serialization.es.js +1 -1
- package/dist/controls.cjs.js +1 -0
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +1 -1
- package/dist/index.cjs.js +9 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +8 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.es10.js +1 -1
- package/dist/index.es2.js +1 -1
- package/dist/index.es5.js +1 -1
- package/dist/index.es6.js +1 -1
- package/dist/index.es9.js +1 -1
- package/dist/react-page.cjs.js +6 -0
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +6 -1
- package/dist/react-page.es.js.map +1 -1
- package/dist/slate.es.js +2 -2
- package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts +2 -0
- package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/introspection.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts +2 -2
- package/dist/types/src/runtimes/react/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
- package/dist/types.es2.js +1 -1
- package/package.json +1 -1
package/dist/LiveProvider.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
2
|
import { a as ReactRuntime, N as StoreContext, O as MakeswiftProvider } from "./index.es.js";
|
|
3
|
-
import {
|
|
3
|
+
import { am as configureStore } from "./react-page.es.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import "use-sync-external-store/shim/with-selector";
|
|
6
6
|
import "next/dynamic";
|
|
@@ -24,7 +24,7 @@ import { createStore, applyMiddleware, combineReducers } from "redux";
|
|
|
24
24
|
import thunk from "redux-thunk";
|
|
25
25
|
import Router from "next/router";
|
|
26
26
|
import { removeIn, setIn } from "immutable";
|
|
27
|
-
import {
|
|
27
|
+
import { bi as getInitialState$3, bj as reducer$4, bk as getDocument$1, c as createDocument, bl as getComponentsMeta$1, bm as getComponentPropControllerDescriptors$1, ao as getBreakpoints, bn as getLocales, bo as getDefaultLocale, av as getBuilderEditMode, bp as BuilderEditMode, bq as getDocumentKeysSortedByDepth, br as getPropController, bs as getPropControllersHandle, bt as getElement, bu as getElementPropControllerDescriptors, bv as createPropController, b as isElementReference, a1 as isPropControllersHandle, bw as reducer$5, bx as reducer$7, by as reducer$8, bz as reducer$9, bA as reducer$a, bB as reducer$b, bC as reducer$c, bD as reducer$e, bE as getInitialState$4 } from "./react-page.es.js";
|
|
28
28
|
import { A as ActionTypes, w as unregisterMeasurable, x as registerMeasurable, y as registerBuilderComponent, j as setBreakpoints, l as setLocales, z as setDefaultLocale, k as setLocale, B as changePathnameStart, C as changePathnameComplete, D as changeElementBoxModels, E as changeDocumentElementSize, F as handleWheel, G as handlePointerMove, H as elementFromPointChange, I as setIsInBuilder, J as unregisterBuilderComponent, K as unregisterPropControllers, L as registerPropControllers, M as registerPropControllersHandle, r as registerDocument, N as registerComponentHandle, O as messageBuilderPropController, P 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";
|
|
30
30
|
import { reducer as reducer$d } from "./state/breakpoints.es.js";
|
package/dist/ReadOnlyText.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cx } from "@emotion/css";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { b6 as richTextDTOtoDAO, U as useStyle, bg as BlockType, be as InlineType } from "./react-page.es.js";
|
|
4
4
|
import { L as Link } from "./index.es3.js";
|
|
5
5
|
import { V as useEnhancedTypography, W as useTypographyClassName, n as useResponsiveStyle } from "./index.es.js";
|
|
6
6
|
import "slate";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cx } from "@emotion/css";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
3
|
import { V as useEnhancedTypography, W as useTypographyClassName, n as useResponsiveStyle } from "./index.es.js";
|
|
4
|
-
import {
|
|
4
|
+
import { b9 as RichTextV2Mode, U as useStyle, bg as BlockType, be as InlineType } from "./react-page.es.js";
|
|
5
5
|
import "./actions.es.js";
|
|
6
6
|
import { L as Link } from "./index.es3.js";
|
|
7
7
|
import "slate";
|
|
@@ -31,7 +31,7 @@ var __objRest = (source, exclude) => {
|
|
|
31
31
|
};
|
|
32
32
|
const import_meta = {};
|
|
33
33
|
import { C as ComboboxControlType } from "./combobox.es.js";
|
|
34
|
-
import {
|
|
34
|
+
import { a8 as ListControlType, a9 as ShapeControlType, a7 as StyleV2ControlType, a4 as RichTextV2ControlType, af as Types } from "./react-page.es.js";
|
|
35
35
|
import "./actions.es.js";
|
|
36
36
|
import "slate";
|
|
37
37
|
function isSerializedFunction(value) {
|
package/dist/controls.cjs.js
CHANGED
|
@@ -75,6 +75,7 @@ exports.copyStyleData = reactPage.copyStyleData;
|
|
|
75
75
|
exports.createRichTextV2Plugin = reactPage.createRichTextV2Plugin;
|
|
76
76
|
exports.introspectListData = reactPage.introspectListData;
|
|
77
77
|
exports.introspectShapeData = reactPage.introspectShapeData;
|
|
78
|
+
exports.isRichTextV1Data = reactPage.isRichTextV1Data;
|
|
78
79
|
exports.merge = reactPage.merge;
|
|
79
80
|
exports.mergeSlotData = reactPage.mergeSlotData;
|
|
80
81
|
exports.richTextDAOToDTO = reactPage.richTextDAOToDTO;
|
package/dist/controls.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controls.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"controls.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/controls.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { c as Checkbox, C as CheckboxControlType, I as IconRadioGroupControlType, e as Number, N as NumberControlType, f as Select, S as SelectControlType, g as TextArea, a as TextAreaControlType, h as TextInput, b as TextInputControlType, T as TypographyControlType, d as unstable_IconRadioGroup, u as unstable_IconRadioGroupIcon, i as unstable_Typography } from "./typography.es.js";
|
|
2
|
-
export {
|
|
2
|
+
export { ay as Color, ac as ColorControlType, aC as Image, ab as ImageControlType, a0 as ImageControlValueFormat, aE as Link, aa as LinkControlType, aG as List, aI as ListControl, aH as ListControlMessageType, a8 as ListControlType, b1 as ObjectType, b2 as RichText, b4 as RichTextControl, b3 as RichTextControlMessageType, a5 as RichTextControlType, bd as RichTextV2Control, bc as RichTextV2ControlMessageType, a4 as RichTextV2ControlType, b9 as RichTextV2Mode, aL as Shape, aN as ShapeControl, aM as ShapeControlMessageType, a9 as ShapeControlType, aQ as Slot, aS as SlotControl, aR as SlotControlMessageType, a6 as SlotControlType, aV as Style, aX as StyleControl, aW as StyleControlMessageType, $ as StyleControlProperty, a3 as StyleControlType, b0 as StyleV2Control, a$ as StyleV2ControlMessageType, a7 as StyleV2ControlType, aA as copy, az as copyColorData, aD as copyImageData, aF as copyLinkData, aJ as copyListData, aO as copyShapeData, aT as copySlotData, aY as copyStyleData, ba as createRichTextV2Plugin, aK as introspectListData, aP as introspectShapeData, a2 as isRichTextV1Data, aB as merge, aU as mergeSlotData, b8 as richTextDAOToDTO, b6 as richTextDTOtoDAO, b5 as richTextDTOtoSelection, b7 as toSelectionDTO, bb as unstable_RichTextV2, a_ as unstable_StyleV2, aZ 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
|
@@ -1178,7 +1178,7 @@ async function fonts(_req, res, { getFonts } = {}) {
|
|
|
1178
1178
|
const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
|
|
1179
1179
|
return res.json(fonts2);
|
|
1180
1180
|
}
|
|
1181
|
-
const version = "0.9.
|
|
1181
|
+
const version = "0.9.7";
|
|
1182
1182
|
async function handler(req, res, { apiKey, unstable_siteVersions }) {
|
|
1183
1183
|
if (req.query.secret !== apiKey) {
|
|
1184
1184
|
return res.status(401).json({ message: "Unauthorized" });
|
|
@@ -3180,8 +3180,16 @@ const EditableText = forwardNextDynamicRef((patch) => dynamic__default["default"
|
|
|
3180
3180
|
const ReadOnlyText = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
|
|
3181
3181
|
return require("./ReadOnlyTextV2.cjs.js");
|
|
3182
3182
|
}))));
|
|
3183
|
+
const ReadOnlyTextV1 = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
|
|
3184
|
+
return require("./ReadOnlyText.cjs.js");
|
|
3185
|
+
}))));
|
|
3183
3186
|
function useRichTextV2(data, definition, control) {
|
|
3184
3187
|
const isPreview = useIsPreview();
|
|
3188
|
+
if (reactPage.isRichTextV1Data(data)) {
|
|
3189
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ReadOnlyTextV1, {
|
|
3190
|
+
text: data
|
|
3191
|
+
});
|
|
3192
|
+
}
|
|
3185
3193
|
return isPreview ? /* @__PURE__ */ jsxRuntime.jsx(EditableText, {
|
|
3186
3194
|
text: data,
|
|
3187
3195
|
definition,
|