@milaboratories/pl-model-middle-layer 1.30.8 → 1.30.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 (86) hide show
  1. package/dist/author_marker.d.ts +1 -1
  2. package/dist/block_meta/block_components.cjs +0 -1
  3. package/dist/block_meta/block_components.cjs.map +1 -1
  4. package/dist/block_meta/block_components.d.ts.map +1 -1
  5. package/dist/block_meta/block_components.js.map +1 -1
  6. package/dist/block_meta/block_description.cjs +0 -1
  7. package/dist/block_meta/block_description.cjs.map +1 -1
  8. package/dist/block_meta/block_description.d.ts.map +1 -1
  9. package/dist/block_meta/block_description.js.map +1 -1
  10. package/dist/block_meta/block_id.cjs +0 -1
  11. package/dist/block_meta/block_id.cjs.map +1 -1
  12. package/dist/block_meta/block_id.d.ts.map +1 -1
  13. package/dist/block_meta/block_id.js.map +1 -1
  14. package/dist/block_meta/block_manifest.cjs +0 -1
  15. package/dist/block_meta/block_manifest.cjs.map +1 -1
  16. package/dist/block_meta/block_manifest.d.ts +12 -13
  17. package/dist/block_meta/block_manifest.d.ts.map +1 -1
  18. package/dist/block_meta/block_manifest.js.map +1 -1
  19. package/dist/block_meta/block_meta.cjs +26 -1
  20. package/dist/block_meta/block_meta.cjs.map +1 -1
  21. package/dist/block_meta/block_meta.d.ts.map +1 -1
  22. package/dist/block_meta/block_meta.js +26 -0
  23. package/dist/block_meta/block_meta.js.map +1 -1
  24. package/dist/block_meta/content_conversion.cjs.map +1 -1
  25. package/dist/block_meta/content_conversion.js.map +1 -1
  26. package/dist/block_meta/content_types.cjs +0 -1
  27. package/dist/block_meta/content_types.cjs.map +1 -1
  28. package/dist/block_meta/content_types.d.ts.map +1 -1
  29. package/dist/block_meta/content_types.js.map +1 -1
  30. package/dist/block_meta/index.cjs +44 -8
  31. package/dist/block_meta/index.d.ts +2 -1
  32. package/dist/block_meta/index.js +9 -8
  33. package/dist/block_meta/semver.cjs +0 -1
  34. package/dist/block_meta/semver.cjs.map +1 -1
  35. package/dist/block_meta/semver.d.ts.map +1 -1
  36. package/dist/block_meta/semver.js.map +1 -1
  37. package/dist/block_registry/block_pack_spec.cjs +25 -1
  38. package/dist/block_registry/block_pack_spec.cjs.map +1 -1
  39. package/dist/block_registry/block_pack_spec.d.ts +63 -1
  40. package/dist/block_registry/block_pack_spec.d.ts.map +1 -1
  41. package/dist/block_registry/block_pack_spec.js +25 -1
  42. package/dist/block_registry/block_pack_spec.js.map +1 -1
  43. package/dist/block_registry/index.cjs +26 -3
  44. package/dist/block_registry/index.d.ts +3 -2
  45. package/dist/block_registry/index.js +4 -3
  46. package/dist/block_registry/overview.cjs +0 -1
  47. package/dist/block_registry/overview.cjs.map +1 -1
  48. package/dist/block_registry/overview.d.ts +701 -42
  49. package/dist/block_registry/overview.d.ts.map +1 -1
  50. package/dist/block_registry/overview.js.map +1 -1
  51. package/dist/block_registry/registry_spec.cjs +0 -1
  52. package/dist/block_registry/registry_spec.cjs.map +1 -1
  53. package/dist/block_registry/registry_spec.d.ts.map +1 -1
  54. package/dist/block_registry/registry_spec.js.map +1 -1
  55. package/dist/block_settings.cjs.map +1 -1
  56. package/dist/block_settings.d.ts.map +1 -1
  57. package/dist/block_settings.js.map +1 -1
  58. package/dist/index.cjs +1 -0
  59. package/dist/index.d.ts +2 -2
  60. package/dist/index.js +2 -2
  61. package/dist/json.cjs +1 -1
  62. package/dist/json.cjs.map +1 -1
  63. package/dist/json.d.ts.map +1 -1
  64. package/dist/json.js.map +1 -1
  65. package/dist/pframe/index.d.ts +2 -1
  66. package/dist/pframe/internal_api/api_factory.d.ts.map +1 -1
  67. package/dist/pframe/internal_api/api_read.d.ts.map +1 -1
  68. package/dist/pframe/internal_api/api_wasm.d.ts.map +1 -1
  69. package/dist/pframe/internal_api/common.d.ts.map +1 -1
  70. package/dist/pframe/internal_api/create_table.d.ts.map +1 -1
  71. package/dist/pframe/internal_api/delete_column.d.ts.map +1 -1
  72. package/dist/pframe/internal_api/discover_columns.d.ts.map +1 -1
  73. package/dist/pframe/internal_api/find_columns.d.ts.map +1 -1
  74. package/dist/pframe/internal_api/http_helpers.cjs.map +1 -1
  75. package/dist/pframe/internal_api/http_helpers.d.ts.map +1 -1
  76. package/dist/pframe/internal_api/http_helpers.js.map +1 -1
  77. package/dist/pframe/internal_api/index.cjs +4 -0
  78. package/dist/pframe/internal_api/index.d.ts +1 -1
  79. package/dist/pframe/internal_api/index.js +1 -1
  80. package/dist/pframe/internal_api/pframe.d.ts.map +1 -1
  81. package/dist/project.d.ts.map +1 -1
  82. package/dist/project_overview.d.ts.map +1 -1
  83. package/dist/storage_debug_view.d.ts.map +1 -1
  84. package/dist/update_info.d.ts.map +1 -1
  85. package/package.json +6 -6
  86. package/src/block_registry/block_pack_spec.ts +26 -0
