@milaboratories/pl-model-middle-layer 1.31.0 → 1.32.1

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.
Files changed (73) hide show
  1. package/dist/block_meta/block_components.d.ts +8 -10
  2. package/dist/block_meta/block_components.d.ts.map +1 -1
  3. package/dist/block_meta/block_description.cjs +5 -1
  4. package/dist/block_meta/block_description.cjs.map +1 -1
  5. package/dist/block_meta/block_description.d.ts +91 -82
  6. package/dist/block_meta/block_description.d.ts.map +1 -1
  7. package/dist/block_meta/block_description.js +5 -2
  8. package/dist/block_meta/block_description.js.map +1 -1
  9. package/dist/block_meta/block_id.d.ts +10 -12
  10. package/dist/block_meta/block_id.d.ts.map +1 -1
  11. package/dist/block_meta/block_manifest.d.ts +25 -15
  12. package/dist/block_meta/block_manifest.d.ts.map +1 -1
  13. package/dist/block_meta/block_meta.d.ts +10 -12
  14. package/dist/block_meta/block_meta.d.ts.map +1 -1
  15. package/dist/block_meta/common.d.ts +2 -3
  16. package/dist/block_meta/common.d.ts.map +1 -1
  17. package/dist/block_meta/content_conversion.d.ts +2 -4
  18. package/dist/block_meta/content_conversion.d.ts.map +1 -1
  19. package/dist/block_meta/content_types.d.ts +29 -28
  20. package/dist/block_meta/content_types.d.ts.map +1 -1
  21. package/dist/block_meta/index.cjs +1 -0
  22. package/dist/block_meta/index.d.ts +2 -2
  23. package/dist/block_meta/index.js +2 -2
  24. package/dist/block_meta/semver.d.ts +1 -3
  25. package/dist/block_meta/semver.d.ts.map +1 -1
  26. package/dist/block_registry/block_pack_spec.d.ts +16 -18
  27. package/dist/block_registry/block_pack_spec.d.ts.map +1 -1
  28. package/dist/block_registry/overview.d.ts +137 -139
  29. package/dist/block_registry/overview.d.ts.map +1 -1
  30. package/dist/block_registry/registry_spec.d.ts +16 -18
  31. package/dist/block_registry/registry_spec.d.ts.map +1 -1
  32. package/dist/block_settings.d.ts +5 -5
  33. package/dist/block_settings.d.ts.map +1 -1
  34. package/dist/block_state.d.ts +9 -7
  35. package/dist/block_state.d.ts.map +1 -1
  36. package/dist/index.cjs +1 -0
  37. package/dist/index.d.ts +5 -2
  38. package/dist/index.js +2 -2
  39. package/dist/json.d.ts +5 -7
  40. package/dist/json.d.ts.map +1 -1
  41. package/dist/pframe/internal_api/api_factory.d.ts +10 -12
  42. package/dist/pframe/internal_api/api_factory.d.ts.map +1 -1
  43. package/dist/pframe/internal_api/api_read.d.ts +2 -4
  44. package/dist/pframe/internal_api/api_read.d.ts.map +1 -1
  45. package/dist/pframe/internal_api/common.d.ts +6 -8
  46. package/dist/pframe/internal_api/common.d.ts.map +1 -1
  47. package/dist/pframe/internal_api/create_table.d.ts +9 -11
  48. package/dist/pframe/internal_api/create_table.d.ts.map +1 -1
  49. package/dist/pframe/internal_api/delete_column.d.ts +2 -4
  50. package/dist/pframe/internal_api/delete_column.d.ts.map +1 -1
  51. package/dist/pframe/internal_api/discover_columns.d.ts +11 -12
  52. package/dist/pframe/internal_api/discover_columns.d.ts.map +1 -1
  53. package/dist/pframe/internal_api/find_columns.d.ts +5 -7
  54. package/dist/pframe/internal_api/find_columns.d.ts.map +1 -1
  55. package/dist/pframe/internal_api/http_helpers.d.ts +87 -53
  56. package/dist/pframe/internal_api/http_helpers.d.ts.map +1 -1
  57. package/dist/pframe/internal_api/index.d.ts +0 -2
  58. package/dist/pframe/internal_api/pframe.d.ts +8 -7
  59. package/dist/pframe/internal_api/pframe.d.ts.map +1 -1
  60. package/dist/pframe/internal_api/table.d.ts +1 -3
  61. package/dist/pframe/internal_api/table.d.ts.map +1 -1
  62. package/dist/project.d.ts +1 -2
  63. package/dist/project.d.ts.map +1 -1
  64. package/dist/project_list.d.ts +1 -3
  65. package/dist/project_list.d.ts.map +1 -1
  66. package/dist/project_overview.d.ts +25 -15
  67. package/dist/project_overview.d.ts.map +1 -1
  68. package/dist/storage_debug_view.d.ts +1 -2
  69. package/dist/storage_debug_view.d.ts.map +1 -1
  70. package/dist/update_info.d.ts +3 -3
  71. package/dist/update_info.d.ts.map +1 -1
  72. package/package.json +6 -6
  73. package/src/block_meta/block_description.ts +11 -1
