@sdboyer/thema-ui 0.0.0-bootstrap.0 → 0.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 (225) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +24 -1
  3. package/dist/Diagnostics.d.ts +8 -0
  4. package/dist/Diagnostics.js +14 -0
  5. package/dist/Editor.d.ts +12 -0
  6. package/dist/Editor.js +95 -0
  7. package/dist/OpBar.d.ts +14 -0
  8. package/dist/OpBar.js +15 -0
  9. package/dist/Output.d.ts +20 -0
  10. package/dist/Output.js +56 -0
  11. package/dist/Tabs.d.ts +15 -0
  12. package/dist/Tabs.js +23 -0
  13. package/dist/cue-lang.d.ts +8 -0
  14. package/dist/cue-lang.js +82 -0
  15. package/dist/docs.d.ts +64 -0
  16. package/dist/docs.js +42 -0
  17. package/dist/index.d.ts +12 -0
  18. package/dist/index.js +18 -0
  19. package/dist/markers.d.ts +11 -0
  20. package/dist/markers.js +45 -0
  21. package/dist/ops.d.ts +13 -0
  22. package/dist/ops.js +22 -0
  23. package/dist/positions.d.ts +7 -0
  24. package/dist/positions.js +40 -0
  25. package/dist/theme.d.ts +16 -0
  26. package/dist/theme.js +55 -0
  27. package/dist/types.d.ts +580 -0
  28. package/dist/types.js +85 -0
  29. package/errors/E0101.md +43 -0
  30. package/errors/E0102.md +34 -0
  31. package/errors/E0103.md +41 -0
  32. package/errors/E0104.md +5 -0
  33. package/errors/E0105.md +62 -0
  34. package/errors/E0106.md +46 -0
  35. package/errors/E0107.md +48 -0
  36. package/errors/E0108.md +45 -0
  37. package/errors/E0109.md +37 -0
  38. package/errors/E0110.md +17 -0
  39. package/errors/E0111.md +55 -0
  40. package/errors/E0112.md +40 -0
  41. package/errors/E0120.md +34 -0
  42. package/errors/E0121.md +34 -0
  43. package/errors/E0122.md +26 -0
  44. package/errors/E0123.md +37 -0
  45. package/errors/E0124.md +36 -0
  46. package/errors/E0125.md +43 -0
  47. package/errors/E0126.md +38 -0
  48. package/errors/E0128.md +34 -0
  49. package/errors/E0129.md +42 -0
  50. package/errors/E0130.md +43 -0
  51. package/errors/E0131.md +42 -0
  52. package/errors/E0132.md +40 -0
  53. package/errors/E0133.md +46 -0
  54. package/errors/E0134.md +36 -0
  55. package/errors/E0135.md +109 -0
  56. package/errors/E0137.md +37 -0
  57. package/errors/E0140.md +46 -0
  58. package/errors/E0141.md +35 -0
  59. package/errors/E0142.md +38 -0
  60. package/errors/E0143.md +62 -0
  61. package/errors/E0144.md +49 -0
  62. package/errors/E0145.md +48 -0
  63. package/errors/E0146.md +38 -0
  64. package/errors/E0147.md +57 -0
  65. package/errors/E0148.md +42 -0
  66. package/errors/E0149.md +27 -0
  67. package/errors/E0150.md +77 -0
  68. package/errors/E0151.md +47 -0
  69. package/errors/E0152.md +35 -0
  70. package/errors/E0201.md +35 -0
  71. package/errors/E0202.md +42 -0
  72. package/errors/E0203.md +37 -0
  73. package/errors/E0204.md +46 -0
  74. package/errors/E0205.md +47 -0
  75. package/errors/E0206.md +47 -0
  76. package/errors/E0208.md +59 -0
  77. package/errors/E0210.md +44 -0
  78. package/errors/E0211.md +43 -0
  79. package/errors/E0212.md +41 -0
  80. package/errors/E0213.md +42 -0
  81. package/errors/E0214.md +42 -0
  82. package/errors/E0215.md +44 -0
  83. package/errors/E0216.md +41 -0
  84. package/errors/E0217.md +43 -0
  85. package/errors/E0218.md +44 -0
  86. package/errors/E0230.md +46 -0
  87. package/errors/E0232.md +42 -0
  88. package/errors/E0233.md +42 -0
  89. package/errors/E0234.md +43 -0
  90. package/errors/E0240.md +31 -0
  91. package/errors/E0242.md +5 -0
  92. package/errors/E0243.md +5 -0
  93. package/errors/E0250.md +39 -0
  94. package/errors/E0251.md +83 -0
  95. package/errors/E0252.md +42 -0
  96. package/errors/E0253.md +142 -0
  97. package/errors/E0254.md +38 -0
  98. package/errors/E0301.md +43 -0
  99. package/errors/E0302.md +58 -0
  100. package/errors/E0303.md +57 -0
  101. package/errors/E0304.md +9 -0
  102. package/errors/E0305.md +55 -0
  103. package/errors/E0307.md +9 -0
  104. package/errors/E0308.md +9 -0
  105. package/errors/E0310.md +46 -0
  106. package/errors/E0311.md +46 -0
  107. package/errors/E0330.md +67 -0
  108. package/errors/E0331.md +64 -0
  109. package/errors/E0332.md +52 -0
  110. package/errors/E0333.md +61 -0
  111. package/errors/E0334.md +61 -0
  112. package/errors/E0335.md +57 -0
  113. package/errors/E0336.md +50 -0
  114. package/errors/E0337.md +54 -0
  115. package/errors/E0338.md +62 -0
  116. package/errors/E0340.md +57 -0
  117. package/errors/E0341.md +51 -0
  118. package/errors/E0342.md +53 -0
  119. package/errors/E0343.md +56 -0
  120. package/errors/E0344.md +58 -0
  121. package/errors/E0345.md +51 -0
  122. package/errors/E0346.md +45 -0
  123. package/errors/E0347.md +53 -0
  124. package/errors/E0348.md +50 -0
  125. package/errors/E0349.md +52 -0
  126. package/errors/E0350.md +54 -0
  127. package/errors/E0351.md +54 -0
  128. package/errors/E0352.md +60 -0
  129. package/errors/E0353.md +53 -0
  130. package/errors/E0354.md +43 -0
  131. package/errors/E0355.md +55 -0
  132. package/errors/E0356.md +65 -0
  133. package/errors/E0357.md +68 -0
  134. package/errors/E0358.md +50 -0
  135. package/errors/E0359.md +53 -0
  136. package/errors/E0360.md +59 -0
  137. package/errors/E0361.md +59 -0
  138. package/errors/E0362.md +56 -0
  139. package/errors/E0364.md +58 -0
  140. package/errors/E0365.md +58 -0
  141. package/errors/E0366.md +56 -0
  142. package/errors/E0367.md +57 -0
  143. package/errors/E0368.md +58 -0
  144. package/errors/E0369.md +60 -0
  145. package/errors/E0370.md +59 -0
  146. package/errors/E0371.md +59 -0
  147. package/errors/E0372.md +57 -0
  148. package/errors/E0380.md +71 -0
  149. package/errors/E0381.md +61 -0
  150. package/errors/E0382.md +64 -0
  151. package/errors/E0383.md +61 -0
  152. package/errors/E0384.md +63 -0
  153. package/errors/E0385.md +61 -0
  154. package/errors/E0386.md +59 -0
  155. package/errors/E0387.md +59 -0
  156. package/errors/E0388.md +60 -0
  157. package/errors/E0389.md +59 -0
  158. package/errors/E0390.md +59 -0
  159. package/errors/E0401.md +56 -0
  160. package/errors/E0402.md +51 -0
  161. package/errors/E0403.md +51 -0
  162. package/errors/E0404.md +57 -0
  163. package/errors/E0405.md +56 -0
  164. package/errors/E0406.md +53 -0
  165. package/errors/E0407.md +54 -0
  166. package/errors/E0410.md +56 -0
  167. package/errors/E0411.md +59 -0
  168. package/errors/E0412.md +59 -0
  169. package/errors/E0413.md +74 -0
  170. package/errors/E0414.md +53 -0
  171. package/errors/E0415.md +72 -0
  172. package/errors/E0416.md +67 -0
  173. package/errors/E0418.md +59 -0
  174. package/errors/E0420.md +71 -0
  175. package/errors/E0421.md +82 -0
  176. package/errors/E0422.md +82 -0
  177. package/errors/E0423.md +83 -0
  178. package/errors/E0501.md +51 -0
  179. package/errors/E0502.md +50 -0
  180. package/errors/E0503.md +52 -0
  181. package/errors/E0504.md +64 -0
  182. package/errors/E0505.md +51 -0
  183. package/errors/E0506.md +48 -0
  184. package/errors/E0507.md +41 -0
  185. package/errors/E0508.md +39 -0
  186. package/errors/E0601.md +22 -0
  187. package/errors/E0602.md +28 -0
  188. package/errors/E0603.md +65 -0
  189. package/errors/E0604.md +37 -0
  190. package/errors/E0605.md +36 -0
  191. package/errors/E0606.md +44 -0
  192. package/errors/E0607.md +57 -0
  193. package/errors/E0608.md +37 -0
  194. package/errors/E0609.md +33 -0
  195. package/errors/E0611.md +37 -0
  196. package/errors/E0612.md +34 -0
  197. package/errors/E0613.md +30 -0
  198. package/errors/E0614.md +36 -0
  199. package/errors/E0616.md +33 -0
  200. package/errors/E0617.md +15 -0
  201. package/errors/E0618.md +16 -0
  202. package/errors/E0620.md +37 -0
  203. package/errors/E0621.md +45 -0
  204. package/errors/E0622.md +34 -0
  205. package/errors/E0623.md +33 -0
  206. package/errors/E0624.md +34 -0
  207. package/errors/E0625.md +28 -0
  208. package/errors/E0626.md +54 -0
  209. package/errors/E0627.md +27 -0
  210. package/errors/E0628.md +63 -0
  211. package/errors/E0701.md +25 -0
  212. package/errors/E0801.md +23 -0
  213. package/errors/E0802.md +22 -0
  214. package/errors/E0803.md +22 -0
  215. package/errors/E0804.md +25 -0
  216. package/errors/E0805.md +26 -0
  217. package/errors/E0901.md +27 -0
  218. package/errors/E0902.md +40 -0
  219. package/errors/E0903.md +23 -0
  220. package/errors/E1001.md +53 -0
  221. package/errors/E1002.md +43 -0
  222. package/errors/E1003.md +40 -0
  223. package/errors/E1004.md +44 -0
  224. package/errors/README.md +215 -0
  225. package/package.json +29 -3