@@ -1 +1 @@
1
- {"version":3,"file":"content_types.cjs","names":["z"],"sources":["../../src/block_meta/content_types.ts"],"sourcesContent":["import { z } from \"zod\";\n\n//\n// Canonical content types. TypeScript is the source of truth. The zod\n// schemas below are boundary validators pegged to these types via\n// `satisfies`; they exist only to parse external data (`package.json`,\n// registry manifests, registry overview files).\n//\n\n/** Inlined plain string (e.g. a short text snippet or markdown body). */\nexport type ContentExplicitString = {\n type: \"explicit-string\";\n content: string;\n};\n\n/** Inlined binary blob carried as base64 (e.g. a serialized logo image). */\nexport type ContentExplicitBase64 = {\n type: \"explicit-base64\";\n /** MIME type used to interpret `content`. */\n mimeType: string;\n /** Base64-encoded binary payload. */\n content: string;\n};\n\n/** Inlined binary blob carried as raw bytes. Wire form only; not used in JSON. */\nexport type ContentExplicitBytes = {\n type: \"explicit-bytes\";\n /** MIME type used to interpret `content`. */\n mimeType: string;\n content: Uint8Array;\n};\n\n/** Reference to a file by path relative to the carrying structure. */\nexport type ContentRelative = {\n type: \"relative\";\n path: string;\n};\n\n/** Reference to a file at an absolute local path. */\nexport type ContentAbsoluteFile = {\n type: \"absolute-file\";\n file: string;\n};\n\n/**\n * Reference to a folder at an absolute local path. Used for UI bundles\n * delivered as folders; the desktop \"add block\" dialog reads such folders on\n * demand instead of pulling every UI bundle eagerly.\n */\nexport type ContentAbsoluteFolder = {\n type: \"absolute-folder\";\n folder: string;\n};\n\n/** Reference to a file by remote URL (e.g. served from the registry). */\nexport type ContentAbsoluteUrl = {\n type: \"absolute-url\";\n url: string;\n};\n\n/** Canonical union of every content carrier shape used across the platform. */\nexport type Content =\n | ContentExplicitString\n | ContentExplicitBase64\n | ContentExplicitBytes\n | ContentRelative\n | ContentAbsoluteFile\n | ContentAbsoluteFolder\n | ContentAbsoluteUrl;\n\n//\n// Slot-specific content unions. Each names a set of carriers allowed in a\n// particular stage of the pipeline (boundary input, manifest, resolved).\n//\n\n/** Inlined or relative-path content (text/binary inlined, or relative path). */\nexport type ContentExplicitOrRelative =\n | ContentExplicitString\n | ContentExplicitBase64\n | ContentRelative;\n\n/** Any locally-resolvable content (inlined, relative path, or absolute file). */\nexport type ContentAnyLocal =\n | ContentExplicitString\n | ContentExplicitBase64\n | ContentRelative\n | ContentAbsoluteFile;\n\n/** Text content available locally (inlined, relative path, or absolute file). */\nexport type ContentAnyTextLocal = ContentExplicitString | ContentRelative | ContentAbsoluteFile;\n\n/** Binary content available locally (inlined base64, relative path, or absolute file). */\nexport type ContentAnyBinaryLocal = ContentExplicitBase64 | ContentRelative | ContentAbsoluteFile;\n\n/** Binary content fully resolved (inlined base64 or absolute file). */\nexport type ContentAbsoluteBinaryLocal = ContentExplicitBase64 | ContentAbsoluteFile;\n\n/** Text content fully resolved (inlined string or absolute file). */\nexport type ContentAbsoluteTextLocal = ContentExplicitString | ContentAbsoluteFile;\n\n/** Binary content in manifest form (inlined base64 or path relative to the manifest). */\nexport type ContentRelativeBinary = ContentExplicitBase64 | ContentRelative;\n\n/** Text content in manifest form (inlined string or path relative to the manifest). */\nexport type ContentRelativeText = ContentExplicitString | ContentRelative;\n\n//\n// Zod schemas — boundary validators only. The TS types above are the source\n// of truth; each schema is pegged via `satisfies z.ZodType<T>`. Only the\n// schemas referenced by sibling boundary files (`block_meta.ts`,\n// `block_manifest.ts`) are exported.\n//\n\nconst absPathRegex = new RegExp(`^(/|[A-Z]:\\\\\\\\)`);\n\nconst contentExplicitStringSchema = z\n .object({\n type: z.literal(\"explicit-string\"),\n content: z.string(),\n })\n .strict() satisfies z.ZodType<ContentExplicitString>;\n\nexport const ContentExplicitBase64 = z\n .object({\n type: z.literal(\"explicit-base64\"),\n mimeType: z.string().regex(/\\w+\\/[-+.\\w]+/),\n content: z.string().base64(),\n })\n .strict() satisfies z.ZodType<ContentExplicitBase64>;\n\nexport const ContentExplicitBytes = z\n .object({\n type: z.literal(\"explicit-bytes\"),\n mimeType: z.string().regex(/\\w+\\/[-+.\\w]+/),\n content: z.instanceof(Uint8Array),\n })\n .strict() satisfies z.ZodType<ContentExplicitBytes>;\n\nexport const ContentRelative = z\n .object({\n type: z.literal(\"relative\"),\n path: z.string(),\n })\n .strict() satisfies z.ZodType<ContentRelative>;\n\nconst contentAbsoluteFileSchema = z\n .object({\n type: z.literal(\"absolute-file\"),\n file: z.string().regex(absPathRegex, \"path to file must be absolute\"),\n })\n .strict() satisfies z.ZodType<ContentAbsoluteFile>;\n\nexport const ContentRelativeBinary = z.discriminatedUnion(\"type\", [\n ContentExplicitBase64,\n ContentRelative,\n]) satisfies z.ZodType<ContentRelativeBinary>;\n\nexport const ContentRelativeText = z.discriminatedUnion(\"type\", [\n contentExplicitStringSchema,\n ContentRelative,\n]) satisfies z.ZodType<ContentRelativeText>;\n\n//\n// Boundary normalizing transforms — parse the loose forms authors write in\n// `package.json`. Bare strings with the `file:` prefix become a\n// `ContentRelative`; bare strings without the prefix become a\n// `ContentExplicitString` (text only).\n//\n\nexport const DescriptionContentBinary = z.union([\n z\n .string()\n .startsWith(\"file:\")\n .transform<ContentRelativeBinary>((value) => ({\n type: \"relative\",\n path: value.slice(5),\n })),\n z.discriminatedUnion(\"type\", [ContentExplicitBase64, ContentRelative, contentAbsoluteFileSchema]),\n]) satisfies z.ZodType<ContentAnyBinaryLocal, z.ZodTypeDef, any>;\n\nexport const DescriptionContentText = z.union([\n z.string().transform<ContentRelativeText>((value) => {\n if (value.startsWith(\"file:\")) return { type: \"relative\", path: value.slice(5) };\n return { type: \"explicit-string\", content: value };\n }),\n z.discriminatedUnion(\"type\", [\n contentExplicitStringSchema,\n ContentRelative,\n contentAbsoluteFileSchema,\n ]),\n]) satisfies z.ZodType<ContentAnyTextLocal, z.ZodTypeDef, any>;\n"],"mappings":";;;AAiHA,MAAM,eAAe,IAAI,OAAO,kBAAkB;AAElD,MAAM,8BAA8BA,IAAAA,EACjC,OAAO;CACN,MAAMA,IAAAA,EAAE,QAAQ,kBAAkB;CAClC,SAASA,IAAAA,EAAE,QAAQ;CACpB,CAAC,CACD,QAAQ;AAEX,MAAa,wBAAwBA,IAAAA,EAClC,OAAO;CACN,MAAMA,IAAAA,EAAE,QAAQ,kBAAkB;CAClC,UAAUA,IAAAA,EAAE,QAAQ,CAAC,MAAM,gBAAgB;CAC3C,SAASA,IAAAA,EAAE,QAAQ,CAAC,QAAQ;CAC7B,CAAC,CACD,QAAQ;AAEX,MAAa,uBAAuBA,IAAAA,EACjC,OAAO;CACN,MAAMA,IAAAA,EAAE,QAAQ,iBAAiB;CACjC,UAAUA,IAAAA,EAAE,QAAQ,CAAC,MAAM,gBAAgB;CAC3C,SAASA,IAAAA,EAAE,WAAW,WAAW;CAClC,CAAC,CACD,QAAQ;AAEX,MAAa,kBAAkBA,IAAAA,EAC5B,OAAO;CACN,MAAMA,IAAAA,EAAE,QAAQ,WAAW;CAC3B,MAAMA,IAAAA,EAAE,QAAQ;CACjB,CAAC,CACD,QAAQ;AAEX,MAAM,4BAA4BA,IAAAA,EAC/B,OAAO;CACN,MAAMA,IAAAA,EAAE,QAAQ,gBAAgB;CAChC,MAAMA,IAAAA,EAAE,QAAQ,CAAC,MAAM,cAAc,gCAAgC;CACtE,CAAC,CACD,QAAQ;AAEX,MAAa,wBAAwBA,IAAAA,EAAE,mBAAmB,QAAQ,CAChE,uBACA,gBACD,CAAC;AAEF,MAAa,sBAAsBA,IAAAA,EAAE,mBAAmB,QAAQ,CAC9D,6BACA,gBACD,CAAC;AASF,MAAa,2BAA2BA,IAAAA,EAAE,MAAM,CAC9CA,IAAAA,EACG,QAAQ,CACR,WAAW,QAAQ,CACnB,WAAkC,WAAW;CAC5C,MAAM;CACN,MAAM,MAAM,MAAM,EAAE;CACrB,EAAE,EACLA,IAAAA,EAAE,mBAAmB,QAAQ;CAAC;CAAuB;CAAiB;CAA0B,CAAC,CAClG,CAAC;AAEF,MAAa,yBAAyBA,IAAAA,EAAE,MAAM,CAC5CA,IAAAA,EAAE,QAAQ,CAAC,WAAgC,UAAU;AACnD,KAAI,MAAM,WAAW,QAAQ,CAAE,QAAO;EAAE,MAAM;EAAY,MAAM,MAAM,MAAM,EAAE;EAAE;AAChF,QAAO;EAAE,MAAM;EAAmB,SAAS;EAAO;EAClD,EACFA,IAAAA,EAAE,mBAAmB,QAAQ;CAC3B;CACA;CACA;CACD,CAAC,CACH,CAAC"}
1
+ {"version":3,"file":"content_types.cjs","names":["z"],"sources":["../../src/block_meta/content_types.ts"],"sourcesContent":["import { z } from \"zod\";\n\n//\n// Canonical content types. TypeScript is the source of truth. The zod\n// schemas below are boundary validators pegged to these types via\n// `satisfies`; they exist only to parse external data (`package.json`,\n// registry manifests, registry overview files).\n//\n\n/** Inlined plain string (e.g. a short text snippet or markdown body). */\nexport type ContentExplicitString = {\n type: \"explicit-string\";\n content: string;\n};\n\n/** Inlined binary blob carried as base64 (e.g. a serialized logo image). */\nexport type ContentExplicitBase64 = {\n type: \"explicit-base64\";\n /** MIME type used to interpret `content`. */\n mimeType: string;\n /** Base64-encoded binary payload. */\n content: string;\n};\n\n/** Inlined binary blob carried as raw bytes. Wire form only; not used in JSON. */\nexport type ContentExplicitBytes = {\n type: \"explicit-bytes\";\n /** MIME type used to interpret `content`. */\n mimeType: string;\n content: Uint8Array;\n};\n\n/** Reference to a file by path relative to the carrying structure. */\nexport type ContentRelative = {\n type: \"relative\";\n path: string;\n};\n\n/** Reference to a file at an absolute local path. */\nexport type ContentAbsoluteFile = {\n type: \"absolute-file\";\n file: string;\n};\n\n/**\n * Reference to a folder at an absolute local path. Used for UI bundles\n * delivered as folders; the desktop \"add block\" dialog reads such folders on\n * demand instead of pulling every UI bundle eagerly.\n */\nexport type ContentAbsoluteFolder = {\n type: \"absolute-folder\";\n folder: string;\n};\n\n/** Reference to a file by remote URL (e.g. served from the registry). */\nexport type ContentAbsoluteUrl = {\n type: \"absolute-url\";\n url: string;\n};\n\n/** Canonical union of every content carrier shape used across the platform. */\nexport type Content =\n | ContentExplicitString\n | ContentExplicitBase64\n | ContentExplicitBytes\n | ContentRelative\n | ContentAbsoluteFile\n | ContentAbsoluteFolder\n | ContentAbsoluteUrl;\n\n//\n// Slot-specific content unions. Each names a set of carriers allowed in a\n// particular stage of the pipeline (boundary input, manifest, resolved).\n//\n\n/** Inlined or relative-path content (text/binary inlined, or relative path). */\nexport type ContentExplicitOrRelative =\n | ContentExplicitString\n | ContentExplicitBase64\n | ContentRelative;\n\n/** Any locally-resolvable content (inlined, relative path, or absolute file). */\nexport type ContentAnyLocal =\n | ContentExplicitString\n | ContentExplicitBase64\n | ContentRelative\n | ContentAbsoluteFile;\n\n/** Text content available locally (inlined, relative path, or absolute file). */\nexport type ContentAnyTextLocal = ContentExplicitString | ContentRelative | ContentAbsoluteFile;\n\n/** Binary content available locally (inlined base64, relative path, or absolute file). */\nexport type ContentAnyBinaryLocal = ContentExplicitBase64 | ContentRelative | ContentAbsoluteFile;\n\n/** Binary content fully resolved (inlined base64 or absolute file). */\nexport type ContentAbsoluteBinaryLocal = ContentExplicitBase64 | ContentAbsoluteFile;\n\n/** Text content fully resolved (inlined string or absolute file). */\nexport type ContentAbsoluteTextLocal = ContentExplicitString | ContentAbsoluteFile;\n\n/** Binary content in manifest form (inlined base64 or path relative to the manifest). */\nexport type ContentRelativeBinary = ContentExplicitBase64 | ContentRelative;\n\n/** Text content in manifest form (inlined string or path relative to the manifest). */\nexport type ContentRelativeText = ContentExplicitString | ContentRelative;\n\n//\n// Zod schemas — boundary validators only. The TS types above are the source\n// of truth; each schema is pegged via `satisfies z.ZodType<T>`. Only the\n// schemas referenced by sibling boundary files (`block_meta.ts`,\n// `block_manifest.ts`) are exported.\n//\n\nconst absPathRegex = new RegExp(`^(/|[A-Z]:\\\\\\\\)`);\n\nconst contentExplicitStringSchema = z\n .object({\n type: z.literal(\"explicit-string\"),\n content: z.string(),\n })\n .strict() satisfies z.ZodType<ContentExplicitString>;\n\nexport const ContentExplicitBase64 = z\n .object({\n type: z.literal(\"explicit-base64\"),\n mimeType: z.string().regex(/\\w+\\/[-+.\\w]+/),\n content: z.string().base64(),\n })\n .strict() satisfies z.ZodType<ContentExplicitBase64>;\n\nexport const ContentExplicitBytes = z\n .object({\n type: z.literal(\"explicit-bytes\"),\n mimeType: z.string().regex(/\\w+\\/[-+.\\w]+/),\n content: z.instanceof(Uint8Array),\n })\n .strict() satisfies z.ZodType<ContentExplicitBytes>;\n\nexport const ContentRelative = z\n .object({\n type: z.literal(\"relative\"),\n path: z.string(),\n })\n .strict() satisfies z.ZodType<ContentRelative>;\n\nconst contentAbsoluteFileSchema = z\n .object({\n type: z.literal(\"absolute-file\"),\n file: z.string().regex(absPathRegex, \"path to file must be absolute\"),\n })\n .strict() satisfies z.ZodType<ContentAbsoluteFile>;\n\nexport const ContentRelativeBinary = z.discriminatedUnion(\"type\", [\n ContentExplicitBase64,\n ContentRelative,\n]) satisfies z.ZodType<ContentRelativeBinary>;\n\nexport const ContentRelativeText = z.discriminatedUnion(\"type\", [\n contentExplicitStringSchema,\n ContentRelative,\n]) satisfies z.ZodType<ContentRelativeText>;\n\n//\n// Boundary normalizing transforms — parse the loose forms authors write in\n// `package.json`. Bare strings with the `file:` prefix become a\n// `ContentRelative`; bare strings without the prefix become a\n// `ContentExplicitString` (text only).\n//\n\nexport const DescriptionContentBinary = z.union([\n z\n .string()\n .startsWith(\"file:\")\n .transform<ContentRelativeBinary>((value) => ({\n type: \"relative\",\n path: value.slice(5),\n })),\n z.discriminatedUnion(\"type\", [ContentExplicitBase64, ContentRelative, contentAbsoluteFileSchema]),\n]) satisfies z.ZodType<ContentAnyBinaryLocal, z.ZodTypeDef, any>;\n\nexport const DescriptionContentText = z.union([\n z.string().transform<ContentRelativeText>((value) => {\n if (value.startsWith(\"file:\")) return { type: \"relative\", path: value.slice(5) };\n return { type: \"explicit-string\", content: value };\n }),\n z.discriminatedUnion(\"type\", [\n contentExplicitStringSchema,\n ContentRelative,\n contentAbsoluteFileSchema,\n ]),\n]) satisfies z.ZodType<ContentAnyTextLocal, z.ZodTypeDef, any>;\n"],"mappings":";;AAiHA,MAAM,eAAe,IAAI,OAAO,iBAAiB;AAEjD,MAAM,8BAA8BA,IAAAA,EACjC,OAAO;CACN,MAAMA,IAAAA,EAAE,QAAQ,iBAAiB;CACjC,SAASA,IAAAA,EAAE,OAAO;AACpB,CAAC,CAAC,CACD,OAAO;AAEV,MAAa,wBAAwBA,IAAAA,EAClC,OAAO;CACN,MAAMA,IAAAA,EAAE,QAAQ,iBAAiB;CACjC,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,MAAM,eAAe;CAC1C,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,OAAO;AAC7B,CAAC,CAAC,CACD,OAAO;AAEV,MAAa,uBAAuBA,IAAAA,EACjC,OAAO;CACN,MAAMA,IAAAA,EAAE,QAAQ,gBAAgB;CAChC,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,MAAM,eAAe;CAC1C,SAASA,IAAAA,EAAE,WAAW,UAAU;AAClC,CAAC,CAAC,CACD,OAAO;AAEV,MAAa,kBAAkBA,IAAAA,EAC5B,OAAO;CACN,MAAMA,IAAAA,EAAE,QAAQ,UAAU;CAC1B,MAAMA,IAAAA,EAAE,OAAO;AACjB,CAAC,CAAC,CACD,OAAO;AAEV,MAAM,4BAA4BA,IAAAA,EAC/B,OAAO;CACN,MAAMA,IAAAA,EAAE,QAAQ,eAAe;CAC/B,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,MAAM,cAAc,+BAA+B;AACtE,CAAC,CAAC,CACD,OAAO;AAEV,MAAa,wBAAwBA,IAAAA,EAAE,mBAAmB,QAAQ,CAChE,uBACA,eACF,CAAC;AAED,MAAa,sBAAsBA,IAAAA,EAAE,mBAAmB,QAAQ,CAC9D,6BACA,eACF,CAAC;AASD,MAAa,2BAA2BA,IAAAA,EAAE,MAAM,CAC9CA,IAAAA,EACG,OAAO,CAAC,CACR,WAAW,OAAO,CAAC,CACnB,WAAkC,WAAW;CAC5C,MAAM;CACN,MAAM,MAAM,MAAM,CAAC;AACrB,EAAE,GACJA,IAAAA,EAAE,mBAAmB,QAAQ;CAAC;CAAuB;CAAiB;AAAyB,CAAC,CAClG,CAAC;AAED,MAAa,yBAAyBA,IAAAA,EAAE,MAAM,CAC5CA,IAAAA,EAAE,OAAO,CAAC,CAAC,WAAgC,UAAU;CACnD,IAAI,MAAM,WAAW,OAAO,GAAG,OAAO;EAAE,MAAM;EAAY,MAAM,MAAM,MAAM,CAAC;CAAE;CAC/E,OAAO;EAAE,MAAM;EAAmB,SAAS;CAAM;AACnD,CAAC,GACDA,IAAAA,EAAE,mBAAmB,QAAQ;CAC3B;CACA;CACA;AACF,CAAC,CACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"content_types.d.ts","names":[],"sources":["../../src/block_meta/content_types.ts"],"mappings":";;;;KAUY,qBAAA;EACV,IAAA;EACA,OAAA;AAAA;;KAIU,qBAAA;EACV,IAAA,qBAD+B;EAG/B,QAAA,UAH+B;EAK/B,OAAA;AAAA;;KAIU,oBAAA;EACV,IAAA,oBADU;EAGV,QAAA;EACA,OAAA,EAAS,UAAA;AAAA;;KAIC,eAAA;EACV,IAAA;EACA,IAAA;AAAA;;KAIU,mBAAA;EACV,IAAA;EACA,IAAA;AAAA;;AAFF;;;;KAUY,qBAAA;EACV,IAAA;EACA,MAAA;AAAA;;KAIU,kBAAA;EACV,IAAA;EACA,GAAA;AAAA;;KAIU,OAAA,GACR,qBAAA,GACA,qBAAA,GACA,oBAAA,GACA,eAAA,GACA,mBAAA,GACA,qBAAA,GACA,kBAAA;AAPJ;AAAA,KAeY,yBAAA,GACR,qBAAA,GACA,qBAAA,GACA,eAAA;;KAGQ,eAAA,GACR,qBAAA,GACA,qBAAA,GACA,eAAA,GACA,mBAAA;;KAGQ,mBAAA,GAAsB,qBAAA,GAAwB,eAAA,GAAkB,mBAAA;;KAGhE,qBAAA,GAAwB,qBAAA,GAAwB,eAAA,GAAkB,mBAAA;;KAGlE,0BAAA,GAA6B,qBAAA,GAAwB,mBAAA;;KAGrD,wBAAA,GAA2B,qBAAA,GAAwB,mBAAA;;KAGnD,qBAAA,GAAwB,qBAAA,GAAwB,eAAA;;KAGhD,mBAAA,GAAsB,qBAAA,GAAwB,eAAA;AAAA,cAkB7C,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;;;;;;;cAQrB,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;;;;;;;cAQpB,eAAA,EAAe,CAAA,CAAA,SAAA;;;;;;;;;;cAcf,qBAAA,EAAqB,CAAA,CAAA,qBAAA,UAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;cAKrB,mBAAA,EAAmB,CAAA,CAAA,qBAAA,UAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;cAYnB,wBAAA,EAAwB,CAAA,CAAA,QAAA,EAAA,CAAA,CAAA,UAAA,CAAA,CAAA,CAAA,SAAA,EAAA,qBAAA,WAAA,CAAA,CAAA,qBAAA,UAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAWxB,sBAAA,EAAsB,CAAA,CAAA,QAAA,EAAA,CAAA,CAAA,UAAA,CAAA,CAAA,CAAA,SAAA,EAAA,mBAAA,WAAA,CAAA,CAAA,qBAAA,UAAA,CAAA,CAAA,SAAA"}
1
+ {"version":3,"file":"content_types.d.ts","names":[],"sources":["../../src/block_meta/content_types.ts"],"mappings":";;;;KAUY,qBAAA;EACV,IAAA;EACA,OAAO;AAAA;;KAIG,qBAAA;EACV,IAAA,qBAD+B;EAG/B,QAAA,UAH+B;EAK/B,OAAA;AAAA;;KAIU,oBAAA;EACV,IAAA,oBADU;EAGV,QAAA;EACA,OAAA,EAAS,UAAU;AAAA;;KAIT,eAAA;EACV,IAAA;EACA,IAAI;AAAA;AANe;AAAA,KAUT,mBAAA;EACV,IAAA;EACA,IAAI;AAAA;AANA;AAIN;;;;AAJM,KAcM,qBAAA;EACV,IAAA;EACA,MAAM;AAAA;;KAII,kBAAA;EACV,IAAA;EACA,GAAG;AAAA;;KAIO,OAAA,GACR,qBAAA,GACA,qBAAA,GACA,oBAAA,GACA,eAAA,GACA,mBAAA,GACA,qBAAA,GACA,kBAAA;AAPJ;AAAA,KAeY,yBAAA,GACR,qBAAA,GACA,qBAAA,GACA,eAAA;;KAGQ,eAAA,GACR,qBAAA,GACA,qBAAA,GACA,eAAA,GACA,mBAAA;;KAGQ,mBAAA,GAAsB,qBAAA,GAAwB,eAAA,GAAkB,mBAAA;;KAGhE,qBAAA,GAAwB,qBAAA,GAAwB,eAAA,GAAkB,mBAAA;;KAGlE,0BAAA,GAA6B,qBAAA,GAAwB,mBAAmB;;KAGxE,wBAAA,GAA2B,qBAAA,GAAwB,mBAAmB;;KAGtE,qBAAA,GAAwB,qBAAA,GAAwB,eAAe;;KAG/D,mBAAA,GAAsB,qBAAA,GAAwB,eAAe;AAAA,cAkB5D,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;;;;;;;cAQrB,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;;;;;;;cAQpB,eAAA,EAAe,CAAA,CAAA,SAAA;;;;;;;;;;cAcf,qBAAA,EAAqB,CAAA,CAAA,qBAAA,UAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;cAKrB,mBAAA,EAAmB,CAAA,CAAA,qBAAA,UAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;cAYnB,wBAAA,EAAwB,CAAA,CAAA,QAAA,EAAA,CAAA,CAAA,UAAA,CAAA,CAAA,CAAA,SAAA,EAAA,qBAAA,WAAA,CAAA,CAAA,qBAAA,UAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAWxB,sBAAA,EAAsB,CAAA,CAAA,QAAA,EAAA,CAAA,CAAA,UAAA,CAAA,CAAA,CAAA,SAAA,EAAA,mBAAA,WAAA,CAAA,CAAA,qBAAA,UAAA,CAAA,CAAA,SAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"content_types.js","names":[],"sources":["../../src/block_meta/content_types.ts"],"sourcesContent":["import { z } from \"zod\";\n\n//\n// Canonical content types. TypeScript is the source of truth. The zod\n// schemas below are boundary validators pegged to these types via\n// `satisfies`; they exist only to parse external data (`package.json`,\n// registry manifests, registry overview files).\n//\n\n/** Inlined plain string (e.g. a short text snippet or markdown body). */\nexport type ContentExplicitString = {\n type: \"explicit-string\";\n content: string;\n};\n\n/** Inlined binary blob carried as base64 (e.g. a serialized logo image). */\nexport type ContentExplicitBase64 = {\n type: \"explicit-base64\";\n /** MIME type used to interpret `content`. */\n mimeType: string;\n /** Base64-encoded binary payload. */\n content: string;\n};\n\n/** Inlined binary blob carried as raw bytes. Wire form only; not used in JSON. */\nexport type ContentExplicitBytes = {\n type: \"explicit-bytes\";\n /** MIME type used to interpret `content`. */\n mimeType: string;\n content: Uint8Array;\n};\n\n/** Reference to a file by path relative to the carrying structure. */\nexport type ContentRelative = {\n type: \"relative\";\n path: string;\n};\n\n/** Reference to a file at an absolute local path. */\nexport type ContentAbsoluteFile = {\n type: \"absolute-file\";\n file: string;\n};\n\n/**\n * Reference to a folder at an absolute local path. Used for UI bundles\n * delivered as folders; the desktop \"add block\" dialog reads such folders on\n * demand instead of pulling every UI bundle eagerly.\n */\nexport type ContentAbsoluteFolder = {\n type: \"absolute-folder\";\n folder: string;\n};\n\n/** Reference to a file by remote URL (e.g. served from the registry). */\nexport type ContentAbsoluteUrl = {\n type: \"absolute-url\";\n url: string;\n};\n\n/** Canonical union of every content carrier shape used across the platform. */\nexport type Content =\n | ContentExplicitString\n | ContentExplicitBase64\n | ContentExplicitBytes\n | ContentRelative\n | ContentAbsoluteFile\n | ContentAbsoluteFolder\n | ContentAbsoluteUrl;\n\n//\n// Slot-specific content unions. Each names a set of carriers allowed in a\n// particular stage of the pipeline (boundary input, manifest, resolved).\n//\n\n/** Inlined or relative-path content (text/binary inlined, or relative path). */\nexport type ContentExplicitOrRelative =\n | ContentExplicitString\n | ContentExplicitBase64\n | ContentRelative;\n\n/** Any locally-resolvable content (inlined, relative path, or absolute file). */\nexport type ContentAnyLocal =\n | ContentExplicitString\n | ContentExplicitBase64\n | ContentRelative\n | ContentAbsoluteFile;\n\n/** Text content available locally (inlined, relative path, or absolute file). */\nexport type ContentAnyTextLocal = ContentExplicitString | ContentRelative | ContentAbsoluteFile;\n\n/** Binary content available locally (inlined base64, relative path, or absolute file). */\nexport type ContentAnyBinaryLocal = ContentExplicitBase64 | ContentRelative | ContentAbsoluteFile;\n\n/** Binary content fully resolved (inlined base64 or absolute file). */\nexport type ContentAbsoluteBinaryLocal = ContentExplicitBase64 | ContentAbsoluteFile;\n\n/** Text content fully resolved (inlined string or absolute file). */\nexport type ContentAbsoluteTextLocal = ContentExplicitString | ContentAbsoluteFile;\n\n/** Binary content in manifest form (inlined base64 or path relative to the manifest). */\nexport type ContentRelativeBinary = ContentExplicitBase64 | ContentRelative;\n\n/** Text content in manifest form (inlined string or path relative to the manifest). */\nexport type ContentRelativeText = ContentExplicitString | ContentRelative;\n\n//\n// Zod schemas — boundary validators only. The TS types above are the source\n// of truth; each schema is pegged via `satisfies z.ZodType<T>`. Only the\n// schemas referenced by sibling boundary files (`block_meta.ts`,\n// `block_manifest.ts`) are exported.\n//\n\nconst absPathRegex = new RegExp(`^(/|[A-Z]:\\\\\\\\)`);\n\nconst contentExplicitStringSchema = z\n .object({\n type: z.literal(\"explicit-string\"),\n content: z.string(),\n })\n .strict() satisfies z.ZodType<ContentExplicitString>;\n\nexport const ContentExplicitBase64 = z\n .object({\n type: z.literal(\"explicit-base64\"),\n mimeType: z.string().regex(/\\w+\\/[-+.\\w]+/),\n content: z.string().base64(),\n })\n .strict() satisfies z.ZodType<ContentExplicitBase64>;\n\nexport const ContentExplicitBytes = z\n .object({\n type: z.literal(\"explicit-bytes\"),\n mimeType: z.string().regex(/\\w+\\/[-+.\\w]+/),\n content: z.instanceof(Uint8Array),\n })\n .strict() satisfies z.ZodType<ContentExplicitBytes>;\n\nexport const ContentRelative = z\n .object({\n type: z.literal(\"relative\"),\n path: z.string(),\n })\n .strict() satisfies z.ZodType<ContentRelative>;\n\nconst contentAbsoluteFileSchema = z\n .object({\n type: z.literal(\"absolute-file\"),\n file: z.string().regex(absPathRegex, \"path to file must be absolute\"),\n })\n .strict() satisfies z.ZodType<ContentAbsoluteFile>;\n\nexport const ContentRelativeBinary = z.discriminatedUnion(\"type\", [\n ContentExplicitBase64,\n ContentRelative,\n]) satisfies z.ZodType<ContentRelativeBinary>;\n\nexport const ContentRelativeText = z.discriminatedUnion(\"type\", [\n contentExplicitStringSchema,\n ContentRelative,\n]) satisfies z.ZodType<ContentRelativeText>;\n\n//\n// Boundary normalizing transforms — parse the loose forms authors write in\n// `package.json`. Bare strings with the `file:` prefix become a\n// `ContentRelative`; bare strings without the prefix become a\n// `ContentExplicitString` (text only).\n//\n\nexport const DescriptionContentBinary = z.union([\n z\n .string()\n .startsWith(\"file:\")\n .transform<ContentRelativeBinary>((value) => ({\n type: \"relative\",\n path: value.slice(5),\n })),\n z.discriminatedUnion(\"type\", [ContentExplicitBase64, ContentRelative, contentAbsoluteFileSchema]),\n]) satisfies z.ZodType<ContentAnyBinaryLocal, z.ZodTypeDef, any>;\n\nexport const DescriptionContentText = z.union([\n z.string().transform<ContentRelativeText>((value) => {\n if (value.startsWith(\"file:\")) return { type: \"relative\", path: value.slice(5) };\n return { type: \"explicit-string\", content: value };\n }),\n z.discriminatedUnion(\"type\", [\n contentExplicitStringSchema,\n ContentRelative,\n contentAbsoluteFileSchema,\n ]),\n]) satisfies z.ZodType<ContentAnyTextLocal, z.ZodTypeDef, any>;\n"],"mappings":";;AAiHA,MAAM,eAAe,IAAI,OAAO,kBAAkB;AAElD,MAAM,8BAA8B,EACjC,OAAO;CACN,MAAM,EAAE,QAAQ,kBAAkB;CAClC,SAAS,EAAE,QAAQ;CACpB,CAAC,CACD,QAAQ;AAEX,MAAa,wBAAwB,EAClC,OAAO;CACN,MAAM,EAAE,QAAQ,kBAAkB;CAClC,UAAU,EAAE,QAAQ,CAAC,MAAM,gBAAgB;CAC3C,SAAS,EAAE,QAAQ,CAAC,QAAQ;CAC7B,CAAC,CACD,QAAQ;AAEX,MAAa,uBAAuB,EACjC,OAAO;CACN,MAAM,EAAE,QAAQ,iBAAiB;CACjC,UAAU,EAAE,QAAQ,CAAC,MAAM,gBAAgB;CAC3C,SAAS,EAAE,WAAW,WAAW;CAClC,CAAC,CACD,QAAQ;AAEX,MAAa,kBAAkB,EAC5B,OAAO;CACN,MAAM,EAAE,QAAQ,WAAW;CAC3B,MAAM,EAAE,QAAQ;CACjB,CAAC,CACD,QAAQ;AAEX,MAAM,4BAA4B,EAC/B,OAAO;CACN,MAAM,EAAE,QAAQ,gBAAgB;CAChC,MAAM,EAAE,QAAQ,CAAC,MAAM,cAAc,gCAAgC;CACtE,CAAC,CACD,QAAQ;AAEX,MAAa,wBAAwB,EAAE,mBAAmB,QAAQ,CAChE,uBACA,gBACD,CAAC;AAEF,MAAa,sBAAsB,EAAE,mBAAmB,QAAQ,CAC9D,6BACA,gBACD,CAAC;AASF,MAAa,2BAA2B,EAAE,MAAM,CAC9C,EACG,QAAQ,CACR,WAAW,QAAQ,CACnB,WAAkC,WAAW;CAC5C,MAAM;CACN,MAAM,MAAM,MAAM,EAAE;CACrB,EAAE,EACL,EAAE,mBAAmB,QAAQ;CAAC;CAAuB;CAAiB;CAA0B,CAAC,CAClG,CAAC;AAEF,MAAa,yBAAyB,EAAE,MAAM,CAC5C,EAAE,QAAQ,CAAC,WAAgC,UAAU;AACnD,KAAI,MAAM,WAAW,QAAQ,CAAE,QAAO;EAAE,MAAM;EAAY,MAAM,MAAM,MAAM,EAAE;EAAE;AAChF,QAAO;EAAE,MAAM;EAAmB,SAAS;EAAO;EAClD,EACF,EAAE,mBAAmB,QAAQ;CAC3B;CACA;CACA;CACD,CAAC,CACH,CAAC"}
1
+ {"version":3,"file":"content_types.js","names":[],"sources":["../../src/block_meta/content_types.ts"],"sourcesContent":["import { z } from \"zod\";\n\n//\n// Canonical content types. TypeScript is the source of truth. The zod\n// schemas below are boundary validators pegged to these types via\n// `satisfies`; they exist only to parse external data (`package.json`,\n// registry manifests, registry overview files).\n//\n\n/** Inlined plain string (e.g. a short text snippet or markdown body). */\nexport type ContentExplicitString = {\n type: \"explicit-string\";\n content: string;\n};\n\n/** Inlined binary blob carried as base64 (e.g. a serialized logo image). */\nexport type ContentExplicitBase64 = {\n type: \"explicit-base64\";\n /** MIME type used to interpret `content`. */\n mimeType: string;\n /** Base64-encoded binary payload. */\n content: string;\n};\n\n/** Inlined binary blob carried as raw bytes. Wire form only; not used in JSON. */\nexport type ContentExplicitBytes = {\n type: \"explicit-bytes\";\n /** MIME type used to interpret `content`. */\n mimeType: string;\n content: Uint8Array;\n};\n\n/** Reference to a file by path relative to the carrying structure. */\nexport type ContentRelative = {\n type: \"relative\";\n path: string;\n};\n\n/** Reference to a file at an absolute local path. */\nexport type ContentAbsoluteFile = {\n type: \"absolute-file\";\n file: string;\n};\n\n/**\n * Reference to a folder at an absolute local path. Used for UI bundles\n * delivered as folders; the desktop \"add block\" dialog reads such folders on\n * demand instead of pulling every UI bundle eagerly.\n */\nexport type ContentAbsoluteFolder = {\n type: \"absolute-folder\";\n folder: string;\n};\n\n/** Reference to a file by remote URL (e.g. served from the registry). */\nexport type ContentAbsoluteUrl = {\n type: \"absolute-url\";\n url: string;\n};\n\n/** Canonical union of every content carrier shape used across the platform. */\nexport type Content =\n | ContentExplicitString\n | ContentExplicitBase64\n | ContentExplicitBytes\n | ContentRelative\n | ContentAbsoluteFile\n | ContentAbsoluteFolder\n | ContentAbsoluteUrl;\n\n//\n// Slot-specific content unions. Each names a set of carriers allowed in a\n// particular stage of the pipeline (boundary input, manifest, resolved).\n//\n\n/** Inlined or relative-path content (text/binary inlined, or relative path). */\nexport type ContentExplicitOrRelative =\n | ContentExplicitString\n | ContentExplicitBase64\n | ContentRelative;\n\n/** Any locally-resolvable content (inlined, relative path, or absolute file). */\nexport type ContentAnyLocal =\n | ContentExplicitString\n | ContentExplicitBase64\n | ContentRelative\n | ContentAbsoluteFile;\n\n/** Text content available locally (inlined, relative path, or absolute file). */\nexport type ContentAnyTextLocal = ContentExplicitString | ContentRelative | ContentAbsoluteFile;\n\n/** Binary content available locally (inlined base64, relative path, or absolute file). */\nexport type ContentAnyBinaryLocal = ContentExplicitBase64 | ContentRelative | ContentAbsoluteFile;\n\n/** Binary content fully resolved (inlined base64 or absolute file). */\nexport type ContentAbsoluteBinaryLocal = ContentExplicitBase64 | ContentAbsoluteFile;\n\n/** Text content fully resolved (inlined string or absolute file). */\nexport type ContentAbsoluteTextLocal = ContentExplicitString | ContentAbsoluteFile;\n\n/** Binary content in manifest form (inlined base64 or path relative to the manifest). */\nexport type ContentRelativeBinary = ContentExplicitBase64 | ContentRelative;\n\n/** Text content in manifest form (inlined string or path relative to the manifest). */\nexport type ContentRelativeText = ContentExplicitString | ContentRelative;\n\n//\n// Zod schemas — boundary validators only. The TS types above are the source\n// of truth; each schema is pegged via `satisfies z.ZodType<T>`. Only the\n// schemas referenced by sibling boundary files (`block_meta.ts`,\n// `block_manifest.ts`) are exported.\n//\n\nconst absPathRegex = new RegExp(`^(/|[A-Z]:\\\\\\\\)`);\n\nconst contentExplicitStringSchema = z\n .object({\n type: z.literal(\"explicit-string\"),\n content: z.string(),\n })\n .strict() satisfies z.ZodType<ContentExplicitString>;\n\nexport const ContentExplicitBase64 = z\n .object({\n type: z.literal(\"explicit-base64\"),\n mimeType: z.string().regex(/\\w+\\/[-+.\\w]+/),\n content: z.string().base64(),\n })\n .strict() satisfies z.ZodType<ContentExplicitBase64>;\n\nexport const ContentExplicitBytes = z\n .object({\n type: z.literal(\"explicit-bytes\"),\n mimeType: z.string().regex(/\\w+\\/[-+.\\w]+/),\n content: z.instanceof(Uint8Array),\n })\n .strict() satisfies z.ZodType<ContentExplicitBytes>;\n\nexport const ContentRelative = z\n .object({\n type: z.literal(\"relative\"),\n path: z.string(),\n })\n .strict() satisfies z.ZodType<ContentRelative>;\n\nconst contentAbsoluteFileSchema = z\n .object({\n type: z.literal(\"absolute-file\"),\n file: z.string().regex(absPathRegex, \"path to file must be absolute\"),\n })\n .strict() satisfies z.ZodType<ContentAbsoluteFile>;\n\nexport const ContentRelativeBinary = z.discriminatedUnion(\"type\", [\n ContentExplicitBase64,\n ContentRelative,\n]) satisfies z.ZodType<ContentRelativeBinary>;\n\nexport const ContentRelativeText = z.discriminatedUnion(\"type\", [\n contentExplicitStringSchema,\n ContentRelative,\n]) satisfies z.ZodType<ContentRelativeText>;\n\n//\n// Boundary normalizing transforms — parse the loose forms authors write in\n// `package.json`. Bare strings with the `file:` prefix become a\n// `ContentRelative`; bare strings without the prefix become a\n// `ContentExplicitString` (text only).\n//\n\nexport const DescriptionContentBinary = z.union([\n z\n .string()\n .startsWith(\"file:\")\n .transform<ContentRelativeBinary>((value) => ({\n type: \"relative\",\n path: value.slice(5),\n })),\n z.discriminatedUnion(\"type\", [ContentExplicitBase64, ContentRelative, contentAbsoluteFileSchema]),\n]) satisfies z.ZodType<ContentAnyBinaryLocal, z.ZodTypeDef, any>;\n\nexport const DescriptionContentText = z.union([\n z.string().transform<ContentRelativeText>((value) => {\n if (value.startsWith(\"file:\")) return { type: \"relative\", path: value.slice(5) };\n return { type: \"explicit-string\", content: value };\n }),\n z.discriminatedUnion(\"type\", [\n contentExplicitStringSchema,\n ContentRelative,\n contentAbsoluteFileSchema,\n ]),\n]) satisfies z.ZodType<ContentAnyTextLocal, z.ZodTypeDef, any>;\n"],"mappings":";;AAiHA,MAAM,eAAe,IAAI,OAAO,iBAAiB;AAEjD,MAAM,8BAA8B,EACjC,OAAO;CACN,MAAM,EAAE,QAAQ,iBAAiB;CACjC,SAAS,EAAE,OAAO;AACpB,CAAC,CAAC,CACD,OAAO;AAEV,MAAa,wBAAwB,EAClC,OAAO;CACN,MAAM,EAAE,QAAQ,iBAAiB;CACjC,UAAU,EAAE,OAAO,CAAC,CAAC,MAAM,eAAe;CAC1C,SAAS,EAAE,OAAO,CAAC,CAAC,OAAO;AAC7B,CAAC,CAAC,CACD,OAAO;AAEV,MAAa,uBAAuB,EACjC,OAAO;CACN,MAAM,EAAE,QAAQ,gBAAgB;CAChC,UAAU,EAAE,OAAO,CAAC,CAAC,MAAM,eAAe;CAC1C,SAAS,EAAE,WAAW,UAAU;AAClC,CAAC,CAAC,CACD,OAAO;AAEV,MAAa,kBAAkB,EAC5B,OAAO;CACN,MAAM,EAAE,QAAQ,UAAU;CAC1B,MAAM,EAAE,OAAO;AACjB,CAAC,CAAC,CACD,OAAO;AAEV,MAAM,4BAA4B,EAC/B,OAAO;CACN,MAAM,EAAE,QAAQ,eAAe;CAC/B,MAAM,EAAE,OAAO,CAAC,CAAC,MAAM,cAAc,+BAA+B;AACtE,CAAC,CAAC,CACD,OAAO;AAEV,MAAa,wBAAwB,EAAE,mBAAmB,QAAQ,CAChE,uBACA,eACF,CAAC;AAED,MAAa,sBAAsB,EAAE,mBAAmB,QAAQ,CAC9D,6BACA,eACF,CAAC;AASD,MAAa,2BAA2B,EAAE,MAAM,CAC9C,EACG,OAAO,CAAC,CACR,WAAW,OAAO,CAAC,CACnB,WAAkC,WAAW;CAC5C,MAAM;CACN,MAAM,MAAM,MAAM,CAAC;AACrB,EAAE,GACJ,EAAE,mBAAmB,QAAQ;CAAC;CAAuB;CAAiB;AAAyB,CAAC,CAClG,CAAC;AAED,MAAa,yBAAyB,EAAE,MAAM,CAC5C,EAAE,OAAO,CAAC,CAAC,WAAgC,UAAU;CACnD,IAAI,MAAM,WAAW,OAAO,GAAG,OAAO;EAAE,MAAM;EAAY,MAAM,MAAM,MAAM,CAAC;CAAE;CAC/E,OAAO;EAAE,MAAM;EAAmB,SAAS;CAAM;AACnD,CAAC,GACD,EAAE,mBAAmB,QAAQ;CAC3B;CACA;CACA;AACF,CAAC,CACH,CAAC"}
@@ -1,8 +1,44 @@
1
- require("./content_types.cjs");
2
- require("./semver.cjs");
3
- require("./content_conversion.cjs");
4
- require("./block_id.cjs");
5
- require("./block_components.cjs");
6
- require("./block_meta.cjs");
7
- require("./block_description.cjs");
8
- require("./block_manifest.cjs");
1
+ const require_content_types = require("./content_types.cjs");
2
+ const require_semver = require("./semver.cjs");
3
+ const require_content_conversion = require("./content_conversion.cjs");
4
+ const require_block_id = require("./block_id.cjs");
5
+ const require_block_components = require("./block_components.cjs");
6
+ const require_block_meta = require("./block_meta.cjs");
7
+ const require_block_description = require("./block_description.cjs");
8
+ const require_block_manifest = require("./block_manifest.cjs");
9
+ exports.BlockComponentsDescriptionRaw = require_block_components.BlockComponentsDescriptionRaw;
10
+ exports.BlockComponentsManifest = require_block_manifest.BlockComponentsManifest;
11
+ exports.BlockPackDescriptionFromPackageJsonRaw = require_block_description.BlockPackDescriptionFromPackageJsonRaw;
12
+ exports.BlockPackDescriptionManifest = require_block_manifest.BlockPackDescriptionManifest;
13
+ exports.BlockPackDescriptionRaw = require_block_description.BlockPackDescriptionRaw;
14
+ exports.BlockPackId = require_block_id.BlockPackId;
15
+ exports.BlockPackIdNoVersion = require_block_id.BlockPackIdNoVersion;
16
+ exports.BlockPackManifest = require_block_manifest.BlockPackManifest;
17
+ exports.BlockPackManifestFile = require_block_manifest.BlockPackManifestFile;
18
+ exports.BlockPackMeta = require_block_meta.BlockPackMeta;
19
+ exports.BlockPackMetaDescriptionRaw = require_block_meta.BlockPackMetaDescriptionRaw;
20
+ exports.BlockPackMetaEmbeddedBase64 = require_block_meta.BlockPackMetaEmbeddedBase64;
21
+ exports.BlockPackMetaEmbeddedBytes = require_block_meta.BlockPackMetaEmbeddedBytes;
22
+ exports.BlockPackMetaManifest = require_block_manifest.BlockPackMetaManifest;
23
+ exports.BlockPlatform = require_block_meta.BlockPlatform;
24
+ exports.ContentExplicitBase64 = require_content_types.ContentExplicitBase64;
25
+ exports.ContentExplicitBytes = require_content_types.ContentExplicitBytes;
26
+ exports.ContentRelative = require_content_types.ContentRelative;
27
+ exports.ContentRelativeBinary = require_content_types.ContentRelativeBinary;
28
+ exports.ContentRelativeText = require_content_types.ContentRelativeText;
29
+ exports.CreateBlockPackDescriptionSchema = require_block_description.CreateBlockPackDescriptionSchema;
30
+ exports.DescriptionContentBinary = require_content_types.DescriptionContentBinary;
31
+ exports.DescriptionContentText = require_content_types.DescriptionContentText;
32
+ exports.FeatureFlags = require_block_description.FeatureFlags;
33
+ exports.ManifestFileInfo = require_block_manifest.ManifestFileInfo;
34
+ exports.SemVer = require_semver.SemVer;
35
+ exports.Sha256Schema = require_block_manifest.Sha256Schema;
36
+ exports.WorkflowSchemaV1 = require_block_components.WorkflowSchemaV1;
37
+ exports.addPrefixToRelative = require_content_conversion.addPrefixToRelative;
38
+ exports.blockPackIdEquals = require_block_id.blockPackIdEquals;
39
+ exports.blockPackIdNoVersionEquals = require_block_id.blockPackIdNoVersionEquals;
40
+ exports.blockPackIdNoVersionToString = require_block_id.blockPackIdNoVersionToString;
41
+ exports.blockPackIdToString = require_block_id.blockPackIdToString;
42
+ exports.mapRemoteToAbsolute = require_content_conversion.mapRemoteToAbsolute;
43
+ exports.overrideDescriptionVersion = require_block_description.overrideDescriptionVersion;
44
+ exports.overrideManifestVersion = require_block_manifest.overrideManifestVersion;
@@ -6,4 +6,5 @@ import { BlockPackId, BlockPackIdNoVersion, blockPackIdEquals, blockPackIdNoVers
6
6
  import { BlockComponents, BlockComponentsDescriptionRaw, Workflow, WorkflowSchemaV1, WorkflowV1 } from "./block_components.js";
7
7
  import { BlockPackMeta, BlockPackMetaDescriptionRaw, BlockPackMetaEmbeddedBase64, BlockPackMetaEmbeddedBytes, BlockPlatform } from "./block_meta.js";
8
8
  import { BlockPackDescription, BlockPackDescriptionFromPackageJsonRaw, BlockPackDescriptionRaw, CreateBlockPackDescriptionSchema, FeatureFlags, overrideDescriptionVersion } from "./block_description.js";
9
- import { BlockComponentsManifest, BlockPackDescriptionManifest, BlockPackManifest, BlockPackManifestFile, BlockPackMetaManifest, ManifestFileInfo, Sha256Schema, overrideManifestVersion } from "./block_manifest.js";
9
+ import { BlockComponentsManifest, BlockPackDescriptionManifest, BlockPackManifest, BlockPackManifestFile, BlockPackMetaManifest, ManifestFileInfo, Sha256Schema, overrideManifestVersion } from "./block_manifest.js";
10
+ export { BlockComponents, BlockComponentsDescriptionRaw, BlockComponentsManifest, BlockPackDescription, BlockPackDescriptionFromPackageJsonRaw, BlockPackDescriptionManifest, BlockPackDescriptionRaw, BlockPackId, BlockPackIdNoVersion, BlockPackManifest, BlockPackManifestFile, BlockPackMeta, BlockPackMetaDescriptionRaw, BlockPackMetaEmbeddedBase64, BlockPackMetaEmbeddedBytes, BlockPackMetaManifest, BlockPlatform, Content, ContentAbsoluteBinaryLocal, ContentAbsoluteFile, ContentAbsoluteFolder, ContentAbsoluteTextLocal, ContentAbsoluteUrl, ContentAnyBinaryLocal, ContentAnyLocal, ContentAnyTextLocal, ContentExplicitBase64, ContentExplicitBytes, ContentExplicitOrRelative, ContentExplicitString, ContentRelative, ContentRelativeBinary, ContentRelativeText, ContentType, ContextType, CreateBlockPackDescriptionSchema, DescriptionContentBinary, DescriptionContentText, FeatureFlags, ManifestFileInfo, SemVer, Sha256Schema, Workflow, WorkflowSchemaV1, WorkflowV1, addPrefixToRelative, blockPackIdEquals, blockPackIdNoVersionEquals, blockPackIdNoVersionToString, blockPackIdToString, mapRemoteToAbsolute, overrideDescriptionVersion, overrideManifestVersion };
@@ -1,8 +1,9 @@
1
- import "./content_types.js";
2
- import "./semver.js";
3
- import "./content_conversion.js";
4
- import "./block_id.js";
5
- import "./block_components.js";
6
- import "./block_meta.js";
7
- import "./block_description.js";
8
- import "./block_manifest.js";
1
+ import { ContentExplicitBase64, ContentExplicitBytes, ContentRelative, ContentRelativeBinary, ContentRelativeText, DescriptionContentBinary, DescriptionContentText } from "./content_types.js";
2
+ import { SemVer } from "./semver.js";
3
+ import { addPrefixToRelative, mapRemoteToAbsolute } from "./content_conversion.js";
4
+ import { BlockPackId, BlockPackIdNoVersion, blockPackIdEquals, blockPackIdNoVersionEquals, blockPackIdNoVersionToString, blockPackIdToString } from "./block_id.js";
5
+ import { BlockComponentsDescriptionRaw, WorkflowSchemaV1 } from "./block_components.js";
6
+ import { BlockPackMeta, BlockPackMetaDescriptionRaw, BlockPackMetaEmbeddedBase64, BlockPackMetaEmbeddedBytes, BlockPlatform } from "./block_meta.js";
7
+ import { BlockPackDescriptionFromPackageJsonRaw, BlockPackDescriptionRaw, CreateBlockPackDescriptionSchema, FeatureFlags, overrideDescriptionVersion } from "./block_description.js";
8
+ import { BlockComponentsManifest, BlockPackDescriptionManifest, BlockPackManifest, BlockPackManifestFile, BlockPackMetaManifest, ManifestFileInfo, Sha256Schema, overrideManifestVersion } from "./block_manifest.js";
9
+ export { BlockComponentsDescriptionRaw, BlockComponentsManifest, BlockPackDescriptionFromPackageJsonRaw, BlockPackDescriptionManifest, BlockPackDescriptionRaw, BlockPackId, BlockPackIdNoVersion, BlockPackManifest, BlockPackManifestFile, BlockPackMeta, BlockPackMetaDescriptionRaw, BlockPackMetaEmbeddedBase64, BlockPackMetaEmbeddedBytes, BlockPackMetaManifest, BlockPlatform, ContentExplicitBase64, ContentExplicitBytes, ContentRelative, ContentRelativeBinary, ContentRelativeText, CreateBlockPackDescriptionSchema, DescriptionContentBinary, DescriptionContentText, FeatureFlags, ManifestFileInfo, SemVer, Sha256Schema, WorkflowSchemaV1, addPrefixToRelative, blockPackIdEquals, blockPackIdNoVersionEquals, blockPackIdNoVersionToString, blockPackIdToString, mapRemoteToAbsolute, overrideDescriptionVersion, overrideManifestVersion };
@@ -1,4 +1,3 @@
1
- require("../_virtual/_rolldown/runtime.cjs");
2
1
  //#region src/block_meta/semver.ts
3
2
  const SemVer = require("zod").z.string().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/, "Wrong version format, please use valid semver");
