tsondb 0.9.0 → 0.10.1

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.
@@ -5,7 +5,8 @@ export const GitFileList = ({ filesByEntity, onFileButtonClick, fileButtons, })
5
5
  const { route } = useLocation();
6
6
  return filesByEntity.length === 0 ? (_jsx("p", { class: "no-changes", children: "No changes" })) : (_jsx("ul", { class: "git-entity-list", children: filesByEntity.map(([entityName, entityNamePlural, instances]) => (_jsxs("li", { class: "git-entity-list-item", children: [_jsx("span", { class: "title", children: entityNamePlural }), _jsx("ul", { class: "git-instance-list", children: instances.map(instance => (_jsxs("li", { class: "form-row form-row--compact git-instance-list-item", children: [_jsx("span", { class: "title form-row__fill", children: instance.displayName }), _jsx(GitStatusIndicator, { status: instance.gitStatus }), _jsx("button", { onClick: () => {
7
7
  route(`/entities/${entityName}/instances/${instance.id}`);
8
- }, children: "View" }), fileButtons.map(({ label, action }) => (_jsx("button", { onClick: () => {
8
+ }, disabled: (instance.gitStatus?.index === "D" && instance.gitStatus.workingDir === " ") ||
9
+ instance.gitStatus?.workingDir === "D", children: "View" }), fileButtons.map(({ label, action }) => (_jsx("button", { onClick: () => {
9
10
  void onFileButtonClick(entityName, instance, action);
10
11
  }, children: label }, label)))] }, instance.id))) })] }, entityName))) }));
11
12
  };
@@ -21,7 +21,7 @@ export const ChildEntitiesTypeInput = props => {
21
21
  onChildRemove(i);
22
22
  }, disabled: disabled, children: "Delete Item" })] }), _jsx(TypeInput, { ...props, type: childEntity.type, value: item.content, parentKey: childEntity.parentReferenceKey, onChange: newItem => {
23
23
  onChildChange(originalIndex, newItem);
24
- } })] }, i))) })) : (_jsx("p", { class: "empty", children: "No child entities" })), _jsx("div", { class: "add-item-container", children: _jsx("button", { onClick: () => {
24
+ }, childInstances: item.childInstances })] }, i))) })) : (_jsx("p", { class: "empty", children: "No child entities" })), _jsx("div", { class: "add-item-container", children: _jsx("button", { onClick: () => {
25
25
  onChildAdd(type.entity, createTypeSkeleton(getDeclFromDeclName, childEntity.type));
26
26
  }, disabled: disabled, children: "Add Item" }) })] }));
27
27
  };
@@ -24,8 +24,8 @@ export const BlockMarkdown = ({ node, outerHeadingLevel = 0, insertBefore, footn
24
24
  return (_jsxs("div", { class: node.name, children: [insertBefore, node.content.map((childNode, i) => (_createElement(BlockMarkdown, { ...inheritableProps, key: i, node: childNode })))] }));
25
25
  case "footnote": {
26
26
  const isNumeric = /^\d+$/.test(node.label);
27
- const label = (_jsxs(_Fragment, { children: [_jsxs("span", { class: "footnote-label" + (isNumeric ? " footnote-label--numeric" : ""), "data-reference": node.label, children: [node.label, footnoteLabelSuffix] }), " "] }));
28
- return (_jsxs("div", { role: "note", children: [insertBefore, node.content.map((n, i) => (_createElement(BlockMarkdown, { ...inheritableProps, key: i, node: n, insertBefore: label })))] }));
27
+ const label = (_jsxs(_Fragment, { children: [_jsxs("span", { class: "footnote__label" + (isNumeric ? " footnote__label--numeric" : ""), "data-reference": node.label, style: { "--label": isNumeric ? Number.parseInt(node.label) : node.label }, children: [_jsx("span", { class: "footnote-label", children: node.label }), footnoteLabelSuffix] }), " "] }));
28
+ return (_jsxs("div", { role: "note", class: "footnote", children: [insertBefore, node.content.map((n, i) => (_createElement(BlockMarkdown, { ...inheritableProps, key: i, node: n, insertBefore: label })))] }));
29
29
  }
30
30
  case "definitionList":
31
31
  return (_jsxs(_Fragment, { children: [insertBefore, _jsx("dl", { children: node.content.map((item, ii) => (_jsxs("div", { children: [item.terms.map((term, ti) => (_jsx("dt", { children: term.map((inline, iii) => (_jsx(InlineMarkdown, { node: inline }, iii))) }, ti))), item.definitions.map((definition, di) => (_jsx("dd", { children: definition.map((n, i) => (_createElement(BlockMarkdown, { ...inheritableProps, key: i, node: n }))) }, di)))] }, ii))) })] }));
@@ -24,7 +24,7 @@ export const InlineMarkdown = ({ node }) => {
24
24
  }
25
25
  case "footnoteRef": {
26
26
  const isNumeric = /^\d+$/.test(node.label);
27
- return (_jsx("sup", { class: "footnote-ref" + (isNumeric ? " footnote-ref--numeric" : ""), "data-reference": node.label, children: node.label }));
27
+ return (_jsx("sup", { class: "footnote-ref" + (isNumeric ? " footnote-ref--numeric" : ""), "data-reference": node.label, style: { "--label": isNumeric ? Number.parseInt(node.label) : node.label }, children: _jsx("span", { class: "footnote-label", children: node.label }) }));
28
28
  }
29
29
  case "text":
30
30
  return node.content;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsondb",
3
- "version": "0.9.0",
3
+ "version": "0.10.1",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Lukas Obermann",