@blocknote/xl-odt-exporter 0.48.1 → 0.49.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.
|
@@ -57,13 +57,10 @@ var d = (e) => Array.from({ length: e }, () => /* @__PURE__ */ i("text:tab", {})
|
|
|
57
57
|
})
|
|
58
58
|
})), h = (e, t) => t <= 0 ? e : /* @__PURE__ */ i("text:list", { children: /* @__PURE__ */ i("text:list-item", { children: h(e, t - 1) }) }), g = {
|
|
59
59
|
blockMapping: {
|
|
60
|
-
paragraph: (e, t, n) => {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
children: [d(n), t.transformInlineContent(e.content)]
|
|
65
|
-
});
|
|
66
|
-
},
|
|
60
|
+
paragraph: (e, t, n) => /* @__PURE__ */ a("text:p", {
|
|
61
|
+
"text:style-name": f(t, e.props),
|
|
62
|
+
children: [d(n), t.transformInlineContent(e.content)]
|
|
63
|
+
}),
|
|
67
64
|
heading: (e, t, n) => {
|
|
68
65
|
let r = f(t, e.props, "Heading_20_" + e.props.level);
|
|
69
66
|
return /* @__PURE__ */ a("text:h", {
|
|
@@ -72,30 +69,24 @@ var d = (e) => Array.from({ length: e }, () => /* @__PURE__ */ i("text:tab", {})
|
|
|
72
69
|
children: [d(n), t.transformInlineContent(e.content)]
|
|
73
70
|
});
|
|
74
71
|
},
|
|
75
|
-
quote: (e, t, n) => {
|
|
76
|
-
|
|
72
|
+
quote: (e, t, n) => /* @__PURE__ */ a("text:p", {
|
|
73
|
+
"text:style-name": f(t, e.props, "Standard", {}, {
|
|
77
74
|
"fo:border-left": "2pt solid #7D797A",
|
|
78
75
|
"fo:padding-left": "0.25in"
|
|
79
|
-
}, { "fo:color": "#7D797A" })
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
children: [d(n), t.transformInlineContent(e.content)]
|
|
83
|
-
});
|
|
84
|
-
},
|
|
76
|
+
}, { "fo:color": "#7D797A" }),
|
|
77
|
+
children: [d(n), t.transformInlineContent(e.content)]
|
|
78
|
+
}),
|
|
85
79
|
toggleListItem: (e, t) => /* @__PURE__ */ a("text:p", {
|
|
86
80
|
"text:style-name": "Standard",
|
|
87
81
|
children: ["> ", t.transformInlineContent(e.content)]
|
|
88
82
|
}),
|
|
89
|
-
bulletListItem: (e, t, n) => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"text:style-name": "WWNum1",
|
|
93
|
-
children:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}), n) })
|
|
97
|
-
});
|
|
98
|
-
},
|
|
83
|
+
bulletListItem: (e, t, n) => /* @__PURE__ */ i("text:list", {
|
|
84
|
+
"text:style-name": "WWNum1",
|
|
85
|
+
children: /* @__PURE__ */ i("text:list-item", { children: h(/* @__PURE__ */ i("text:p", {
|
|
86
|
+
"text:style-name": f(t, e.props, "Standard", { "style:list-style-name": "WWNum1" }),
|
|
87
|
+
children: t.transformInlineContent(e.content)
|
|
88
|
+
}), n) })
|
|
89
|
+
}),
|
|
99
90
|
numberedListItem: (e, t, n, r) => {
|
|
100
91
|
let a = f(t, e.props), o = (r || 0) > 1 ? "true" : "false";
|
|
101
92
|
return /* @__PURE__ */ i("text:list", {
|
|
@@ -115,18 +106,15 @@ var d = (e) => Array.from({ length: e }, () => /* @__PURE__ */ i("text:tab", {})
|
|
|
115
106
|
children: [e.props.checked ? "☒ " : "☐ ", t.transformInlineContent(e.content)]
|
|
116
107
|
}),
|
|
117
108
|
pageBreak: async () => /* @__PURE__ */ i("text:p", { "text:style-name": "PageBreak" }),
|
|
118
|
-
divider: (e, t) => {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
},
|
|
128
|
-
column: (e, t, n, r, a) => {
|
|
129
|
-
let o = t.registerStyle((e) => /* @__PURE__ */ i("style:style", {
|
|
109
|
+
divider: (e, t) => /* @__PURE__ */ i("text:p", { "text:style-name": f(t, e.props, "Standard", {}, {
|
|
110
|
+
"fo:border-top": "1pt solid #cccccc",
|
|
111
|
+
"fo:margin-top": "11pt",
|
|
112
|
+
"fo:margin-bottom": "12pt",
|
|
113
|
+
"fo:padding-top": "0pt",
|
|
114
|
+
"fo:padding-bottom": "0pt"
|
|
115
|
+
}) }),
|
|
116
|
+
column: (e, t, n, r, a) => /* @__PURE__ */ i("table:table-cell", {
|
|
117
|
+
"table:style-name": t.registerStyle((e) => /* @__PURE__ */ i("style:style", {
|
|
130
118
|
"style:name": e,
|
|
131
119
|
"style:family": "table-cell",
|
|
132
120
|
children: /* @__PURE__ */ i("style:table-cell-properties", {
|
|
@@ -137,12 +125,9 @@ var d = (e) => Array.from({ length: e }, () => /* @__PURE__ */ i("text:tab", {})
|
|
|
137
125
|
"fo:padding-bottom": "0in",
|
|
138
126
|
"fo:padding-right": "0.075in"
|
|
139
127
|
})
|
|
140
|
-
}))
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
children: a
|
|
144
|
-
});
|
|
145
|
-
},
|
|
128
|
+
})),
|
|
129
|
+
children: a
|
|
130
|
+
}),
|
|
146
131
|
columnList: (e, t, n, r, o) => {
|
|
147
132
|
let s = e, c = t, l = c.registerStyle((e) => /* @__PURE__ */ i("style:style", {
|
|
148
133
|
"style:name": e,
|
|
@@ -155,14 +140,11 @@ var d = (e) => Array.from({ length: e }, () => /* @__PURE__ */ i("text:tab", {})
|
|
|
155
140
|
return /* @__PURE__ */ a("table:table", {
|
|
156
141
|
"table:name": e.id,
|
|
157
142
|
"table:style-name": l,
|
|
158
|
-
children: [(s.children || []).map((e, t) => {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}));
|
|
164
|
-
return /* @__PURE__ */ i("table:table-column", { "table:style-name": n }, t);
|
|
165
|
-
}), /* @__PURE__ */ i("table:table-row", { children: o })]
|
|
143
|
+
children: [(s.children || []).map((e, t) => /* @__PURE__ */ i("table:table-column", { "table:style-name": c.registerStyle((t) => /* @__PURE__ */ i("style:style", {
|
|
144
|
+
"style:name": t,
|
|
145
|
+
"style:family": "table-column",
|
|
146
|
+
children: /* @__PURE__ */ i("style:table-column-properties", { "style:rel-column-width": `${e.props.width * 100}*` })
|
|
147
|
+
})) }, t)), /* @__PURE__ */ i("table:table-row", { children: o })]
|
|
166
148
|
});
|
|
167
149
|
},
|
|
168
150
|
image: async (e, t) => {
|
|
@@ -210,12 +192,12 @@ var d = (e) => Array.from({ length: e }, () => /* @__PURE__ */ i("text:tab", {})
|
|
|
210
192
|
"table:name": e.id,
|
|
211
193
|
"table:style-name": c,
|
|
212
194
|
children: [e.content.rows[0]?.cells.map((t, n) => {
|
|
213
|
-
let r = (e.content.columnWidths[n] || 120) * .75
|
|
195
|
+
let r = (e.content.columnWidths[n] || 120) * .75;
|
|
196
|
+
return /* @__PURE__ */ i("table:table-column", { "table:style-name": o.registerStyle((e) => /* @__PURE__ */ i("style:style", {
|
|
214
197
|
"style:name": e,
|
|
215
198
|
"style:family": "table-column",
|
|
216
199
|
children: /* @__PURE__ */ i("style:table-column-properties", { "style:column-width": `${r}pt` })
|
|
217
|
-
}));
|
|
218
|
-
return /* @__PURE__ */ i("table:table-column", { "table:style-name": a }, n);
|
|
200
|
+
})) }, n);
|
|
219
201
|
}), e.content.rows.map((e, r) => /* @__PURE__ */ i("table:table-row", { children: e.cells.map((e, a) => {
|
|
220
202
|
let o = n(e);
|
|
221
203
|
return /* @__PURE__ */ i("table:table-cell", {
|
|
@@ -231,13 +213,10 @@ var d = (e) => Array.from({ length: e }, () => /* @__PURE__ */ i("text:tab", {})
|
|
|
231
213
|
}) }, r))]
|
|
232
214
|
});
|
|
233
215
|
},
|
|
234
|
-
codeBlock: (e) => {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
children: [...t.split("\n").map((e, t) => /* @__PURE__ */ a(r, { children: [t !== 0 && /* @__PURE__ */ i("text:line-break", {}), e] }))]
|
|
239
|
-
});
|
|
240
|
-
},
|
|
216
|
+
codeBlock: (e) => /* @__PURE__ */ i("text:p", {
|
|
217
|
+
"text:style-name": "Codeblock",
|
|
218
|
+
children: [...(e.content[0]?.text || "").split("\n").map((e, t) => /* @__PURE__ */ a(r, { children: [t !== 0 && /* @__PURE__ */ i("text:line-break", {}), e] }))]
|
|
219
|
+
}),
|
|
241
220
|
file: async (e) => /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ i("text:p", {
|
|
242
221
|
"style:style-name": "Standard",
|
|
243
222
|
children: e.props.url ? /* @__PURE__ */ i("text:a", {
|