4
3
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"semver.cjs","names":["z"],"sources":["../../src/block_meta/semver.ts"],"sourcesContent":["import { z } from \"zod\";\n\n// Regex taken from here:\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nexport const SemVer = z\n .string()\n .regex(\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/,\n \"Wrong version format, please use valid semver\",\n );\n"],"mappings":";;AAIA,MAAa,wBAASA,EACnB,QAAQ,CACR,MACC,uLACA,gDACD"}
1
+ {"version":3,"file":"semver.cjs","names":["z"],"sources":["../../src/block_meta/semver.ts"],"sourcesContent":["import { z } from \"zod\";\n\n// Regex taken from here:\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nexport const SemVer = z\n .string()\n .regex(\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/,\n \"Wrong version format, please use valid semver\",\n );\n"],"mappings":";AAIA,MAAa,sBAASA,CAAAA,CAAAA,EACnB,OAAO,CAAC,CACR,MACC,uLACA,+CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"semver.d.ts","names":[],"sources":["../../src/block_meta/semver.ts"],"mappings":";;;cAIa,MAAA,EAAM,CAAA,CAAA,SAAA"}
1
+ {"version":3,"file":"semver.d.ts","names":[],"sources":["../../src/block_meta/semver.ts"],"mappings":";;;cAIa,MAAA,EAAM,CAAA,CAAA,SAKhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"semver.js","names":[],"sources":["../../src/block_meta/semver.ts"],"sourcesContent":["import { z } from \"zod\";\n\n// Regex taken from here:\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nexport const SemVer = z\n .string()\n .regex(\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/,\n \"Wrong version format, please use valid semver\",\n );\n"],"mappings":";;AAIA,MAAa,SAAS,EACnB,QAAQ,CACR,MACC,uLACA,gDACD"}
1
+ {"version":3,"file":"semver.js","names":[],"sources":["../../src/block_meta/semver.ts"],"sourcesContent":["import { z } from \"zod\";\n\n// Regex taken from here:\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nexport const SemVer = z\n .string()\n .regex(\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/,\n \"Wrong version format, please use valid semver\",\n );\n"],"mappings":";;AAIA,MAAa,SAAS,EACnB,OAAO,CAAC,CACR,MACC,uLACA,+CACF"}
@@ -1,4 +1,3 @@
1
- require("../_virtual/_rolldown/runtime.cjs");
2
1
  const require_block_id = require("../block_meta/block_id.cjs");
