@camstack/addon-training 0.1.87 → 0.1.89

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/_stub.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./virtualExposes-0m8NqEDE.mjs";
2
- import { a as e, i as t, o as n, r } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-BvSjPfq3.mjs";
2
+ import { a as e, i as t, o as n, r } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-tkZ3pY5a.mjs";
3
3
  import { C as i, S as a, _ as o, a as s, b as c, d as l, f as u, g as d, h as f, i as p, l as m, m as h, n as g, p as _, r as v, t as y, u as b, v as x, w as S, x as C, y as w } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react__loadShare__.js-CEvdvp1T.mjs";
4
4
  import { i as T, n as E, r as D, t as O } from "./_virtual_mf___mfe_internal__addon_training_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-DnrbBvrw.mjs";
5
5
  import { n as k, r as A, t as j } from "./ui-text-CqJgUCKX.mjs";
@@ -4416,7 +4416,9 @@ function nu({ field: e, values: t, disabled: n, onAction: r, onChangeMany: i })
4416
4416
  }
4417
4417
  Object.keys(n).length > 0 && i?.(n);
4418
4418
  let r = $l(t.choices);
4419
- y(r.length > 1 ? r : []), s("idle"), p(""), l(null), d(null);
4419
+ y(r.length > 1 ? r : []);
4420
+ let a = typeof t.gatewayId == "string" && t.gatewayId.length > 0, o = typeof t.summary == "string" ? t.summary : null;
4421
+ o !== null && !a && r.length < 2 && h(o), s("idle"), p(""), l(null), d(null);
4420
4422
  }, M = async () => {
4421
4423
  if (!(!r || g)) {
4422
4424
  _(!0), h(null);
@@ -13155,13 +13157,13 @@ function V_({ field: e }) {
13155
13157
  children: /* @__PURE__ */ D("div", {
13156
13158
  className: `rounded-md border-l-4 px-3 py-2.5 ${t.border} ${t.bg}`,
13157
13159
  children: [e.label && /* @__PURE__ */ E("p", {
13158
- className: `text-xs font-semibold mb-0.5 ${t.text}`,
13160
+ className: e.content.length > 0 ? `text-xs font-semibold mb-0.5 ${t.text}` : "text-xs text-foreground-subtle leading-relaxed whitespace-pre-line break-words",
13159
13161
  children: e.label
13160
13162
  }), n ? /* @__PURE__ */ E("div", {
13161
13163
  className: "text-xs text-foreground-subtle leading-relaxed info-html-content",
13162
13164
  dangerouslySetInnerHTML: { __html: bs(e.content) }
13163
- }) : /* @__PURE__ */ E("p", {
13164
- className: "text-xs text-foreground-subtle leading-relaxed whitespace-pre-line",
13165
+ }) : e.content.length > 0 && /* @__PURE__ */ E("p", {
13166
+ className: "text-xs text-foreground-subtle leading-relaxed whitespace-pre-line break-words",
13165
13167
  children: e.content
13166
13168
  })]
13167
13169
  })
@@ -13400,27 +13402,38 @@ function X_(e, t) {
13400
13402
  return n;
13401
13403
  }
13402
13404
  function Z_({ field: e, value: t, values: n, onChange: r, disabled: i, onAction: a }) {
13403
- let o = A(), [s, c] = w(!1), [u, d] = w(null), [f, p] = w(null), m = X_(e, n), h = Object.keys(e.paramsFromForm ?? {}).some((e) => m[e] === void 0);
13404
- l(() => {
13405
- if (!a || h) {
13405
+ let o = A(), [s, c] = w(!1), [u, d] = w(null), [f, p] = w(null), m = X_(e, n), h = Object.keys(e.paramsFromForm ?? {}).some((e) => m[e] === void 0), g = e.mapOption.value, _ = e.mapOption.label, v = e.mapOption.description, y = (e.refreshOn ?? Object.values(e.paramsFromForm ?? {})).map((e) => `${e}=${JSON.stringify(n[e])}`).join("|"), b = x(a);
13406
+ b.current = a;
13407
+ let S = x(r);
13408
+ S.current = r;
13409
+ let C = x(m);
13410
+ C.current = m;
13411
+ let T = x(t);
13412
+ return T.current = t, l(() => {
13413
+ let t = b.current;
13414
+ if (!t || h) {
13406
13415
  p(null), d(null);
13407
13416
  return;
13408
13417
  }
13409
13418
  let n = !1;
13410
- return c(!0), d(null), a(e.action, e.key, m).then((i) => {
13419
+ c(!0), d(null);
13420
+ let r = C.current;
13421
+ return t(e.action, e.key, r).then((t) => {
13411
13422
  if (n) return;
13412
- let a = i, o = [];
13413
- if (Array.isArray(a)) o = a;
13414
- else if (a && typeof a == "object") for (let e of Object.keys(a)) {
13415
- let t = a[e];
13423
+ let r = t, i = [];
13424
+ if (Array.isArray(r)) i = r;
13425
+ else if (r && typeof r == "object") for (let e of Object.keys(r)) {
13426
+ let t = r[e];
13416
13427
  if (Array.isArray(t)) {
13417
- o = t;
13428
+ i = t;
13418
13429
  break;
13419
13430
  }
13420
13431
  }
13421
- if (p(o), e.hideWhenFewerThan !== void 0 && o.length === 1 && (typeof t != "string" || t.length === 0)) {
13422
- let e = o[0]?.[g];
13423
- typeof e == "string" && e.length > 0 && r(e);
13432
+ p(i);
13433
+ let a = T.current;
13434
+ if (e.hideWhenFewerThan !== void 0 && i.length === 1 && (typeof a != "string" || a.length === 0)) {
13435
+ let e = i[0]?.[g];
13436
+ typeof e == "string" && e.length > 0 && S.current(e);
13424
13437
  }
13425
13438
  }).catch((e) => {
13426
13439
  n || (d(e instanceof Error ? e.message : String(e)), p([]));
@@ -13430,13 +13443,14 @@ function Z_({ field: e, value: t, values: n, onChange: r, disabled: i, onAction:
13430
13443
  n = !0;
13431
13444
  };
13432
13445
  }, [
13433
- (e.refreshOn ?? Object.values(e.paramsFromForm ?? {})).map((e) => `${e}=${JSON.stringify(n[e])}`).join("|"),
13434
- a,
13446
+ y,
13447
+ h,
13448
+ a !== void 0,
13435
13449
  e.action,
13436
- e.key
13437
- ]);
13438
- let g = e.mapOption.value, _ = e.mapOption.label, v = e.mapOption.description;
13439
- return !a && e.hideWhenFewerThan !== void 0 || e.hideWhenFewerThan !== void 0 && f !== null && f.length < e.hideWhenFewerThan ? null : /* @__PURE__ */ E(y_, {
13450
+ e.key,
13451
+ e.hideWhenFewerThan,
13452
+ g
13453
+ ]), !a && e.hideWhenFewerThan !== void 0 || e.hideWhenFewerThan !== void 0 && f !== null && f.length < e.hideWhenFewerThan ? null : /* @__PURE__ */ E(y_, {
13440
13454
  label: e.label,
13441
13455
  description: e.description,
13442
13456
  required: e.required,
@@ -27109,7 +27123,7 @@ p(function({ tree: e, agents: t, getCellState: n, onCellClick: r, selectedCell:
27109
27123
  label: p
27110
27124
  })]
27111
27125
  });
27112
- }), S(), S(), S(), S(), S(), S();
27126
+ }), S(), S(), S(), S(), S(), S(), S();
27113
27127
  //#endregion
27114
27128
  //#region ../ui-library/src/composites/page-shell.tsx
27115
27129
  function jN({ icon: e, title: t, subtitle: n, actions: r, nav: i, fill: a = !1, className: o, children: s }) {
@@ -1,4 +1,4 @@
1
- import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-BvSjPfq3.mjs";
1
+ import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-tkZ3pY5a.mjs";
2
2
  //#region \0virtual:mf-localSharedImportMap:__mfe_internal__addon_training_page
3
3
  var e = {
4
4
  "@camstack/sdk": {
@@ -33,7 +33,7 @@ var e = {
33
33
  },
34
34
  "@camstack/ui-library": {
35
35
  name: "@camstack/ui-library",
36
- version: "1.2.330",
36
+ version: "1.2.332",
37
37
  scope: ["default"],
38
38
  loaded: !1,
39
39
  from: "addon_training_page",
@@ -81,7 +81,7 @@ async function r() {
81
81
  }
82
82
  },
83
83
  "@camstack/ui-library": {
84
- version: "1.2.330",
84
+ version: "1.2.332",
85
85
  scope: "default",
86
86
  shareConfig: {
87
87
  singleton: !0,
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-BvSjPfq3.mjs";
1
+ import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_training_page__remoteEntry_js-tkZ3pY5a.mjs";
2
2
  export { t as get, e as init };
@@ -2762,7 +2762,7 @@ async function or(e) {
2762
2762
  }
2763
2763
  }
2764
2764
  async function sr() {
2765
- return ir ||= or(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-BNJmzVCS.mjs")).catch((e) => {
2765
+ return ir ||= or(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_training_page-3rzzcUyu.mjs")).catch((e) => {
2766
2766
  throw ir = void 0, e;
2767
2767
  }), ir;
2768
2768
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-training",
3
- "version": "0.1.87",
3
+ "version": "0.1.89",
4
4
  "description": "Cloud training for CamStack: fine-tune the root detector on your own frames, on your own GPU-cloud account",
5
5
  "keywords": [
6
6
  "camstack",