@milaboratories/pl-model-middle-layer 1.16.3 → 1.16.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.cjs +12 -22
- package/dist/_virtual/_rolldown/runtime.js +6 -11
- package/dist/block_meta/block_components.cjs +4 -5
- package/dist/block_meta/block_components.cjs.map +1 -1
- package/dist/block_meta/block_components.d.ts +30 -158
- package/dist/block_meta/block_components.d.ts.map +1 -0
- package/dist/block_meta/block_components.js +1 -2
- package/dist/block_meta/block_components.js.map +1 -1
- package/dist/block_meta/block_description.cjs +5 -6
- package/dist/block_meta/block_description.cjs.map +1 -1
- package/dist/block_meta/block_description.d.ts +20 -20
- package/dist/block_meta/block_description.d.ts.map +1 -0
- package/dist/block_meta/block_description.js +1 -2
- package/dist/block_meta/block_description.js.map +1 -1
- package/dist/block_meta/block_id.cjs +3 -4
- package/dist/block_meta/block_id.cjs.map +1 -1
- package/dist/block_meta/block_id.d.ts.map +1 -0
- package/dist/block_meta/block_id.js +1 -2
- package/dist/block_meta/block_id.js.map +1 -1
- package/dist/block_meta/block_manifest.cjs +6 -7
- package/dist/block_meta/block_manifest.cjs.map +1 -1
- package/dist/block_meta/block_manifest.d.ts +65 -65
- package/dist/block_meta/block_manifest.d.ts.map +1 -0
- package/dist/block_meta/block_manifest.js +1 -2
- package/dist/block_meta/block_manifest.js.map +1 -1
- package/dist/block_meta/block_meta.cjs +3 -4
- package/dist/block_meta/block_meta.cjs.map +1 -1
- package/dist/block_meta/block_meta.d.ts +15 -97
- package/dist/block_meta/block_meta.d.ts.map +1 -0
- package/dist/block_meta/block_meta.js +1 -2
- package/dist/block_meta/block_meta.js.map +1 -1
- package/dist/block_meta/common.d.ts.map +1 -0
- package/dist/block_meta/content_conversion.cjs +1 -2
- package/dist/block_meta/content_conversion.cjs.map +1 -1
- package/dist/block_meta/content_conversion.d.ts.map +1 -0
- package/dist/block_meta/content_conversion.js +1 -1
- package/dist/block_meta/content_types.cjs +2 -3
- package/dist/block_meta/content_types.cjs.map +1 -1
- package/dist/block_meta/content_types.d.ts.map +1 -0
- package/dist/block_meta/content_types.js +1 -2
- package/dist/block_meta/content_types.js.map +1 -1
- package/dist/block_meta/index.cjs +8 -8
- package/dist/block_meta/index.js +8 -8
- package/dist/block_meta/semver.cjs +3 -5
- package/dist/block_meta/semver.cjs.map +1 -1
- package/dist/block_meta/semver.d.ts.map +1 -0
- package/dist/block_meta/semver.js +1 -2
- package/dist/block_meta/semver.js.map +1 -1
- package/dist/block_registry/block_pack_spec.cjs +4 -5
- package/dist/block_registry/block_pack_spec.cjs.map +1 -1
- package/dist/block_registry/block_pack_spec.d.ts +8 -8
- package/dist/block_registry/block_pack_spec.d.ts.map +1 -0
- package/dist/block_registry/block_pack_spec.js +1 -2
- package/dist/block_registry/block_pack_spec.js.map +1 -1
- package/dist/block_registry/index.cjs +3 -3
- package/dist/block_registry/index.js +3 -3
- package/dist/block_registry/overview.cjs +10 -11
- package/dist/block_registry/overview.cjs.map +1 -1
- package/dist/block_registry/overview.d.ts +400 -400
- package/dist/block_registry/overview.d.ts.map +1 -0
- package/dist/block_registry/overview.js +2 -3
- package/dist/block_registry/overview.js.map +1 -1
- package/dist/block_registry/registry_spec.cjs +2 -3
- package/dist/block_registry/registry_spec.cjs.map +1 -1
- package/dist/block_registry/registry_spec.d.ts.map +1 -0
- package/dist/block_registry/registry_spec.js +1 -2
- package/dist/block_registry/registry_spec.js.map +1 -1
- package/dist/block_settings.cjs +1 -2
- package/dist/block_settings.cjs.map +1 -1
- package/dist/block_settings.d.ts.map +1 -0
- package/dist/block_settings.js +1 -1
- package/dist/block_state.d.ts.map +1 -0
- package/dist/index.cjs +23 -24
- package/dist/index.d.ts +0 -3
- package/dist/index.js +1 -2
- package/dist/json.cjs +2 -3
- package/dist/json.cjs.map +1 -1
- package/dist/json.d.ts.map +1 -0
- package/dist/json.js +1 -2
- package/dist/json.js.map +1 -1
- package/dist/pframe/internal_api/api_factory.cjs +1 -2
- package/dist/pframe/internal_api/api_factory.cjs.map +1 -1
- package/dist/pframe/internal_api/api_factory.d.ts.map +1 -0
- package/dist/pframe/internal_api/api_factory.js +1 -1
- package/dist/pframe/internal_api/api_read.d.ts.map +1 -0
- package/dist/pframe/internal_api/api_wasm.d.ts.map +1 -0
- package/dist/pframe/internal_api/common.d.ts.map +1 -0
- package/dist/pframe/internal_api/create_table.d.ts.map +1 -0
- package/dist/pframe/internal_api/delete_column.d.ts.map +1 -0
- package/dist/pframe/internal_api/discover_columns.d.ts.map +1 -0
- package/dist/pframe/internal_api/find_columns.d.ts.map +1 -0
- package/dist/pframe/internal_api/http_helpers.cjs +1 -2
- package/dist/pframe/internal_api/http_helpers.cjs.map +1 -1
- package/dist/pframe/internal_api/http_helpers.d.ts.map +1 -0
- package/dist/pframe/internal_api/http_helpers.js +1 -1
- package/dist/pframe/internal_api/http_helpers.js.map +1 -1
- package/dist/pframe/internal_api/index.cjs +9 -10
- package/dist/pframe/internal_api/index.d.ts.map +1 -0
- package/dist/pframe/internal_api/index.js +1 -2
- package/dist/pframe/internal_api/pframe.d.ts.map +1 -0
- package/dist/pframe/internal_api/table.d.ts.map +1 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project_list.d.ts.map +1 -0
- package/dist/project_overview.d.ts.map +1 -0
- package/dist/storage_debug_view.d.ts.map +1 -0
- package/dist/update_info.d.ts +0 -2
- package/dist/update_info.d.ts.map +1 -0
- package/package.json +7 -7
|
@@ -7,28 +7,20 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
8
|
var __exportAll = (all, no_symbols) => {
|
|
9
9
|
let target = {};
|
|
10
|
-
for (var name in all) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
if (!no_symbols) {
|
|
17
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
18
|
-
}
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
19
15
|
return target;
|
|
20
16
|
};
|
|
21
17
|
var __copyProps = (to, from, except, desc) => {
|
|
22
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
18
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
19
|
+
key = keys[i];
|
|
20
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
21
|
+
get: ((k) => from[k]).bind(null, key),
|
|
22
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
23
|
+
});
|
|
32
24
|
}
|
|
33
25
|
return to;
|
|
34
26
|
};
|
|
@@ -36,8 +28,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
36
28
|
value: mod,
|
|
37
29
|
enumerable: true
|
|
38
30
|
}) : target, mod));
|
|
39
|
-
|
|
40
31
|
//#endregion
|
|
41
|
-
|
|
42
32
|
exports.__exportAll = __exportAll;
|
|
43
|
-
exports.__toESM = __toESM;
|
|
33
|
+
exports.__toESM = __toESM;
|
|
@@ -2,17 +2,12 @@
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __exportAll = (all, no_symbols) => {
|
|
4
4
|
let target = {};
|
|
5
|
-
for (var name in all) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
if (!no_symbols) {
|
|
12
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
|
-
}
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
14
10
|
return target;
|
|
15
11
|
};
|
|
16
|
-
|
|
17
12
|
//#endregion
|
|
18
|
-
export { __exportAll };
|
|
13
|
+
export { __exportAll };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
const require_content_types = require(
|
|
3
|
-
const require_content_conversion = require(
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_content_types = require("./content_types.cjs");
|
|
3
|
+
const require_content_conversion = require("./content_conversion.cjs");
|
|
4
4
|
let zod = require("zod");
|
|
5
|
-
|
|
6
5
|
//#region src/block_meta/block_components.ts
|
|
7
6
|
function WorkflowV1(contentType) {
|
|
8
7
|
return zod.z.object({
|
|
@@ -27,11 +26,11 @@ const BlockComponentsDescriptionRaw = BlockComponents(zod.z.string(), zod.z.stri
|
|
|
27
26
|
function BlockComponentsAbsoluteUrl(prefix) {
|
|
28
27
|
return BlockComponents(require_content_types.ContentRelativeBinary.transform(require_content_conversion.mapRemoteToAbsolute(prefix)), require_content_types.ContentRelativeBinary.transform(require_content_conversion.mapRemoteToAbsolute(prefix)));
|
|
29
28
|
}
|
|
30
|
-
|
|
31
29
|
//#endregion
|
|
32
30
|
exports.BlockComponents = BlockComponents;
|
|
33
31
|
exports.BlockComponentsAbsoluteUrl = BlockComponentsAbsoluteUrl;
|
|
34
32
|
exports.BlockComponentsDescriptionRaw = BlockComponentsDescriptionRaw;
|
|
35
33
|
exports.Workflow = Workflow;
|
|
36
34
|
exports.WorkflowV1 = WorkflowV1;
|
|
35
|
+
|
|
37
36
|
//# sourceMappingURL=block_components.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_components.cjs","names":["z","ContentRelativeBinary","mapRemoteToAbsolute"],"sources":["../../src/block_meta/block_components.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { ContentRelativeBinary } from \"./content_types\";\nimport { mapRemoteToAbsolute } from \"./content_conversion\";\n\nexport function WorkflowV1<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.object({\n type: z.literal(\"workflow-v1\"),\n main: contentType.describe(\"Main workflow\"),\n });\n}\n\nexport function Workflow<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.union([\n // string is converted to v1 workflow\n contentType\n .transform((value: z.infer<typeof contentType>) => ({\n type: \"workflow-v1\" as const,\n main: value,\n }))\n .pipe(WorkflowV1(contentType)),\n // structured objects are decoded as union with type descriptor\n z.discriminatedUnion(\"type\", [WorkflowV1(contentType)]),\n ]);\n}\n\nexport function BlockComponents<\n const WfAndModel extends z.ZodTypeAny,\n const UI extends z.ZodTypeAny,\n>(wfAndModel: WfAndModel, ui: UI) {\n return z.object({\n workflow: Workflow(wfAndModel),\n model: wfAndModel,\n ui,\n });\n}\n\nexport const BlockComponentsDescriptionRaw = BlockComponents(z.string(), z.string());\nexport type BlockComponentsDescriptionRaw = z.infer<typeof BlockComponentsDescriptionRaw>;\n\nexport function BlockComponentsAbsoluteUrl(prefix: string) {\n return BlockComponents(\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix)),\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix)),\n );\n}\nexport type BlockComponentsAbsolute = z.infer<ReturnType<typeof BlockComponentsAbsoluteUrl>>;\n\n// export const BlockComponentsExplicit = BlockComponents(, ContentRelative);\n// export type BlockComponentsExplicit = z.infer<typeof BlockComponentsExplicit>;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"block_components.cjs","names":["z","ContentRelativeBinary","mapRemoteToAbsolute"],"sources":["../../src/block_meta/block_components.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { ContentRelativeBinary } from \"./content_types\";\nimport { mapRemoteToAbsolute } from \"./content_conversion\";\n\nexport function WorkflowV1<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.object({\n type: z.literal(\"workflow-v1\"),\n main: contentType.describe(\"Main workflow\"),\n });\n}\n\nexport function Workflow<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.union([\n // string is converted to v1 workflow\n contentType\n .transform((value: z.infer<typeof contentType>) => ({\n type: \"workflow-v1\" as const,\n main: value,\n }))\n .pipe(WorkflowV1(contentType)),\n // structured objects are decoded as union with type descriptor\n z.discriminatedUnion(\"type\", [WorkflowV1(contentType)]),\n ]);\n}\n\nexport function BlockComponents<\n const WfAndModel extends z.ZodTypeAny,\n const UI extends z.ZodTypeAny,\n>(wfAndModel: WfAndModel, ui: UI) {\n return z.object({\n workflow: Workflow(wfAndModel),\n model: wfAndModel,\n ui,\n });\n}\n\nexport const BlockComponentsDescriptionRaw = BlockComponents(z.string(), z.string());\nexport type BlockComponentsDescriptionRaw = z.infer<typeof BlockComponentsDescriptionRaw>;\n\nexport function BlockComponentsAbsoluteUrl(prefix: string) {\n return BlockComponents(\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix)),\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix)),\n );\n}\nexport type BlockComponentsAbsolute = z.infer<ReturnType<typeof BlockComponentsAbsoluteUrl>>;\n\n// export const BlockComponentsExplicit = BlockComponents(, ContentRelative);\n// export type BlockComponentsExplicit = z.infer<typeof BlockComponentsExplicit>;\n"],"mappings":";;;;;AAIA,SAAgB,WAA+C,aAAsB;AACnF,QAAOA,IAAAA,EAAE,OAAO;EACd,MAAMA,IAAAA,EAAE,QAAQ,cAAc;EAC9B,MAAM,YAAY,SAAS,gBAAgB;EAC5C,CAAC;;AAGJ,SAAgB,SAA6C,aAAsB;AACjF,QAAOA,IAAAA,EAAE,MAAM,CAEb,YACG,WAAW,WAAwC;EAClD,MAAM;EACN,MAAM;EACP,EAAE,CACF,KAAK,WAAW,YAAY,CAAC,EAEhCA,IAAAA,EAAE,mBAAmB,QAAQ,CAAC,WAAW,YAAY,CAAC,CAAC,CACxD,CAAC;;AAGJ,SAAgB,gBAGd,YAAwB,IAAQ;AAChC,QAAOA,IAAAA,EAAE,OAAO;EACd,UAAU,SAAS,WAAW;EAC9B,OAAO;EACP;EACD,CAAC;;AAGJ,MAAa,gCAAgC,gBAAgBA,IAAAA,EAAE,QAAQ,EAAEA,IAAAA,EAAE,QAAQ,CAAC;AAGpF,SAAgB,2BAA2B,QAAgB;AACzD,QAAO,gBACLC,sBAAAA,sBAAsB,UAAUC,2BAAAA,oBAAoB,OAAO,CAAC,EAC5DD,sBAAAA,sBAAsB,UAAUC,2BAAAA,oBAAoB,OAAO,CAAC,CAC7D"}
|
|
@@ -4,53 +4,35 @@ import { z } from "zod";
|
|
|
4
4
|
declare function WorkflowV1<const Content extends z.ZodTypeAny>(contentType: Content): z.ZodObject<{
|
|
5
5
|
type: z.ZodLiteral<"workflow-v1">;
|
|
6
6
|
main: Content;
|
|
7
|
-
}, "strip", z.ZodTypeAny,
|
|
7
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
8
8
|
type: z.ZodLiteral<"workflow-v1">;
|
|
9
9
|
main: Content;
|
|
10
|
-
}>, any>]: z.
|
|
10
|
+
}>, any> extends infer T ? { [k in keyof T]: T[k] } : never, z.baseObjectInputType<{
|
|
11
11
|
type: z.ZodLiteral<"workflow-v1">;
|
|
12
12
|
main: Content;
|
|
13
|
-
}
|
|
14
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
15
|
-
main: Content;
|
|
16
|
-
}>]: z.baseObjectInputType<{
|
|
17
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
18
|
-
main: Content;
|
|
19
|
-
}>[k_1] }>;
|
|
13
|
+
}> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1] } : never>;
|
|
20
14
|
declare function Workflow<const Content extends z.ZodTypeAny>(contentType: Content): z.ZodUnion<[z.ZodPipeline<z.ZodEffects<Content, {
|
|
21
15
|
type: "workflow-v1";
|
|
22
16
|
main: z.TypeOf<Content>;
|
|
23
17
|
}, z.input<Content>>, z.ZodObject<{
|
|
24
18
|
type: z.ZodLiteral<"workflow-v1">;
|
|
25
19
|
main: Content;
|
|
26
|
-
}, "strip", z.ZodTypeAny,
|
|
27
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
28
|
-
main: Content;
|
|
29
|
-
}>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
30
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
31
|
-
main: Content;
|
|
32
|
-
}>, any>[k] }, { [k_1 in keyof z.baseObjectInputType<{
|
|
33
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
34
|
-
main: Content;
|
|
35
|
-
}>]: z.baseObjectInputType<{
|
|
36
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
37
|
-
main: Content;
|
|
38
|
-
}>[k_1] }>>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
20
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
39
21
|
type: z.ZodLiteral<"workflow-v1">;
|
|
40
22
|
main: Content;
|
|
41
|
-
}
|
|
23
|
+
}>, any> extends infer T ? { [k in keyof T]: T[k] } : never, z.baseObjectInputType<{
|
|
42
24
|
type: z.ZodLiteral<"workflow-v1">;
|
|
43
25
|
main: Content;
|
|
44
|
-
}
|
|
26
|
+
}> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1] } : never>>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
45
27
|
type: z.ZodLiteral<"workflow-v1">;
|
|
46
28
|
main: Content;
|
|
47
|
-
}
|
|
29
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
48
30
|
type: z.ZodLiteral<"workflow-v1">;
|
|
49
31
|
main: Content;
|
|
50
|
-
}>]: z.baseObjectInputType<{
|
|
32
|
+
}>, any> extends infer T_2 ? { [k in keyof T_2]: T_2[k] } : never, z.baseObjectInputType<{
|
|
51
33
|
type: z.ZodLiteral<"workflow-v1">;
|
|
52
34
|
main: Content;
|
|
53
|
-
}>[k_1] }>]>]>;
|
|
35
|
+
}> extends infer T_3 ? { [k_1 in keyof T_3]: T_3[k_1] } : never>]>]>;
|
|
54
36
|
declare function BlockComponents<const WfAndModel extends z.ZodTypeAny, const UI extends z.ZodTypeAny>(wfAndModel: WfAndModel, ui: UI): z.ZodObject<{
|
|
55
37
|
workflow: z.ZodUnion<[z.ZodPipeline<z.ZodEffects<WfAndModel, {
|
|
56
38
|
type: "workflow-v1";
|
|
@@ -58,185 +40,75 @@ declare function BlockComponents<const WfAndModel extends z.ZodTypeAny, const UI
|
|
|
58
40
|
}, z.input<WfAndModel>>, z.ZodObject<{
|
|
59
41
|
type: z.ZodLiteral<"workflow-v1">;
|
|
60
42
|
main: WfAndModel;
|
|
61
|
-
}, "strip", z.ZodTypeAny,
|
|
62
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
63
|
-
main: WfAndModel;
|
|
64
|
-
}>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
65
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
66
|
-
main: WfAndModel;
|
|
67
|
-
}>, any>[k] }, { [k_1 in keyof z.baseObjectInputType<{
|
|
68
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
69
|
-
main: WfAndModel;
|
|
70
|
-
}>]: z.baseObjectInputType<{
|
|
71
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
72
|
-
main: WfAndModel;
|
|
73
|
-
}>[k_1] }>>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
74
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
75
|
-
main: WfAndModel;
|
|
76
|
-
}, "strip", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
77
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
78
|
-
main: WfAndModel;
|
|
79
|
-
}>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
80
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
81
|
-
main: WfAndModel;
|
|
82
|
-
}>, any>[k] }, { [k_1 in keyof z.baseObjectInputType<{
|
|
83
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
84
|
-
main: WfAndModel;
|
|
85
|
-
}>]: z.baseObjectInputType<{
|
|
86
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
87
|
-
main: WfAndModel;
|
|
88
|
-
}>[k_1] }>]>]>;
|
|
89
|
-
model: WfAndModel;
|
|
90
|
-
ui: UI;
|
|
91
|
-
}, "strip", z.ZodTypeAny, { [k_2 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
92
|
-
workflow: z.ZodUnion<[z.ZodPipeline<z.ZodEffects<WfAndModel, {
|
|
93
|
-
type: "workflow-v1";
|
|
94
|
-
main: z.TypeOf<WfAndModel>;
|
|
95
|
-
}, z.input<WfAndModel>>, z.ZodObject<{
|
|
96
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
97
|
-
main: WfAndModel;
|
|
98
|
-
}, "strip", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
99
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
100
|
-
main: WfAndModel;
|
|
101
|
-
}>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
102
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
103
|
-
main: WfAndModel;
|
|
104
|
-
}>, any>[k] }, { [k_1 in keyof z.baseObjectInputType<{
|
|
105
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
106
|
-
main: WfAndModel;
|
|
107
|
-
}>]: z.baseObjectInputType<{
|
|
108
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
109
|
-
main: WfAndModel;
|
|
110
|
-
}>[k_1] }>>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
111
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
112
|
-
main: WfAndModel;
|
|
113
|
-
}, "strip", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
114
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
115
|
-
main: WfAndModel;
|
|
116
|
-
}>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
117
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
118
|
-
main: WfAndModel;
|
|
119
|
-
}>, any>[k] }, { [k_1 in keyof z.baseObjectInputType<{
|
|
120
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
121
|
-
main: WfAndModel;
|
|
122
|
-
}>]: z.baseObjectInputType<{
|
|
123
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
124
|
-
main: WfAndModel;
|
|
125
|
-
}>[k_1] }>]>]>;
|
|
126
|
-
model: WfAndModel;
|
|
127
|
-
ui: UI;
|
|
128
|
-
}>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
129
|
-
workflow: z.ZodUnion<[z.ZodPipeline<z.ZodEffects<WfAndModel, {
|
|
130
|
-
type: "workflow-v1";
|
|
131
|
-
main: z.TypeOf<WfAndModel>;
|
|
132
|
-
}, z.input<WfAndModel>>, z.ZodObject<{
|
|
133
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
134
|
-
main: WfAndModel;
|
|
135
|
-
}, "strip", z.ZodTypeAny, { [k in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
136
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
137
|
-
main: WfAndModel;
|
|
138
|
-
}>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
43
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
139
44
|
type: z.ZodLiteral<"workflow-v1">;
|
|
140
45
|
main: WfAndModel;
|
|
141
|
-
}>, any>
|
|
46
|
+
}>, any> extends infer T ? { [k in keyof T]: T[k] } : never, z.baseObjectInputType<{
|
|
142
47
|
type: z.ZodLiteral<"workflow-v1">;
|
|
143
48
|
main: WfAndModel;
|
|
144
|
-
}>]: z.
|
|
49
|
+
}> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1] } : never>>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
145
50
|
type: z.ZodLiteral<"workflow-v1">;
|
|
146
51
|
main: WfAndModel;
|
|
147
|
-
}
|
|
52
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
148
53
|
type: z.ZodLiteral<"workflow-v1">;
|
|
149
54
|
main: WfAndModel;
|
|
150
|
-
}
|
|
55
|
+
}>, any> extends infer T_2 ? { [k in keyof T_2]: T_2[k] } : never, z.baseObjectInputType<{
|
|
151
56
|
type: z.ZodLiteral<"workflow-v1">;
|
|
152
57
|
main: WfAndModel;
|
|
153
|
-
}
|
|
154
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
155
|
-
main: WfAndModel;
|
|
156
|
-
}>, any>[k] }, { [k_1 in keyof z.baseObjectInputType<{
|
|
157
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
158
|
-
main: WfAndModel;
|
|
159
|
-
}>]: z.baseObjectInputType<{
|
|
160
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
161
|
-
main: WfAndModel;
|
|
162
|
-
}>[k_1] }>]>]>;
|
|
58
|
+
}> extends infer T_3 ? { [k_1 in keyof T_3]: T_3[k_1] } : never>]>]>;
|
|
163
59
|
model: WfAndModel;
|
|
164
60
|
ui: UI;
|
|
165
|
-
}
|
|
61
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
166
62
|
workflow: z.ZodUnion<[z.ZodPipeline<z.ZodEffects<WfAndModel, {
|
|
167
63
|
type: "workflow-v1";
|
|
168
64
|
main: z.TypeOf<WfAndModel>;
|
|
169
65
|
}, z.input<WfAndModel>>, z.ZodObject<{
|
|
170
66
|
type: z.ZodLiteral<"workflow-v1">;
|
|
171
67
|
main: WfAndModel;
|
|
172
|
-
}, "strip", z.ZodTypeAny,
|
|
173
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
174
|
-
main: WfAndModel;
|
|
175
|
-
}>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
176
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
177
|
-
main: WfAndModel;
|
|
178
|
-
}>, any>[k] }, { [k_1 in keyof z.baseObjectInputType<{
|
|
179
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
180
|
-
main: WfAndModel;
|
|
181
|
-
}>]: z.baseObjectInputType<{
|
|
182
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
183
|
-
main: WfAndModel;
|
|
184
|
-
}>[k_1] }>>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
68
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
185
69
|
type: z.ZodLiteral<"workflow-v1">;
|
|
186
70
|
main: WfAndModel;
|
|
187
|
-
}
|
|
71
|
+
}>, any> extends infer T_5 ? { [k in keyof T_5]: T_5[k] } : never, z.baseObjectInputType<{
|
|
188
72
|
type: z.ZodLiteral<"workflow-v1">;
|
|
189
73
|
main: WfAndModel;
|
|
190
|
-
}
|
|
74
|
+
}> extends infer T_6 ? { [k_1 in keyof T_6]: T_6[k_1] } : never>>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
191
75
|
type: z.ZodLiteral<"workflow-v1">;
|
|
192
76
|
main: WfAndModel;
|
|
193
|
-
}
|
|
77
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
194
78
|
type: z.ZodLiteral<"workflow-v1">;
|
|
195
79
|
main: WfAndModel;
|
|
196
|
-
}>]: z.baseObjectInputType<{
|
|
80
|
+
}>, any> extends infer T_7 ? { [k in keyof T_7]: T_7[k] } : never, z.baseObjectInputType<{
|
|
197
81
|
type: z.ZodLiteral<"workflow-v1">;
|
|
198
82
|
main: WfAndModel;
|
|
199
|
-
}>[k_1] }>]>]>;
|
|
83
|
+
}> extends infer T_8 ? { [k_1 in keyof T_8]: T_8[k_1] } : never>]>]>;
|
|
200
84
|
model: WfAndModel;
|
|
201
85
|
ui: UI;
|
|
202
|
-
}>]: z.baseObjectInputType<{
|
|
86
|
+
}>, any> extends infer T_4 ? { [k_2 in keyof T_4]: T_4[k_2] } : never, z.baseObjectInputType<{
|
|
203
87
|
workflow: z.ZodUnion<[z.ZodPipeline<z.ZodEffects<WfAndModel, {
|
|
204
88
|
type: "workflow-v1";
|
|
205
89
|
main: z.TypeOf<WfAndModel>;
|
|
206
90
|
}, z.input<WfAndModel>>, z.ZodObject<{
|
|
207
91
|
type: z.ZodLiteral<"workflow-v1">;
|
|
208
92
|
main: WfAndModel;
|
|
209
|
-
}, "strip", z.ZodTypeAny,
|
|
210
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
211
|
-
main: WfAndModel;
|
|
212
|
-
}>, any>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
213
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
214
|
-
main: WfAndModel;
|
|
215
|
-
}>, any>[k] }, { [k_1 in keyof z.baseObjectInputType<{
|
|
216
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
217
|
-
main: WfAndModel;
|
|
218
|
-
}>]: z.baseObjectInputType<{
|
|
219
|
-
type: z.ZodLiteral<"workflow-v1">;
|
|
220
|
-
main: WfAndModel;
|
|
221
|
-
}>[k_1] }>>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
93
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
222
94
|
type: z.ZodLiteral<"workflow-v1">;
|
|
223
95
|
main: WfAndModel;
|
|
224
|
-
}
|
|
96
|
+
}>, any> extends infer T_10 ? { [k in keyof T_10]: T_10[k] } : never, z.baseObjectInputType<{
|
|
225
97
|
type: z.ZodLiteral<"workflow-v1">;
|
|
226
98
|
main: WfAndModel;
|
|
227
|
-
}
|
|
99
|
+
}> extends infer T_11 ? { [k_1 in keyof T_11]: T_11[k_1] } : never>>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
228
100
|
type: z.ZodLiteral<"workflow-v1">;
|
|
229
101
|
main: WfAndModel;
|
|
230
|
-
}
|
|
102
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
231
103
|
type: z.ZodLiteral<"workflow-v1">;
|
|
232
104
|
main: WfAndModel;
|
|
233
|
-
}>]: z.baseObjectInputType<{
|
|
105
|
+
}>, any> extends infer T_12 ? { [k in keyof T_12]: T_12[k] } : never, z.baseObjectInputType<{
|
|
234
106
|
type: z.ZodLiteral<"workflow-v1">;
|
|
235
107
|
main: WfAndModel;
|
|
236
|
-
}>[k_1] }>]>]>;
|
|
108
|
+
}> extends infer T_13 ? { [k_1 in keyof T_13]: T_13[k_1] } : never>]>]>;
|
|
237
109
|
model: WfAndModel;
|
|
238
110
|
ui: UI;
|
|
239
|
-
}>[
|
|
111
|
+
}> extends infer T_9 ? { [k_3 in keyof T_9]: T_9[k_3] } : never>;
|
|
240
112
|
declare const BlockComponentsDescriptionRaw: z.ZodObject<{
|
|
241
113
|
workflow: z.ZodUnion<[z.ZodPipeline<z.ZodEffects<z.ZodString, {
|
|
242
114
|
type: "workflow-v1";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block_components.d.ts","names":[],"sources":["../../src/block_meta/block_components.ts"],"mappings":";;;iBAIgB,UAAA,uBAAiC,CAAA,CAAE,UAAA,CAAA,CAAY,WAAA,EAAa,OAAA,GAAO,CAAA,CAAA,SAAA;;;;;;;;;;iBAOnE,QAAA,uBAA+B,CAAA,CAAE,UAAA,CAAA,CAAY,WAAA,EAAa,OAAA,GAAO,CAAA,CAAA,QAAA,EAAA,CAAA,CAAA,WAAA,CAAA,CAAA,CAAA,UAAA,CAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;iBAcjE,eAAA,0BACW,CAAA,CAAE,UAAA,mBACV,CAAA,CAAE,UAAA,CAAA,CACnB,UAAA,EAAY,UAAA,EAAY,EAAA,EAAI,EAAA,GAAE,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAQnB,6BAAA,EAA6B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAC9B,6BAAA,GAAgC,CAAA,CAAE,KAAA,QAAa,6BAAA;AAAA,iBAE3C,0BAAA,CAA2B,MAAA,WAAc,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAM7C,uBAAA,GAA0B,CAAA,CAAE,KAAA,CAAM,UAAA,QAAkB,0BAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ContentRelativeBinary } from "./content_types.js";
|
|
2
2
|
import { mapRemoteToAbsolute } from "./content_conversion.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
|
|
5
4
|
//#region src/block_meta/block_components.ts
|
|
6
5
|
function WorkflowV1(contentType) {
|
|
7
6
|
return z.object({
|
|
@@ -26,7 +25,7 @@ const BlockComponentsDescriptionRaw = BlockComponents(z.string(), z.string());
|
|
|
26
25
|
function BlockComponentsAbsoluteUrl(prefix) {
|
|
27
26
|
return BlockComponents(ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix)), ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix)));
|
|
28
27
|
}
|
|
29
|
-
|
|
30
28
|
//#endregion
|
|
31
29
|
export { BlockComponents, BlockComponentsAbsoluteUrl, BlockComponentsDescriptionRaw, Workflow, WorkflowV1 };
|
|
30
|
+
|
|
32
31
|
//# sourceMappingURL=block_components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_components.js","names":[],"sources":["../../src/block_meta/block_components.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { ContentRelativeBinary } from \"./content_types\";\nimport { mapRemoteToAbsolute } from \"./content_conversion\";\n\nexport function WorkflowV1<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.object({\n type: z.literal(\"workflow-v1\"),\n main: contentType.describe(\"Main workflow\"),\n });\n}\n\nexport function Workflow<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.union([\n // string is converted to v1 workflow\n contentType\n .transform((value: z.infer<typeof contentType>) => ({\n type: \"workflow-v1\" as const,\n main: value,\n }))\n .pipe(WorkflowV1(contentType)),\n // structured objects are decoded as union with type descriptor\n z.discriminatedUnion(\"type\", [WorkflowV1(contentType)]),\n ]);\n}\n\nexport function BlockComponents<\n const WfAndModel extends z.ZodTypeAny,\n const UI extends z.ZodTypeAny,\n>(wfAndModel: WfAndModel, ui: UI) {\n return z.object({\n workflow: Workflow(wfAndModel),\n model: wfAndModel,\n ui,\n });\n}\n\nexport const BlockComponentsDescriptionRaw = BlockComponents(z.string(), z.string());\nexport type BlockComponentsDescriptionRaw = z.infer<typeof BlockComponentsDescriptionRaw>;\n\nexport function BlockComponentsAbsoluteUrl(prefix: string) {\n return BlockComponents(\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix)),\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix)),\n );\n}\nexport type BlockComponentsAbsolute = z.infer<ReturnType<typeof BlockComponentsAbsoluteUrl>>;\n\n// export const BlockComponentsExplicit = BlockComponents(, ContentRelative);\n// export type BlockComponentsExplicit = z.infer<typeof BlockComponentsExplicit>;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"block_components.js","names":[],"sources":["../../src/block_meta/block_components.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { ContentRelativeBinary } from \"./content_types\";\nimport { mapRemoteToAbsolute } from \"./content_conversion\";\n\nexport function WorkflowV1<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.object({\n type: z.literal(\"workflow-v1\"),\n main: contentType.describe(\"Main workflow\"),\n });\n}\n\nexport function Workflow<const Content extends z.ZodTypeAny>(contentType: Content) {\n return z.union([\n // string is converted to v1 workflow\n contentType\n .transform((value: z.infer<typeof contentType>) => ({\n type: \"workflow-v1\" as const,\n main: value,\n }))\n .pipe(WorkflowV1(contentType)),\n // structured objects are decoded as union with type descriptor\n z.discriminatedUnion(\"type\", [WorkflowV1(contentType)]),\n ]);\n}\n\nexport function BlockComponents<\n const WfAndModel extends z.ZodTypeAny,\n const UI extends z.ZodTypeAny,\n>(wfAndModel: WfAndModel, ui: UI) {\n return z.object({\n workflow: Workflow(wfAndModel),\n model: wfAndModel,\n ui,\n });\n}\n\nexport const BlockComponentsDescriptionRaw = BlockComponents(z.string(), z.string());\nexport type BlockComponentsDescriptionRaw = z.infer<typeof BlockComponentsDescriptionRaw>;\n\nexport function BlockComponentsAbsoluteUrl(prefix: string) {\n return BlockComponents(\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix)),\n ContentRelativeBinary.transform(mapRemoteToAbsolute(prefix)),\n );\n}\nexport type BlockComponentsAbsolute = z.infer<ReturnType<typeof BlockComponentsAbsoluteUrl>>;\n\n// export const BlockComponentsExplicit = BlockComponents(, ContentRelative);\n// export type BlockComponentsExplicit = z.infer<typeof BlockComponentsExplicit>;\n"],"mappings":";;;;AAIA,SAAgB,WAA+C,aAAsB;AACnF,QAAO,EAAE,OAAO;EACd,MAAM,EAAE,QAAQ,cAAc;EAC9B,MAAM,YAAY,SAAS,gBAAgB;EAC5C,CAAC;;AAGJ,SAAgB,SAA6C,aAAsB;AACjF,QAAO,EAAE,MAAM,CAEb,YACG,WAAW,WAAwC;EAClD,MAAM;EACN,MAAM;EACP,EAAE,CACF,KAAK,WAAW,YAAY,CAAC,EAEhC,EAAE,mBAAmB,QAAQ,CAAC,WAAW,YAAY,CAAC,CAAC,CACxD,CAAC;;AAGJ,SAAgB,gBAGd,YAAwB,IAAQ;AAChC,QAAO,EAAE,OAAO;EACd,UAAU,SAAS,WAAW;EAC9B,OAAO;EACP;EACD,CAAC;;AAGJ,MAAa,gCAAgC,gBAAgB,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC;AAGpF,SAAgB,2BAA2B,QAAgB;AACzD,QAAO,gBACL,sBAAsB,UAAU,oBAAoB,OAAO,CAAC,EAC5D,sBAAsB,UAAU,oBAAoB,OAAO,CAAC,CAC7D"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
const require_block_id = require(
|
|
3
|
-
const require_block_components = require(
|
|
4
|
-
const require_block_meta = require(
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_block_id = require("./block_id.cjs");
|
|
3
|
+
const require_block_components = require("./block_components.cjs");
|
|
4
|
+
const require_block_meta = require("./block_meta.cjs");
|
|
5
5
|
let zod = require("zod");
|
|
6
6
|
let es_toolkit = require("es-toolkit");
|
|
7
|
-
|
|
8
7
|
//#region src/block_meta/block_description.ts
|
|
9
8
|
/** Description, as appears in root block package.json file,
|
|
10
9
|
* `file:` references are parsed into relative content of corresponding type, depending on the context,
|
|
@@ -26,11 +25,11 @@ const BlockPackDescriptionRaw = CreateBlockPackDescriptionSchema(require_block_c
|
|
|
26
25
|
function overrideDescriptionVersion(manifest, newVersion) {
|
|
27
26
|
return (0, es_toolkit.toMerged)(manifest, { id: { version: newVersion } });
|
|
28
27
|
}
|
|
29
|
-
|
|
30
28
|
//#endregion
|
|
31
29
|
exports.BlockPackDescriptionFromPackageJsonRaw = BlockPackDescriptionFromPackageJsonRaw;
|
|
32
30
|
exports.BlockPackDescriptionRaw = BlockPackDescriptionRaw;
|
|
33
31
|
exports.CreateBlockPackDescriptionSchema = CreateBlockPackDescriptionSchema;
|
|
34
32
|
exports.FeatureFlags = FeatureFlags;
|
|
35
33
|
exports.overrideDescriptionVersion = overrideDescriptionVersion;
|
|
34
|
+
|
|
36
35
|
//# sourceMappingURL=block_description.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block_description.cjs","names":["z","BlockComponentsDescriptionRaw","BlockPackMetaDescriptionRaw","BlockPackId"],"sources":["../../src/block_meta/block_description.ts"],"sourcesContent":["import type { ZodTypeAny } from \"zod\";\nimport { z } from \"zod\";\nimport { BlockComponentsDescriptionRaw } from \"./block_components\";\nimport { BlockPackMetaDescriptionRaw } from \"./block_meta\";\nimport { BlockPackId } from \"./block_id\";\nimport { toMerged } from \"es-toolkit\";\nimport type { BlockCodeKnownFeatureFlags } from \"@milaboratories/pl-model-common\";\n\n/** Description, as appears in root block package.json file,\n * `file:` references are parsed into relative content of corresponding type, depending on the context,\n * strings are converted to explicit content type. */\nexport const BlockPackDescriptionFromPackageJsonRaw = z.object({\n components: BlockComponentsDescriptionRaw,\n meta: BlockPackMetaDescriptionRaw,\n});\n\nexport const FeatureFlags = z\n .record(z.string(), z.union([z.boolean(), z.number()]))\n .transform((flags) => flags as BlockCodeKnownFeatureFlags);\n\nexport function CreateBlockPackDescriptionSchema<\n Components extends ZodTypeAny,\n Meta extends ZodTypeAny,\n>(components: Components, meta: Meta) {\n return z\n .object({\n id: BlockPackId,\n components,\n meta,\n featureFlags: FeatureFlags.optional(),\n })\n .passthrough();\n}\n\nexport const BlockPackDescriptionRaw = CreateBlockPackDescriptionSchema(\n BlockComponentsDescriptionRaw,\n BlockPackMetaDescriptionRaw,\n);\nexport type BlockPackDescriptionRaw = z.infer<typeof BlockPackDescriptionRaw>;\n\nexport function overrideDescriptionVersion<T extends { id: BlockPackId }>(\n manifest: T,\n newVersion: string,\n): T {\n return toMerged(manifest, { id: { version: newVersion } }) as T;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"block_description.cjs","names":["z","BlockComponentsDescriptionRaw","BlockPackMetaDescriptionRaw","BlockPackId"],"sources":["../../src/block_meta/block_description.ts"],"sourcesContent":["import type { ZodTypeAny } from \"zod\";\nimport { z } from \"zod\";\nimport { BlockComponentsDescriptionRaw } from \"./block_components\";\nimport { BlockPackMetaDescriptionRaw } from \"./block_meta\";\nimport { BlockPackId } from \"./block_id\";\nimport { toMerged } from \"es-toolkit\";\nimport type { BlockCodeKnownFeatureFlags } from \"@milaboratories/pl-model-common\";\n\n/** Description, as appears in root block package.json file,\n * `file:` references are parsed into relative content of corresponding type, depending on the context,\n * strings are converted to explicit content type. */\nexport const BlockPackDescriptionFromPackageJsonRaw = z.object({\n components: BlockComponentsDescriptionRaw,\n meta: BlockPackMetaDescriptionRaw,\n});\n\nexport const FeatureFlags = z\n .record(z.string(), z.union([z.boolean(), z.number()]))\n .transform((flags) => flags as BlockCodeKnownFeatureFlags);\n\nexport function CreateBlockPackDescriptionSchema<\n Components extends ZodTypeAny,\n Meta extends ZodTypeAny,\n>(components: Components, meta: Meta) {\n return z\n .object({\n id: BlockPackId,\n components,\n meta,\n featureFlags: FeatureFlags.optional(),\n })\n .passthrough();\n}\n\nexport const BlockPackDescriptionRaw = CreateBlockPackDescriptionSchema(\n BlockComponentsDescriptionRaw,\n BlockPackMetaDescriptionRaw,\n);\nexport type BlockPackDescriptionRaw = z.infer<typeof BlockPackDescriptionRaw>;\n\nexport function overrideDescriptionVersion<T extends { id: BlockPackId }>(\n manifest: T,\n newVersion: string,\n): T {\n return toMerged(manifest, { id: { version: newVersion } }) as T;\n}\n"],"mappings":";;;;;;;;;;AAWA,MAAa,yCAAyCA,IAAAA,EAAE,OAAO;CAC7D,YAAYC,yBAAAA;CACZ,MAAMC,mBAAAA;CACP,CAAC;AAEF,MAAa,eAAeF,IAAAA,EACzB,OAAOA,IAAAA,EAAE,QAAQ,EAAEA,IAAAA,EAAE,MAAM,CAACA,IAAAA,EAAE,SAAS,EAAEA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,CACtD,WAAW,UAAU,MAAoC;AAE5D,SAAgB,iCAGd,YAAwB,MAAY;AACpC,QAAOA,IAAAA,EACJ,OAAO;EACN,IAAIG,iBAAAA;EACJ;EACA;EACA,cAAc,aAAa,UAAU;EACtC,CAAC,CACD,aAAa;;AAGlB,MAAa,0BAA0B,iCACrCF,yBAAAA,+BACAC,mBAAAA,4BACD;AAGD,SAAgB,2BACd,UACA,YACG;AACH,SAAA,GAAA,WAAA,UAAgB,UAAU,EAAE,IAAI,EAAE,SAAS,YAAY,EAAE,CAAC"}
|