@milaboratories/milaboratories.pool-explorer.model 1.1.5 → 1.1.7

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/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@milaboratories/milaboratories.pool-explorer.model",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "Block model",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
9
9
  "dependencies": {
10
- "@platforma-sdk/model": "1.53.2"
10
+ "@platforma-sdk/model": "1.53.4"
11
11
  },
12
12
  "devDependencies": {
13
13
  "eslint": "^9.25.1",
14
14
  "typescript": "~5.6.3",
15
- "@platforma-sdk/block-tools": "2.6.35",
16
- "@milaboratories/build-configs": "1.4.0",
15
+ "@platforma-sdk/block-tools": "2.6.37",
16
+ "@platforma-sdk/eslint-config": "1.2.0",
17
17
  "@milaboratories/ts-configs": "1.2.0",
18
- "@milaboratories/ts-builder": "1.2.4",
19
- "@platforma-sdk/eslint-config": "1.2.0"
18
+ "@milaboratories/build-configs": "1.4.0",
19
+ "@milaboratories/ts-builder": "1.2.4"
20
20
  },
21
21
  "scripts": {
22
22
  "build": "ts-builder build --target block-model && block-tools build-model",
package/src/index.ts CHANGED
@@ -1,4 +1,11 @@
1
- import { BlockModelV3, DataModel, type InferHrefType, type InferOutputsType } from '@platforma-sdk/model';
1
+ import {
2
+ BlockModelV3,
3
+ DATA_MODEL_DEFAULT_VERSION,
4
+ DataModelBuilder,
5
+ defineDataVersions,
6
+ type InferHrefType,
7
+ type InferOutputsType,
8
+ } from '@platforma-sdk/model';
2
9
 
3
10
  export type BlockData = {
4
11
  titleArgs: string;
@@ -6,7 +13,13 @@ export type BlockData = {
6
13
 
7
14
  export type BlockArgs = BlockData;
8
15
 
9
- const dataModel = DataModel.create<BlockData>(() => ({ titleArgs: 'The title' }));
16
+ const Version = defineDataVersions({ V1: DATA_MODEL_DEFAULT_VERSION });
17
+
18
+ type VersionedData = { [Version.V1]: BlockData };
19
+
20
+ const dataModel = new DataModelBuilder<VersionedData>()
21
+ .from(Version.V1)
22
+ .init(() => ({ titleArgs: 'The title' }));
10
23
 
11
24
  export const platforma = BlockModelV3.create({ dataModel, renderingMode: 'Heavy' })
12
25