3
2
  require("../block_meta/index.cjs");
4
3
  let zod = require("zod");
@@ -16,6 +15,29 @@ const BlockPackDevV2 = zod.z.object({
16
15
  folder: zod.z.string(),
17
16
  mtime: zod.z.string().optional()
18
17
  });
18
+ /** Block pack consumed from an npm-installed package's `block-pack/` folder
19
+ * (manifest + ui.tgz). Emitted by the facade's engine-generated BlockPointer.
20
+ * Self-describes its pack location (`packUrl`, `rootUrl`) rather than carrying
21
+ * `dev-v2`'s `folder`. */
22
+ const BlockPackFromPackV2 = zod.z.object({
23
+ type: zod.z.literal("from-pack-v2"),
24
+ /** `file:` URL of the block-pack directory itself — it directly contains
25
+ * `manifest.json`, `ui.tgz`, `model.json`, `published.json`, … This is a URL,
26
+ * NOT a filesystem path: the facade emits a lossless OS-agnostic locator and
27
+ * stays dependency-free; each consumer converts at its own edge with
28
+ * `fileURLToPath` (in Node). Consumers MUST read artifacts from here and MUST
29
+ * NOT reconstruct `<root>/block-pack`: the pointer travels with the block at
30
+ * its build-time SDK version, and a consumer at a different version cannot
31
+ * know a layout the structurer may relocate. `type` versions the within-pack
32
+ * format — if that changes, the discriminator bumps (`from-pack-v3`). */
33
+ packUrl: zod.z.string(),
34
+ /** `file:` URL of the facade/package root — the parent that holds the pack
35
+ * directory plus root-level siblings (e.g. `package.json`). A URL, not a path
36
+ * (convert with `fileURLToPath` at the edge). Always emitted when built from a
37
+ * block; optional because a future bare block-pack may ship with no root. */
38
+ rootUrl: zod.z.string().optional(),
39
+ mtime: zod.z.string().optional()
40
+ });
19
41
  /**
20
42
  * Block pack from registry with version 2 layout, to be loaded directly
21
43
  * from the client.
@@ -38,12 +60,14 @@ const BlockPackFromRegistryV2 = zod.z.object({
38
60
  const BlockPackSpec = zod.z.discriminatedUnion("type", [
39
61
  BlockPackDevV1,
40
62
  BlockPackDevV2,
63
+ BlockPackFromPackV2,
41
64
  BlockPackFromRegistryV1,
42
65
  BlockPackFromRegistryV2
43
66
  ]);
44
67
  //#endregion
45
68
  exports.BlockPackDevV1 = BlockPackDevV1;
46
69
  exports.BlockPackDevV2 = BlockPackDevV2;
70
+ exports.BlockPackFromPackV2 = BlockPackFromPackV2;
47
71
  exports.BlockPackFromRegistryV1 = BlockPackFromRegistryV1;
48
72
  exports.BlockPackFromRegistryV2 = BlockPackFromRegistryV2;
49
73
  exports.BlockPackSpec = BlockPackSpec;
@@ -1 +1 @@
1
- {"version":3,"file":"block_pack_spec.cjs","names":["z","BlockPackId"],"sources":["../../src/block_registry/block_pack_spec.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { BlockPackId } from \"../block_meta\";\n\n/** Block pack from local folder, to be used during block development. Old layout.\n * @deprecated don't use */\nexport const BlockPackDevV1 = z.object({\n type: z.literal(\"dev-v1\"),\n folder: z.string(),\n mtime: z.string().optional(),\n});\n/** @deprecated don't use */\nexport type BlockPackDevV1 = z.infer<typeof BlockPackDevV1>;\n\n/** Block pack from local folder, to be used during block development. New layout. */\nexport const BlockPackDevV2 = z.object({\n type: z.literal(\"dev-v2\"),\n folder: z.string(),\n mtime: z.string().optional(),\n});\nexport type BlockPackDevV2 = z.infer<typeof BlockPackDevV2>;\n\n/**\n * Block pack from registry with version 2 layout, to be loaded directly\n * from the client.\n * @deprecated don't use\n * */\nexport const BlockPackFromRegistryV1 = z.object({\n type: z.literal(\"from-registry-v1\"),\n registryUrl: z.string(),\n id: BlockPackId,\n});\n/** @deprecated don't use */\nexport type BlockPackFromRegistryV1 = z.infer<typeof BlockPackFromRegistryV1>;\n\n/** Block pack from registry with version 2 layout, to be loaded directly\n * from the client. */\nexport const BlockPackFromRegistryV2 = z.object({\n type: z.literal(\"from-registry-v2\"),\n registryUrl: z.string(),\n id: BlockPackId,\n channel: z.string().optional(),\n});\nexport type BlockPackFromRegistryV2 = z.infer<typeof BlockPackFromRegistryV2>;\n\n/** Information about block origin, can be used to instantiate new blocks */\nexport const BlockPackSpec = z.discriminatedUnion(\"type\", [\n BlockPackDevV1,\n BlockPackDevV2,\n BlockPackFromRegistryV1,\n BlockPackFromRegistryV2,\n]);\nexport type BlockPackSpec = z.infer<typeof BlockPackSpec>;\n"],"mappings":";;;;;;;AAKA,MAAa,iBAAiBA,IAAAA,EAAE,OAAO;CACrC,MAAMA,IAAAA,EAAE,QAAQ,SAAS;CACzB,QAAQA,IAAAA,EAAE,QAAQ;CAClB,OAAOA,IAAAA,EAAE,QAAQ,CAAC,UAAU;CAC7B,CAAC;;AAKF,MAAa,iBAAiBA,IAAAA,EAAE,OAAO;CACrC,MAAMA,IAAAA,EAAE,QAAQ,SAAS;CACzB,QAAQA,IAAAA,EAAE,QAAQ;CAClB,OAAOA,IAAAA,EAAE,QAAQ,CAAC,UAAU;CAC7B,CAAC;;;;;;AAQF,MAAa,0BAA0BA,IAAAA,EAAE,OAAO;CAC9C,MAAMA,IAAAA,EAAE,QAAQ,mBAAmB;CACnC,aAAaA,IAAAA,EAAE,QAAQ;CACvB,IAAIC,iBAAAA;CACL,CAAC;;;AAMF,MAAa,0BAA0BD,IAAAA,EAAE,OAAO;CAC9C,MAAMA,IAAAA,EAAE,QAAQ,mBAAmB;CACnC,aAAaA,IAAAA,EAAE,QAAQ;CACvB,IAAIC,iBAAAA;CACJ,SAASD,IAAAA,EAAE,QAAQ,CAAC,UAAU;CAC/B,CAAC;;AAIF,MAAa,gBAAgBA,IAAAA,EAAE,mBAAmB,QAAQ;CACxD;CACA;CACA;CACA;CACD,CAAC"}
1
+ {"version":3,"file":"block_pack_spec.cjs","names":["z","BlockPackId"],"sources":["../../src/block_registry/block_pack_spec.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { BlockPackId } from \"../block_meta\";\n\n/** Block pack from local folder, to be used during block development. Old layout.\n * @deprecated don't use */\nexport const BlockPackDevV1 = z.object({\n type: z.literal(\"dev-v1\"),\n folder: z.string(),\n mtime: z.string().optional(),\n});\n/** @deprecated don't use */\nexport type BlockPackDevV1 = z.infer<typeof BlockPackDevV1>;\n\n/** Block pack from local folder, to be used during block development. New layout. */\nexport const BlockPackDevV2 = z.object({\n type: z.literal(\"dev-v2\"),\n folder: z.string(),\n mtime: z.string().optional(),\n});\nexport type BlockPackDevV2 = z.infer<typeof BlockPackDevV2>;\n\n/** Block pack consumed from an npm-installed package's `block-pack/` folder\n * (manifest + ui.tgz). Emitted by the facade's engine-generated BlockPointer.\n * Self-describes its pack location (`packUrl`, `rootUrl`) rather than carrying\n * `dev-v2`'s `folder`. */\nexport const BlockPackFromPackV2 = z.object({\n type: z.literal(\"from-pack-v2\"),\n /** `file:` URL of the block-pack directory itself — it directly contains\n * `manifest.json`, `ui.tgz`, `model.json`, `published.json`, … This is a URL,\n * NOT a filesystem path: the facade emits a lossless OS-agnostic locator and\n * stays dependency-free; each consumer converts at its own edge with\n * `fileURLToPath` (in Node). Consumers MUST read artifacts from here and MUST\n * NOT reconstruct `<root>/block-pack`: the pointer travels with the block at\n * its build-time SDK version, and a consumer at a different version cannot\n * know a layout the structurer may relocate. `type` versions the within-pack\n * format — if that changes, the discriminator bumps (`from-pack-v3`). */\n packUrl: z.string(),\n /** `file:` URL of the facade/package root — the parent that holds the pack\n * directory plus root-level siblings (e.g. `package.json`). A URL, not a path\n * (convert with `fileURLToPath` at the edge). Always emitted when built from a\n * block; optional because a future bare block-pack may ship with no root. */\n rootUrl: z.string().optional(),\n mtime: z.string().optional(),\n});\nexport type BlockPackFromPackV2 = z.infer<typeof BlockPackFromPackV2>;\n\n/**\n * Block pack from registry with version 2 layout, to be loaded directly\n * from the client.\n * @deprecated don't use\n * */\nexport const BlockPackFromRegistryV1 = z.object({\n type: z.literal(\"from-registry-v1\"),\n registryUrl: z.string(),\n id: BlockPackId,\n});\n/** @deprecated don't use */\nexport type BlockPackFromRegistryV1 = z.infer<typeof BlockPackFromRegistryV1>;\n\n/** Block pack from registry with version 2 layout, to be loaded directly\n * from the client. */\nexport const BlockPackFromRegistryV2 = z.object({\n type: z.literal(\"from-registry-v2\"),\n registryUrl: z.string(),\n id: BlockPackId,\n channel: z.string().optional(),\n});\nexport type BlockPackFromRegistryV2 = z.infer<typeof BlockPackFromRegistryV2>;\n\n/** Information about block origin, can be used to instantiate new blocks */\nexport const BlockPackSpec = z.discriminatedUnion(\"type\", [\n BlockPackDevV1,\n BlockPackDevV2,\n BlockPackFromPackV2,\n BlockPackFromRegistryV1,\n BlockPackFromRegistryV2,\n]);\nexport type BlockPackSpec = z.infer<typeof BlockPackSpec>;\n"],"mappings":";;;;;;AAKA,MAAa,iBAAiBA,IAAAA,EAAE,OAAO;CACrC,MAAMA,IAAAA,EAAE,QAAQ,QAAQ;CACxB,QAAQA,IAAAA,EAAE,OAAO;CACjB,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;AAC7B,CAAC;;AAKD,MAAa,iBAAiBA,IAAAA,EAAE,OAAO;CACrC,MAAMA,IAAAA,EAAE,QAAQ,QAAQ;CACxB,QAAQA,IAAAA,EAAE,OAAO;CACjB,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;AAC7B,CAAC;;;;;AAOD,MAAa,sBAAsBA,IAAAA,EAAE,OAAO;CAC1C,MAAMA,IAAAA,EAAE,QAAQ,cAAc;;;;;;;;;;CAU9B,SAASA,IAAAA,EAAE,OAAO;;;;;CAKlB,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;CAC7B,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;AAC7B,CAAC;;;;;;AAQD,MAAa,0BAA0BA,IAAAA,EAAE,OAAO;CAC9C,MAAMA,IAAAA,EAAE,QAAQ,kBAAkB;CAClC,aAAaA,IAAAA,EAAE,OAAO;CACtB,IAAIC,iBAAAA;AACN,CAAC;;;AAMD,MAAa,0BAA0BD,IAAAA,EAAE,OAAO;CAC9C,MAAMA,IAAAA,EAAE,QAAQ,kBAAkB;CAClC,aAAaA,IAAAA,EAAE,OAAO;CACtB,IAAIC,iBAAAA;CACJ,SAASD,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS;AAC/B,CAAC;;AAID,MAAa,gBAAgBA,IAAAA,EAAE,mBAAmB,QAAQ;CACxD;CACA;CACA;CACA;CACA;AACF,CAAC"}
@@ -33,6 +33,40 @@ declare const BlockPackDevV2: z.ZodObject<{
33
33
  mtime?: string | undefined;
34
34
  }>;
35
35
  type BlockPackDevV2 = z.infer<typeof BlockPackDevV2>;
36
+ /** Block pack consumed from an npm-installed package's `block-pack/` folder
37
+ * (manifest + ui.tgz). Emitted by the facade's engine-generated BlockPointer.
38
+ * Self-describes its pack location (`packUrl`, `rootUrl`) rather than carrying
39
+ * `dev-v2`'s `folder`. */
40
+ declare const BlockPackFromPackV2: z.ZodObject<{
41
+ type: z.ZodLiteral<"from-pack-v2">;
42
+ /** `file:` URL of the block-pack directory itself — it directly contains
43
+ * `manifest.json`, `ui.tgz`, `model.json`, `published.json`, … This is a URL,
44
+ * NOT a filesystem path: the facade emits a lossless OS-agnostic locator and
45
+ * stays dependency-free; each consumer converts at its own edge with
46
+ * `fileURLToPath` (in Node). Consumers MUST read artifacts from here and MUST
47
+ * NOT reconstruct `<root>/block-pack`: the pointer travels with the block at
48
+ * its build-time SDK version, and a consumer at a different version cannot
49
+ * know a layout the structurer may relocate. `type` versions the within-pack
50
+ * format — if that changes, the discriminator bumps (`from-pack-v3`). */
51
+ packUrl: z.ZodString;
52
+ /** `file:` URL of the facade/package root — the parent that holds the pack
53
+ * directory plus root-level siblings (e.g. `package.json`). A URL, not a path
54
+ * (convert with `fileURLToPath` at the edge). Always emitted when built from a
55
+ * block; optional because a future bare block-pack may ship with no root. */
56
+ rootUrl: z.ZodOptional<z.ZodString>;
57
+ mtime: z.ZodOptional<z.ZodString>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ type: "from-pack-v2";
60
+ packUrl: string;
61
+ mtime?: string | undefined;
62
+ rootUrl?: string | undefined;
63
+ }, {
64
+ type: "from-pack-v2";
65
+ packUrl: string;
66
+ mtime?: string | undefined;
67
+ rootUrl?: string | undefined;
68
+ }>;
69
+ type BlockPackFromPackV2 = z.infer<typeof BlockPackFromPackV2>;
36
70
  /**
37
71
  * Block pack from registry with version 2 layout, to be loaded directly
38
72
  * from the client.
@@ -137,6 +171,34 @@ declare const BlockPackSpec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
137
171
  type: "dev-v2";
138
172
  folder: string;
139
173
  mtime?: string | undefined;
174
+ }>, z.ZodObject<{
175
+ type: z.ZodLiteral<"from-pack-v2">;
176
+ /** `file:` URL of the block-pack directory itself — it directly contains
177
+ * `manifest.json`, `ui.tgz`, `model.json`, `published.json`, … This is a URL,
178
+ * NOT a filesystem path: the facade emits a lossless OS-agnostic locator and
179
+ * stays dependency-free; each consumer converts at its own edge with
180
+ * `fileURLToPath` (in Node). Consumers MUST read artifacts from here and MUST
181
+ * NOT reconstruct `<root>/block-pack`: the pointer travels with the block at
182
+ * its build-time SDK version, and a consumer at a different version cannot
183
+ * know a layout the structurer may relocate. `type` versions the within-pack
184
+ * format — if that changes, the discriminator bumps (`from-pack-v3`). */
185
+ packUrl: z.ZodString;
186
+ /** `file:` URL of the facade/package root — the parent that holds the pack
187
+ * directory plus root-level siblings (e.g. `package.json`). A URL, not a path
188
+ * (convert with `fileURLToPath` at the edge). Always emitted when built from a
189
+ * block; optional because a future bare block-pack may ship with no root. */
190
+ rootUrl: z.ZodOptional<z.ZodString>;
191
+ mtime: z.ZodOptional<z.ZodString>;
192
+ }, "strip", z.ZodTypeAny, {
193
+ type: "from-pack-v2";
194
+ packUrl: string;
195
+ mtime?: string | undefined;
196
+ rootUrl?: string | undefined;
197
+ }, {
198
+ type: "from-pack-v2";
199
+ packUrl: string;
200
+ mtime?: string | undefined;
201
+ rootUrl?: string | undefined;
140
202
  }>, z.ZodObject<{
141
203
  type: z.ZodLiteral<"from-registry-v1">;
142
204
  registryUrl: z.ZodString;
@@ -207,5 +269,5 @@ declare const BlockPackSpec: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
207
269
  }>]>;
