tsondb 0.20.6 → 0.20.7
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/src/web/web.js +22 -16
- package/package.json +8 -8
package/dist/src/web/web.js
CHANGED
|
@@ -682,7 +682,7 @@ const request = async (method, url, options)=>{
|
|
|
682
682
|
if (!response.ok) throw new Error(await response.text());
|
|
683
683
|
return (options.getResult ?? ((response)=>{
|
|
684
684
|
if (response.headers.get("Content-Type")?.startsWith("application/json") === true) return response.json();
|
|
685
|
-
return Promise.resolve();
|
|
685
|
+
else return Promise.resolve();
|
|
686
686
|
}))(response);
|
|
687
687
|
};
|
|
688
688
|
const api_getResource = async (url, options)=>request("GET", url, options);
|
|
@@ -897,8 +897,7 @@ function signals_core_module_a(i) {
|
|
|
897
897
|
i.n = t;
|
|
898
898
|
if (32 & signals_core_module_o.f) i.S(t);
|
|
899
899
|
return t;
|
|
900
|
-
}
|
|
901
|
-
if (-1 === t.i) {
|
|
900
|
+
} else if (-1 === t.i) {
|
|
902
901
|
t.i = 0;
|
|
903
902
|
if (void 0 !== t.n) {
|
|
904
903
|
t.n.p = t.p;
|
|
@@ -2410,7 +2409,7 @@ const splitStringParts = (str)=>[
|
|
|
2410
2409
|
...acc.slice(0, -1),
|
|
2411
2410
|
lastPart + char
|
|
2412
2411
|
];
|
|
2413
|
-
return [
|
|
2412
|
+
else return [
|
|
2414
2413
|
...acc,
|
|
2415
2414
|
char
|
|
2416
2415
|
];
|
|
@@ -2420,7 +2419,7 @@ const splitStringParts = (str)=>[
|
|
|
2420
2419
|
lastPart + char
|
|
2421
2420
|
];
|
|
2422
2421
|
if ("" === lastPart) return acc;
|
|
2423
|
-
return [
|
|
2422
|
+
else return [
|
|
2424
2423
|
...acc,
|
|
2425
2424
|
""
|
|
2426
2425
|
];
|
|
@@ -2453,7 +2452,7 @@ const getSerializedDisplayNameFromEntityInstance = (entity, instance, defaultNam
|
|
|
2453
2452
|
name: getValueAtPath(instance, displayNamePath) ?? defaultName,
|
|
2454
2453
|
localeId: locales[0]
|
|
2455
2454
|
};
|
|
2456
|
-
{
|
|
2455
|
+
else {
|
|
2457
2456
|
const localeMapPath = displayNamePath.pathToLocaleMap ?? "translations";
|
|
2458
2457
|
const localeMap = getValueAtPath(instance, localeMapPath);
|
|
2459
2458
|
const pathInLocaleMap = displayNamePath.pathInLocaleMap ?? "name";
|
|
@@ -2467,6 +2466,7 @@ const getSerializedDisplayNameFromEntityInstance = (entity, instance, defaultNam
|
|
|
2467
2466
|
name: possibleName,
|
|
2468
2467
|
localeId: locale
|
|
2469
2468
|
};
|
|
2469
|
+
else return;
|
|
2470
2470
|
}, void 0) ?? {
|
|
2471
2471
|
name: getValueAtPath(localeMap[availableLocales[0]], pathInLocaleMap) ?? defaultName
|
|
2472
2472
|
};
|
|
@@ -3281,7 +3281,7 @@ const asText = (content)=>({
|
|
|
3281
3281
|
type: "text",
|
|
3282
3282
|
content
|
|
3283
3283
|
});
|
|
3284
|
-
const inline_text = (syntaxStartCharacters)=>anyStopOn(syntaxStartCharacters).then((result)=>
|
|
3284
|
+
const inline_text = (syntaxStartCharacters)=>anyStopOn(syntaxStartCharacters).then((result)=>StateTParser.getsT((state)=>state.keepSyntax || state.preserveEscapes).map((keepSyntax)=>asText(keepSyntax ? result : parseEscapedCharacters(result))));
|
|
3285
3285
|
const codeDelimiter = state_syntax(StateTParser.string("`"));
|
|
3286
3286
|
const codeText = anyStopOn([
|
|
3287
3287
|
"`"
|
|
@@ -3404,10 +3404,11 @@ const inlineNode = combineParsers([
|
|
|
3404
3404
|
leafParser(defaultInlineSyntaxStartSequences)
|
|
3405
3405
|
]);
|
|
3406
3406
|
const inlineMarkdown = inlineNode.many();
|
|
3407
|
-
const _parseInlineMarkdown = (syntax, keepSyntax = false)=>{
|
|
3407
|
+
const _parseInlineMarkdown = (syntax, keepSyntax = false, preserveEscapes = false)=>{
|
|
3408
3408
|
const results = inlineMarkdown.evalT({
|
|
3409
3409
|
indentation: 0,
|
|
3410
|
-
keepSyntax
|
|
3410
|
+
keepSyntax,
|
|
3411
|
+
preserveEscapes
|
|
3411
3412
|
}).parse(syntax);
|
|
3412
3413
|
if (!isNotEmpty(results)) throw new Error("Failed to parse");
|
|
3413
3414
|
const [result, remaining] = results[0];
|
|
@@ -3750,7 +3751,7 @@ const sectionRows = (rows)=>{
|
|
|
3750
3751
|
}
|
|
3751
3752
|
return acc;
|
|
3752
3753
|
}, []);
|
|
3753
|
-
return rows.map((row)=>({
|
|
3754
|
+
else return rows.map((row)=>({
|
|
3754
3755
|
type: "tableRow",
|
|
3755
3756
|
cells: row.map(mapCellObj)
|
|
3756
3757
|
}));
|
|
@@ -3789,10 +3790,11 @@ const finalBlockMarkdownSyntax = anyBlankLines.then((leadingsNewlines)=>blockMar
|
|
|
3789
3790
|
content: "\n"
|
|
3790
3791
|
} : node)
|
|
3791
3792
|
])));
|
|
3792
|
-
const
|
|
3793
|
+
const _parseBlockMarkdown = (syntax, keepSyntax = false, preserveEscapes = false)=>{
|
|
3793
3794
|
const results = finalBlockMarkdown.evalT({
|
|
3794
3795
|
indentation: 0,
|
|
3795
|
-
keepSyntax
|
|
3796
|
+
keepSyntax,
|
|
3797
|
+
preserveEscapes
|
|
3796
3798
|
}).parse(syntax);
|
|
3797
3799
|
if (!isNotEmpty(results)) throw new Error("Failed to parse");
|
|
3798
3800
|
const [result = [], remaining] = results[0];
|
|
@@ -3810,10 +3812,12 @@ const parseBlockMarkdown = (syntax)=>{
|
|
|
3810
3812
|
];
|
|
3811
3813
|
return result;
|
|
3812
3814
|
};
|
|
3815
|
+
const parseBlockMarkdown = (syntax)=>_parseBlockMarkdown(syntax);
|
|
3813
3816
|
const parseBlockMarkdownForSyntaxHighlighting = (syntax)=>{
|
|
3814
3817
|
const results = finalBlockMarkdownSyntax.evalT({
|
|
3815
3818
|
indentation: 0,
|
|
3816
|
-
keepSyntax: true
|
|
3819
|
+
keepSyntax: true,
|
|
3820
|
+
preserveEscapes: false
|
|
3817
3821
|
}).parse(syntax);
|
|
3818
3822
|
if (!isNotEmpty(results)) throw new Error("Failed to parse");
|
|
3819
3823
|
const [result, remaining] = results[0];
|
|
@@ -5470,7 +5474,8 @@ const positionInStringToColumnAndRow = (position, string)=>{
|
|
|
5470
5474
|
const validateInline = (markdown)=>{
|
|
5471
5475
|
const results = inlineMarkdown.evalT({
|
|
5472
5476
|
indentation: 0,
|
|
5473
|
-
keepSyntax: false
|
|
5477
|
+
keepSyntax: false,
|
|
5478
|
+
preserveEscapes: false
|
|
5474
5479
|
}).parse(markdown);
|
|
5475
5480
|
if (!isNotEmpty(results)) return new InternalMarkdownError("Failed to parse inline Markdown");
|
|
5476
5481
|
const [_, remaining] = results[0];
|
|
@@ -5482,7 +5487,8 @@ const validateInline = (markdown)=>{
|
|
|
5482
5487
|
const validate = (markdown)=>{
|
|
5483
5488
|
const results = finalBlockMarkdown.evalT({
|
|
5484
5489
|
indentation: 0,
|
|
5485
|
-
keepSyntax: false
|
|
5490
|
+
keepSyntax: false,
|
|
5491
|
+
preserveEscapes: false
|
|
5486
5492
|
}).parse(markdown);
|
|
5487
5493
|
if (!isNotEmpty(results)) return new InternalMarkdownError("Failed to parse Markdown");
|
|
5488
5494
|
const [_, remaining] = results[0];
|
|
@@ -5515,7 +5521,7 @@ const BlockMarkdownHighlighting = ({ node })=>{
|
|
|
5515
5521
|
if ("syntax" !== node.type) return /*#__PURE__*/ jsxRuntime_module_u(InlineMarkdown, {
|
|
5516
5522
|
node: node
|
|
5517
5523
|
});
|
|
5518
|
-
switch(node.blockType){
|
|
5524
|
+
else switch(node.blockType){
|
|
5519
5525
|
case "heading":
|
|
5520
5526
|
return /*#__PURE__*/ jsxRuntime_module_u("span", {
|
|
5521
5527
|
class: "heading-marker",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsondb",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "Lukas Obermann",
|
|
@@ -37,23 +37,23 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@eslint/js": "^9.39.2",
|
|
39
39
|
"@rsbuild/plugin-preact": "^2.1.0",
|
|
40
|
-
"@rslib/core": "^1.0.
|
|
40
|
+
"@rslib/core": "^1.0.1",
|
|
41
41
|
"@types/debug": "^4.1.13",
|
|
42
42
|
"@types/express": "^5.0.6",
|
|
43
|
-
"@types/node": "^
|
|
43
|
+
"@types/node": "^26.6.2",
|
|
44
44
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
45
|
-
"commit-and-tag-version": "^13.2.
|
|
45
|
+
"commit-and-tag-version": "^13.2.1",
|
|
46
46
|
"eslint": "^9.39.4",
|
|
47
47
|
"eslint-plugin-react": "^7.37.5",
|
|
48
48
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
49
49
|
"globals": "^17.12.0",
|
|
50
|
-
"prettier": "^3.9.
|
|
51
|
-
"tsx": "^4.23.
|
|
50
|
+
"prettier": "^3.9.8",
|
|
51
|
+
"tsx": "^4.23.15",
|
|
52
52
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
53
|
-
"typescript-eslint": "^8.70.
|
|
53
|
+
"typescript-eslint": "^8.70.1"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@elyukai/markdown": "^0.3.
|
|
56
|
+
"@elyukai/markdown": "^0.3.4",
|
|
57
57
|
"@elyukai/utils": "^0.3.6",
|
|
58
58
|
"@preact/signals": "^2.11.2",
|
|
59
59
|
"debug": "^4.4.3",
|