@milaboratories/milaboratories.ui-examples.model 1.1.19 → 1.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @milaboratories/milaboratories.ui-examples.model@1.1.19 build /home/runner/work/platforma/platforma/etc/blocks/ui-examples/model
2
+ > @milaboratories/milaboratories.ui-examples.model@1.1.21 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
- ESM dist/index.js 3.44 KB
14
- ESM dist/index.js.map 7.93 KB
15
- ESM ⚡️ Build success in 78ms
16
- CJS dist/index.cjs 3.48 KB
17
- CJS dist/index.cjs.map 7.97 KB
18
- CJS ⚡️ Build success in 78ms
13
+ CJS dist/index.cjs 3.87 KB
14
+ CJS dist/index.cjs.map 8.93 KB
15
+ CJS ⚡️ Build success in 82ms
16
+ ESM dist/index.js 3.82 KB
17
+ ESM dist/index.js.map 8.89 KB
18
+ ESM ⚡️ Build success in 83ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 840ms
20
+ DTS ⚡️ Build success in 858ms
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 418ms
28
+ dist/bundle.js 146.17 kB │ gzip: 26.82 kB │ map: 319.35 kB
29
+ dist/bundle.js 156.48 kB │ gzip: 27.33 kB │ map: 320.50 kB
30
+ ✓ built in 423ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @milaboratories/milaboratories.ui-examples.model
2
2
 
3
+ ## 1.1.21
4
+
5
+ ### Patch Changes
6
+
7
+ - fdd58fd: Isolate possible errors in “sections”, “title” and “argsValid”
8
+
9
+ ## 1.1.20
10
+
11
+ ### Patch Changes
12
+
13
+ - @platforma-sdk/model@1.22.59
14
+
3
15
  ## 1.1.19
4
16
 
5
17
  ### Patch Changes
package/dist/bundle.js CHANGED
@@ -4583,7 +4583,7 @@
4583
4583
  return this.ctx.getCurrentUnstableMarker();
4584
4584
  }
4585
4585
  }
4586
- const T = "1.22.18";
4586
+ const T = "1.22.59";
4587
4587
  function Ee(t) {
4588
4588
  return t.__renderLambda === true;
4589
4589
  }
@@ -4823,7 +4823,12 @@
4823
4823
  const $BlockArgs = z.object({
4824
4824
  numbers: z.array(z.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) => {
@@ -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" },