@milaboratories/pl-model-middle-layer 1.10.0 → 1.10.2
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/block_state.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import type { AuthorMarker, BlockOutputsBase, BlockState, NavigationState } from '@milaboratories/pl-model-common';
|
|
1
|
+
import type { AuthorMarker, BlockOutputsBase, BlockState, NavigationState, StringifiedJson } from '@milaboratories/pl-model-common';
|
|
2
|
+
import type { StorageDebugView } from '@platforma-sdk/model';
|
|
2
3
|
import type { Optional } from 'utility-types';
|
|
3
4
|
export type BlockStateInternal<Args = unknown, Outputs extends BlockOutputsBase = BlockOutputsBase, UiState = unknown, Href extends `/${string}` = `/${string}`> = Optional<Readonly<BlockState<Args, Outputs, UiState, Href>>, 'outputs'>;
|
|
4
5
|
export type BlockStateInternalV3<Outputs extends BlockOutputsBase = BlockOutputsBase, Href extends `/${string}` = `/${string}`> = {
|
|
5
6
|
/** Raw block storage - UI derives data using sdk/model */
|
|
6
7
|
readonly blockStorage: unknown;
|
|
8
|
+
/** Storage debug view (JSON string) for block debug panel. */
|
|
9
|
+
readonly storageDebugView?: StringifiedJson<StorageDebugView>;
|
|
7
10
|
/** Outputs rendered with block config */
|
|
8
11
|
outputs?: Outputs;
|
|
9
12
|
/** Current navigation state */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_state.d.ts","sourceRoot":"","sources":["../src/block_state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"block_state.d.ts","sourceRoot":"","sources":["../src/block_state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACpI,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,MAAM,MAAM,kBAAkB,CAC5B,IAAI,GAAG,OAAO,EACd,OAAO,SAAS,gBAAgB,GAAG,gBAAgB,EACnD,OAAO,GAAG,OAAO,EACjB,IAAI,SAAS,IAAI,MAAM,EAAE,GAAG,IAAI,MAAM,EAAE,IACtC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AAG5E,MAAM,MAAM,oBAAoB,CAC9B,OAAO,SAAS,gBAAgB,GAAG,gBAAgB,EACnD,IAAI,SAAS,IAAI,MAAM,EAAE,GAAG,IAAI,MAAM,EAAE,IACtC;IACF,0DAA0D;IAC1D,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAE/B,8DAA8D;IAC9D,QAAQ,CAAC,gBAAgB,CAAC,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;IAE9D,yCAAyC;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,+BAA+B;IAC/B,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAEhD,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAC;CAC3C,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ProjectMeta } from './project';
|
|
2
2
|
import type { BlockPackSpec } from './block_registry/block_pack_spec';
|
|
3
|
-
import type { BlockCodeFeatureFlags, BlockRenderingMode, BlockSection, NavigationState, AuthorMarker } from '@milaboratories/pl-model-common';
|
|
3
|
+
import type { BlockCodeFeatureFlags, BlockRenderingMode, BlockSection, NavigationState, AuthorMarker, StringifiedJson } from '@milaboratories/pl-model-common';
|
|
4
|
+
import type { StorageDebugView } from '@platforma-sdk/model';
|
|
4
5
|
import type { UpdateSuggestions } from './update_info';
|
|
5
6
|
import type { BlockSettings } from './block_settings';
|
|
6
7
|
/** Generalized block status, to be used in block item "styling". */
|
|
@@ -139,10 +140,10 @@ export type BlockStateOverview = {
|
|
|
139
140
|
/** Current navigation state of the block */
|
|
140
141
|
navigationState: NavigationState;
|
|
141
142
|
/**
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* Undefined when block-pack
|
|
143
|
+
* Storage debug view as JSON string (e.g., '{"dataVersion": 1}').
|
|
144
|
+
* Used by developer tools to display block state info.
|
|
145
|
+
* Undefined when block-pack is not yet materialized or for non-V2 blocks.
|
|
145
146
|
*/
|
|
146
|
-
|
|
147
|
+
storageDebugView: StringifiedJson<StorageDebugView> | undefined;
|
|
147
148
|
};
|
|
148
149
|
//# sourceMappingURL=project_overview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project_overview.d.ts","sourceRoot":"","sources":["../src/project_overview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"project_overview.d.ts","sourceRoot":"","sources":["../src/project_overview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAC/J,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC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;OAGG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IAEpB;;;OAGG;IACH,WAAW,EAAE,MAAM,EAAE,CAAC;IAEtB;;;OAGG;IACH,QAAQ,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IAErC;;;OAGG;IACH,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;IAEjC;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAE/B;;;OAGG;IACH,YAAY,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAEhD;;;;;OAKG;IACH,yBAAyB,EAAE,OAAO,GAAG,SAAS,CAAC;IAE/C,mEAAmE;IACnE,gBAAgB,EAAE,aAAa,GAAG,SAAS,CAAC;IAE5C;;;OAGG;IACH,gBAAgB,EAAE,aAAa,GAAG,SAAS,CAAC;IAE5C,6BAA6B;IAC7B,QAAQ,EAAE,aAAa,CAAC;IAExB,8BAA8B;IAC9B,iBAAiB,EAAE,iBAAiB,CAAC;IAErC,4CAA4C;IAC5C,eAAe,EAAE,eAAe,CAAC;IAEjC;;;;OAIG;IACH,gBAAgB,EAAE,eAAe,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAAC;CACjE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-model-middle-layer",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.2",
|
|
4
4
|
"description": "Common model between middle layer and non-block UI code",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -20,16 +20,17 @@
|
|
|
20
20
|
"remeda": "^2.28.0",
|
|
21
21
|
"zod": "~3.23.8",
|
|
22
22
|
"utility-types": "^3.11.0",
|
|
23
|
-
"@
|
|
23
|
+
"@platforma-sdk/model": "1.53.0",
|
|
24
|
+
"@milaboratories/pl-model-common": "1.24.1"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
27
|
"eslint": "^9.25.1",
|
|
27
28
|
"typescript": "~5.6.3",
|
|
28
29
|
"@types/node": "~24.5.2",
|
|
29
|
-
"@milaboratories/build-configs": "1.
|
|
30
|
-
"@
|
|
30
|
+
"@milaboratories/build-configs": "1.4.0",
|
|
31
|
+
"@milaboratories/ts-builder": "1.2.4",
|
|
31
32
|
"@milaboratories/ts-configs": "1.2.0",
|
|
32
|
-
"@
|
|
33
|
+
"@platforma-sdk/eslint-config": "1.2.0"
|
|
33
34
|
},
|
|
34
35
|
"scripts": {
|
|
35
36
|
"type-check": "ts-builder types --target node",
|
package/src/block_state.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { AuthorMarker, BlockOutputsBase, BlockState, NavigationState } from '@milaboratories/pl-model-common';
|
|
1
|
+
import type { AuthorMarker, BlockOutputsBase, BlockState, NavigationState, StringifiedJson } from '@milaboratories/pl-model-common';
|
|
2
|
+
import type { StorageDebugView } from '@platforma-sdk/model';
|
|
2
3
|
import type { Optional } from 'utility-types';
|
|
3
4
|
|
|
4
5
|
// @deprecated TODO v3: keep this name, or rename to BlockStateInternalLegacy?
|
|
@@ -17,6 +18,9 @@ export type BlockStateInternalV3<
|
|
|
17
18
|
/** Raw block storage - UI derives data using sdk/model */
|
|
18
19
|
readonly blockStorage: unknown;
|
|
19
20
|
|
|
21
|
+
/** Storage debug view (JSON string) for block debug panel. */
|
|
22
|
+
readonly storageDebugView?: StringifiedJson<StorageDebugView>;
|
|
23
|
+
|
|
20
24
|
/** Outputs rendered with block config */
|
|
21
25
|
outputs?: Outputs;
|
|
22
26
|
|
package/src/project_overview.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ProjectMeta } from './project';
|
|
2
2
|
import type { BlockPackSpec } from './block_registry/block_pack_spec';
|
|
3
|
-
import type { BlockCodeFeatureFlags, BlockRenderingMode, BlockSection, NavigationState, AuthorMarker } from '@milaboratories/pl-model-common';
|
|
3
|
+
import type { BlockCodeFeatureFlags, BlockRenderingMode, BlockSection, NavigationState, AuthorMarker, StringifiedJson } from '@milaboratories/pl-model-common';
|
|
4
|
+
import type { StorageDebugView } from '@platforma-sdk/model';
|
|
4
5
|
import type { UpdateSuggestions } from './update_info';
|
|
5
6
|
import type { BlockSettings } from './block_settings';
|
|
6
7
|
|
|
@@ -172,9 +173,9 @@ export type BlockStateOverview = {
|
|
|
172
173
|
navigationState: NavigationState;
|
|
173
174
|
|
|
174
175
|
/**
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
* Undefined when block-pack
|
|
176
|
+
* Storage debug view as JSON string (e.g., '{"dataVersion": 1}').
|
|
177
|
+
* Used by developer tools to display block state info.
|
|
178
|
+
* Undefined when block-pack is not yet materialized or for non-V2 blocks.
|
|
178
179
|
*/
|
|
179
|
-
|
|
180
|
+
storageDebugView: StringifiedJson<StorageDebugView> | undefined;
|
|
180
181
|
};
|