@nakafa/aksara-contracts 5.0.0 → 6.1.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.
Files changed (99) hide show
  1. package/dist/artifact/integrity.d.ts +2 -2
  2. package/dist/artifact/limits.d.ts +1 -1
  3. package/dist/artifact/source.d.ts +1 -1
  4. package/dist/artifact/spec.d.ts +1 -1
  5. package/dist/artifact/verify.d.ts +1 -1
  6. package/dist/assessment/catalog.d.ts +12 -12
  7. package/dist/assessment/figure.d.ts +468 -0
  8. package/dist/assessment/snapshot.d.ts +24 -24
  9. package/dist/content.d.ts +7 -7
  10. package/dist/graph/family.d.ts +2 -2
  11. package/dist/graph/identity.d.ts +1 -1
  12. package/dist/locale.d.ts +21 -10
  13. package/dist/locale.js +24 -9
  14. package/dist/math/bounds.d.ts +3 -2
  15. package/dist/math/bounds.js +37 -8
  16. package/dist/math/curve.d.ts +42 -0
  17. package/dist/math/curve.js +55 -0
  18. package/dist/math/formula/box.d.ts +61 -0
  19. package/dist/math/formula/box.js +68 -0
  20. package/dist/math/formula/compile.d.ts +11 -0
  21. package/dist/math/formula/compile.js +100 -0
  22. package/dist/math/formula/contour.d.ts +17 -0
  23. package/dist/math/formula/contour.js +162 -0
  24. package/dist/math/formula/field.d.ts +19 -0
  25. package/dist/math/formula/field.js +35 -0
  26. package/dist/math/formula/mesh.d.ts +25 -0
  27. package/dist/math/formula/mesh.js +28 -0
  28. package/dist/math/formula/names.d.ts +4 -0
  29. package/dist/math/formula/names.js +23 -0
  30. package/dist/math/formula/parse.d.ts +10 -0
  31. package/dist/math/formula/parse.js +240 -0
  32. package/dist/math/formula/plane.d.ts +62 -0
  33. package/dist/math/formula/plane.js +175 -0
  34. package/dist/math/formula/reader.d.ts +102 -0
  35. package/dist/math/formula/reader.js +58 -0
  36. package/dist/math/formula/sample.d.ts +14 -0
  37. package/dist/math/formula/sample.js +182 -0
  38. package/dist/math/formula/scope.d.ts +37 -0
  39. package/dist/math/formula/scope.js +137 -0
  40. package/dist/math/formula/space.d.ts +10 -0
  41. package/dist/math/formula/space.js +94 -0
  42. package/dist/math/formula/syntax.d.ts +77 -0
  43. package/dist/math/formula/syntax.js +111 -0
  44. package/dist/math/formula/token.d.ts +43 -0
  45. package/dist/math/formula/token.js +150 -0
  46. package/dist/math/plane.d.ts +85 -0
  47. package/dist/math/plane.js +8 -2
  48. package/dist/math/scene.js +11 -2
  49. package/dist/math/solid.d.ts +124 -0
  50. package/dist/math/solid.js +86 -0
  51. package/dist/math/space.d.ts +213 -0
  52. package/dist/math/space.js +8 -2
  53. package/dist/math/visual.d.ts +454 -0
  54. package/dist/preview/artifact.d.ts +6 -6
  55. package/dist/preview/document.d.ts +13 -13
  56. package/dist/preview/spec.d.ts +49 -49
  57. package/dist/preview/target.d.ts +2 -2
  58. package/dist/program/curriculum.d.ts +2 -2
  59. package/dist/program/snapshot/hash.d.ts +6 -6
  60. package/dist/program/snapshot/row.d.ts +4 -4
  61. package/dist/program/spec.d.ts +2 -2
  62. package/dist/projection/article.d.ts +6 -6
  63. package/dist/projection/digest.d.ts +6 -6
  64. package/dist/projection/hash.d.ts +6 -6
  65. package/dist/projection/material.d.ts +6 -6
  66. package/dist/projection/page.d.ts +6 -6
  67. package/dist/projection/spec.d.ts +7 -7
  68. package/dist/projection/verify.d.ts +6 -6
  69. package/dist/quran/attribution.d.ts +4 -4
  70. package/dist/quran/identity.d.ts +7 -7
  71. package/dist/quran/identity.js +3 -3
  72. package/dist/quran/provenance.d.ts +12 -12
  73. package/dist/quran/snapshot/row/hash.d.ts +39 -39
  74. package/dist/quran/snapshot/row.d.ts +12 -12
  75. package/dist/quran/source.d.ts +7 -7
  76. package/dist/quran/spec.d.ts +1 -1
  77. package/dist/quran/spec.js +3 -3
  78. package/dist/release/canonical.d.ts +2 -2
  79. package/dist/release/digest.d.ts +2 -2
  80. package/dist/release/head.d.ts +9 -9
  81. package/dist/release/items.d.ts +2 -2
  82. package/dist/release/result/digest.d.ts +5 -5
  83. package/dist/release/rollback/digest.d.ts +4 -4
  84. package/dist/release/rollback/spec.d.ts +66 -66
  85. package/dist/release/route/digest.d.ts +2 -2
  86. package/dist/release/route/page.d.ts +4 -4
  87. package/dist/release/route/spec.d.ts +6 -6
  88. package/dist/release/route/verify.d.ts +2 -2
  89. package/dist/release/snapshot/data.d.ts +12 -12
  90. package/dist/release/snapshot/verify.d.ts +22 -22
  91. package/dist/release/spec.d.ts +6 -6
  92. package/dist/runtime/spec.d.ts +23 -23
  93. package/dist/runtime/verify.d.ts +14 -14
  94. package/dist/transport/batch.d.ts +22 -22
  95. package/dist/transport/group.d.ts +69 -69
  96. package/dist/transport/request.d.ts +244 -244
  97. package/dist/transport/response.d.ts +92 -92
  98. package/dist/transport/snapshot.d.ts +24 -24
  99. package/package.json +57 -1
