@milaboratories/pl-model-middle-layer 1.12.7 → 1.12.9

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 (145) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +43 -0
  2. package/dist/_virtual/_rolldown/runtime.js +18 -0
  3. package/dist/author_marker.d.ts +2 -5
  4. package/dist/block_meta/block_components.cjs +21 -29
  5. package/dist/block_meta/block_components.cjs.map +1 -1
  6. package/dist/block_meta/block_components.d.ts +537 -533
  7. package/dist/block_meta/block_components.js +20 -27
  8. package/dist/block_meta/block_components.js.map +1 -1
  9. package/dist/block_meta/block_description.cjs +22 -25
  10. package/dist/block_meta/block_description.cjs.map +1 -1
  11. package/dist/block_meta/block_description.d.ts +1815 -1812
  12. package/dist/block_meta/block_description.js +20 -22
  13. package/dist/block_meta/block_description.js.map +1 -1
  14. package/dist/block_meta/block_id.cjs +21 -28
  15. package/dist/block_meta/block_id.cjs.map +1 -1
  16. package/dist/block_meta/block_id.d.ts +30 -26
  17. package/dist/block_meta/block_id.js +20 -26
  18. package/dist/block_meta/block_id.js.map +1 -1
  19. package/dist/block_meta/block_manifest.cjs +24 -29
  20. package/dist/block_meta/block_manifest.cjs.map +1 -1
  21. package/dist/block_meta/block_manifest.d.ts +4778 -4773
  22. package/dist/block_meta/block_manifest.js +20 -24
  23. package/dist/block_meta/block_manifest.js.map +1 -1
  24. package/dist/block_meta/block_meta.cjs +35 -50
  25. package/dist/block_meta/block_meta.cjs.map +1 -1
  26. package/dist/block_meta/block_meta.d.ts +810 -806
  27. package/dist/block_meta/block_meta.js +31 -45
  28. package/dist/block_meta/block_meta.js.map +1 -1
  29. package/dist/block_meta/common.d.ts +5 -2
  30. package/dist/block_meta/content_conversion.cjs +19 -16
  31. package/dist/block_meta/content_conversion.cjs.map +1 -1
  32. package/dist/block_meta/content_conversion.d.ts +7 -3
  33. package/dist/block_meta/content_conversion.js +19 -15
  34. package/dist/block_meta/content_conversion.js.map +1 -1
  35. package/dist/block_meta/content_types.cjs +77 -187
  36. package/dist/block_meta/content_types.cjs.map +1 -1
  37. package/dist/block_meta/content_types.d.ts +382 -378
  38. package/dist/block_meta/content_types.js +76 -185
  39. package/dist/block_meta/content_types.js.map +1 -1
  40. package/dist/block_meta/index.cjs +8 -0
  41. package/dist/block_meta/index.d.ts +9 -10
  42. package/dist/block_meta/index.js +8 -0
  43. package/dist/block_meta/semver.cjs +6 -9
  44. package/dist/block_meta/semver.cjs.map +1 -1
  45. package/dist/block_meta/semver.d.ts +5 -1
  46. package/dist/block_meta/semver.js +5 -7
  47. package/dist/block_meta/semver.js.map +1 -1
  48. package/dist/block_registry/block_pack_spec.cjs +30 -34
  49. package/dist/block_registry/block_pack_spec.cjs.map +1 -1
  50. package/dist/block_registry/block_pack_spec.d.ts +172 -168
  51. package/dist/block_registry/block_pack_spec.js +29 -32
  52. package/dist/block_registry/block_pack_spec.js.map +1 -1
  53. package/dist/block_registry/index.cjs +3 -0
  54. package/dist/block_registry/index.d.ts +3 -4
  55. package/dist/block_registry/index.js +3 -0
  56. package/dist/block_registry/overview.cjs +55 -66
  57. package/dist/block_registry/overview.cjs.map +1 -1
  58. package/dist/block_registry/overview.d.ts +10345 -10340
  59. package/dist/block_registry/overview.js +54 -64
  60. package/dist/block_registry/overview.js.map +1 -1
  61. package/dist/block_registry/registry_spec.cjs +17 -16
  62. package/dist/block_registry/registry_spec.cjs.map +1 -1
  63. package/dist/block_registry/registry_spec.d.ts +147 -143
  64. package/dist/block_registry/registry_spec.js +16 -14
  65. package/dist/block_registry/registry_spec.js.map +1 -1
  66. package/dist/block_settings.cjs +3 -2
  67. package/dist/block_settings.cjs.map +1 -1
  68. package/dist/block_settings.d.ts +12 -10
  69. package/dist/block_settings.js +3 -1
  70. package/dist/block_settings.js.map +1 -1
  71. package/dist/block_state.d.ts +14 -14
  72. package/dist/index.cjs +102 -99
  73. package/dist/index.d.ts +25 -12
  74. package/dist/index.js +18 -16
  75. package/dist/json.cjs +16 -13
  76. package/dist/json.cjs.map +1 -1
  77. package/dist/json.d.ts +11 -7
  78. package/dist/json.js +14 -11
  79. package/dist/json.js.map +1 -1
  80. package/dist/pframe/index.d.ts +1 -2
  81. package/dist/pframe/internal_api/api_factory.cjs +3 -2
  82. package/dist/pframe/internal_api/api_factory.cjs.map +1 -1
  83. package/dist/pframe/internal_api/api_factory.d.ts +40 -36
  84. package/dist/pframe/internal_api/api_factory.js +3 -1
  85. package/dist/pframe/internal_api/api_factory.js.map +1 -1
  86. package/dist/pframe/internal_api/api_read.d.ts +40 -36
  87. package/dist/pframe/internal_api/api_wasm.d.ts +71 -70
  88. package/dist/pframe/internal_api/common.d.ts +18 -14
  89. package/dist/pframe/internal_api/create_table.d.ts +46 -42
  90. package/dist/pframe/internal_api/delete_column.d.ts +11 -7
  91. package/dist/pframe/internal_api/find_columns.d.ts +21 -17
  92. package/dist/pframe/internal_api/http_helpers.cjs +36 -27
  93. package/dist/pframe/internal_api/http_helpers.cjs.map +1 -1
  94. package/dist/pframe/internal_api/http_helpers.d.ts +153 -170
  95. package/dist/pframe/internal_api/http_helpers.js +36 -26
  96. package/dist/pframe/internal_api/http_helpers.js.map +1 -1
  97. package/dist/pframe/internal_api/index.cjs +18 -10
  98. package/dist/pframe/internal_api/index.cjs.map +1 -1
  99. package/dist/pframe/internal_api/index.d.ts +18 -11
  100. package/dist/pframe/internal_api/index.js +15 -3
  101. package/dist/pframe/internal_api/index.js.map +1 -1
  102. package/dist/pframe/internal_api/pframe.d.ts +26 -27
  103. package/dist/pframe/internal_api/table.d.ts +52 -48
  104. package/dist/project.d.ts +6 -3
  105. package/dist/project_list.d.ts +18 -14
  106. package/dist/project_overview.d.ts +135 -143
  107. package/dist/update_info.d.ts +10 -5
  108. package/package.json +5 -5
  109. package/dist/author_marker.d.ts.map +0 -1
  110. package/dist/block_meta/block_components.d.ts.map +0 -1
  111. package/dist/block_meta/block_description.d.ts.map +0 -1
  112. package/dist/block_meta/block_id.d.ts.map +0 -1
  113. package/dist/block_meta/block_manifest.d.ts.map +0 -1
  114. package/dist/block_meta/block_meta.d.ts.map +0 -1
  115. package/dist/block_meta/common.d.ts.map +0 -1
  116. package/dist/block_meta/content_conversion.d.ts.map +0 -1
  117. package/dist/block_meta/content_types.d.ts.map +0 -1
  118. package/dist/block_meta/index.d.ts.map +0 -1
  119. package/dist/block_meta/semver.d.ts.map +0 -1
  120. package/dist/block_registry/block_pack_spec.d.ts.map +0 -1
  121. package/dist/block_registry/index.d.ts.map +0 -1
  122. package/dist/block_registry/overview.d.ts.map +0 -1
  123. package/dist/block_registry/registry_spec.d.ts.map +0 -1
  124. package/dist/block_settings.d.ts.map +0 -1
  125. package/dist/block_state.d.ts.map +0 -1
  126. package/dist/index.cjs.map +0 -1
  127. package/dist/index.d.ts.map +0 -1
  128. package/dist/index.js.map +0 -1
  129. package/dist/json.d.ts.map +0 -1
  130. package/dist/pframe/index.d.ts.map +0 -1
  131. package/dist/pframe/internal_api/api_factory.d.ts.map +0 -1
  132. package/dist/pframe/internal_api/api_read.d.ts.map +0 -1
  133. package/dist/pframe/internal_api/api_wasm.d.ts.map +0 -1
  134. package/dist/pframe/internal_api/common.d.ts.map +0 -1
  135. package/dist/pframe/internal_api/create_table.d.ts.map +0 -1
  136. package/dist/pframe/internal_api/delete_column.d.ts.map +0 -1
  137. package/dist/pframe/internal_api/find_columns.d.ts.map +0 -1
  138. package/dist/pframe/internal_api/http_helpers.d.ts.map +0 -1
  139. package/dist/pframe/internal_api/index.d.ts.map +0 -1
  140. package/dist/pframe/internal_api/pframe.d.ts.map +0 -1
  141. package/dist/pframe/internal_api/table.d.ts.map +0 -1
  142. package/dist/project.d.ts.map +0 -1
  143. package/dist/project_list.d.ts.map +0 -1
  144. package/dist/project_overview.d.ts.map +0 -1
  145. package/dist/update_info.d.ts.map +0 -1
