@milaboratories/milaboratories.ui-examples.model 1.1.20 → 1.1.22

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @milaboratories/milaboratories.ui-examples.model@1.1.20 build /home/runner/work/platforma/platforma/etc/blocks/ui-examples/model
2
+ > @milaboratories/milaboratories.ui-examples.model@1.1.22 build /home/runner/work/platforma/platforma/etc/blocks/ui-examples/model
3
3
  > tsup && vite build && block-tools build-model
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,14 +10,14 @@
10
10
  CLI Cleaning output folder
11
11
  CJS Build start
12
12
  ESM Build start
13
- CJS dist/index.cjs 3.48 KB
14
- CJS dist/index.cjs.map 7.97 KB
15
- CJS ⚡️ Build success in 81ms
16
- ESM dist/index.js 3.44 KB
17
- ESM dist/index.js.map 7.93 KB
18
- ESM ⚡️ Build success in 81ms
13
+ ESM dist/index.js 3.82 KB
14
+ ESM dist/index.js.map 8.89 KB
15
+ ESM ⚡️ Build success in 80ms
16
+ CJS dist/index.cjs 3.87 KB
17
+ CJS dist/index.cjs.map 8.93 KB
18
+ CJS ⚡️ Build success in 80ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 830ms
20
+ DTS ⚡️ Build success in 903ms
21
21
  DTS dist/index.d.cts 1.45 KB
22
22
  DTS dist/index.d.ts 1.45 KB
23
23
  vite v5.4.11 building for production...
@@ -25,6 +25,6 @@ transforming...
25
25
  ✓ 4 modules transformed.
26
26
  rendering chunks...
27
27
  computing gzip size...
28
- dist/bundle.js 145.78 kB │ gzip: 26.73 kB │ map: 318.56 kB
29
- dist/bundle.js 156.05 kB │ gzip: 27.24 kB │ map: 319.69 kB
30
- ✓ built in 401ms
28
+ dist/bundle.js 146.19 kB │ gzip: 26.82 kB │ map: 320.23 kB
29
+ dist/bundle.js 156.50 kB │ gzip: 27.32 kB │ map: 321.37 kB
30
+ ✓ built in 419ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @milaboratories/milaboratories.ui-examples.model
2
2
 
3
+ ## 1.1.22
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [63c66c8]
8
+ - @platforma-sdk/model@1.22.97
9
+
10
+ ## 1.1.21
11
+
12
+ ### Patch Changes
13
+
14
+ - fdd58fd: Isolate possible errors in “sections”, “title” and “argsValid”
15
+
3
16
  ## 1.1.20
4
17
 
5
18
  ### Patch Changes
package/dist/bundle.js CHANGED
@@ -3798,7 +3798,7 @@
3798
3798
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
3799
3799
  };
3800
3800
  const NEVER = INVALID;
