@seed-hypermedia/client 0.0.40 → 0.0.41
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/editor-types.d.ts +2 -0
- package/dist/index.mjs +7 -5
- package/package.json +1 -1
package/dist/editor-types.d.ts
CHANGED
|
@@ -147,6 +147,8 @@ export interface EditorInlineStyles {
|
|
|
147
147
|
range?: boolean;
|
|
148
148
|
textColor?: string;
|
|
149
149
|
backgroundColor?: string;
|
|
150
|
+
textSize?: string;
|
|
151
|
+
textFamily?: string;
|
|
150
152
|
}
|
|
151
153
|
export type EditorAnnotationType = 'bold' | 'italic' | 'underline' | 'strike' | 'code' | 'link' | 'inline-embed' | 'range';
|
|
152
154
|
export type EditorBlockType = EditorBlock['type'];
|
package/dist/index.mjs
CHANGED
|
@@ -4007,7 +4007,7 @@ function hmBlockToEditorBlock(block) {
|
|
|
4007
4007
|
i += codeUnits;
|
|
4008
4008
|
}
|
|
4009
4009
|
function startLeaf(posAnnotations) {
|
|
4010
|
-
var _a2, _b2
|
|
4010
|
+
var _a2, _b2;
|
|
4011
4011
|
const newLeaf = {
|
|
4012
4012
|
type: "text",
|
|
4013
4013
|
text: "",
|
|
@@ -4034,28 +4034,30 @@ function hmBlockToEditorBlock(block) {
|
|
|
4034
4034
|
newLeaf.styles[styleKey] = true;
|
|
4035
4035
|
}
|
|
4036
4036
|
if (annotationData.type === "TextColor") {
|
|
4037
|
-
const
|
|
4037
|
+
const attrs = annotationData.attributes;
|
|
4038
|
+
const color = (attrs == null ? void 0 : attrs.value) ?? (attrs == null ? void 0 : attrs.color);
|
|
4038
4039
|
if (typeof color === "string" && color) {
|
|
4039
4040
|
;
|
|
4040
4041
|
newLeaf.styles.textColor = color;
|
|
4041
4042
|
}
|
|
4042
4043
|
}
|
|
4043
4044
|
if (annotationData.type === "BackgroundColor") {
|
|
4044
|
-
const
|
|
4045
|
+
const attrs = annotationData.attributes;
|
|
4046
|
+
const color = (attrs == null ? void 0 : attrs.value) ?? (attrs == null ? void 0 : attrs.color);
|
|
4045
4047
|
if (typeof color === "string" && color) {
|
|
4046
4048
|
;
|
|
4047
4049
|
newLeaf.styles.backgroundColor = color;
|
|
4048
4050
|
}
|
|
4049
4051
|
}
|
|
4050
4052
|
if (annotationData.type === "TextSize") {
|
|
4051
|
-
const size = (
|
|
4053
|
+
const size = (_a2 = annotationData.attributes) == null ? void 0 : _a2.value;
|
|
4052
4054
|
if (typeof size === "string" && size) {
|
|
4053
4055
|
;
|
|
4054
4056
|
newLeaf.styles.textSize = size;
|
|
4055
4057
|
}
|
|
4056
4058
|
}
|
|
4057
4059
|
if (annotationData.type === "TextFamily") {
|
|
4058
|
-
const family = (
|
|
4060
|
+
const family = (_b2 = annotationData.attributes) == null ? void 0 : _b2.value;
|
|
4059
4061
|
if (typeof family === "string" && family) {
|
|
4060
4062
|
;
|
|
4061
4063
|
newLeaf.styles.textFamily = family;
|