@makeswift/runtime 0.7.15 → 0.7.17
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/Text.cjs.js +1 -1
- package/dist/Text.es.js +1 -1
- package/dist/controls.es.js +1 -1
- package/dist/index.cjs.js +23 -17
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs5.js +568 -37
- package/dist/index.cjs5.js.map +1 -1
- package/dist/index.cjs6.js +17 -697
- package/dist/index.cjs6.js.map +1 -1
- package/dist/index.cjs7.js +327 -0
- package/dist/index.cjs7.js.map +1 -0
- package/dist/index.es.js +23 -17
- package/dist/index.es.js.map +1 -1
- package/dist/index.es5.js +558 -35
- package/dist/index.es5.js.map +1 -1
- package/dist/index.es6.js +16 -692
- package/dist/index.es6.js.map +1 -1
- package/dist/index.es7.js +320 -0
- package/dist/index.es7.js.map +1 -0
- package/dist/leaf.cjs.js +1 -0
- package/dist/leaf.cjs.js.map +1 -1
- package/dist/leaf.es.js +2 -2
- package/dist/rich-text.cjs.js +76 -49
- package/dist/rich-text.cjs.js.map +1 -1
- package/dist/rich-text.es.js +77 -50
- package/dist/rich-text.es.js.map +1 -1
- package/dist/slate.cjs.js +48 -0
- package/dist/slate.cjs.js.map +1 -0
- package/dist/slate.es.js +39 -0
- package/dist/slate.es.js.map +1 -0
- package/dist/types/src/controls/control.d.ts +4 -3
- package/dist/types/src/controls/control.d.ts.map +1 -1
- package/dist/types/src/controls/list.d.ts +1 -1
- package/dist/types/src/controls/list.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text/dto-types.d.ts +1 -2
- package/dist/types/src/controls/rich-text/dto-types.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text/rich-text.d.ts +1 -1
- package/dist/types/src/controls/rich-text/rich-text.d.ts.map +1 -1
- package/dist/types/src/controls/shape.d.ts +1 -1
- package/dist/types/src/controls/shape.d.ts.map +1 -1
- package/dist/types/src/controls/slot.d.ts +1 -1
- package/dist/types/src/controls/slot.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/instances.d.ts +3 -3
- package/dist/types/src/prop-controllers/instances.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/control.d.ts +3 -2
- package/dist/types/src/runtimes/react/controls/control.d.ts.map +1 -1
- package/package.json +5 -4
- package/slate.js +1 -0
package/dist/LiveProvider.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { U as storeContextDefaultValue, V as StoreContext, W as MakeswiftProvider } from "./index.es.js";
|
|
3
3
|
import { f as configureStore } from "./constants.es.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import "use-sync-external-store/shim/with-selector";
|
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
const import_meta = {};
|
|
21
21
|
import { useMemo, useEffect } from "react";
|
|
22
|
-
import {
|
|
22
|
+
import { Q as deepEqual, T as ElementImperativeHandle, U as storeContextDefaultValue, V as StoreContext, W as MakeswiftProvider } from "./index.es.js";
|
|
23
23
|
import { createStore, applyMiddleware, combineReducers } from "redux";
|
|
24
24
|
import thunk from "redux-thunk";
|
|
25
25
|
import Router from "next/router";
|
package/dist/Text.cjs.js
CHANGED
|
@@ -59,7 +59,7 @@ function _interopDefaultLegacy(e) {
|
|
|
59
59
|
}
|
|
60
60
|
var dynamic__default = /* @__PURE__ */ _interopDefaultLegacy(dynamic);
|
|
61
61
|
const EditableText = next.forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
|
|
62
|
-
return require("./index.
|
|
62
|
+
return require("./index.cjs7.js");
|
|
63
63
|
}))));
|
|
64
64
|
const ReadOnlyText = next.forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
|
|
65
65
|
return require("./ReadOnlyText.cjs.js");
|
package/dist/Text.es.js
CHANGED
|
@@ -52,7 +52,7 @@ import "http-proxy";
|
|
|
52
52
|
import "set-cookie-parser";
|
|
53
53
|
import "uuid";
|
|
54
54
|
import "corporate-ipsum";
|
|
55
|
-
const EditableText = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./index.
|
|
55
|
+
const EditableText = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./index.es7.js"))));
|
|
56
56
|
const ReadOnlyText = forwardNextDynamicRef((patch) => dynamic(() => patch(import("./ReadOnlyText.es.js"))));
|
|
57
57
|
const Text = forwardRef(function Text2(props, ref) {
|
|
58
58
|
const isPreview = useIsPreview();
|
package/dist/controls.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { b as Checkbox, C as CheckboxControlType, c as Number, N as NumberControlType, d as Select, S as SelectControlType, e as TextArea, T as TextAreaControlType, f as TextInput, a as TextInputControlType } from "./text-input.es.js";
|
|
2
|
-
export { aw as BlockTextAlignment, au as BlockType, a2 as Color, C as ColorControlType, a4 as Image, I as ImageControlType, O as ImageControlValueFormat, av as InlineType, a6 as Link,
|
|
2
|
+
export { aw as BlockTextAlignment, au as BlockType, a2 as Color, C as ColorControlType, a4 as Image, I as ImageControlType, O as ImageControlValueFormat, av as InlineType, a6 as Link, U as LinkControlType, a8 as List, aa as ListControl, a9 as ListControlMessageType, L as ListControlType, am as ObjectType, an as RichText, ap as RichTextControl, ao as RichTextControlMessageType, Q as RichTextControlType, ac as Shape, ae as ShapeControl, ad as ShapeControlMessageType, S as ShapeControlType, ag as Slot, ai as SlotControl, ah as SlotControlMessageType, b as SlotControlType, ak as Style, K as StyleControlProperty, a1 as StyleControlType, a as copy, a3 as copyColorData, a5 as copyImageData, a7 as copyLinkData, ab as copyListData, af as copyShapeData, aj as copySlotData, al as copyStyleData, at as richTextDAOToDTO, ar as richTextDTOtoDAO, aq as richTextDTOtoSelection, as as toSelectionDTO } from "./rich-text.es.js";
|
|
3
3
|
export { a as Combobox, C as ComboboxControlType } from "./combobox.es.js";
|
|
4
4
|
import "./actions.es.js";
|
|
5
5
|
import "slate";
|
package/dist/index.cjs.js
CHANGED
|
@@ -1002,7 +1002,7 @@ function useCachedSite(siteId) {
|
|
|
1002
1002
|
const site = shim.useSyncExternalStore(client.subscribe, getSnapshot, getSnapshot);
|
|
1003
1003
|
return site;
|
|
1004
1004
|
}
|
|
1005
|
-
const version = "0.7.
|
|
1005
|
+
const version = "0.7.17";
|
|
1006
1006
|
class Makeswift {
|
|
1007
1007
|
constructor(apiKey, { apiOrigin = "https://api.makeswift.com" } = {}) {
|
|
1008
1008
|
__publicField(this, "apiKey");
|
|
@@ -3437,6 +3437,22 @@ function ListControlValue({
|
|
|
3437
3437
|
function useNumber(numberControlData, controlDefinition) {
|
|
3438
3438
|
return numberControlData != null ? numberControlData : controlDefinition.config.defaultValue;
|
|
3439
3439
|
}
|
|
3440
|
+
const Text = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
|
|
3441
|
+
return require("./index.cjs6.js");
|
|
3442
|
+
}))));
|
|
3443
|
+
function useRichText(data, control) {
|
|
3444
|
+
const textCallbackRef = React.useCallback((handle) => {
|
|
3445
|
+
var _a;
|
|
3446
|
+
if (constants.isPropControllersHandle(handle))
|
|
3447
|
+
(_a = handle == null ? void 0 : handle.setPropControllers) == null ? void 0 : _a.call(handle, control == null ? null : {
|
|
3448
|
+
text: control
|
|
3449
|
+
});
|
|
3450
|
+
}, [control]);
|
|
3451
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Text, {
|
|
3452
|
+
text: data,
|
|
3453
|
+
ref: textCallbackRef
|
|
3454
|
+
});
|
|
3455
|
+
}
|
|
3440
3456
|
function useSelectControlValue(data, definition) {
|
|
3441
3457
|
return data != null ? data : definition == null ? void 0 : definition.config.defaultValue;
|
|
3442
3458
|
}
|
|
@@ -3704,26 +3720,16 @@ function ControlValue({
|
|
|
3704
3720
|
parameters: [data, control],
|
|
3705
3721
|
children: (value) => children(value)
|
|
3706
3722
|
}, definition.type);
|
|
3723
|
+
case richText.RichTextControlType:
|
|
3724
|
+
return /* @__PURE__ */ jsxRuntime.jsx(RenderHook, {
|
|
3725
|
+
hook: useRichText,
|
|
3726
|
+
parameters: [data, control],
|
|
3727
|
+
children: (value) => children(value)
|
|
3728
|
+
}, definition.type);
|
|
3707
3729
|
default:
|
|
3708
3730
|
return children(data);
|
|
3709
3731
|
}
|
|
3710
3732
|
}
|
|
3711
|
-
const Text = forwardNextDynamicRef((patch) => dynamic__default["default"](() => patch(Promise.resolve().then(function() {
|
|
3712
|
-
return require("./index.cjs5.js");
|
|
3713
|
-
}))));
|
|
3714
|
-
function useRichText(data, control) {
|
|
3715
|
-
const textCallbackRef = React.useCallback((handle) => {
|
|
3716
|
-
var _a;
|
|
3717
|
-
if (constants.isPropControllersHandle(handle))
|
|
3718
|
-
(_a = handle == null ? void 0 : handle.setPropControllers) == null ? void 0 : _a.call(handle, control == null ? null : {
|
|
3719
|
-
text: control
|
|
3720
|
-
});
|
|
3721
|
-
}, [control]);
|
|
3722
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Text, {
|
|
3723
|
-
text: data,
|
|
3724
|
-
ref: textCallbackRef
|
|
3725
|
-
});
|
|
3726
|
-
}
|
|
3727
3733
|
function useWidthStyle(value, descriptor) {
|
|
3728
3734
|
return useStyle(responsiveWidth(value, descriptor.options.defaultValue));
|
|
3729
3735
|
}
|