@makeswift/runtime 0.9.12 → 0.10.0
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/Box.cjs.js +3 -0
- package/dist/Box.cjs.js.map +1 -1
- package/dist/Box.es.js +4 -1
- package/dist/Box.es.js.map +1 -1
- package/dist/Button.cjs.js +3 -2
- package/dist/Button.cjs.js.map +1 -1
- package/dist/Button.es.js +4 -3
- package/dist/Button.es.js.map +1 -1
- package/dist/Carousel.cjs.js +3 -2
- package/dist/Carousel.cjs.js.map +1 -1
- package/dist/Carousel.es.js +4 -3
- package/dist/Carousel.es.js.map +1 -1
- package/dist/Countdown.cjs.js +3 -0
- package/dist/Countdown.cjs.js.map +1 -1
- package/dist/Countdown.es.js +4 -1
- package/dist/Countdown.es.js.map +1 -1
- package/dist/Divider.cjs.js +3 -0
- package/dist/Divider.cjs.js.map +1 -1
- package/dist/Divider.es.js +4 -1
- package/dist/Divider.es.js.map +1 -1
- package/dist/Embed.cjs.js +1 -0
- package/dist/Embed.cjs.js.map +1 -1
- package/dist/Embed.es.js +2 -1
- package/dist/Embed.es.js.map +1 -1
- package/dist/Form.cjs.js +13 -12
- package/dist/Form.cjs.js.map +1 -1
- package/dist/Form.es.js +5 -4
- package/dist/Form.es.js.map +1 -1
- package/dist/Image.cjs.js +11 -10
- package/dist/Image.cjs.js.map +1 -1
- package/dist/Image.es.js +11 -10
- package/dist/Image.es.js.map +1 -1
- package/dist/LiveProvider.cjs.js +3 -0
- package/dist/LiveProvider.cjs.js.map +1 -1
- package/dist/LiveProvider.es.js +5 -2
- package/dist/LiveProvider.es.js.map +1 -1
- package/dist/Navigation.cjs.js +11 -10
- package/dist/Navigation.cjs.js.map +1 -1
- package/dist/Navigation.es.js +11 -10
- package/dist/Navigation.es.js.map +1 -1
- package/dist/PreviewProvider.cjs.js +6 -3
- package/dist/PreviewProvider.cjs.js.map +1 -1
- package/dist/PreviewProvider.es.js +5 -2
- package/dist/PreviewProvider.es.js.map +1 -1
- package/dist/ReadOnlyText.cjs.js +19 -26
- package/dist/ReadOnlyText.cjs.js.map +1 -1
- package/dist/ReadOnlyText.es.js +15 -22
- package/dist/ReadOnlyText.es.js.map +1 -1
- package/dist/ReadOnlyTextV2.cjs.js +29 -26
- package/dist/ReadOnlyTextV2.cjs.js.map +1 -1
- package/dist/ReadOnlyTextV2.es.js +28 -25
- package/dist/ReadOnlyTextV2.es.js.map +1 -1
- package/dist/Root.cjs.js +3 -0
- package/dist/Root.cjs.js.map +1 -1
- package/dist/Root.es.js +4 -1
- package/dist/Root.es.js.map +1 -1
- package/dist/SocialLinks.cjs.js +6 -5
- package/dist/SocialLinks.cjs.js.map +1 -1
- package/dist/SocialLinks.es.js +7 -6
- package/dist/SocialLinks.es.js.map +1 -1
- package/dist/Text.cjs.js +12 -71
- package/dist/Text.cjs.js.map +1 -1
- package/dist/Text.es.js +13 -64
- package/dist/Text.es.js.map +1 -1
- package/dist/Video.cjs.js +1 -0
- package/dist/Video.cjs.js.map +1 -1
- package/dist/Video.es.js +2 -1
- package/dist/Video.es.js.map +1 -1
- package/dist/builder.cjs.js +2 -0
- package/dist/builder.cjs.js.map +1 -1
- package/dist/builder.es.js +2 -0
- package/dist/builder.es.js.map +1 -1
- package/dist/components.cjs.js +3 -2
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.es.js +3 -2
- package/dist/components.es.js.map +1 -1
- package/dist/control-serialization.es.js +1 -1
- package/dist/controls.cjs.js +8 -8
- package/dist/controls.es.js +4 -2
- package/dist/controls.es.js.map +1 -1
- package/dist/index.cjs.js +276 -213
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs3.js +21 -107
- package/dist/index.cjs3.js.map +1 -1
- package/dist/index.cjs4.js +16 -57
- package/dist/index.cjs4.js.map +1 -1
- package/dist/index.cjs5.js +53 -242
- package/dist/index.cjs5.js.map +1 -1
- package/dist/index.cjs6.js +0 -41
- package/dist/index.cjs6.js.map +1 -1
- package/dist/index.cjs7.js +376 -14
- package/dist/index.cjs7.js.map +1 -1
- package/dist/index.cjs8.js +275 -11
- package/dist/index.cjs8.js.map +1 -1
- package/dist/index.es.js +270 -206
- package/dist/index.es.js.map +1 -1
- package/dist/index.es2.js +2 -2
- package/dist/index.es3.js +22 -103
- package/dist/index.es3.js.map +1 -1
- package/dist/index.es4.js +16 -57
- package/dist/index.es4.js.map +1 -1
- package/dist/index.es5.js +53 -240
- package/dist/index.es5.js.map +1 -1
- package/dist/index.es6.js +1 -36
- package/dist/index.es6.js.map +1 -1
- package/dist/index.es7.js +372 -16
- package/dist/index.es7.js.map +1 -1
- package/dist/index.es8.js +270 -10
- package/dist/index.es8.js.map +1 -1
- package/dist/main.cjs.js +2 -0
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +2 -0
- package/dist/main.es.js.map +1 -1
- package/dist/next.cjs.js +3 -0
- package/dist/next.cjs.js.map +1 -1
- package/dist/next.es.js +4 -1
- package/dist/next.es.js.map +1 -1
- package/dist/prop-controllers.cjs.js +2 -0
- package/dist/prop-controllers.cjs.js.map +1 -1
- package/dist/prop-controllers.es.js +2 -0
- package/dist/prop-controllers.es.js.map +1 -1
- package/dist/react-page.cjs.js +1450 -65
- package/dist/react-page.cjs.js.map +1 -1
- package/dist/react-page.es.js +1427 -66
- package/dist/react-page.es.js.map +1 -1
- package/dist/react.cjs.js +3 -0
- package/dist/react.cjs.js.map +1 -1
- package/dist/react.es.js +3 -0
- package/dist/react.es.js.map +1 -1
- package/dist/slate.cjs.js +33 -391
- package/dist/slate.cjs.js.map +1 -1
- package/dist/slate.es.js +15 -376
- package/dist/slate.es.js.map +1 -1
- package/dist/text-input.cjs.js +0 -22
- package/dist/text-input.cjs.js.map +1 -1
- package/dist/text-input.es.js +1 -18
- package/dist/text-input.es.js.map +1 -1
- package/dist/types/src/components/builtin/Text/Text.d.ts +3 -4
- package/dist/types/src/components/builtin/Text/Text.d.ts.map +1 -1
- package/dist/types/src/components/builtin/Text/register.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text/fixtures/v2-data-types.d.ts.map +1 -1
- package/dist/types/src/controls/rich-text/rich-text.d.ts +0 -1
- package/dist/types/src/controls/rich-text/rich-text.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-v2/plugin.d.ts +29 -0
- package/dist/types/src/controls/rich-text-v2/plugin.d.ts.map +1 -0
- package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts +17 -31
- package/dist/types/src/controls/rich-text-v2/rich-text-v2.d.ts.map +1 -1
- package/dist/types/src/next/client.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/descriptors.d.ts +1 -1
- package/dist/types/src/prop-controllers/descriptors.d.ts.map +1 -1
- package/dist/types/src/prop-controllers/introspection.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/control.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/control.d.ts.map +1 -1
- package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/editable-text.d.ts +4 -3
- package/dist/types/src/runtimes/react/controls/rich-text/EditableText/editable-text.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text/EditableText/index.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text/EditableText/useSyncDOMSelection.d.ts.map +1 -0
- package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/useSyncWithBuilder.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text/EditableText/useSyncWithBuilder.d.ts.map +1 -0
- package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/ReadOnlyText.d.ts +2 -2
- package/dist/types/src/runtimes/react/controls/rich-text/ReadOnlyText.d.ts.map +1 -0
- package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/block.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text/components/Element/block.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text/components/Element/element.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text/components/Element/index.d.ts.map +1 -0
- package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/inline.d.ts +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text/components/Element/inline.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text/components/Leaf/index.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text/components/Leaf/leaf.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text/components/index.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text/index.d.ts +2 -0
- package/dist/types/src/runtimes/react/controls/rich-text/index.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/{rich-text.d.ts → rich-text/rich-text.d.ts} +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text/rich-text.d.ts.map +1 -0
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/editable-text-v2.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts +2 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-element.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts +2 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/render-leaf.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/EditableTextV2/useRemoteChanges.d.ts.map +1 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts +2 -1
- package/dist/types/src/runtimes/react/controls/rich-text-v2/ReadOnlyTextV2.d.ts.map +1 -1
- package/dist/types/src/slate/BlockPlugin/index.d.ts +3 -3
- package/dist/types/src/slate/BlockPlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/InlineModePlugin/index.d.ts +6 -4
- package/dist/types/src/slate/InlineModePlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/InlinePlugin/index.d.ts +3 -3
- package/dist/types/src/slate/InlinePlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/InlinePlugin/types.d.ts +1 -1
- package/dist/types/src/slate/InlinePlugin/types.d.ts.map +1 -1
- package/dist/types/src/slate/LinkPlugin/index.d.ts +3 -3
- package/dist/types/src/slate/LinkPlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/LinkPlugin/linkPluginWithoutRenderElement.d.ts +16 -0
- package/dist/types/src/slate/LinkPlugin/linkPluginWithoutRenderElement.d.ts.map +1 -0
- package/dist/types/src/slate/TextAlignPlugin/index.d.ts +3 -3
- package/dist/types/src/slate/TypographyPlugin/index.d.ts +3 -3
- package/dist/types/src/slate/TypographyPlugin/index.d.ts.map +1 -1
- package/dist/types/src/slate/types.d.ts +1 -10
- package/dist/types/src/slate/types.d.ts.map +1 -1
- package/dist/types/src/slate/utils/element.d.ts.map +1 -1
- package/dist/types/src/state/modules/locales.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index.cjs10.js +0 -390
- package/dist/index.cjs10.js.map +0 -1
- package/dist/index.cjs9.js +0 -295
- package/dist/index.cjs9.js.map +0 -1
- package/dist/index.es10.js +0 -383
- package/dist/index.es10.js.map +0 -1
- package/dist/index.es9.js +0 -288
- package/dist/index.es9.js.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/editable-text.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/index.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/useSyncDOMSelection.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/EditableText/useSyncWithBuilder.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/ReadOnlyText.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/components/Element/block.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/components/Element/element.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/components/Element/index.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/components/Element/inline.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/components/Leaf/index.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/components/Leaf/leaf.d.ts.map +0 -1
- package/dist/types/src/components/builtin/Text/components/index.d.ts.map +0 -1
- package/dist/types/src/runtimes/react/controls/rich-text.d.ts.map +0 -1
- package/dist/types.cjs2.js +0 -765
- package/dist/types.cjs2.js.map +0 -1
- package/dist/types.es2.js +0 -748
- package/dist/types.es2.js.map +0 -1
- /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/index.d.ts +0 -0
- /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/EditableText/useSyncDOMSelection.d.ts +0 -0
- /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/element.d.ts +0 -0
- /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Element/index.d.ts +0 -0
- /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Leaf/index.d.ts +0 -0
- /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/Leaf/leaf.d.ts +0 -0
- /package/dist/types/src/{components/builtin/Text → runtimes/react/controls/rich-text}/components/index.d.ts +0 -0
package/dist/index.es2.js
CHANGED
|
@@ -30,9 +30,9 @@ var __objRest = (source, exclude) => {
|
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
32
|
import { useMemo, useState, useEffect, useCallback, useRef, forwardRef, createElement, Children } from "react";
|
|
33
|
-
import {
|
|
33
|
+
import { aD as getBackgroundsFileIds, aE as getBackgroundsSwatchIds, _ as useStyle } from "./react-page.es.js";
|
|
34
34
|
import "use-sync-external-store/shim";
|
|
35
|
-
import {
|
|
35
|
+
import { B as isNonNullable, F as useFiles, G as useSwatches, v as useResponsiveGridItem, c as DEFAULT_BOX_ANIMATE_TYPE, f as DEFAULT_ITEM_ANIMATE_TYPE, e as DEFAULT_BOX_ANIMATE_DURATION, d as DEFAULT_BOX_ANIMATE_DELAY, i as DEFAULT_ITEM_STAGGER_DURATION, n as useResponsiveStyle, q as colorToString } from "./index.es.js";
|
|
36
36
|
import "./actions.es.js";
|
|
37
37
|
import "slate";
|
|
38
38
|
import { u as useMediaQuery } from "./useMediaQuery.es.js";
|
package/dist/index.es3.js
CHANGED
|
@@ -29,112 +29,31 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import {
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import { J as usePagePathnameSlice, K as useElementId } from "./index.es.js";
|
|
32
|
+
import { cx } from "@emotion/css";
|
|
33
|
+
import { _ as useStyle } from "./react-page.es.js";
|
|
34
|
+
import { n as useResponsiveStyle } from "./index.es.js";
|
|
36
35
|
import { jsx } from "react/jsx-runtime";
|
|
37
|
-
|
|
36
|
+
function GutterContainer(_a) {
|
|
38
37
|
var _b = _a, {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
className,
|
|
39
|
+
gutter,
|
|
40
|
+
first,
|
|
41
|
+
last
|
|
42
42
|
} = _b, restOfProps = __objRest(_b, [
|
|
43
|
-
"
|
|
44
|
-
"
|
|
43
|
+
"className",
|
|
44
|
+
"gutter",
|
|
45
|
+
"first",
|
|
46
|
+
"last"
|
|
45
47
|
]);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
let block;
|
|
55
|
-
if (link) {
|
|
56
|
-
switch (link.type) {
|
|
57
|
-
case "OPEN_PAGE": {
|
|
58
|
-
if (page) {
|
|
59
|
-
useNextLink = true;
|
|
60
|
-
href = `/${page.pathname}`;
|
|
61
|
-
}
|
|
62
|
-
target = link.payload.openInNewTab ? "_blank" : "_self";
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
case "OPEN_URL": {
|
|
66
|
-
useNextLink = true;
|
|
67
|
-
href = link.payload.url;
|
|
68
|
-
target = link.payload.openInNewTab ? "_blank" : "_self";
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
case "SEND_EMAIL": {
|
|
72
|
-
useNextLink = false;
|
|
73
|
-
const {
|
|
74
|
-
to,
|
|
75
|
-
subject = "",
|
|
76
|
-
body = ""
|
|
77
|
-
} = link.payload;
|
|
78
|
-
if (to != null)
|
|
79
|
-
href = `mailto:${to}?subject=${subject}&body=${body}`;
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
case "CALL_PHONE": {
|
|
83
|
-
useNextLink = false;
|
|
84
|
-
href = `tel:${link.payload.phoneNumber}`;
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
case "SCROLL_TO_ELEMENT": {
|
|
88
|
-
useNextLink = false;
|
|
89
|
-
href = `#${elementId != null ? elementId : ""}`;
|
|
90
|
-
block = link.payload.block;
|
|
91
|
-
break;
|
|
92
|
-
}
|
|
93
|
-
default:
|
|
94
|
-
throw new RangeError(`Invalid link type "${link.type}."`);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function handleClick(event) {
|
|
98
|
-
onClick(event);
|
|
99
|
-
if (event.defaultPrevented)
|
|
100
|
-
return;
|
|
101
|
-
if (event.currentTarget.isContentEditable)
|
|
102
|
-
return event.preventDefault();
|
|
103
|
-
if (link && link.type === "SCROLL_TO_ELEMENT") {
|
|
104
|
-
let hash;
|
|
105
|
-
try {
|
|
106
|
-
if (href != null)
|
|
107
|
-
hash = new URL(`http://www.example.com/${href}`).hash;
|
|
108
|
-
} catch (error) {
|
|
109
|
-
console.error(`Link received invalid href: ${href}`, error);
|
|
110
|
-
}
|
|
111
|
-
if (href != null && hash != null && href === hash) {
|
|
112
|
-
event.preventDefault();
|
|
113
|
-
const view = event.view;
|
|
114
|
-
scrollIntoView(view.document.querySelector(hash), {
|
|
115
|
-
behavior: "smooth",
|
|
116
|
-
block
|
|
117
|
-
});
|
|
118
|
-
if (view.location.hash !== hash)
|
|
119
|
-
view.history.pushState({}, "", hash);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
if (useNextLink && href != null) {
|
|
124
|
-
return /* @__PURE__ */ jsx(NextLink, __spreadProps(__spreadValues({}, restOfProps), {
|
|
125
|
-
ref,
|
|
126
|
-
target,
|
|
127
|
-
onClick: handleClick,
|
|
128
|
-
href,
|
|
129
|
-
legacyBehavior: false
|
|
130
|
-
}));
|
|
131
|
-
}
|
|
132
|
-
return /* @__PURE__ */ jsx("a", __spreadProps(__spreadValues({}, restOfProps), {
|
|
133
|
-
ref,
|
|
134
|
-
href,
|
|
135
|
-
target,
|
|
136
|
-
onClick: handleClick
|
|
48
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
|
|
49
|
+
className: cx(useStyle(useResponsiveStyle([gutter], ([gutter2 = {
|
|
50
|
+
value: 0,
|
|
51
|
+
unit: "px"
|
|
52
|
+
}]) => ({
|
|
53
|
+
paddingLeft: first ? "0px" : `${gutter2.value / 2}${gutter2.unit}`,
|
|
54
|
+
paddingRight: last ? "0px" : `${gutter2.value / 2}${gutter2.unit}`
|
|
55
|
+
}))), className)
|
|
137
56
|
}));
|
|
138
|
-
}
|
|
139
|
-
export {
|
|
57
|
+
}
|
|
58
|
+
export { GutterContainer as G };
|
|
140
59
|
//# sourceMappingURL=index.es3.js.map
|
package/dist/index.es3.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es3.js","sources":["../src/components/shared/
|
|
1
|
+
{"version":3,"file":"index.es3.js","sources":["../src/components/shared/GutterContainer/index.tsx"],"sourcesContent":["import { cx } from '@emotion/css'\nimport { ComponentPropsWithoutRef } from 'react'\nimport { ResponsiveValue, Length } from '../../../prop-controllers/descriptors'\nimport { useStyle } from '../../../runtimes/react/use-style'\nimport { useResponsiveStyle } from '../../utils/responsive-style'\n\ntype BaseProps = {\n className?: string\n gutter?: ResponsiveValue<Length>\n first: boolean\n last: boolean\n}\n\ntype Props = BaseProps & Omit<ComponentPropsWithoutRef<'div'>, keyof BaseProps>\n\nexport default function GutterContainer({ className, gutter, first, last, ...restOfProps }: Props) {\n return (\n <div\n {...restOfProps}\n className={cx(\n useStyle(\n useResponsiveStyle([gutter] as const, ([gutter = { value: 0, unit: 'px' }]) => ({\n paddingLeft: first ? '0px' : `${gutter.value / 2}${gutter.unit}`,\n paddingRight: last ? '0px' : `${gutter.value / 2}${gutter.unit}`,\n })),\n ),\n className,\n )}\n />\n )\n}\n"],"names":["className","gutter","first","last","restOfProps","cx","useStyle","useResponsiveStyle","value","unit","paddingLeft","paddingRight"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAewC,yBAAA,IAA2D;AAA3D,eAAEA;AAAAA;AAAAA,IAAWC;AAAAA,IAAQC;AAAAA,IAAOC;AAAAA,MAA5B,IAAqCC,wBAArC,IAAqCA;AAAAA,IAAnCJ;AAAAA,IAAWC;AAAAA,IAAQC;AAAAA,IAAOC;AAAAA;AAClE,qEAEQC;IACJ,WAAWC,GACTC,SACEC,mBAAmB,CAACN,MAAD,GAAmB,CAAC,CAACA,UAAS;AAAA,MAAEO,OAAO;AAAA,MAAGC,MAAM;AAAA,IAAA,OAAa;AAAA,MAC9EC,aAAaR,QAAQ,QAAS,GAAED,QAAOO,QAAQ,IAAIP,QAAOQ;AAAAA,MAC1DE,cAAcR,OAAO,QAAS,GAAEF,QAAOO,QAAQ,IAAIP,QAAOQ;AAAAA,IAAAA,EAF1C,CADZ,GAMRT,SAPW;AAAA,EAAA,EAHjB;AAcD;;"}
|
package/dist/index.es4.js
CHANGED
|
@@ -1,59 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
import { cx } from "@emotion/css";
|
|
33
|
-
import { U as useStyle } from "./react-page.es.js";
|
|
34
|
-
import { n as useResponsiveStyle } from "./index.es.js";
|
|
35
|
-
import { jsx } from "react/jsx-runtime";
|
|
36
|
-
function GutterContainer(_a) {
|
|
37
|
-
var _b = _a, {
|
|
38
|
-
className,
|
|
39
|
-
gutter,
|
|
40
|
-
first,
|
|
41
|
-
last
|
|
42
|
-
} = _b, restOfProps = __objRest(_b, [
|
|
43
|
-
"className",
|
|
44
|
-
"gutter",
|
|
45
|
-
"first",
|
|
46
|
-
"last"
|
|
47
|
-
]);
|
|
48
|
-
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({}, restOfProps), {
|
|
49
|
-
className: cx(useStyle(useResponsiveStyle([gutter], ([gutter2 = {
|
|
50
|
-
value: 0,
|
|
51
|
-
unit: "px"
|
|
52
|
-
}]) => ({
|
|
53
|
-
paddingLeft: first ? "0px" : `${gutter2.value / 2}${gutter2.unit}`,
|
|
54
|
-
paddingRight: last ? "0px" : `${gutter2.value / 2}${gutter2.unit}`
|
|
55
|
-
}))), className)
|
|
56
|
-
}));
|
|
1
|
+
import { Transforms, Editor } from "slate";
|
|
2
|
+
import { ReactEditor } from "slate-react";
|
|
3
|
+
function withBuilder(editor) {
|
|
4
|
+
editor.deselectAndBlur = function() {
|
|
5
|
+
ReactEditor.deselect(editor);
|
|
6
|
+
ReactEditor.blur(editor);
|
|
7
|
+
};
|
|
8
|
+
editor.focusAndSelectAll = function() {
|
|
9
|
+
ReactEditor.focus(editor);
|
|
10
|
+
Transforms.select(editor, {
|
|
11
|
+
anchor: Editor.start(editor, []),
|
|
12
|
+
focus: Editor.end(editor, [])
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
return editor;
|
|
57
16
|
}
|
|
58
|
-
export {
|
|
17
|
+
export { withBuilder as w };
|
|
59
18
|
//# sourceMappingURL=index.es4.js.map
|
package/dist/index.es4.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es4.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.es4.js","sources":["../src/slate/BuilderPlugin/index.ts"],"sourcesContent":["import { BaseEditor, Editor, Transforms } from 'slate'\nimport { ReactEditor } from 'slate-react'\n\nexport interface BuilderEditor extends BaseEditor {\n focusAndSelectAll: () => void\n deselectAndBlur: () => void\n}\n\nexport function withBuilder(editor: Editor) {\n editor.deselectAndBlur = function () {\n ReactEditor.deselect(editor)\n ReactEditor.blur(editor)\n }\n\n editor.focusAndSelectAll = function () {\n ReactEditor.focus(editor)\n Transforms.select(editor, {\n anchor: Editor.start(editor, []),\n focus: Editor.end(editor, []),\n })\n }\n\n return editor\n}\n"],"names":[],"mappings":";;AAQO,qBAAqB,QAAgB;AAC1C,SAAO,kBAAkB,WAAY;AACnC,gBAAY,SAAS,MAAM;AAC3B,gBAAY,KAAK,MAAM;AAAA,EAAA;AAGzB,SAAO,oBAAoB,WAAY;AACrC,gBAAY,MAAM,MAAM;AACxB,eAAW,OAAO,QAAQ;AAAA,MACxB,QAAQ,OAAO,MAAM,QAAQ,CAAA,CAAE;AAAA,MAC/B,OAAO,OAAO,IAAI,QAAQ,CAAA,CAAE;AAAA,IAAA,CAC7B;AAAA,EAAA;AAGI,SAAA;AACT;;"}
|
package/dist/index.es5.js
CHANGED
|
@@ -17,256 +17,69 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import "
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
if (atRef.current) {
|
|
42
|
-
const textNodes = Array.from(Editor.nodes(editor, {
|
|
43
|
-
at: atRef.current,
|
|
44
|
-
match: (node) => Text.isText(node) && node.slice === true
|
|
45
|
-
}));
|
|
46
|
-
for (const [node, path] of textNodes) {
|
|
47
|
-
if (Text.isText(node)) {
|
|
48
|
-
const typography = __spreadProps(__spreadValues({}, node.typography), {
|
|
49
|
-
style: []
|
|
50
|
-
});
|
|
51
|
-
Transforms.setNodes(editor, {
|
|
52
|
-
typography
|
|
53
|
-
}, { at: path });
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
atRef.unref();
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
function clearDeviceActiveTypography(editor, currentDeviceId, options) {
|
|
61
|
-
Editor.withoutNormalizing(editor, () => {
|
|
62
|
-
var _a, _b, _c;
|
|
63
|
-
const at = (_a = options == null ? void 0 : options.at) != null ? _a : editor.selection;
|
|
64
|
-
if (!at)
|
|
65
|
-
return;
|
|
66
|
-
const atRef = Editor.rangeRef(editor, at);
|
|
67
|
-
if (atRef.current) {
|
|
68
|
-
Transforms.setNodes(editor, {
|
|
69
|
-
slice: true
|
|
70
|
-
}, {
|
|
71
|
-
at: atRef.current,
|
|
72
|
-
match: (node) => Text.isText(node),
|
|
73
|
-
split: Range.isExpanded(atRef.current)
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
if (atRef.current) {
|
|
77
|
-
const textNodes = Array.from(Editor.nodes(editor, {
|
|
78
|
-
at: atRef.current,
|
|
79
|
-
match: (node) => Text.isText(node) && node.slice === true
|
|
80
|
-
}));
|
|
81
|
-
for (const [node, path] of textNodes) {
|
|
82
|
-
if (Text.isText(node)) {
|
|
83
|
-
const typography = __spreadProps(__spreadValues({}, node.typography), {
|
|
84
|
-
style: (_c = (_b = node == null ? void 0 : node.typography) == null ? void 0 : _b.style.filter(({ deviceId }) => deviceId !== currentDeviceId)) != null ? _c : []
|
|
85
|
-
});
|
|
86
|
-
Transforms.setNodes(editor, {
|
|
87
|
-
typography
|
|
88
|
-
}, { at: path });
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
atRef.unref();
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
function detachActiveTypography(editor, value, options) {
|
|
96
|
-
Editor.withoutNormalizing(editor, () => {
|
|
97
|
-
var _a;
|
|
98
|
-
const at = (_a = options == null ? void 0 : options.at) != null ? _a : editor.selection;
|
|
99
|
-
if (!at)
|
|
100
|
-
return;
|
|
101
|
-
const atRef = Editor.rangeRef(editor, at);
|
|
102
|
-
if (atRef.current) {
|
|
103
|
-
Transforms.setNodes(editor, {
|
|
104
|
-
slice: true
|
|
105
|
-
}, {
|
|
106
|
-
at: atRef.current,
|
|
107
|
-
match: (node) => Text.isText(node),
|
|
108
|
-
split: Range.isExpanded(atRef.current)
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
if (atRef.current) {
|
|
112
|
-
const textNodes = Array.from(Editor.nodes(editor, {
|
|
113
|
-
at: atRef.current,
|
|
114
|
-
match: (node) => Text.isText(node) && node.slice === true
|
|
115
|
-
}));
|
|
116
|
-
for (const [node, path] of textNodes) {
|
|
117
|
-
if (Text.isText(node)) {
|
|
118
|
-
Transforms.setNodes(editor, {
|
|
119
|
-
typography: {
|
|
120
|
-
style: value
|
|
121
|
-
}
|
|
122
|
-
}, { at: path });
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
atRef.unref();
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
function setActiveTypographyId(editor, id, options) {
|
|
20
|
+
import { bQ as ElementUtils, bR as createRichTextV2Plugin, aN as Link, bS as onChange, bT as getValue, bU as isLinkElement, _ as useStyle, bM as InlineType } from "./react-page.es.js";
|
|
21
|
+
import { L as Link$1 } from "./index.es.js";
|
|
22
|
+
import { cx } from "@emotion/css";
|
|
23
|
+
import { jsx, Fragment } from "react/jsx-runtime";
|
|
24
|
+
const withLink = (editor) => {
|
|
25
|
+
const {
|
|
26
|
+
isInline
|
|
27
|
+
} = editor;
|
|
28
|
+
editor.isInline = (entry) => {
|
|
29
|
+
return ElementUtils.isInline(entry) && isInline(entry);
|
|
30
|
+
};
|
|
31
|
+
return editor;
|
|
32
|
+
};
|
|
33
|
+
function InlinePluginComponent({
|
|
34
|
+
element,
|
|
35
|
+
attributes,
|
|
36
|
+
children,
|
|
37
|
+
renderElement
|
|
38
|
+
}) {
|
|
130
39
|
var _a;
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
return;
|
|
134
|
-
Transforms.setNodes(editor, {
|
|
135
|
-
typography: {
|
|
136
|
-
id,
|
|
137
|
-
style: []
|
|
138
|
-
}
|
|
139
|
-
}, {
|
|
140
|
-
at,
|
|
141
|
-
match: (node) => Text.isText(node),
|
|
142
|
-
split: Range.isExpanded(at)
|
|
40
|
+
const linkStyle = useStyle({
|
|
41
|
+
textDecoration: "none"
|
|
143
42
|
});
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
slice: true
|
|
155
|
-
}, {
|
|
156
|
-
at: atRef.current,
|
|
157
|
-
match: (node) => Text.isText(node),
|
|
158
|
-
split: Range.isExpanded(atRef.current)
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
if (atRef.current) {
|
|
162
|
-
const textNodes = Array.from(Editor.nodes(editor, {
|
|
163
|
-
at: atRef.current,
|
|
164
|
-
match: (node) => Text.isText(node) && node.slice === true
|
|
43
|
+
switch (element.type) {
|
|
44
|
+
case InlineType.Link:
|
|
45
|
+
return /* @__PURE__ */ jsx(Link$1, __spreadProps(__spreadValues({}, attributes), {
|
|
46
|
+
link: (_a = element.link) != null ? _a : void 0,
|
|
47
|
+
className: cx(linkStyle, element.className),
|
|
48
|
+
children: renderElement({
|
|
49
|
+
element,
|
|
50
|
+
attributes,
|
|
51
|
+
children
|
|
52
|
+
})
|
|
165
53
|
}));
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
};
|
|
176
|
-
const nextTypography = __spreadProps(__spreadValues({}, node.typography), {
|
|
177
|
-
style: [...deviceOverrides.filter((v) => v.deviceId !== deviceId), nextDeviceStyle]
|
|
178
|
-
});
|
|
179
|
-
Transforms.setNodes(editor, {
|
|
180
|
-
typography: nextTypography
|
|
181
|
-
}, { at: path });
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
atRef.unref();
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
function getValue(editor) {
|
|
189
|
-
const matchingValues = Array.from(Editor.nodes(editor, {
|
|
190
|
-
at: getSelection(editor),
|
|
191
|
-
match: Text.isText
|
|
192
|
-
})).map(([node]) => node["typography"]);
|
|
193
|
-
return matchingValues;
|
|
194
|
-
}
|
|
195
|
-
const TypographyActions = {
|
|
196
|
-
setActiveTypographyId,
|
|
197
|
-
setActiveTypographyStyle,
|
|
198
|
-
clearActiveTypographyStyle,
|
|
199
|
-
clearDeviceActiveTypography,
|
|
200
|
-
detachActiveTypography
|
|
201
|
-
};
|
|
202
|
-
const TYPOGRAPHY_KEY = "typography";
|
|
203
|
-
function withTypography(editor) {
|
|
204
|
-
const { normalizeNode } = editor;
|
|
205
|
-
editor.normalizeNode = (entry) => {
|
|
206
|
-
var _a, _b;
|
|
207
|
-
const [normalizationNode, normalizationPath] = entry;
|
|
208
|
-
if (Text.isText(normalizationNode) && ((_a = normalizationNode == null ? void 0 : normalizationNode.typography) == null ? void 0 : _a.id) == null && ((_b = normalizationNode == null ? void 0 : normalizationNode.typography) == null ? void 0 : _b.style.length) === 0) {
|
|
209
|
-
Transforms.unsetNodes(editor, TYPOGRAPHY_KEY, { at: normalizationPath });
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
if (Text.isText(normalizationNode) && (normalizationNode == null ? void 0 : normalizationNode.slice) != null) {
|
|
213
|
-
Transforms.unsetNodes(editor, "slice", { at: normalizationPath });
|
|
214
|
-
return;
|
|
215
|
-
}
|
|
216
|
-
normalizeNode(entry);
|
|
217
|
-
};
|
|
218
|
-
return editor;
|
|
54
|
+
default:
|
|
55
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
56
|
+
children: renderElement({
|
|
57
|
+
element,
|
|
58
|
+
attributes,
|
|
59
|
+
children
|
|
60
|
+
})
|
|
61
|
+
});
|
|
62
|
+
}
|
|
219
63
|
}
|
|
220
|
-
function
|
|
64
|
+
function LinkPlugin() {
|
|
221
65
|
return createRichTextV2Plugin({
|
|
222
|
-
withPlugin: withTypography,
|
|
223
66
|
control: {
|
|
224
|
-
definition:
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
if (atRef.current) {
|
|
232
|
-
Transforms.setNodes(editor, {
|
|
233
|
-
slice: true
|
|
234
|
-
}, {
|
|
235
|
-
at: atRef.current,
|
|
236
|
-
match: Text.isText,
|
|
237
|
-
split: true
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
if (atRef.current) {
|
|
241
|
-
const nodesToUpdate = Array.from(Editor.nodes(editor, {
|
|
242
|
-
at: atRef.current,
|
|
243
|
-
match: (node) => Text.isText(node) && node.slice === true
|
|
244
|
-
}));
|
|
245
|
-
if (nodesToUpdate.length !== (value == null ? void 0 : value.length))
|
|
246
|
-
return console.error(`TypographyControl.onChange received the wrong number of arguments.
|
|
247
|
-
Called with ${value == null ? void 0 : value.length} values mapping to ${nodesToUpdate.length} nodes.`);
|
|
248
|
-
for (const [index, [, path]] of nodesToUpdate.entries()) {
|
|
249
|
-
Transforms.setNodes(editor, {
|
|
250
|
-
typography: value == null ? void 0 : value.at(index)
|
|
251
|
-
}, { at: path, match: Text.isText });
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
atRef.unref();
|
|
255
|
-
});
|
|
256
|
-
},
|
|
257
|
-
getValue: (editor) => getValue(editor),
|
|
258
|
-
getLeafValue: (text) => {
|
|
259
|
-
return Text.isText(text) ? text.typography : void 0;
|
|
67
|
+
definition: Link({
|
|
68
|
+
label: "On Click"
|
|
69
|
+
}),
|
|
70
|
+
onChange,
|
|
71
|
+
getValue,
|
|
72
|
+
getElementValue: (element) => {
|
|
73
|
+
return ElementUtils.isInline(element) && isLinkElement(element) ? element.link : void 0;
|
|
260
74
|
}
|
|
261
75
|
},
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
})
|
|
76
|
+
withPlugin: withLink,
|
|
77
|
+
renderElement: (renderElement) => (props) => {
|
|
78
|
+
return /* @__PURE__ */ jsx(InlinePluginComponent, __spreadProps(__spreadValues({}, props), {
|
|
79
|
+
renderElement
|
|
267
80
|
}));
|
|
268
81
|
}
|
|
269
82
|
});
|
|
270
83
|
}
|
|
271
|
-
export {
|
|
84
|
+
export { LinkPlugin as L, withLink as w };
|
|
272
85
|
//# sourceMappingURL=index.es5.js.map
|
package/dist/index.es5.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es5.js","sources":["../src/slate/TypographyPlugin/clearActiveTypographyStyle.ts","../src/slate/TypographyPlugin/clearDeviceActiveTypography.ts","../src/slate/TypographyPlugin/detachActiveTypography.ts","../src/slate/TypographyPlugin/setActiveTypographyId.ts","../src/slate/TypographyPlugin/setActiveTypographyStyle.ts","../src/slate/TypographyPlugin/getValue.tsx","../src/slate/TypographyPlugin/index.ts"],"sourcesContent":["import { Editor, Transforms, Text, Range } from 'slate'\nimport { RichTextTypography } from '../types'\n\ntype ClearActiveTypographyStyleOptions = {\n at?: Range\n}\n\nexport function clearActiveTypographyStyle(\n editor: Editor,\n options?: ClearActiveTypographyStyleOptions,\n) {\n Editor.withoutNormalizing(editor, () => {\n const at = options?.at ?? editor.selection\n if (!at) return\n const atRef = Editor.rangeRef(editor, at)\n\n if (atRef.current) {\n Transforms.setNodes(\n editor,\n {\n slice: true,\n },\n {\n at: atRef.current,\n match: node => Text.isText(node),\n split: Range.isExpanded(atRef.current),\n },\n )\n }\n\n if (atRef.current) {\n const textNodes = Array.from(\n Editor.nodes(editor, {\n at: atRef.current,\n match: node => Text.isText(node) && node.slice === true,\n }),\n )\n\n for (const [node, path] of textNodes) {\n if (Text.isText(node)) {\n const typography: RichTextTypography = {\n ...node.typography,\n style: [],\n }\n\n Transforms.setNodes(\n editor,\n {\n typography,\n },\n { at: path },\n )\n }\n }\n }\n\n atRef.unref()\n })\n}\n","import { Editor, Transforms, Text, Range } from 'slate'\nimport { RichTextTypography } from '../types'\n\ntype ClearDeviceActiveTypographyOptions = {\n at?: Range\n}\n\nexport function clearDeviceActiveTypography(\n editor: Editor,\n currentDeviceId: string,\n options?: ClearDeviceActiveTypographyOptions,\n) {\n Editor.withoutNormalizing(editor, () => {\n const at = options?.at ?? editor.selection\n if (!at) return\n const atRef = Editor.rangeRef(editor, at)\n\n if (atRef.current) {\n Transforms.setNodes(\n editor,\n {\n slice: true,\n },\n {\n at: atRef.current,\n match: node => Text.isText(node),\n split: Range.isExpanded(atRef.current),\n },\n )\n }\n\n if (atRef.current) {\n const textNodes = Array.from(\n Editor.nodes(editor, {\n at: atRef.current,\n match: node => Text.isText(node) && node.slice === true,\n }),\n )\n\n for (const [node, path] of textNodes) {\n if (Text.isText(node)) {\n const typography: RichTextTypography = {\n ...node.typography,\n style:\n node?.typography?.style.filter(({ deviceId }) => deviceId !== currentDeviceId) ?? [],\n }\n\n Transforms.setNodes(\n editor,\n {\n typography,\n },\n { at: path },\n )\n }\n }\n }\n\n atRef.unref()\n })\n}\n","import { Editor, Transforms, Text, Range } from 'slate'\nimport { RichTextTypography } from '../types'\n\ntype SetActiveTypographyIdOptions = {\n at?: Range\n}\n\nexport function detachActiveTypography(\n editor: Editor,\n value: RichTextTypography['style'],\n options?: SetActiveTypographyIdOptions,\n) {\n Editor.withoutNormalizing(editor, () => {\n const at = options?.at ?? editor.selection\n if (!at) return\n const atRef = Editor.rangeRef(editor, at)\n\n if (atRef.current) {\n Transforms.setNodes(\n editor,\n {\n slice: true,\n },\n {\n at: atRef.current,\n match: node => Text.isText(node),\n split: Range.isExpanded(atRef.current),\n },\n )\n }\n\n if (atRef.current) {\n const textNodes = Array.from(\n Editor.nodes(editor, {\n at: atRef.current,\n match: node => Text.isText(node) && node.slice === true,\n }),\n )\n\n for (const [node, path] of textNodes) {\n if (Text.isText(node)) {\n Transforms.setNodes(\n editor,\n {\n typography: {\n style: value,\n },\n },\n { at: path },\n )\n }\n }\n }\n\n atRef.unref()\n })\n}\n","import { Editor, Transforms, Text, Range } from 'slate'\n\ntype SetActiveTypographyIdOptions = {\n at?: Range\n}\n\nexport function setActiveTypographyId(\n editor: Editor,\n id?: string,\n options?: SetActiveTypographyIdOptions,\n) {\n const at = options?.at ?? editor.selection\n if (!at) return\n Transforms.setNodes(\n editor,\n {\n typography: {\n id,\n style: [],\n },\n },\n {\n at,\n match: node => Text.isText(node),\n split: Range.isExpanded(at),\n },\n )\n}\n","import { Editor, Transforms, Text, Range } from 'slate'\nimport { Breakpoints, findBreakpointOverride, BreakpointId } from '../../state/modules/breakpoints'\nimport { RichTextTypography } from '../types'\n\ntype SetActiveTypographyStyleOptions = {\n at?: Range\n}\n\nexport function setActiveTypographyStyle(\n editor: Editor,\n breakpoints: Breakpoints,\n deviceId: string,\n prop: string,\n value?: unknown,\n options?: SetActiveTypographyStyleOptions,\n) {\n Editor.withoutNormalizing(editor, () => {\n const at = options?.at ?? editor.selection\n if (!at) return\n const atRef = Editor.rangeRef(editor, at)\n\n if (atRef.current) {\n Transforms.setNodes(\n editor,\n {\n slice: true,\n },\n {\n at: atRef.current,\n match: node => Text.isText(node),\n split: Range.isExpanded(atRef.current),\n },\n )\n }\n\n if (atRef.current) {\n const textNodes = Array.from(\n Editor.nodes(editor, {\n at: atRef.current,\n match: node => Text.isText(node) && node.slice === true,\n }),\n )\n\n for (const [node, path] of textNodes) {\n if (Text.isText(node)) {\n const deviceOverrides = node?.typography?.style ?? []\n const deviceStyle = findBreakpointOverride(\n breakpoints,\n deviceOverrides,\n deviceId as BreakpointId,\n v => v,\n ) || {\n value: {},\n }\n const nextDeviceStyle = {\n deviceId,\n value: { ...deviceStyle.value, [prop]: value },\n }\n\n const nextTypography: RichTextTypography = {\n ...node.typography,\n style: [...deviceOverrides.filter(v => v.deviceId !== deviceId), nextDeviceStyle],\n }\n\n Transforms.setNodes(\n editor,\n {\n typography: nextTypography,\n },\n { at: path },\n )\n }\n }\n }\n\n atRef.unref()\n })\n}\n","import { Editor, Text } from 'slate'\nimport { RichTextTypography } from '../types'\nimport { getSelection } from '../selectors'\n\nexport function getValue(editor: Editor) {\n const matchingValues = Array.from(\n Editor.nodes(editor, {\n at: getSelection(editor),\n match: Text.isText,\n }),\n ).map(([node]) => node['typography']) as (RichTextTypography | undefined)[]\n\n return matchingValues\n}\n","import { Descendant, Editor, NodeEntry, Text, Transforms } from 'slate'\nimport { clearActiveTypographyStyle } from './clearActiveTypographyStyle'\nimport { clearDeviceActiveTypography } from './clearDeviceActiveTypography'\nimport { detachActiveTypography } from './detachActiveTypography'\nimport { setActiveTypographyId } from './setActiveTypographyId'\nimport { setActiveTypographyStyle } from './setActiveTypographyStyle'\nimport { createRichTextV2Plugin, unstable_Typography } from '../../controls'\nimport { getValue } from './getValue'\nimport { getSelection } from '../selectors'\n\nexport const TypographyActions = {\n setActiveTypographyId,\n setActiveTypographyStyle,\n clearActiveTypographyStyle,\n clearDeviceActiveTypography,\n detachActiveTypography,\n}\n\nexport const TYPOGRAPHY_KEY = 'typography'\n\nexport function withTypography(editor: Editor) {\n const { normalizeNode } = editor\n editor.normalizeNode = entry => {\n const [normalizationNode, normalizationPath] = entry\n if (\n Text.isText(normalizationNode) &&\n normalizationNode?.typography?.id == null &&\n normalizationNode?.typography?.style.length === 0\n ) {\n Transforms.unsetNodes(editor, TYPOGRAPHY_KEY, { at: normalizationPath })\n return\n }\n\n if (Text.isText(normalizationNode) && normalizationNode?.slice != null) {\n Transforms.unsetNodes(editor, 'slice', { at: normalizationPath })\n return\n }\n\n normalizeNode(entry)\n }\n\n return editor\n}\n\nexport function TypographyPlugin() {\n return createRichTextV2Plugin({\n withPlugin: withTypography,\n control: {\n definition: unstable_Typography(),\n onChange: (editor, value) => {\n Editor.withoutNormalizing(editor, () => {\n const at = getSelection(editor)\n if (!at) return\n const atRef = Editor.rangeRef(editor, at)\n if (atRef.current) {\n Transforms.setNodes<Descendant>(\n editor,\n {\n slice: true,\n },\n {\n at: atRef.current,\n match: Text.isText,\n split: true,\n },\n )\n }\n\n if (atRef.current) {\n const nodesToUpdate = Array.from(\n Editor.nodes(editor, {\n at: atRef.current,\n match: node => Text.isText(node) && node.slice === true,\n }),\n ) as NodeEntry<Text>[]\n\n if (nodesToUpdate.length !== value?.length)\n return console.error(\n `TypographyControl.onChange received the wrong number of arguments.\nCalled with ${value?.length} values mapping to ${nodesToUpdate.length} nodes.`,\n )\n\n for (const [index, [, path]] of nodesToUpdate.entries()) {\n Transforms.setNodes(\n editor,\n {\n typography: value?.at(index),\n },\n { at: path, match: Text.isText },\n )\n }\n }\n\n atRef.unref()\n })\n },\n getValue: editor => getValue(editor),\n getLeafValue: (text: Text) => {\n return Text.isText(text) ? text.typography : undefined\n },\n },\n renderLeaf: (renderLeaf, className) => props => {\n return renderLeaf({\n ...props,\n leaf: {\n ...props.leaf,\n className: `${props.leaf.className} ${className}`,\n },\n })\n },\n })\n}\n"],"names":["editor","matchingValues","Array","from","Editor","nodes","at","getSelection","match","Text","isText","map","node"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAOO,oCACL,QACA,SACA;AACO,SAAA,mBAAmB,QAAQ,MAAM;;AAChC,UAAA,KAAK,yCAAS,OAAT,YAAe,OAAO;AACjC,QAAI,CAAC;AAAI;AACT,UAAM,QAAQ,OAAO,SAAS,QAAQ,EAAE;AAExC,QAAI,MAAM,SAAS;AACjB,iBAAW,SACT,QACA;AAAA,QACE,OAAO;AAAA,MAAA,GAET;AAAA,QACE,IAAI,MAAM;AAAA,QACV,OAAO,CAAA,SAAQ,KAAK,OAAO,IAAI;AAAA,QAC/B,OAAO,MAAM,WAAW,MAAM,OAAO;AAAA,MAAA,CAEzC;AAAA,IACF;AAEA,QAAI,MAAM,SAAS;AACjB,YAAM,YAAY,MAAM,KACtB,OAAO,MAAM,QAAQ;AAAA,QACnB,IAAI,MAAM;AAAA,QACV,OAAO,CAAQ,SAAA,KAAK,OAAO,IAAI,KAAK,KAAK,UAAU;AAAA,MACpD,CAAA,CACH;AAEW,iBAAA,CAAC,MAAM,SAAS,WAAW;AAChC,YAAA,KAAK,OAAO,IAAI,GAAG;AACrB,gBAAM,aAAiC,iCAClC,KAAK,aAD6B;AAAA,YAErC,OAAO,CAAC;AAAA,UAAA;AAGV,qBAAW,SACT,QACA;AAAA,YACE;AAAA,UAAA,GAEF,EAAE,IAAI,KAAA,CACR;AAAA,QACF;AAAA,MACF;AAAA,IACF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c,eACjD;AAEF,uBAAW,CAAC,OAAO,CAAG,EAAA,UAAU,cAAc,WAAW;AACvD,yBAAW,SACT,QACA;AAAA,gBACE,YAAY,+BAAO,GAAG;AAAA,cAAK,GAE7B,EAAE,IAAI,MAAM,OAAO,KAAK,QAC1B;AAAA,YACF;AAAA,UACF;AAEA,gBAAM,MAAM;AAAA,QAAA,CACb;AAAA,MACH;AAAA,MACA,UAAU,CAAU,WAAA,SAAS,MAAM;AAAA,MACnC,cAAc,CAAC,SAAe;AAC5B,eAAO,KAAK,OAAO,IAAI,IAAI,KAAK,aAAa;AAAA,MAC/C;AAAA,IACF;AAAA,IACA,YAAY,CAAC,YAAY,cAAc,CAAS,UAAA;AAC9C,aAAO,WAAW,iCACb,QADa;AAAA,QAEhB,MAAM,iCACD,MAAM,OADL;AAAA,UAEJ,WAAW,GAAG,MAAM,KAAK,aAAa;AAAA,QACxC;AAAA,MAAA,EACD;AAAA,IACH;AAAA,EAAA,CACD;AACH;;"}
|
|
1
|
+
{"version":3,"file":"index.es5.js","sources":["../src/slate/LinkPlugin/index.tsx"],"sourcesContent":["import { Editor, Element } from 'slate'\nimport { RenderElement, createRichTextV2Plugin } from '../../controls/rich-text-v2/plugin'\nimport { Link } from '../../controls/link'\nimport { ElementUtils } from '../utils/element'\nimport { InlineType } from '../types'\nimport { RenderElementProps } from 'slate-react'\nimport { useStyle } from '../../runtimes/react/use-style'\nimport { Link as LinkComponent } from '../../components/shared/Link'\nimport { cx } from '@emotion/css'\nimport { isLinkElement } from './types'\nimport { onChange } from './onChange'\nimport { getValue } from './getValue'\n\nexport const withLink = (editor: Editor) => {\n const { isInline } = editor\n\n editor.isInline = entry => {\n return ElementUtils.isInline(entry) && isInline(entry)\n }\n\n return editor\n}\n\nfunction InlinePluginComponent({\n element,\n attributes,\n children,\n renderElement,\n}: RenderElementProps & { renderElement: RenderElement }) {\n const linkStyle = useStyle({ textDecoration: 'none' })\n switch (element.type) {\n case InlineType.Link:\n return (\n <LinkComponent\n {...attributes}\n link={element.link ?? undefined}\n className={cx(linkStyle, element.className)}\n >\n {renderElement({\n element,\n attributes,\n children,\n })}\n </LinkComponent>\n )\n\n default:\n return (\n <>\n {renderElement({\n element,\n attributes,\n children,\n })}\n </>\n )\n }\n}\n\nexport function LinkPlugin() {\n return createRichTextV2Plugin({\n control: {\n definition: Link({\n label: 'On Click',\n }),\n onChange,\n getValue,\n getElementValue: (element: Element) => {\n return ElementUtils.isInline(element) && isLinkElement(element) ? element.link : undefined\n },\n },\n withPlugin: withLink,\n renderElement: renderElement => props => {\n return <InlinePluginComponent {...props} renderElement={renderElement} />\n },\n })\n}\n"],"names":["withLink","editor","isInline","entry","ElementUtils","element","attributes","children","renderElement","linkStyle","useStyle","textDecoration","type","InlineType","Link","LinkComponent","link","undefined","cx","className","_Fragment","createRichTextV2Plugin","control","definition","label","onChange","getValue","getElementValue","isLinkElement","withPlugin","props"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAaaA,MAAAA,WAAW,CAACC,WAAmB;AACpC,QAAA;AAAA,IAAEC;AAAAA,MAAaD;AAErBA,SAAOC,WAAWC,CAAS,UAAA;AAClBC,WAAAA,aAAaF,SAASC,KAAtB,KAAgCD,SAASC,KAAD;AAAA,EAAA;AAG1CF,SAAAA;AACR;AAED,+BAA+B;AAAA,EAC7BI;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,GACwD;;AAClDC,QAAAA,YAAYC,SAAS;AAAA,IAAEC,gBAAgB;AAAA,EAAA,CAAnB;AAClBN,UAAAA,QAAQO;AAAAA,SACTC,WAAWC;AAEZ,iCAACC,QAAD,iCACMT,aADN;AAAA,QAEE,MAAMD,cAAQW,SAARX,YAAgBY;AAAAA,QACtB,WAAWC,GAAGT,WAAWJ,QAAQc,SAApB;AAAA,QAHf,UAKGX,cAAc;AAAA,UACbH;AAAAA,UACAC;AAAAA,UACAC;AAAAA,QAAAA,CAHY;AAAA,MAAA,EANlB;AAAA;AAgBE,iCAAAa,UAA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