@@ -1,79 +1,69 @@
1
- import { z } from 'zod';
2
- import '../block_meta/content_types.js';
3
- import { SemVer } from '../block_meta/semver.js';
4
- import { BlockPackId, BlockPackIdNoVersion } from '../block_meta/block_id.js';
5
- import '../block_meta/block_components.js';
6
- import { BlockPackMetaEmbeddedBytes } from '../block_meta/block_meta.js';
7
- import { FeatureFlags } from '../block_meta/block_description.js';
8
- import '../block_meta/block_manifest.js';
9
- import { BlockPackSpec } from './block_pack_spec.js';
10
- import { RegistryEntry } from './registry_spec.js';
1
+ import { SemVer } from "../block_meta/semver.js";
2
+ import { BlockPackId, BlockPackIdNoVersion } from "../block_meta/block_id.js";
3
+ import { BlockPackMetaEmbeddedBytes } from "../block_meta/block_meta.js";
4
+ import { FeatureFlags } from "../block_meta/block_description.js";
5
+ import "../block_meta/index.js";
6
+ import { BlockPackSpec } from "./block_pack_spec.js";
7
+ import { RegistryEntry } from "./registry_spec.js";
8
+ import { z } from "zod";
11
9
 
10
+ //#region src/block_registry/overview.ts
12
11
  /**
13
- * Latest information about specific block pack. Contain information about latest version of the package.
14
- * */
15
- const BlockPackOverviewLegacy = z
16
- .object({
17
- registryId: z.string(),
18
- id: BlockPackId,
19
- meta: BlockPackMetaEmbeddedBytes,
20
- spec: BlockPackSpec,
21
- otherVersions: z.array(SemVer),
22
- })
23
- .passthrough();
12
+ * Latest information about specific block pack. Contain information about latest version of the package.
13
+ * */
14
+ const BlockPackOverviewLegacy = z.object({
15
+ registryId: z.string(),
16
+ id: BlockPackId,
17
+ meta: BlockPackMetaEmbeddedBytes,
18
+ spec: BlockPackSpec,
19
+ otherVersions: z.array(SemVer)
20
+ }).passthrough();
24
21
  const AnyChannel = "any";
25
22
  const StableChannel = "stable";
26
- const VersionWithChannels = z
27
- .object({
28
- version: SemVer,
29
- channels: z.array(z.string()),
30
- })
31
- .passthrough();
23
+ const VersionWithChannels = z.object({
24
+ version: SemVer,
25
+ channels: z.array(z.string())
26
+ }).passthrough();
32
27
  /**
33
- * Information about specific block pack version.
34
- * */
35
- const SingleBlockPackOverview = z
36
- .object({
37
- id: BlockPackId,
38
- meta: BlockPackMetaEmbeddedBytes,
39
- featureFlags: FeatureFlags.optional(),
40
- spec: BlockPackSpec,
41
- })
42
- .passthrough();
28
+ * Information about specific block pack version.
29
+ * */
30
+ const SingleBlockPackOverview = z.object({
31
+ id: BlockPackId,
32
+ meta: BlockPackMetaEmbeddedBytes,
33
+ featureFlags: FeatureFlags.optional(),
34
+ spec: BlockPackSpec
35
+ }).passthrough();
43
36
  /**
44
- * Latest information about specific block pack. Contain information about latest version of the package.
45
- * */
37
+ * Latest information about specific block pack. Contain information about latest version of the package.
38
+ * */
46
39
  const BlockPackOverviewRaw = z.object({
47
- id: BlockPackIdNoVersion,
48
- latestByChannel: z.record(z.string(), SingleBlockPackOverview),
49
- allVersions: z.array(VersionWithChannels),
50
- registryId: z.string(),
40
+ id: BlockPackIdNoVersion,
41
+ latestByChannel: z.record(z.string(), SingleBlockPackOverview),
42
+ allVersions: z.array(VersionWithChannels),
43
+ registryId: z.string()
51
44
  });
52
45
  const BlockPackOverview = BlockPackOverviewRaw.passthrough();
53
- const BlockPackOverviewNoRegistryId = BlockPackOverviewRaw.omit({
54
- registryId: true,
55
- }).passthrough();
56
- const RegistryStatus = RegistryEntry.extend({
57
- status: z.union([z.literal("online"), z.literal("offline")]),
58
- });
46
+ const BlockPackOverviewNoRegistryId = BlockPackOverviewRaw.omit({ registryId: true }).passthrough();
47
+ const RegistryStatus = RegistryEntry.extend({ status: z.union([z.literal("online"), z.literal("offline")]) });
59
48
  const BlockPackListing = z.object({
60
- registries: z.array(RegistryStatus),
61
- blockPacks: z.array(BlockPackOverview),
49
+ registries: z.array(RegistryStatus),
50
+ blockPacks: z.array(BlockPackOverview)
62
51
  });