@@ -0,0 +1,22 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0802: the playground request gives the lineage in neither form, or in both
4
+
5
+ A request names a lineage in exactly one form: the authoring form's files,
6
+ with the lineage's name, or one normal-form file. This one gives neither.
7
+
8
+ ## Example
9
+
10
+ `request.json`:
11
+
12
+ ```json
13
+ {"lineage": {}}
14
+ ```
15
+
16
+ thema reports:
17
+
18
+ ```
19
+ error[E0802]: no lineage was given
20
+ |
21
+ = help: send the authoring form's files, or one normal-form file
22
+ ```
@@ -0,0 +1,22 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0803: a version in the playground request is not a version
4
+
5
+ A version in a request is written <major>.<minor>. A version that parses but
6
+ that the lineage lacks is E0240 instead.
7
+
8
+ ## Example
9
+
10
+ `request.json`:
11
+
12
+ ```json
13
+ {"lineage": {"normal": {"path": "lineage.cue", "text": "name: \"ship\"\nschemas: {\n\t\"0\": {\n\t\t\"0\": {\n\t\t\tschema: {\n\t\t\t\tcrew: int\n\t\t\t}\n\t\t}\n\t}\n}\n"}}, "data": {"filename": "data.json", "text": "{\"crew\": 1}"}, "version": "1"}
14
+ ```
15
+
16
+ thema reports:
17
+
18
+ ```
19
+ error[E0803]: "1" is not a version
20
+ |
21
+ = help: a version is <major>.<minor>, such as 1.0
22
+ ```
@@ -0,0 +1,25 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0804: a host example in the playground request is incomplete or inconsistent
4
+
5
+ A playground deployment registers examples of its own beside thema's, and
6
+ each must be complete and its own: an ID no other example has, a title, a
7
+ category that is not one of thema's, and a kind, when given, that names the
8
+ form its lineage is in. The examples operation lists the IDs and categories
9
+ already taken. The other examples in the request are registered regardless.
10
+
11
+ ## Example
12
+
13
+ `request.json`:
14
+
15
+ ```json
16
+ {"examples": [{"example": {"id": "exemplar/defaultchange", "title": "pet", "category": "Pets", "summary": "", "kind": "", "binds": true}, "lineage": {"normal": {"path": "lineage.cue", "text": "name: \"pet\"\nschemas: {\n\t\"0\": {\n\t\t\"0\": {\n\t\t\tschema: {\n\t\t\t\tname: string\n\t\t\t}\n\t\t}\n\t}\n}\n"}}}]}
17
+ ```
18
+
19
+ thema reports:
20
+
21
+ ```
22
+ error[E0804]: host example "exemplar/defaultchange" has the id of another example
23
+ |
24
+ = help: give every example an id of its own; the examples operation lists the ids already taken
25
+ ```
@@ -0,0 +1,26 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0805: a host example does not bind as its record declares
4
+
5
+ A playground deployment registers examples of its own beside thema's, and
6
+ each declares whether its lineage binds: an example of an error does not.
7
+ Registering an example binds its lineage, and refuses it when the outcome
8
+ differs from what it declares; the notes say what binding it reported. The
9
+ other examples in the request are registered regardless.
10
+
11
+ ## Example
12
+
13
+ `request.json`:
14
+
15
+ ```json
16
+ {"examples": [{"example": {"id": "pets/empty", "title": "empty", "category": "Pets", "summary": "", "kind": "", "binds": true}, "lineage": {"normal": {"path": "lineage.cue", "text": "name: \"empty\"\nschemas: {}\n"}}}]}
17
+ ```
18
+
19
+ thema reports:
20
+
21
+ ```
22
+ error[E0805]: host example "pets/empty" is declared to bind, but does not
23
+ |
24
+ = note: binding it reports E0122: the lineage declares no schemas
25
+ = help: fix the lineage, or set binds to false if the example is meant to show an error
26
+ ```
@@ -0,0 +1,27 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0901: thema failed internally
4
+
5
+ thema panicked while doing its work, and the operation's boundary recovered the
6
+ panic rather than crash the program. This is a bug in thema, not in the lineage
7
+ or data. The detail holds the panic's value and the goroutine stack; please
8
+ report both.
9
+
10
+ ## Example
11
+
12
+ `panic.txt`:
13
+
14
+ ```
15
+ runtime error: index out of range [3] with length 3
16
+ ```
17
+
18
+ thema reports:
19
+
20
+ ```
21
+ error[E0901]: thema failed internally
22
+ |
23
+ = detail: runtime error: index out of range [3] with length 3
24
+
25
+ <the goroutine stack>
26
+ = help: this is a bug in thema; please report it with the detail above
27
+ ```
@@ -0,0 +1,40 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0902: CUE reported an error thema does not recognize
4
+
5
+ The CUE evaluator reported an error that none of thema's codes describes. The
6
+ detail holds CUE's message verbatim, and every position CUE attached to it is
7
+ kept: the first in the author's files as the primary, the rest as notes. Nothing
8
+ CUE said is dropped, but thema has not yet learned to explain it; each shape of
9
+ error that reaches this code is a candidate for a code of its own.
10
+
11
+ ## Example
12
+
13
+ `a.cue`:
14
+
15
+ ```cue
16
+ x: 1
17
+ ```
18
+
19
+ `b.cue`:
20
+
21
+ ```cue
22
+ x: "one"
23
+ ```
24
+
25
+ thema reports:
26
+
27
+ ```
28
+ error[E0902]: CUE reported an error thema does not recognize
29
+ --> a.cue:1:4
30
+ |
31
+ 1 | x: 1
32
+ | ^
33
+ |
34
+ ::: b.cue:1:4
35
+ |
36
+ 1 | x: "one"
37
+ | ----- also here
38
+ |
39
+ = detail: x: conflicting values 1 and "one" (mismatched types int and string)
40
+ ```
@@ -0,0 +1,23 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E0903: thema reported an error that has no code
4
+
5
+ thema reported an error as plain text, with no code, no position and no
6
+ structure. Every one of these is a gap: the place in thema that produced it has
7
+ not been given a code yet. The detail holds the text.
8
+
9
+ ## Example
10
+
11
+ `error.txt`:
12
+
13
+ ```
14
+ could not open the lineage: permission denied
15
+ ```
16
+
17
+ thema reports:
18
+
19
+ ```
20
+ error[E0903]: thema reported an error that has no code
21
+ |
22
+ = detail: could not open the lineage: permission denied
23
+ ```
@@ -0,0 +1,53 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E1001: a lens on the edge into the tip is missing
4
+
5
+ The tip removes a field without writing a `ForwardLens` that says where the
6
+ field goes, so the lens on the edge into the tip cannot be derived. The
7
+ development path binds the lineage anyway, without that lens, and reports it
8
+ as a warning: the edge is still being written. The derivation's own findings
9
+ are the notes. Translating across the missing lens fails (E1002); binding the
10
+ history alone never reads the tip.
11
+
12
+ ## Example
13
+
14
+ `ship/history/0.0.thema`:
15
+
16
+ ```cue
17
+ Schema: {
18
+ a: string
19
+ b: int
20
+ }
21
+ ```
22
+
23
+ `ship/tip.thema`:
24
+
25
+ ```cue
26
+ Schema: {
27
+ a: string
28
+ }
29
+ ```
30
+
31
+ thema reports:
32
+
33
+ ```
34
+ warning[E1001]: tip.thema has no ForwardLens, and one cannot be derived
35
+ --> tip.thema:1:1
36
+ |
37
+ 1 | Schema: {
38
+ | ^^^^^^
39
+ | ------ 0.0 declares b and tip does not, and nothing maps it: write <field>: v0_0.b to move it, or b: _drop
40
+ |
41
+ = note: translating from 0.0 to tip needs it; until tip.thema writes it, that translation fails (E1002)
42
+ = help: write ForwardLens: {v0_0: _, tip: {...}} in tip.thema
43
+
44
+ warning[E1001]: tip.thema has no BackwardLens, and one cannot be derived
45
+ --> tip.thema:1:1
46
+ |
47
+ 1 | Schema: {
48
+ | ^^^^^^
49
+ | ------ tip.thema has no BackwardLens, and 0.0 requires b: write BackwardLens: {tip: _, v0_0: {b: <mapping>}}
50
+ |
51
+ = note: translating from tip to 0.0 needs it; until tip.thema writes it, that translation fails (E1002)
52
+ = help: write BackwardLens: {tip: _, v0_0: {...}} in tip.thema
53
+ ```
@@ -0,0 +1,43 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E1002: a translation needs a lens the tip does not have yet
4
+
5
+ Translating into the tip needs the `ForwardLens` on the edge into it, which
6
+ `tip.thema` does not write and cannot be derived (E1001). The development path
7
+ bound the lineage without it; the translation that needs it fails, and says
8
+ which lens to write. Translating out of the tip, through the derived
9
+ `BackwardLens`, works.
10
+
11
+ ## Example
12
+
13
+ `ship/history/0.0.thema`:
14
+
15
+ ```cue
16
+ Schema: {
17
+ a: string
18
+ b: int
19
+ }
20
+ ```
21
+
22
+ `ship/tip.thema`:
23
+
24
+ ```cue
25
+ Schema: {
26
+ a: string
27
+ }
28
+ ```
29
+
30
+ `data.json`:
31
+
32
+ ```json
33
+ {"a": "x", "b": 1}
34
+ ```
35
+
36
+ thema reports:
37
+
38
+ ```
39
+ error[E1002]: translating from 0.0 to 1.0 needs the ForwardLens in tip.thema, which is not written yet
40
+ |
41
+ = note: 1.0 is provisional: the schema in tip.thema, which is still being worked on, and whose lenses may not be written yet
42
+ = help: write the ForwardLens in tip.thema
43
+ ```
@@ -0,0 +1,40 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E1003: the tip is not clean: it differs from the newest version in history/
4
+
5
+ The tip is not clean: its schema differs from that of the newest version
6
+ under `history/`. A clean tip equals the last version cut, with no lenses of
7
+ its own; CI checks it to assert that the tip was cut before merging. The tip
8
+ says which version it would be cut as.
9
+
10
+ ## Example
11
+
12
+ `ship/history/0.0.thema`:
13
+
14
+ ```cue
15
+ Schema: {
16
+ a: string
17
+ }
18
+ ```
19
+
20
+ `ship/tip.thema`:
21
+
22
+ ```cue
23
+ Schema: {
24
+ a: string
25
+ b?: int
26
+ }
27
+ ```
28
+
29
+ thema reports:
30
+
31
+ ```
32
+ error[E1003]: the Schema in tip.thema differs from the one in history/0.0.thema
33
+ --> tip.thema:1:1
34
+ |
35
+ 1 | Schema: {
36
+ | ^^^^^^
37
+ |
38
+ = note: the tip cuts as 0.1
39
+ = help: cut the tip to history/0.1.thema, or make its Schema equal history/0.0.thema's
40
+ ```
@@ -0,0 +1,44 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # E1004: the tip cannot be cut while a lens on its edge is missing
4
+
5
+ The tip removes a field without writing the lenses that say where the
6
+ field goes, and is cut. A version that has been cut never changes, so the
7
+ lenses on the edge into it have to be written before it is: the development
8
+ path tolerates a missing lens as a warning (E1001), and cutting refuses it.
9
+ Each lens still missing is a note. Write the lenses in `tip.thema`, then cut
10
+ it.
11
+
12
+ ## Example
13
+
14
+ `ship/history/0.0.thema`:
15
+
16
+ ```cue
17
+ Schema: {
18
+ a: string
19
+ b: int
20
+ }
21
+ ```
22
+
23
+ `ship/tip.thema`:
24
+
25
+ ```cue
26
+ Schema: {
27
+ a: string
28
+ }
29
+ ```
30
+
31
+ thema reports:
32
+
33
+ ```
34
+ error[E1004]: the tip cannot be cut as 1.0 while a lens on its edge is missing
35
+ --> tip.thema:1:1
36
+ |
37
+ 1 | Schema: {
38
+ | ^^^^^^
39
+ |
40
+ = note: tip.thema has no ForwardLens, and one cannot be derived
41
+ = note: tip.thema has no BackwardLens, and one cannot be derived
42
+ = note: a version that has been cut never changes, so the lenses into it are written before it is
43
+ = help: write the missing lenses in tip.thema, then cut it
44
+ ```
@@ -0,0 +1,215 @@
1
+ <!-- Generated by go test ./diag; do not edit. -->
2
+
3
+ # Error codes
4
+
5
+ Every diagnostic thema reports carries a code. A code's meaning never changes; a code that is no longer reported is retired, not reused. The codes are grouped by hundreds:
6
+
7
+ | Range | Area |
8
+ |---|---|
9
+ | E01xx | the shape of authoring files and of the lineage |
10
+ | E02xx | versions and compatibility |
11
+ | E03xx | lenses |
12
+ | E04xx | lacunas |
13
+ | E05xx | data validation |
14
+ | E06xx | loading, modules and the CLI's inputs |
15
+ | E09xx | thema itself: internal errors and CUE errors thema does not recognize |
16
+
17
+ A code's scope says what its condition reads: `one` when one version's files, the numbering of the version files, the data or the CLI's inputs decide it alone, and `versions` when it compares a version with another: a schema with its predecessor's, a lens with the versions at its ends, the tip with its parent, or a lineage with what it was published as.
18
+
19
+ | Code | Severity | Scope | Title |
20
+ |---|---|---|---|
21
+ | [E0101](E0101.md) | error | one | a file in the lineage's directory is not a version file |
22
+ | [E0102](E0102.md) | error | one | a version file is not CUE syntax |
23
+ | [E0103](E0103.md) | error | one | a version file has a package clause |
24
+ | [E0104](E0104.md) | error | one | retired: a version file imports a package |
25
+ | [E0105](E0105.md) | error | one | a version file has a field that is not schema, ForwardLens or BackwardLens |
26
+ | [E0106](E0106.md) | error | one | a version file declares a field twice |
27
+ | [E0107](E0107.md) | error | one | a lens block is not a struct |
28
+ | [E0108](E0108.md) | error | one | a version file declares no schema |
29
+ | [E0109](E0109.md) | error | one | a version file uses CUE's struct shorthand |
30
+ | [E0110](E0110.md) | error | one | the lineage's directory has no version files |
31
+ | [E0111](E0111.md) | error | one | a lens block is not shaped as a lens |
32
+ | [E0112](E0112.md) | error | one | a version file's schema has an error |
33
+ | [E0120](E0120.md) | error | one | the lineage does not declare a field every lineage has |
34
+ | [E0121](E0121.md) | error | one | a field every lineage has is not concrete |
35
+ | [E0122](E0122.md) | error | one | the lineage declares no schemas |
36
+ | [E0123](E0123.md) | error | one | a field that is not part of a lineage, a schema entry or a lens |
37
+ | [E0124](E0124.md) | error | one | a schemas key that is not a version |
38
+ | [E0125](E0125.md) | error | one | a lenses key that is not a lens edge |
39
+ | [E0126](E0126.md) | error | one | the lineage is not an instance of thema.Lineage |
40
+ | [E0128](E0128.md) | error | one | there is no value at the path given for the lineage |
41
+ | [E0129](E0129.md) | error | one | a schema is not a struct |
42
+ | [E0130](E0130.md) | error | one | the joinSchema is not a struct |
43
+ | [E0131](E0131.md) | error | one | an example is not an instance of its schema |
44
+ | [E0132](E0132.md) | error | one | a schema uses a comprehension |
45
+ | [E0133](E0133.md) | error | one | a schema's references form a cycle |
46
+ | [E0134](E0134.md) | error | one | a schema refers to a value that contains it |
47
+ | [E0135](E0135.md) | error | one | a schema's chain of references is too deep to follow |
48
+ | [E0137](E0137.md) | error | one | the lineage's name is not an identifier |
49
+ | [E0140](E0140.md) | error | one | a schema refers to another schema of the lineage |
50
+ | [E0141](E0141.md) | error | one | a schema or lens refers to something the lineage declares outside it |
51
+ | [E0142](E0142.md) | error | one | a schema or lens refers to something declared outside the lineage |
52
+ | [E0143](E0143.md) | error | one | a schema or lens refers to a package that is not one of CUE's builtins |
53
+ | [E0144](E0144.md) | error | one | a lens refers to a schema of the lineage |
54
+ | [E0145](E0145.md) | error | one | a lens refers to another lens of the lineage |
55
+ | [E0146](E0146.md) | error | one | a reference cannot be resolved statically |
56
+ | [E0147](E0147.md) | error | one | a version file imports a package its Schema does not use |
57
+ | [E0148](E0148.md) | error | one | a numbered version file is at the top of the lineage's directory, not under history/ |
58
+ | [E0149](E0149.md) | error | one | the lineage's directory has no tip.thema |
59
+ | [E0150](E0150.md) | error | versions | a lens of the tip names a version other than the tip's parent, the newest version under history/ |
60
+ | [E0151](E0151.md) | error | one | a schema or lens declares a hidden field or a hidden definition |
61
+ | [E0152](E0152.md) | error | one | the value a lineage is bound from is not the root of a value CUE built from source |
62
+ | [E0201](E0201.md) | error | one | the first schema is not version 0.0 |
63
+ | [E0202](E0202.md) | error | one | a schema's version does not follow its predecessor's |
64
+ | [E0203](E0203.md) | error | one | a major version declares no schemas |
65
+ | [E0204](E0204.md) | error | one | two version files declare the same version |
66
+ | [E0205](E0205.md) | error | one | the version files skip a version |
67
+ | [E0206](E0206.md) | error | versions | a version file named as a major version is backward compatible with its predecessor |
68
+ | [E0208](E0208.md) | error | versions | a major version is backward compatible with its predecessor |
69
+ | [E0210](E0210.md) | error | versions | a minor version requires a field its predecessor does not declare |
70
+ | [E0211](E0211.md) | error | versions | a minor version rejects a field its predecessor declares |
71
+ | [E0212](E0212.md) | error | versions | a minor version requires a field its predecessor left optional |
72
+ | [E0213](E0213.md) | error | versions | a minor version drops a default its predecessor filled |
73
+ | [E0214](E0214.md) | error | versions | a minor version changes a default |
74
+ | [E0215](E0215.md) | error | versions | a minor version narrows the values a field accepts |
75
+ | [E0216](E0216.md) | error | versions | a minor version narrows a list's length |
76
+ | [E0217](E0217.md) | error | versions | a minor version narrows the field names a struct accepts |
77
+ | [E0218](E0218.md) | error | versions | a minor version adds or tightens a validator |
78
+ | [E0230](E0230.md) | error | versions | a minor version constrains a field by another field's value, which the checker cannot compare |
79
+ | [E0232](E0232.md) | error | versions | a minor version changes a validator the checker has no rule for |
80
+ | [E0233](E0233.md) | error | versions | a minor version's disjunction cannot be shown to cover its predecessor's |
81
+ | [E0234](E0234.md) | error | versions | a minor version's pattern constraints cannot be shown to cover its predecessor's |
82
+ | [E0240](E0240.md) | error | one | the lineage has no schema with that version |
83
+ | [E0242](E0242.md) | error | versions | retired: a published schema was deleted |
84
+ | [E0243](E0243.md) | error | versions | retired: a published schema was changed |
85
+ | [E0250](E0250.md) | error | versions | a published version's schema was changed |
86
+ | [E0251](E0251.md) | error | versions | a published version's lens was changed |
87
+ | [E0252](E0252.md) | error | versions | a published version was removed |
88
+ | [E0253](E0253.md) | error | versions | a new version comes before the newest published version |
89
+ | [E0254](E0254.md) | error | versions | the lineage's name differs from the name it was published with |
90
+ | [E0301](E0301.md) | error | versions | the lineage lacks a lens its versions require |
91
+ | [E0302](E0302.md) | error | versions | the lineage declares a lens its versions do not require |
92
+ | [E0303](E0303.md) | error | versions | a lens does not accept every instance of its source schema |
93
+ | [E0304](E0304.md) | error | versions | what a lens produces is not an instance of its target schema |
94
+ | [E0305](E0305.md) | error | versions | a lens writes a field its target schema does not declare |
95
+ | [E0307](E0307.md) | error | versions | translating an instance, a lens produced something that is not concrete |
96
+ | [E0308](E0308.md) | error | versions | translating an instance, a lens failed |
97
+ | [E0310](E0310.md) | error | one | a lens does not declare the instance it takes |
98
+ | [E0311](E0311.md) | error | one | a lens does not declare the instance it returns |
99
+ | [E0330](E0330.md) | error | one | a lens body holds something that is not a mapping |
100
+ | [E0331](E0331.md) | error | one | a mapping's key is not a plain field name |
101
+ | [E0332](E0332.md) | error | one | a mapping has an attribute |
102
+ | [E0333](E0333.md) | error | one | a lens body or its lacunas declare a hidden field or a definition |
103
+ | [E0334](E0334.md) | error | one | a nested body embeds something other than a path into the source instance |
104
+ | [E0335](E0335.md) | error | one | a _coalesce is not _coalesce(source path, fallback) |
105
+ | [E0336](E0336.md) | error | one | a _match is not _match(source path, arms) |
106
+ | [E0337](E0337.md) | error | one | an _each is not _each(source list, body) |
107
+ | [E0338](E0338.md) | error | one | a _match's arms are not constant arms with at most one catch-all |
108
+ | [E0340](E0340.md) | error | versions | a lens reads a field its source version does not declare |
109
+ | [E0341](E0341.md) | error | versions | a lens maps a field its target version does not declare |
110
+ | [E0342](E0342.md) | error | versions | a lens drops a field its target version requires |
111
+ | [E0343](E0343.md) | error | versions | a lens moves an optional field to a required one with no fallback |
112
+ | [E0344](E0344.md) | error | versions | a constant in a lens is not an instance of its target field |
113
+ | [E0345](E0345.md) | error | one | a lens maps a target field twice |
114
+ | [E0346](E0346.md) | error | versions | a lens produces nothing for a field its target version requires |
115
+ | [E0347](E0347.md) | error | versions | a field the source version has and the target lacks is neither mapped nor dropped |
116
+ | [E0348](E0348.md) | error | versions | a _coalesce reads a field the source version always has |
117
+ | [E0349](E0349.md) | error | versions | a _coalesce's fallback may itself be absent |
118
+ | [E0350](E0350.md) | error | one | a _match has two arms for one value |
119
+ | [E0351](E0351.md) | error | versions | a _match is not exhaustive |
120
+ | [E0352](E0352.md) | error | versions | a _match passes values through to a target the lens cannot test them against |
121
+ | [E0353](E0353.md) | error | versions | an _each maps something other than an open list to an open list |
122
+ | [E0354](E0354.md) | error | one | the first version has a lens |
123
+ | [E0355](E0355.md) | error | versions | a minor version has a ForwardLens |
124
+ | [E0356](E0356.md) | error | one | a normal-form lens is outside what the authoring form expresses |
125
+ | [E0357](E0357.md) | error | one | a mapping calls a function a lens may not call |
126
+ | [E0358](E0358.md) | error | versions | a field both versions declare cannot be copied: the target does not accept every source value |
127
+ | [E0359](E0359.md) | error | versions | a move reads a source field whose values the target field does not all accept |
128
+ | [E0360](E0360.md) | error | versions | a lens copies a value its target rejects for some instance |
129
+ | [E0361](E0361.md) | error | versions | a lens reads a field that may be absent |
130
+ | [E0362](E0362.md) | error | versions | a lens reads a field its source schema does not declare |
131
+ | [E0364](E0364.md) | error | versions | a lens's pattern tests a field that may be absent |
132
+ | [E0365](E0365.md) | error | one | a lens writes a constraint where an instance needs a value |
133
+ | [E0366](E0366.md) | error | versions | a lens writes a literal its target rejects |
134
+ | [E0367](E0367.md) | error | versions | a lens computes a value its target rejects for some instance |
135
+ | [E0368](E0368.md) | error | versions | a lens leaves a required field unwritten for some instance |
136
+ | [E0369](E0369.md) | error | versions | a lens writes a field twice with values that may disagree |
137
+ | [E0370](E0370.md) | error | versions | a lens's arithmetic may overflow |
138
+ | [E0371](E0371.md) | error | versions | a lens may divide by zero |
139
+ | [E0372](E0372.md) | error | versions | a lens indexes a table with a value that has no entry |
140
+ | [E0380](E0380.md) | error | versions | a lens copies a value the checker cannot show its target accepts |
141
+ | [E0381](E0381.md) | error | versions | a lens's condition is not one the checker can read |
142
+ | [E0382](E0382.md) | error | versions | a lens writes a required field only under conditions the checker cannot show exhaustive |
143
+ | [E0383](E0383.md) | error | versions | a lens computes with an operation the checker cannot prove |
144
+ | [E0384](E0384.md) | error | versions | a lens produces fields or elements dynamically |
145
+ | [E0385](E0385.md) | error | one | a lens refers to something the checker cannot follow |
146
+ | [E0386](E0386.md) | error | versions | a lens's integer arithmetic has no bounds the checker can trust |
147
+ | [E0387](E0387.md) | error | versions | a lens's divisor may be zero as far as the checker can tell |
148
+ | [E0388](E0388.md) | error | versions | a lens writes to a target constraint the checker cannot compare |
149
+ | [E0389](E0389.md) | error | versions | a lens indexes a table with a value that is not a finite set of constants |
150
+ | [E0390](E0390.md) | error | one | a lens takes the first element of a list that may be empty |
151
+ | [E0401](E0401.md) | error | one | a lens's lacunas are not listed unconditionally |
152
+ | [E0402](E0402.md) | error | one | a lacuna has no message |
153
+ | [E0403](E0403.md) | error | one | a lacuna has no type |
154
+ | [E0404](E0404.md) | error | versions | a lacuna names a field its schema does not declare |
155
+ | [E0405](E0405.md) | error | one | a lacuna's field path is not a path |
156
+ | [E0406](E0406.md) | error | one | a lacuna's type is not a lacuna type |
157
+ | [E0407](E0407.md) | error | one | a field that is not part of a lacuna |
158
+ | [E0410](E0410.md) | error | one | a lacunas declaration is not shaped as lacunas |
159
+ | [E0411](E0411.md) | error | one | a lacuna's type is not a lacuna type |
160
+ | [E0412](E0412.md) | error | one | a lacunas key names a mapping the lens does not have |
161
+ | [E0413](E0413.md) | error | one | a lacuna on a mapping inside _each |
162
+ | [E0414](E0414.md) | error | one | a _match's catch-all arm has no lacuna |
163
+ | [E0415](E0415.md) | error | one | a lacuna on _each has no when |
164
+ | [E0416](E0416.md) | error | one | a _drop has a lacuna that is not its one DroppedField refinement |
165
+ | [E0418](E0418.md) | error | one | a condition refers to a name a lens does not define |
166
+ | [E0420](E0420.md) | error | one | a lacuna on a _match with no catch-all arm has no when |
167
+ | [E0421](E0421.md) | error | one | a lacuna on a _drop inside _each has a when |
168
+ | [E0422](E0422.md) | error | versions | a when names a field that is not a condition |
169
+ | [E0423](E0423.md) | error | one | a when tests the presence of a field it also reads |
170
+ | [E0501](E0501.md) | error | one | the data lacks a field the schema requires |
171
+ | [E0502](E0502.md) | error | one | the data has a field the schema does not declare |
172
+ | [E0503](E0503.md) | error | one | a value in the data is of a kind the schema does not accept |
173
+ | [E0504](E0504.md) | error | one | a value in the data is outside what the schema allows |
174
+ | [E0505](E0505.md) | error | one | a value in the data matches none of the alternatives the schema allows |
175
+ | [E0506](E0506.md) | error | one | the data is not concrete |
176
+ | [E0507](E0507.md) | error | one | the data does not parse |
177
+ | [E0508](E0508.md) | error | one | the data is an instance of no schema in the lineage |
178
+ | [E0601](E0601.md) | error | one | the lineage path does not exist or cannot be read |
179
+ | [E0602](E0602.md) | error | one | no CUE package was found at the lineage path |
180
+ | [E0603](E0603.md) | error | one | the lineage path holds lineages in several CUE packages |
181
+ | [E0604](E0604.md) | error | one | the CUE path given for the lineage is not a path |
182
+ | [E0605](E0605.md) | error | one | there is no value at the CUE path given for the lineage |
183
+ | [E0606](E0606.md) | error | one | a cue.mod/module.cue above the lineage is not valid |
184
+ | [E0607](E0607.md) | error | one | the CUE module requires a version of thema's CUE other than the one this program embeds |
185
+ | [E0608](E0608.md) | error | one | the lineage imports a package that is not available here |
186
+ | [E0609](E0609.md) | error | one | loading the lineage's CUE failed |
187
+ | [E0611](E0611.md) | error | one | the data's format could not be recognized |
188
+ | [E0612](E0612.md) | error | one | the data's format flag disagrees with its file extension |
189
+ | [E0613](E0613.md) | error | one | no data was given, or the data path cannot be read |
190
+ | [E0614](E0614.md) | error | one | the data format flag names a format thema does not read |
191
+ | [E0616](E0616.md) | error | one | a file cannot be written |
192
+ | [E0617](E0617.md) | error | one | this thema was built without the playground |
193
+ | [E0618](E0618.md) | error | one | the server cannot listen on the address |
194
+ | [E0620](E0620.md) | error | one | a flag or argument is not valid |
195
+ | [E0621](E0621.md) | error | one | an example's example.cue is not valid |
196
+ | [E0622](E0622.md) | error | one | the examples directory holds no example |
197
+ | [E0623](E0623.md) | error | one | the directory for a new lineage already holds version files |
198
+ | [E0624](E0624.md) | error | one | the document is not of an OpenAPI version thema converts |
199
+ | [E0625](E0625.md) | error | one | the directory to position a lineage's files under is not a valid path |
200
+ | [E0626](E0626.md) | error | one | the lineage bound on the development path is not the one that was compiled |
201
+ | [E0627](E0627.md) | error | one | the placements given to Compose cannot be written as one package |
202
+ | [E0628](E0628.md) | error | one | a generated file on disk is not what would be generated |
203
+ | [E0701](E0701.md) | error | one | generating code from the schema failed |
204
+ | [E0801](E0801.md) | error | one | the playground request is malformed |
205
+ | [E0802](E0802.md) | error | one | the playground request gives the lineage in neither form, or in both |
206
+ | [E0803](E0803.md) | error | one | a version in the playground request is not a version |
207
+ | [E0804](E0804.md) | error | one | a host example in the playground request is incomplete or inconsistent |
208
+ | [E0805](E0805.md) | error | one | a host example does not bind as its record declares |
209
+ | [E0901](E0901.md) | error | one | thema failed internally |
210
+ | [E0902](E0902.md) | error | one | CUE reported an error thema does not recognize |
211
+ | [E0903](E0903.md) | error | one | thema reported an error that has no code |
212
+ | [E1001](E1001.md) | warning | versions | a lens on the edge into the tip is missing |
213
+ | [E1002](E1002.md) | error | versions | a translation needs a lens the tip does not have yet |
214
+ | [E1003](E1003.md) | error | versions | the tip is not clean: it differs from the newest version in history/ |
215
+ | [E1004](E1004.md) | error | versions | the tip cannot be cut while a lens on its edge is missing |
package/package.json CHANGED
@@ -1,10 +1,36 @@
1
1
  {
2
2
  "name": "@sdboyer/thema-ui",
3
- "version": "0.0.0-bootstrap.0",
4
- "description": "Placeholder reserving the name; the first release is v0.1.0.",
3
+ "version": "0.1.0",
4
+ "description": "thema's CUE editor, diagnostics and wire types for the browser: the pieces the thema playground is built from.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/sdboyer/thema.git"
8
+ "url": "git+https://github.com/sdboyer/thema.git",
9
+ "directory": "playground/components"
10
+ },
11
+ "type": "module",
12
+ "sideEffects": false,
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.js"
17
+ },
18
+ "./errors/*": "./errors/*"
19
+ },
20
+ "files": [
21
+ "dist",
22
+ "errors",
23
+ "README.md"
24
+ ],
25
+ "peerDependencies": {
26
+ "@codemirror/commands": "^6.7.1",
27
+ "@codemirror/lang-json": "^6.0.1",
28
+ "@codemirror/language": "^6.10.8",
29
+ "@codemirror/lint": "^6.8.4",
30
+ "@codemirror/search": "^6.5.8",
31
+ "@codemirror/state": "^6.5.0",
32
+ "@codemirror/view": "^6.36.1",
33
+ "@lezer/highlight": "^1.2.5",
34
+ "preact": "^10.29.8"
9
35
  }
10
36
  }