3801
- var z = /* @__PURE__ */ Object.freeze({
3801
+ var z$1 = /* @__PURE__ */ Object.freeze({
3802
3802
  __proto__: null,
3803
3803
  defaultErrorMap: errorMap,
3804
3804
  setErrorMap,
@@ -3917,7 +3917,7 @@
3917
3917
  function b$1(t) {
3918
3918
  throw new Error("Unexpected object: " + t);
3919
3919
  }
3920
- function J$1(t) {
3920
+ function J(t) {
3921
3921
  const { type: n, name: e, domain: r } = t;
3922
3922
  return { type: n, name: e, ...r && { domain: r } };
3923
3923
  }
@@ -3957,21 +3957,21 @@
3957
3957
  b$1(t);
3958
3958
  }
3959
3959
  }
3960
- z.object({
3961
- __isRef: z.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
3962
- blockId: z.string().describe("Upstream block id"),
3963
- name: z.string().describe("Name of the output provided to the upstream block's output context")
3960
+ z$1.object({
3961
+ __isRef: z$1.literal(true).describe("Crucial marker for the block dependency tree reconstruction"),
3962
+ blockId: z$1.string().describe("Upstream block id"),
3963
+ name: z$1.string().describe("Name of the output provided to the upstream block's output context")
3964
3964
  }).describe(
3965
3965
  "Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees."
3966
3966
  ).strict().readonly();
3967
3967
  function i(t) {
3968
3968
  return t.kind === "PColumn";
3969
3969
  }
3970
- function W$1(t) {
3970
+ function W(t) {
3971
3971
  return i(t.spec);
3972
3972
  }
3973
3973
  function dt(t) {
3974
- if (!W$1(t)) throw new Error(`not a PColumn (kind = ${t.spec.kind})`);
3974
+ if (!W(t)) throw new Error(`not a PColumn (kind = ${t.spec.kind})`);
3975
3975
  return t;
3976
3976
  }
3977
3977
  function lt(t, n) {
@@ -4004,14 +4004,14 @@
4004
4004
  return t.ok ? { ok: true, value: n(t.value) } : t;
4005
4005
  }
4006
4006
  const Q = 24;
4007
- z.string().length(Q).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4008
- var fe = Object.defineProperty;
4009
- var he = (t, e, n) => e in t ? fe(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
4010
- var S = (t, e, n) => he(t, typeof e != "symbol" ? e + "" : e, n);
4011
- function V(t) {
4007
+ z$1.string().length(Q).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");
4008
+ var he = Object.defineProperty;
4009
+ var ge = (t, e, n) => e in t ? he(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
4010
+ var S = (t, e, n) => ge(t, typeof e != "symbol" ? e + "" : e, n);
4011
+ function j(t) {
4012
4012
  return { type: "Immediate", value: t };
4013
4013
  }
4014
- function Se() {
4014
+ function Ae() {
4015
4015
  return typeof globalThis.getPlatforma < "u" || typeof globalThis.platforma < "u";
4016
4016
  }
4017
4017
  function oe(t) {
@@ -4027,24 +4027,24 @@
4027
4027
  if (typeof globalThis.cfgRenderCtx < "u") return globalThis.cfgRenderCtx;
4028
4028
  throw new Error("Not in config rendering context");
4029
4029
  }
4030
- function D(t, e) {
4030
+ function E(t, e) {
4031
4031
  const n = we();
4032
4032
  if (n === void 0) return false;
4033
4033
  if (t in n.callbackRegistry) throw new Error(`Callback with key ${t} already registered.`);
4034
4034
  return n.callbackRegistry[t] = e, true;
4035
4035
  }
4036
- const J = /* @__PURE__ */ new Map();
4037
- function Ae(t, e) {
4036
+ const $ = /* @__PURE__ */ new Map();
4037
+ function Ie(t, e) {
4038
4038
  t in c().callbackRegistry || (c().callbackRegistry[t] = (n) => {
4039
- for (const r of J.get(t))
4039
+ for (const r of $.get(t))
4040
4040
  r(n);
4041
- }, J.set(t, [])), J.get(t).push(e);
4041
+ }, $.set(t, [])), $.get(t).push(e);
4042
4042
  }
4043
4043
  class b {
4044
4044
  constructor(e, n = (r) => r) {
4045
4045
  S(this, "isResolved", false);
4046
4046
  S(this, "resolvedValue");
4047
- this.handle = e, this.postProcess = n, Ae(e, (r) => {
4047
+ this.handle = e, this.postProcess = n, Ie(e, (r) => {
4048
4048
  this.resolvedValue = n(r), this.isResolved = true;
4049
4049
  });
4050
4050
  }
@@ -4061,7 +4061,7 @@
4061
4061
  return this.isResolved ? this.resolvedValue : { __awaited_futures__: [this.handle] };
4062
4062
  }
4063
4063
  }
4064
- function W(t, e) {
4064
+ function H(t, e) {
4065
4065
  return t === void 0 ? void 0 : e(t);
4066
4066
  }
4067
4067
  class v {
@@ -4103,7 +4103,7 @@
4103
4103
  ...this.resolvePath,
4104
4104
  ...n.map((s) => typeof s == "string" ? s : s.field)
4105
4105
  ];
4106
- return W(
4106
+ return H(
4107
4107
  c().resolveWithCommon(this.handle, e, ...n),
4108
4108
  (s) => new v(s, r)
4109
4109
  );
@@ -4125,7 +4125,7 @@
4125
4125
  }
4126
4126
  getError() {
4127
4127
  const e = [...this.resolvePath, "error"];
4128
- return W(
4128
+ return H(
4129
4129
  c().getError(this.handle),
4130
4130
  (n) => new v(n, e)
4131
4131
  );
@@ -4167,7 +4167,7 @@
4167
4167
  getPColumns(e = false, n = "") {
4168
4168
  const r = this.parsePObjectCollection(e, n);
4169
4169
  return r === void 0 ? void 0 : Object.entries(r).map(([, i2]) => {
4170
- if (!W$1(i2)) throw new Error(`not a PColumn (kind = ${i2.spec.kind})`);
4170
+ if (!W(i2)) throw new Error(`not a PColumn (kind = ${i2.spec.kind})`);
4171
4171
  return i2;
4172
4172
  });
4173
4173
  }
@@ -4184,8 +4184,8 @@
4184
4184
  if (r === void 0) return;
4185
4185
  const s = {};
4186
4186
  for (const [i2, o] of Object.entries(r)) {
4187
- const l = [...this.resolvePath, i2];
4188
- s[i2] = lt(o, (a) => new v(a, l));
4187
+ const a = [...this.resolvePath, i2];
4188
+ s[i2] = lt(o, (l) => new v(l, a));
4189
4189
  }
4190
4190
  return s;
4191
4191
  }
@@ -4278,59 +4278,59 @@
4278
4278
  }, o = e;
4279
4279
  if (s && (r === "Input" && !this.getInputsLocked() || r === "Output" && !this.getOutputsLocked()))
4280
4280
  return;
4281
- let a = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4281
+ let l = (r === "Input" ? this.listInputFields() : r === "Output" ? this.listOutputFields() : this.listDynamicFields()).map(
4282
4282
  (u) => [u, this.resolve({ field: u, assertFieldType: r })]
4283
4283
  );
4284
- return i2 && (a = a.filter((u) => u[1] !== void 0)), a.map(([u, h]) => o(u, h));
4284
+ return i2 && (l = l.filter((u) => u[1] !== void 0)), l.map(([u, h]) => o(u, h));
4285
4285
  }
4286
4286
  }
4287
4287
  const ae = "staging", le = "main";
4288
- const Ie = "pl7.app/label", Re = "pl7.app/trace", Fe = z.object({
4289
- type: z.string(),
4290
- importance: z.number().optional(),
4291
- id: z.string().optional(),
4292
- label: z.string()
4293
- }), xe = z.array(Fe), Te = 1e-3, Oe = "__LABEL__", ee = "__LABEL__@1";
4294
- function ke(t, e, n = {}) {
4288
+ const Fe = "pl7.app/label", Re = "pl7.app/trace", xe = z$1.object({
4289
+ type: z$1.string(),
4290
+ importance: z$1.number().optional(),
4291
+ id: z$1.string().optional(),
4292
+ label: z$1.string()
4293
+ }), Te = z$1.array(xe), Oe = 1e-3, ke = "__LABEL__", ee = "__LABEL__@1";
4294
+ function Le(t, e, n = {}) {
4295
4295
  const r = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), i2 = t.map((p) => {
4296
4296
  var R, Q2;
4297
- const g = e(p), f2 = (R = g.annotations) == null ? void 0 : R[Ie], A = (Q2 = g.annotations) == null ? void 0 : Q2[Re], y = (A ? xe.safeParse(JSON.parse(A)).data : void 0) ?? [];
4297
+ const g = e(p), f2 = (R = g.annotations) == null ? void 0 : R[Fe], I = (Q2 = g.annotations) == null ? void 0 : Q2[Re], y = (I ? Te.safeParse(JSON.parse(I)).data : void 0) ?? [];
4298
4298
  if (f2) {
4299
- const w = { label: f2, type: Oe, importance: -2 };
4300
- n.addLabelAsSuffix ? y.push(w) : y.splice(0, 0, w);
4299
+ const A = { label: f2, type: ke, importance: -2 };
4300
+ n.addLabelAsSuffix ? y.push(A) : y.splice(0, 0, A);
4301
4301
  }
4302
- const I = [], L = /* @__PURE__ */ new Map();
4303
- for (let w = y.length - 1; w >= 0; --w) {
4304
- const { type: N } = y[w], pe = y[w].importance ?? 0, M = (L.get(N) ?? 0) + 1;
4305
- L.set(N, M);
4306
- const F = `${N}@${M}`;
4307
- s.set(F, (s.get(F) ?? 0) + 1), r.set(
4308
- F,
4302
+ const F = [], D = /* @__PURE__ */ new Map();
4303
+ for (let A = y.length - 1; A >= 0; --A) {
4304
+ const { type: M } = y[A], fe = y[A].importance ?? 0, J2 = (D.get(M) ?? 0) + 1;
4305
+ D.set(M, J2);
4306
+ const x = `${M}@${J2}`;
4307
+ s.set(x, (s.get(x) ?? 0) + 1), r.set(
4308
+ x,
4309
4309
  Math.max(
4310
- r.get(F) ?? Number.NEGATIVE_INFINITY,
4311
- pe - (y.length - w) * Te
4310
+ r.get(x) ?? Number.NEGATIVE_INFINITY,
4311
+ fe - (y.length - A) * Oe
4312
4312
  )
4313
- ), I.push({ ...y[w], fullType: F, occurenceIndex: M });
4313
+ ), F.push({ ...y[A], fullType: x, occurenceIndex: J2 });
4314
4314
  }
4315
- return I.reverse(), {
4315
+ return F.reverse(), {
4316
4316
  value: p,
4317
4317
  spec: g,
4318
4318
  label: f2,
4319
- fullTrace: I
4319
+ fullTrace: F
4320
4320
  };
4321
- }), o = [], l = [], a = [...r];
4322
- a.sort(([, p], [, g]) => g - p);
4323
- for (const [p] of a)
4324
- p.endsWith("@1") || s.get(p) === t.length ? o.push(p) : l.push(p);
4321
+ }), o = [], a = [], l = [...r];
4322
+ l.sort(([, p], [, g]) => g - p);
4323
+ for (const [p] of l)
4324
+ p.endsWith("@1") || s.get(p) === t.length ? o.push(p) : a.push(p);
4325
4325
  const u = (p) => i2.map((g) => {
4326
- const f2 = g.fullTrace.filter((y) => p.has(y.fullType)).map((y) => y.label), A = n.separator ?? " / ";
4326
+ const f2 = g.fullTrace.filter((y) => p.has(y.fullType)).map((y) => y.label), I = n.separator ?? " / ";
4327
4327
  return {
4328
- label: f2.join(A),
4328
+ label: f2.join(I),
4329
4329
  value: g.value
4330
4330
  };
4331
4331
  });
4332
4332
  if (o.length === 0) {
4333
- if (l.length !== 0) throw new Error("Assertion error.");
4333
+ if (a.length !== 0) throw new Error("Assertion error.");
4334
4334
  return u(new Set(ee));
4335
4335
  }
4336
4336
  let h = 0, d = 0;
@@ -4343,9 +4343,9 @@
4343
4343
  if (new Set(g.map((f2) => f2.label)).size === t.length) return g;
4344
4344
  d++, d == o.length && (h++, d = h);
4345
4345
  }
4346
- return u(/* @__PURE__ */ new Set([...o, ...l]));
4346
+ return u(/* @__PURE__ */ new Set([...o, ...a]));
4347
4347
  }
4348
- class Le {
4348
+ class De {
4349
4349
  constructor() {
4350
4350
  S(this, "ctx", c());
4351
4351
  S(this, "defaultLabelFn", (e, n) => {
@@ -4361,7 +4361,7 @@
4361
4361
  }
4362
4362
  getOptions(e, n) {
4363
4363
  const r = this.getSpecs().entries.filter((s) => e(s.obj));
4364
- return typeof n == "object" || typeof n > "u" ? ke(r, (s) => s.obj, n ?? {}).map(({ value: { ref: s }, label: i2 }) => ({
4364
+ return typeof n == "object" || typeof n > "u" ? Le(r, (s) => s.obj, n ?? {}).map(({ value: { ref: s }, label: i2 }) => ({
4365
4365
  ref: s,
4366
4366
  label: i2
4367
4367
  })) : r.map((s) => ({
@@ -4475,10 +4475,10 @@
4475
4475
  if (!i(r.obj.spec))
4476
4476
  continue;
4477
4477
  const s = r.obj.spec;
4478
- if (e.name === s.name && e.valueType === s.valueType && e.axesSpec.length === s.axesSpec.length && q(e.domain, s.domain)) {
4478
+ if (e.name === s.name && e.valueType === s.valueType && e.axesSpec.length === s.axesSpec.length && z(e.domain, s.domain)) {
4479
4479
  for (let i2 = 0; i2 < e.axesSpec.length; ++i2) {
4480
- const o = e.axesSpec[i2], l = s.axesSpec[i2];
4481
- if (o.name !== l.name || o.type !== l.type || !q(o.domain, l.domain))
4480
+ const o = e.axesSpec[i2], a = s.axesSpec[i2];
4481
+ if (o.name !== a.name || o.type !== a.type || !z(o.domain, a.domain))
4482
4482
  continue e;
4483
4483
  }
4484
4484
  n.push(r.obj);
@@ -4487,20 +4487,20 @@
4487
4487
  return n;
4488
4488
  }
4489
4489
  }
4490
- function q(t, e) {
4490
+ function z(t, e) {
4491
4491
  if (t === void 0) return e === void 0;
4492
4492
  if (e === void 0) return true;
4493
4493
  for (const n in e)
4494
4494
  if (t[n] !== e[n]) return false;
4495
4495
  return true;
4496
4496
  }
4497
- class E {
4497
+ class V {
4498
4498
  constructor() {
4499
4499
  S(this, "ctx");
4500
4500
  S(this, "args");
4501
4501
  S(this, "uiState");
4502
4502
  S(this, "_activeArgsCache");
4503
- S(this, "resultPool", new Le());
4503
+ S(this, "resultPool", new De());
4504
4504
  this.ctx = c(), this.args = JSON.parse(this.ctx.args), this.uiState = this.ctx.uiState !== void 0 ? JSON.parse(this.ctx.uiState) : {};
4505
4505
  }
4506
4506
  /**
@@ -4517,7 +4517,7 @@
4517
4517
  // return this.ctx.featureFlags;
4518
4518
  // }
4519
4519
  getNamedAccessor(e) {
4520
- return W(
4520
+ return H(
4521
4521
  this.ctx.getAccessorHandleByName(e),
4522
4522
  (n) => new v(n, [e])
4523
4523
  );
@@ -4535,9 +4535,9 @@
4535
4535
  findLabels(e) {
4536
4536
  const n = this.resultPool.getData();
4537
4537
  for (const r of n.entries) {
4538
- if (!W$1(r.obj)) continue;
4538
+ if (!W(r.obj)) continue;
4539
4539
  const s = r.obj.spec;
4540
- if (s.name === "pl7.app/label" && s.axesSpec.length === 1 && s.axesSpec[0].name === e.name && s.axesSpec[0].type === e.type && q(e.domain, s.axesSpec[0].domain)) {
4540
+ if (s.name === "pl7.app/label" && s.axesSpec.length === 1 && s.axesSpec[0].name === e.name && s.axesSpec[0].type === e.type && z(e.domain, s.axesSpec[0].domain)) {
4541
4541
  if (r.obj.data.resourceType.name !== "PColumnData/Json")
4542
4542
  throw Error(`Expected JSON column for labels, got: ${r.obj.data.resourceType.name}`);
4543
4543
  return Object.fromEntries(
@@ -4583,17 +4583,17 @@
4583
4583
  return this.ctx.getCurrentUnstableMarker();
4584
4584
  }
4585
4585
  }
4586
- const T = "1.22.59";
4587
- function Ee(t) {
4586
+ const T = "1.22.97";
4587
+ function Ve(t) {
4588
4588
  return t.__renderLambda === true;
4589
4589
  }
4590
4590
  function K(t) {
4591
4591
  if (t !== void 0)
4592
- return Ee(t) ? t.handle : t;
4592
+ return Ve(t) ? t.handle : t;
4593
4593
  }
4594
4594
  class _ {
4595
- constructor(e, n, r, s, i2, o, l) {
4596
- this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = s, this._inputsValid = i2, this._sections = o, this._title = l;
4595
+ constructor(e, n, r, s, i2, o, a) {
4596
+ this._renderingMode = e, this._initialArgs = n, this._initialUiState = r, this._outputs = s, this._inputsValid = i2, this._sections = o, this._title = a;
4597
4597
  }
4598
4598
  static create(e = "Heavy") {
4599
4599
  return new _(
@@ -4601,15 +4601,15 @@
4601
4601
  void 0,
4602
4602
  {},
4603
4603
  {},
4604
- V(true),
4605
- V([]),
4604
+ j(true),
4605
+ j([]),
4606
4606
  void 0
4607
4607
  );
4608
4608
  }
4609
4609
  output(e, n, r = {}) {
4610
4610
  if (typeof n == "function") {
4611
4611
  const s = `output#${e}`;
4612
- return D(s, () => n(new E())), new _(
4612
+ return E(s, () => n(new V())), new _(
4613
4613
  this._renderingMode,
4614
4614
  this._initialArgs,
4615
4615
  this._initialUiState,
@@ -4644,7 +4644,7 @@
4644
4644
  return this.output(e, n, { retentive: true });
4645
4645
  }
4646
4646
  argsValid(e) {
4647
- return typeof e == "function" ? (D("inputsValid", () => e(new E())), new _(
4647
+ return typeof e == "function" ? (E("inputsValid", () => e(new V())), new _(
4648
4648
  this._renderingMode,
4649
4649
  this._initialArgs,
4650
4650
  this._initialUiState,
@@ -4666,7 +4666,7 @@
4666
4666
  );
4667
4667
  }
4668
4668
  sections(e) {
4669
- return Array.isArray(e) ? this.sections(V(e)) : typeof e == "function" ? (D("sections", () => e(new E())), new _(
4669
+ return Array.isArray(e) ? this.sections(j(e)) : typeof e == "function" ? (E("sections", () => e(new V())), new _(
4670
4670
  this._renderingMode,
4671
4671
  this._initialArgs,
4672
4672
  this._initialUiState,
@@ -4686,7 +4686,7 @@
4686
4686
  }
4687
4687
  /** Sets a rendering function to derive block title, shown for the block in the left blocks-overview panel. */
4688
4688
  title(e) {
4689
- return D("title", () => e(new E())), new _(
4689
+ return E("title", () => e(new V())), new _(
4690
4690
  this._renderingMode,
4691
4691
  this._initialArgs,
4692
4692
  this._initialUiState,
@@ -4761,13 +4761,13 @@
4761
4761
  Object.entries(this._outputs).map(([n, r]) => [n, K(r)])
4762
4762
  )
4763
4763
  };
4764
- return Se() ? oe({ sdkVersion: T }) : { config: e };
4764
+ return Ae() ? oe({ sdkVersion: T }) : { config: e };
4765
4765
  }
4766
4766
  }
4767
- function wt(t, e, n, r) {
4767
+ function Ft(t, e, n, r) {
4768
4768
  var u, h;
4769
4769
  Array.isArray(r) && (r = { filters: r });
4770
- const s = t.resultPool.getData().entries.map((d) => d.obj).filter(W$1).filter((d) => d.spec.name === "pl7.app/label" && d.spec.axesSpec.length === 1), i2 = (d, p) => {
4770
+ const s = t.resultPool.getData().entries.map((d) => d.obj).filter(W).filter((d) => d.spec.name === "pl7.app/label" && d.spec.axesSpec.length === 1), i2 = (d, p) => {
4771
4771
  let g = d.toString();
4772
4772
  if (p)
4773
4773
  for (const f2 in p)
@@ -4776,18 +4776,18 @@
4776
4776
  }, o = /* @__PURE__ */ new Map();
4777
4777
  for (const d of e)
4778
4778
  for (const p of d.spec.axesSpec) {
4779
- const g = J$1(p);
4779
+ const g = J(p);
4780
4780
  for (const f2 of s) {
4781
- const A = f2.spec.axesSpec[0], y = J$1(f2.spec.axesSpec[0]);
4781
+ const I = f2.spec.axesSpec[0], y = J(f2.spec.axesSpec[0]);
4782
4782
  if (ot(g, y)) {
4783
- const I = Object.keys(g.domain ?? {}).length, L = Object.keys(y.domain ?? {}).length;
4784
- if (I > L) {
4783
+ const F = Object.keys(g.domain ?? {}).length, D = Object.keys(y.domain ?? {}).length;
4784
+ if (F > D) {
4785
4785
  const R = i2(f2.id, g.domain);
4786
4786
  o.set(R, {
4787
4787
  id: R,
4788
4788
  spec: {
4789
4789
  ...f2.spec,
4790
- axesSpec: [{ ...g, annotations: A.annotations }]
4790
+ axesSpec: [{ ...g, annotations: I.annotations }]
4791
4791
  },
4792
4792
  data: f2.data
4793
4793
  });
@@ -4800,36 +4800,41 @@
4800
4800
  (d) => d.data instanceof v && !d.data.getIsReadyOrError()
4801
4801
  ))
4802
4802
  return;
4803
- let l = e;
4804
- const a = [];
4803
+ let a = e;
4804
+ const l = [];
4805
4805
  if (r != null && r.coreColumnPredicate) {
4806
- l = [];
4806
+ a = [];
4807
4807
  for (const d of e)
4808
- r.coreColumnPredicate(d.spec) ? l.push(d) : a.push(d);
4808
+ r.coreColumnPredicate(d.spec) ? a.push(d) : l.push(d);
4809
4809
  }
4810
- return a.push(...o.values()), t.createPTable({
4810
+ return l.push(...o.values()), t.createPTable({
4811
4811
  src: {
4812
4812
  type: "outer",
4813
4813
  primary: {
4814
4814
  type: (r == null ? void 0 : r.coreJoinType) ?? "full",
4815
- entries: l.map((d) => ({ type: "column", column: d }))
4815
+ entries: a.map((d) => ({ type: "column", column: d }))
4816
4816
  },
4817
- secondary: a.map((d) => ({ type: "column", column: d }))
4817
+ secondary: l.map((d) => ({ type: "column", column: d }))
4818
4818
  },
4819
4819
  filters: [...(r == null ? void 0 : r.filters) ?? [], ...((u = n == null ? void 0 : n.pTableParams) == null ? void 0 : u.filters) ?? []],
4820
4820
  sorting: ((h = n == null ? void 0 : n.pTableParams) == null ? void 0 : h.sorting) ?? []
4821
4821
  });
4822
4822
  }
4823
- const $BlockArgs = z.object({
4824
- numbers: z.array(z.coerce.number())
4823
+ const $BlockArgs = z$1.object({
4824
+ numbers: z$1.array(z$1.coerce.number())
4825
4825
  });
4826
- const platforma = _.create("Heavy").withArgs({ numbers: [1, 2, 3, 4] }).withUiState({ dataTableState: void 0, dynamicSections: [] }).output("numbers", (ctx) => {
4826
+ const platforma = _.create("Heavy").withArgs({ numbers: [1, 2, 3, 4] }).withUiState({ dataTableState: void 0, dynamicSections: [] }).argsValid((ctx) => {
4827
+ if (ctx.args.numbers.length === 5) {
4828
+ throw new Error("argsValid: test error");
4829
+ }
4830
+ return ctx.args.numbers.length > 0;
4831
+ }).output("numbers", (ctx) => {
4827
4832
  var _a, _b;
4828
4833
  return (_b = (_a = ctx.outputs) == null ? void 0 : _a.resolve("numbers")) == null ? void 0 : _b.getDataAsJson();
4829
4834
  }).output("pt", (ctx) => {
4830
4835
  var _a, _b, _c, _d, _e;
4831
4836
  if (!((_c = (_b = (_a = ctx.uiState) == null ? void 0 : _a.dataTableState) == null ? void 0 : _b.tableState.pTableParams) == null ? void 0 : _c.filters)) return void 0;
4832
- return wt(
4837
+ return Ft(
4833
4838
  ctx,
4834
4839
  [
4835
4840
  {
@@ -4874,12 +4879,20 @@
4874
4879
  ]
4875
4880
  }
4876
4881
  );
4882
+ }).title((ctx) => {
4883
+ if (ctx.args.numbers.length === 5) {
4884
+ throw new Error("block title: test error");
4885
+ }
4886
+ return "Ui Examples";
4877
4887
  }).sections((ctx) => {
4878
4888
  const dynamicSections = (ctx.uiState.dynamicSections ?? []).map((it2) => ({
4879
4889
  type: "link",
4880
4890
  href: `/section?id=${it2.id}`,
4881
4891
  label: it2.label
4882
4892
  }));
4893
+ if (dynamicSections.some((it2) => it2.label === "Error")) {
4894
+ throw new Error("sections: test error");
4895
+ }
4883
4896
  return [
4884
4897
  { type: "link", href: "/loaders", label: "Loaders" },
4885
4898
  { type: "link", href: "/", label: "Icons/Masks" },