208
270
  type BlockPackSpec = z.infer<typeof BlockPackSpec>;
209
271
  //#endregion
210
- export { BlockPackDevV1, BlockPackDevV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackSpec };
272
+ export { BlockPackDevV1, BlockPackDevV2, BlockPackFromPackV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackSpec };
211
273
  //# sourceMappingURL=block_pack_spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"block_pack_spec.d.ts","names":[],"sources":["../../src/block_registry/block_pack_spec.ts"],"mappings":";;;;;cAKa,cAAA,EAAc,CAAA,CAAA,SAAA;;;;;;;;;;;;;;KAMf,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,cAAA;;cAG/B,cAAA,EAAc,CAAA,CAAA,SAAA;;;;;;;;;;;;;KAKf,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,cAAA;;;;;AAR5C;cAea,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAMxB,uBAAA,GAA0B,CAAA,CAAE,KAAA,QAAa,uBAAA;;;cAIxC,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAMxB,uBAAA,GAA0B,CAAA,CAAE,KAAA,QAAa,uBAAA;;cAGxC,aAAA,EAAa,CAAA,CAAA,qBAAA,UAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAMd,aAAA,GAAgB,CAAA,CAAE,KAAA,QAAa,aAAA"}
1
+ {"version":3,"file":"block_pack_spec.d.ts","names":[],"sources":["../../src/block_registry/block_pack_spec.ts"],"mappings":";;;;;cAKa,cAAA,EAAc,CAAA,CAAA,SAAA;;;;;;;;;;;;;;KAMf,cAAA,GAAiB,CAAA,CAAE,KAAK,QAAQ,cAAA;;cAG/B,cAAA,EAAc,CAAA,CAAA,SAAA;;;;;;;;;;;;;KAKf,cAAA,GAAiB,CAAA,CAAE,KAAK,QAAQ,cAAA;;;;;cAM/B,mBAAA,EAAmB,CAAA,CAAA,SAAA;;;;;;;;AAd0B;AAG1D;;;;;;;;;;;;;;;;;;;;KA8BY,mBAAA,GAAsB,CAAA,CAAE,KAAK,QAAQ,mBAAA;;;;;;cAOpC,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAMxB,uBAAA,GAA0B,CAAA,CAAE,KAAK,QAAQ,uBAAA;;;cAIxC,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAMxB,uBAAA,GAA0B,CAAA,CAAE,KAAK,QAAQ,uBAAA;;cAGxC,aAAA,EAAa,CAAA,CAAA,qBAAA,UAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAOd,aAAA,GAAgB,CAAA,CAAE,KAAK,QAAQ,aAAA"}
@@ -15,6 +15,29 @@ const BlockPackDevV2 = z.object({
15
15
  folder: z.string(),
16
16
  mtime: z.string().optional()
17
17
  });
