@valbuild/shared 0.56.0 → 0.58.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.
@@ -1170,12 +1170,10 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
1170
1170
|
if (i === lines.length - 1) return [line];
|
1171
1171
|
if (i === lines.length - 1 && line === "") return [];
|
1172
1172
|
if (line === "") return {
|
1173
|
-
tag: "br"
|
1174
|
-
children: []
|
1173
|
+
tag: "br"
|
1175
1174
|
};
|
1176
1175
|
return [line, {
|
1177
|
-
tag: "br"
|
1178
|
-
children: []
|
1176
|
+
tag: "br"
|
1179
1177
|
}];
|
1180
1178
|
});
|
1181
1179
|
children.push.apply(children, _toConsumableArray(tags));
|
@@ -1234,8 +1232,7 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
1234
1232
|
src: core.Internal.convertFileSource(sourceNode).url,
|
1235
1233
|
width: (_sourceNode$metadata = sourceNode.metadata) === null || _sourceNode$metadata === void 0 ? void 0 : _sourceNode$metadata.width,
|
1236
1234
|
height: (_sourceNode$metadata2 = sourceNode.metadata) === null || _sourceNode$metadata2 === void 0 ? void 0 : _sourceNode$metadata2.height,
|
1237
|
-
mimeType: (_sourceNode$metadata3 = sourceNode.metadata) === null || _sourceNode$metadata3 === void 0 ? void 0 : _sourceNode$metadata3.mimeType
|
1238
|
-
children: []
|
1235
|
+
mimeType: (_sourceNode$metadata3 = sourceNode.metadata) === null || _sourceNode$metadata3 === void 0 ? void 0 : _sourceNode$metadata3.mimeType
|
1239
1236
|
});
|
1240
1237
|
}
|
1241
1238
|
cursor = subCursor;
|
@@ -1244,8 +1241,7 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
1244
1241
|
if (token.text.trim().match(br_html_regex)) {
|
1245
1242
|
var _tokens;
|
1246
1243
|
children.push({
|
1247
|
-
tag: "br"
|
1248
|
-
children: []
|
1244
|
+
tag: "br"
|
1249
1245
|
});
|
1250
1246
|
if (((_tokens = tokens[cursor + 1]) === null || _tokens === void 0 ? void 0 : _tokens.raw.trim()) === "") {
|
1251
1247
|
// if next token is a new line or white-spaces, skip it
|
@@ -1266,8 +1262,7 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
1266
1262
|
}
|
1267
1263
|
} else if (token.type === "br") {
|
1268
1264
|
children.push({
|
1269
|
-
tag: "br"
|
1270
|
-
children: []
|
1265
|
+
tag: "br"
|
1271
1266
|
});
|
1272
1267
|
} else {
|
1273
1268
|
console.error("Could not parse markdown: unsupported token type: ".concat(token.type, ". Found: ").concat(token.raw));
|
@@ -1170,12 +1170,10 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
1170
1170
|
if (i === lines.length - 1) return [line];
|
1171
1171
|
if (i === lines.length - 1 && line === "") return [];
|
1172
1172
|
if (line === "") return {
|
1173
|
-
tag: "br"
|
1174
|
-
children: []
|
1173
|
+
tag: "br"
|
1175
1174
|
};
|
1176
1175
|
return [line, {
|
1177
|
-
tag: "br"
|
1178
|
-
children: []
|
1176
|
+
tag: "br"
|
1179
1177
|
}];
|
1180
1178
|
});
|
1181
1179
|
children.push.apply(children, _toConsumableArray(tags));
|
@@ -1234,8 +1232,7 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
1234
1232
|
src: core.Internal.convertFileSource(sourceNode).url,
|
1235
1233
|
width: (_sourceNode$metadata = sourceNode.metadata) === null || _sourceNode$metadata === void 0 ? void 0 : _sourceNode$metadata.width,
|
1236
1234
|
height: (_sourceNode$metadata2 = sourceNode.metadata) === null || _sourceNode$metadata2 === void 0 ? void 0 : _sourceNode$metadata2.height,
|
1237
|
-
mimeType: (_sourceNode$metadata3 = sourceNode.metadata) === null || _sourceNode$metadata3 === void 0 ? void 0 : _sourceNode$metadata3.mimeType
|
1238
|
-
children: []
|
1235
|
+
mimeType: (_sourceNode$metadata3 = sourceNode.metadata) === null || _sourceNode$metadata3 === void 0 ? void 0 : _sourceNode$metadata3.mimeType
|
1239
1236
|
});
|
1240
1237
|
}
|
1241
1238
|
cursor = subCursor;
|
@@ -1244,8 +1241,7 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
1244
1241
|
if (token.text.trim().match(br_html_regex)) {
|
1245
1242
|
var _tokens;
|
1246
1243
|
children.push({
|
1247
|
-
tag: "br"
|
1248
|
-
children: []
|
1244
|
+
tag: "br"
|
1249
1245
|
});
|
1250
1246
|
if (((_tokens = tokens[cursor + 1]) === null || _tokens === void 0 ? void 0 : _tokens.raw.trim()) === "") {
|
1251
1247
|
// if next token is a new line or white-spaces, skip it
|
@@ -1266,8 +1262,7 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
1266
1262
|
}
|
1267
1263
|
} else if (token.type === "br") {
|
1268
1264
|
children.push({
|
1269
|
-
tag: "br"
|
1270
|
-
children: []
|
1265
|
+
tag: "br"
|
1271
1266
|
});
|
1272
1267
|
} else {
|
1273
1268
|
console.error("Could not parse markdown: unsupported token type: ".concat(token.type, ". Found: ").concat(token.raw));
|
@@ -1146,12 +1146,10 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
1146
1146
|
if (i === lines.length - 1) return [line];
|
1147
1147
|
if (i === lines.length - 1 && line === "") return [];
|
1148
1148
|
if (line === "") return {
|
1149
|
-
tag: "br"
|
1150
|
-
children: []
|
1149
|
+
tag: "br"
|
1151
1150
|
};
|
1152
1151
|
return [line, {
|
1153
|
-
tag: "br"
|
1154
|
-
children: []
|
1152
|
+
tag: "br"
|
1155
1153
|
}];
|
1156
1154
|
});
|
1157
1155
|
children.push.apply(children, _toConsumableArray(tags));
|
@@ -1210,8 +1208,7 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
1210
1208
|
src: Internal.convertFileSource(sourceNode).url,
|
1211
1209
|
width: (_sourceNode$metadata = sourceNode.metadata) === null || _sourceNode$metadata === void 0 ? void 0 : _sourceNode$metadata.width,
|
1212
1210
|
height: (_sourceNode$metadata2 = sourceNode.metadata) === null || _sourceNode$metadata2 === void 0 ? void 0 : _sourceNode$metadata2.height,
|
1213
|
-
mimeType: (_sourceNode$metadata3 = sourceNode.metadata) === null || _sourceNode$metadata3 === void 0 ? void 0 : _sourceNode$metadata3.mimeType
|
1214
|
-
children: []
|
1211
|
+
mimeType: (_sourceNode$metadata3 = sourceNode.metadata) === null || _sourceNode$metadata3 === void 0 ? void 0 : _sourceNode$metadata3.mimeType
|
1215
1212
|
});
|
1216
1213
|
}
|
1217
1214
|
cursor = subCursor;
|
@@ -1220,8 +1217,7 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
1220
1217
|
if (token.text.trim().match(br_html_regex)) {
|
1221
1218
|
var _tokens;
|
1222
1219
|
children.push({
|
1223
|
-
tag: "br"
|
1224
|
-
children: []
|
1220
|
+
tag: "br"
|
1225
1221
|
});
|
1226
1222
|
if (((_tokens = tokens[cursor + 1]) === null || _tokens === void 0 ? void 0 : _tokens.raw.trim()) === "") {
|
1227
1223
|
// if next token is a new line or white-spaces, skip it
|
@@ -1242,8 +1238,7 @@ function parseTokens(tokens, sourceNodes, cursor) {
|
|
1242
1238
|
}
|
1243
1239
|
} else if (token.type === "br") {
|
1244
1240
|
children.push({
|
1245
|
-
tag: "br"
|
1246
|
-
children: []
|
1241
|
+
tag: "br"
|
1247
1242
|
});
|
1248
1243
|
} else {
|
1249
1244
|
console.error("Could not parse markdown: unsupported token type: ".concat(token.type, ". Found: ").concat(token.raw));
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@valbuild/shared",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.58.0",
|
4
4
|
"private": false,
|
5
5
|
"description": "Val shared types and utilities",
|
6
6
|
"scripts": {
|
@@ -29,7 +29,7 @@
|
|
29
29
|
"exports": true
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
|
-
"@valbuild/core": "~0.
|
32
|
+
"@valbuild/core": "~0.58.0",
|
33
33
|
"marked": "^9.0.3",
|
34
34
|
"zod": "^3.22.4"
|
35
35
|
},
|