@script-it/json-views-react 2026.10.25 → 2026.10.29
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/THIRD_PARTY_NOTICES.txt +1 -1
- package/dist/json/table-view.js +11 -3
- package/package.json +3 -3
package/THIRD_PARTY_NOTICES.txt
CHANGED
|
@@ -3996,7 +3996,7 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
|
3996
3996
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
3997
3997
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
3998
3998
|
|
|
3999
|
-
re2js@2.
|
|
3999
|
+
re2js@2.9.1
|
|
4000
4000
|
===========
|
|
4001
4001
|
MIT License
|
|
4002
4002
|
|
package/dist/json/table-view.js
CHANGED
|
@@ -3,7 +3,7 @@ import { isLongText } from './long-text.js';
|
|
|
3
3
|
import { useJsonSourceLiterals } from './source-literals.js';
|
|
4
4
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
5
5
|
import { useJsonViewsRegistries } from '../widget-registry.js';
|
|
6
|
-
import { AtomicValueEditor } from '../structured-data/atomic-value-editor.js';
|
|
6
|
+
import { AtomicValueEditor, EditValueAction, StructuredValueCellFrame } from '../structured-data/atomic-value-editor.js';
|
|
7
7
|
import { isEditableAtomicValue } from '../structured-data/atomic-value.js';
|
|
8
8
|
import { TabularObjectArrayView, ValueCell, ValueCellContent } from '../tabular-data-view.js';
|
|
9
9
|
import {} from '@script-it/json-views-core';
|
|
@@ -286,8 +286,16 @@ export function ProjectedTableView({ compiled, editing, filePath, copyFileName,
|
|
|
286
286
|
const schema = schemaForJsonViewPath(compiled.schema, resolved.sourcePath);
|
|
287
287
|
const descriptor = schema?.descriptor;
|
|
288
288
|
const coloredDescriptor = descriptor && withColumnOptionColors(descriptor, columnFilterValues[column] ?? [value], visibleColumns.findIndex((candidate) => candidate.id === column));
|
|
289
|
-
if (isLongText(value, descriptor))
|
|
290
|
-
|
|
289
|
+
if (isLongText(value, descriptor)) {
|
|
290
|
+
const openRecordEditor = () => { setEditPath(resolved.sourcePath); setOpenRowPath(row.sourcePath); };
|
|
291
|
+
// Render before applying the plain-text shortcut. A group preserves
|
|
292
|
+
// native link interactions without nesting links inside a button.
|
|
293
|
+
if (renderMarkdown && (descriptor?.type === 'markdown' || descriptor?.type === 'body'))
|
|
294
|
+
return (_jsx(StructuredValueCellFrame, { activationLabel: `Open ${displayColumn.label} in record`, activationRole: "group", onActivate: openRecordEditor, actions: editing && editing.canReplace?.(resolved.sourcePath) !== false
|
|
295
|
+
? _jsx(EditValueAction, { label: displayColumn.label, onClick: openRecordEditor })
|
|
296
|
+
: undefined, children: _jsx("div", { className: "min-w-0 flex-1 break-words pr-2", children: _jsx(JsonViewSchemaValueDisplay, { sourcePath: resolved.sourcePath, descriptor: descriptor, value: value, onOpen: open, renderMarkdown: renderMarkdown }) }) }));
|
|
297
|
+
return _jsx("button", { type: "button", className: "block h-full w-full min-w-0 truncate px-1.5 py-1 text-left hover:bg-accent focus-visible:ring-1 focus-visible:ring-ring", "aria-label": `Open ${displayColumn.label} in record`, onClick: openRecordEditor, children: value || '—' });
|
|
298
|
+
}
|
|
291
299
|
if (coloredDescriptor) {
|
|
292
300
|
return (_jsx(JsonViewSchemaValueCell, { sourcePath: resolved.sourcePath, descriptor: coloredDescriptor, suppressRequiredValidation: editing?.isDraftRow?.(row.sourcePath) === true, onOptionColorChange: editing?.setOptionColor && schema ? (optionValue, color) => editing.setOptionColor(schema.declaration, optionValue, color) : undefined, inputKey: String(resolved.sourcePath[resolved.sourcePath.length - 1] ?? displayColumn.label), label: descriptor.title ?? displayColumn.label, value: value, onOpen: open, onClear: editing && resolved.value !== JSON_VIEW_PATH_MISSING ? () => editing.clear(resolved.sourcePath) : undefined, onCommit: editing && editing.canReplace?.(resolved.sourcePath) !== false && resolved.value !== JSON_VIEW_PATH_MISSING ? (next) => editing.replace(resolved.sourcePath, next) : undefined, renderExternalWidget: renderExternalWidget, renderMarkdown: renderMarkdown, saving: editing?.saving }));
|
|
293
301
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@script-it/json-views-react",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.29",
|
|
4
4
|
"description": "Extensible React viewer and editor for JSON Views",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@radix-ui/react-slot": "^1.2.4",
|
|
39
39
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
40
40
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
41
|
-
"@script-it/json-views-core": "2026.10.
|
|
41
|
+
"@script-it/json-views-core": "2026.10.29",
|
|
42
42
|
"@tanstack/react-virtual": "3.14.10",
|
|
43
43
|
"class-variance-authority": "^0.7.1",
|
|
44
44
|
"clsx": "^2.1.1",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"react": "^19.1.1",
|
|
61
61
|
"react-dom": "^19.1.1",
|
|
62
62
|
"typescript": "^5.9.3",
|
|
63
|
-
"vitest": "4.1.
|
|
63
|
+
"vitest": "4.1.12"
|
|
64
64
|
},
|
|
65
65
|
"repository": {
|
|
66
66
|
"type": "git",
|