63
52
  function blockPackOverviewToLegacy(bpo) {
64
- const mainChannel = bpo.latestByChannel[StableChannel] !== undefined ? StableChannel : AnyChannel;
65
- const latestOverview = bpo.latestByChannel[mainChannel];
66
- return {
67
- id: latestOverview.id,
68
- meta: latestOverview.meta,
69
- // so we only add stable channel specs to projects, to smooth the transition
70
- spec: { ...latestOverview.spec, channel: StableChannel },
71
- otherVersions: bpo.allVersions
72
- .filter((v) => v.channels.indexOf(mainChannel) >= 0)
73
- .map((v) => v.version),
74
- registryId: bpo.registryId,
75
- };
53
+ const mainChannel = bpo.latestByChannel[StableChannel] !== void 0 ? StableChannel : AnyChannel;
54
+ const latestOverview = bpo.latestByChannel[mainChannel];
55
+ return {
56
+ id: latestOverview.id,
57
+ meta: latestOverview.meta,
58
+ spec: {
59
+ ...latestOverview.spec,
60
+ channel: StableChannel
61
+ },
62
+ otherVersions: bpo.allVersions.filter((v) => v.channels.indexOf(mainChannel) >= 0).map((v) => v.version),
63
+ registryId: bpo.registryId
64
+ };
76
65
  }
77
66
 
67
+ //#endregion
78
68
  export { AnyChannel, BlockPackListing, BlockPackOverview, BlockPackOverviewLegacy, BlockPackOverviewNoRegistryId, BlockPackOverviewRaw, RegistryStatus, SingleBlockPackOverview, StableChannel, VersionWithChannels, blockPackOverviewToLegacy };
