@makeswift/runtime 0.7.13 → 0.7.14
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/ReadOnlyText.cjs.js +15 -26
- package/dist/ReadOnlyText.cjs.js.map +1 -1
- package/dist/ReadOnlyText.es.js +15 -25
- package/dist/ReadOnlyText.es.js.map +1 -1
- package/dist/controls.cjs.js +1 -4
- package/dist/controls.cjs.js.map +1 -1
- package/dist/controls.es.js +1 -2
- package/dist/controls.es.js.map +1 -1
- package/dist/index.cjs.js +2 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs6.js +143 -132
- package/dist/index.cjs6.js.map +1 -1
- package/dist/index.es.js +2 -2
- package/dist/index.es6.js +144 -133
- package/dist/index.es6.js.map +1 -1
- package/dist/introspection.cjs.js +0 -1
- package/dist/introspection.cjs.js.map +1 -1
- package/dist/introspection.es.js +1 -1
- package/dist/{typography.cjs.js → leaf.cjs.js} +49 -12
- package/dist/leaf.cjs.js.map +1 -0
- package/dist/{typography.es.js → leaf.es.js} +49 -12
- package/dist/leaf.es.js.map +1 -0
- package/dist/next.es.js +1 -1
- package/dist/rich-text.cjs.js +29 -43
- package/dist/rich-text.cjs.js.map +1 -1
- package/dist/rich-text.es.js +30 -44
- package/dist/rich-text.es.js.map +1 -1
- package/dist/types/src/components/builtin/Form/components/Field/components/Checkbox/index.d.ts +1 -1
- package/dist/types/src/components/builtin/Text/EditableText/editable-text.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/EditableText/useSyncWithBuilder.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/ReadOnlyText.d.ts +2 -5
- package/dist/types/src/components/builtin/Text/ReadOnlyText.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/components/Leaf/index.d.ts +0 -1
- package/dist/types/src/components/builtin/Text/components/Leaf/index.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts +21 -0
- package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text/index.d.ts +0 -1
- package/dist/types/src/controls/rich-text/index.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text/translation.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text/types.d.ts +47 -27
- package/dist/types/src/controls/rich-text/types.d.ts.map +1 -1
- package/dist/types/src/slate/BlockPlugin/clearBlockKeyForDevice.d.ts +5 -0
- package/dist/types/src/slate/BlockPlugin/clearBlockKeyForDevice.d.ts.map +1 -0
- package/dist/types/src/slate/BlockPlugin/index.d.ts +9 -0
- package/dist/types/src/slate/BlockPlugin/index.d.ts.map +1 -0
- package/dist/types/src/slate/BlockPlugin/setBlockKeyForDevice.d.ts +5 -0
- package/dist/types/src/slate/BlockPlugin/setBlockKeyForDevice.d.ts.map +1 -0
- package/dist/types/src/slate/BlockPlugin/types.d.ts +4 -0
- package/dist/types/src/slate/BlockPlugin/types.d.ts.map +1 -0
- package/dist/types/src/slate/ListPlugin/constants.d.ts.map +1 -0
- package/dist/types/src/slate/ListPlugin/dedent.d.ts.map +1 -0
- package/dist/types/src/slate/ListPlugin/indent.d.ts.map +1 -0
- package/dist/types/src/{components/builtin/Text/EditableText/ListPlugin/ListPlugin.d.ts → slate/ListPlugin/index.d.ts} +6 -2
- package/dist/types/src/slate/ListPlugin/index.d.ts.map +1 -0
- package/dist/types/src/{components/builtin/Text/EditableText/ListPlugin/lib → slate/ListPlugin}/toggleList.d.ts +1 -1
- package/dist/types/src/slate/ListPlugin/toggleList.d.ts.map +1 -0
- package/dist/types/src/slate/ListPlugin/unwrapList.d.ts.map +1 -0
- package/dist/types/src/slate/ListPlugin/utils/filterForSubtreeRoots.d.ts.map +1 -0
- package/dist/types/src/slate/ListPlugin/utils/getSelectedListItems.d.ts.map +1 -0
- package/dist/types/src/slate/ListPlugin/utils/location.d.ts.map +1 -0
- package/dist/types/src/{components/builtin/Text/EditableText/ListPlugin/lib → slate/ListPlugin}/wrapList.d.ts +1 -1
- package/dist/types/src/slate/ListPlugin/wrapList.d.ts.map +1 -0
- package/dist/types/src/slate/TypographyPlugin/clearActiveTypographyStyle.d.ts +3 -0
- package/dist/types/src/slate/TypographyPlugin/clearActiveTypographyStyle.d.ts.map +1 -0
- package/dist/types/src/slate/TypographyPlugin/clearDeviceActiveTypography.d.ts +3 -0
- package/dist/types/src/slate/TypographyPlugin/clearDeviceActiveTypography.d.ts.map +1 -0
- package/dist/types/src/slate/TypographyPlugin/detachActiveTypography.d.ts +4 -0
- package/dist/types/src/slate/TypographyPlugin/detachActiveTypography.d.ts.map +1 -0
- package/dist/types/src/slate/TypographyPlugin/index.d.ts +15 -0
- package/dist/types/src/slate/TypographyPlugin/index.d.ts.map +1 -0
- package/dist/types/src/slate/TypographyPlugin/setActiveTypographyId.d.ts +3 -0
- package/dist/types/src/slate/TypographyPlugin/setActiveTypographyId.d.ts.map +1 -0
- package/dist/types/src/slate/TypographyPlugin/setActiveTypographyStyle.d.ts +3 -0
- package/dist/types/src/slate/TypographyPlugin/setActiveTypographyStyle.d.ts.map +1 -0
- package/dist/types/src/slate/index.d.ts +4 -0
- package/dist/types/src/slate/index.d.ts.map +1 -0
- package/dist/types/src/{components/builtin/Text/EditableText/ListPlugin/lib → slate}/utils/editor.d.ts +1 -1
- package/dist/types/src/slate/utils/editor.d.ts.map +1 -0
- package/dist/types/src/{components/builtin/Text/EditableText/ListPlugin/lib → slate}/utils/element.d.ts +3 -5
- package/dist/types/src/slate/utils/element.d.ts.map +1 -0
- package/package.json +8 -1
- package/dist/compare.cjs.js +0 -126
- package/dist/compare.cjs.js.map +0 -1
- package/dist/compare.es.js +0 -124
- package/dist/compare.es.js.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/ListPlugin.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/constants.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/index.d.ts +0 -2
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/index.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/lib/dedent.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/lib/indent.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/lib/index.d.ts +0 -6
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/lib/index.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/lib/toggleList.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/lib/unwrapList.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/lib/utils/editor.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/lib/utils/element.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/lib/utils/filterForSubtreeRoots.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/lib/utils/getSelectedListItems.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/lib/utils/location.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/lib/wrapList.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/dedent.test.d.ts +0 -3
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/dedent.test.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/indent.test.d.ts +0 -3
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/indent.test.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/normalization.test.d.ts +0 -3
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/normalization.test.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/slate-test-helper.d.ts +0 -48
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/slate-test-helper.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/toggleList.test.d.ts +0 -3
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/toggleList.test.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/types.d.ts +0 -21
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/types.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/unwrapList.test.d.ts +0 -3
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/unwrapList.test.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/utils/filterForSubtreeRoots.test.d.ts +0 -2
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/utils/filterForSubtreeRoots.test.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/utils/getSelectedListItems.test.d.ts +0 -3
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/utils/getSelectedListItems.test.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/wrapList.test.d.ts +0 -3
- package/dist/types/src/components/builtin/Text/EditableText/ListPlugin/test/wrapList.test.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/components/Leaf/typography.d.ts +0 -27
- package/dist/types/src/components/builtin/Text/components/Leaf/typography.d.ts.map +0 -1
- package/dist/types/src/controls/rich-text/compare.d.ts +0 -5
- package/dist/types/src/controls/rich-text/compare.d.ts.map +0 -1
- package/dist/types/src/controls/rich-text/compare.test.d.ts +0 -2
- package/dist/types/src/controls/rich-text/compare.test.d.ts.map +0 -1
- package/dist/typography.cjs.js.map +0 -1
- package/dist/typography.es.js.map +0 -1
- /package/dist/types/src/{components/builtin/Text/EditableText → slate}/ListPlugin/constants.d.ts +0 -0
- /package/dist/types/src/{components/builtin/Text/EditableText/ListPlugin/lib → slate/ListPlugin}/dedent.d.ts +0 -0
- /package/dist/types/src/{components/builtin/Text/EditableText/ListPlugin/lib → slate/ListPlugin}/indent.d.ts +0 -0
- /package/dist/types/src/{components/builtin/Text/EditableText/ListPlugin/lib → slate/ListPlugin}/unwrapList.d.ts +0 -0
- /package/dist/types/src/{components/builtin/Text/EditableText/ListPlugin/lib → slate/ListPlugin}/utils/filterForSubtreeRoots.d.ts +0 -0
- /package/dist/types/src/{components/builtin/Text/EditableText/ListPlugin/lib → slate/ListPlugin}/utils/getSelectedListItems.d.ts +0 -0
- /package/dist/types/src/{components/builtin/Text/EditableText/ListPlugin/lib → slate/ListPlugin}/utils/location.d.ts +0 -0
package/dist/rich-text.es.js
CHANGED
|
@@ -23,7 +23,7 @@ var __publicField = (obj, key, value) => {
|
|
|
23
23
|
};
|
|
24
24
|
const import_meta = {};
|
|
25
25
|
import { A as ActionTypes } from "./actions.es.js";
|
|
26
|
-
import { Transforms, Editor } from "slate";
|
|
26
|
+
import { Transforms, Editor, Text } from "slate";
|
|
27
27
|
import { ReactEditor } from "slate-react";
|
|
28
28
|
const BuilderEditMode = {
|
|
29
29
|
BUILD: "build",
|
|
@@ -1583,10 +1583,6 @@ const ObjectType = {
|
|
|
1583
1583
|
Point: "point",
|
|
1584
1584
|
Operation: "operation"
|
|
1585
1585
|
};
|
|
1586
|
-
const TextType = {
|
|
1587
|
-
Typography: "typography",
|
|
1588
|
-
Text: "text"
|
|
1589
|
-
};
|
|
1590
1586
|
const BlockType = {
|
|
1591
1587
|
Paragraph: "paragraph",
|
|
1592
1588
|
Heading1: "heading-one",
|
|
@@ -1607,22 +1603,19 @@ const InlineType = {
|
|
|
1607
1603
|
SubScript: "subscript",
|
|
1608
1604
|
Link: "link"
|
|
1609
1605
|
};
|
|
1606
|
+
const BlockTextAlignment = {
|
|
1607
|
+
Left: "left",
|
|
1608
|
+
Center: "center",
|
|
1609
|
+
Right: "right",
|
|
1610
|
+
Justify: "justify"
|
|
1611
|
+
};
|
|
1610
1612
|
function toTextDAO(node) {
|
|
1611
1613
|
var _a, _b, _c, _d;
|
|
1612
|
-
const typographyMark = (_a = node.marks) == null ? void 0 : _a.find((mark) => mark.type ===
|
|
1613
|
-
if (typographyMark) {
|
|
1614
|
-
return [
|
|
1615
|
-
{
|
|
1616
|
-
text: (_b = node.text) != null ? _b : "",
|
|
1617
|
-
type: TextType.Typography,
|
|
1618
|
-
typography: (_c = typographyMark.data) == null ? void 0 : _c.value
|
|
1619
|
-
}
|
|
1620
|
-
];
|
|
1621
|
-
}
|
|
1614
|
+
const typographyMark = (_a = node.marks) == null ? void 0 : _a.find((mark) => mark.type === "typography");
|
|
1622
1615
|
return [
|
|
1623
1616
|
{
|
|
1624
|
-
|
|
1625
|
-
|
|
1617
|
+
text: (_b = node.text) != null ? _b : "",
|
|
1618
|
+
typography: (_d = (_c = typographyMark == null ? void 0 : typographyMark.data) == null ? void 0 : _c.value) != null ? _d : void 0
|
|
1626
1619
|
}
|
|
1627
1620
|
];
|
|
1628
1621
|
}
|
|
@@ -1698,31 +1691,24 @@ function richTextDTOtoDAO(data) {
|
|
|
1698
1691
|
return (_c = (_b = (_a = data.document) == null ? void 0 : _a.nodes) == null ? void 0 : _b.flatMap(toNodeDAO)) != null ? _c : [];
|
|
1699
1692
|
}
|
|
1700
1693
|
function toInlineOrTextDTO(node) {
|
|
1694
|
+
if (Text.isText(node)) {
|
|
1695
|
+
return [
|
|
1696
|
+
{
|
|
1697
|
+
text: node.text,
|
|
1698
|
+
object: "text",
|
|
1699
|
+
marks: node.typography ? [
|
|
1700
|
+
{
|
|
1701
|
+
data: {
|
|
1702
|
+
value: node.typography
|
|
1703
|
+
},
|
|
1704
|
+
type: "typography",
|
|
1705
|
+
object: "mark"
|
|
1706
|
+
}
|
|
1707
|
+
] : []
|
|
1708
|
+
}
|
|
1709
|
+
];
|
|
1710
|
+
}
|
|
1701
1711
|
switch (node.type) {
|
|
1702
|
-
case TextType.Typography:
|
|
1703
|
-
return [
|
|
1704
|
-
{
|
|
1705
|
-
object: "text",
|
|
1706
|
-
text: node.text,
|
|
1707
|
-
marks: [
|
|
1708
|
-
{
|
|
1709
|
-
data: {
|
|
1710
|
-
value: node.typography
|
|
1711
|
-
},
|
|
1712
|
-
type: "typography",
|
|
1713
|
-
object: "mark"
|
|
1714
|
-
}
|
|
1715
|
-
]
|
|
1716
|
-
}
|
|
1717
|
-
];
|
|
1718
|
-
case TextType.Text:
|
|
1719
|
-
return [
|
|
1720
|
-
{
|
|
1721
|
-
text: node.text,
|
|
1722
|
-
object: "text",
|
|
1723
|
-
marks: []
|
|
1724
|
-
}
|
|
1725
|
-
];
|
|
1726
1712
|
case InlineType.Link:
|
|
1727
1713
|
return [
|
|
1728
1714
|
{
|
|
@@ -1747,9 +1733,9 @@ function toInlineOrTextDTO(node) {
|
|
|
1747
1733
|
}
|
|
1748
1734
|
function toNodeDTO(node) {
|
|
1749
1735
|
var _a, _b;
|
|
1736
|
+
if (Text.isText(node))
|
|
1737
|
+
return toInlineOrTextDTO(node);
|
|
1750
1738
|
switch (node.type) {
|
|
1751
|
-
case TextType.Typography:
|
|
1752
|
-
case TextType.Text:
|
|
1753
1739
|
case InlineType.Link:
|
|
1754
1740
|
case InlineType.Code:
|
|
1755
1741
|
case InlineType.SubScript:
|
|
@@ -1885,5 +1871,5 @@ class RichTextControl extends PropController {
|
|
|
1885
1871
|
this.send({ type: RichTextControlMessageType.CHANGE_BOX_MODEL, payload: { boxModel } });
|
|
1886
1872
|
}
|
|
1887
1873
|
}
|
|
1888
|
-
export { WidthPropControllerFormat as $, NavigationLinks as A, Backgrounds as B, ColorControlType as C, Date as D, ElementID as E, Font as F, GapY as G, SocialLinks as H, ImageControlType as I, RichText$1 as J, StyleControlProperty as K, ListControlType as L, Margin as M, Number as N, ImageControlValueFormat as O, Padding as P, LinkControlType as Q, RichTextPropControllerMessageType as R, ShapeControlType as S, Types as T, BorderPropControllerFormat as U, Video as V, Width as W, ShadowsPropControllerFormat as X, BorderRadiusPropControllerFormat as Y, MarginPropControllerFormat as Z, PaddingPropControllerFormat as _, copy as a, RichTextControlType as a0, StyleControlType as a1, Color as a2, copyColorData as a3, Image as a4, copyImageData as a5, Link as a6, copyLinkData as a7, List as a8, ListControlMessageType as a9, ListControl as aa, copyListData as ab, Shape as ac, ShapeControlMessageType as ad, ShapeControl as ae, copyShapeData as af, Slot as ag, SlotControlMessageType as ah, SlotControl as ai, copySlotData as aj, Style as ak, copyStyleData as al, ObjectType as am, RichText as an, RichTextControlMessageType as ao, RichTextControl as ap, richTextDTOtoSelection as aq, richTextDTOtoDAO as ar, toSelectionDTO as as, richTextDAOToDTO as at,
|
|
1874
|
+
export { WidthPropControllerFormat as $, NavigationLinks as A, Backgrounds as B, ColorControlType as C, Date as D, ElementID as E, Font as F, GapY as G, SocialLinks as H, ImageControlType as I, RichText$1 as J, StyleControlProperty as K, ListControlType as L, Margin as M, Number as N, ImageControlValueFormat as O, Padding as P, LinkControlType as Q, RichTextPropControllerMessageType as R, ShapeControlType as S, Types as T, BorderPropControllerFormat as U, Video as V, Width as W, ShadowsPropControllerFormat as X, BorderRadiusPropControllerFormat as Y, MarginPropControllerFormat as Z, PaddingPropControllerFormat as _, copy as a, RichTextControlType as a0, StyleControlType as a1, Color as a2, copyColorData as a3, Image as a4, copyImageData as a5, Link as a6, copyLinkData as a7, List as a8, ListControlMessageType as a9, ListControl as aa, copyListData as ab, Shape as ac, ShapeControlMessageType as ad, ShapeControl as ae, copyShapeData as af, Slot as ag, SlotControlMessageType as ah, SlotControl as ai, copySlotData as aj, Style as ak, copyStyleData as al, ObjectType as am, RichText as an, RichTextControlMessageType as ao, RichTextControl as ap, richTextDTOtoSelection as aq, richTextDTOtoDAO as ar, toSelectionDTO as as, richTextDAOToDTO as at, BlockType as au, InlineType as av, BlockTextAlignment as aw, BuilderEditMode as ax, createPropController as ay, SlotControlType as b, copyElementReference as c, descriptors as d, TableFormFieldsMessageType as e, ResponsiveIconRadioGroup as f, Border as g, BorderRadius as h, Shadows as i, GapX as j, ResponsiveSelect as k, ResponsiveNumber as l, Checkbox as m, Grid as n, TextInput as o, Link$1 as p, ResponsiveColor as q, reducer as r, TextStyle as s, Images as t, ResponsiveLength as u, TextArea as v, Table as w, TableFormFields as x, Image$1 as y, ResponsiveOpacity as z };
|
|
1889
1875
|
//# sourceMappingURL=rich-text.es.js.map
|