@@ -4,14 +4,16 @@ import { ProjectMeta } from "./project.js";
4
4
  import { BlockPackSpec } from "./block_registry/block_pack_spec.js";
5
5
  import { UpdateSuggestions } from "./update_info.js";
6
6
  import { AuthorMarker, BlockCodeFeatureFlags, BlockRenderingMode, BlockSection, NavigationState, StringifiedJson } from "@milaboratories/pl-model-common";
7
-
8
7
  //#region src/project_overview.d.ts
9
8
  /** Generalized block status, to be used in block item "styling". */
10
- type BlockCalculationStatus = "NotCalculated" | "Running" | "Done" | "Limbo";
9
+ export type BlockCalculationStatus = "NotCalculated" | "Running" | "Done" | "Limbo";
11
10
  /** Overview of the whole project state, required to render a left panel. */
12
- type ProjectOverview = {
13
- /** Metadata, like project label associated with the project */meta: ProjectMeta; /** Creation timestamp. */
14
- created: Date; /** Last modification timestamp. */
11
+ export type ProjectOverview = {
12
+ /** Metadata, like project label associated with the project */
13
+ meta: ProjectMeta;
14
+ /** Creation timestamp. */
15
+ created: Date;
16
+ /** Last modification timestamp. */
15
17
  lastModified: Date;
16
18
  /**
17
19
  * Marker of the party last doing modification of the project structure
@@ -20,12 +22,15 @@ type ProjectOverview = {
20
22
  * - block renaming
21
23
  * - block-pack update
22
24
  */
23
- authorMarker?: AuthorMarker; /** Overview information for each block */
25
+ authorMarker?: AuthorMarker;
26
+ /** Overview information for each block */
24
27
  blocks: BlockStateOverview[];
25
28
  };
26
29
  /** Overview of the block state, required for visualization in the left panel */
27
- type BlockStateOverview = {
28
- /** Project resource id (one of the goals it to be used for debugging purposes) */projectResourceId: string; /** Block id */
30
+ export type BlockStateOverview = {
31
+ /** Project resource id (one of the goals it to be used for debugging purposes) */
32
+ projectResourceId: string;
33
+ /** Block id */
29
34
  id: string;
30
35
  /**
31
36
  * Blocks label visible to the user.
@@ -48,7 +53,8 @@ type BlockStateOverview = {
48
53
  * Tags for search functionality.
49
54
  * Undefined when block-pack for this block is not yet materialized.
50
55
  */
51
- tags: string[] | undefined; /** Block rendering mode */
56
+ tags: string[] | undefined;
57
+ /** Block rendering mode */
52
58
  renderingMode: BlockRenderingMode;
53
59
  /**
54
60
  * True if block have missing references, e.g. referenced block was deleted
@@ -76,7 +82,8 @@ type BlockStateOverview = {
76
82
  * If exports context have errors, this field will contain the error message
77
83
  * extracted from the exports context resource.
78
84
  */
79
- exportsError?: string; /** Generalized block calculation status */
85
+ exportsError?: string;
86
+ /** Generalized block calculation status */
80
87
  calculationStatus: BlockCalculationStatus;
81
88
  /**
82
89
  * All upstream blocks of this block. In other words all dependencies of this
@@ -119,15 +126,19 @@ type BlockStateOverview = {
119
126
  * This block should not be openable; the only available action for it is deletion.
120
127
  * Undefined when block-pack for this block is not yet materialized.
121
128
  */
122
- isIncompatibleWithRuntime: boolean | undefined; /** Information on where the block pack for this block came from */
129
+ isIncompatibleWithRuntime: boolean | undefined;
130
+ /** Information on where the block pack for this block came from */
123
131
  currentBlockPack: BlockPackSpec | undefined;
124
132
  /**
125
133
  * If block pack update is available this field will contain latest specs to
126
134
  * perform the update
127
135
  */
128
- updatedBlockPack: BlockPackSpec | undefined; /** Current block settings */
129
- settings: BlockSettings; /** Detailed update options */
130
- updateSuggestions: UpdateSuggestions; /** Current navigation state of the block */
136
+ updatedBlockPack: BlockPackSpec | undefined;
137
+ /** Current block settings */
138
+ settings: BlockSettings;
139
+ /** Detailed update options */
140
+ updateSuggestions: UpdateSuggestions;
141
+ /** Current navigation state of the block */
131
142
  navigationState: NavigationState;
132
143
  /**
133
144
  * Storage debug view as JSON string (e.g., '{"dataVersion": "v1"}').
@@ -137,5 +148,4 @@ type BlockStateOverview = {
137
148
  storageDebugView: StringifiedJson<StorageDebugView> | undefined;
138
149
  };
139
150
  //#endregion
140
- export { BlockCalculationStatus, BlockStateOverview, ProjectOverview };
141
151
  //# sourceMappingURL=project_overview.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"project_overview.d.ts","names":[],"sources":["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;;;;;EAMA;;EAGA,mBAAmB;;;;;EAMnB;;;;;EAMA;;;;;EAMA,UAAU;;;;;EAMV;;;;;EAMA;;;;;EAMA;;;;;EAMA,cAAc;;;;;;;EAQd;;EAGA,kBAAkB;;;;;EAMlB,kBAAkB;;EAGlB,UAAU;;EAGV,mBAAmB;;EAGnB,iBAAiB;;;;;;EAOjB,kBAAkB,gBAAgB"}
@@ -1,11 +1,10 @@
1
1
  //#region src/storage_debug_view.d.ts
2
2
  /** Debug representation of block storage state. */
3
- interface StorageDebugView {
3
+ export interface StorageDebugView {
4
4
  /** Current data version key */
5
5
  dataVersion: string;
6
6
  /** Raw data payload stored in BlockStorage */
7
7
  data: unknown;
8
8
  }
9
9
  //#endregion
10
- export { StorageDebugView };
11
10
  //# sourceMappingURL=storage_debug_view.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"storage_debug_view.d.ts","names":[],"sources":["../src/storage_debug_view.ts"],"mappings":";;UACiB,gBAAA;EAAgB;EAE/B,WAAA;EAAA;EAEA,IAAI;AAAA"}
1
+ {"version":3,"file":"storage_debug_view.d.ts","names":[],"sources":["../src/storage_debug_view.ts"],"mappings":";;iBACiB;;EAEf;;EAEA"}
@@ -1,12 +1,12 @@
1
1
  import { BlockPackSpec } from "./block_registry/block_pack_spec.js";
2
+ import "./block_registry/index.js";
2
3
  //#region src/update_info.d.ts
3
4
  /** Communicates possible block update option */
4
- type UpdateSuggestion<V = BlockPackSpec> = {
5
+ export type UpdateSuggestion<V = BlockPackSpec> = {
5
6
  type: "major" | "minor" | "patch";
6
7
  update: V;
7
8
  };
8
9
  /** Communicates possible block update options */
9
- type UpdateSuggestions<V = BlockPackSpec> = UpdateSuggestion<V>[];
10
+ export type UpdateSuggestions<V = BlockPackSpec> = UpdateSuggestion<V>[];
10
11
  //#endregion
11
- export { UpdateSuggestion, UpdateSuggestions };
12
12
  //# sourceMappingURL=update_info.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"update_info.d.ts","names":[],"sources":["../src/update_info.ts"],"mappings":";;;KAGY,gBAAA,KAAqB,aAAA;EAC/B,IAAA;EACA,MAAA,EAAQ,CAAC;AAAA;;KAIC,iBAAA,KAAsB,aAAA,IAAiB,gBAAA,CAAiB,CAAA"}
1
+ {"version":3,"file":"update_info.d.ts","names":[],"sources":["../src/update_info.ts"],"mappings":";;;;YAGY,iBAAiB,IAAI;EAC/B;EACA,QAAQ;;;YAIE,kBAAkB,IAAI,iBAAiB,iBAAiB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/pl-model-middle-layer",
3
- "version": "1.31.0",
3
+ "version": "1.32.1",
4
4
  "description": "Common model between middle layer and non-block UI code",
5
5
  "files": [
6
6
  "./dist/**/*",
@@ -20,15 +20,15 @@
20
20
  "es-toolkit": "^1.39.10",
21
21
  "utility-types": "^3.11.0",
22
22
  "zod": "~3.25.76",
23
- "@milaboratories/pl-model-common": "1.47.3",
24
- "@milaboratories/helpers": "1.14.5"
23
+ "@milaboratories/helpers": "1.14.5",
24
+ "@milaboratories/pl-model-common": "1.49.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "~24.5.2",
28
- "typescript": "~5.9.3",
29
- "@milaboratories/ts-builder": "1.6.2",
28
+ "typescript": "7.0.2",
29
+ "@milaboratories/ts-builder": "1.7.2",
30
30
  "@milaboratories/ts-configs": "1.4.0",
31
- "@milaboratories/build-configs": "2.0.0"
31
+ "@milaboratories/build-configs": "2.0.1"
32
32
  },
33
33
  "scripts": {
34
34
  "build": "ts-builder build --target node",
@@ -4,7 +4,10 @@ import { BlockComponentsDescriptionRaw } from "./block_components";
4
4
  import { BlockPackMetaDescriptionRaw } from "./block_meta";
5
5
  import { BlockPackId } from "./block_id";
6
6
  import { toMerged } from "es-toolkit";
7
- import type { BlockCodeKnownFeatureFlags } from "@milaboratories/pl-model-common";
7
+ import type {
8
+ BlockCodeKnownFeatureFlags,
9
+ BlockKindReference,
10
+ } from "@milaboratories/pl-model-common";
8
11
 
9
12
  /**
10
13
  * Block-pack description: a `BlockPackId`, the typed `components` and `meta`
@@ -17,6 +20,9 @@ export type BlockPackDescription<Components, Meta> = {
17
20
  components: Components;
18
21
  meta: Meta;
19
22
  featureFlags?: BlockCodeKnownFeatureFlags;
23
+ /** Reference to the block kind this pack implements, in `{name}@{version}`
24
+ * form. Lifted from the model's container-level `kind` by build_dist. */
25
+ kind?: BlockKindReference;
20
26
  };
21
27
 
22
28
  /**
@@ -33,6 +39,9 @@ export const FeatureFlags = z
33
39
  .record(z.string(), z.union([z.boolean(), z.number()]))
34
40
  .transform((flags) => flags as BlockCodeKnownFeatureFlags);
35
41
 
42
+ /** Block-kind reference schema — a plain `{name}@{version}` string at rest. */
43
+ export const BlockKindRef = z.string().transform((s) => s as BlockKindReference);
44
+
36
45
  export function CreateBlockPackDescriptionSchema<
37
46
  Components extends ZodTypeAny,
38
47
  Meta extends ZodTypeAny,
@@ -43,6 +52,7 @@ export function CreateBlockPackDescriptionSchema<
43
52
  components,
44
53
  meta,
45
54
  featureFlags: FeatureFlags.optional(),
55
+ kind: BlockKindRef.optional(),
46
56
  })
47
57
  .passthrough();
48
58
  }