18
+ /** Block pack consumed from an npm-installed package's `block-pack/` folder
19
+ * (manifest + ui.tgz). Emitted by the facade's engine-generated BlockPointer.
20
+ * Self-describes its pack location (`packUrl`, `rootUrl`) rather than carrying
21
+ * `dev-v2`'s `folder`. */
22
+ const BlockPackFromPackV2 = z.object({
23
+ type: z.literal("from-pack-v2"),
24
+ /** `file:` URL of the block-pack directory itself — it directly contains
25
+ * `manifest.json`, `ui.tgz`, `model.json`, `published.json`, … This is a URL,
26
+ * NOT a filesystem path: the facade emits a lossless OS-agnostic locator and
27
+ * stays dependency-free; each consumer converts at its own edge with
28
+ * `fileURLToPath` (in Node). Consumers MUST read artifacts from here and MUST
29
+ * NOT reconstruct `<root>/block-pack`: the pointer travels with the block at
30
+ * its build-time SDK version, and a consumer at a different version cannot
31
+ * know a layout the structurer may relocate. `type` versions the within-pack
32
+ * format — if that changes, the discriminator bumps (`from-pack-v3`). */
33
+ packUrl: z.string(),
34
+ /** `file:` URL of the facade/package root — the parent that holds the pack
35
+ * directory plus root-level siblings (e.g. `package.json`). A URL, not a path
36
+ * (convert with `fileURLToPath` at the edge). Always emitted when built from a
37
+ * block; optional because a future bare block-pack may ship with no root. */
38
+ rootUrl: z.string().optional(),
39
+ mtime: z.string().optional()
40
+ });
18
41
  /**
19
42
  * Block pack from registry with version 2 layout, to be loaded directly
20
43
  * from the client.
@@ -37,10 +60,11 @@ const BlockPackFromRegistryV2 = z.object({
37
60
  const BlockPackSpec = z.discriminatedUnion("type", [
38
61
  BlockPackDevV1,
39
62
  BlockPackDevV2,
63
+ BlockPackFromPackV2,
40
64
  BlockPackFromRegistryV1,
41
65
  BlockPackFromRegistryV2
42
66
  ]);
43
67
  //#endregion
44
- export { BlockPackDevV1, BlockPackDevV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackSpec };
68
+ export { BlockPackDevV1, BlockPackDevV2, BlockPackFromPackV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackSpec };
45
69
 
46
70
  //# sourceMappingURL=block_pack_spec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"block_pack_spec.js","names":[],"sources":["../../src/block_registry/block_pack_spec.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { BlockPackId } from \"../block_meta\";\n\n/** Block pack from local folder, to be used during block development. Old layout.\n * @deprecated don't use */\nexport const BlockPackDevV1 = z.object({\n type: z.literal(\"dev-v1\"),\n folder: z.string(),\n mtime: z.string().optional(),\n});\n/** @deprecated don't use */\nexport type BlockPackDevV1 = z.infer<typeof BlockPackDevV1>;\n\n/** Block pack from local folder, to be used during block development. New layout. */\nexport const BlockPackDevV2 = z.object({\n type: z.literal(\"dev-v2\"),\n folder: z.string(),\n mtime: z.string().optional(),\n});\nexport type BlockPackDevV2 = z.infer<typeof BlockPackDevV2>;\n\n/**\n * Block pack from registry with version 2 layout, to be loaded directly\n * from the client.\n * @deprecated don't use\n * */\nexport const BlockPackFromRegistryV1 = z.object({\n type: z.literal(\"from-registry-v1\"),\n registryUrl: z.string(),\n id: BlockPackId,\n});\n/** @deprecated don't use */\nexport type BlockPackFromRegistryV1 = z.infer<typeof BlockPackFromRegistryV1>;\n\n/** Block pack from registry with version 2 layout, to be loaded directly\n * from the client. */\nexport const BlockPackFromRegistryV2 = z.object({\n type: z.literal(\"from-registry-v2\"),\n registryUrl: z.string(),\n id: BlockPackId,\n channel: z.string().optional(),\n});\nexport type BlockPackFromRegistryV2 = z.infer<typeof BlockPackFromRegistryV2>;\n\n/** Information about block origin, can be used to instantiate new blocks */\nexport const BlockPackSpec = z.discriminatedUnion(\"type\", [\n BlockPackDevV1,\n BlockPackDevV2,\n BlockPackFromRegistryV1,\n BlockPackFromRegistryV2,\n]);\nexport type BlockPackSpec = z.infer<typeof BlockPackSpec>;\n"],"mappings":";;;;;;AAKA,MAAa,iBAAiB,EAAE,OAAO;CACrC,MAAM,EAAE,QAAQ,SAAS;CACzB,QAAQ,EAAE,QAAQ;CAClB,OAAO,EAAE,QAAQ,CAAC,UAAU;CAC7B,CAAC;;AAKF,MAAa,iBAAiB,EAAE,OAAO;CACrC,MAAM,EAAE,QAAQ,SAAS;CACzB,QAAQ,EAAE,QAAQ;CAClB,OAAO,EAAE,QAAQ,CAAC,UAAU;CAC7B,CAAC;;;;;;AAQF,MAAa,0BAA0B,EAAE,OAAO;CAC9C,MAAM,EAAE,QAAQ,mBAAmB;CACnC,aAAa,EAAE,QAAQ;CACvB,IAAI;CACL,CAAC;;;AAMF,MAAa,0BAA0B,EAAE,OAAO;CAC9C,MAAM,EAAE,QAAQ,mBAAmB;CACnC,aAAa,EAAE,QAAQ;CACvB,IAAI;CACJ,SAAS,EAAE,QAAQ,CAAC,UAAU;CAC/B,CAAC;;AAIF,MAAa,gBAAgB,EAAE,mBAAmB,QAAQ;CACxD;CACA;CACA;CACA;CACD,CAAC"}
1
+ {"version":3,"file":"block_pack_spec.js","names":[],"sources":["../../src/block_registry/block_pack_spec.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { BlockPackId } from \"../block_meta\";\n\n/** Block pack from local folder, to be used during block development. Old layout.\n * @deprecated don't use */\nexport const BlockPackDevV1 = z.object({\n type: z.literal(\"dev-v1\"),\n folder: z.string(),\n mtime: z.string().optional(),\n});\n/** @deprecated don't use */\nexport type BlockPackDevV1 = z.infer<typeof BlockPackDevV1>;\n\n/** Block pack from local folder, to be used during block development. New layout. */\nexport const BlockPackDevV2 = z.object({\n type: z.literal(\"dev-v2\"),\n folder: z.string(),\n mtime: z.string().optional(),\n});\nexport type BlockPackDevV2 = z.infer<typeof BlockPackDevV2>;\n\n/** Block pack consumed from an npm-installed package's `block-pack/` folder\n * (manifest + ui.tgz). Emitted by the facade's engine-generated BlockPointer.\n * Self-describes its pack location (`packUrl`, `rootUrl`) rather than carrying\n * `dev-v2`'s `folder`. */\nexport const BlockPackFromPackV2 = z.object({\n type: z.literal(\"from-pack-v2\"),\n /** `file:` URL of the block-pack directory itself — it directly contains\n * `manifest.json`, `ui.tgz`, `model.json`, `published.json`, … This is a URL,\n * NOT a filesystem path: the facade emits a lossless OS-agnostic locator and\n * stays dependency-free; each consumer converts at its own edge with\n * `fileURLToPath` (in Node). Consumers MUST read artifacts from here and MUST\n * NOT reconstruct `<root>/block-pack`: the pointer travels with the block at\n * its build-time SDK version, and a consumer at a different version cannot\n * know a layout the structurer may relocate. `type` versions the within-pack\n * format — if that changes, the discriminator bumps (`from-pack-v3`). */\n packUrl: z.string(),\n /** `file:` URL of the facade/package root — the parent that holds the pack\n * directory plus root-level siblings (e.g. `package.json`). A URL, not a path\n * (convert with `fileURLToPath` at the edge). Always emitted when built from a\n * block; optional because a future bare block-pack may ship with no root. */\n rootUrl: z.string().optional(),\n mtime: z.string().optional(),\n});\nexport type BlockPackFromPackV2 = z.infer<typeof BlockPackFromPackV2>;\n\n/**\n * Block pack from registry with version 2 layout, to be loaded directly\n * from the client.\n * @deprecated don't use\n * */\nexport const BlockPackFromRegistryV1 = z.object({\n type: z.literal(\"from-registry-v1\"),\n registryUrl: z.string(),\n id: BlockPackId,\n});\n/** @deprecated don't use */\nexport type BlockPackFromRegistryV1 = z.infer<typeof BlockPackFromRegistryV1>;\n\n/** Block pack from registry with version 2 layout, to be loaded directly\n * from the client. */\nexport const BlockPackFromRegistryV2 = z.object({\n type: z.literal(\"from-registry-v2\"),\n registryUrl: z.string(),\n id: BlockPackId,\n channel: z.string().optional(),\n});\nexport type BlockPackFromRegistryV2 = z.infer<typeof BlockPackFromRegistryV2>;\n\n/** Information about block origin, can be used to instantiate new blocks */\nexport const BlockPackSpec = z.discriminatedUnion(\"type\", [\n BlockPackDevV1,\n BlockPackDevV2,\n BlockPackFromPackV2,\n BlockPackFromRegistryV1,\n BlockPackFromRegistryV2,\n]);\nexport type BlockPackSpec = z.infer<typeof BlockPackSpec>;\n"],"mappings":";;;;;;AAKA,MAAa,iBAAiB,EAAE,OAAO;CACrC,MAAM,EAAE,QAAQ,QAAQ;CACxB,QAAQ,EAAE,OAAO;CACjB,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS;AAC7B,CAAC;;AAKD,MAAa,iBAAiB,EAAE,OAAO;CACrC,MAAM,EAAE,QAAQ,QAAQ;CACxB,QAAQ,EAAE,OAAO;CACjB,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS;AAC7B,CAAC;;;;;AAOD,MAAa,sBAAsB,EAAE,OAAO;CAC1C,MAAM,EAAE,QAAQ,cAAc;;;;;;;;;;CAU9B,SAAS,EAAE,OAAO;;;;;CAKlB,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS;CAC7B,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS;AAC7B,CAAC;;;;;;AAQD,MAAa,0BAA0B,EAAE,OAAO;CAC9C,MAAM,EAAE,QAAQ,kBAAkB;CAClC,aAAa,EAAE,OAAO;CACtB,IAAI;AACN,CAAC;;;AAMD,MAAa,0BAA0B,EAAE,OAAO;CAC9C,MAAM,EAAE,QAAQ,kBAAkB;CAClC,aAAa,EAAE,OAAO;CACtB,IAAI;CACJ,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS;AAC/B,CAAC;;AAID,MAAa,gBAAgB,EAAE,mBAAmB,QAAQ;CACxD;CACA;CACA;CACA;CACA;AACF,CAAC"}
@@ -1,3 +1,26 @@
1
- require("./block_pack_spec.cjs");
2
- require("./registry_spec.cjs");
3
- require("./overview.cjs");
1
+ const require_block_pack_spec = require("./block_pack_spec.cjs");
2
+ const require_registry_spec = require("./registry_spec.cjs");
3
+ const require_overview = require("./overview.cjs");
4
+ exports.AnyChannel = require_overview.AnyChannel;
5
+ exports.BlockPackDevV1 = require_block_pack_spec.BlockPackDevV1;
6
+ exports.BlockPackDevV2 = require_block_pack_spec.BlockPackDevV2;
7
+ exports.BlockPackFromPackV2 = require_block_pack_spec.BlockPackFromPackV2;
8
+ exports.BlockPackFromRegistryV1 = require_block_pack_spec.BlockPackFromRegistryV1;
9
+ exports.BlockPackFromRegistryV2 = require_block_pack_spec.BlockPackFromRegistryV2;
10
+ exports.BlockPackListing = require_overview.BlockPackListing;
11
+ exports.BlockPackOverview = require_overview.BlockPackOverview;
12
+ exports.BlockPackOverviewLegacy = require_overview.BlockPackOverviewLegacy;
13
+ exports.BlockPackOverviewNoRegistryId = require_overview.BlockPackOverviewNoRegistryId;
14
+ exports.BlockPackOverviewRaw = require_overview.BlockPackOverviewRaw;
15
+ exports.BlockPackSpec = require_block_pack_spec.BlockPackSpec;
16
+ exports.LocalDevFolder = require_registry_spec.LocalDevFolder;
17
+ exports.RegistryEntry = require_registry_spec.RegistryEntry;
18
+ exports.RegistryList = require_registry_spec.RegistryList;
19
+ exports.RegistrySpec = require_registry_spec.RegistrySpec;
20
+ exports.RegistryStatus = require_overview.RegistryStatus;
21
+ exports.RemoteRegistryV1Spec = require_registry_spec.RemoteRegistryV1Spec;
22
+ exports.RemoteRegistryV2Spec = require_registry_spec.RemoteRegistryV2Spec;
23
+ exports.SingleBlockPackOverview = require_overview.SingleBlockPackOverview;
24
+ exports.StableChannel = require_overview.StableChannel;
25
+ exports.VersionWithChannels = require_overview.VersionWithChannels;
26
+ exports.blockPackOverviewToLegacy = require_overview.blockPackOverviewToLegacy;
@@ -1,3 +1,4 @@
1
- import { BlockPackDevV1, BlockPackDevV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackSpec } from "./block_pack_spec.js";
1
+ import { BlockPackDevV1, BlockPackDevV2, BlockPackFromPackV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackSpec } from "./block_pack_spec.js";
2
2
  import { AnyChannel, BlockPackListing, BlockPackOverview, BlockPackOverviewLegacy, BlockPackOverviewNoRegistryId, BlockPackOverviewRaw, RegistryStatus, SingleBlockPackOverview, StableChannel, VersionWithChannels, blockPackOverviewToLegacy } from "./overview.js";
3
- import { LocalDevFolder, RegistryEntry, RegistryList, RegistrySpec, RemoteRegistryV1Spec, RemoteRegistryV2Spec } from "./registry_spec.js";
3
+ import { LocalDevFolder, RegistryEntry, RegistryList, RegistrySpec, RemoteRegistryV1Spec, RemoteRegistryV2Spec } from "./registry_spec.js";
4
+ export { AnyChannel, BlockPackDevV1, BlockPackDevV2, BlockPackFromPackV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackListing, BlockPackOverview, BlockPackOverviewLegacy, BlockPackOverviewNoRegistryId, BlockPackOverviewRaw, BlockPackSpec, LocalDevFolder, RegistryEntry, RegistryList, RegistrySpec, RegistryStatus, RemoteRegistryV1Spec, RemoteRegistryV2Spec, SingleBlockPackOverview, StableChannel, VersionWithChannels, blockPackOverviewToLegacy };
@@ -1,3 +1,4 @@
1
- import "./block_pack_spec.js";
2
- import "./registry_spec.js";
3
- import "./overview.js";
1
+ import { BlockPackDevV1, BlockPackDevV2, BlockPackFromPackV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackSpec } from "./block_pack_spec.js";
2
+ import { LocalDevFolder, RegistryEntry, RegistryList, RegistrySpec, RemoteRegistryV1Spec, RemoteRegistryV2Spec } from "./registry_spec.js";
3
+ import { AnyChannel, BlockPackListing, BlockPackOverview, BlockPackOverviewLegacy, BlockPackOverviewNoRegistryId, BlockPackOverviewRaw, RegistryStatus, SingleBlockPackOverview, StableChannel, VersionWithChannels, blockPackOverviewToLegacy } from "./overview.js";
4
+ export { AnyChannel, BlockPackDevV1, BlockPackDevV2, BlockPackFromPackV2, BlockPackFromRegistryV1, BlockPackFromRegistryV2, BlockPackListing, BlockPackOverview, BlockPackOverviewLegacy, BlockPackOverviewNoRegistryId, BlockPackOverviewRaw, BlockPackSpec, LocalDevFolder, RegistryEntry, RegistryList, RegistrySpec, RegistryStatus, RemoteRegistryV1Spec, RemoteRegistryV2Spec, SingleBlockPackOverview, StableChannel, VersionWithChannels, blockPackOverviewToLegacy };
@@ -1,4 +1,3 @@
1
- require("../_virtual/_rolldown/runtime.cjs");
2
1
  const require_semver = require("../block_meta/semver.cjs");
3
2
  const require_block_id = require("../block_meta/block_id.cjs");
4
3
  const require_block_meta = require("../block_meta/block_meta.cjs");
@@ -1 +1 @@
1
- {"version":3,"file":"overview.cjs","names":["z","BlockPackId","BlockPackMetaEmbeddedBytes","BlockPackSpec","SemVer","FeatureFlags","BlockPackIdNoVersion","RegistryEntry"],"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,0BAA0BA,IAAAA,EACpC,OAAO;CACN,YAAYA,IAAAA,EAAE,QAAQ;CACtB,IAAIC,iBAAAA;CACJ,MAAMC,mBAAAA;CACN,MAAMC,wBAAAA;CACN,eAAeH,IAAAA,EAAE,MAAMI,eAAAA,OAAO;CAC/B,CAAC,CACD,aAAa;AAGhB,MAAa,aAAa;AAC1B,MAAa,gBAAgB;AAE7B,MAAa,sBAAsBJ,IAAAA,EAChC,OAAO;CACN,SAASI,eAAAA;CACT,UAAUJ,IAAAA,EAAE,MAAMA,IAAAA,EAAE,QAAQ,CAAC;CAC9B,CAAC,CACD,aAAa;;;;AAKhB,MAAa,0BAA0BA,IAAAA,EACpC,OAAO;CACN,IAAIC,iBAAAA;CACJ,MAAMC,mBAAAA;CACN,cAAcG,0BAAAA,aAAa,UAAU;CACrC,MAAMF,wBAAAA;CACP,CAAC,CACD,aAAa;;;;AAMhB,MAAa,uBAAuBH,IAAAA,EAAE,OAAO;CAC3C,IAAIM,iBAAAA;CACJ,iBAAiBN,IAAAA,EAAE,OAAOA,IAAAA,EAAE,QAAQ,EAAE,wBAAwB;CAC9D,aAAaA,IAAAA,EAAE,MAAM,oBAAoB;CACzC,YAAYA,IAAAA,EAAE,QAAQ;CACvB,CAAC;AACF,MAAa,oBAAoB,qBAAqB,aAAa;AAGnE,MAAa,gCAAgC,qBAAqB,KAAK,EACrE,YAAY,MACb,CAAC,CAAC,aAAa;AAGhB,MAAa,iBAAiBO,sBAAAA,cAAc,OAAO,EACjD,QAAQP,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,QAAQ,SAAS,EAAEA,IAAAA,EAAE,QAAQ,UAAU,CAAC,CAAC,EAC7D,CAAC;AAGF,MAAa,mBAAmBA,IAAAA,EAAE,OAAO;CACvC,YAAYA,IAAAA,EAAE,MAAM,eAAe;CACnC,YAAYA,IAAAA,EAAE,MAAM,kBAAkB;CACvC,CAAC;AAGF,SAAgB,0BAA0B,KAAiD;CACzF,MAAM,cAAc,IAAI,gBAAA,cAAmC,KAAA,IAAY,gBAAA;CACvE,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
+ {"version":3,"file":"overview.cjs","names":["z","BlockPackId","BlockPackMetaEmbeddedBytes","BlockPackSpec","SemVer","FeatureFlags","BlockPackIdNoVersion","RegistryEntry"],"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,0BAA0BA,IAAAA,EACpC,OAAO;CACN,YAAYA,IAAAA,EAAE,OAAO;CACrB,IAAIC,iBAAAA;CACJ,MAAMC,mBAAAA;CACN,MAAMC,wBAAAA;CACN,eAAeH,IAAAA,EAAE,MAAMI,eAAAA,MAAM;AAC/B,CAAC,CAAC,CACD,YAAY;AAGf,MAAa,aAAa;AAC1B,MAAa,gBAAgB;AAE7B,MAAa,sBAAsBJ,IAAAA,EAChC,OAAO;CACN,SAASI,eAAAA;CACT,UAAUJ,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC;AAC9B,CAAC,CAAC,CACD,YAAY;;;;AAKf,MAAa,0BAA0BA,IAAAA,EACpC,OAAO;CACN,IAAIC,iBAAAA;CACJ,MAAMC,mBAAAA;CACN,cAAcG,0BAAAA,aAAa,SAAS;CACpC,MAAMF,wBAAAA;AACR,CAAC,CAAC,CACD,YAAY;;;;AAMf,MAAa,uBAAuBH,IAAAA,EAAE,OAAO;CAC3C,IAAIM,iBAAAA;CACJ,iBAAiBN,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAG,uBAAuB;CAC7D,aAAaA,IAAAA,EAAE,MAAM,mBAAmB;CACxC,YAAYA,IAAAA,EAAE,OAAO;AACvB,CAAC;AACD,MAAa,oBAAoB,qBAAqB,YAAY;AAGlE,MAAa,gCAAgC,qBAAqB,KAAK,EACrE,YAAY,KACd,CAAC,CAAC,CAAC,YAAY;AAGf,MAAa,iBAAiBO,sBAAAA,cAAc,OAAO,EACjD,QAAQP,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,QAAQ,QAAQ,GAAGA,IAAAA,EAAE,QAAQ,SAAS,CAAC,CAAC,EAC7D,CAAC;AAGD,MAAa,mBAAmBA,IAAAA,EAAE,OAAO;CACvC,YAAYA,IAAAA,EAAE,MAAM,cAAc;CAClC,YAAYA,IAAAA,EAAE,MAAM,iBAAiB;AACvC,CAAC;AAGD,SAAgB,0BAA0B,KAAiD;CACzF,MAAM,cAAc,IAAI,gBAAA,cAAmC,KAAA,IAAY,gBAAA;CACvE,MAAM,iBAAiB,IAAI,gBAAgB;CAC3C,OAAO;EACL,IAAI,eAAe;EACnB,MAAM,eAAe;EAErB,MAAM;GAAE,GAAI,eAAe;GAAkC,SAAS;EAAc;EACpF,eAAe,IAAI,YAChB,QAAQ,MAAM,EAAE,SAAS,QAAQ,WAAW,KAAK,CAAC,CAAC,CACnD,KAAK,MAAM,EAAE,OAAO;EACvB,YAAY,IAAI;CAClB;AACF"}