tsondb 0.20.0 → 0.20.2
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/488.js +23 -12
- package/package.json +1 -1
package/dist/src/web/488.js
CHANGED
|
@@ -3149,6 +3149,13 @@ const isNaturalNumber = (test)=>naturalNumberPattern.test(test);
|
|
|
3149
3149
|
function typeSafety_assertExhaustive(_x, msg = "The switch is not exhaustive.") {
|
|
3150
3150
|
throw new Error(msg);
|
|
3151
3151
|
}
|
|
3152
|
+
const trySafe = (f, defaultValue)=>{
|
|
3153
|
+
try {
|
|
3154
|
+
return f();
|
|
3155
|
+
} catch {
|
|
3156
|
+
return defaultValue;
|
|
3157
|
+
}
|
|
3158
|
+
};
|
|
3152
3159
|
const reduceSyntaxNodes = (nodes)=>nodes.reduce((reducedNodes, node, index)=>{
|
|
3153
3160
|
const lastNode = index > 0 ? reducedNodes[reducedNodes.length - 1] : void 0;
|
|
3154
3161
|
const newLastNode = lastNode ? mergeSyntaxNodes(lastNode, node) : null;
|
|
@@ -4136,7 +4143,12 @@ const TableRow = ({ columns, cells, cellType = "td" })=>{
|
|
|
4136
4143
|
});
|
|
4137
4144
|
};
|
|
4138
4145
|
const Markdown = ({ class: className, string, outerHeadingLevel, footnoteLabelSuffix, inline })=>{
|
|
4139
|
-
const elements = inline ? parseInlineMarkdown(string)
|
|
4146
|
+
const elements = inline ? trySafe(()=>parseInlineMarkdown(string), [
|
|
4147
|
+
{
|
|
4148
|
+
type: "text",
|
|
4149
|
+
content: string
|
|
4150
|
+
}
|
|
4151
|
+
]).map((node, i)=>/*#__PURE__*/ jsxRuntime_module_u(InlineMarkdown, {
|
|
4140
4152
|
node: node
|
|
4141
4153
|
}, `md-inline-${i.toString()}`)) : parseBlockMarkdown(string).map((node, i)=>/*#__PURE__*/ jsxRuntime_module_u(BlockMarkdown, {
|
|
4142
4154
|
node: node,
|
|
@@ -4771,7 +4783,7 @@ const ChildEntitiesTypeInputElement = (props)=>{
|
|
|
4771
4783
|
}),
|
|
4772
4784
|
/*#__PURE__*/ jsxRuntime_module_u("button", {
|
|
4773
4785
|
onClick: ()=>{
|
|
4774
|
-
onChildDuplicate(
|
|
4786
|
+
onChildDuplicate(originalIndex);
|
|
4775
4787
|
},
|
|
4776
4788
|
disabled: disabled,
|
|
4777
4789
|
children: "Duplicate"
|
|
@@ -4779,7 +4791,7 @@ const ChildEntitiesTypeInputElement = (props)=>{
|
|
|
4779
4791
|
/*#__PURE__*/ jsxRuntime_module_u("button", {
|
|
4780
4792
|
class: "destructive",
|
|
4781
4793
|
onClick: ()=>{
|
|
4782
|
-
onChildRemove(
|
|
4794
|
+
onChildRemove(originalIndex);
|
|
4783
4795
|
},
|
|
4784
4796
|
disabled: disabled,
|
|
4785
4797
|
children: "Delete"
|
|
@@ -5495,7 +5507,12 @@ const BlockMarkdownHighlighting = ({ node })=>{
|
|
|
5495
5507
|
}
|
|
5496
5508
|
};
|
|
5497
5509
|
const MarkdownHighlighting = ({ class: className, string, inline })=>{
|
|
5498
|
-
const blocks = inline ? parseInlineMarkdownForSyntaxHighlighting(string)
|
|
5510
|
+
const blocks = inline ? trySafe(()=>parseInlineMarkdownForSyntaxHighlighting(string), [
|
|
5511
|
+
{
|
|
5512
|
+
type: "text",
|
|
5513
|
+
content: string
|
|
5514
|
+
}
|
|
5515
|
+
]) : parseBlockMarkdownForSyntaxHighlighting(string);
|
|
5499
5516
|
const blockElements = blocks.map((block, i)=>/*#__PURE__*/ jsxRuntime_module_u(BlockMarkdownHighlighting, {
|
|
5500
5517
|
node: block
|
|
5501
5518
|
}, `md-block-${i.toString()}`));
|
|
@@ -5507,12 +5524,6 @@ const MarkdownHighlighting = ({ class: className, string, inline })=>{
|
|
|
5507
5524
|
children: blockElements
|
|
5508
5525
|
});
|
|
5509
5526
|
};
|
|
5510
|
-
const TextInput = ({ type, ...props })=>"block" === type ? /*#__PURE__*/ jsxRuntime_module_u("textarea", {
|
|
5511
|
-
...props,
|
|
5512
|
-
rows: 1
|
|
5513
|
-
}) : /*#__PURE__*/ jsxRuntime_module_u("input", {
|
|
5514
|
-
type: "text"
|
|
5515
|
-
});
|
|
5516
5527
|
const StringTypeInput = ({ type, value, disabled, onChange, inTranslationObject })=>{
|
|
5517
5528
|
if ("string" != typeof value) return /*#__PURE__*/ jsxRuntime_module_u(MismatchingTypeError, {
|
|
5518
5529
|
expected: "string",
|
|
@@ -5561,8 +5572,8 @@ const StringTypeInput = ({ type, value, disabled, onChange, inTranslationObject
|
|
|
5561
5572
|
/*#__PURE__*/ jsxRuntime_module_u("div", {
|
|
5562
5573
|
class: "textarea-grow-wrap",
|
|
5563
5574
|
children: [
|
|
5564
|
-
/*#__PURE__*/ jsxRuntime_module_u(
|
|
5565
|
-
|
|
5575
|
+
/*#__PURE__*/ jsxRuntime_module_u("textarea", {
|
|
5576
|
+
rows: 1,
|
|
5566
5577
|
value: value,
|
|
5567
5578
|
minLength: minLength,
|
|
5568
5579
|
maxLength: maxLength,
|