@playcraft/common 0.1.66 → 0.1.67
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/agent-tools/replica-validation.d.ts +2 -2
- package/dist/agent-tools/video-model-proxy.d.ts +1 -1
- package/dist/agent-tools/video-replication.d.ts +4 -4
- package/dist/cloud-workspace/runtime/agent-command.d.ts +3 -3
- package/dist/cloud-workspace/runtime/agent-generation-provenance.js +1 -1
- package/dist/cloud-workspace/runtime/agent-generation-provenance.js.map +1 -1
- package/dist/cloud-workspace/runtime/agent-read.d.ts +6 -6
- package/dist/cloud-workspace/runtime/animation-editor.d.ts +26 -26
- package/dist/cloud-workspace/runtime/animation-quality.d.ts +1 -1
- package/dist/cloud-workspace/runtime/artifacts.d.ts +7 -7
- package/dist/cloud-workspace/runtime/asset-generation-bundle.d.ts +2 -2
- package/dist/cloud-workspace/runtime/asset-generation-tools.d.ts +49 -1
- package/dist/cloud-workspace/runtime/asset-generation-tools.d.ts.map +1 -1
- package/dist/cloud-workspace/runtime/asset-generation-tools.js +1 -1
- package/dist/cloud-workspace/runtime/asset-generation-tools.js.map +1 -1
- package/dist/cloud-workspace/runtime/asset-generation.d.ts +109 -12
- package/dist/cloud-workspace/runtime/asset-generation.d.ts.map +1 -1
- package/dist/cloud-workspace/runtime/asset-generation.js +24 -4
- package/dist/cloud-workspace/runtime/asset-generation.js.map +1 -1
- package/dist/cloud-workspace/runtime/asset-library-save.d.ts +8 -8
- package/dist/cloud-workspace/runtime/audio-adjustments.d.ts +13 -0
- package/dist/cloud-workspace/runtime/audio-adjustments.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/audio-adjustments.js +90 -0
- package/dist/cloud-workspace/runtime/audio-adjustments.js.map +1 -0
- package/dist/cloud-workspace/runtime/audio-asset-protocol.d.ts +664 -0
- package/dist/cloud-workspace/runtime/audio-asset-protocol.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/audio-asset-protocol.js +98 -0
- package/dist/cloud-workspace/runtime/audio-asset-protocol.js.map +1 -0
- package/dist/cloud-workspace/runtime/audio-document.d.ts +127 -0
- package/dist/cloud-workspace/runtime/audio-document.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/audio-document.js +293 -0
- package/dist/cloud-workspace/runtime/audio-document.js.map +1 -0
- package/dist/cloud-workspace/runtime/audio-export.d.ts +25 -0
- package/dist/cloud-workspace/runtime/audio-export.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/audio-export.js +21 -0
- package/dist/cloud-workspace/runtime/audio-export.js.map +1 -0
- package/dist/cloud-workspace/runtime/audio-player.d.ts +18 -0
- package/dist/cloud-workspace/runtime/audio-player.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/audio-player.js +98 -0
- package/dist/cloud-workspace/runtime/audio-player.js.map +1 -0
- package/dist/cloud-workspace/runtime/audio-synthesizer.d.ts +38 -0
- package/dist/cloud-workspace/runtime/audio-synthesizer.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/audio-synthesizer.js +342 -0
- package/dist/cloud-workspace/runtime/audio-synthesizer.js.map +1 -0
- package/dist/cloud-workspace/runtime/batch-runs.d.ts +2 -2
- package/dist/cloud-workspace/runtime/composer-context.d.ts +122 -0
- package/dist/cloud-workspace/runtime/composer-context.d.ts.map +1 -1
- package/dist/cloud-workspace/runtime/composer-context.js +2 -0
- package/dist/cloud-workspace/runtime/composer-context.js.map +1 -1
- package/dist/cloud-workspace/runtime/execution-admission.d.ts +2 -2
- package/dist/cloud-workspace/runtime/execution-context.d.ts +112 -0
- package/dist/cloud-workspace/runtime/execution-context.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/execution-context.js +62 -0
- package/dist/cloud-workspace/runtime/execution-context.js.map +1 -0
- package/dist/cloud-workspace/runtime/index.d.ts +14 -0
- package/dist/cloud-workspace/runtime/index.d.ts.map +1 -1
- package/dist/cloud-workspace/runtime/index.js +14 -0
- package/dist/cloud-workspace/runtime/index.js.map +1 -1
- package/dist/cloud-workspace/runtime/level-editor-agent.d.ts +331 -0
- package/dist/cloud-workspace/runtime/level-editor-agent.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor-agent.js +172 -0
- package/dist/cloud-workspace/runtime/level-editor-agent.js.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor-authoring.d.ts +125 -0
- package/dist/cloud-workspace/runtime/level-editor-authoring.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor-authoring.js +63 -0
- package/dist/cloud-workspace/runtime/level-editor-authoring.js.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor-compiler.d.ts +260 -0
- package/dist/cloud-workspace/runtime/level-editor-compiler.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor-compiler.js +530 -0
- package/dist/cloud-workspace/runtime/level-editor-compiler.js.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor-extension.d.ts +115 -0
- package/dist/cloud-workspace/runtime/level-editor-extension.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor-extension.js +107 -0
- package/dist/cloud-workspace/runtime/level-editor-extension.js.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor-path.d.ts +12 -0
- package/dist/cloud-workspace/runtime/level-editor-path.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor-path.js +110 -0
- package/dist/cloud-workspace/runtime/level-editor-path.js.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor-reducer.d.ts +30 -0
- package/dist/cloud-workspace/runtime/level-editor-reducer.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor-reducer.js +627 -0
- package/dist/cloud-workspace/runtime/level-editor-reducer.js.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor-schema.d.ts +621 -0
- package/dist/cloud-workspace/runtime/level-editor-schema.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor-schema.js +409 -0
- package/dist/cloud-workspace/runtime/level-editor-schema.js.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor-validation.d.ts +11 -0
- package/dist/cloud-workspace/runtime/level-editor-validation.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor-validation.js +128 -0
- package/dist/cloud-workspace/runtime/level-editor-validation.js.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor.d.ts +7 -0
- package/dist/cloud-workspace/runtime/level-editor.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/level-editor.js +7 -0
- package/dist/cloud-workspace/runtime/level-editor.js.map +1 -0
- package/dist/cloud-workspace/runtime/model-build-inputs.d.ts +1 -1
- package/dist/cloud-workspace/runtime/model-production.d.ts +41 -23
- package/dist/cloud-workspace/runtime/model-production.d.ts.map +1 -1
- package/dist/cloud-workspace/runtime/model-quality.d.ts +7 -7
- package/dist/cloud-workspace/runtime/model-validation.d.ts +8 -8
- package/dist/cloud-workspace/runtime/operations.d.ts +364 -8
- package/dist/cloud-workspace/runtime/operations.d.ts.map +1 -1
- package/dist/cloud-workspace/runtime/operations.js +33 -6
- package/dist/cloud-workspace/runtime/operations.js.map +1 -1
- package/dist/cloud-workspace/runtime/parameter-agent.d.ts +2 -2
- package/dist/cloud-workspace/runtime/previews.d.ts +3 -3
- package/dist/cloud-workspace/runtime/score-document.d.ts +285 -0
- package/dist/cloud-workspace/runtime/score-document.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/score-document.js +114 -0
- package/dist/cloud-workspace/runtime/score-document.js.map +1 -0
- package/dist/cloud-workspace/runtime/score-editing.d.ts +39 -0
- package/dist/cloud-workspace/runtime/score-editing.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/score-editing.js +180 -0
- package/dist/cloud-workspace/runtime/score-editing.js.map +1 -0
- package/dist/cloud-workspace/runtime/score-merging.d.ts +4 -0
- package/dist/cloud-workspace/runtime/score-merging.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/score-merging.js +74 -0
- package/dist/cloud-workspace/runtime/score-merging.js.map +1 -0
- package/dist/cloud-workspace/runtime/score-midi.d.ts +7 -0
- package/dist/cloud-workspace/runtime/score-midi.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/score-midi.js +226 -0
- package/dist/cloud-workspace/runtime/score-midi.js.map +1 -0
- package/dist/cloud-workspace/runtime/score-synthesizer.d.ts +51 -0
- package/dist/cloud-workspace/runtime/score-synthesizer.d.ts.map +1 -0
- package/dist/cloud-workspace/runtime/score-synthesizer.js +388 -0
- package/dist/cloud-workspace/runtime/score-synthesizer.js.map +1 -0
- package/dist/cloud-workspace/runtime/skills.d.ts +2 -2
- package/dist/cloud-workspace/runtime/skills.d.ts.map +1 -1
- package/dist/cloud-workspace/runtime/workspace-notifications.d.ts +1 -1
- package/dist/cloud-workspace/runtime/workspace-ui.d.ts +4 -4
- package/dist/project-skills/local-snapshot.d.ts +5 -3
- package/dist/project-skills/local-snapshot.d.ts.map +1 -1
- package/dist/project-skills/local-snapshot.js +15 -4
- package/dist/project-skills/local-snapshot.js.map +1 -1
- package/dist/project-skills/protocol.d.ts +7 -3
- package/dist/project-skills/protocol.d.ts.map +1 -1
- package/dist/project-skills/protocol.js +19 -1
- package/dist/project-skills/protocol.js.map +1 -1
- package/dist/project-skills/types.d.ts +13 -0
- package/dist/project-skills/types.d.ts.map +1 -1
- package/dist/project-skills/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { LEVEL_EDITOR_COMPONENT_CATALOG, levelEditorComponentPropsSchemas, } from './level-editor-compiler.js';
|
|
3
|
+
import { LEVEL_EDITOR_MAX_CHANGES, LEVEL_EDITOR_MAX_NODES, LEVEL_EDITOR_TRANSACTION_MAX_BYTES, levelEditorBindingSchema, levelEditorCollectionSchema, levelEditorCommandInputSchemas, levelEditorCommandSchema, levelEditorDefinitionSchema, levelEditorViewSchema, } from './level-editor-schema.js';
|
|
4
|
+
import { levelEditorExtensionEventSchema } from './level-editor-extension.js';
|
|
5
|
+
import { LEVEL_EDITOR_SCHEMA_KEYWORDS } from './level-editor-validation.js';
|
|
6
|
+
import { levelEditorTaskReportSchema } from './level-editor-agent.js';
|
|
7
|
+
const jsonSchema = (schema) => z.toJSONSchema(schema, {
|
|
8
|
+
target: 'draft-7',
|
|
9
|
+
unrepresentable: 'any',
|
|
10
|
+
cycles: 'ref',
|
|
11
|
+
reused: 'ref',
|
|
12
|
+
});
|
|
13
|
+
/** Generated from the same schemas that compile declarations and execute commands. */
|
|
14
|
+
export const LEVEL_EDITOR_AUTHORING_CONTRACT = {
|
|
15
|
+
protocolVersion: 1,
|
|
16
|
+
transactionVersions: [1, 2],
|
|
17
|
+
extensionProtocol: jsonSchema(levelEditorExtensionEventSchema),
|
|
18
|
+
definition: jsonSchema(levelEditorDefinitionSchema),
|
|
19
|
+
binding: jsonSchema(levelEditorBindingSchema),
|
|
20
|
+
collection: jsonSchema(levelEditorCollectionSchema),
|
|
21
|
+
view: jsonSchema(levelEditorViewSchema),
|
|
22
|
+
commandDeclaration: jsonSchema(levelEditorCommandSchema),
|
|
23
|
+
taskReport: jsonSchema(levelEditorTaskReportSchema),
|
|
24
|
+
commandInputs: Object.fromEntries(Object.entries(levelEditorCommandInputSchemas).map(([operation, schema]) => [
|
|
25
|
+
operation,
|
|
26
|
+
jsonSchema(schema),
|
|
27
|
+
])),
|
|
28
|
+
components: LEVEL_EDITOR_COMPONENT_CATALOG.map((component) => ({
|
|
29
|
+
...component,
|
|
30
|
+
propsSchema: jsonSchema(levelEditorComponentPropsSchemas[component.component]),
|
|
31
|
+
})),
|
|
32
|
+
dataSchemaKeywords: [...LEVEL_EDITOR_SCHEMA_KEYWORDS],
|
|
33
|
+
limits: {
|
|
34
|
+
viewNodes: LEVEL_EDITOR_MAX_NODES,
|
|
35
|
+
viewDepth: 16,
|
|
36
|
+
bindingSegments: 32,
|
|
37
|
+
transactionChanges: LEVEL_EDITOR_MAX_CHANGES,
|
|
38
|
+
transactionBytes: LEVEL_EDITOR_TRANSACTION_MAX_BYTES,
|
|
39
|
+
jsonDepth: 32,
|
|
40
|
+
jsonNodes: 100_000,
|
|
41
|
+
},
|
|
42
|
+
invariants: [
|
|
43
|
+
'Documents owned by another registered authoring protocol, including .pcaudio.json and .pcscore.json, cannot be written by level transactions. Reference such assets through the owning protocol instead.',
|
|
44
|
+
'Every JSON value must be finite, acyclic, dense and free of __proto__, prototype and constructor keys.',
|
|
45
|
+
'An item selector must use the exact collection path, parent selections and idField declared by its selection slot.',
|
|
46
|
+
'Identity keys are unique within their parent collection; ordinary field commands cannot mutate identities.',
|
|
47
|
+
'Primitive commands target one document. command.batch composes declared primitives with schema-checked typed input. Cross-document compositions require transaction version 2 and complete expectedDocuments baselines; never split them into independent saves.',
|
|
48
|
+
'Path node and edge identities, endpoints, direction, self-loop and delete policy are explicit. Dangling or duplicate edges are rejected; cascade deletion is opt-in.',
|
|
49
|
+
'Project extension views receive only declared document snapshots and propose allowed commands under a per-snapshot token; the host supplies authority and current stable selection.',
|
|
50
|
+
'Custom validators and document providers are bounded self-contained sandbox modules. Their exact bytes join the execution contract and save validates the full result again.',
|
|
51
|
+
'Object transforms require at least one declared coordinate and may not overlap target bindings.',
|
|
52
|
+
'Grid dimensions and cells must agree; painted values must belong to the command declaration values.',
|
|
53
|
+
'Component events must target commands of the corresponding operation and the same displayed bindings.',
|
|
54
|
+
'Collection actions must use the displaying component selection; object transforms must map to its displayed coordinates.',
|
|
55
|
+
'Author every declared data-schema node with one explicit type: object, array, string, number, integer, boolean or null. Nodes include the root, properties values, declared items and schema-valued additionalProperties; boolean additionalProperties switches are not nodes.',
|
|
56
|
+
'Annotations such as readOnly, title, description, default and examples do not supply a type. The parser also accepts enum- or const-constrained nodes without type, but authoring should emit an explicit type even there.',
|
|
57
|
+
'Preserve unknown authored fields using their existing types and readOnly where they must not be edited; an opaque object can use {type:"object",readOnly:true,additionalProperties:true}. Do not coerce or delete existing values or invent homogeneous array item types.',
|
|
58
|
+
'Unsupported data-schema constraints disable writes; readonly ancestors and complete candidate data are checked on save.',
|
|
59
|
+
'Subtree replacement preserves existing readonly descendants. Declared collections compare surviving members by stable identity, permitting reorder and new identities.',
|
|
60
|
+
'JSON Schema descriptions cannot express all these cross-reference and runtime invariants; the compiler remains authoritative.',
|
|
61
|
+
],
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=level-editor-authoring.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"level-editor-authoring.js","sourceRoot":"","sources":["../../../src/cloud-workspace/runtime/level-editor-authoring.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,8BAA8B,EAC9B,gCAAgC,GACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,kCAAkC,EAClC,wBAAwB,EACxB,2BAA2B,EAC3B,8BAA8B,EAC9B,wBAAwB,EACxB,2BAA2B,EAC3B,qBAAqB,GACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAEtE,MAAM,UAAU,GAAG,CAAC,MAAiB,EAAE,EAAE,CACvC,CAAC,CAAC,YAAY,CAAC,MAAM,EAAE;IACrB,MAAM,EAAE,SAAS;IACjB,eAAe,EAAE,KAAK;IACtB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,KAAK;CACd,CAAC,CAAC;AAEL,sFAAsF;AACtF,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,eAAe,EAAE,CAAC;IAClB,mBAAmB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAC3B,iBAAiB,EAAE,UAAU,CAAC,+BAA+B,CAAC;IAC9D,UAAU,EAAE,UAAU,CAAC,2BAA2B,CAAC;IACnD,OAAO,EAAE,UAAU,CAAC,wBAAwB,CAAC;IAC7C,UAAU,EAAE,UAAU,CAAC,2BAA2B,CAAC;IACnD,IAAI,EAAE,UAAU,CAAC,qBAAqB,CAAC;IACvC,kBAAkB,EAAE,UAAU,CAAC,wBAAwB,CAAC;IACxD,UAAU,EAAE,UAAU,CAAC,2BAA2B,CAAC;IACnD,aAAa,EAAE,MAAM,CAAC,WAAW,CAC/B,MAAM,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;QAC1E,SAAS;QACT,UAAU,CAAC,MAAM,CAAC;KACnB,CAAC,CACH;IACD,UAAU,EAAE,8BAA8B,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAC7D,GAAG,SAAS;QACZ,WAAW,EAAE,UAAU,CAAC,gCAAgC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;KAC/E,CAAC,CAAC;IACH,kBAAkB,EAAE,CAAC,GAAG,4BAA4B,CAAC;IACrD,MAAM,EAAE;QACN,SAAS,EAAE,sBAAsB;QACjC,SAAS,EAAE,EAAE;QACb,eAAe,EAAE,EAAE;QACnB,kBAAkB,EAAE,wBAAwB;QAC5C,gBAAgB,EAAE,kCAAkC;QACpD,SAAS,EAAE,EAAE;QACb,SAAS,EAAE,OAAO;KACnB;IACD,UAAU,EAAE;QACV,0MAA0M;QAC1M,wGAAwG;QACxG,oHAAoH;QACpH,4GAA4G;QAC5G,kQAAkQ;QAClQ,sKAAsK;QACtK,qLAAqL;QACrL,8KAA8K;QAC9K,iGAAiG;QACjG,qGAAqG;QACrG,uGAAuG;QACvG,0HAA0H;QAC1H,gRAAgR;QAChR,4NAA4N;QAC5N,2QAA2Q;QAC3Q,yHAAyH;QACzH,wKAAwK;QACxK,+HAA+H;KAChI;CACF,CAAC"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type LevelEditorDefinition, type LevelEditorDiagnostic } from './level-editor-schema.js';
|
|
3
|
+
export declare const levelEditorComponentPropsSchemas: {
|
|
4
|
+
'split@1': z.ZodObject<{
|
|
5
|
+
axis: z.ZodOptional<z.ZodEnum<{
|
|
6
|
+
horizontal: "horizontal";
|
|
7
|
+
vertical: "vertical";
|
|
8
|
+
}>>;
|
|
9
|
+
weights: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
10
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
11
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
12
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
'stack@1': z.ZodObject<{
|
|
15
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
16
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
17
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
'tabs@1': z.ZodObject<{
|
|
20
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
21
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
22
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
'group@1': z.ZodObject<{
|
|
25
|
+
collapsed: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
27
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
28
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
'toolbar@1': z.ZodObject<{
|
|
31
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
32
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
33
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
}, z.core.$strict>;
|
|
35
|
+
'collection@1': z.ZodObject<{
|
|
36
|
+
collection: z.ZodString;
|
|
37
|
+
selection: z.ZodString;
|
|
38
|
+
labelField: z.ZodOptional<z.ZodString>;
|
|
39
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
40
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
41
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
}, z.core.$strict>;
|
|
43
|
+
'inspector@1': z.ZodObject<{
|
|
44
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
45
|
+
binding: z.ZodString;
|
|
46
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
47
|
+
command: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strict>>;
|
|
49
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
50
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
51
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
'palette@1': z.ZodObject<{
|
|
54
|
+
brushes: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
55
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
56
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, z.core.$strict>]>>;
|
|
58
|
+
tool: z.ZodOptional<z.ZodString>;
|
|
59
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
60
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
61
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
}, z.core.$strict>;
|
|
63
|
+
'grid2d@1': z.ZodObject<{
|
|
64
|
+
origin: z.ZodOptional<z.ZodLiteral<"top-left">>;
|
|
65
|
+
brushes: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
66
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
67
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
68
|
+
}, z.core.$strict>]>>>;
|
|
69
|
+
tool: z.ZodOptional<z.ZodString>;
|
|
70
|
+
cellSize: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
72
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
73
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
}, z.core.$strict>;
|
|
75
|
+
'objects2d@1': z.ZodObject<{
|
|
76
|
+
collection: z.ZodString;
|
|
77
|
+
selection: z.ZodString;
|
|
78
|
+
labelField: z.ZodOptional<z.ZodString>;
|
|
79
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
shape: z.ZodOptional<z.ZodObject<{
|
|
82
|
+
kind: z.ZodEnum<{
|
|
83
|
+
circle: "circle";
|
|
84
|
+
rect: "rect";
|
|
85
|
+
diamond: "diamond";
|
|
86
|
+
polygon: "polygon";
|
|
87
|
+
}>;
|
|
88
|
+
color: z.ZodOptional<z.ZodString>;
|
|
89
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
points: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
92
|
+
}, z.core.$strict>>;
|
|
93
|
+
shapeVariants: z.ZodOptional<z.ZodObject<{
|
|
94
|
+
field: z.ZodString;
|
|
95
|
+
values: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
96
|
+
kind: z.ZodEnum<{
|
|
97
|
+
circle: "circle";
|
|
98
|
+
rect: "rect";
|
|
99
|
+
diamond: "diamond";
|
|
100
|
+
polygon: "polygon";
|
|
101
|
+
}>;
|
|
102
|
+
color: z.ZodOptional<z.ZodString>;
|
|
103
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
points: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
106
|
+
}, z.core.$strict>>;
|
|
107
|
+
}, z.core.$strict>>;
|
|
108
|
+
origin: z.ZodOptional<z.ZodLiteral<"top-left">>;
|
|
109
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
110
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
111
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
112
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
'paths2d@1': z.ZodObject<{
|
|
115
|
+
collection: z.ZodString;
|
|
116
|
+
selection: z.ZodString;
|
|
117
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
labelField: z.ZodOptional<z.ZodString>;
|
|
120
|
+
defaultNode: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
121
|
+
defaultEdge: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
122
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
123
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
124
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
}, z.core.$strict>;
|
|
126
|
+
'objects3d@1': z.ZodObject<{
|
|
127
|
+
collection: z.ZodString;
|
|
128
|
+
selection: z.ZodString;
|
|
129
|
+
labelField: z.ZodOptional<z.ZodString>;
|
|
130
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
depth: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
plane: z.ZodOptional<z.ZodEnum<{
|
|
134
|
+
xy: "xy";
|
|
135
|
+
xz: "xz";
|
|
136
|
+
yz: "yz";
|
|
137
|
+
}>>;
|
|
138
|
+
step: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
140
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
141
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
}, z.core.$strict>;
|
|
143
|
+
'command@1': z.ZodObject<{
|
|
144
|
+
command: z.ZodString;
|
|
145
|
+
input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
146
|
+
editInput: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
148
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
149
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
150
|
+
}, z.core.$strict>;
|
|
151
|
+
'extension-view@1': z.ZodObject<{
|
|
152
|
+
extension: z.ZodString;
|
|
153
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
154
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
155
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
}, z.core.$strict>;
|
|
157
|
+
'asset-picker@1': z.ZodObject<{
|
|
158
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
159
|
+
resourceType: z.ZodOptional<z.ZodString>;
|
|
160
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
161
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
162
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
}, z.core.$strict>;
|
|
164
|
+
'preview@1': z.ZodObject<{
|
|
165
|
+
titleKey: z.ZodOptional<z.ZodString>;
|
|
166
|
+
descriptionKey: z.ZodOptional<z.ZodString>;
|
|
167
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
}, z.core.$strict>;
|
|
169
|
+
};
|
|
170
|
+
export declare const LEVEL_EDITOR_COMPONENT_CATALOG: readonly [{
|
|
171
|
+
readonly component: "split@1";
|
|
172
|
+
readonly children: true;
|
|
173
|
+
readonly bindings: readonly [];
|
|
174
|
+
readonly actions: readonly [];
|
|
175
|
+
}, {
|
|
176
|
+
readonly component: "stack@1";
|
|
177
|
+
readonly children: true;
|
|
178
|
+
readonly bindings: readonly [];
|
|
179
|
+
readonly actions: readonly [];
|
|
180
|
+
}, {
|
|
181
|
+
readonly component: "tabs@1";
|
|
182
|
+
readonly children: true;
|
|
183
|
+
readonly bindings: readonly [];
|
|
184
|
+
readonly actions: readonly [];
|
|
185
|
+
}, {
|
|
186
|
+
readonly component: "group@1";
|
|
187
|
+
readonly children: true;
|
|
188
|
+
readonly bindings: readonly [];
|
|
189
|
+
readonly actions: readonly [];
|
|
190
|
+
}, {
|
|
191
|
+
readonly component: "toolbar@1";
|
|
192
|
+
readonly children: true;
|
|
193
|
+
readonly bindings: readonly [];
|
|
194
|
+
readonly actions: readonly [];
|
|
195
|
+
}, {
|
|
196
|
+
readonly component: "collection@1";
|
|
197
|
+
readonly children: false;
|
|
198
|
+
readonly bindings: readonly [];
|
|
199
|
+
readonly actions: readonly ["insert", "duplicate", "delete", "reorder"];
|
|
200
|
+
}, {
|
|
201
|
+
readonly component: "inspector@1";
|
|
202
|
+
readonly children: false;
|
|
203
|
+
readonly bindings: readonly [];
|
|
204
|
+
readonly actions: readonly [];
|
|
205
|
+
}, {
|
|
206
|
+
readonly component: "palette@1";
|
|
207
|
+
readonly children: false;
|
|
208
|
+
readonly bindings: readonly [];
|
|
209
|
+
readonly actions: readonly [];
|
|
210
|
+
}, {
|
|
211
|
+
readonly component: "grid2d@1";
|
|
212
|
+
readonly children: false;
|
|
213
|
+
readonly bindings: readonly ["rows", "columns", "cells"];
|
|
214
|
+
readonly actions: readonly ["paint"];
|
|
215
|
+
}, {
|
|
216
|
+
readonly component: "objects2d@1";
|
|
217
|
+
readonly children: false;
|
|
218
|
+
readonly bindings: readonly ["x", "y", "rotation", "scaleX", "scaleY", "asset"];
|
|
219
|
+
readonly actions: readonly ["transform", "duplicate", "delete"];
|
|
220
|
+
}, {
|
|
221
|
+
readonly component: "paths2d@1";
|
|
222
|
+
readonly children: false;
|
|
223
|
+
readonly bindings: readonly [];
|
|
224
|
+
readonly actions: readonly ["edit"];
|
|
225
|
+
}, {
|
|
226
|
+
readonly component: "objects3d@1";
|
|
227
|
+
readonly children: false;
|
|
228
|
+
readonly bindings: readonly ["x", "y", "z", "rotationX", "rotationY", "rotationZ", "scaleX", "scaleY", "scaleZ", "asset"];
|
|
229
|
+
readonly actions: readonly ["transform", "duplicate", "delete"];
|
|
230
|
+
}, {
|
|
231
|
+
readonly component: "command@1";
|
|
232
|
+
readonly children: false;
|
|
233
|
+
readonly bindings: readonly [];
|
|
234
|
+
readonly actions: readonly [];
|
|
235
|
+
}, {
|
|
236
|
+
readonly component: "extension-view@1";
|
|
237
|
+
readonly children: false;
|
|
238
|
+
readonly bindings: readonly [];
|
|
239
|
+
readonly actions: readonly [];
|
|
240
|
+
}, {
|
|
241
|
+
readonly component: "asset-picker@1";
|
|
242
|
+
readonly children: false;
|
|
243
|
+
readonly bindings: readonly ["value"];
|
|
244
|
+
readonly actions: readonly ["change"];
|
|
245
|
+
}, {
|
|
246
|
+
readonly component: "preview@1";
|
|
247
|
+
readonly children: false;
|
|
248
|
+
readonly bindings: readonly [];
|
|
249
|
+
readonly actions: readonly [];
|
|
250
|
+
}];
|
|
251
|
+
export type LevelEditorCompileResult = {
|
|
252
|
+
ok: true;
|
|
253
|
+
definition: LevelEditorDefinition;
|
|
254
|
+
diagnostics: LevelEditorDiagnostic[];
|
|
255
|
+
} | {
|
|
256
|
+
ok: false;
|
|
257
|
+
diagnostics: LevelEditorDiagnostic[];
|
|
258
|
+
};
|
|
259
|
+
export declare function compileLevelEditorDefinition(value: unknown, schemas?: Record<string, unknown>): LevelEditorCompileResult;
|
|
260
|
+
//# sourceMappingURL=level-editor-compiler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"level-editor-compiler.d.ts","sourceRoot":"","sources":["../../../src/cloud-workspace/runtime/level-editor-compiler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAG3B,MAAM,0BAA0B,CAAC;AA2ClC,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+G5C,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDjC,CAAC;AACX,MAAM,MAAM,wBAAwB,GAChC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,qBAAqB,CAAC;IAAC,WAAW,EAAE,qBAAqB,EAAE,CAAA;CAAE,GACrF;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,WAAW,EAAE,qBAAqB,EAAE,CAAA;CAAE,CAAC;AAExD,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,wBAAwB,CA2X1B"}
|