79
- //# sourceMappingURL=overview.js.map
69
+ //# sourceMappingURL=overview.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"overview.js","sources":["../../src/block_registry/overview.ts"],"sourcesContent":["import { z } from \"zod\";\nimport {\n BlockPackId,\n BlockPackIdNoVersion,\n BlockPackMetaEmbeddedBytes,\n FeatureFlags,\n SemVer,\n} from \"../block_meta\";\nimport type { BlockPackFromRegistryV2 } from \"./block_pack_spec\";\nimport { BlockPackSpec } from \"./block_pack_spec\";\nimport { RegistryEntry } from \"./registry_spec\";\n\n/**\n * Latest information about specific block pack. Contain information about latest version of the package.\n * */\nexport const BlockPackOverviewLegacy = z\n .object({\n registryId: z.string(),\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec,\n otherVersions: z.array(SemVer),\n })\n .passthrough();\nexport type BlockPackOverviewLegacy = z.infer<typeof BlockPackOverviewLegacy>;\n\nexport const AnyChannel = \"any\";\nexport const StableChannel = \"stable\";\n\nexport const VersionWithChannels = z\n .object({\n version: SemVer,\n channels: z.array(z.string()),\n })\n .passthrough();\n\n/**\n * Information about specific block pack version.\n * */\nexport const SingleBlockPackOverview = z\n .object({\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n featureFlags: FeatureFlags.optional(),\n spec: BlockPackSpec,\n })\n .passthrough();\nexport type SingleBlockPackOverview = z.infer<typeof SingleBlockPackOverview>;\n\n/**\n * Latest information about specific block pack. Contain information about latest version of the package.\n * */\nexport const BlockPackOverviewRaw = z.object({\n id: BlockPackIdNoVersion,\n latestByChannel: z.record(z.string(), SingleBlockPackOverview),\n allVersions: z.array(VersionWithChannels),\n registryId: z.string(),\n});\nexport const BlockPackOverview = BlockPackOverviewRaw.passthrough();\nexport type BlockPackOverview = z.infer<typeof BlockPackOverview>;\n\nexport const BlockPackOverviewNoRegistryId = BlockPackOverviewRaw.omit({\n registryId: true,\n}).passthrough();\nexport type BlockPackOverviewNoRegistryId = z.infer<typeof BlockPackOverviewNoRegistryId>;\n\nexport const RegistryStatus = RegistryEntry.extend({\n status: z.union([z.literal(\"online\"), z.literal(\"offline\")]),\n});\nexport type RegistryStatus = z.infer<typeof RegistryStatus>;\n\nexport const BlockPackListing = z.object({\n registries: z.array(RegistryStatus),\n blockPacks: z.array(BlockPackOverview),\n});\nexport type BlockPackListing = z.infer<typeof BlockPackListing>;\n\nexport function blockPackOverviewToLegacy(bpo: BlockPackOverview): BlockPackOverviewLegacy {\n const mainChannel = bpo.latestByChannel[StableChannel] !== undefined ? StableChannel : AnyChannel;\n const latestOverview = bpo.latestByChannel[mainChannel];\n return {\n id: latestOverview.id,\n meta: latestOverview.meta,\n // so we only add stable channel specs to projects, to smooth the transition\n spec: { ...(latestOverview.spec as BlockPackFromRegistryV2), channel: StableChannel },\n otherVersions: bpo.allVersions\n .filter((v) => v.channels.indexOf(mainChannel) >= 0)\n .map((v) => v.version),\n registryId: bpo.registryId,\n };\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAYA;;AAEK;AACE,MAAM,uBAAuB,GAAG;AACpC,KAAA,MAAM,CAAC;AACN,IAAA,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;AACtB,IAAA,EAAE,EAAE,WAAW;AACf,IAAA,IAAI,EAAE,0BAA0B;AAChC,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;CAC/B;AACA,KAAA,WAAW;AAGP,MAAM,UAAU,GAAG;AACnB,MAAM,aAAa,GAAG;AAEtB,MAAM,mBAAmB,GAAG;AAChC,KAAA,MAAM,CAAC;AACN,IAAA,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC9B;AACA,KAAA,WAAW;AAEd;;AAEK;AACE,MAAM,uBAAuB,GAAG;AACpC,KAAA,MAAM,CAAC;AACN,IAAA,EAAE,EAAE,WAAW;AACf,IAAA,IAAI,EAAE,0BAA0B;AAChC,IAAA,YAAY,EAAE,YAAY,CAAC,QAAQ,EAAE;AACrC,IAAA,IAAI,EAAE,aAAa;CACpB;AACA,KAAA,WAAW;AAGd;;AAEK;AACE,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;AAC3C,IAAA,EAAE,EAAE,oBAAoB;IACxB,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,uBAAuB,CAAC;AAC9D,IAAA,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC;AACzC,IAAA,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;AACvB,CAAA;MACY,iBAAiB,GAAG,oBAAoB,CAAC,WAAW;AAG1D,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,IAAI,CAAC;AACrE,IAAA,UAAU,EAAE,IAAI;CACjB,CAAC,CAAC,WAAW;AAGP,MAAM,cAAc,GAAG,aAAa,CAAC,MAAM,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7D,CAAA;AAGM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;AACvC,IAAA,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC;AACnC,IAAA,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC;AACvC,CAAA;AAGK,SAAU,yBAAyB,CAAC,GAAsB,EAAA;AAC9D,IAAA,MAAM,WAAW,GAAG,GAAG,CAAC,eAAe,CAAC,aAAa,CAAC,KAAK,SAAS,GAAG,aAAa,GAAG,UAAU;IACjG,MAAM,cAAc,GAAG,GAAG,CAAC,eAAe,CAAC,WAAW,CAAC;IACvD,OAAO;QACL,EAAE,EAAE,cAAc,CAAC,EAAE;QACrB,IAAI,EAAE,cAAc,CAAC,IAAI;;QAEzB,IAAI,EAAE,EAAE,GAAI,cAAc,CAAC,IAAgC,EAAE,OAAO,EAAE,aAAa,EAAE;QACrF,aAAa,EAAE,GAAG,CAAC;AAChB,aAAA,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC;aAClD,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;QACxB,UAAU,EAAE,GAAG,CAAC,UAAU;KAC3B;AACH;;;;"}
1
+ {"version":3,"file":"overview.js","names":[],"sources":["../../src/block_registry/overview.ts"],"sourcesContent":["import { z } from \"zod\";\nimport {\n BlockPackId,\n BlockPackIdNoVersion,\n BlockPackMetaEmbeddedBytes,\n FeatureFlags,\n SemVer,\n} from \"../block_meta\";\nimport type { BlockPackFromRegistryV2 } from \"./block_pack_spec\";\nimport { BlockPackSpec } from \"./block_pack_spec\";\nimport { RegistryEntry } from \"./registry_spec\";\n\n/**\n * Latest information about specific block pack. Contain information about latest version of the package.\n * */\nexport const BlockPackOverviewLegacy = z\n .object({\n registryId: z.string(),\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n spec: BlockPackSpec,\n otherVersions: z.array(SemVer),\n })\n .passthrough();\nexport type BlockPackOverviewLegacy = z.infer<typeof BlockPackOverviewLegacy>;\n\nexport const AnyChannel = \"any\";\nexport const StableChannel = \"stable\";\n\nexport const VersionWithChannels = z\n .object({\n version: SemVer,\n channels: z.array(z.string()),\n })\n .passthrough();\n\n/**\n * Information about specific block pack version.\n * */\nexport const SingleBlockPackOverview = z\n .object({\n id: BlockPackId,\n meta: BlockPackMetaEmbeddedBytes,\n featureFlags: FeatureFlags.optional(),\n spec: BlockPackSpec,\n })\n .passthrough();\nexport type SingleBlockPackOverview = z.infer<typeof SingleBlockPackOverview>;\n\n/**\n * Latest information about specific block pack. Contain information about latest version of the package.\n * */\nexport const BlockPackOverviewRaw = z.object({\n id: BlockPackIdNoVersion,\n latestByChannel: z.record(z.string(), SingleBlockPackOverview),\n allVersions: z.array(VersionWithChannels),\n registryId: z.string(),\n});\nexport const BlockPackOverview = BlockPackOverviewRaw.passthrough();\nexport type BlockPackOverview = z.infer<typeof BlockPackOverview>;\n\nexport const BlockPackOverviewNoRegistryId = BlockPackOverviewRaw.omit({\n registryId: true,\n}).passthrough();\nexport type BlockPackOverviewNoRegistryId = z.infer<typeof BlockPackOverviewNoRegistryId>;\n\nexport const RegistryStatus = RegistryEntry.extend({\n status: z.union([z.literal(\"online\"), z.literal(\"offline\")]),\n});\nexport type RegistryStatus = z.infer<typeof RegistryStatus>;\n\nexport const BlockPackListing = z.object({\n registries: z.array(RegistryStatus),\n blockPacks: z.array(BlockPackOverview),\n});\nexport type BlockPackListing = z.infer<typeof BlockPackListing>;\n\nexport function blockPackOverviewToLegacy(bpo: BlockPackOverview): BlockPackOverviewLegacy {\n const mainChannel = bpo.latestByChannel[StableChannel] !== undefined ? StableChannel : AnyChannel;\n const latestOverview = bpo.latestByChannel[mainChannel];\n return {\n id: latestOverview.id,\n meta: latestOverview.meta,\n // so we only add stable channel specs to projects, to smooth the transition\n spec: { ...(latestOverview.spec as BlockPackFromRegistryV2), channel: StableChannel },\n otherVersions: bpo.allVersions\n .filter((v) => v.channels.indexOf(mainChannel) >= 0)\n .map((v) => v.version),\n registryId: bpo.registryId,\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAeA,MAAa,0BAA0B,EACpC,OAAO;CACN,YAAY,EAAE,QAAQ;CACtB,IAAI;CACJ,MAAM;CACN,MAAM;CACN,eAAe,EAAE,MAAM,OAAO;CAC/B,CAAC,CACD,aAAa;AAGhB,MAAa,aAAa;AAC1B,MAAa,gBAAgB;AAE7B,MAAa,sBAAsB,EAChC,OAAO;CACN,SAAS;CACT,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC;CAC9B,CAAC,CACD,aAAa;;;;AAKhB,MAAa,0BAA0B,EACpC,OAAO;CACN,IAAI;CACJ,MAAM;CACN,cAAc,aAAa,UAAU;CACrC,MAAM;CACP,CAAC,CACD,aAAa;;;;AAMhB,MAAa,uBAAuB,EAAE,OAAO;CAC3C,IAAI;CACJ,iBAAiB,EAAE,OAAO,EAAE,QAAQ,EAAE,wBAAwB;CAC9D,aAAa,EAAE,MAAM,oBAAoB;CACzC,YAAY,EAAE,QAAQ;CACvB,CAAC;AACF,MAAa,oBAAoB,qBAAqB,aAAa;AAGnE,MAAa,gCAAgC,qBAAqB,KAAK,EACrE,YAAY,MACb,CAAC,CAAC,aAAa;AAGhB,MAAa,iBAAiB,cAAc,OAAO,EACjD,QAAQ,EAAE,MAAM,CAAC,EAAE,QAAQ,SAAS,EAAE,EAAE,QAAQ,UAAU,CAAC,CAAC,EAC7D,CAAC;AAGF,MAAa,mBAAmB,EAAE,OAAO;CACvC,YAAY,EAAE,MAAM,eAAe;CACnC,YAAY,EAAE,MAAM,kBAAkB;CACvC,CAAC;AAGF,SAAgB,0BAA0B,KAAiD;CACzF,MAAM,cAAc,IAAI,gBAAgB,mBAAmB,SAAY,gBAAgB;CACvF,MAAM,iBAAiB,IAAI,gBAAgB;AAC3C,QAAO;EACL,IAAI,eAAe;EACnB,MAAM,eAAe;EAErB,MAAM;GAAE,GAAI,eAAe;GAAkC,SAAS;GAAe;EACrF,eAAe,IAAI,YAChB,QAAQ,MAAM,EAAE,SAAS,QAAQ,YAAY,IAAI,EAAE,CACnD,KAAK,MAAM,EAAE,QAAQ;EACxB,YAAY,IAAI;EACjB"}
@@ -1,36 +1,37 @@
1
- 'use strict';
2
-
3
- var zod = require('zod');
1
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
2
+ let zod = require("zod");
4
3
 
4
+ //#region src/block_registry/registry_spec.ts
5
5
  const LocalDevFolder = zod.z.object({
6
- type: zod.z.literal("local-dev"),
7
- path: zod.z.string(),
6
+ type: zod.z.literal("local-dev"),
7
+ path: zod.z.string()
8
8
  });
9
9
  /** @deprecated don't use */
10
10
  const RemoteRegistryV1Spec = zod.z.object({
11
- type: zod.z.literal("remote-v1"),
12
- url: zod.z.string().url(),
11
+ type: zod.z.literal("remote-v1"),
12
+ url: zod.z.string().url()
13
13
  });
14
14
  const RemoteRegistryV2Spec = zod.z.object({
15
- type: zod.z.literal("remote-v2"),
16
- url: zod.z.string().url(),
15
+ type: zod.z.literal("remote-v2"),
16
+ url: zod.z.string().url()
17
17
  });
18
18
  const RegistrySpec = zod.z.discriminatedUnion("type", [
19
- RemoteRegistryV1Spec,
20
- RemoteRegistryV2Spec,
21
- LocalDevFolder,
19
+ RemoteRegistryV1Spec,
20
+ RemoteRegistryV2Spec,
21
+ LocalDevFolder
22
22
  ]);
23
23
  const RegistryEntry = zod.z.object({
24
- id: zod.z.string(),
25
- title: zod.z.string().optional(),
26
- spec: RegistrySpec,
24
+ id: zod.z.string(),
25
+ title: zod.z.string().optional(),
26
+ spec: RegistrySpec
27
27
  });
28
28
  const RegistryList = zod.z.array(RegistryEntry);
29
29
 
30
+ //#endregion
30
31
  exports.LocalDevFolder = LocalDevFolder;
31
32
  exports.RegistryEntry = RegistryEntry;
32
33
  exports.RegistryList = RegistryList;
33
34
  exports.RegistrySpec = RegistrySpec;
34
35
  exports.RemoteRegistryV1Spec = RemoteRegistryV1Spec;
35
36
  exports.RemoteRegistryV2Spec = RemoteRegistryV2Spec;
36
- //# sourceMappingURL=registry_spec.cjs.map
37
+ //# sourceMappingURL=registry_spec.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry_spec.cjs","sources":["../../src/block_registry/registry_spec.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const LocalDevFolder = z.object({\n type: z.literal(\"local-dev\"),\n path: z.string(),\n});\nexport type LocalDevFolder = z.infer<typeof LocalDevFolder>;\n\n/** @deprecated don't use */\nexport const RemoteRegistryV1Spec = z.object({\n type: z.literal(\"remote-v1\"),\n url: z.string().url(),\n});\n/** @deprecated don't use */\nexport type RemoteRegistryV1Spec = z.infer<typeof RemoteRegistryV1Spec>;\n\nexport const RemoteRegistryV2Spec = z.object({\n type: z.literal(\"remote-v2\"),\n url: z.string().url(),\n});\nexport type RemoteRegistryV2Spec = z.infer<typeof RemoteRegistryV2Spec>;\n\nexport const RegistrySpec = z.discriminatedUnion(\"type\", [\n RemoteRegistryV1Spec,\n RemoteRegistryV2Spec,\n LocalDevFolder,\n]);\nexport type RegistrySpec = z.infer<typeof RegistrySpec>;\n\nexport const RegistryEntry = z.object({\n id: z.string(),\n title: z.string().optional(),\n spec: RegistrySpec,\n});\nexport type RegistryEntry = z.infer<typeof RegistryEntry>;\n\nexport const RegistryList = z.array(RegistryEntry);\nexport type RegistryList = z.infer<typeof RegistryList>;\n"],"names":["z"],"mappings":";;;;AAEO,MAAM,cAAc,GAAGA,KAAC,CAAC,MAAM,CAAC;AACrC,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AAC5B,IAAA,IAAI,EAAEA,KAAC,CAAC,MAAM,EAAE;AACjB,CAAA;AAGD;AACO,MAAM,oBAAoB,GAAGA,KAAC,CAAC,MAAM,CAAC;AAC3C,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AAC5B,IAAA,GAAG,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;AACtB,CAAA;AAIM,MAAM,oBAAoB,GAAGA,KAAC,CAAC,MAAM,CAAC;AAC3C,IAAA,IAAI,EAAEA,KAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AAC5B,IAAA,GAAG,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;AACtB,CAAA;MAGY,YAAY,GAAGA,KAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACvD,oBAAoB;IACpB,oBAAoB;IACpB,cAAc;AACf,CAAA;AAGM,MAAM,aAAa,GAAGA,KAAC,CAAC,MAAM,CAAC;AACpC,IAAA,EAAE,EAAEA,KAAC,CAAC,MAAM,EAAE;AACd,IAAA,KAAK,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC5B,IAAA,IAAI,EAAE,YAAY;AACnB,CAAA;AAGM,MAAM,YAAY,GAAGA,KAAC,CAAC,KAAK,CAAC,aAAa;;;;;;;;;"}
1
+ {"version":3,"file":"registry_spec.cjs","names":["z"],"sources":["../../src/block_registry/registry_spec.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const LocalDevFolder = z.object({\n type: z.literal(\"local-dev\"),\n path: z.string(),\n});\nexport type LocalDevFolder = z.infer<typeof LocalDevFolder>;\n\n/** @deprecated don't use */\nexport const RemoteRegistryV1Spec = z.object({\n type: z.literal(\"remote-v1\"),\n url: z.string().url(),\n});\n/** @deprecated don't use */\nexport type RemoteRegistryV1Spec = z.infer<typeof RemoteRegistryV1Spec>;\n\nexport const RemoteRegistryV2Spec = z.object({\n type: z.literal(\"remote-v2\"),\n url: z.string().url(),\n});\nexport type RemoteRegistryV2Spec = z.infer<typeof RemoteRegistryV2Spec>;\n\nexport const RegistrySpec = z.discriminatedUnion(\"type\", [\n RemoteRegistryV1Spec,\n RemoteRegistryV2Spec,\n LocalDevFolder,\n]);\nexport type RegistrySpec = z.infer<typeof RegistrySpec>;\n\nexport const RegistryEntry = z.object({\n id: z.string(),\n title: z.string().optional(),\n spec: RegistrySpec,\n});\nexport type RegistryEntry = z.infer<typeof RegistryEntry>;\n\nexport const RegistryList = z.array(RegistryEntry);\nexport type RegistryList = z.infer<typeof RegistryList>;\n"],"mappings":";;;;AAEA,MAAa,iBAAiBA,MAAE,OAAO;CACrC,MAAMA,MAAE,QAAQ,YAAY;CAC5B,MAAMA,MAAE,QAAQ;CACjB,CAAC;;AAIF,MAAa,uBAAuBA,MAAE,OAAO;CAC3C,MAAMA,MAAE,QAAQ,YAAY;CAC5B,KAAKA,MAAE,QAAQ,CAAC,KAAK;CACtB,CAAC;AAIF,MAAa,uBAAuBA,MAAE,OAAO;CAC3C,MAAMA,MAAE,QAAQ,YAAY;CAC5B,KAAKA,MAAE,QAAQ,CAAC,KAAK;CACtB,CAAC;AAGF,MAAa,eAAeA,MAAE,mBAAmB,QAAQ;CACvD;CACA;CACA;CACD,CAAC;AAGF,MAAa,gBAAgBA,MAAE,OAAO;CACpC,IAAIA,MAAE,QAAQ;CACd,OAAOA,MAAE,QAAQ,CAAC,UAAU;CAC5B,MAAM;CACP,CAAC;AAGF,MAAa,eAAeA,MAAE,MAAM,cAAc"}
@@ -1,184 +1,188 @@
1
1
  import { z } from "zod";
2
- export declare const LocalDevFolder: z.ZodObject<{
3
- type: z.ZodLiteral<"local-dev">;
4
- path: z.ZodString;
2
+
3
+ //#region src/block_registry/registry_spec.d.ts
4
+ declare const LocalDevFolder: z.ZodObject<{
5
+ type: z.ZodLiteral<"local-dev">;
6
+ path: z.ZodString;
5
7
  }, "strip", z.ZodTypeAny, {
6
- type: "local-dev";
7
- path: string;
8
+ path: string;
9
+ type: "local-dev";
8
10
  }, {
9
- type: "local-dev";
10
- path: string;
11
+ path: string;
12
+ type: "local-dev";
13
+ }>;
14
+ type LocalDevFolder = z.infer<typeof LocalDevFolder>;
15
+ /** @deprecated don't use */
16
+ declare const RemoteRegistryV1Spec: z.ZodObject<{
17
+ type: z.ZodLiteral<"remote-v1">;
18
+ url: z.ZodString;
19
+ }, "strip", z.ZodTypeAny, {
20
+ type: "remote-v1";
21
+ url: string;
22
+ }, {
23
+ type: "remote-v1";
24
+ url: string;
11
25
  }>;
12
- export type LocalDevFolder = z.infer<typeof LocalDevFolder>;
13
26
  /** @deprecated don't use */
14
- export declare const RemoteRegistryV1Spec: z.ZodObject<{
27
+ type RemoteRegistryV1Spec = z.infer<typeof RemoteRegistryV1Spec>;
28
+ declare const RemoteRegistryV2Spec: z.ZodObject<{
29
+ type: z.ZodLiteral<"remote-v2">;
30
+ url: z.ZodString;
31
+ }, "strip", z.ZodTypeAny, {
32
+ type: "remote-v2";
33
+ url: string;
34
+ }, {
35
+ type: "remote-v2";
36
+ url: string;
37
+ }>;
38
+ type RemoteRegistryV2Spec = z.infer<typeof RemoteRegistryV2Spec>;
39
+ declare const RegistrySpec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
40
+ type: z.ZodLiteral<"remote-v1">;
41
+ url: z.ZodString;
42
+ }, "strip", z.ZodTypeAny, {
43
+ type: "remote-v1";
44
+ url: string;
45
+ }, {
46
+ type: "remote-v1";
47
+ url: string;
48
+ }>, z.ZodObject<{
49
+ type: z.ZodLiteral<"remote-v2">;
50
+ url: z.ZodString;
51
+ }, "strip", z.ZodTypeAny, {
52
+ type: "remote-v2";
53
+ url: string;
54
+ }, {
55
+ type: "remote-v2";
56
+ url: string;
57
+ }>, z.ZodObject<{
58
+ type: z.ZodLiteral<"local-dev">;
59
+ path: z.ZodString;
60
+ }, "strip", z.ZodTypeAny, {
61
+ path: string;
62
+ type: "local-dev";
63
+ }, {
64
+ path: string;
65
+ type: "local-dev";
66
+ }>]>;
67
+ type RegistrySpec = z.infer<typeof RegistrySpec>;
68
+ declare const RegistryEntry: z.ZodObject<{
69
+ id: z.ZodString;
70
+ title: z.ZodOptional<z.ZodString>;
71
+ spec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
15
72
  type: z.ZodLiteral<"remote-v1">;
16
73
  url: z.ZodString;
17
- }, "strip", z.ZodTypeAny, {
74
+ }, "strip", z.ZodTypeAny, {
18
75
  type: "remote-v1";
19
76
  url: string;
20
- }, {
77
+ }, {
21
78
  type: "remote-v1";
22
79
  url: string;
23
- }>;
24
- /** @deprecated don't use */
25
- export type RemoteRegistryV1Spec = z.infer<typeof RemoteRegistryV1Spec>;
26
- export declare const RemoteRegistryV2Spec: z.ZodObject<{
80
+ }>, z.ZodObject<{
27
81
  type: z.ZodLiteral<"remote-v2">;
28
82
  url: z.ZodString;
83
+ }, "strip", z.ZodTypeAny, {
84
+ type: "remote-v2";
85
+ url: string;
86
+ }, {
87
+ type: "remote-v2";
88
+ url: string;
89
+ }>, z.ZodObject<{
90
+ type: z.ZodLiteral<"local-dev">;
91
+ path: z.ZodString;
92
+ }, "strip", z.ZodTypeAny, {
93
+ path: string;
94
+ type: "local-dev";
95
+ }, {
96
+ path: string;
97
+ type: "local-dev";
98
+ }>]>;
29
99
  }, "strip", z.ZodTypeAny, {
100
+ id: string;
101
+ spec: {
102
+ type: "remote-v1";
103
+ url: string;
104
+ } | {
30
105
  type: "remote-v2";
31
106
  url: string;
107
+ } | {
108
+ path: string;
109
+ type: "local-dev";
110
+ };
111
+ title?: string | undefined;
32
112
  }, {
113
+ id: string;
114
+ spec: {
115
+ type: "remote-v1";
116
+ url: string;
117
+ } | {
33
118
  type: "remote-v2";
34
119
  url: string;
120
+ } | {
121
+ path: string;
122
+ type: "local-dev";
123
+ };
124
+ title?: string | undefined;
35
125
  }>;
