@gemina/elements 0.13.1 → 0.13.3
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/README.md +211 -8
- package/dist/chat.cjs +1 -1
- package/dist/chat.cjs.map +1 -1
- package/dist/chat.js +2 -2
- package/dist/{chunk-X5TSIIUP.js → chunk-GWTTD7QH.js} +2 -2
- package/dist/{chunk-X5TSIIUP.js.map → chunk-GWTTD7QH.js.map} +1 -1
- package/dist/{chunk-6KHHCUSJ.js → chunk-MPBZCA44.js} +2 -2
- package/dist/{chunk-A5PZTHDE.js → chunk-XEWKY2DW.js} +46 -25
- package/dist/chunk-XEWKY2DW.js.map +1 -0
- package/dist/index.cjs +45 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/verification.cjs +45 -24
- package/dist/verification.cjs.map +1 -1
- package/dist/verification.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-A5PZTHDE.js.map +0 -1
- /package/dist/{chunk-6KHHCUSJ.js.map → chunk-MPBZCA44.js.map} +0 -0
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-CUOHJGPN.js";
|
|
4
4
|
import {
|
|
5
5
|
GeminaChat
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MPBZCA44.js";
|
|
7
7
|
import {
|
|
8
8
|
GeminaVerification
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XEWKY2DW.js";
|
|
10
10
|
import {
|
|
11
11
|
VERSION
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GWTTD7QH.js";
|
|
13
13
|
export {
|
|
14
14
|
GeminaChat,
|
|
15
15
|
GeminaTokenManager,
|
package/dist/verification.cjs
CHANGED
|
@@ -929,8 +929,16 @@ function forEachRowUnit(tables, plannedTables, visit) {
|
|
|
929
929
|
const meta = row?.[ROW_META_KEY];
|
|
930
930
|
return meta?.confidence ?? null;
|
|
931
931
|
};
|
|
932
|
+
const planFor = (tablePointer) => {
|
|
933
|
+
const exact = plannedTables.get(tablePointer);
|
|
934
|
+
if (exact !== void 0) return exact;
|
|
935
|
+
for (const [serverPointer, planned] of plannedTables) {
|
|
936
|
+
if (matchesTablePointer(serverPointer, tablePointer)) return planned;
|
|
937
|
+
}
|
|
938
|
+
return void 0;
|
|
939
|
+
};
|
|
932
940
|
for (const table of tables) {
|
|
933
|
-
const planned =
|
|
941
|
+
const planned = planFor(table.pointer);
|
|
934
942
|
if (planned) {
|
|
935
943
|
for (const row of planned) {
|
|
936
944
|
const { source } = row.entry;
|
|
@@ -2066,35 +2074,42 @@ function HeaderSection(props) {
|
|
|
2066
2074
|
}
|
|
2067
2075
|
function EntitySection(props) {
|
|
2068
2076
|
const { entity, shared } = props;
|
|
2069
|
-
const visibleItems = entity.items.map((item) =>
|
|
2070
|
-
|
|
2071
|
-
|
|
2077
|
+
const visibleItems = entity.items.map((item, index) => ({
|
|
2078
|
+
index,
|
|
2079
|
+
cells: Object.fromEntries(
|
|
2080
|
+
Object.entries(item).filter(([, cellValue]) => !shared.hidden.fields.has(cellValue.pointer))
|
|
2081
|
+
)
|
|
2082
|
+
})).filter(({ cells }) => Object.keys(cells).length > 0);
|
|
2072
2083
|
const label = formatLabel(entity.key);
|
|
2073
2084
|
const singular = label.replace(/s$/, "");
|
|
2074
2085
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("section", { className: "gemina-verification__section", "aria-label": label, children: [
|
|
2075
2086
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "gemina-verification__section-header", children: [
|
|
2076
2087
|
label,
|
|
2077
2088
|
" (",
|
|
2078
|
-
|
|
2089
|
+
entity.items.length,
|
|
2079
2090
|
")"
|
|
2080
2091
|
] }),
|
|
2081
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "gemina-verification__section-body", children: visibleItems.map((
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2092
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "gemina-verification__section-body", children: visibleItems.map(({ index, cells }) => (
|
|
2093
|
+
// Keyed by the original index, never the filtered position, or React
|
|
2094
|
+
// reuses a hidden card's DOM (and its focus) for its successor.
|
|
2095
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "gemina-verification__card", children: [
|
|
2096
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "gemina-verification__card-header", children: [
|
|
2097
|
+
singular,
|
|
2098
|
+
" ",
|
|
2099
|
+
index + 1
|
|
2100
|
+
] }),
|
|
2101
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("dl", { className: "gemina-verification__dl", children: Object.entries(cells).map(([fieldKey, cell]) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
2102
|
+
FieldPair,
|
|
2103
|
+
{
|
|
2104
|
+
label: formatLabel(fieldKey),
|
|
2105
|
+
ariaLabel: `${singular} ${index + 1} \u2014 ${formatLabel(fieldKey)}`,
|
|
2106
|
+
cell,
|
|
2107
|
+
shared
|
|
2108
|
+
},
|
|
2109
|
+
fieldKey
|
|
2110
|
+
)) })
|
|
2111
|
+
] }, index)
|
|
2112
|
+
)) })
|
|
2098
2113
|
] });
|
|
2099
2114
|
}
|
|
2100
2115
|
function TableRowView(props) {
|
|
@@ -2285,6 +2300,7 @@ function TableSection(props) {
|
|
|
2285
2300
|
needsReview > 0 ? ` \xB7 ${needsReview} need review` : "",
|
|
2286
2301
|
")"
|
|
2287
2302
|
] }),
|
|
2303
|
+
shared.filterOn && mutable !== void 0 && !shared.readOnly ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "gemina-verification__filter-note", children: "Row editing is off while filtering" }) : null,
|
|
2288
2304
|
table.overallConfidence ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "gemina-verification__overall-confidence", children: [
|
|
2289
2305
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: "Overall confidence" }),
|
|
2290
2306
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ConfidenceDot, { confidence: table.overallConfidence })
|
|
@@ -2453,7 +2469,7 @@ function VerificationForm(props) {
|
|
|
2453
2469
|
}
|
|
2454
2470
|
|
|
2455
2471
|
// src/version.ts
|
|
2456
|
-
var VERSION = "0.13.
|
|
2472
|
+
var VERSION = "0.13.3";
|
|
2457
2473
|
|
|
2458
2474
|
// src/verification/styles.ts
|
|
2459
2475
|
var DARK_VARS = `
|
|
@@ -3036,6 +3052,10 @@ var VERIFICATION_CSS = `
|
|
|
3036
3052
|
font-size: 12px;
|
|
3037
3053
|
color: var(--gemina-verification-muted);
|
|
3038
3054
|
}
|
|
3055
|
+
.gemina-verification__filter-note {
|
|
3056
|
+
font-size: 12px;
|
|
3057
|
+
color: var(--gemina-verification-muted);
|
|
3058
|
+
}
|
|
3039
3059
|
.gemina-verification__all-scored {
|
|
3040
3060
|
margin: 0;
|
|
3041
3061
|
padding: 12px;
|
|
@@ -3754,6 +3774,7 @@ function GeminaVerification(props) {
|
|
|
3754
3774
|
[classified, rendered, plannedTables, unmatched]
|
|
3755
3775
|
);
|
|
3756
3776
|
const visibleUnits = totalUnits - hidden.fields.size - hidden.rows.size;
|
|
3777
|
+
const allClear = filterOn && totalUnits > 0 && visibleUnits === 0;
|
|
3757
3778
|
const invalidCount = (0, import_react4.useMemo)(() => {
|
|
3758
3779
|
const rowLevel = pairErrors.size;
|
|
3759
3780
|
if (edits.size === 0) {
|
|
@@ -3914,7 +3935,7 @@ function GeminaVerification(props) {
|
|
|
3914
3935
|
onImageExpired: handleImageExpired
|
|
3915
3936
|
}
|
|
3916
3937
|
),
|
|
3917
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3938
|
+
allClear ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "gemina-verification__all-scored", role: "status", children: `Nothing needs review \u2014 all ${totalUnits} fields scored high.` }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
3918
3939
|
VerificationForm,
|
|
3919
3940
|
{
|
|
3920
3941
|
classified,
|