@@ -9,7 +9,7 @@ export declare const ASSESSMENT_SNAPSHOT_FORMAT = "assessment-snapshot";
9
9
  export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
10
10
  readonly kind: Schema.Literal<"catalog">;
11
11
  readonly row: Schema.Union<readonly [Schema.Struct<{
12
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
12
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
13
13
  readonly description: Schema.optionalKey<Schema.String>;
14
14
  readonly graph: Schema.Struct<{
15
15
  readonly alignmentId: Schema.String;
@@ -26,7 +26,7 @@ export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
26
26
  readonly order: Schema.Int;
27
27
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
28
28
  }>, Schema.Struct<{
29
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
29
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
30
30
  readonly description: Schema.optionalKey<Schema.String>;
31
31
  readonly graph: Schema.Struct<{
32
32
  readonly alignmentId: Schema.String;
@@ -44,7 +44,7 @@ export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
44
44
  readonly order: Schema.Int;
45
45
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
46
46
  }>, Schema.Struct<{
47
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
47
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
48
48
  readonly description: Schema.optionalKey<Schema.String>;
49
49
  readonly graph: Schema.Struct<{
50
50
  readonly alignmentId: Schema.String;
@@ -62,7 +62,7 @@ export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
62
62
  readonly order: Schema.Int;
63
63
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
64
64
  }>, Schema.Struct<{
65
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
65
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
66
66
  readonly description: Schema.optionalKey<Schema.String>;
67
67
  readonly graph: Schema.Struct<{
68
68
  readonly alignmentId: Schema.String;
@@ -81,7 +81,7 @@ export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
81
81
  readonly order: Schema.Int;
82
82
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
83
83
  }>, Schema.Struct<{
84
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
84
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
85
85
  readonly description: Schema.optionalKey<Schema.String>;
86
86
  readonly graph: Schema.Struct<{
87
87
  readonly alignmentId: Schema.String;
@@ -105,7 +105,7 @@ export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
105
105
  }>;
106
106
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
107
107
  }>, Schema.Struct<{
108
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
108
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
109
109
  readonly description: Schema.optionalKey<Schema.String>;
110
110
  readonly graph: Schema.Struct<{
111
111
  readonly alignmentId: Schema.String;
@@ -610,7 +610,7 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
610
610
  readonly row: Schema.Union<readonly [Schema.Struct<{
611
611
  readonly kind: Schema.Literal<"catalog">;
612
612
  readonly row: Schema.Union<readonly [Schema.Struct<{
613
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
613
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
614
614
  readonly description: Schema.optionalKey<Schema.String>;
615
615
  readonly graph: Schema.Struct<{
616
616
  readonly alignmentId: Schema.String;
@@ -627,7 +627,7 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
627
627
  readonly order: Schema.Int;
628
628
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
629
629
  }>, Schema.Struct<{
630
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
630
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
631
631
  readonly description: Schema.optionalKey<Schema.String>;
632
632
  readonly graph: Schema.Struct<{
633
633
  readonly alignmentId: Schema.String;
@@ -645,7 +645,7 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
645
645
  readonly order: Schema.Int;
646
646
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
647
647
  }>, Schema.Struct<{
648
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
648
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
649
649
  readonly description: Schema.optionalKey<Schema.String>;
650
650
  readonly graph: Schema.Struct<{
651
651
  readonly alignmentId: Schema.String;
@@ -663,7 +663,7 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
663
663
  readonly order: Schema.Int;
664
664
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
665
665
  }>, Schema.Struct<{
666
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
666
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
667
667
  readonly description: Schema.optionalKey<Schema.String>;
668
668
  readonly graph: Schema.Struct<{
669
669
  readonly alignmentId: Schema.String;
@@ -682,7 +682,7 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
682
682
  readonly order: Schema.Int;
683
683
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
684
684
  }>, Schema.Struct<{
685
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
685
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
686
686
  readonly description: Schema.optionalKey<Schema.String>;
687
687
  readonly graph: Schema.Struct<{
688
688
  readonly alignmentId: Schema.String;
@@ -706,7 +706,7 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
706
706
  }>;
707
707
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
708
708
  }>, Schema.Struct<{
709
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
709
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
710
710
  readonly description: Schema.optionalKey<Schema.String>;
711
711
  readonly graph: Schema.Struct<{
712
712
  readonly alignmentId: Schema.String;
@@ -1265,7 +1265,7 @@ export declare const AssessmentRowOrder: Order.Order<AssessmentRow>;
1265
1265
  export declare const hashAssessmentRow: (row: {
1266
1266
  readonly kind: "catalog";
1267
1267
  readonly row: {
1268
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1268
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1269
1269
  readonly description?: string;
1270
1270
  readonly graph: {
1271
1271
  readonly alignmentId: string;
@@ -1282,7 +1282,7 @@ export declare const hashAssessmentRow: (row: {
1282
1282
  readonly order: number;
1283
1283
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
1284
1284
  } | {
1285
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1285
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1286
1286
  readonly description?: string;
1287
1287
  readonly graph: {
1288
1288
  readonly alignmentId: string;
@@ -1300,7 +1300,7 @@ export declare const hashAssessmentRow: (row: {
1300
1300
  readonly order: number;
1301
1301
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
1302
1302
  } | {
1303
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1303
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1304
1304
  readonly description?: string;
1305
1305
  readonly graph: {
1306
1306
  readonly alignmentId: string;
@@ -1318,7 +1318,7 @@ export declare const hashAssessmentRow: (row: {
1318
1318
  readonly order: number;
1319
1319
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
1320
1320
  } | {
1321
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1321
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1322
1322
  readonly description?: string;
1323
1323
  readonly graph: {
1324
1324
  readonly alignmentId: string;
@@ -1337,7 +1337,7 @@ export declare const hashAssessmentRow: (row: {
1337
1337
  readonly order: number;
1338
1338
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
1339
1339
  } | {
1340
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1340
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1341
1341
  readonly description?: string;
1342
1342
  readonly graph: {
1343
1343
  readonly alignmentId: string;
@@ -1361,7 +1361,7 @@ export declare const hashAssessmentRow: (row: {
1361
1361
  };
1362
1362
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
1363
1363
  } | {
1364
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1364
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1365
1365
  readonly description?: string;
1366
1366
  readonly graph: {
1367
1367
  readonly alignmentId: string;
@@ -2545,7 +2545,7 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2545
2545
  readonly row: {
2546
2546
  readonly kind: "catalog";
2547
2547
  readonly row: {
2548
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2548
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2549
2549
  readonly description?: string;
2550
2550
  readonly graph: {
2551
2551
  readonly alignmentId: string;
@@ -2562,7 +2562,7 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2562
2562
  readonly order: number;
2563
2563
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
2564
2564
  } | {
2565
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2565
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2566
2566
  readonly description?: string;
2567
2567
  readonly graph: {
2568
2568
  readonly alignmentId: string;
@@ -2580,7 +2580,7 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2580
2580
  readonly order: number;
2581
2581
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
2582
2582
  } | {
2583
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2583
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2584
2584
  readonly description?: string;
2585
2585
  readonly graph: {
2586
2586
  readonly alignmentId: string;
@@ -2598,7 +2598,7 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2598
2598
  readonly order: number;
2599
2599
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
2600
2600
  } | {
2601
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2601
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2602
2602
  readonly description?: string;
2603
2603
  readonly graph: {
2604
2604
  readonly alignmentId: string;
@@ -2617,7 +2617,7 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2617
2617
  readonly order: number;
2618
2618
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
2619
2619
  } | {
2620
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2620
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2621
2621
  readonly description?: string;
2622
2622
  readonly graph: {
2623
2623
  readonly alignmentId: string;
@@ -2641,7 +2641,7 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2641
2641
  };
2642
2642
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
2643
2643
  } | {
2644
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2644
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2645
2645
  readonly description?: string;
2646
2646
  readonly graph: {
2647
2647
  readonly alignmentId: string;
package/dist/content.d.ts CHANGED
@@ -11,7 +11,7 @@ export declare const ContentAuthorSchema: Schema.Struct<{
11
11
  export type ContentAuthor = typeof ContentAuthorSchema.Type;
12
12
  /** Language-specific content head identity that artifacts and heads share. */
13
13
  export declare const ContentHeadIdentitySchema: Schema.Struct<{
14
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
14
+ readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraArtifactLocale">;
15
15
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
16
16
  }>;
17
17
  /** Stable language-specific identity shared by artifacts and content heads. */
@@ -31,7 +31,7 @@ export declare const AKSARA_COMPILER_VERSION = "0.2.0";
31
31
  export declare const MDX_COMPILER_VERSION = "3.1.1";
32
32
  /** Authored source identity accepted before deterministic compilation. */
33
33
  export declare const CompileDocumentSourceSchema: Schema.Struct<{
34
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
34
+ readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraArtifactLocale">;
35
35
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
36
36
  readonly rawMdx: Schema.String;
37
37
  readonly rendererDomain: Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>;
@@ -40,7 +40,7 @@ export declare const CompileDocumentSourceSchema: Schema.Struct<{
40
40
  export type CompileDocumentSource = typeof CompileDocumentSourceSchema.Type;
41
41
  /** Validated request accepted by the trusted MDX compiler. */
42
42
  export declare const CompileDocumentRequestSchema: Schema.Struct<{
43
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
43
+ readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraArtifactLocale">;
44
44
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
45
45
  readonly rawMdx: Schema.String;
46
46
  readonly rendererDomain: Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>;
@@ -59,7 +59,7 @@ export declare const CompileDocumentRequestSchema: Schema.Struct<{
59
59
  export type CompileDocumentRequest = typeof CompileDocumentRequestSchema.Type;
60
60
  /** Compiled trusted payload: its evaluated content tree is what Nakafa renders. */
61
61
  export declare const CompiledContentPayloadSchema: Schema.Struct<{
62
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
62
+ readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraArtifactLocale">;
63
63
  readonly compilerConfigHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
64
64
  readonly compilerVersion: Schema.Literal<"0.2.0">;
65
65
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
@@ -92,7 +92,7 @@ export declare const SignedContentArtifactSchema: Schema.Struct<{
92
92
  readonly artifactHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
93
93
  readonly keyId: Schema.brand<Schema.String, "@NakafaAI/AksaraSigningKeyId">;
94
94
  readonly payload: Schema.Struct<{
95
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
95
+ readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraArtifactLocale">;
96
96
  readonly compilerConfigHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
97
97
  readonly compilerVersion: Schema.Literal<"0.2.0">;
98
98
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
@@ -130,7 +130,7 @@ export declare function canonicalizeContentArtifactSigningInput(artifactHash: ty
130
130
  export declare function canonicalizeSignedContentArtifact(artifact: SignedContentArtifact): string;
131
131
  /** Decodes unknown compiler input without throwing parser exceptions. */
132
132
  export declare const decodeCompileDocumentRequest: (input: unknown) => Effect.Effect<{
133
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
133
+ readonly artifactLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
134
134
  readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
135
135
  readonly rawMdx: string;
136
136
  readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
@@ -148,7 +148,7 @@ export declare const decodeCompileDocumentRequest: (input: unknown) => Effect.Ef
148
148
  }, import("./errors.js").ContractDecodeError, never>;
149
149
  /** Strictly decodes one authored source before a publication recompile. */
150
150
  export declare const decodeCompileDocumentSource: (input: unknown) => Effect.Effect<{
151
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
151
+ readonly artifactLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
152
152
  readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
153
153
  readonly rawMdx: string;
154
154
  readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
@@ -7,7 +7,7 @@ export declare const LearningGraphAssetIdSchema: Schema.brand<Schema.String, "@N
7
7
  export type LearningGraphAssetId = typeof LearningGraphAssetIdSchema.Type;
8
8
  /** Semantic owner extracted from one exact current learning-graph asset ID. */
9
9
  export declare const LearningGraphAssetOwnerSchema: Schema.Struct<{
10
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
10
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
11
11
  readonly family: Schema.Literals<readonly ["article", "material", "quran", "tryout"]>;
12
12
  }>;
13
13
  export type LearningGraphAssetOwner = typeof LearningGraphAssetOwnerSchema.Type;
@@ -35,7 +35,7 @@ export declare class LearningGraphFamilyError extends LearningGraphFamilyError_b
35
35
  }
36
36
  /** Classifies one assetId-only reference without fabricating a full identity. */
37
37
  export declare const classifyLearningGraphAssetId: (input: string) => Effect.Effect<{
38
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
38
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
39
39
  readonly family: "article" | "material" | "quran" | "tryout";
40
40
  }, LearningGraphAssetFamilyError, never>;
41
41
  /** Classifies one coherent current learning-graph identity for direct dispatch. */
@@ -2,7 +2,7 @@ import { Effect, Schema } from "effect";
2
2
  import { type LearningGraphIdentity } from "#contracts/graph/spec";
3
3
  /** Validated hierarchy segments required to derive one graph identity. */
4
4
  export declare const LearningGraphSegmentsSchema: Schema.Struct<{
5
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
5
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
6
6
  readonly concept: Schema.NonEmptyArray<Schema.String>;
7
7
  readonly learningObject: Schema.NonEmptyArray<Schema.String>;
8
8
  readonly lens: Schema.NonEmptyArray<Schema.String>;
package/dist/locale.d.ts CHANGED
@@ -1,17 +1,22 @@
1
1
  import { Schema } from "effect";
2
- /** Stable locale codes supported by the current Aksara contract. */
3
- export declare const AppLocaleCodeSchema: Schema.Literals<readonly ["en", "id", "de"]>;
2
+ /**
3
+ * Every locale code the contract declares, in canonical order: the active
4
+ * locales first, then a declared locale whose corpus is still being written.
5
+ * Malay (`ms`) is declared so its copy and content can be written completely
6
+ * before one release makes it active; an active locale never falls back.
7
+ */
8
+ export declare const AppLocaleCodeSchema: Schema.Literals<readonly ["en", "id", "de", "ms"]>;
4
9
  export type AppLocaleCode = typeof AppLocaleCodeSchema.Type;
5
- export declare const [ENGLISH_APP_LOCALE_CODE, INDONESIAN_APP_LOCALE_CODE, GERMAN_APP_LOCALE_CODE,]: readonly ["en", "id", "de"];
10
+ export declare const [ENGLISH_APP_LOCALE_CODE, INDONESIAN_APP_LOCALE_CODE, GERMAN_APP_LOCALE_CODE, MALAY_APP_LOCALE_CODE,]: readonly ["en", "id", "de", "ms"];
6
11
  /** Application locale used for Nakafa-owned interface and explanation copy. */
7
- export declare const AppLocaleSchema: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
12
+ export declare const AppLocaleSchema: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
8
13
  export type AppLocale = typeof AppLocaleSchema.Type;
9
14
  /** Narrows one canonical locale code while preserving application identity. */
10
15
  export declare function appLocaleLiteral<const Code extends AppLocaleCode>(code: Code): Schema.brand<Schema.Literal<Code>, "@NakafaAI/AksaraAppLocale">;
11
16
  /** Constructs one application locale without widening its literal identity. */
12
17
  export declare function makeAppLocale<const Code extends AppLocaleCode>(code: Code): Code & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
13
18
  /** Language delivered by content whose language may differ from the app shell. */
14
- export declare const DeliveryLanguageSchema: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraDeliveryLanguage">;
19
+ export declare const DeliveryLanguageSchema: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraDeliveryLanguage">;
15
20
  export type DeliveryLanguage = typeof DeliveryLanguageSchema.Type;
16
21
  /**
17
22
  * A language of one assessment text, as a BCP 47 tag in its canonical form, such
@@ -23,11 +28,14 @@ export type DeliveryLanguage = typeof DeliveryLanguageSchema.Type;
23
28
  export declare const ContentLanguageSchema: Schema.brand<Schema.String, "@NakafaAI/AksaraContentLanguage">;
24
29
  export type ContentLanguage = typeof ContentLanguageSchema.Type;
25
30
  /** Locale identity of one immutable compiled content artifact. */
26
- export declare const ArtifactLocaleSchema: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
31
+ export declare const ArtifactLocaleSchema: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraArtifactLocale">;
27
32
  export type ArtifactLocale = typeof ArtifactLocaleSchema.Type;
28
33
  /** Canonical locale order used by every active-locale subset. */
29
- export declare const APP_LOCALE_CODES: readonly ["en", "id", "de"];
30
- /** Source-controlled application locale codes included by this corpus. */
34
+ export declare const APP_LOCALE_CODES: readonly ["en", "id", "de", "ms"];
35
+ /**
36
+ * Source-controlled application locale codes included by this corpus: every
37
+ * scope authors each of them, and the product serves each of them.
38
+ */
31
39
  export declare const ActiveAppLocaleCodeSchema: Schema.Literals<readonly ["en", "id", "de"]>;
32
40
  export type ActiveAppLocaleCode = typeof ActiveAppLocaleCodeSchema.Type;
33
41
  /** Source-controlled codes used to index the currently complete corpus. */
@@ -38,8 +46,11 @@ export type ActiveAppLocale = typeof ActiveAppLocaleSchema.Type;
38
46
  /** Returns the plain source-map key for one validated active app locale. */
39
47
  export declare function activeAppLocaleCode(appLocale: ActiveAppLocale): "de" | "en" | "id";
40
48
  /** Returns the plain source-map key for one validated artifact locale. */
41
- export declare function artifactLocaleCode(artifactLocale: ArtifactLocale): "de" | "en" | "id";
42
- /** Nonempty unique active locale subset in canonical contract order. */
49
+ export declare function artifactLocaleCode(artifactLocale: ArtifactLocale): "de" | "en" | "id" | "ms";
50
+ /**
51
+ * Nonempty unique active locale subset in canonical contract order. A declared
52
+ * locale joins it only once the contract makes that locale active.
53
+ */
43
54
  export declare const ActiveAppLocaleListSchema: Schema.NonEmptyArray<Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">>;
44
55
  export type ActiveAppLocaleList = typeof ActiveAppLocaleListSchema.Type;
45
56
  /** Source-controlled application locales included by the current corpus. */
package/dist/locale.js CHANGED
@@ -1,8 +1,13 @@
1
1
  import { Array as Arr, Option, Schema } from "effect";
2
2
  import { hasCanonicalOrder } from "#contracts/canonical";
3
- /** Stable locale codes supported by the current Aksara contract. */
4
- export const AppLocaleCodeSchema = Schema.Literals(["en", "id", "de"]);
5
- export const [ENGLISH_APP_LOCALE_CODE, INDONESIAN_APP_LOCALE_CODE, GERMAN_APP_LOCALE_CODE,] = AppLocaleCodeSchema.literals;
3
+ /**
4
+ * Every locale code the contract declares, in canonical order: the active
5
+ * locales first, then a declared locale whose corpus is still being written.
6
+ * Malay (`ms`) is declared so its copy and content can be written completely
7
+ * before one release makes it active; an active locale never falls back.
8
+ */
9
+ export const AppLocaleCodeSchema = Schema.Literals(["en", "id", "de", "ms"]);
10
+ export const [ENGLISH_APP_LOCALE_CODE, INDONESIAN_APP_LOCALE_CODE, GERMAN_APP_LOCALE_CODE, MALAY_APP_LOCALE_CODE,] = AppLocaleCodeSchema.literals;
6
11
  const APP_LOCALE_BRAND = "@NakafaAI/AksaraAppLocale";
7
12
  /** Application locale used for Nakafa-owned interface and explanation copy. */
8
13
  export const AppLocaleSchema = AppLocaleCodeSchema.pipe(Schema.brand(APP_LOCALE_BRAND));
@@ -44,8 +49,15 @@ export const ContentLanguageSchema = Schema.String.pipe(Schema.check(Schema.make
44
49
  export const ArtifactLocaleSchema = AppLocaleCodeSchema.pipe(Schema.brand("@NakafaAI/AksaraArtifactLocale"));
45
50
  /** Canonical locale order used by every active-locale subset. */
46
51
  export const APP_LOCALE_CODES = AppLocaleCodeSchema.literals;
47
- /** Source-controlled application locale codes included by this corpus. */
48
- export const ActiveAppLocaleCodeSchema = AppLocaleCodeSchema;
52
+ /**
53
+ * Source-controlled application locale codes included by this corpus: every
54
+ * scope authors each of them, and the product serves each of them.
55
+ */
56
+ export const ActiveAppLocaleCodeSchema = AppLocaleCodeSchema.pick([
57
+ ENGLISH_APP_LOCALE_CODE,
58
+ INDONESIAN_APP_LOCALE_CODE,
59
+ GERMAN_APP_LOCALE_CODE,
60
+ ]);
49
61
  /** Source-controlled codes used to index the currently complete corpus. */
50
62
  export const ACTIVE_APP_LOCALE_CODES = ActiveAppLocaleCodeSchema.literals;
51
63
  /** Application locale currently required from every authored scope. */
@@ -60,11 +72,14 @@ export function artifactLocaleCode(artifactLocale) {
60
72
  }
61
73
  /** Checks a nonempty locale subset for uniqueness and canonical order. */
62
74
  function hasCanonicalActiveAppLocales(locales) {
63
- return hasCanonicalOrder(APP_LOCALE_CODES, locales);
75
+ return hasCanonicalOrder(ACTIVE_APP_LOCALE_CODES, locales);
64
76
  }
65
- /** Nonempty unique active locale subset in canonical contract order. */
66
- export const ActiveAppLocaleListSchema = Schema.NonEmptyArray(AppLocaleSchema).pipe(Schema.check(Schema.makeFilter(hasCanonicalActiveAppLocales, {
67
- message: "Active app locales must be unique and follow en, id, de order.",
77
+ /**
78
+ * Nonempty unique active locale subset in canonical contract order. A declared
79
+ * locale joins it only once the contract makes that locale active.
80
+ */
81
+ export const ActiveAppLocaleListSchema = Schema.NonEmptyArray(ActiveAppLocaleSchema).pipe(Schema.check(Schema.makeFilter(hasCanonicalActiveAppLocales, {
82
+ message: `Active app locales must be unique and follow ${Arr.join(ACTIVE_APP_LOCALE_CODES, ", ")} order.`,
68
83
  })));
69
84
  /** Source-controlled application locales included by the current corpus. */
70
85
  export const ACTIVE_APP_LOCALES = Schema.decodeSync(Schema.NonEmptyArray(ActiveAppLocaleSchema))(ACTIVE_APP_LOCALE_CODES);
@@ -1,7 +1,8 @@
1
1
  import { type Schema } from "effect";
2
+ import type { FormulaScope } from "#contracts/math/formula/compile";
2
3
  import type { PlaneLabelAnchor, PlaneMathFrame, PlaneMathObject } from "#contracts/math/plane";
3
4
  import type { SpaceLabelAnchor, SpaceMathFrame, SpaceMathObject, SpaceMathView } from "#contracts/math/space";
4
5
  /** Reports every finite plane object or label that escapes its authored frame. */
5
- export declare function planeBoundsIssues(frame: PlaneMathFrame, objects: readonly PlaneMathObject[], labels: readonly PlaneLabelAnchor[]): readonly Schema.FilterIssue[];
6
+ export declare function planeBoundsIssues(frame: PlaneMathFrame, objects: readonly PlaneMathObject[], labels: readonly PlaneLabelAnchor[], scope?: FormulaScope): readonly Schema.FilterIssue[];
6
7
  /** Reports every finite space object, label, or view target outside its frame. */
7
- export declare function spaceBoundsIssues(frame: SpaceMathFrame, objects: readonly SpaceMathObject[], labels: readonly SpaceLabelAnchor[], view: SpaceMathView): readonly Schema.FilterIssue[];
8
+ export declare function spaceBoundsIssues(frame: SpaceMathFrame, objects: readonly SpaceMathObject[], labels: readonly SpaceLabelAnchor[], view: SpaceMathView, scope?: FormulaScope): readonly Schema.FilterIssue[];
@@ -1,5 +1,8 @@
1
- import { Array as Arr } from "effect";
1
+ import { Array as Arr, Result } from "effect";
2
2
  import { arcContained, axisContains, circleContained, cuboidContained, quadraticContained, } from "#contracts/math/extent";
3
+ import { planeFormulaGeometry, } from "#contracts/math/formula/plane";
4
+ import { geometryVisible } from "#contracts/math/formula/scope";
5
+ import { spaceFormulaGeometry } from "#contracts/math/formula/space";
3
6
  import { infinitePathIntersectsBox } from "#contracts/math/intersection";
4
7
  /** Checks one plane point against both inclusive frame ranges. */
5
8
  function planeContains(frame, point) {
@@ -31,8 +34,26 @@ function spaceAxes(frame, start, through) {
31
34
  { range: frame.z, start: start.z, through: through.z },
32
35
  ];
33
36
  }
34
- /** Checks whether one plane object has complete visible geometry in its frame. */
35
- function planeObjectContained(frame, object) {
37
+ /**
38
+ * Whether a formula's samples show anything inside the frame. A formula that
39
+ * does not read is reported by its own field, so it is not reported again.
40
+ */
41
+ function sampledVisible(geometry, frame) {
42
+ return Result.isFailure(geometry) || geometryVisible(geometry.success, frame);
43
+ }
44
+ /** Checks whether one plane object shows visible geometry in its frame. */
45
+ function planeObjectContained(frame, object, scope, labels) {
46
+ if (object.kind === "function") {
47
+ const axis = object.inputAxis ?? "x";
48
+ const named = Arr.flatMap(labels, ({ at, objectId }) => objectId === object.id ? [at[axis]] : []);
49
+ return sampledVisible(planeFormulaGeometry(object, frame, scope, named), frame);
50
+ }
51
+ if (object.kind === "implicit" ||
52
+ object.kind === "parametric" ||
53
+ object.kind === "polar" ||
54
+ object.kind === "region") {
55
+ return sampledVisible(planeFormulaGeometry(object, frame, scope), frame);
56
+ }
36
57
  if (object.kind === "line") {
37
58
  const [start, through] = object.through;
38
59
  return infinitePathIntersectsBox(object.kind, planeAxes(frame, start, through));
@@ -58,7 +79,15 @@ function planeObjectContained(frame, object) {
58
79
  return quadraticContained(frame, object);
59
80
  }
60
81
  /** Checks whether one space object has complete visible geometry in its frame. */
61
- function spaceObjectContained(frame, object) {
82
+ function spaceObjectContained(frame, object, scope) {
83
+ if (object.kind === "function" ||
84
+ object.kind === "parametric" ||
85
+ object.kind === "prism" ||
86
+ object.kind === "pyramid" ||
87
+ object.kind === "revolution" ||
88
+ object.kind === "surface") {
89
+ return sampledVisible(spaceFormulaGeometry(object, frame, scope), frame);
90
+ }
62
91
  if (object.kind === "line") {
63
92
  const [start, through] = object.through;
64
93
  return infinitePathIntersectsBox(object.kind, spaceAxes(frame, start, through));
@@ -78,9 +107,9 @@ function spaceObjectContained(frame, object) {
78
107
  return cuboidContained(frame, object);
79
108
  }
80
109
  /** Reports every finite plane object or label that escapes its authored frame. */
81
- export function planeBoundsIssues(frame, objects, labels) {
110
+ export function planeBoundsIssues(frame, objects, labels, scope = {}) {
82
111
  return [
83
- ...Arr.flatMap(objects, (object, index) => planeObjectContained(frame, object)
112
+ ...Arr.flatMap(objects, (object, index) => planeObjectContained(frame, object, scope, labels)
84
113
  ? []
85
114
  : [
86
115
  {
@@ -99,7 +128,7 @@ export function planeBoundsIssues(frame, objects, labels) {
99
128
  ];
100
129
  }
101
130
  /** Reports every finite space object, label, or view target outside its frame. */
102
- export function spaceBoundsIssues(frame, objects, labels, view) {
131
+ export function spaceBoundsIssues(frame, objects, labels, view, scope = {}) {
103
132
  const viewIssues = view.kind === "isometric" &&
104
133
  view.target !== undefined &&
105
134
  !spaceContains(frame, view.target)
@@ -111,7 +140,7 @@ export function spaceBoundsIssues(frame, objects, labels, view) {
111
140
  ]
112
141
  : [];
113
142
  return [
114
- ...Arr.flatMap(objects, (object, index) => spaceObjectContained(frame, object)
143
+ ...Arr.flatMap(objects, (object, index) => spaceObjectContained(frame, object, scope)
115
144
  ? []
116
145
  : [
117
146
  {
@@ -0,0 +1,42 @@
1
+ import { Schema } from "effect";
2
+ /** The plane objects a formula defines, which a renderer samples itself. */
3
+ export declare const PlaneCurveObjectSchemas: readonly [Schema.Struct<{
4
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
5
+ readonly id: Schema.String;
6
+ readonly domain: Schema.optionalKey<Schema.Struct<{
7
+ readonly max: Schema.Finite;
8
+ readonly min: Schema.Finite;
9
+ }>>;
10
+ readonly formula: Schema.String;
11
+ readonly inputAxis: Schema.optionalKey<Schema.Literals<readonly ["x", "y"]>>;
12
+ readonly kind: Schema.Literal<"function">;
13
+ }>, Schema.Struct<{
14
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
15
+ readonly id: Schema.String;
16
+ readonly equation: Schema.String;
17
+ readonly kind: Schema.Literal<"implicit">;
18
+ }>, Schema.Struct<{
19
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
20
+ readonly id: Schema.String;
21
+ readonly kind: Schema.Literal<"parametric">;
22
+ readonly parameter: Schema.Struct<{
23
+ readonly max: Schema.Finite;
24
+ readonly min: Schema.Finite;
25
+ }>;
26
+ readonly x: Schema.String;
27
+ readonly y: Schema.String;
28
+ }>, Schema.Struct<{
29
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
30
+ readonly id: Schema.String;
31
+ readonly angle: Schema.Struct<{
32
+ readonly max: Schema.Finite;
33
+ readonly min: Schema.Finite;
34
+ }>;
35
+ readonly kind: Schema.Literal<"polar">;
36
+ readonly radius: Schema.String;
37
+ }>, Schema.Struct<{
38
+ readonly appearance: Schema.Literals<readonly ["answer", "construction", "highlight", "primary", "reference", "secondary", "warning"]>;
39
+ readonly id: Schema.String;
40
+ readonly inequalities: Schema.NonEmptyArray<Schema.String>;
41
+ readonly kind: Schema.Literal<"region">;
42
+ }>];
@@ -0,0 +1,55 @@
1
+ import { Schema } from "effect";
2
+ import { MathAxisRangeSchema } from "#contracts/math/base";
3
+ import { EquationTextSchema, FormulaTextSchema, InequalityTextSchema, } from "#contracts/math/formula/field";
4
+ import { MathObjectFields } from "#contracts/math/object";
5
+ /**
6
+ * The graph of y = f(x), or of x = f(y) when its input axis is y. The renderer
7
+ * samples it inside the frame, at least 200 times per visible branch, exactly
8
+ * at its domain ends and labels, and splits it at every break and asymptote.
9
+ * Without a domain it spans the frame along its input axis.
10
+ */
11
+ const PlaneFunctionObjectSchema = Schema.Struct({
12
+ ...MathObjectFields,
13
+ domain: Schema.optionalKey(MathAxisRangeSchema),
14
+ formula: FormulaTextSchema,
15
+ inputAxis: Schema.optionalKey(Schema.Literals(["x", "y"])),
16
+ kind: Schema.Literal("function"),
17
+ });
18
+ /** A curve traced by x(t) and y(t) while t runs over its parameter range. */
19
+ const PlaneParametricObjectSchema = Schema.Struct({
20
+ ...MathObjectFields,
21
+ kind: Schema.Literal("parametric"),
22
+ parameter: MathAxisRangeSchema,
23
+ x: FormulaTextSchema,
24
+ y: FormulaTextSchema,
25
+ });
26
+ /** A curve r = f(theta) in polar coordinates, theta in radians over its range. */
27
+ const PlanePolarObjectSchema = Schema.Struct({
28
+ ...MathObjectFields,
29
+ angle: MathAxisRangeSchema,
30
+ kind: Schema.Literal("polar"),
31
+ radius: FormulaTextSchema,
32
+ });
33
+ /** Every point of the frame where an equation in x and y holds, such as a conic. */
34
+ const PlaneImplicitObjectSchema = Schema.Struct({
35
+ ...MathObjectFields,
36
+ equation: EquationTextSchema,
37
+ kind: Schema.Literal("implicit"),
38
+ });
39
+ /**
40
+ * The part of the frame where every inequality holds, shaded, with each
41
+ * boundary drawn solid for <= or >= and dashed for < or >.
42
+ */
43
+ const PlaneRegionObjectSchema = Schema.Struct({
44
+ ...MathObjectFields,
45
+ inequalities: Schema.NonEmptyArray(InequalityTextSchema),
46
+ kind: Schema.Literal("region"),
47
+ });
48
+ /** The plane objects a formula defines, which a renderer samples itself. */
49
+ export const PlaneCurveObjectSchemas = [
50
+ PlaneFunctionObjectSchema,
51
+ PlaneImplicitObjectSchema,
52
+ PlaneParametricObjectSchema,
53
+ PlanePolarObjectSchema,
54
+ PlaneRegionObjectSchema,
55
+ ];