36
- export type RemoteRegistryV2Spec = z.infer<typeof RemoteRegistryV2Spec>;
37
- export declare const RegistrySpec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
126
+ type RegistryEntry = z.infer<typeof RegistryEntry>;
127
+ declare const RegistryList: z.ZodArray<z.ZodObject<{
128
+ id: z.ZodString;
129
+ title: z.ZodOptional<z.ZodString>;
130
+ spec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
38
131
  type: z.ZodLiteral<"remote-v1">;
39
132
  url: z.ZodString;
40
- }, "strip", z.ZodTypeAny, {
133
+ }, "strip", z.ZodTypeAny, {
41
134
  type: "remote-v1";
42
135
  url: string;
43
- }, {
136
+ }, {
44
137
  type: "remote-v1";
45
138
  url: string;
46
- }>, z.ZodObject<{
139
+ }>, z.ZodObject<{
47
140
  type: z.ZodLiteral<"remote-v2">;
48
141
  url: z.ZodString;
49
- }, "strip", z.ZodTypeAny, {
142
+ }, "strip", z.ZodTypeAny, {
50
143
  type: "remote-v2";
51
144
  url: string;
52
- }, {
145
+ }, {
53
146
  type: "remote-v2";
54
147
  url: string;
55
- }>, z.ZodObject<{
148
+ }>, z.ZodObject<{
56
149
  type: z.ZodLiteral<"local-dev">;
57
150
  path: z.ZodString;
58
- }, "strip", z.ZodTypeAny, {
59
- type: "local-dev";
151
+ }, "strip", z.ZodTypeAny, {
60
152
  path: string;
61
- }, {
62
153
  type: "local-dev";
154
+ }, {
63
155
  path: string;
64
- }>]>;
65
- export type RegistrySpec = z.infer<typeof RegistrySpec>;
66
- export declare const RegistryEntry: z.ZodObject<{
67
- id: z.ZodString;
68
- title: z.ZodOptional<z.ZodString>;
69
- spec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
70
- type: z.ZodLiteral<"remote-v1">;
71
- url: z.ZodString;
72
- }, "strip", z.ZodTypeAny, {
73
- type: "remote-v1";
74
- url: string;
75
- }, {
76
- type: "remote-v1";
77
- url: string;
78
- }>, z.ZodObject<{
79
- type: z.ZodLiteral<"remote-v2">;
80
- url: z.ZodString;
81
- }, "strip", z.ZodTypeAny, {
82
- type: "remote-v2";
83
- url: string;
84
- }, {
85
- type: "remote-v2";
86
- url: string;
87
- }>, z.ZodObject<{
88
- type: z.ZodLiteral<"local-dev">;
89
- path: z.ZodString;
90
- }, "strip", z.ZodTypeAny, {
91
- type: "local-dev";
92
- path: string;
93
- }, {
94
- type: "local-dev";
95
- path: string;
96
- }>]>;
97
- }, "strip", z.ZodTypeAny, {
98
- id: string;
99
- spec: {
100
- type: "local-dev";
101
- path: string;
102
- } | {
103
- type: "remote-v1";
104
- url: string;
105
- } | {
106
- type: "remote-v2";
107
- url: string;
108
- };
109
- title?: string | undefined;
110
- }, {
111
- id: string;
112
- spec: {
113
- type: "local-dev";
114
- path: string;
115
- } | {
116
- type: "remote-v1";
117
- url: string;
118
- } | {
119
- type: "remote-v2";
120
- url: string;
121
- };
122
- title?: string | undefined;
123
- }>;
124
- export type RegistryEntry = z.infer<typeof RegistryEntry>;
125
- export declare const RegistryList: z.ZodArray<z.ZodObject<{
126
- id: z.ZodString;
127
- title: z.ZodOptional<z.ZodString>;
128
- spec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
129
- type: z.ZodLiteral<"remote-v1">;
130
- url: z.ZodString;
131
- }, "strip", z.ZodTypeAny, {
132
- type: "remote-v1";
133
- url: string;
134
- }, {
135
- type: "remote-v1";
136
- url: string;
137
- }>, z.ZodObject<{
138
- type: z.ZodLiteral<"remote-v2">;
139
- url: z.ZodString;
140
- }, "strip", z.ZodTypeAny, {
141
- type: "remote-v2";
142
- url: string;
143
- }, {
144
- type: "remote-v2";
145
- url: string;
146
- }>, z.ZodObject<{
147
- type: z.ZodLiteral<"local-dev">;
148
- path: z.ZodString;
149
- }, "strip", z.ZodTypeAny, {
150
- type: "local-dev";
151
- path: string;
152
- }, {
153
- type: "local-dev";
154
- path: string;
155
- }>]>;
156
+ type: "local-dev";
157
+ }>]>;
156
158
  }, "strip", z.ZodTypeAny, {
157
- id: string;
158
- spec: {
159
- type: "local-dev";
160
- path: string;
161
- } | {
162
- type: "remote-v1";
163
- url: string;
164
- } | {
165
- type: "remote-v2";
166
- url: string;
167
- };
168
- title?: string | undefined;
159
+ id: string;
160
+ spec: {
161
+ type: "remote-v1";
162
+ url: string;
163
+ } | {
164
+ type: "remote-v2";
165
+ url: string;
166
+ } | {
167
+ path: string;
168
+ type: "local-dev";
169
+ };
170
+ title?: string | undefined;
169
171
  }, {
170
- id: string;
171
- spec: {
172
- type: "local-dev";
173
- path: string;
174
- } | {
175
- type: "remote-v1";
176
- url: string;
177
- } | {
178
- type: "remote-v2";
179
- url: string;
180
- };
181
- title?: string | undefined;
172
+ id: string;
173
+ spec: {
174
+ type: "remote-v1";
175
+ url: string;
176
+ } | {
177
+ type: "remote-v2";
178
+ url: string;
179
+ } | {
180
+ path: string;
181
+ type: "local-dev";
182
+ };
183
+ title?: string | undefined;
182
184
  }>, "many">;
