@nakafa/aksara-contracts 0.27.0 → 0.31.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/README.md +18 -10
- package/dist/math/base.d.ts +49 -0
- package/dist/math/base.js +103 -0
- package/dist/math/plane.d.ts +317 -0
- package/dist/math/plane.js +151 -0
- package/dist/math/space.d.ts +397 -0
- package/dist/math/space.js +129 -0
- package/dist/math/vector.d.ts +3 -0
- package/dist/math/vector.js +74 -0
- package/dist/math/visual.d.ts +984 -0
- package/dist/math/visual.js +15 -0
- package/dist/preview/artifact.d.ts +4 -32
- package/dist/preview/artifact.js +2 -2
- package/dist/preview/spec.d.ts +8 -64
- package/dist/projection/digest.d.ts +4 -74
- package/dist/projection/page.d.ts +1 -50
- package/dist/projection/page.js +9 -38
- package/dist/projection/question.d.ts +16 -184
- package/dist/projection/spec.d.ts +7 -253
- package/dist/projection/spec.js +2 -9
- package/dist/projection/verify.d.ts +4 -74
- package/dist/question/item.d.ts +24 -304
- package/dist/question/item.js +4 -4
- package/dist/question/response.d.ts +9 -97
- package/dist/question/response.js +8 -31
- package/dist/release/policy.d.ts +3 -0
- package/dist/release/policy.js +2 -0
- package/dist/release/rollback/spec.d.ts +36 -288
- package/dist/release/snapshot/data.d.ts +4 -32
- package/dist/release/snapshot/verify.d.ts +4 -60
- package/dist/renderer/compatibility.d.ts +49 -2
- package/dist/renderer/compatibility.js +49 -1
- package/dist/runtime/spec.d.ts +4 -46
- package/dist/runtime/verify.d.ts +0 -28
- package/dist/transport/batch.d.ts +8 -481
- package/dist/transport/batch.js +2 -14
- package/dist/transport/group.d.ts +50 -836
- package/dist/transport/group.js +1 -2
- package/dist/transport/request.d.ts +440 -2356
- package/dist/transport/response.d.ts +44 -436
- package/dist/transport/snapshot.d.ts +8 -64
- package/dist/tryout/content-hash.d.ts +4 -32
- package/dist/tryout/placement.d.ts +12 -96
- package/package.json +9 -1
package/README.md
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
# @nakafa/aksara-contracts
|
|
2
2
|
|
|
3
3
|
This package defines exact runtime contracts for the Aksara compiler and
|
|
4
|
-
publisher. Nakafa runtime adoption is a separate cutover gated by a proven
|
|
5
|
-
immutable release archive and compatible renderer support.
|
|
4
|
+
publisher. Nakafa runtime adoption is a separate cutover gated by a proven npm
|
|
5
|
+
package, its immutable release archive, and compatible renderer support.
|
|
6
6
|
|
|
7
7
|
This package contains schemas, branded identifiers, canonical wire encodings,
|
|
8
8
|
and Web Crypto signature verification. It contains no corpus, renderer
|
|
9
9
|
implementation, signing key, deployment credential, or browser-side MDX
|
|
10
10
|
runtime.
|
|
11
11
|
|
|
12
|
-
Consumers install the exact
|
|
13
|
-
pnpm lockfile.
|
|
14
|
-
|
|
12
|
+
Consumers install the exact `@nakafa/aksara-contracts` version from npm and
|
|
13
|
+
commit its pnpm lockfile integrity. npm provenance and the matching immutable
|
|
14
|
+
GitHub Release bind those package bytes to the reviewed Aksara source. Content
|
|
15
|
+
requiring a newer contract may be activated only after a compatible Nakafa
|
|
16
|
+
renderer is live.
|
|
15
17
|
|
|
16
18
|
Node-only writer and incremental digest exports remain isolated behind package
|
|
17
19
|
conditions. Default-runtime exports used by Convex are audited to reject
|
|
@@ -31,9 +33,13 @@ Current consumers use unversioned semantic Interfaces:
|
|
|
31
33
|
validates every signed route and projection against it.
|
|
32
34
|
- `projection/page` owns stable public page identities, localized paths, and
|
|
33
35
|
signed metadata for human, agent, and sitemap delivery.
|
|
36
|
+
- `math/visual` owns the unversioned, renderer-neutral plane and space scene
|
|
37
|
+
contract, including exact straight geometry, rich-label anchors, and the
|
|
38
|
+
axis-aligned cuboid dimension mapping.
|
|
39
|
+
|
|
34
40
|
## Publication dates
|
|
35
41
|
|
|
36
|
-
Article, material,
|
|
42
|
+
Article, material, public page, and question metadata carry one required
|
|
37
43
|
`datePublished` and one optional `dateModified`, both as exact `DateOnly`
|
|
38
44
|
values.
|
|
39
45
|
|
|
@@ -59,13 +65,15 @@ verification authenticates the same frozen release and artifact without
|
|
|
59
65
|
claiming that its consumer can execute the artifact. This directional
|
|
60
66
|
execution check lets an additive live renderer serve an older release only when
|
|
61
67
|
it still publishes the selected domain and supports every required component
|
|
62
|
-
version.
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
version. A renderer-changing release remains bound to the exact complete live
|
|
69
|
+
manifest. A scoped content-only release may retain the active frozen manifest
|
|
70
|
+
only when activation proves the live renderer still publishes every frozen
|
|
71
|
+
domain and supports every frozen component version. The renderer is not a
|
|
72
|
+
third signed value. Current production trusts authenticated
|
|
65
73
|
Convex state for route/head membership, delivery class, and the active pointer;
|
|
66
74
|
a release result digest is not a per-row inclusion proof. This boundary is
|
|
67
75
|
recorded explicitly in
|
|
68
|
-
[ADR 0002](https://github.com/nakafaai/aksara/blob/main/docs/adr/
|
|
76
|
+
[ADR 0002](https://github.com/nakafaai/aksara/blob/main/docs/adr/release.md).
|
|
69
77
|
|
|
70
78
|
The package source is publicly readable for supply-chain review. All use and
|
|
71
79
|
redistribution remain subject to the included Nakafa Source Available License
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
/** Relative floating-point tolerance used by normalized geometry predicates. */
|
|
3
|
+
export declare const GEOMETRY_TOLERANCE: number;
|
|
4
|
+
/** Stable source identity shared by visual objects and rich-label anchors. */
|
|
5
|
+
export declare const MathVisualKeySchema: Schema.String;
|
|
6
|
+
/** Finite point in one Cartesian plane. */
|
|
7
|
+
export declare const PlanePointSchema: Schema.Struct<{
|
|
8
|
+
readonly x: Schema.Finite;
|
|
9
|
+
readonly y: Schema.Finite;
|
|
10
|
+
}>;
|
|
11
|
+
export type PlanePoint = typeof PlanePointSchema.Type;
|
|
12
|
+
/** Finite point in one three-dimensional Cartesian space. */
|
|
13
|
+
export declare const SpacePointSchema: Schema.Struct<{
|
|
14
|
+
readonly x: Schema.Finite;
|
|
15
|
+
readonly y: Schema.Finite;
|
|
16
|
+
readonly z: Schema.Finite;
|
|
17
|
+
}>;
|
|
18
|
+
export type SpacePoint = typeof SpacePointSchema.Type;
|
|
19
|
+
/** Ordered visible interval for one Cartesian axis. */
|
|
20
|
+
export declare const MathAxisRangeSchema: Schema.Struct<{
|
|
21
|
+
readonly max: Schema.Finite;
|
|
22
|
+
readonly min: Schema.Finite;
|
|
23
|
+
}>;
|
|
24
|
+
/** Semantic visibility of one mathematical frame feature. */
|
|
25
|
+
export declare const MathFeatureVisibilitySchema: Schema.Literals<readonly ["hidden", "visible"]>;
|
|
26
|
+
/** Stable visual roles that Nakafa maps to its current design system. */
|
|
27
|
+
export declare const MathAppearanceSchema: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
28
|
+
/** Screen-relative placement of one rich label around its exact anchor. */
|
|
29
|
+
export declare const MathLabelPlacementSchema: Schema.Literals<readonly ["above", "above-left", "above-right", "below", "below-left", "below-right", "center", "left", "right"]>;
|
|
30
|
+
/** Optional non-negative padding used by a semantic fit view. */
|
|
31
|
+
export declare const MathViewPaddingSchema: Schema.Finite;
|
|
32
|
+
/** Strictly positive finite measurement. */
|
|
33
|
+
export declare const PositiveMeasureSchema: Schema.Finite;
|
|
34
|
+
/** Canonical start angle for one plane arc, measured in degrees. */
|
|
35
|
+
export declare const ArcStartDegreesSchema: Schema.Finite;
|
|
36
|
+
/** Non-zero directed sweep shorter than one full circle. */
|
|
37
|
+
export declare const ArcSweepDegreesSchema: Schema.Finite;
|
|
38
|
+
/** Returns whether two plane positions are exactly the same authored point. */
|
|
39
|
+
export declare function samePlanePoint(left: PlanePoint, right: PlanePoint): boolean;
|
|
40
|
+
/** Returns whether two space positions are exactly the same authored point. */
|
|
41
|
+
export declare function sameSpacePoint(left: SpacePoint, right: SpacePoint): boolean;
|
|
42
|
+
/** Reports every repeated scene identity at its exact authored key path. */
|
|
43
|
+
export declare function mathVisualIdentityIssues(objects: readonly {
|
|
44
|
+
readonly id: string;
|
|
45
|
+
}[], labels: readonly {
|
|
46
|
+
readonly key: string;
|
|
47
|
+
}[]): readonly Schema.FilterIssue[];
|
|
48
|
+
/** Checks that an authored coordinate sequence contains no repeated position. */
|
|
49
|
+
export declare function hasUniquePositions<T>(values: readonly T[], same: (left: T, right: T) => boolean): boolean;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
const KEY_PATTERN = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/u;
|
|
3
|
+
/** Relative floating-point tolerance used by normalized geometry predicates. */
|
|
4
|
+
export const GEOMETRY_TOLERANCE = Number.EPSILON * 128;
|
|
5
|
+
/** Stable source identity shared by visual objects and rich-label anchors. */
|
|
6
|
+
export const MathVisualKeySchema = Schema.String.pipe(Schema.check(Schema.makeFilter((key) => KEY_PATTERN.test(key), {
|
|
7
|
+
message: "Expected a lower-kebab mathematical visual key.",
|
|
8
|
+
})));
|
|
9
|
+
/** Finite point in one Cartesian plane. */
|
|
10
|
+
export const PlanePointSchema = Schema.Struct({
|
|
11
|
+
x: Schema.Finite,
|
|
12
|
+
y: Schema.Finite,
|
|
13
|
+
});
|
|
14
|
+
/** Finite point in one three-dimensional Cartesian space. */
|
|
15
|
+
export const SpacePointSchema = Schema.Struct({
|
|
16
|
+
x: Schema.Finite,
|
|
17
|
+
y: Schema.Finite,
|
|
18
|
+
z: Schema.Finite,
|
|
19
|
+
});
|
|
20
|
+
/** Ordered visible interval for one Cartesian axis. */
|
|
21
|
+
export const MathAxisRangeSchema = Schema.Struct({
|
|
22
|
+
max: Schema.Finite,
|
|
23
|
+
min: Schema.Finite,
|
|
24
|
+
}).pipe(Schema.check(Schema.makeFilter(({ max, min }) => min < max, {
|
|
25
|
+
message: "Expected an axis range whose minimum is below its maximum.",
|
|
26
|
+
})));
|
|
27
|
+
/** Semantic visibility of one mathematical frame feature. */
|
|
28
|
+
export const MathFeatureVisibilitySchema = Schema.Literals([
|
|
29
|
+
"hidden",
|
|
30
|
+
"visible",
|
|
31
|
+
]);
|
|
32
|
+
/** Stable visual roles that Nakafa maps to its current design system. */
|
|
33
|
+
export const MathAppearanceSchema = Schema.Literals([
|
|
34
|
+
"answer",
|
|
35
|
+
"construction",
|
|
36
|
+
"highlight",
|
|
37
|
+
"primary",
|
|
38
|
+
"reference",
|
|
39
|
+
"secondary",
|
|
40
|
+
"warning",
|
|
41
|
+
]);
|
|
42
|
+
/** Screen-relative placement of one rich label around its exact anchor. */
|
|
43
|
+
export const MathLabelPlacementSchema = Schema.Literals([
|
|
44
|
+
"above",
|
|
45
|
+
"above-left",
|
|
46
|
+
"above-right",
|
|
47
|
+
"below",
|
|
48
|
+
"below-left",
|
|
49
|
+
"below-right",
|
|
50
|
+
"center",
|
|
51
|
+
"left",
|
|
52
|
+
"right",
|
|
53
|
+
]);
|
|
54
|
+
/** Optional non-negative padding used by a semantic fit view. */
|
|
55
|
+
export const MathViewPaddingSchema = Schema.Finite.pipe(Schema.check(Schema.isGreaterThanOrEqualTo(0)));
|
|
56
|
+
/** Strictly positive finite measurement. */
|
|
57
|
+
export const PositiveMeasureSchema = Schema.Finite.pipe(Schema.check(Schema.isGreaterThan(0)));
|
|
58
|
+
/** Canonical start angle for one plane arc, measured in degrees. */
|
|
59
|
+
export const ArcStartDegreesSchema = Schema.Finite.pipe(Schema.check(Schema.isGreaterThanOrEqualTo(0)), Schema.check(Schema.isLessThan(360)));
|
|
60
|
+
/** Non-zero directed sweep shorter than one full circle. */
|
|
61
|
+
export const ArcSweepDegreesSchema = Schema.Finite.pipe(Schema.check(Schema.makeFilter((sweep) => sweep !== 0 && Math.abs(sweep) < 360, {
|
|
62
|
+
message: "Expected a non-zero arc sweep shorter than one full circle.",
|
|
63
|
+
})));
|
|
64
|
+
/** Returns whether two plane positions are exactly the same authored point. */
|
|
65
|
+
export function samePlanePoint(left, right) {
|
|
66
|
+
return left.x === right.x && left.y === right.y;
|
|
67
|
+
}
|
|
68
|
+
/** Returns whether two space positions are exactly the same authored point. */
|
|
69
|
+
export function sameSpacePoint(left, right) {
|
|
70
|
+
return left.x === right.x && left.y === right.y && left.z === right.z;
|
|
71
|
+
}
|
|
72
|
+
/** Returns every repeated-key index after its first authored occurrence. */
|
|
73
|
+
function duplicateKeyIndexes(values, keyOf) {
|
|
74
|
+
const seen = new Set();
|
|
75
|
+
const duplicates = [];
|
|
76
|
+
for (const [index, value] of values.entries()) {
|
|
77
|
+
const key = keyOf(value);
|
|
78
|
+
if (seen.has(key)) {
|
|
79
|
+
duplicates.push(index);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
seen.add(key);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return duplicates;
|
|
86
|
+
}
|
|
87
|
+
/** Reports every repeated scene identity at its exact authored key path. */
|
|
88
|
+
export function mathVisualIdentityIssues(objects, labels) {
|
|
89
|
+
return [
|
|
90
|
+
...duplicateKeyIndexes(objects, ({ id }) => id).map((index) => ({
|
|
91
|
+
issue: "Expected a unique mathematical object id.",
|
|
92
|
+
path: ["objects", index, "id"],
|
|
93
|
+
})),
|
|
94
|
+
...duplicateKeyIndexes(labels, ({ key }) => key).map((index) => ({
|
|
95
|
+
issue: "Expected a unique mathematical label key.",
|
|
96
|
+
path: ["labels", index, "key"],
|
|
97
|
+
})),
|
|
98
|
+
];
|
|
99
|
+
}
|
|
100
|
+
/** Checks that an authored coordinate sequence contains no repeated position. */
|
|
101
|
+
export function hasUniquePositions(values, same) {
|
|
102
|
+
return values.every((value, index) => values.findIndex((candidate) => same(value, candidate)) === index);
|
|
103
|
+
}
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
/** Mathematical objects supported by a Cartesian plane scene. */
|
|
3
|
+
export declare const PlaneMathObjectSchema: Schema.Union<readonly [Schema.Struct<{
|
|
4
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
5
|
+
readonly id: Schema.String;
|
|
6
|
+
readonly center: Schema.Struct<{
|
|
7
|
+
readonly x: Schema.Finite;
|
|
8
|
+
readonly y: Schema.Finite;
|
|
9
|
+
}>;
|
|
10
|
+
readonly kind: Schema.Literal<"arc">;
|
|
11
|
+
readonly radius: Schema.Finite;
|
|
12
|
+
readonly startDegrees: Schema.Finite;
|
|
13
|
+
readonly sweepDegrees: Schema.Finite;
|
|
14
|
+
}>, Schema.Struct<{
|
|
15
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
16
|
+
readonly id: Schema.String;
|
|
17
|
+
readonly center: Schema.Struct<{
|
|
18
|
+
readonly x: Schema.Finite;
|
|
19
|
+
readonly y: Schema.Finite;
|
|
20
|
+
}>;
|
|
21
|
+
readonly kind: Schema.Literal<"circle">;
|
|
22
|
+
readonly radius: Schema.Finite;
|
|
23
|
+
}>, Schema.Struct<{
|
|
24
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
25
|
+
readonly id: Schema.String;
|
|
26
|
+
readonly kind: Schema.Literal<"closed-spline">;
|
|
27
|
+
readonly samples: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
28
|
+
readonly x: Schema.Finite;
|
|
29
|
+
readonly y: Schema.Finite;
|
|
30
|
+
}>, Schema.Struct<{
|
|
31
|
+
readonly x: Schema.Finite;
|
|
32
|
+
readonly y: Schema.Finite;
|
|
33
|
+
}>, Schema.Struct<{
|
|
34
|
+
readonly x: Schema.Finite;
|
|
35
|
+
readonly y: Schema.Finite;
|
|
36
|
+
}>]>, readonly [Schema.Struct<{
|
|
37
|
+
readonly x: Schema.Finite;
|
|
38
|
+
readonly y: Schema.Finite;
|
|
39
|
+
}>]>;
|
|
40
|
+
}>, Schema.Struct<{
|
|
41
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
42
|
+
readonly id: Schema.String;
|
|
43
|
+
readonly kind: Schema.Literal<"line">;
|
|
44
|
+
readonly through: Schema.Tuple<readonly [Schema.Struct<{
|
|
45
|
+
readonly x: Schema.Finite;
|
|
46
|
+
readonly y: Schema.Finite;
|
|
47
|
+
}>, Schema.Struct<{
|
|
48
|
+
readonly x: Schema.Finite;
|
|
49
|
+
readonly y: Schema.Finite;
|
|
50
|
+
}>]>;
|
|
51
|
+
}>, Schema.Struct<{
|
|
52
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
53
|
+
readonly id: Schema.String;
|
|
54
|
+
readonly at: Schema.Struct<{
|
|
55
|
+
readonly x: Schema.Finite;
|
|
56
|
+
readonly y: Schema.Finite;
|
|
57
|
+
}>;
|
|
58
|
+
readonly kind: Schema.Literal<"point">;
|
|
59
|
+
}>, Schema.Struct<{
|
|
60
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
61
|
+
readonly id: Schema.String;
|
|
62
|
+
readonly kind: Schema.Literal<"polygon">;
|
|
63
|
+
readonly vertices: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
64
|
+
readonly x: Schema.Finite;
|
|
65
|
+
readonly y: Schema.Finite;
|
|
66
|
+
}>, Schema.Struct<{
|
|
67
|
+
readonly x: Schema.Finite;
|
|
68
|
+
readonly y: Schema.Finite;
|
|
69
|
+
}>, Schema.Struct<{
|
|
70
|
+
readonly x: Schema.Finite;
|
|
71
|
+
readonly y: Schema.Finite;
|
|
72
|
+
}>]>, readonly [Schema.Struct<{
|
|
73
|
+
readonly x: Schema.Finite;
|
|
74
|
+
readonly y: Schema.Finite;
|
|
75
|
+
}>]>;
|
|
76
|
+
}>, Schema.Struct<{
|
|
77
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
78
|
+
readonly id: Schema.String;
|
|
79
|
+
readonly kind: Schema.Literal<"polyline">;
|
|
80
|
+
readonly vertices: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
81
|
+
readonly x: Schema.Finite;
|
|
82
|
+
readonly y: Schema.Finite;
|
|
83
|
+
}>, Schema.Struct<{
|
|
84
|
+
readonly x: Schema.Finite;
|
|
85
|
+
readonly y: Schema.Finite;
|
|
86
|
+
}>]>, readonly [Schema.Struct<{
|
|
87
|
+
readonly x: Schema.Finite;
|
|
88
|
+
readonly y: Schema.Finite;
|
|
89
|
+
}>]>;
|
|
90
|
+
}>, Schema.Struct<{
|
|
91
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
92
|
+
readonly id: Schema.String;
|
|
93
|
+
readonly from: Schema.Struct<{
|
|
94
|
+
readonly x: Schema.Finite;
|
|
95
|
+
readonly y: Schema.Finite;
|
|
96
|
+
}>;
|
|
97
|
+
readonly kind: Schema.Literal<"ray">;
|
|
98
|
+
readonly through: Schema.Struct<{
|
|
99
|
+
readonly x: Schema.Finite;
|
|
100
|
+
readonly y: Schema.Finite;
|
|
101
|
+
}>;
|
|
102
|
+
}>, Schema.Struct<{
|
|
103
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
104
|
+
readonly id: Schema.String;
|
|
105
|
+
readonly from: Schema.Struct<{
|
|
106
|
+
readonly x: Schema.Finite;
|
|
107
|
+
readonly y: Schema.Finite;
|
|
108
|
+
}>;
|
|
109
|
+
readonly kind: Schema.Literal<"segment">;
|
|
110
|
+
readonly to: Schema.Struct<{
|
|
111
|
+
readonly x: Schema.Finite;
|
|
112
|
+
readonly y: Schema.Finite;
|
|
113
|
+
}>;
|
|
114
|
+
}>, Schema.Struct<{
|
|
115
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
116
|
+
readonly id: Schema.String;
|
|
117
|
+
readonly kind: Schema.Literal<"spline">;
|
|
118
|
+
readonly samples: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
119
|
+
readonly x: Schema.Finite;
|
|
120
|
+
readonly y: Schema.Finite;
|
|
121
|
+
}>, Schema.Struct<{
|
|
122
|
+
readonly x: Schema.Finite;
|
|
123
|
+
readonly y: Schema.Finite;
|
|
124
|
+
}>, Schema.Struct<{
|
|
125
|
+
readonly x: Schema.Finite;
|
|
126
|
+
readonly y: Schema.Finite;
|
|
127
|
+
}>]>, readonly [Schema.Struct<{
|
|
128
|
+
readonly x: Schema.Finite;
|
|
129
|
+
readonly y: Schema.Finite;
|
|
130
|
+
}>]>;
|
|
131
|
+
}>]>;
|
|
132
|
+
/** Exact Cartesian frame presented behind a plane construction. */
|
|
133
|
+
export declare const PlaneMathFrameSchema: Schema.Struct<{
|
|
134
|
+
readonly axes: Schema.Literals<readonly ["hidden", "visible"]>;
|
|
135
|
+
readonly grid: Schema.Literals<readonly ["hidden", "visible"]>;
|
|
136
|
+
readonly kind: Schema.Literal<"cartesian">;
|
|
137
|
+
readonly x: Schema.Struct<{
|
|
138
|
+
readonly max: Schema.Finite;
|
|
139
|
+
readonly min: Schema.Finite;
|
|
140
|
+
}>;
|
|
141
|
+
readonly y: Schema.Struct<{
|
|
142
|
+
readonly max: Schema.Finite;
|
|
143
|
+
readonly min: Schema.Finite;
|
|
144
|
+
}>;
|
|
145
|
+
}>;
|
|
146
|
+
/** Plane visuals use semantic fit instead of renderer camera parameters. */
|
|
147
|
+
export declare const PlaneMathViewSchema: Schema.Struct<{
|
|
148
|
+
readonly kind: Schema.Literal<"fit">;
|
|
149
|
+
readonly padding: Schema.optionalKey<Schema.Finite>;
|
|
150
|
+
}>;
|
|
151
|
+
/** One coordinate anchor resolved against a separate rich-label map. */
|
|
152
|
+
export declare const PlaneLabelAnchorSchema: Schema.Struct<{
|
|
153
|
+
readonly at: Schema.Struct<{
|
|
154
|
+
readonly x: Schema.Finite;
|
|
155
|
+
readonly y: Schema.Finite;
|
|
156
|
+
}>;
|
|
157
|
+
readonly key: Schema.String;
|
|
158
|
+
readonly placement: Schema.optionalKey<Schema.Literals<readonly ["above", "above-left", "above-right", "below", "below-left", "below-right", "center", "left", "right"]>>;
|
|
159
|
+
}>;
|
|
160
|
+
/** Complete stable plane visual before rich labels are attached. */
|
|
161
|
+
export declare const PlaneMathVisualSchema: Schema.Struct<{
|
|
162
|
+
readonly frame: Schema.Struct<{
|
|
163
|
+
readonly axes: Schema.Literals<readonly ["hidden", "visible"]>;
|
|
164
|
+
readonly grid: Schema.Literals<readonly ["hidden", "visible"]>;
|
|
165
|
+
readonly kind: Schema.Literal<"cartesian">;
|
|
166
|
+
readonly x: Schema.Struct<{
|
|
167
|
+
readonly max: Schema.Finite;
|
|
168
|
+
readonly min: Schema.Finite;
|
|
169
|
+
}>;
|
|
170
|
+
readonly y: Schema.Struct<{
|
|
171
|
+
readonly max: Schema.Finite;
|
|
172
|
+
readonly min: Schema.Finite;
|
|
173
|
+
}>;
|
|
174
|
+
}>;
|
|
175
|
+
readonly labels: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
176
|
+
readonly at: Schema.Struct<{
|
|
177
|
+
readonly x: Schema.Finite;
|
|
178
|
+
readonly y: Schema.Finite;
|
|
179
|
+
}>;
|
|
180
|
+
readonly key: Schema.String;
|
|
181
|
+
readonly placement: Schema.optionalKey<Schema.Literals<readonly ["above", "above-left", "above-right", "below", "below-left", "below-right", "center", "left", "right"]>>;
|
|
182
|
+
}>>>;
|
|
183
|
+
readonly objects: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
184
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
185
|
+
readonly id: Schema.String;
|
|
186
|
+
readonly center: Schema.Struct<{
|
|
187
|
+
readonly x: Schema.Finite;
|
|
188
|
+
readonly y: Schema.Finite;
|
|
189
|
+
}>;
|
|
190
|
+
readonly kind: Schema.Literal<"arc">;
|
|
191
|
+
readonly radius: Schema.Finite;
|
|
192
|
+
readonly startDegrees: Schema.Finite;
|
|
193
|
+
readonly sweepDegrees: Schema.Finite;
|
|
194
|
+
}>, Schema.Struct<{
|
|
195
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
196
|
+
readonly id: Schema.String;
|
|
197
|
+
readonly center: Schema.Struct<{
|
|
198
|
+
readonly x: Schema.Finite;
|
|
199
|
+
readonly y: Schema.Finite;
|
|
200
|
+
}>;
|
|
201
|
+
readonly kind: Schema.Literal<"circle">;
|
|
202
|
+
readonly radius: Schema.Finite;
|
|
203
|
+
}>, Schema.Struct<{
|
|
204
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
205
|
+
readonly id: Schema.String;
|
|
206
|
+
readonly kind: Schema.Literal<"closed-spline">;
|
|
207
|
+
readonly samples: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
208
|
+
readonly x: Schema.Finite;
|
|
209
|
+
readonly y: Schema.Finite;
|
|
210
|
+
}>, Schema.Struct<{
|
|
211
|
+
readonly x: Schema.Finite;
|
|
212
|
+
readonly y: Schema.Finite;
|
|
213
|
+
}>, Schema.Struct<{
|
|
214
|
+
readonly x: Schema.Finite;
|
|
215
|
+
readonly y: Schema.Finite;
|
|
216
|
+
}>]>, readonly [Schema.Struct<{
|
|
217
|
+
readonly x: Schema.Finite;
|
|
218
|
+
readonly y: Schema.Finite;
|
|
219
|
+
}>]>;
|
|
220
|
+
}>, Schema.Struct<{
|
|
221
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
222
|
+
readonly id: Schema.String;
|
|
223
|
+
readonly kind: Schema.Literal<"line">;
|
|
224
|
+
readonly through: Schema.Tuple<readonly [Schema.Struct<{
|
|
225
|
+
readonly x: Schema.Finite;
|
|
226
|
+
readonly y: Schema.Finite;
|
|
227
|
+
}>, Schema.Struct<{
|
|
228
|
+
readonly x: Schema.Finite;
|
|
229
|
+
readonly y: Schema.Finite;
|
|
230
|
+
}>]>;
|
|
231
|
+
}>, Schema.Struct<{
|
|
232
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
233
|
+
readonly id: Schema.String;
|
|
234
|
+
readonly at: Schema.Struct<{
|
|
235
|
+
readonly x: Schema.Finite;
|
|
236
|
+
readonly y: Schema.Finite;
|
|
237
|
+
}>;
|
|
238
|
+
readonly kind: Schema.Literal<"point">;
|
|
239
|
+
}>, Schema.Struct<{
|
|
240
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
241
|
+
readonly id: Schema.String;
|
|
242
|
+
readonly kind: Schema.Literal<"polygon">;
|
|
243
|
+
readonly vertices: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
244
|
+
readonly x: Schema.Finite;
|
|
245
|
+
readonly y: Schema.Finite;
|
|
246
|
+
}>, Schema.Struct<{
|
|
247
|
+
readonly x: Schema.Finite;
|
|
248
|
+
readonly y: Schema.Finite;
|
|
249
|
+
}>, Schema.Struct<{
|
|
250
|
+
readonly x: Schema.Finite;
|
|
251
|
+
readonly y: Schema.Finite;
|
|
252
|
+
}>]>, readonly [Schema.Struct<{
|
|
253
|
+
readonly x: Schema.Finite;
|
|
254
|
+
readonly y: Schema.Finite;
|
|
255
|
+
}>]>;
|
|
256
|
+
}>, Schema.Struct<{
|
|
257
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
258
|
+
readonly id: Schema.String;
|
|
259
|
+
readonly kind: Schema.Literal<"polyline">;
|
|
260
|
+
readonly vertices: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
261
|
+
readonly x: Schema.Finite;
|
|
262
|
+
readonly y: Schema.Finite;
|
|
263
|
+
}>, Schema.Struct<{
|
|
264
|
+
readonly x: Schema.Finite;
|
|
265
|
+
readonly y: Schema.Finite;
|
|
266
|
+
}>]>, readonly [Schema.Struct<{
|
|
267
|
+
readonly x: Schema.Finite;
|
|
268
|
+
readonly y: Schema.Finite;
|
|
269
|
+
}>]>;
|
|
270
|
+
}>, Schema.Struct<{
|
|
271
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
272
|
+
readonly id: Schema.String;
|
|
273
|
+
readonly from: Schema.Struct<{
|
|
274
|
+
readonly x: Schema.Finite;
|
|
275
|
+
readonly y: Schema.Finite;
|
|
276
|
+
}>;
|
|
277
|
+
readonly kind: Schema.Literal<"ray">;
|
|
278
|
+
readonly through: Schema.Struct<{
|
|
279
|
+
readonly x: Schema.Finite;
|
|
280
|
+
readonly y: Schema.Finite;
|
|
281
|
+
}>;
|
|
282
|
+
}>, Schema.Struct<{
|
|
283
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
284
|
+
readonly id: Schema.String;
|
|
285
|
+
readonly from: Schema.Struct<{
|
|
286
|
+
readonly x: Schema.Finite;
|
|
287
|
+
readonly y: Schema.Finite;
|
|
288
|
+
}>;
|
|
289
|
+
readonly kind: Schema.Literal<"segment">;
|
|
290
|
+
readonly to: Schema.Struct<{
|
|
291
|
+
readonly x: Schema.Finite;
|
|
292
|
+
readonly y: Schema.Finite;
|
|
293
|
+
}>;
|
|
294
|
+
}>, Schema.Struct<{
|
|
295
|
+
readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
|
|
296
|
+
readonly id: Schema.String;
|
|
297
|
+
readonly kind: Schema.Literal<"spline">;
|
|
298
|
+
readonly samples: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Struct<{
|
|
299
|
+
readonly x: Schema.Finite;
|
|
300
|
+
readonly y: Schema.Finite;
|
|
301
|
+
}>, Schema.Struct<{
|
|
302
|
+
readonly x: Schema.Finite;
|
|
303
|
+
readonly y: Schema.Finite;
|
|
304
|
+
}>, Schema.Struct<{
|
|
305
|
+
readonly x: Schema.Finite;
|
|
306
|
+
readonly y: Schema.Finite;
|
|
307
|
+
}>]>, readonly [Schema.Struct<{
|
|
308
|
+
readonly x: Schema.Finite;
|
|
309
|
+
readonly y: Schema.Finite;
|
|
310
|
+
}>]>;
|
|
311
|
+
}>]>>;
|
|
312
|
+
readonly space: Schema.Literal<"plane">;
|
|
313
|
+
readonly view: Schema.Struct<{
|
|
314
|
+
readonly kind: Schema.Literal<"fit">;
|
|
315
|
+
readonly padding: Schema.optionalKey<Schema.Finite>;
|
|
316
|
+
}>;
|
|
317
|
+
}>;
|