@milaboratories/milaboratories.ui-examples.model 1.4.2 → 1.4.4
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/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +14 -0
- package/dist/bundle.js +43 -17
- package/dist/bundle.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +6 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @milaboratories/milaboratories.ui-examples.model@1.4.
|
|
3
|
+
> @milaboratories/milaboratories.ui-examples.model@1.4.4 build /home/runner/_work/platforma/platforma/etc/blocks/ui-examples/model
|
|
4
4
|
> ts-builder build --target block-model && block-tools build-model
|
|
5
5
|
|
|
6
6
|
Building block-model project...
|
|
7
7
|
↳ rollup -c /configs/rollup.block-model.config.js
|
|
8
8
|
[36m
|
|
9
9
|
[1m./src/index.ts[22m → [1mdist, dist[22m...[39m
|
|
10
|
-
[32mcreated [1mdist, dist[22m in [
|
|
10
|
+
[32mcreated [1mdist, dist[22m in [1m3.3s[22m[39m
|
|
11
11
|
[36m
|
|
12
12
|
[1m./src/index.ts[22m → [1mdist[22m...[39m
|
|
13
13
|
[1m[33m(!) Circular dependency[39m[22m
|
|
14
14
|
../../../../sdk/model/dist/components/PFrameForGraphs.js -> ../../../../sdk/model/dist/pframe_utils/columns.js -> ../../../../sdk/model/dist/components/PFrameForGraphs.js
|
|
15
|
-
[32mcreated [1mdist[22m in [
|
|
15
|
+
[32mcreated [1mdist[22m in [1m4.3s[22m[39m
|
|
16
16
|
Build completed successfully
|
package/.turbo/turbo-lint.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @milaboratories/milaboratories.ui-examples.model@1.4.
|
|
3
|
+
> @milaboratories/milaboratories.ui-examples.model@1.4.4 lint /home/runner/_work/platforma/platforma/etc/blocks/ui-examples/model
|
|
4
4
|
> eslint .
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @milaboratories/milaboratories.ui-examples.model@1.4.
|
|
3
|
+
> @milaboratories/milaboratories.ui-examples.model@1.4.4 type-check /home/runner/_work/platforma/platforma/etc/blocks/ui-examples/model
|
|
4
4
|
> ts-builder types --target block-model
|
|
5
5
|
|
|
6
6
|
↳ tsc --noEmit --project ./tsconfig.json --customConditions ,
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @milaboratories/milaboratories.ui-examples.model
|
|
2
2
|
|
|
3
|
+
## 1.4.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [a748b92]
|
|
8
|
+
- @platforma-sdk/model@1.53.1
|
|
9
|
+
|
|
10
|
+
## 1.4.3
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [43b4247]
|
|
15
|
+
- @platforma-sdk/model@1.53.0
|
|
16
|
+
|
|
3
17
|
## 1.4.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/bundle.js
CHANGED
|
@@ -27,6 +27,11 @@
|
|
|
27
27
|
* Increment this when the storage structure itself changes (not block state migrations).
|
|
28
28
|
*/
|
|
29
29
|
const BLOCK_STORAGE_SCHEMA_VERSION = 'v1';
|
|
30
|
+
/**
|
|
31
|
+
* Default data version for new blocks without migrations.
|
|
32
|
+
* Unique identifier ensures blocks are created via DataModel API.
|
|
33
|
+
*/
|
|
34
|
+
const DATA_MODEL_DEFAULT_VERSION = '__pl_v1_d4e8f2a1__';
|
|
30
35
|
/**
|
|
31
36
|
* Type guard to check if a value is a valid BlockStorage object.
|
|
32
37
|
* Checks for the discriminator key and valid schema version.
|
|
@@ -46,16 +51,32 @@
|
|
|
46
51
|
* Creates a BlockStorage with the given initial data
|
|
47
52
|
*
|
|
48
53
|
* @param initialData - The initial data value (defaults to empty object)
|
|
49
|
-
* @param version - The initial data version (defaults to
|
|
54
|
+
* @param version - The initial data version key (defaults to DATA_MODEL_DEFAULT_VERSION)
|
|
50
55
|
* @returns A new BlockStorage instance with discriminator key
|
|
51
56
|
*/
|
|
52
|
-
function createBlockStorage(initialData = {}, version =
|
|
57
|
+
function createBlockStorage(initialData = {}, version = DATA_MODEL_DEFAULT_VERSION) {
|
|
53
58
|
return {
|
|
54
59
|
[BLOCK_STORAGE_KEY]: BLOCK_STORAGE_SCHEMA_VERSION,
|
|
55
60
|
__dataVersion: version,
|
|
56
61
|
__data: initialData,
|
|
57
62
|
};
|
|
58
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Normalizes raw storage data to BlockStorage format.
|
|
66
|
+
* If the input is already a BlockStorage, returns it as-is.
|
|
67
|
+
* If the input is legacy format (raw state), wraps it in BlockStorage structure.
|
|
68
|
+
*
|
|
69
|
+
* @param raw - Raw storage data (may be legacy format or BlockStorage)
|
|
70
|
+
* @returns Normalized BlockStorage
|
|
71
|
+
*/
|
|
72
|
+
function normalizeBlockStorage(raw) {
|
|
73
|
+
if (isBlockStorage(raw)) {
|
|
74
|
+
const storage = raw;
|
|
75
|
+
return { ...storage, __dataVersion: String(storage.__dataVersion) };
|
|
76
|
+
}
|
|
77
|
+
// Legacy format: raw is the state directly
|
|
78
|
+
return createBlockStorage(raw);
|
|
79
|
+
}
|
|
59
80
|
// =============================================================================
|
|
60
81
|
// Data Access & Update Functions
|
|
61
82
|
// =============================================================================
|
|
@@ -4784,6 +4805,9 @@
|
|
|
4784
4805
|
Visibility: 'pl7.app/table/visibility',
|
|
4785
4806
|
},
|
|
4786
4807
|
Trace: 'pl7.app/trace',
|
|
4808
|
+
VDJ: {
|
|
4809
|
+
IsAssemblingFeature: 'pl7.app/vdj/isAssemblingFeature',
|
|
4810
|
+
},
|
|
4787
4811
|
};
|
|
4788
4812
|
const ValueTypeSchema = z.enum(['Int', 'Long', 'Float', 'Double', 'String']);
|
|
4789
4813
|
const AnnotationJson = {
|
|
@@ -4813,6 +4837,7 @@
|
|
|
4813
4837
|
[Annotation.Sequence.IsAnnotation]: z.boolean(),
|
|
4814
4838
|
[Annotation.Table.OrderPriority]: z.number(),
|
|
4815
4839
|
[Annotation.Trace]: z.record(z.string(), z.unknown()),
|
|
4840
|
+
[Annotation.VDJ.IsAssemblingFeature]: z.boolean(),
|
|
4816
4841
|
};
|
|
4817
4842
|
/// Helper function for reading plain annotation values
|
|
4818
4843
|
function readAnnotation(spec, key) {
|
|
@@ -7498,7 +7523,7 @@
|
|
|
7498
7523
|
}
|
|
7499
7524
|
}
|
|
7500
7525
|
|
|
7501
|
-
var version = "1.
|
|
7526
|
+
var version = "1.53.1";
|
|
7502
7527
|
|
|
7503
7528
|
const PlatformaSDKVersion = version;
|
|
7504
7529
|
|
|
@@ -7764,7 +7789,7 @@
|
|
|
7764
7789
|
*
|
|
7765
7790
|
* Callbacks registered by DataModel.registerCallbacks():
|
|
7766
7791
|
* - `__pl_data_initial`: () => initial data
|
|
7767
|
-
* - `
|
|
7792
|
+
* - `__pl_data_migrate`: (versioned) => DataMigrationResult
|
|
7768
7793
|
* - `__pl_storage_initial`: () => initial BlockStorage as JSON string
|
|
7769
7794
|
*
|
|
7770
7795
|
* @module block_storage_vm
|
|
@@ -7800,7 +7825,8 @@
|
|
|
7800
7825
|
}
|
|
7801
7826
|
// Check for BlockStorage format (has discriminator)
|
|
7802
7827
|
if (isBlockStorage(parsed)) {
|
|
7803
|
-
|
|
7828
|
+
const storage = normalizeBlockStorage(parsed);
|
|
7829
|
+
return { storage, data: getStorageData(storage) };
|
|
7804
7830
|
}
|
|
7805
7831
|
// Check for legacy V1/V2 format: { args, uiState }
|
|
7806
7832
|
if (isLegacyModelV1ApiFormat(parsed)) {
|
|
@@ -7865,10 +7891,10 @@
|
|
|
7865
7891
|
return getStorageDebugView(rawStorage);
|
|
7866
7892
|
});
|
|
7867
7893
|
/**
|
|
7868
|
-
* Runs storage migration using the DataModel's
|
|
7894
|
+
* Runs storage migration using the DataModel's migrate callback.
|
|
7869
7895
|
* This is the main entry point for the middle layer to trigger migrations.
|
|
7870
7896
|
*
|
|
7871
|
-
* Uses the '
|
|
7897
|
+
* Uses the '__pl_data_migrate' callback registered by DataModel.registerCallbacks() which:
|
|
7872
7898
|
* - Handles all migration logic internally
|
|
7873
7899
|
* - Returns { version, data, warning? } - warning present if reset to initial data
|
|
7874
7900
|
*
|
|
@@ -7892,26 +7918,26 @@
|
|
|
7892
7918
|
__data: data,
|
|
7893
7919
|
});
|
|
7894
7920
|
};
|
|
7895
|
-
// Get the
|
|
7896
|
-
const
|
|
7897
|
-
if (typeof
|
|
7898
|
-
return { error: '
|
|
7921
|
+
// Get the migrate callback (registered by DataModel.registerCallbacks())
|
|
7922
|
+
const migrateCallback = ctx.callbackRegistry['__pl_data_migrate'];
|
|
7923
|
+
if (typeof migrateCallback !== 'function') {
|
|
7924
|
+
return { error: '__pl_data_migrate callback not found (DataModel not registered)' };
|
|
7899
7925
|
}
|
|
7900
|
-
// Call the migrator's
|
|
7926
|
+
// Call the migrator's migrate function
|
|
7901
7927
|
let result;
|
|
7902
7928
|
try {
|
|
7903
|
-
result =
|
|
7929
|
+
result = migrateCallback({ version: currentVersion, data: currentData });
|
|
7904
7930
|
}
|
|
7905
7931
|
catch (e) {
|
|
7906
7932
|
const errorMsg = e instanceof Error ? e.message : String(e);
|
|
7907
|
-
return { error: `
|
|
7933
|
+
return { error: `migrate() threw: ${errorMsg}` };
|
|
7908
7934
|
}
|
|
7909
7935
|
// Build info message
|
|
7910
7936
|
const info = result.version === currentVersion
|
|
7911
|
-
? `No migration needed (
|
|
7937
|
+
? `No migration needed (${currentVersion})`
|
|
7912
7938
|
: result.warning
|
|
7913
|
-
? `Reset to initial data (
|
|
7914
|
-
: `Migrated
|
|
7939
|
+
? `Reset to initial data (${result.version})`
|
|
7940
|
+
: `Migrated ${currentVersion}→${result.version}`;
|
|
7915
7941
|
return {
|
|
7916
7942
|
newStorageJson: createStorageJson(result.data, result.version),
|
|
7917
7943
|
info,
|