183
- export type RegistryList = z.infer<typeof RegistryList>;
185
+ type RegistryList = z.infer<typeof RegistryList>;
186
+ //#endregion
187
+ export { LocalDevFolder, RegistryEntry, RegistryList, RegistrySpec, RemoteRegistryV1Spec, RemoteRegistryV2Spec };
184
188
  //# sourceMappingURL=registry_spec.d.ts.map
@@ -1,29 +1,31 @@
1
- import { z } from 'zod';
1
+ import { z } from "zod";
2
2
 
3
+ //#region src/block_registry/registry_spec.ts
3
4
  const LocalDevFolder = z.object({
4
- type: z.literal("local-dev"),
5
- path: z.string(),
5
+ type: z.literal("local-dev"),
6
+ path: z.string()
6
7
  });
7
8
  /** @deprecated don't use */
8
9
  const RemoteRegistryV1Spec = z.object({
9
- type: z.literal("remote-v1"),
10
- url: z.string().url(),
10
+ type: z.literal("remote-v1"),
11
+ url: z.string().url()
11
12
  });
12
13
  const RemoteRegistryV2Spec = z.object({
13
- type: z.literal("remote-v2"),
14
- url: z.string().url(),
14
+ type: z.literal("remote-v2"),
15
+ url: z.string().url()
15
16
  });
