baselode 0.1.20 → 0.1.21
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/baselode.js +1524 -1354
- package/dist/baselode.js.map +1 -1
- package/dist/{baselode3dScene-qMfVRKxK.js → baselode3dScene-CLEvddGM.js} +299 -293
- package/dist/baselode3dScene-CLEvddGM.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/tool-ui.js +29 -29
- package/package.json +1 -1
- package/dist/baselode3dScene-qMfVRKxK.js.map +0 -1
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.baselode-3d-controls{position:absolute;bottom:20px;left:20px;display:flex;gap:10px;flex-wrap:wrap;background:#ffffffe6;border:1px solid #e0e0e0;border-radius:10px;padding:10px;box-shadow:0 8px 24px #0000001a}.baselode-3d-controls .ghost-button,.baselode-3d-controls button{border:1px solid #d0d0d0;background:#fff;color:#333;cursor:pointer;transition:background .15s,border-color .15s}.baselode-3d-controls button:hover{background:#f2f2f2;border-color:silver}.baselode-3d-controls .ghost-button{padding:8px 12px;border-radius:8px}.baselode-3d-controls-checkbox{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:#333;cursor:pointer;-webkit-user-select:none;user-select:none;padding:0 4px}.bm-widget{display:flex;flex-direction:column;gap:8px;background:#fffffff2;border:1px solid #e0e0e0;border-radius:10px;padding:12px 14px;box-shadow:0 4px 16px #0000001a;min-width:200px;font-size:13px;color:#333}.bm-widget__label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:#666;margin-bottom:2px}.bm-widget__select{width:100%;padding:5px 8px;border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;font-size:13px;cursor:pointer}.bm-widget__select:focus{outline:none;border-color:#888}.bm-widget__scale{display:flex;align-items:center;gap:6px;margin:2px 0 4px}.bm-widget__scale-bar{flex:1;height:10px;border-radius:4px;background:linear-gradient(to right,#1919e6,#19e619,#e61919)}.bm-widget__scale-label{font-size:11px;color:#555;white-space:nowrap}.bm-widget__categories{display:flex;flex-wrap:wrap;gap:4px;margin:2px 0 4px}.bm-widget__category-chip{display:inline-block;padding:2px 8px;border-radius:10px;font-size:11px;color:#fff}.bm-widget__slider{width:100%;cursor:pointer;accent-color:#555}.bm-widget__popup{margin-top:4px;border:1px solid #ddd;border-radius:8px;overflow:hidden;background:#fff}.bm-widget__popup-header{display:flex;justify-content:space-between;align-items:center;padding:6px 10px;background:#f5f5f5;border-bottom:1px solid #e0e0e0;font-weight:600;font-size:12px}.bm-widget__popup-close{border:none;background:transparent;cursor:pointer;font-size:16px;line-height:1;color:#666;padding:0 4px}.bm-widget__popup-close:hover{color:#111}.bm-widget__popup-table{width:100%;border-collapse:collapse;font-size:12px}.bm-widget__popup-table th,.bm-widget__popup-table td{padding:4px 10px;border-bottom:1px solid #f0f0f0;text-align:left}.bm-widget__popup-table th{color:#555;font-weight:600;width:40%}.bm-widget__popup-table tr:last-child th,.bm-widget__popup-table tr:last-child td{border-bottom:none}.core-photo-table{display:flex;flex-direction:column;height:100%;overflow:hidden;background:#fff;font-family:inherit;font-size:12px;color:#1e293b}.core-photo-controls{display:flex;align-items:center;gap:8px;padding:6px 12px;background:#fff;border-bottom:1px solid #cbd5e1;flex-shrink:0;flex-wrap:wrap}.core-photo-hole-id{font-weight:600;letter-spacing:.04em;color:#0f172a;margin-right:4px}.core-photo-zoom-btn{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:1px solid #94a3b8;border-radius:4px;background:#fff;color:#0f172a;font-size:16px;line-height:1;cursor:pointer;padding:0;transition:background .15s}.core-photo-zoom-btn:hover:not(:disabled){background:#e2e8f0}.core-photo-zoom-btn:disabled{opacity:.4;cursor:default}.core-photo-zoom-label{min-width:52px;text-align:center;color:#475569}.core-photo-col-headers{display:flex;flex-direction:row;flex-shrink:0;border-bottom:1px solid #cbd5e1;background:#fff}.core-photo-ruler-spacer{flex-shrink:0;width:64px;border-right:2px solid #334155}.core-photo-set-header{flex-shrink:0;padding:4px 8px;text-align:center;font-weight:600;color:#334155;letter-spacing:.05em;border-right:1px solid #cbd5e1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}.core-photo-scroll{flex:1;overflow:hidden;cursor:grab;-webkit-user-select:none;user-select:none}.core-photo-scroll.is-dragging{cursor:grabbing}.core-photo-inner{display:flex;flex-direction:row;position:relative;min-width:min-content}.core-photo-depth-ruler{position:relative;flex-shrink:0;width:64px;border-right:2px solid #334155;background:#fff}.core-photo-depth-marker{position:absolute;left:0;width:60px;padding-right:6px;font-size:10px;text-align:right;color:#475569;transform:translateY(-50%);white-space:nowrap;pointer-events:none;line-height:1}.core-photo-depth-marker:after{content:"";position:absolute;right:-4px;top:50%;width:4px;height:1px;background:#94a3b8}.core-photo-col-body{position:relative;flex-shrink:0;border-right:1px solid #e2e8f0}.core-photo-item{position:absolute;box-sizing:border-box;border:1px solid rgba(0,0,0,.15);overflow:hidden;background:#fff}.core-photo-item img{display:block;width:100%;height:100%;object-fit:contain;object-position:left center}.core-photo-no-image{width:100%;height:100%;background:repeating-linear-gradient(-45deg,#fff,#fff 6px,#f1f5f9 6px,#f1f5f9 12px)}.core-photo-item-label{position:absolute;bottom:2px;left:2px;font-size:9px;background:#0000008c;color:#f8fafc;padding:1px 4px;border-radius:2px;pointer-events:none;white-space:nowrap;line-height:1.4}.core-photo-empty{flex:1;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:14px}
|
|
1
|
+
.plot-card{display:flex;flex-direction:column}.plot-card__controls{flex-shrink:0;display:flex;gap:6px;flex-wrap:wrap}.plot-card__body{flex:1;min-height:0;display:flex}.plot-card.empty .plot-card__body{align-items:center;justify-content:center}.baselode-3d-controls{position:absolute;bottom:20px;left:20px;display:flex;gap:10px;flex-wrap:wrap;background:#ffffffe6;border:1px solid #e0e0e0;border-radius:10px;padding:10px;box-shadow:0 8px 24px #0000001a}.baselode-3d-controls .ghost-button,.baselode-3d-controls button{border:1px solid #d0d0d0;background:#fff;color:#333;cursor:pointer;transition:background .15s,border-color .15s}.baselode-3d-controls button:hover{background:#f2f2f2;border-color:silver}.baselode-3d-controls .ghost-button{padding:8px 12px;border-radius:8px}.baselode-3d-controls-checkbox{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:#333;cursor:pointer;-webkit-user-select:none;user-select:none;padding:0 4px}.bm-widget{display:flex;flex-direction:column;gap:8px;background:#fffffff2;border:1px solid #e0e0e0;border-radius:10px;padding:12px 14px;box-shadow:0 4px 16px #0000001a;min-width:200px;font-size:13px;color:#333}.bm-widget__label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:#666;margin-bottom:2px}.bm-widget__select{width:100%;padding:5px 8px;border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;font-size:13px;cursor:pointer}.bm-widget__select:focus{outline:none;border-color:#888}.bm-widget__scale{display:flex;align-items:center;gap:6px;margin:2px 0 4px}.bm-widget__scale-bar{flex:1;height:10px;border-radius:4px;background:linear-gradient(to right,#1919e6,#19e619,#e61919)}.bm-widget__scale-label{font-size:11px;color:#555;white-space:nowrap}.bm-widget__categories{display:flex;flex-wrap:wrap;gap:4px;margin:2px 0 4px}.bm-widget__category-chip{display:inline-block;padding:2px 8px;border-radius:10px;font-size:11px;color:#fff}.bm-widget__slider{width:100%;cursor:pointer;accent-color:#555}.bm-widget__popup{margin-top:4px;border:1px solid #ddd;border-radius:8px;overflow:hidden;background:#fff}.bm-widget__popup-header{display:flex;justify-content:space-between;align-items:center;padding:6px 10px;background:#f5f5f5;border-bottom:1px solid #e0e0e0;font-weight:600;font-size:12px}.bm-widget__popup-close{border:none;background:transparent;cursor:pointer;font-size:16px;line-height:1;color:#666;padding:0 4px}.bm-widget__popup-close:hover{color:#111}.bm-widget__popup-table{width:100%;border-collapse:collapse;font-size:12px}.bm-widget__popup-table th,.bm-widget__popup-table td{padding:4px 10px;border-bottom:1px solid #f0f0f0;text-align:left}.bm-widget__popup-table th{color:#555;font-weight:600;width:40%}.bm-widget__popup-table tr:last-child th,.bm-widget__popup-table tr:last-child td{border-bottom:none}.core-photo-table{display:flex;flex-direction:column;height:100%;overflow:hidden;background:#fff;font-family:inherit;font-size:12px;color:#1e293b}.core-photo-controls{display:flex;align-items:center;gap:8px;padding:6px 12px;background:#fff;border-bottom:1px solid #cbd5e1;flex-shrink:0;flex-wrap:wrap}.core-photo-hole-id{font-weight:600;letter-spacing:.04em;color:#0f172a;margin-right:4px}.core-photo-zoom-btn{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:1px solid #94a3b8;border-radius:4px;background:#fff;color:#0f172a;font-size:16px;line-height:1;cursor:pointer;padding:0;transition:background .15s}.core-photo-zoom-btn:hover:not(:disabled){background:#e2e8f0}.core-photo-zoom-btn:disabled{opacity:.4;cursor:default}.core-photo-zoom-label{min-width:52px;text-align:center;color:#475569}.core-photo-col-headers{display:flex;flex-direction:row;flex-shrink:0;border-bottom:1px solid #cbd5e1;background:#fff}.core-photo-ruler-spacer{flex-shrink:0;width:64px;border-right:2px solid #334155}.core-photo-set-header{flex-shrink:0;padding:4px 8px;text-align:center;font-weight:600;color:#334155;letter-spacing:.05em;border-right:1px solid #cbd5e1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}.core-photo-scroll{flex:1;overflow:hidden;cursor:grab;-webkit-user-select:none;user-select:none}.core-photo-scroll.is-dragging{cursor:grabbing}.core-photo-inner{display:flex;flex-direction:row;position:relative;min-width:min-content}.core-photo-depth-ruler{position:relative;flex-shrink:0;width:64px;border-right:2px solid #334155;background:#fff}.core-photo-depth-marker{position:absolute;left:0;width:60px;padding-right:6px;font-size:10px;text-align:right;color:#475569;transform:translateY(-50%);white-space:nowrap;pointer-events:none;line-height:1}.core-photo-depth-marker:after{content:"";position:absolute;right:-4px;top:50%;width:4px;height:1px;background:#94a3b8}.core-photo-col-body{position:relative;flex-shrink:0;border-right:1px solid #e2e8f0}.core-photo-item{position:absolute;box-sizing:border-box;border:1px solid rgba(0,0,0,.15);overflow:hidden;background:#fff}.core-photo-item img{display:block;width:100%;height:100%;object-fit:contain;object-position:left center}.core-photo-no-image{width:100%;height:100%;background:repeating-linear-gradient(-45deg,#fff,#fff 6px,#f1f5f9 6px,#f1f5f9 12px)}.core-photo-item-label{position:absolute;bottom:2px;left:2px;font-size:9px;background:#0000008c;color:#f8fafc;padding:1px 4px;border-radius:2px;pointer-events:none;white-space:nowrap;line-height:1.4}.core-photo-empty{flex:1;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:14px}
|
package/dist/tool-ui.js
CHANGED
|
@@ -2,7 +2,7 @@ import { z as t } from "zod";
|
|
|
2
2
|
import { jsxs as w, jsx as c } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo as x, useState as F, useEffect as V, useRef as H } from "react";
|
|
4
4
|
import Y from "plotly.js-dist-min";
|
|
5
|
-
import { s as ee, J as oe, c as te,
|
|
5
|
+
import { s as ee, J as oe, c as te, j as R, l as Q, aH as W, o as le, m as ne, t as re, g as ie, U as se, aG as ae } from "./baselode3dScene-CLEvddGM.js";
|
|
6
6
|
const pe = t.union([t.string(), t.number(), t.boolean(), t.null()]), v = t.record(t.string(), t.unknown()), q = t.tuple([t.number(), t.number()]), de = t.object({
|
|
7
7
|
id: t.string().optional(),
|
|
8
8
|
property: t.string().min(1),
|
|
@@ -115,11 +115,11 @@ function $(o) {
|
|
|
115
115
|
const e = Number(o[0]), n = Number(o[1]);
|
|
116
116
|
return !Number.isFinite(e) || !Number.isFinite(n) || e === n ? null : e < n ? [e, n] : [n, e];
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function me(o) {
|
|
119
119
|
if (o)
|
|
120
120
|
return [o[1], o[0]];
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function fe(o) {
|
|
123
123
|
if (!o || typeof o != "object") return null;
|
|
124
124
|
const e = o["yaxis.range"];
|
|
125
125
|
if (Array.isArray(e) && e.length === 2)
|
|
@@ -144,7 +144,7 @@ function C(o, {
|
|
|
144
144
|
allowChartTypeSelection: B,
|
|
145
145
|
showLegend: p
|
|
146
146
|
}) {
|
|
147
|
-
const S = k(i, o.propertyOptions ?? n), d = S.includes(o.property) ? o.property : S[0] ?? o.property,
|
|
147
|
+
const S = k(i, o.propertyOptions ?? n), d = S.includes(o.property) ? o.property : S[0] ?? o.property, m = i.byType[d] === R ? R : "numeric", a = o.chartType === "categorical" || o.displayType === R ? R : m, g = Q(a).some((P) => P.value === o.chartType) ? o.chartType : W(a);
|
|
148
148
|
return {
|
|
149
149
|
...o,
|
|
150
150
|
id: o.id || `${d}-${e + 1}`,
|
|
@@ -171,7 +171,7 @@ function he(o, e) {
|
|
|
171
171
|
yaxis: {
|
|
172
172
|
...o.yaxis || {},
|
|
173
173
|
autorange: !1,
|
|
174
|
-
range:
|
|
174
|
+
range: me(e)
|
|
175
175
|
}
|
|
176
176
|
} : o;
|
|
177
177
|
}
|
|
@@ -186,7 +186,7 @@ function Se({
|
|
|
186
186
|
onIntervalClick: S,
|
|
187
187
|
onDepthRangeChange: d
|
|
188
188
|
}) {
|
|
189
|
-
const
|
|
189
|
+
const m = H(null), a = e.displayType === R || e.chartType === "categorical", u = x(
|
|
190
190
|
() => le(o, e.property, a),
|
|
191
191
|
[o, a, e.property]
|
|
192
192
|
), g = x(() => {
|
|
@@ -210,8 +210,8 @@ function Se({
|
|
|
210
210
|
[e.displayType]
|
|
211
211
|
);
|
|
212
212
|
return V(() => {
|
|
213
|
-
var r, j, _,
|
|
214
|
-
const l =
|
|
213
|
+
var r, j, _, f;
|
|
214
|
+
const l = m.current;
|
|
215
215
|
if (!l) return;
|
|
216
216
|
if (!g.data.length) {
|
|
217
217
|
l.replaceChildren(document.createTextNode(`No data for ${e.property}`));
|
|
@@ -231,7 +231,7 @@ function Se({
|
|
|
231
231
|
pointIndex: h.pointIndex
|
|
232
232
|
});
|
|
233
233
|
}, E = (L) => {
|
|
234
|
-
const h =
|
|
234
|
+
const h = fe(L);
|
|
235
235
|
h && d && d({
|
|
236
236
|
trackId: e.id || e.property,
|
|
237
237
|
depthRange: h
|
|
@@ -250,7 +250,7 @@ function Se({
|
|
|
250
250
|
displayModeBar: b,
|
|
251
251
|
responsive: !0
|
|
252
252
|
}
|
|
253
|
-
), S && ((_ = l.on) == null || _.call(l, "plotly_click", I)), d && ((
|
|
253
|
+
), S && ((_ = l.on) == null || _.call(l, "plotly_click", I)), d && ((f = l.on) == null || f.call(l, "plotly_relayout", E)), () => {
|
|
254
254
|
Y.purge(l);
|
|
255
255
|
};
|
|
256
256
|
}, [
|
|
@@ -299,7 +299,7 @@ function Se({
|
|
|
299
299
|
)
|
|
300
300
|
] })
|
|
301
301
|
] }),
|
|
302
|
-
/* @__PURE__ */ c("div", { className: "baselode-tool-strip-log__plot", ref:
|
|
302
|
+
/* @__PURE__ */ c("div", { className: "baselode-tool-strip-log__plot", ref: m }),
|
|
303
303
|
P.length > 0 && /* @__PURE__ */ c("div", { className: "baselode-tool-strip-log__legend", children: P.map((l) => /* @__PURE__ */ w("div", { className: "baselode-tool-strip-log__legend-row", children: [
|
|
304
304
|
/* @__PURE__ */ c(
|
|
305
305
|
"span",
|
|
@@ -322,7 +322,7 @@ function Be({
|
|
|
322
322
|
template: p = "baselode",
|
|
323
323
|
showModeBar: S = !1,
|
|
324
324
|
propertyOptions: d,
|
|
325
|
-
allowPropertySelection:
|
|
325
|
+
allowPropertySelection: m = !1,
|
|
326
326
|
allowChartTypeSelection: a = !1,
|
|
327
327
|
showLegend: u,
|
|
328
328
|
depthRange: g,
|
|
@@ -343,18 +343,18 @@ function Be({
|
|
|
343
343
|
trackIndex: T,
|
|
344
344
|
selectableProperties: j,
|
|
345
345
|
classified: r,
|
|
346
|
-
allowPropertySelection:
|
|
346
|
+
allowPropertySelection: m,
|
|
347
347
|
allowChartTypeSelection: a,
|
|
348
348
|
showLegend: u
|
|
349
349
|
})),
|
|
350
|
-
[a,
|
|
351
|
-
),
|
|
350
|
+
[a, m, r, j, u, b]
|
|
351
|
+
), f = $(g), L = f ?? $(P), [h, A] = F(_), [z, O] = F(L);
|
|
352
352
|
V(() => {
|
|
353
353
|
A(_);
|
|
354
354
|
}, [_]), V(() => {
|
|
355
|
-
|
|
356
|
-
}, [
|
|
357
|
-
const U =
|
|
355
|
+
f && O(f);
|
|
356
|
+
}, [f == null ? void 0 : f[0], f == null ? void 0 : f[1]]);
|
|
357
|
+
const U = f ?? z;
|
|
358
358
|
function J(y) {
|
|
359
359
|
const T = h.map((s) => {
|
|
360
360
|
if ((s.id || s.property) !== (y.id || y.property))
|
|
@@ -369,7 +369,7 @@ function Be({
|
|
|
369
369
|
}, {
|
|
370
370
|
selectableProperties: j,
|
|
371
371
|
classified: r,
|
|
372
|
-
allowPropertySelection:
|
|
372
|
+
allowPropertySelection: m,
|
|
373
373
|
allowChartTypeSelection: a,
|
|
374
374
|
showLegend: u
|
|
375
375
|
});
|
|
@@ -409,7 +409,7 @@ function Be({
|
|
|
409
409
|
onTrackChange: J,
|
|
410
410
|
onIntervalClick: I,
|
|
411
411
|
onDepthRangeChange: (T) => {
|
|
412
|
-
!
|
|
412
|
+
!f && (T != null && T.depthRange) && O(T.depthRange), E == null || E(T);
|
|
413
413
|
}
|
|
414
414
|
},
|
|
415
415
|
y.id || y.property
|
|
@@ -428,7 +428,7 @@ function Pe({
|
|
|
428
428
|
drillholes: p,
|
|
429
429
|
stripLogs: S = [],
|
|
430
430
|
structuralDiscs: d,
|
|
431
|
-
blocks:
|
|
431
|
+
blocks: m,
|
|
432
432
|
rasterOverlays: a = [],
|
|
433
433
|
camera: u
|
|
434
434
|
}) {
|
|
@@ -440,19 +440,19 @@ function Pe({
|
|
|
440
440
|
const r = new se();
|
|
441
441
|
P.current = r;
|
|
442
442
|
async function j() {
|
|
443
|
-
var
|
|
443
|
+
var f, L, h, A, z, O, U, J, y, T;
|
|
444
444
|
try {
|
|
445
445
|
l(""), r.init(I), r.setBackground(b), r.setControlMode(B);
|
|
446
446
|
const s = (p == null ? void 0 : p.holes) || [];
|
|
447
|
-
s.length && r.setDrillholes(s, (p == null ? void 0 : p.options) || {}), s.length && S.length && r.setStripLogs(s, S), (
|
|
447
|
+
s.length && r.setDrillholes(s, (p == null ? void 0 : p.options) || {}), s.length && S.length && r.setStripLogs(s, S), (f = d == null ? void 0 : d.structures) != null && f.length && (r.setStructuralDiscs(
|
|
448
448
|
d.structures,
|
|
449
449
|
s,
|
|
450
450
|
d.options || {}
|
|
451
|
-
), d.visible !== void 0 && r.setStructuralDiscsVisible(d.visible)), (L =
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
451
|
+
), d.visible !== void 0 && r.setStructuralDiscsVisible(d.visible)), (L = m == null ? void 0 : m.data) != null && L.length && r.setBlocks(
|
|
452
|
+
m.data,
|
|
453
|
+
m.selectedProperty,
|
|
454
|
+
m.stats || {},
|
|
455
|
+
m.options || {}
|
|
456
456
|
);
|
|
457
457
|
for (const G of a) {
|
|
458
458
|
const D = await ae(G);
|
|
@@ -474,7 +474,7 @@ function Pe({
|
|
|
474
474
|
};
|
|
475
475
|
}, [
|
|
476
476
|
b,
|
|
477
|
-
|
|
477
|
+
m,
|
|
478
478
|
u,
|
|
479
479
|
B,
|
|
480
480
|
p,
|