@metamesh/generator-sdk 0.15.0 → 0.17.0
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 +63 -0
- package/README.md +10 -8
- package/dist/docs/guides/authoring.md +12 -16
- package/dist/docs/guides/package.md +10 -8
- package/dist/docs/guides/parameters.md +47 -52
- package/dist/docs/manifest.json +39 -6
- package/dist/docs/reference/fonts/FontSelection.md +1 -1
- package/dist/docs/reference/fonts/isFontSelection.md +1 -1
- package/dist/docs/reference/index/ArrayParameterDefinition.md +1 -1
- package/dist/docs/reference/index/BaseParameterDefinition.md +1 -1
- package/dist/docs/reference/index/BooleanParameterDefinition.md +1 -1
- package/dist/docs/reference/index/ChoiceOption.md +1 -1
- package/dist/docs/reference/index/ChoiceParameterDefinition.md +1 -1
- package/dist/docs/reference/index/ChoiceSetParameterDefinition.md +1 -1
- package/dist/docs/reference/index/ColorParameterDefinition.md +1 -1
- package/dist/docs/reference/index/ConditionExpression.md +1 -1
- package/dist/docs/reference/index/ContourAnchor.md +1 -1
- package/dist/docs/reference/index/ContourParameterDefinition.md +1 -1
- package/dist/docs/reference/index/ContourParameterUi.md +1 -1
- package/dist/docs/reference/index/ContourPoint.md +1 -1
- package/dist/docs/reference/index/ContourSegment.md +1 -1
- package/dist/docs/reference/index/ContourValue.md +1 -1
- package/dist/docs/reference/index/FontParameterDefinition.md +1 -1
- package/dist/docs/reference/index/FontSelection.md +1 -1
- package/dist/docs/reference/index/GeneratorDefinition.md +1 -1
- package/dist/docs/reference/index/GeneratorIssue.md +1 -1
- package/dist/docs/reference/index/GeneratorModule.md +1 -1
- package/dist/docs/reference/index/GeneratorModuleOptions.md +1 -1
- package/dist/docs/reference/index/GeneratorParamId.md +1 -1
- package/dist/docs/reference/index/GeneratorParams.md +1 -1
- package/dist/docs/reference/index/GeneratorPreset.md +1 -1
- package/dist/docs/reference/index/GeneratorProgram.md +3 -3
- package/dist/docs/reference/index/GeneratorServices.md +1 -1
- package/dist/docs/reference/index/GeneratorTextArcBaseline.md +1 -1
- package/dist/docs/reference/index/GeneratorTextLayout.md +1 -1
- package/dist/docs/reference/index/GeneratorTextMetrics.md +1 -1
- package/dist/docs/reference/index/GeneratorTextOptions.md +1 -1
- package/dist/docs/reference/index/MAX_CONTOUR_SEGMENTS.md +1 -1
- package/dist/docs/reference/index/MAX_SIDE_PROFILE_SEGMENTS.md +1 -1
- package/dist/docs/reference/index/NumberArrayItemDefinition.md +1 -1
- package/dist/docs/reference/index/NumberArrayParameterDefinition.md +1 -1
- package/dist/docs/reference/index/NumberParameterDefinition.md +1 -1
- package/dist/docs/reference/index/NumberParameterUi.md +1 -1
- package/dist/docs/reference/index/ParameterDefinition.md +1 -1
- package/dist/docs/reference/index/ParameterDefinitionDocument.md +1 -1
- package/dist/docs/reference/index/ParameterGroup.md +1 -1
- package/dist/docs/reference/index/ParameterIssue.md +1 -1
- package/dist/docs/reference/index/ParameterIssueCode.md +1 -1
- package/dist/docs/reference/index/ParameterIssueSeverity.md +1 -1
- package/dist/docs/reference/index/ParameterScaleReference.md +1 -1
- package/dist/docs/reference/index/ParameterUi.md +1 -1
- package/dist/docs/reference/index/ParameterValidationResult.md +1 -1
- package/dist/docs/reference/index/ParameterValue.md +1 -1
- package/dist/docs/reference/index/ParameterValues.md +1 -1
- package/dist/docs/reference/index/RowParameterUi.md +1 -1
- package/dist/docs/reference/index/ScalarParameterValue.md +1 -1
- package/dist/docs/reference/index/SideProfileAnchor.md +1 -1
- package/dist/docs/reference/index/SideProfileParameterDefinition.md +1 -1
- package/dist/docs/reference/index/SideProfileParameterUi.md +1 -1
- package/dist/docs/reference/index/SideProfilePoint.md +1 -1
- package/dist/docs/reference/index/SideProfileSegment.md +1 -1
- package/dist/docs/reference/index/SideProfileValue.md +1 -1
- package/dist/docs/reference/index/SourceVisibility.md +1 -1
- package/dist/docs/reference/index/StringArrayItemDefinition.md +1 -1
- package/dist/docs/reference/index/StringArrayParameterDefinition.md +1 -1
- package/dist/docs/reference/index/SvgParameterDefinition.md +1 -1
- package/dist/docs/reference/index/TextParameterDefinition.md +1 -1
- package/dist/docs/reference/index/UNPREPARED_GENERATOR_SERVICES.md +1 -1
- package/dist/docs/reference/index/cloneContourValue.md +1 -1
- package/dist/docs/reference/index/cloneSideProfileValue.md +1 -1
- package/dist/docs/reference/index/contourValuesEqual.md +1 -1
- package/dist/docs/reference/index/defineGenerator.md +1 -1
- package/dist/docs/reference/index/defineGeneratorModule.md +1 -1
- package/dist/docs/reference/index/definePresets.md +1 -1
- package/dist/docs/reference/index/evaluateCondition.md +1 -1
- package/dist/docs/reference/index/isContourValue.md +1 -1
- package/dist/docs/reference/index/isFontSelection.md +1 -1
- package/dist/docs/reference/index/isSideProfileValue.md +1 -1
- package/dist/docs/reference/index/sideProfileValuesEqual.md +1 -1
- package/dist/docs/reference/modeling/defineGeneratorModel.md +14 -0
- package/dist/docs/reference/packages/GENERATOR_PACKAGE_FORMAT_VERSION.md +1 -1
- package/dist/docs/reference/packages/GeneratorAccess.md +1 -1
- package/dist/docs/reference/packages/GeneratorDefinitionIssue.md +1 -1
- package/dist/docs/reference/packages/GeneratorDefinitionParseResult.md +1 -1
- package/dist/docs/reference/packages/GeneratorDescriptor.md +1 -1
- package/dist/docs/reference/packages/GeneratorPackageManifest.md +1 -1
- package/dist/docs/reference/packages/GeneratorPackageSource.md +1 -1
- package/dist/docs/reference/packages/GeneratorPackageValidationError.md +1 -1
- package/dist/docs/reference/packages/GeneratorPreset.md +1 -1
- package/dist/docs/reference/packages/GeneratorRuntimeReference.md +1 -1
- package/dist/docs/reference/packages/InstalledGenerator.md +1 -1
- package/dist/docs/reference/packages/MAX_ARRAY_ITEMS.md +1 -1
- package/dist/docs/reference/packages/MAX_CONDITION_BRANCHES.md +1 -1
- package/dist/docs/reference/packages/MAX_CONDITION_DEPTH.md +1 -1
- package/dist/docs/reference/packages/MAX_DESCRIPTOR_LIST_ITEMS.md +1 -1
- package/dist/docs/reference/packages/MAX_GENERATOR_ID_LENGTH.md +1 -1
- package/dist/docs/reference/packages/MAX_GENERATOR_PACKAGE_BYTES.md +1 -1
- package/dist/docs/reference/packages/MAX_GENERATOR_PRESETS.md +1 -1
- package/dist/docs/reference/packages/MAX_METADATA_TEXT_LENGTH.md +1 -1
- package/dist/docs/reference/packages/MAX_PARAMETERS.md +1 -1
- package/dist/docs/reference/packages/MAX_PARAMETER_GROUPS.md +1 -1
- package/dist/docs/reference/packages/MAX_PARAMETER_OPTIONS.md +1 -1
- package/dist/docs/reference/packages/MAX_TEXT_PARAMETER_LENGTH.md +1 -1
- package/dist/docs/reference/packages/METAMESH_RUNTIME_VERSION.md +2 -2
- package/dist/docs/reference/packages/compareSemanticVersions.md +1 -1
- package/dist/docs/reference/packages/definitionIssuesFromZod.md +1 -1
- package/dist/docs/reference/packages/isRuntimeCompatible.md +1 -1
- package/dist/docs/reference/packages/parseGeneratorDefinition.md +1 -1
- package/dist/docs/reference/packages/parseGeneratorDescriptor.md +1 -1
- package/dist/docs/reference/packages/parseGeneratorPackageManifest.md +1 -1
- package/dist/docs/reference/packages/parseParameterDefinitionDocument.md +1 -1
- package/dist/docs/reference/packages/safeParseGeneratorDefinition.md +1 -1
- package/dist/docs/reference/packages/safeParseParameterDefinitionDocument.md +1 -1
- package/dist/docs/reference/packages/validateGeneratorPresets.md +1 -1
- package/dist/docs/reference/packages/validationErrorFromIssues.md +1 -1
- package/dist/docs/reference/packages/validationErrorFromZod.md +1 -1
- package/dist/docs/reference/parameters/EMPTY_SVG_PARAMETER_DEFAULT.md +1 -1
- package/dist/docs/reference/parameters/MAX_PARAMETER_ISSUES.md +1 -1
- package/dist/docs/reference/parameters/MAX_PARAMETER_ISSUE_MESSAGE_LENGTH.md +1 -1
- package/dist/docs/reference/parameters/MAX_PROJECT_SVG_PARAMETER_BYTES.md +1 -1
- package/dist/docs/reference/parameters/MAX_SVG_PARAMETER_BYTES.md +1 -1
- package/dist/docs/reference/parameters/ParamCodec.md +1 -1
- package/dist/docs/reference/parameters/ParamDecodeCode.md +1 -1
- package/dist/docs/reference/parameters/ParamDecodeError.md +1 -1
- package/dist/docs/reference/parameters/ParamDecodeIssue.md +1 -1
- package/dist/docs/reference/parameters/ParamParseResult.md +1 -1
- package/dist/docs/reference/parameters/PreparedParameters.md +1 -1
- package/dist/docs/reference/parameters/aggregateParameterIssues.md +1 -1
- package/dist/docs/reference/parameters/canonicalizeParameters.md +1 -1
- package/dist/docs/reference/parameters/createParamCodec.md +1 -1
- package/dist/docs/reference/parameters/getDefaultParameters.md +1 -1
- package/dist/docs/reference/parameters/normalizeParameters.md +1 -1
- package/dist/docs/reference/parameters/parameterValueEquals.md +1 -1
- package/dist/docs/reference/parameters/parseParameterIssues.md +1 -1
- package/dist/docs/reference/parameters/prepareParameters.md +1 -1
- package/dist/docs/reference/parameters/svgParameterBytes.md +1 -1
- package/dist/docs/reference/parameters/validateParameters.md +1 -1
- package/dist/docs/reference/runtime/ExecuteGeneratorOptions.md +1 -1
- package/dist/docs/reference/runtime/Export3mfRequest.md +1 -1
- package/dist/docs/reference/runtime/ExportError.md +1 -1
- package/dist/docs/reference/runtime/ExportSuccess.md +1 -1
- package/dist/docs/reference/runtime/ExportedFile.md +1 -1
- package/dist/docs/reference/runtime/GenerateRequest.md +1 -1
- package/dist/docs/reference/runtime/GeneratedModel.md +1 -1
- package/dist/docs/reference/runtime/GeneratedModelDelivery.md +1 -1
- package/dist/docs/reference/runtime/GeneratedPart.md +1 -1
- package/dist/docs/reference/runtime/GeneratedPartDelivery.md +1 -1
- package/dist/docs/reference/runtime/GeneratedPartsDecoder.md +1 -1
- package/dist/docs/reference/runtime/GeneratedPartsLimits.md +1 -1
- package/dist/docs/reference/runtime/GenerationError.md +1 -1
- package/dist/docs/reference/runtime/GenerationInvalid.md +1 -1
- package/dist/docs/reference/runtime/GenerationSuccess.md +1 -1
- package/dist/docs/reference/runtime/GeneratorExecutionGenerated.md +1 -1
- package/dist/docs/reference/runtime/GeneratorExecutionInvalid.md +1 -1
- package/dist/docs/reference/runtime/GeneratorExecutionResult.md +1 -1
- package/dist/docs/reference/runtime/MeshTopologyMode.md +1 -1
- package/dist/docs/reference/runtime/ModelBounds.md +1 -1
- package/dist/docs/reference/runtime/ModelStats.md +1 -1
- package/dist/docs/reference/runtime/ModelTimings.md +1 -1
- package/dist/docs/reference/runtime/ParsedGeneratorModule.md +1 -1
- package/dist/docs/reference/runtime/RuntimeError.md +1 -1
- package/dist/docs/reference/runtime/ValidateRequest.md +1 -1
- package/dist/docs/reference/runtime/ValidationError.md +1 -1
- package/dist/docs/reference/runtime/ValidationSuccess.md +1 -1
- package/dist/docs/reference/runtime/WorkerRequest.md +1 -1
- package/dist/docs/reference/runtime/WorkerResponse.md +1 -1
- package/dist/docs/reference/runtime/executeGenerator.md +1 -1
- package/dist/docs/reference/runtime/generationIssues.md +1 -1
- package/dist/docs/reference/runtime/isGeneratorModule.md +1 -1
- package/dist/docs/reference/runtime/parseGeneratedParts.md +1 -1
- package/dist/docs/reference/runtime/parseGenerationSentAt.md +1 -1
- package/dist/docs/reference/runtime/parseGeneratorModule.md +1 -1
- package/dist/generator-module.d.ts +1 -1
- package/dist/generator-module.d.ts.map +1 -1
- package/dist/generator-package/constants.d.ts +1 -1
- package/dist/generator-package/constants.d.ts.map +1 -1
- package/dist/generator-package/constants.js +2 -1
- package/dist/generator-package/constants.js.map +1 -1
- package/dist/generator-package/versions.spec.d.ts +2 -0
- package/dist/generator-package/versions.spec.d.ts.map +1 -0
- package/dist/generator-package/versions.spec.js +12 -0
- package/dist/generator-package/versions.spec.js.map +1 -0
- package/dist/modeling.d.ts +11 -0
- package/dist/modeling.d.ts.map +1 -0
- package/dist/modeling.js +11 -0
- package/dist/modeling.js.map +1 -0
- package/package.json +14 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
# @metamesh/generator-sdk
|
|
2
2
|
|
|
3
|
+
## 0.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add `defineGeneratorModel(definition, callback)` through the optional
|
|
8
|
+
`@metamesh/generator-sdk/modeling` adapter. It infers controls, synchronous services, and diagnostic
|
|
9
|
+
parameter IDs while leaving the SDK root independent of the Modeling runtime.
|
|
10
|
+
|
|
11
|
+
Add `runner.withModel(parameters, callback)` and Testkit's `withModel(program, parameters, callback,
|
|
12
|
+
options?)` for scoped assertions. Both await synchronous or asynchronous callbacks and release
|
|
13
|
+
their snapshot in `finally`; the plain-model helper also releases its temporary session.
|
|
14
|
+
Generator validation failures throw the existing structured `GenerationError` diagnostics.
|
|
15
|
+
|
|
16
|
+
Migration tip: replace private definition-plus-`generate` wrappers with the SDK adapter, and use
|
|
17
|
+
scoped callbacks instead of repeated successful-result narrowing and snapshot disposal. Keep
|
|
18
|
+
`runner.execute` and direct engine sessions for tests that inspect invalid results, cache behavior,
|
|
19
|
+
or explicit snapshot ownership. Prepared services are required for plain models that declare them.
|
|
20
|
+
|
|
21
|
+
Scoped callbacks retain snapshot parts without eagerly copying their buffers. For cross-run
|
|
22
|
+
geometry comparisons, select manufacturing fields rather than transient geometry resource IDs.
|
|
23
|
+
Capture `positions` and `indices` once before dense traversal: each accessor read returns a copy.
|
|
24
|
+
|
|
25
|
+
- Add deferred `holeCutter` recipes for circular screw holes and existing Section pocket profiles.
|
|
26
|
+
Circular cutters support counterbores and countersinks; convex single-contour profiles support
|
|
27
|
+
45-degree entry chamfers. Explicit `overrun.bottom` and `overrun.top` preserve blind-pocket floors
|
|
28
|
+
unless the caller deliberately extends the cutter.
|
|
29
|
+
Circular entry chamfers retain nominal circular radii; Section entry chamfers offset the supplied
|
|
30
|
+
sampled contour's edges.
|
|
31
|
+
|
|
32
|
+
Advance the Modeling host runtime to major 9 for hole cutters and fitted SVG recipe options.
|
|
33
|
+
Rebuild Generator packages against the new library set; old host/runtime packages are rejected.
|
|
34
|
+
|
|
35
|
+
Migration tip: reuse `regularPolygon`, `rectangle`, or other Section constructors as the cutter's
|
|
36
|
+
`profile`. Position a blind cutter at its intended floor and set only `overrun.top` for opening
|
|
37
|
+
padding. Keep allowances, minimum floor thickness and feature-specific assertions in your model.
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- Updated dependencies
|
|
42
|
+
- Updated dependencies [d0cc194]
|
|
43
|
+
- Updated dependencies
|
|
44
|
+
- Updated dependencies
|
|
45
|
+
- @metamesh/modeling@0.17.0
|
|
46
|
+
|
|
47
|
+
## 0.16.0
|
|
48
|
+
|
|
49
|
+
### Minor Changes
|
|
50
|
+
|
|
51
|
+
- fbd7276: Standardize immutable value interchange on domain names, Data representations, Input construction
|
|
52
|
+
forms, and toData(). Rename vector tuples and transform matrices to Vector2Data/Vector3Data and
|
|
53
|
+
Transform2Data/Transform3Data. Path2Data and Path3Data now preserve dimension, points, and closure;
|
|
54
|
+
path factories accept complete data records as well as coordinate collections. Advance the host
|
|
55
|
+
runtime to major 8 for the new value protocol, and update consumers, examples, and references.
|
|
56
|
+
- 1585391: Add immutable `bounds2()` and `bounds3()` values with fluent measurements, positioned containment,
|
|
57
|
+
and plain-data conversion. Path bounds now return these values. Rename plain bounds records to
|
|
58
|
+
`Bounds2Data` and `Bounds3Data` across geometry, model snapshots, CLI captures, and Testkit contracts.
|
|
59
|
+
Bounds values in recipe inputs and computed data use the runtime 8 value interchange protocol.
|
|
60
|
+
- 29e19a5: Add portable knuckle hinge joint recipes and a pure layout resolver, with captive, inserted-pin,
|
|
61
|
+
and lift-off construction, independent per-half mounting webs, and shared bounded physical sampling.
|
|
62
|
+
Per-half `barrelChamfer` sets the 45-degree outer-rim setback at both ends of every barrel;
|
|
63
|
+
web `zMin` places the lower face in the pin-centered frame, both in millimetres.
|
|
64
|
+
The operation uses the runtime 8 modeling contract.
|
|
65
|
+
|
|
3
66
|
## 0.15.0
|
|
4
67
|
|
|
5
68
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ A definition describes the Generator and its editable parameters. Literal IDs an
|
|
|
22
22
|
you exact parameter types:
|
|
23
23
|
|
|
24
24
|
```ts
|
|
25
|
-
import { defineGenerator
|
|
25
|
+
import { defineGenerator } from "@metamesh/generator-sdk";
|
|
26
26
|
|
|
27
27
|
export const definition = defineGenerator({
|
|
28
28
|
id: "sleeve",
|
|
@@ -34,7 +34,6 @@ export const definition = defineGenerator({
|
|
|
34
34
|
{ id: "boreDiameter", label: "Bore diameter", type: "number", default: 10, min: 1 },
|
|
35
35
|
],
|
|
36
36
|
});
|
|
37
|
-
type Parameters = GeneratorParams<typeof definition>;
|
|
38
37
|
```
|
|
39
38
|
|
|
40
39
|
Definitions are serializable. Optional `ui` metadata describes grouping, visibility, hints, and
|
|
@@ -45,14 +44,14 @@ for the full set of controls.
|
|
|
45
44
|
|
|
46
45
|
## Generate a model
|
|
47
46
|
|
|
48
|
-
Add a synchronous generation program to the same module.
|
|
49
|
-
|
|
47
|
+
Add a synchronous generation program to the same module. The Modeling adapter infers controls,
|
|
48
|
+
prepared services, and diagnostic parameter IDs from the definition:
|
|
50
49
|
|
|
51
50
|
```ts
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
51
|
+
import { defineGeneratorModel } from "@metamesh/generator-sdk/modeling";
|
|
52
|
+
import { tube } from "@metamesh/modeling";
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
export default defineGeneratorModel(definition, ({ params, assert, part }) => {
|
|
56
55
|
assert(
|
|
57
56
|
params.boreDiameter < params.outerDiameter,
|
|
58
57
|
"The bore must be smaller than the outside diameter.",
|
|
@@ -67,7 +66,6 @@ const model = generate<Parameters>(({ params, assert, part }) => {
|
|
|
67
66
|
})
|
|
68
67
|
);
|
|
69
68
|
});
|
|
70
|
-
export default defineGeneratorModule({ definition, generate: model });
|
|
71
69
|
```
|
|
72
70
|
|
|
73
71
|
Return a single `part(...)` or a readonly array of parts. The host normalizes parameters and prepares
|
|
@@ -75,6 +73,9 @@ assets before generation. Modeling manages geometry, sessions, and snapshots; th
|
|
|
75
73
|
portable definitions, module envelopes, and validated runtime messages. Unsupported package formats
|
|
76
74
|
reject before executable bytes are evaluated.
|
|
77
75
|
|
|
76
|
+
The optional `/modeling` adapter imports Modeling's program helper; other SDK entry points remain
|
|
77
|
+
independent of its runtime. Use `defineGeneratorModule` when binding an existing model program.
|
|
78
|
+
|
|
78
79
|
## Work with saved values
|
|
79
80
|
|
|
80
81
|
Use `normalizeParameters` from `/parameters` to recover saved values: it drops unknown keys,
|
|
@@ -95,6 +96,7 @@ completion; SDK validation also checks references, defaults, and cross-field rul
|
|
|
95
96
|
| `@metamesh/generator-sdk/runtime` | Module execution, mesh data, and Worker messages |
|
|
96
97
|
| `@metamesh/generator-sdk/packages` | Package, catalog, and installation parsing |
|
|
97
98
|
| `@metamesh/generator-sdk/fonts` | Immutable font selection values |
|
|
99
|
+
| `@metamesh/generator-sdk/modeling` | Definition-inferred Modeling programs |
|
|
98
100
|
|
|
99
101
|
Incremental Worker hosts can use `GeneratedPartsDecoder` from `/runtime` to hydrate validated
|
|
100
102
|
geometry resources while checking part metadata and aggregate limits on every delivery. Keep
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Design reusable controls
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Design clear controls, useful defaults, and recoverable validation for a reusable code Project.
|
|
4
4
|
|
|
5
5
|
Turn a working authored Project into a model someone can adjust without reading its source.
|
|
6
6
|
If you need a working model first, follow [Build your first code Project](https://metamesh.studio/docs/develop/code-projects).
|
|
@@ -37,7 +37,7 @@ for supported control types and their configuration.
|
|
|
37
37
|
|
|
38
38
|
## Make labels and units unambiguous
|
|
39
39
|
|
|
40
|
-
Use labels that describe the finished model, such as **Outer
|
|
40
|
+
Use labels that describe the finished model, such as **Outer diameter**, rather than a variable
|
|
41
41
|
name like `d2`. Add a short description when a measurement could have more than one interpretation:
|
|
42
42
|
for example, whether Length includes an end cap.
|
|
43
43
|
|
|
@@ -50,8 +50,8 @@ messages; a clearer label should not require a different identifier.
|
|
|
50
50
|
|
|
51
51
|
## Choose defaults that demonstrate the model
|
|
52
52
|
|
|
53
|
-
Choose
|
|
54
|
-
|
|
53
|
+
Choose defaults that produce a useful, recognizable model without errors and show its important
|
|
54
|
+
features immediately.
|
|
55
55
|
|
|
56
56
|
Try the model from the parameter panel with the code editor closed. Confirm that:
|
|
57
57
|
|
|
@@ -70,13 +70,11 @@ range depends on another control, such as a hole that must fit inside a plate.
|
|
|
70
70
|
|
|
71
71
|
A helpful message identifies the problem and gives a next action: "Reduce Hole diameter or increase
|
|
72
72
|
Width" is more useful than "Invalid parameters." Associate the message with the relevant control.
|
|
73
|
-
Use
|
|
74
|
-
accept. The [validation guide](parameters.md#add-cross-field-validation-in-typescript)
|
|
73
|
+
Use errors for unsupported combinations and warnings for trade-offs the reader can accept. The [validation guide](parameters.md#add-cross-field-validation-in-typescript)
|
|
75
74
|
explains the implementation with examples.
|
|
76
75
|
|
|
77
|
-
Test
|
|
78
|
-
|
|
79
|
-
correction produces a current model again.
|
|
76
|
+
Test the smallest and largest supported dimensions, optional features, and choice or list
|
|
77
|
+
combinations. After an error, confirm that the suggested correction generates a new model.
|
|
80
78
|
|
|
81
79
|
For the plate above, test these decisions separately:
|
|
82
80
|
|
|
@@ -90,9 +88,8 @@ For the plate above, test these decisions separately:
|
|
|
90
88
|
|
|
91
89
|
## Keep related parts understandable
|
|
92
90
|
|
|
93
|
-
Use
|
|
94
|
-
|
|
95
|
-
change. The [part contract](https://metamesh.studio/docs/develop/code-project-contract#parts-and-placement) describes the
|
|
91
|
+
Use stable, descriptive part IDs for related outputs, such as a lid and container, so readers can
|
|
92
|
+
identify them during inspection and export as dimensions change. The [part contract](https://metamesh.studio/docs/develop/code-project-contract#parts-and-placement) describes the
|
|
96
93
|
supported output shape.
|
|
97
94
|
|
|
98
95
|
Inspect each output and check the exported model in its intended downstream tool. A valid solid
|
|
@@ -114,10 +111,9 @@ test runner; the CLI owns compilation and capture tools.
|
|
|
114
111
|
|
|
115
112
|
## Keep a portable copy
|
|
116
113
|
|
|
117
|
-
Save
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
and profile.
|
|
114
|
+
Save a `.metamesh.json` file, then [import it](https://metamesh.studio/docs/use/projects-and-offline#save-and-import-an-authored-project)
|
|
115
|
+
to check its source, controls, and values. Keep the file in storage you control; browser storage
|
|
116
|
+
belongs to one device and profile.
|
|
121
117
|
|
|
122
118
|
A saved Project is not a published catalog Generator. Check
|
|
123
119
|
[publishing availability](https://metamesh.studio/docs/create/publishing-status) if you intend to distribute through
|
|
@@ -22,7 +22,7 @@ A definition describes the Generator and its editable parameters. Literal IDs an
|
|
|
22
22
|
you exact parameter types:
|
|
23
23
|
|
|
24
24
|
```ts
|
|
25
|
-
import { defineGenerator
|
|
25
|
+
import { defineGenerator } from "@metamesh/generator-sdk";
|
|
26
26
|
|
|
27
27
|
export const definition = defineGenerator({
|
|
28
28
|
id: "sleeve",
|
|
@@ -34,7 +34,6 @@ export const definition = defineGenerator({
|
|
|
34
34
|
{ id: "boreDiameter", label: "Bore diameter", type: "number", default: 10, min: 1 },
|
|
35
35
|
],
|
|
36
36
|
});
|
|
37
|
-
type Parameters = GeneratorParams<typeof definition>;
|
|
38
37
|
```
|
|
39
38
|
|
|
40
39
|
Definitions are serializable. Optional `ui` metadata describes grouping, visibility, hints, and
|
|
@@ -45,14 +44,14 @@ for the full set of controls.
|
|
|
45
44
|
|
|
46
45
|
## Generate a model
|
|
47
46
|
|
|
48
|
-
Add a synchronous generation program to the same module.
|
|
49
|
-
|
|
47
|
+
Add a synchronous generation program to the same module. The Modeling adapter infers controls,
|
|
48
|
+
prepared services, and diagnostic parameter IDs from the definition:
|
|
50
49
|
|
|
51
50
|
```ts
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
51
|
+
import { defineGeneratorModel } from "@metamesh/generator-sdk/modeling";
|
|
52
|
+
import { tube } from "@metamesh/modeling";
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
export default defineGeneratorModel(definition, ({ params, assert, part }) => {
|
|
56
55
|
assert(
|
|
57
56
|
params.boreDiameter < params.outerDiameter,
|
|
58
57
|
"The bore must be smaller than the outside diameter.",
|
|
@@ -67,7 +66,6 @@ const model = generate<Parameters>(({ params, assert, part }) => {
|
|
|
67
66
|
})
|
|
68
67
|
);
|
|
69
68
|
});
|
|
70
|
-
export default defineGeneratorModule({ definition, generate: model });
|
|
71
69
|
```
|
|
72
70
|
|
|
73
71
|
Return a single `part(...)` or a readonly array of parts. The host normalizes parameters and prepares
|
|
@@ -75,6 +73,9 @@ assets before generation. Modeling manages geometry, sessions, and snapshots; th
|
|
|
75
73
|
portable definitions, module envelopes, and validated runtime messages. Unsupported package formats
|
|
76
74
|
reject before executable bytes are evaluated.
|
|
77
75
|
|
|
76
|
+
The optional `/modeling` adapter imports Modeling's program helper; other SDK entry points remain
|
|
77
|
+
independent of its runtime. Use `defineGeneratorModule` when binding an existing model program.
|
|
78
|
+
|
|
78
79
|
## Work with saved values
|
|
79
80
|
|
|
80
81
|
Use `normalizeParameters` from `/parameters` to recover saved values: it drops unknown keys,
|
|
@@ -95,6 +96,7 @@ completion; SDK validation also checks references, defaults, and cross-field rul
|
|
|
95
96
|
| `@metamesh/generator-sdk/runtime` | Module execution, mesh data, and Worker messages |
|
|
96
97
|
| `@metamesh/generator-sdk/packages` | Package, catalog, and installation parsing |
|
|
97
98
|
| `@metamesh/generator-sdk/fonts` | Immutable font selection values |
|
|
99
|
+
| `@metamesh/generator-sdk/modeling` | Definition-inferred Modeling programs |
|
|
98
100
|
|
|
99
101
|
Incremental Worker hosts can use `GeneratedPartsDecoder` from `/runtime` to hydrate validated
|
|
100
102
|
geometry resources while checking part metadata and aggregate limits on every delivery. Keep
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Define parameters and validation
|
|
2
2
|
|
|
3
|
-
Define
|
|
3
|
+
Define typed controls, editable profiles, conditional visibility, and validation for an authored Studio Project.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Define controls so readers can adjust a model without editing its source. Studio stores the
|
|
6
|
+
definition as JSON-safe Project data, infers `params` through `generate`, and runs cross-field
|
|
7
|
+
validation in `model.ts`.
|
|
8
8
|
|
|
9
9
|
The JSON document contains required `groups` and `parameters` arrays. A parameter's `type`,
|
|
10
10
|
default, units, bounds, and choices describe its value. Its optional `ui` object describes
|
|
@@ -13,11 +13,10 @@ Number and Slider both use `type: "number"`; a Slider also declares `ui.control:
|
|
|
13
13
|
Options use `type: "choice"`, Side profile uses `type: "side-profile"`, and a closed outline uses
|
|
14
14
|
`type: "contour"`. Changing a numeric widget does not change its saved value or valid range.
|
|
15
15
|
|
|
16
|
-
JSON editing
|
|
17
|
-
|
|
18
|
-
Visual
|
|
19
|
-
|
|
20
|
-
also checks cross-field rules that JSON Schema cannot express.
|
|
16
|
+
JSON editing offers field completion, help, and inline validation, including references to declared
|
|
17
|
+
groups, parameters, and choice values. Fix or discard invalid JSON before applying it or returning
|
|
18
|
+
to Visual. For other editors, use `@metamesh/generator-sdk/parameters.schema.json`; the SDK parser
|
|
19
|
+
also checks rules that JSON Schema cannot express.
|
|
21
20
|
|
|
22
21
|
## Open the control editor
|
|
23
22
|
|
|
@@ -34,19 +33,19 @@ The Model controls editor's **Visual** and **JSON** views edit the same draft. C
|
|
|
34
33
|
|
|
35
34
|
Preview values are temporary; they do not change the default or the Project's current values.
|
|
36
35
|
|
|
37
|
-
Use labels to name the decision and descriptions for
|
|
38
|
-
minimum and maximum values
|
|
39
|
-
|
|
36
|
+
Use labels to name the decision and descriptions for more detail. Defaults should produce a useful
|
|
37
|
+
model immediately. Use minimum and maximum values for supported field ranges and cross-field
|
|
38
|
+
rules for constraints between controls.
|
|
40
39
|
|
|
41
40
|
## Separate help from essential instructions
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
hovering
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
Use `description` for explanations, terminology, and examples. Studio shows it when the reader
|
|
43
|
+
hovers, focuses, or taps the question-mark help button. Clicking the label focuses the input;
|
|
44
|
+
hovering the label does not open help.
|
|
45
|
+
|
|
46
|
+
Use optional `ui.hint` for one short, essential instruction beside the control. Omit it when the
|
|
47
|
+
label is enough. Hints are static and appear whenever the control is visible; put guidance for
|
|
48
|
+
multiple modes in `description`. Errors, warnings, and reasons a control is unavailable stay visible.
|
|
50
49
|
|
|
51
50
|
In **Visual**, edit **Hint (optional)** as ordinary text. **Visual**, **JSON**, and the live preview
|
|
52
51
|
use the same string field. Clearing it omits the hint when applying the definition. For example,
|
|
@@ -81,9 +80,9 @@ avoid repeating labels, units, or descriptions. A declared hint must be non-empt
|
|
|
81
80
|
| Cross section | One closed XY outline for extrusion or a swept section |
|
|
82
81
|
| Number List or Text List | An ordered sequence the user may add, remove, edit, and reorder |
|
|
83
82
|
|
|
84
|
-
A Slider requires `min`, `max`, and a positive `ui.step`. Multiple choice
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
A Slider requires `min`, `max`, and a positive `ui.step`. Multiple choice can limit the number of
|
|
84
|
+
selections. Lists can limit their item count; number-list items can also declare units, limits,
|
|
85
|
+
and `items.ui.step`.
|
|
87
86
|
|
|
88
87
|
A Font value is a structured selection, not a family-name string. Pass the whole value in
|
|
89
88
|
`services.text.layout(text, { font, fontSize })` inside generation, then pass its layout to
|
|
@@ -124,15 +123,14 @@ In **JSON**, give the controls the same `ui.row` identifier:
|
|
|
124
123
|
]
|
|
125
124
|
```
|
|
126
125
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
Add these entries to the definition's `parameters` array. Row IDs are local to each section, and
|
|
127
|
+
shared controls must stay adjacent. Omit `ui.row` for full width. Shared rows support number
|
|
128
|
+
inputs, `choice`, and `text`; sliders and other controls use their own rows. Prefer full width
|
|
129
|
+
for long option names or text.
|
|
131
130
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
separate numbers.
|
|
131
|
+
Fields share equal widths and stack in narrow panels. If one is hidden, the other fills the row.
|
|
132
|
+
Each retains its own value, units, validation, and history; `params.width` and `params.height`
|
|
133
|
+
remain separate numbers.
|
|
136
134
|
|
|
137
135
|
## Define an editable side profile
|
|
138
136
|
|
|
@@ -310,20 +308,17 @@ In **JSON**, add `"role": "curve-resolution"` to a Number or Slider control to g
|
|
|
310
308
|
}
|
|
311
309
|
```
|
|
312
310
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
For example, declare separate **Coil path** and **Wire cross-section** values and pass each to the
|
|
325
|
-
appropriate sampler. Your Generator decides which curves or parts each value affects; Studio saves
|
|
326
|
-
the values without assigning them to parts automatically.
|
|
311
|
+
Your source must apply the saved parameter to geometry, for example by passing
|
|
312
|
+
`resolution: { maxChordError: params.curveResolution }` to each affected primitive or Section
|
|
313
|
+
operation. Share the options value when several curves use the same policy. The declaration alone
|
|
314
|
+
does not change sampling; keep supported limits and feature-specific sampling in your model.
|
|
315
|
+
|
|
316
|
+
Studio groups these controls under **Curve resolution** in definition order, including in the
|
|
317
|
+
mobile sheet. Visual editing preserves the role; duplicating a control creates an ordinary numeric
|
|
318
|
+
control. Each value saves with the Project and affects preview and export through generation.
|
|
319
|
+
|
|
320
|
+
You can declare separate values for **Coil path** and **Wire cross-section**, then pass each to its
|
|
321
|
+
sampler. Your source decides which curves or parts it affects; Studio does not assign it to parts.
|
|
327
322
|
|
|
328
323
|
## Reveal a control only when it applies
|
|
329
324
|
|
|
@@ -350,9 +345,9 @@ array; this example shows Hole diameter only while Add hole is enabled:
|
|
|
350
345
|
}
|
|
351
346
|
```
|
|
352
347
|
|
|
353
|
-
Use `eq` or `ne` for scalar comparisons
|
|
354
|
-
for Multiple choice membership. Combine conditions with `all`, `any`, or `not`.
|
|
355
|
-
|
|
348
|
+
Use `eq` or `ne` for scalar comparisons; `gt`, `gte`, `lt`, or `lte` for numbers; and `contains`
|
|
349
|
+
for Multiple choice membership. Combine conditions with `all`, `any`, or `not`. Conditions cannot
|
|
350
|
+
reference Font, Side profile, Cross section, Number List, or Text List values.
|
|
356
351
|
|
|
357
352
|
The JSON root accepts only `groups` and `parameters`. Project identity, title, and version are
|
|
358
353
|
managed separately by Studio.
|
|
@@ -387,11 +382,11 @@ than your model's recommended minimum. A zero wall stops generation; a 0.5 mm wa
|
|
|
387
382
|
with a warning. Choose that minimum for the model and manufacturing process. A failed edit leaves
|
|
388
383
|
the last valid preview and its export available. Warnings allow a current model to generate and export.
|
|
389
384
|
|
|
390
|
-
Checks
|
|
391
|
-
geometry
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
385
|
+
Checks follow JavaScript order: reading a computed value evaluates it when needed, and observing
|
|
386
|
+
geometry evaluates its input first. Draft validation checks declarations and reached assertions
|
|
387
|
+
without finalizing parts; it does not prove full geometric validity. Use optional `computed`
|
|
388
|
+
values to reuse expensive layouts or shared calculations across unrelated edits. There is no
|
|
389
|
+
separate preparation callback.
|
|
395
390
|
|
|
396
391
|
## Test the definition as a contract
|
|
397
392
|
|
package/dist/docs/manifest.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"formatVersion": 1,
|
|
3
3
|
"packageName": "@metamesh/generator-sdk",
|
|
4
|
-
"packageVersion": "0.
|
|
4
|
+
"packageVersion": "0.17.0",
|
|
5
5
|
"documents": [
|
|
6
6
|
{
|
|
7
7
|
"id": "sdk/guide/authoring",
|
|
8
8
|
"title": "Design reusable controls",
|
|
9
|
-
"summary": "
|
|
9
|
+
"summary": "Design clear controls, useful defaults, and recoverable validation for a reusable code Project.",
|
|
10
10
|
"path": "guides/authoring.md",
|
|
11
11
|
"importPath": "@metamesh/generator-sdk",
|
|
12
12
|
"availability": "Reusable controls in Studio code Projects",
|
|
@@ -15,7 +15,15 @@
|
|
|
15
15
|
"guide",
|
|
16
16
|
"authoring",
|
|
17
17
|
"studio",
|
|
18
|
-
"how-to"
|
|
18
|
+
"how-to",
|
|
19
|
+
"design-reusable-controls",
|
|
20
|
+
"choose-the-decisions-to-expose",
|
|
21
|
+
"make-labels-and-units-unambiguous",
|
|
22
|
+
"choose-defaults-that-demonstrate-the-model",
|
|
23
|
+
"explain-constraints-where-they-matter",
|
|
24
|
+
"keep-related-parts-understandable",
|
|
25
|
+
"use-the-same-design-in-a-local-module",
|
|
26
|
+
"keep-a-portable-copy"
|
|
19
27
|
]
|
|
20
28
|
},
|
|
21
29
|
{
|
|
@@ -35,7 +43,7 @@
|
|
|
35
43
|
{
|
|
36
44
|
"id": "sdk/guide/parameters",
|
|
37
45
|
"title": "Define parameters and validation",
|
|
38
|
-
"summary": "Define
|
|
46
|
+
"summary": "Define typed controls, editable profiles, conditional visibility, and validation for an authored Studio Project.",
|
|
39
47
|
"path": "guides/parameters.md",
|
|
40
48
|
"importPath": "@metamesh/generator-sdk/parameters",
|
|
41
49
|
"availability": "Shared parameter contracts; control editing examples use Studio",
|
|
@@ -44,7 +52,18 @@
|
|
|
44
52
|
"guide",
|
|
45
53
|
"parameters",
|
|
46
54
|
"studio",
|
|
47
|
-
"how-to"
|
|
55
|
+
"how-to",
|
|
56
|
+
"define-parameters-and-validation",
|
|
57
|
+
"open-the-control-editor",
|
|
58
|
+
"separate-help-from-essential-instructions",
|
|
59
|
+
"choose-the-right-control",
|
|
60
|
+
"show-controls-side-by-side",
|
|
61
|
+
"define-an-editable-side-profile",
|
|
62
|
+
"define-an-editable-cross-section",
|
|
63
|
+
"expose-curve-resolution-in-parameters",
|
|
64
|
+
"reveal-a-control-only-when-it-applies",
|
|
65
|
+
"add-cross-field-validation-in-typescript",
|
|
66
|
+
"test-the-definition-as-a-contract"
|
|
48
67
|
]
|
|
49
68
|
},
|
|
50
69
|
{
|
|
@@ -498,7 +517,7 @@
|
|
|
498
517
|
{
|
|
499
518
|
"id": "sdk/reference/index/GeneratorProgram",
|
|
500
519
|
"title": "GeneratorProgram",
|
|
501
|
-
"summary": "Structural program boundary; the SDK never imports a Modeling runtime or kernel.",
|
|
520
|
+
"summary": "Structural program boundary; the SDK root never imports a Modeling runtime or kernel.",
|
|
502
521
|
"path": "reference/index/GeneratorProgram.md",
|
|
503
522
|
"importPath": "@metamesh/generator-sdk",
|
|
504
523
|
"availability": "Portable Generator contracts",
|
|
@@ -1069,6 +1088,20 @@
|
|
|
1069
1088
|
"UNPREPARED_GENERATOR_SERVICES"
|
|
1070
1089
|
]
|
|
1071
1090
|
},
|
|
1091
|
+
{
|
|
1092
|
+
"id": "sdk/reference/modeling/defineGeneratorModel",
|
|
1093
|
+
"title": "defineGeneratorModel",
|
|
1094
|
+
"summary": "Defines a Generator model with parameters and prepared services inferred from its definition. The callback stays synchronous; hosts own normalization, assets, execution and cleanup. Import this adapter from `@metamesh/generator-sdk/modeling` with matching Modeling installed.",
|
|
1095
|
+
"path": "reference/modeling/defineGeneratorModel.md",
|
|
1096
|
+
"importPath": "@metamesh/generator-sdk/modeling",
|
|
1097
|
+
"availability": "Portable Generator contracts",
|
|
1098
|
+
"canonical": "https://metamesh.studio/docs/develop/agent-authoring#generator-entries",
|
|
1099
|
+
"keywords": [
|
|
1100
|
+
"reference",
|
|
1101
|
+
"modeling",
|
|
1102
|
+
"defineGeneratorModel"
|
|
1103
|
+
]
|
|
1104
|
+
},
|
|
1072
1105
|
{
|
|
1073
1106
|
"id": "sdk/reference/packages/compareSemanticVersions",
|
|
1074
1107
|
"title": "compareSemanticVersions",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
An immutable catalog face; revision is the SHA-256 digest of the complete font file.
|
|
4
4
|
|
|
5
|
-
Import from `@metamesh/generator-sdk/fonts` (@metamesh/generator-sdk@0.
|
|
5
|
+
Import from `@metamesh/generator-sdk/fonts` (@metamesh/generator-sdk@0.17.0).
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
8
|
/** An immutable catalog face; revision is the SHA-256 digest of the complete font file. */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Checks only the portable value, without consulting a catalog or substituting fonts.
|
|
4
4
|
|
|
5
|
-
Import from `@metamesh/generator-sdk/fonts` (@metamesh/generator-sdk@0.
|
|
5
|
+
Import from `@metamesh/generator-sdk/fonts` (@metamesh/generator-sdk@0.17.0).
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
8
|
/** Checks only the portable value, without consulting a catalog or substituting fonts. */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
ArrayParameterDefinition exported from @metamesh/generator-sdk.
|
|
4
4
|
|
|
5
|
-
Import from `@metamesh/generator-sdk` (@metamesh/generator-sdk@0.
|
|
5
|
+
Import from `@metamesh/generator-sdk` (@metamesh/generator-sdk@0.17.0).
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
8
|
export interface ArrayParameterDefinition extends ArrayParameterBase {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
BaseParameterDefinition exported from @metamesh/generator-sdk.
|
|
4
4
|
|
|
5
|
-
Import from `@metamesh/generator-sdk` (@metamesh/generator-sdk@0.
|
|
5
|
+
Import from `@metamesh/generator-sdk` (@metamesh/generator-sdk@0.17.0).
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
8
|
export interface BaseParameterDefinition {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
BooleanParameterDefinition exported from @metamesh/generator-sdk.
|
|
4
4
|
|
|
5
|
-
Import from `@metamesh/generator-sdk` (@metamesh/generator-sdk@0.
|
|
5
|
+
Import from `@metamesh/generator-sdk` (@metamesh/generator-sdk@0.17.0).
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
8
|
export interface BooleanParameterDefinition extends BaseParameterDefinition {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
ChoiceParameterDefinition exported from @metamesh/generator-sdk.
|
|
4
4
|
|
|
5
|
-
Import from `@metamesh/generator-sdk` (@metamesh/generator-sdk@0.
|
|
5
|
+
Import from `@metamesh/generator-sdk` (@metamesh/generator-sdk@0.17.0).
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
8
|
export interface ChoiceParameterDefinition extends BaseParameterDefinition {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
ChoiceSetParameterDefinition exported from @metamesh/generator-sdk.
|
|
4
4
|
|
|
5
|
-
Import from `@metamesh/generator-sdk` (@metamesh/generator-sdk@0.
|
|
5
|
+
Import from `@metamesh/generator-sdk` (@metamesh/generator-sdk@0.17.0).
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
8
|
export interface ChoiceSetParameterDefinition extends BaseParameterDefinition {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
ColorParameterDefinition exported from @metamesh/generator-sdk.
|
|
4
4
|
|
|
5
|
-
Import from `@metamesh/generator-sdk` (@metamesh/generator-sdk@0.
|
|
5
|
+
Import from `@metamesh/generator-sdk` (@metamesh/generator-sdk@0.17.0).
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
8
|
export interface ColorParameterDefinition extends BaseParameterDefinition {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Editing intent accompanies the explicit curve controls; no tangent is inferred at runtime.
|
|
4
4
|
|
|
5
|
-
Import from `@metamesh/generator-sdk` (@metamesh/generator-sdk@0.
|
|
5
|
+
Import from `@metamesh/generator-sdk` (@metamesh/generator-sdk@0.17.0).
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
8
|
/** Editing intent accompanies the explicit curve controls; no tangent is inferred at runtime. */
|