16
17
  const RegistrySpec = z.discriminatedUnion("type", [
17
- RemoteRegistryV1Spec,
18
- RemoteRegistryV2Spec,
19
- LocalDevFolder,
18
+ RemoteRegistryV1Spec,
19
+ RemoteRegistryV2Spec,
20
+ LocalDevFolder
20
21
  ]);
21
22
  const RegistryEntry = z.object({
22
- id: z.string(),
23
- title: z.string().optional(),
24
- spec: RegistrySpec,
23
+ id: z.string(),
24
+ title: z.string().optional(),
25
+ spec: RegistrySpec
25
26
  });
26
27
  const RegistryList = z.array(RegistryEntry);
27
28
 
29
+ //#endregion
28
30
  export { LocalDevFolder, RegistryEntry, RegistryList, RegistrySpec, RemoteRegistryV1Spec, RemoteRegistryV2Spec };
29
- //# sourceMappingURL=registry_spec.js.map
31
+ //# sourceMappingURL=registry_spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry_spec.js","sources":["../../src/block_registry/registry_spec.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const LocalDevFolder = z.object({\n type: z.literal(\"local-dev\"),\n path: z.string(),\n});\nexport type LocalDevFolder = z.infer<typeof LocalDevFolder>;\n\n/** @deprecated don't use */\nexport const RemoteRegistryV1Spec = z.object({\n type: z.literal(\"remote-v1\"),\n url: z.string().url(),\n});\n/** @deprecated don't use */\nexport type RemoteRegistryV1Spec = z.infer<typeof RemoteRegistryV1Spec>;\n\nexport const RemoteRegistryV2Spec = z.object({\n type: z.literal(\"remote-v2\"),\n url: z.string().url(),\n});\nexport type RemoteRegistryV2Spec = z.infer<typeof RemoteRegistryV2Spec>;\n\nexport const RegistrySpec = z.discriminatedUnion(\"type\", [\n RemoteRegistryV1Spec,\n RemoteRegistryV2Spec,\n LocalDevFolder,\n]);\nexport type RegistrySpec = z.infer<typeof RegistrySpec>;\n\nexport const RegistryEntry = z.object({\n id: z.string(),\n title: z.string().optional(),\n spec: RegistrySpec,\n});\nexport type RegistryEntry = z.infer<typeof RegistryEntry>;\n\nexport const RegistryList = z.array(RegistryEntry);\nexport type RegistryList = z.infer<typeof RegistryList>;\n"],"names":[],"mappings":";;AAEO,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;AACrC,IAAA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AAC5B,IAAA,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;AACjB,CAAA;AAGD;AACO,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;AAC3C,IAAA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AAC5B,IAAA,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;AACtB,CAAA;AAIM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;AAC3C,IAAA,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;AAC5B,IAAA,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;AACtB,CAAA;MAGY,YAAY,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACvD,oBAAoB;IACpB,oBAAoB;IACpB,cAAc;AACf,CAAA;AAGM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;AACpC,IAAA,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;AACd,IAAA,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;AAC5B,IAAA,IAAI,EAAE,YAAY;AACnB,CAAA;AAGM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,aAAa;;;;"}
1
+ {"version":3,"file":"registry_spec.js","names":[],"sources":["../../src/block_registry/registry_spec.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const LocalDevFolder = z.object({\n type: z.literal(\"local-dev\"),\n path: z.string(),\n});\nexport type LocalDevFolder = z.infer<typeof LocalDevFolder>;\n\n/** @deprecated don't use */\nexport const RemoteRegistryV1Spec = z.object({\n type: z.literal(\"remote-v1\"),\n url: z.string().url(),\n});\n/** @deprecated don't use */\nexport type RemoteRegistryV1Spec = z.infer<typeof RemoteRegistryV1Spec>;\n\nexport const RemoteRegistryV2Spec = z.object({\n type: z.literal(\"remote-v2\"),\n url: z.string().url(),\n});\nexport type RemoteRegistryV2Spec = z.infer<typeof RemoteRegistryV2Spec>;\n\nexport const RegistrySpec = z.discriminatedUnion(\"type\", [\n RemoteRegistryV1Spec,\n RemoteRegistryV2Spec,\n LocalDevFolder,\n]);\nexport type RegistrySpec = z.infer<typeof RegistrySpec>;\n\nexport const RegistryEntry = z.object({\n id: z.string(),\n title: z.string().optional(),\n spec: RegistrySpec,\n});\nexport type RegistryEntry = z.infer<typeof RegistryEntry>;\n\nexport const RegistryList = z.array(RegistryEntry);\nexport type RegistryList = z.infer<typeof RegistryList>;\n"],"mappings":";;;AAEA,MAAa,iBAAiB,EAAE,OAAO;CACrC,MAAM,EAAE,QAAQ,YAAY;CAC5B,MAAM,EAAE,QAAQ;CACjB,CAAC;;AAIF,MAAa,uBAAuB,EAAE,OAAO;CAC3C,MAAM,EAAE,QAAQ,YAAY;CAC5B,KAAK,EAAE,QAAQ,CAAC,KAAK;CACtB,CAAC;AAIF,MAAa,uBAAuB,EAAE,OAAO;CAC3C,MAAM,EAAE,QAAQ,YAAY;CAC5B,KAAK,EAAE,QAAQ,CAAC,KAAK;CACtB,CAAC;AAGF,MAAa,eAAe,EAAE,mBAAmB,QAAQ;CACvD;CACA;CACA;CACD,CAAC;AAGF,MAAa,gBAAgB,EAAE,OAAO;CACpC,IAAI,EAAE,QAAQ;CACd,OAAO,EAAE,QAAQ,CAAC,UAAU;CAC5B,MAAM;CACP,CAAC;AAGF,MAAa,eAAe,EAAE,MAAM,cAAc"}
@@ -1,6 +1,7 @@
1
- 'use strict';
2
1
 
