@metamesh/generator-sdk 0.4.0 → 0.5.1
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/CHANGELOG.md +27 -0
- package/README.md +118 -31
- package/dist/contracts.d.ts +6 -3
- package/dist/contracts.d.ts.map +1 -1
- package/dist/generator-package/constants.d.ts +1 -1
- package/dist/generator-package/constants.js +1 -1
- package/dist/generator-package/schemas/definition.schema.d.ts +19 -0
- package/dist/generator-package/schemas/definition.schema.d.ts.map +1 -1
- package/dist/generator-package/schemas/manifest.schema.d.ts +908 -59
- package/dist/generator-package/schemas/manifest.schema.d.ts.map +1 -1
- package/dist/generator-package/schemas/parameter.schema.d.ts +46 -0
- package/dist/generator-package/schemas/parameter.schema.d.ts.map +1 -1
- package/dist/generator-package/schemas/parameter.schema.js +17 -0
- package/dist/generator-package/schemas/parameter.schema.js.map +1 -1
- package/dist/generator-package/schemas/preset.schema.d.ts.map +1 -1
- package/dist/generator-package/schemas/preset.schema.js +2 -0
- package/dist/generator-package/schemas/preset.schema.js.map +1 -1
- package/dist/generator-package/validate-definition.d.ts.map +1 -1
- package/dist/generator-package/validate-definition.js +46 -1
- package/dist/generator-package/validate-definition.js.map +1 -1
- package/dist/generator-package/validate-manifest.d.ts.map +1 -1
- package/dist/generator-package/validate-manifest.js +9 -0
- package/dist/generator-package/validate-manifest.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/parameters.d.ts.map +1 -1
- package/dist/parameters.js +16 -1
- package/dist/parameters.js.map +1 -1
- package/dist/profiles.d.ts +33 -0
- package/dist/profiles.d.ts.map +1 -0
- package/dist/profiles.js +167 -0
- package/dist/profiles.js.map +1 -0
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @metamesh/generator-sdk
|
|
2
2
|
|
|
3
|
+
## 0.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Allow multiple saved curve-resolution parameters per definition so hosts can show their authored
|
|
8
|
+
labels together while Generators own each setting's curve and part mapping.
|
|
9
|
+
|
|
10
|
+
Handle floating-point turns consistently when triangulating densely sampled straight cap edges,
|
|
11
|
+
preserving matched-profile correspondence at finer curve resolutions.
|
|
12
|
+
|
|
13
|
+
## 0.5.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 0dc29c2: Add the portable numeric `curve-resolution` parameter role for model-owned physical curve
|
|
18
|
+
tolerance, with strict millimetre units, positive bounds, and one role per definition. Require
|
|
19
|
+
runtime 1.3.0 or later for packages declaring the role. Geometry and
|
|
20
|
+
Testkit follow the coordinated fixed Preview package release.
|
|
21
|
+
- 0dc29c2: Add a portable, versioned `profile` parameter for guided side outlines with line/cubic segments,
|
|
22
|
+
anchor editing modes, physical-dimension bindings, strict bounds, and deeply immutable defaults,
|
|
23
|
+
presets, and runtime values. Profile-capable packages require runtime 1.3.0 or later while retaining
|
|
24
|
+
package format 1.
|
|
25
|
+
|
|
26
|
+
Add Geometry's `sampleOpenProfile` operation to adaptively sample open radius/height curves with
|
|
27
|
+
physical scaling, chord-error limits, and explicit complexity failures. Expose it through the
|
|
28
|
+
compiled and Studio authoring APIs so profile parameters use the same geometry in preview and export.
|
|
29
|
+
|
|
3
30
|
## 0.4.0
|
|
4
31
|
|
|
5
32
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -12,10 +12,9 @@ Install the public package from npm:
|
|
|
12
12
|
pnpm add @metamesh/generator-sdk
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
The package root exposes the
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
or Zod. Both exports remain available from the package root.
|
|
15
|
+
The package root exposes the Generator API. Use `@metamesh/generator-sdk/fonts` for only
|
|
16
|
+
`FontSelection` and `isFontSelection`, without loading Generator services or Zod. Both exports
|
|
17
|
+
remain available from the root.
|
|
19
18
|
|
|
20
19
|
The package owns parameter/group definitions, serializable conditions, default derivation and
|
|
21
20
|
normalization, structured validation, runtime envelopes, normalized generated-model results, and
|
|
@@ -26,19 +25,18 @@ The optional `Export3mfRequest.partColors` map carries Project color overrides k
|
|
|
26
25
|
part ID. Studio validates and applies it during export; it does not enter Generator parameters or
|
|
27
26
|
change package generation contracts. Omitted overrides preserve generated colors.
|
|
28
27
|
|
|
29
|
-
Zod is
|
|
30
|
-
|
|
31
|
-
remains a separate host responsibility.
|
|
28
|
+
Zod is the only runtime dependency. The [public entry point](https://github.com/JasonKoolman/metamesh/blob/main/packages/generator-sdk/src/index.ts) owns exact exports;
|
|
29
|
+
strict schemas own accepted boundary data. Hosts own package delivery and execution.
|
|
32
30
|
|
|
33
31
|
## Parameter definitions
|
|
34
32
|
|
|
35
33
|
Definitions use the `type` discriminant with `number`, `slider`, `boolean`, `select`, `choice-set`,
|
|
36
|
-
`color`, `text`, `font`, `svg`, and homogeneous `array` variants. A `slider` requires `min`, `max`, and
|
|
34
|
+
`color`, `text`, `font`, `svg`, `profile`, and homogeneous `array` variants. A `slider` requires `min`, `max`, and
|
|
37
35
|
`step`, while a `number` may omit any of those constraints. Visibility uses serializable
|
|
38
36
|
`ConditionExpression` values; `evaluateCondition` supports `all`, `any`, `not`,
|
|
39
37
|
equality/inequality, numeric comparisons, and `choice-set` membership through `contains`.
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
Define controls once, then normalize saved values or strictly parse boundary values:
|
|
42
40
|
|
|
43
41
|
```ts
|
|
44
42
|
import {
|
|
@@ -49,16 +47,27 @@ import {
|
|
|
49
47
|
type GeneratorParams,
|
|
50
48
|
} from "@metamesh/generator-sdk";
|
|
51
49
|
|
|
52
|
-
const definition = defineGenerator({
|
|
50
|
+
const definition = defineGenerator({
|
|
51
|
+
id: "sleeve",
|
|
52
|
+
version: "0.1.0",
|
|
53
|
+
title: "Sleeve",
|
|
54
|
+
groups: [],
|
|
55
|
+
parameters: [
|
|
56
|
+
{ id: "outerDiameter", label: "Outer diameter", type: "number", default: 20, min: 4 },
|
|
57
|
+
{ id: "boreDiameter", label: "Bore diameter", type: "number", default: 10, min: 1 },
|
|
58
|
+
],
|
|
59
|
+
});
|
|
53
60
|
type Parameters = GeneratorParams<typeof definition>;
|
|
54
61
|
|
|
62
|
+
const persistedValues: Readonly<Record<string, unknown>> = { outerDiameter: 24 };
|
|
55
63
|
const { parameters, validation } = prepareParameters(definition, persistedValues);
|
|
64
|
+
const workerValues: unknown = { outerDiameter: 24, boreDiameter: 10 };
|
|
56
65
|
const strictParameters = createParamCodec(definition).parse(workerValues);
|
|
57
66
|
```
|
|
58
67
|
|
|
59
68
|
Normalization drops unknown parameter-value keys, fills missing or invalid values from each
|
|
60
69
|
parameter's declared `default`, clamps numbers, and returns a fresh frozen map. Strict codecs instead
|
|
61
|
-
reject missing, unknown, invalid, or noncanonical values and return cloned frozen
|
|
70
|
+
reject missing, unknown, invalid, or noncanonical values and return cloned frozen structured values.
|
|
62
71
|
`prepareParameters()` normalizes once and returns that same canonical map with the combined schema
|
|
63
72
|
and Generator-owned validation result. Definitions accept only canonical parameter types. SVG runtime values remain
|
|
64
73
|
standard strings and are limited to 256 KiB each and 512 KiB per normalized project.
|
|
@@ -135,13 +144,93 @@ Downloaded manifests remain callback-free and do not define a validation rules l
|
|
|
135
144
|
validation receives normalized, frozen values. Its issue array is strictly checked and bounded;
|
|
136
145
|
malformed output is a runtime error rather than a user-facing validation result.
|
|
137
146
|
|
|
138
|
-
|
|
139
|
-
to derive a fresh frozen value map from parameter definitions. IDs are bounded safe keys; package
|
|
147
|
+
Use `getDefaultParameters(definition)` to derive a fresh frozen defaults map. IDs are bounded safe keys; package
|
|
140
148
|
manifests, definitions, descriptors, conditions, and nested parameter objects reject unknown fields.
|
|
141
149
|
Definitions are bounded to 64 groups and 256 parameters, arrays to 1,024 items, options to 512,
|
|
142
|
-
presets to 256, and condition composition to 8 levels with 32 children per node.
|
|
143
|
-
|
|
144
|
-
|
|
150
|
+
presets to 256, and condition composition to 8 levels with 32 children per node.
|
|
151
|
+
|
|
152
|
+
### Editable side profiles
|
|
153
|
+
|
|
154
|
+
A `profile` declares an open side outline as a versioned `ProfileValue`. Its start and each segment
|
|
155
|
+
end are anchors with normalized `radius` and upward `height` coordinates, plus `mode` (`auto`,
|
|
156
|
+
`smooth`, or `corner`) to retain editing intent. A segment is either `line` or `cubic`; cubic
|
|
157
|
+
segments carry explicit `control1` and `control2` points. Explicit coordinates always define the
|
|
158
|
+
shape; hosts must write resolved tangents into the controls when editing automatic points.
|
|
159
|
+
|
|
160
|
+
```ts
|
|
161
|
+
const sideProfile = {
|
|
162
|
+
id: "sideProfile",
|
|
163
|
+
label: "Side profile",
|
|
164
|
+
type: "profile",
|
|
165
|
+
radiusScale: { parameterId: "diameter", factor: 0.5 },
|
|
166
|
+
heightScale: { parameterId: "height", factor: 1 },
|
|
167
|
+
default: {
|
|
168
|
+
version: 1,
|
|
169
|
+
start: { radius: 0.4, height: 0, mode: "corner" },
|
|
170
|
+
segments: [
|
|
171
|
+
{
|
|
172
|
+
type: "cubic",
|
|
173
|
+
control1: { radius: 0.4, height: 0.35 },
|
|
174
|
+
control2: { radius: 1, height: 0.75 },
|
|
175
|
+
end: { radius: 0.6, height: 1, mode: "auto" },
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
} as const;
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Every coordinate is finite and lies in `[0, 1]`. The start height is `0`, the last height is `1`,
|
|
183
|
+
and anchor heights increase strictly. Cubic control heights satisfy
|
|
184
|
+
`start.height <= control1.height <= control2.height <= end.height`, keeping the curve upward.
|
|
185
|
+
A profile has 1–31 segments. It has no SVG markup, sampled polygon, arbitrary closed paths, or
|
|
186
|
+
holes; the Generator owns physical scaling, mounting features, closure, and manufacturing checks.
|
|
187
|
+
|
|
188
|
+
Optional `radiusScale` and `heightScale` bindings describe physical measurements for host controls:
|
|
189
|
+
each references a declared `number` or `slider` in millimetres with a positive default and explicit
|
|
190
|
+
positive minimum, multiplied by a positive finite `factor`. Bindings do not transform saved profile
|
|
191
|
+
values; Generators consume the same normalized outline when resolving their dimensions. Omitting
|
|
192
|
+
bindings leaves the editor in normalized coordinates.
|
|
193
|
+
|
|
194
|
+
`isProfileValue()` strictly checks the complete bounded shape without evaluating getters.
|
|
195
|
+
`cloneProfileValue()` returns a fresh deeply frozen value, and `profileValuesEqual()` compares both
|
|
196
|
+
shape and editing intent. Normalization, strict codecs, defaults, and presets clone every nested
|
|
197
|
+
profile object. Invalid saved profiles recover to the declared default; strict boundaries reject
|
|
198
|
+
them. Profiles cannot be condition operands. Profile parameters require runtime `1.3.0` or later;
|
|
199
|
+
package format remains `1`.
|
|
200
|
+
|
|
201
|
+
### Curve resolution
|
|
202
|
+
|
|
203
|
+
A `number` or `slider` may declare `role: "curve-resolution"` to identify the model's maximum
|
|
204
|
+
sampled curve deviation in millimetres. Hosts may present this input in a dedicated curve fidelity
|
|
205
|
+
control. It remains an ordinary Generator parameter with the same saved values, presets,
|
|
206
|
+
normalization, validation, and manufacturing exports.
|
|
207
|
+
|
|
208
|
+
```ts
|
|
209
|
+
const curveDeviation = {
|
|
210
|
+
id: "curveDeviation",
|
|
211
|
+
label: "Curve deviation",
|
|
212
|
+
type: "number",
|
|
213
|
+
role: "curve-resolution",
|
|
214
|
+
unit: "mm",
|
|
215
|
+
default: 0.05,
|
|
216
|
+
min: 0.01,
|
|
217
|
+
max: 0.2,
|
|
218
|
+
step: 0.005,
|
|
219
|
+
} as const;
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Multiple controls per definition may have this role. Each requires `unit: "mm"`, a positive `default`,
|
|
223
|
+
and an explicit positive `min`; existing numeric bounds and step rules still apply. Lower values
|
|
224
|
+
request closer curve approximation. The Generator consumes the value in its physical
|
|
225
|
+
`GeometryResolution` policy and retains local exact counts where topology requires them. Hosts
|
|
226
|
+
edit the saved parameters directly and present their authored labels in definition order; preview
|
|
227
|
+
and manufacturing use the same values. The Generator decides which curves or parts each parameter
|
|
228
|
+
affects, including shared curves across several parts. Studio does not infer part overrides from
|
|
229
|
+
mesh IDs. Resolution requests exceeding model complexity
|
|
230
|
+
limits must fail explicitly instead of silently coarsening geometry.
|
|
231
|
+
|
|
232
|
+
Packages declaring this role require runtime `1.3.0` or later and retain package format `1` and the
|
|
233
|
+
existing five module exports. Definitions without the role retain their existing behavior.
|
|
145
234
|
|
|
146
235
|
## Compiled module and output boundary
|
|
147
236
|
|
|
@@ -179,14 +268,15 @@ issues. Successful results may contain warnings but no errors; invalid results r
|
|
|
179
268
|
The model callback receives `generate(parameters, context, services, preparedValue)`. The returned
|
|
180
269
|
module still exports exactly the same five fields and uses the unchanged host call signatures.
|
|
181
270
|
|
|
182
|
-
Preparation
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
271
|
+
Preparation accepts finite scalar data, plain objects, and arrays, which the helper checks and
|
|
272
|
+
freezes. It rejects functions, accessors, cycles, promises, class instances, typed arrays, and live
|
|
273
|
+
WASM objects, with traversal bounded to 1,000,000 values and 64 levels.
|
|
274
|
+
|
|
275
|
+
The helper may reuse one successful validation result for the next generation when the exact
|
|
276
|
+
deeply frozen parameters and frozen services/provider objects match. Different or mutable objects
|
|
277
|
+
and direct generation prepare afresh; later calls and failures clear the retained result. Generators
|
|
278
|
+
still own geometry complexity limits. See the [helper source](https://github.com/JasonKoolman/metamesh/blob/main/packages/generator-sdk/src/prepared-generator-module.ts) for
|
|
279
|
+
the reuse checks.
|
|
190
280
|
|
|
191
281
|
Call `parseGeneratedParts()` on executable output before downstream mesh work. It accepts only
|
|
192
282
|
non-empty arrays of uniquely identified parts backed by transferable `Float32Array` and
|
|
@@ -207,18 +297,15 @@ monotonic request IDs. Validation errors are structured normal results; only act
|
|
|
207
297
|
validator, generator, or exporter exceptions use error envelopes. `GeneratedModel` contains only
|
|
208
298
|
structured data and transferable typed arrays—never live Manifold objects. A model can contain
|
|
209
299
|
multiple `GeneratedPart` entries and includes bounds, warnings, and optional statistics. Studio
|
|
210
|
-
supplies export filenames and the
|
|
300
|
+
supplies export filenames and the `MeshTopologyMode` selected in device preferences; generators supply semantic part
|
|
211
301
|
IDs and colors. `original` preserves the generated final triangles, while `optimized` permits
|
|
212
302
|
Studio's bounded planar-only topology pass after generation. This runtime choice is not a Generator
|
|
213
303
|
parameter, package field, or persisted Project contract.
|
|
214
304
|
|
|
215
|
-
##
|
|
305
|
+
## Development
|
|
216
306
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
transferable typed-array buffers.
|
|
220
|
-
- Conditions are data expressions, not callbacks.
|
|
221
|
-
- Validation returns structured issues rather than UI-ready strings or thrown user errors.
|
|
307
|
+
Keep this package independent of React, Zustand, Three.js, Manifold, DOM, and Web Worker APIs.
|
|
308
|
+
The [workspace instructions](https://github.com/JasonKoolman/metamesh/blob/main/packages/generator-sdk/AGENTS.md) own contract review and required checks.
|
|
222
309
|
|
|
223
310
|
## License
|
|
224
311
|
|
package/dist/contracts.d.ts
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import type { FontSelection } from "./fonts.js";
|
|
2
2
|
import type { ParameterGroup, GeneratorDefinition as ParsedGeneratorDefinition } from "./generator-package/schemas/definition.schema.js";
|
|
3
|
-
import type { ArrayParameterDefinition, BooleanParameterDefinition, ChoiceSetParameterDefinition, ColorParameterDefinition, FontParameterDefinition, NumberArrayItemDefinition, NumberArrayParameterDefinition, NumberParameterDefinition, NumericParameterDefinition, ParameterDefinition, SelectOption, SelectParameterDefinition, SliderParameterDefinition, StringArrayItemDefinition, StringArrayParameterDefinition, SvgParameterDefinition, TextParameterDefinition } from "./generator-package/schemas/parameter.schema.js";
|
|
3
|
+
import type { ArrayParameterDefinition, BooleanParameterDefinition, ChoiceSetParameterDefinition, ColorParameterDefinition, FontParameterDefinition, NumberArrayItemDefinition, NumberArrayParameterDefinition, NumberParameterDefinition, NumericParameterDefinition, ParameterDefinition, ProfileParameterDefinition, ProfileScaleReference, SelectOption, SelectParameterDefinition, SliderParameterDefinition, StringArrayItemDefinition, StringArrayParameterDefinition, SvgParameterDefinition, TextParameterDefinition } from "./generator-package/schemas/parameter.schema.js";
|
|
4
4
|
import type { GeneratorRuntimeReference } from "./generator-packages.js";
|
|
5
5
|
import type { GeneratorServices } from "./generator-services.js";
|
|
6
|
-
|
|
6
|
+
import type { ProfileValue } from "./profiles.js";
|
|
7
|
+
export type { ArrayParameterDefinition, FontParameterDefinition, BooleanParameterDefinition, ChoiceSetParameterDefinition, ColorParameterDefinition, NumberArrayItemDefinition, NumberArrayParameterDefinition, NumberParameterDefinition, NumericParameterDefinition, ParameterDefinition, ParameterGroup, ProfileParameterDefinition, ProfileScaleReference, SelectOption, SelectParameterDefinition, StringArrayItemDefinition, StringArrayParameterDefinition, SvgParameterDefinition, SliderParameterDefinition, TextParameterDefinition, };
|
|
7
8
|
export type ScalarParameterValue = number | boolean | string;
|
|
8
|
-
export type ParameterValue = ScalarParameterValue | readonly number[] | readonly string[] | FontSelection;
|
|
9
|
+
export type ParameterValue = ScalarParameterValue | readonly number[] | readonly string[] | FontSelection | ProfileValue;
|
|
9
10
|
export type ParameterValues = Readonly<Record<string, ParameterValue>>;
|
|
10
11
|
type ParameterValueFor<Parameter extends ParameterDefinition> = Parameter extends {
|
|
11
12
|
readonly type: "font";
|
|
12
13
|
} ? FontSelection : Parameter extends {
|
|
14
|
+
readonly type: "profile";
|
|
15
|
+
} ? ProfileValue : Parameter extends {
|
|
13
16
|
readonly type: "number" | "slider";
|
|
14
17
|
} ? number : Parameter extends {
|
|
15
18
|
readonly type: "boolean";
|
package/dist/contracts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,a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,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC9B;AAED,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAEjF,MAAM,MAAM,cAAc,GACtB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,aAAa,GACb,eAAe,GACf,eAAe,GACf,WAAW,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const METAMESH_RUNTIME_VERSION = "1.
|
|
1
|
+
export declare const METAMESH_RUNTIME_VERSION = "1.3.0";
|
|
2
2
|
export declare const GENERATOR_PACKAGE_FORMAT_VERSION = 1;
|
|
3
3
|
export declare const MAX_GENERATOR_PACKAGE_BYTES: number;
|
|
4
4
|
/** Portable metadata limits enforced before package content reaches Studio. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const METAMESH_RUNTIME_VERSION = "1.
|
|
1
|
+
export const METAMESH_RUNTIME_VERSION = "1.3.0";
|
|
2
2
|
export const GENERATOR_PACKAGE_FORMAT_VERSION = 1;
|
|
3
3
|
export const MAX_GENERATOR_PACKAGE_BYTES = 5 * 1024 * 1024;
|
|
4
4
|
/** Portable metadata limits enforced before package content reaches Studio. */
|
|
@@ -31,6 +31,7 @@ export declare const generatorDefinitionSchema: z.ZodObject<{
|
|
|
31
31
|
max: z.ZodOptional<z.ZodNumber>;
|
|
32
32
|
step: z.ZodOptional<z.ZodNumber>;
|
|
33
33
|
default: z.ZodNumber;
|
|
34
|
+
role: z.ZodOptional<z.ZodLiteral<"curve-resolution">>;
|
|
34
35
|
id: z.ZodString;
|
|
35
36
|
label: z.ZodString;
|
|
36
37
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -43,6 +44,7 @@ export declare const generatorDefinitionSchema: z.ZodObject<{
|
|
|
43
44
|
max: z.ZodNumber;
|
|
44
45
|
step: z.ZodNumber;
|
|
45
46
|
default: z.ZodNumber;
|
|
47
|
+
role: z.ZodOptional<z.ZodLiteral<"curve-resolution">>;
|
|
46
48
|
id: z.ZodString;
|
|
47
49
|
label: z.ZodString;
|
|
48
50
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -115,6 +117,23 @@ export declare const generatorDefinitionSchema: z.ZodObject<{
|
|
|
115
117
|
group: z.ZodOptional<z.ZodString>;
|
|
116
118
|
unit: z.ZodOptional<z.ZodString>;
|
|
117
119
|
visibleWhen: z.ZodOptional<z.ZodType<import("../../conditions.js").ConditionExpression, unknown, z.core.$ZodTypeInternals<import("../../conditions.js").ConditionExpression, unknown>>>;
|
|
120
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
121
|
+
type: z.ZodLiteral<"profile">;
|
|
122
|
+
default: z.ZodPipe<z.ZodCustom<import("../../profiles.js").ProfileValue, import("../../profiles.js").ProfileValue>, z.ZodTransform<import("../../profiles.js").ProfileValue, import("../../profiles.js").ProfileValue>>;
|
|
123
|
+
radiusScale: z.ZodOptional<z.ZodObject<{
|
|
124
|
+
parameterId: z.ZodString;
|
|
125
|
+
factor: z.ZodNumber;
|
|
126
|
+
}, z.core.$strict>>;
|
|
127
|
+
heightScale: z.ZodOptional<z.ZodObject<{
|
|
128
|
+
parameterId: z.ZodString;
|
|
129
|
+
factor: z.ZodNumber;
|
|
130
|
+
}, z.core.$strict>>;
|
|
131
|
+
id: z.ZodString;
|
|
132
|
+
label: z.ZodString;
|
|
133
|
+
description: z.ZodOptional<z.ZodString>;
|
|
134
|
+
group: z.ZodOptional<z.ZodString>;
|
|
135
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
136
|
+
visibleWhen: z.ZodOptional<z.ZodType<import("../../conditions.js").ConditionExpression, unknown, z.core.$ZodTypeInternals<import("../../conditions.js").ConditionExpression, unknown>>>;
|
|
118
137
|
}, z.core.$strict>, z.ZodObject<{
|
|
119
138
|
type: z.ZodLiteral<"array">;
|
|
120
139
|
default: z.ZodUnion<readonly [z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.schema.d.ts","sourceRoot":"","sources":["../../../src/generator-package/schemas/definition.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,oBAAoB;;;;;kBAK/B,CAAC;AAEH,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"definition.schema.d.ts","sourceRoot":"","sources":["../../../src/generator-package/schemas/definition.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,oBAAoB;;;;;kBAK/B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAOpC,CAAC;AAEH,KAAK,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,GACpD,SAAS,YAAY,CAAC,IAAI,CAAC,EAAE,GAC7B,CAAC,SAAS,MAAM,GACd;IAAE,QAAQ,EAAE,GAAG,IAAI,MAAM,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAAE,GACnD,CAAC,CAAC;AAER,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC;AACjF,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC,CAAC"}
|