glassbox 0.4.0 → 0.4.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.
- package/dist/cli.js +14 -8
- package/dist/client/app.global.js +9 -9
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -88,7 +88,9 @@ var init_schema = __esm({
|
|
|
88
88
|
sort_mode TEXT NOT NULL DEFAULT 'folder',
|
|
89
89
|
risk_sort_dimension TEXT NOT NULL DEFAULT 'aggregate',
|
|
90
90
|
show_risk_scores BOOLEAN NOT NULL DEFAULT FALSE,
|
|
91
|
-
ignore_whitespace BOOLEAN NOT NULL DEFAULT FALSE
|
|
91
|
+
ignore_whitespace BOOLEAN NOT NULL DEFAULT FALSE,
|
|
92
|
+
svg_view_mode TEXT NOT NULL DEFAULT 'code',
|
|
93
|
+
last_image_mode TEXT NOT NULL DEFAULT 'metadata'
|
|
92
94
|
);
|
|
93
95
|
`;
|
|
94
96
|
}
|
|
@@ -144,6 +146,8 @@ async function initSchema(db2) {
|
|
|
144
146
|
await addColumnIfMissing(db2, "ai_analyses", "progress_completed", "INTEGER NOT NULL DEFAULT 0");
|
|
145
147
|
await addColumnIfMissing(db2, "ai_analyses", "progress_total", "INTEGER NOT NULL DEFAULT 0");
|
|
146
148
|
await addColumnIfMissing(db2, "user_preferences", "ignore_whitespace", "BOOLEAN NOT NULL DEFAULT FALSE");
|
|
149
|
+
await addColumnIfMissing(db2, "user_preferences", "svg_view_mode", "TEXT NOT NULL DEFAULT 'code'");
|
|
150
|
+
await addColumnIfMissing(db2, "user_preferences", "last_image_mode", "TEXT NOT NULL DEFAULT 'metadata'");
|
|
147
151
|
await db2.exec(
|
|
148
152
|
`UPDATE ai_analyses SET status = 'failed', error_message = 'Interrupted (server restarted)' WHERE status = 'running'`
|
|
149
153
|
);
|
|
@@ -800,7 +804,7 @@ async function getUserPreferences() {
|
|
|
800
804
|
["singleton"]
|
|
801
805
|
);
|
|
802
806
|
if (result.rows.length === 0) {
|
|
803
|
-
return { sort_mode: "folder", risk_sort_dimension: "aggregate", show_risk_scores: false, ignore_whitespace: false };
|
|
807
|
+
return { sort_mode: "folder", risk_sort_dimension: "aggregate", show_risk_scores: false, ignore_whitespace: false, svg_view_mode: "code", last_image_mode: "metadata" };
|
|
804
808
|
}
|
|
805
809
|
return result.rows[0];
|
|
806
810
|
}
|
|
@@ -809,14 +813,16 @@ async function saveUserPreferences(prefs) {
|
|
|
809
813
|
const current = await getUserPreferences();
|
|
810
814
|
const merged = { ...current, ...prefs };
|
|
811
815
|
await db2.query(
|
|
812
|
-
`INSERT INTO user_preferences (id, sort_mode, risk_sort_dimension, show_risk_scores, ignore_whitespace)
|
|
813
|
-
VALUES ($1, $2, $3, $4, $5)
|
|
816
|
+
`INSERT INTO user_preferences (id, sort_mode, risk_sort_dimension, show_risk_scores, ignore_whitespace, svg_view_mode, last_image_mode)
|
|
817
|
+
VALUES ($1, $2, $3, $4, $5, $6, $7)
|
|
814
818
|
ON CONFLICT (id) DO UPDATE SET
|
|
815
819
|
sort_mode = EXCLUDED.sort_mode,
|
|
816
820
|
risk_sort_dimension = EXCLUDED.risk_sort_dimension,
|
|
817
821
|
show_risk_scores = EXCLUDED.show_risk_scores,
|
|
818
|
-
ignore_whitespace = EXCLUDED.ignore_whitespace
|
|
819
|
-
|
|
822
|
+
ignore_whitespace = EXCLUDED.ignore_whitespace,
|
|
823
|
+
svg_view_mode = EXCLUDED.svg_view_mode,
|
|
824
|
+
last_image_mode = EXCLUDED.last_image_mode`,
|
|
825
|
+
["singleton", merged.sort_mode, merged.risk_sort_dimension, merged.show_risk_scores, merged.ignore_whitespace, merged.svg_view_mode, merged.last_image_mode]
|
|
820
826
|
);
|
|
821
827
|
}
|
|
822
828
|
|
|
@@ -4240,7 +4246,7 @@ function ImageDiff({ file, diff, fontWarning, baseWidth, baseHeight }) {
|
|
|
4240
4246
|
...baseHeight ? { "data-base-height": String(baseHeight) } : {},
|
|
4241
4247
|
children: [
|
|
4242
4248
|
fontWarning && /* @__PURE__ */ jsx("div", { className: "image-font-warning", children: "This SVG uses text that may render differently depending on locally installed fonts." }),
|
|
4243
|
-
/* @__PURE__ */ jsx("div", { className: "image-diff-panel image-diff-metadata
|
|
4249
|
+
/* @__PURE__ */ jsx("div", { className: "image-diff-panel image-diff-metadata", "data-panel": "metadata", children: /* @__PURE__ */ jsx("div", { className: "image-metadata-loading", children: "Loading metadata..." }) }),
|
|
4244
4250
|
hasComparison && /* @__PURE__ */ jsx("div", { className: "image-diff-panel image-diff-visual", "data-panel": "difference", children: /* @__PURE__ */ jsx("div", { className: "image-visual-canvas", "data-zoomable": "true", children: /* @__PURE__ */ jsx("div", { className: "image-zoom-wrap", children: [
|
|
4245
4251
|
/* @__PURE__ */ jsx("img", { className: "image-layer image-layer-old", src: `/api/image/${fileId}/old`, alt: "Old version" }),
|
|
4246
4252
|
/* @__PURE__ */ jsx("img", { className: "image-layer image-layer-new image-blend", src: `/api/image/${fileId}/new`, alt: "New version" })
|
|
@@ -5497,7 +5503,7 @@ async function main() {
|
|
|
5497
5503
|
console.log("AI service test mode enabled \u2014 using mock AI responses");
|
|
5498
5504
|
}
|
|
5499
5505
|
if (debug) {
|
|
5500
|
-
console.log(`[debug] Build timestamp: ${"2026-03-
|
|
5506
|
+
console.log(`[debug] Build timestamp: ${"2026-03-19T04:05:06.487Z"}`);
|
|
5501
5507
|
}
|
|
5502
5508
|
if (projectDir) {
|
|
5503
5509
|
process.chdir(projectDir);
|