2
+ //#region src/block_settings.ts
3
3
  const InitialBlockSettings = {};
4
4
 
5
+ //#endregion
5
6
  exports.InitialBlockSettings = InitialBlockSettings;
6
- //# sourceMappingURL=block_settings.cjs.map
7
+ //# sourceMappingURL=block_settings.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"block_settings.cjs","sources":["../src/block_settings.ts"],"sourcesContent":["/**\n * What part of block version should be locked against updates.\n *\n * - `major` - 1.2.3 can be updated to 1.4.7\n * - `minor` - 1.2.3 can be updated to 1.2.5\n * - `patch` - version of the block is completely locked\n *\n * */\nexport type VersionLock = \"major\" | \"minor\" | \"patch\";\n\n/**\n * Block settings, persisted on the backend.\n *\n * Settings modulate different aspects of block behaviour,\n * currently only updates.\n * */\nexport type BlockSettings = {\n /** Only version strictly greater that this one will be suggested for auto-update. */\n skipVersion?: string;\n /**\n * If certain version locking policy is set, auto-updates will only be suggested,\n * if there is an update within the specified release line.\n * */\n versionLock?: VersionLock;\n};\n\nexport const InitialBlockSettings: BlockSettings = {};\n"],"names":[],"mappings":";;AA0BO,MAAM,oBAAoB,GAAkB;;;;"}
1
+ {"version":3,"file":"block_settings.cjs","names":[],"sources":["../src/block_settings.ts"],"sourcesContent":["/**\n * What part of block version should be locked against updates.\n *\n * - `major` - 1.2.3 can be updated to 1.4.7\n * - `minor` - 1.2.3 can be updated to 1.2.5\n * - `patch` - version of the block is completely locked\n *\n * */\nexport type VersionLock = \"major\" | \"minor\" | \"patch\";\n\n/**\n * Block settings, persisted on the backend.\n *\n * Settings modulate different aspects of block behaviour,\n * currently only updates.\n * */\nexport type BlockSettings = {\n /** Only version strictly greater that this one will be suggested for auto-update. */\n skipVersion?: string;\n /**\n * If certain version locking policy is set, auto-updates will only be suggested,\n * if there is an update within the specified release line.\n * */\n versionLock?: VersionLock;\n};\n\nexport const InitialBlockSettings: BlockSettings = {};\n"],"mappings":";;AA0BA,MAAa,uBAAsC,EAAE"}