@milaboratories/pl-model-common 1.25.2 → 1.25.3

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,6 +1,6 @@
1
1
 
2
2
  //#region src/flags/block_flags.ts
3
- const AllSupportsFeatureFlags = ["supportsLazyState"];
3
+ const AllSupportsFeatureFlags = ["supportsLazyState", "supportsPframeQueryRanking"];
4
4
  const AllRequiresFeatureFlags = [
5
5
  "requiresUIAPIVersion",
6
6
  "requiresCreatePTable",
@@ -1 +1 @@
1
- {"version":3,"file":"block_flags.cjs","names":[],"sources":["../../src/flags/block_flags.ts"],"sourcesContent":["import type { ArrayTypeUnion, Assert, Is, IsSubtypeOf } from \"./type_utils\";\n\n/**\n * Block-specific feature flags. Define flags that are interpreted by the desktop app to select\n * appropriate API to expose into Model and UI runtimes.\n *\n * Flags are split into two categories:\n * - supports... - those flags tells the desktop app that the block supports certain APIs, but can without them as well\n * - requires... - those flags tells the desktop app that the block requires certain APIs, and if desktop app doesn't support it, it can't be used in the block\n */\nexport type BlockCodeFeatureFlags = Record<`supports${string}`, boolean | number | undefined> &\n Record<`requires${string}`, boolean | number | undefined>;\n\n/**\n * Known block flags. Flags are set during model compilation, see `BlockModel.create` for more details and for initial values.\n */\nexport type BlockCodeKnownFeatureFlags = {\n readonly supportsLazyState?: boolean;\n readonly requiresModelAPIVersion?: number;\n readonly requiresUIAPIVersion?: number;\n readonly requiresCreatePTable?: number;\n};\n\nexport const AllSupportsFeatureFlags = [\"supportsLazyState\"] as const;\n\nexport const AllRequiresFeatureFlags = [\n \"requiresUIAPIVersion\",\n \"requiresCreatePTable\",\n \"requiresModelAPIVersion\",\n] as const;\n\n//\n// Assertions\n//\n\n// This assertion ensures that BlockConfigV3KnownFeatureFlags is a subtype of BlockConfigV3FeatureFlags.\n// It will produce a compile-time error if there's a mismatch.\ntype _KnownFlagsAreValidFlags = Assert<\n IsSubtypeOf<BlockCodeKnownFeatureFlags, BlockCodeFeatureFlags>\n>;\n\n// This check ensures that all keys in BlockConfigV3FeatureFlags are covered in the arrays above.\n// It will produce a compile-time error if there's a mismatch.\ntype _AllFlagsAreCovered = Assert<\n Is<\n keyof BlockCodeKnownFeatureFlags,\n ArrayTypeUnion<typeof AllRequiresFeatureFlags, typeof AllSupportsFeatureFlags>\n >\n>;\n"],"mappings":";;AAuBA,MAAa,0BAA0B,CAAC,oBAAoB;AAE5D,MAAa,0BAA0B;CACrC;CACA;CACA;CACD"}
1
+ {"version":3,"file":"block_flags.cjs","names":[],"sources":["../../src/flags/block_flags.ts"],"sourcesContent":["import type { ArrayTypeUnion, Assert, Is, IsSubtypeOf } from \"./type_utils\";\n\n/**\n * Block-specific feature flags. Define flags that are interpreted by the desktop app to select\n * appropriate API to expose into Model and UI runtimes.\n *\n * Flags are split into two categories:\n * - supports... - those flags tells the desktop app that the block supports certain APIs, but can without them as well\n * - requires... - those flags tells the desktop app that the block requires certain APIs, and if desktop app doesn't support it, it can't be used in the block\n */\nexport type BlockCodeFeatureFlags = Record<`supports${string}`, boolean | number | undefined> &\n Record<`requires${string}`, boolean | number | undefined>;\n\n/**\n * Known block flags. Flags are set during model compilation, see `BlockModel.create` for more details and for initial values.\n */\nexport type BlockCodeKnownFeatureFlags = {\n readonly supportsLazyState?: boolean;\n readonly supportsPframeQueryRanking?: boolean;\n readonly requiresModelAPIVersion?: number;\n readonly requiresUIAPIVersion?: number;\n readonly requiresCreatePTable?: number;\n};\n\nexport const AllSupportsFeatureFlags = [\"supportsLazyState\", \"supportsPframeQueryRanking\"] as const;\n\nexport const AllRequiresFeatureFlags = [\n \"requiresUIAPIVersion\",\n \"requiresCreatePTable\",\n \"requiresModelAPIVersion\",\n] as const;\n\n//\n// Assertions\n//\n\n// This assertion ensures that BlockConfigV3KnownFeatureFlags is a subtype of BlockConfigV3FeatureFlags.\n// It will produce a compile-time error if there's a mismatch.\ntype _KnownFlagsAreValidFlags = Assert<\n IsSubtypeOf<BlockCodeKnownFeatureFlags, BlockCodeFeatureFlags>\n>;\n\n// This check ensures that all keys in BlockConfigV3FeatureFlags are covered in the arrays above.\n// It will produce a compile-time error if there's a mismatch.\ntype _AllFlagsAreCovered = Assert<\n Is<\n keyof BlockCodeKnownFeatureFlags,\n ArrayTypeUnion<typeof AllRequiresFeatureFlags, typeof AllSupportsFeatureFlags>\n >\n>;\n"],"mappings":";;AAwBA,MAAa,0BAA0B,CAAC,qBAAqB,6BAA6B;AAE1F,MAAa,0BAA0B;CACrC;CACA;CACA;CACD"}
@@ -13,11 +13,12 @@ type BlockCodeFeatureFlags = Record<`supports${string}`, boolean | number | unde
13
13
  */
14
14
  type BlockCodeKnownFeatureFlags = {
15
15
  readonly supportsLazyState?: boolean;
16
+ readonly supportsPframeQueryRanking?: boolean;
16
17
  readonly requiresModelAPIVersion?: number;
17
18
  readonly requiresUIAPIVersion?: number;
18
19
  readonly requiresCreatePTable?: number;
19
20
  };
20
- declare const AllSupportsFeatureFlags: readonly ["supportsLazyState"];
21
+ declare const AllSupportsFeatureFlags: readonly ["supportsLazyState", "supportsPframeQueryRanking"];
21
22
  declare const AllRequiresFeatureFlags: readonly ["requiresUIAPIVersion", "requiresCreatePTable", "requiresModelAPIVersion"];
22
23
  //#endregion
23
24
  export { AllRequiresFeatureFlags, AllSupportsFeatureFlags, BlockCodeFeatureFlags, BlockCodeKnownFeatureFlags };
@@ -1,5 +1,5 @@
1
1
  //#region src/flags/block_flags.ts
2
- const AllSupportsFeatureFlags = ["supportsLazyState"];
2
+ const AllSupportsFeatureFlags = ["supportsLazyState", "supportsPframeQueryRanking"];
3
3
  const AllRequiresFeatureFlags = [
4
4
  "requiresUIAPIVersion",
5
5
  "requiresCreatePTable",
@@ -1 +1 @@
1
- {"version":3,"file":"block_flags.js","names":[],"sources":["../../src/flags/block_flags.ts"],"sourcesContent":["import type { ArrayTypeUnion, Assert, Is, IsSubtypeOf } from \"./type_utils\";\n\n/**\n * Block-specific feature flags. Define flags that are interpreted by the desktop app to select\n * appropriate API to expose into Model and UI runtimes.\n *\n * Flags are split into two categories:\n * - supports... - those flags tells the desktop app that the block supports certain APIs, but can without them as well\n * - requires... - those flags tells the desktop app that the block requires certain APIs, and if desktop app doesn't support it, it can't be used in the block\n */\nexport type BlockCodeFeatureFlags = Record<`supports${string}`, boolean | number | undefined> &\n Record<`requires${string}`, boolean | number | undefined>;\n\n/**\n * Known block flags. Flags are set during model compilation, see `BlockModel.create` for more details and for initial values.\n */\nexport type BlockCodeKnownFeatureFlags = {\n readonly supportsLazyState?: boolean;\n readonly requiresModelAPIVersion?: number;\n readonly requiresUIAPIVersion?: number;\n readonly requiresCreatePTable?: number;\n};\n\nexport const AllSupportsFeatureFlags = [\"supportsLazyState\"] as const;\n\nexport const AllRequiresFeatureFlags = [\n \"requiresUIAPIVersion\",\n \"requiresCreatePTable\",\n \"requiresModelAPIVersion\",\n] as const;\n\n//\n// Assertions\n//\n\n// This assertion ensures that BlockConfigV3KnownFeatureFlags is a subtype of BlockConfigV3FeatureFlags.\n// It will produce a compile-time error if there's a mismatch.\ntype _KnownFlagsAreValidFlags = Assert<\n IsSubtypeOf<BlockCodeKnownFeatureFlags, BlockCodeFeatureFlags>\n>;\n\n// This check ensures that all keys in BlockConfigV3FeatureFlags are covered in the arrays above.\n// It will produce a compile-time error if there's a mismatch.\ntype _AllFlagsAreCovered = Assert<\n Is<\n keyof BlockCodeKnownFeatureFlags,\n ArrayTypeUnion<typeof AllRequiresFeatureFlags, typeof AllSupportsFeatureFlags>\n >\n>;\n"],"mappings":";AAuBA,MAAa,0BAA0B,CAAC,oBAAoB;AAE5D,MAAa,0BAA0B;CACrC;CACA;CACA;CACD"}
1
+ {"version":3,"file":"block_flags.js","names":[],"sources":["../../src/flags/block_flags.ts"],"sourcesContent":["import type { ArrayTypeUnion, Assert, Is, IsSubtypeOf } from \"./type_utils\";\n\n/**\n * Block-specific feature flags. Define flags that are interpreted by the desktop app to select\n * appropriate API to expose into Model and UI runtimes.\n *\n * Flags are split into two categories:\n * - supports... - those flags tells the desktop app that the block supports certain APIs, but can without them as well\n * - requires... - those flags tells the desktop app that the block requires certain APIs, and if desktop app doesn't support it, it can't be used in the block\n */\nexport type BlockCodeFeatureFlags = Record<`supports${string}`, boolean | number | undefined> &\n Record<`requires${string}`, boolean | number | undefined>;\n\n/**\n * Known block flags. Flags are set during model compilation, see `BlockModel.create` for more details and for initial values.\n */\nexport type BlockCodeKnownFeatureFlags = {\n readonly supportsLazyState?: boolean;\n readonly supportsPframeQueryRanking?: boolean;\n readonly requiresModelAPIVersion?: number;\n readonly requiresUIAPIVersion?: number;\n readonly requiresCreatePTable?: number;\n};\n\nexport const AllSupportsFeatureFlags = [\"supportsLazyState\", \"supportsPframeQueryRanking\"] as const;\n\nexport const AllRequiresFeatureFlags = [\n \"requiresUIAPIVersion\",\n \"requiresCreatePTable\",\n \"requiresModelAPIVersion\",\n] as const;\n\n//\n// Assertions\n//\n\n// This assertion ensures that BlockConfigV3KnownFeatureFlags is a subtype of BlockConfigV3FeatureFlags.\n// It will produce a compile-time error if there's a mismatch.\ntype _KnownFlagsAreValidFlags = Assert<\n IsSubtypeOf<BlockCodeKnownFeatureFlags, BlockCodeFeatureFlags>\n>;\n\n// This check ensures that all keys in BlockConfigV3FeatureFlags are covered in the arrays above.\n// It will produce a compile-time error if there's a mismatch.\ntype _AllFlagsAreCovered = Assert<\n Is<\n keyof BlockCodeKnownFeatureFlags,\n ArrayTypeUnion<typeof AllRequiresFeatureFlags, typeof AllSupportsFeatureFlags>\n >\n>;\n"],"mappings":";AAwBA,MAAa,0BAA0B,CAAC,qBAAqB,6BAA6B;AAE1F,MAAa,0BAA0B;CACrC;CACA;CACA;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/pl-model-common",
3
- "version": "1.25.2",
3
+ "version": "1.25.3",
4
4
  "description": "Platforma SDK Model",
5
5
  "files": [
6
6
  "./dist/**/*",
@@ -25,8 +25,8 @@
25
25
  "@vitest/coverage-istanbul": "^4.0.18",
26
26
  "typescript": "~5.9.3",
27
27
  "vitest": "^4.0.18",
28
- "@milaboratories/build-configs": "1.5.1",
29
- "@milaboratories/ts-builder": "1.2.13",
28
+ "@milaboratories/build-configs": "1.5.2",
29
+ "@milaboratories/ts-builder": "1.3.0",
30
30
  "@milaboratories/ts-configs": "1.2.2"
31
31
  },
32
32
  "scripts": {
@@ -16,12 +16,13 @@ export type BlockCodeFeatureFlags = Record<`supports${string}`, boolean | number
16
16
  */
17
17
  export type BlockCodeKnownFeatureFlags = {
18
18
  readonly supportsLazyState?: boolean;
19
+ readonly supportsPframeQueryRanking?: boolean;
19
20
  readonly requiresModelAPIVersion?: number;
20
21
  readonly requiresUIAPIVersion?: number;
21
22
  readonly requiresCreatePTable?: number;
22
23
  };
23
24
 
24
- export const AllSupportsFeatureFlags = ["supportsLazyState"] as const;
25
+ export const AllSupportsFeatureFlags = ["supportsLazyState", "supportsPframeQueryRanking"] as const;
25
26
 
26
27
  export const AllRequiresFeatureFlags = [
27
28
  "requiresUIAPIVersion",