@textmode/docs 0.4.3 → 0.5.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 (210) hide show
  1. package/LICENSE +21 -121
  2. package/README.md +24 -33
  3. package/dist/cli/textmode-docs.d.ts +3 -0
  4. package/dist/cli/textmode-docs.d.ts.map +1 -0
  5. package/dist/cli/textmode-docs.js +227 -0
  6. package/dist/cli/textmode-docs.js.map +1 -0
  7. package/dist/example-quality.d.ts +59 -0
  8. package/dist/example-quality.d.ts.map +1 -0
  9. package/dist/example-quality.js +256 -0
  10. package/dist/example-quality.js.map +1 -0
  11. package/dist/index.d.ts +33 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +43 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/internal/check-api-documentation.d.ts +5 -0
  16. package/dist/internal/check-api-documentation.d.ts.map +1 -0
  17. package/dist/internal/check-api-documentation.js +74 -0
  18. package/dist/internal/check-api-documentation.js.map +1 -0
  19. package/dist/internal/check-example-sketches.d.ts +3 -0
  20. package/dist/internal/check-example-sketches.d.ts.map +1 -0
  21. package/dist/internal/check-example-sketches.js +76 -0
  22. package/dist/internal/check-example-sketches.js.map +1 -0
  23. package/dist/internal/config.d.ts +104 -0
  24. package/dist/internal/config.d.ts.map +1 -0
  25. package/dist/internal/config.js +324 -0
  26. package/dist/internal/config.js.map +1 -0
  27. package/dist/internal/documentation-commands.d.ts +24 -0
  28. package/dist/internal/documentation-commands.d.ts.map +1 -0
  29. package/dist/internal/documentation-commands.js +43 -0
  30. package/dist/internal/documentation-commands.js.map +1 -0
  31. package/dist/internal/lib/api-doc-checks.d.ts +46 -0
  32. package/dist/internal/lib/api-doc-checks.d.ts.map +1 -0
  33. package/dist/internal/lib/api-doc-checks.js +111 -0
  34. package/dist/internal/lib/api-doc-checks.js.map +1 -0
  35. package/dist/internal/lib/api-doc-routes.d.ts +7 -0
  36. package/dist/internal/lib/api-doc-routes.d.ts.map +1 -0
  37. package/dist/internal/lib/api-doc-routes.js +74 -0
  38. package/dist/internal/lib/api-doc-routes.js.map +1 -0
  39. package/dist/internal/lib/example-checks.d.ts +58 -0
  40. package/dist/internal/lib/example-checks.d.ts.map +1 -0
  41. package/dist/internal/lib/example-checks.js +230 -0
  42. package/dist/internal/lib/example-checks.js.map +1 -0
  43. package/dist/internal/lib/jsdoc-comments.d.ts +8 -0
  44. package/dist/internal/lib/jsdoc-comments.d.ts.map +1 -0
  45. package/dist/internal/lib/jsdoc-comments.js +67 -0
  46. package/dist/internal/lib/jsdoc-comments.js.map +1 -0
  47. package/dist/internal/lib/label-schema.d.ts +18 -0
  48. package/dist/internal/lib/label-schema.d.ts.map +1 -0
  49. package/dist/internal/lib/label-schema.js +17 -0
  50. package/dist/internal/lib/label-schema.js.map +1 -0
  51. package/dist/internal/lib/reflection-policy.d.ts +21 -0
  52. package/dist/internal/lib/reflection-policy.d.ts.map +1 -0
  53. package/dist/internal/lib/reflection-policy.js +96 -0
  54. package/dist/internal/lib/reflection-policy.js.map +1 -0
  55. package/dist/internal/lib/reporting.d.ts +8 -0
  56. package/dist/internal/lib/reporting.d.ts.map +1 -0
  57. package/dist/internal/lib/reporting.js +21 -0
  58. package/dist/internal/lib/reporting.js.map +1 -0
  59. package/dist/internal/lib/sketch-title.d.ts +14 -0
  60. package/dist/internal/lib/sketch-title.d.ts.map +1 -0
  61. package/dist/internal/lib/sketch-title.js +13 -0
  62. package/dist/internal/lib/sketch-title.js.map +1 -0
  63. package/dist/internal/reconcile-dates.d.ts +19 -0
  64. package/dist/internal/reconcile-dates.d.ts.map +1 -0
  65. package/dist/internal/reconcile-dates.js +77 -0
  66. package/dist/internal/reconcile-dates.js.map +1 -0
  67. package/dist/internal/reflection-kinds.d.ts +12 -0
  68. package/dist/internal/reflection-kinds.d.ts.map +1 -0
  69. package/dist/internal/reflection-kinds.js +19 -0
  70. package/dist/internal/reflection-kinds.js.map +1 -0
  71. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/accessor-comments.d.ts +10 -0
  72. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/accessor-comments.d.ts.map +1 -0
  73. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/accessor-comments.js +31 -0
  74. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/accessor-comments.js.map +1 -0
  75. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/index.d.ts +3 -0
  76. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/index.d.ts.map +1 -0
  77. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/index.js +16 -0
  78. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/index.js.map +1 -0
  79. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/render-accessor.d.ts +9 -0
  80. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/render-accessor.d.ts.map +1 -0
  81. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/render-accessor.js +85 -0
  82. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/render-accessor.js.map +1 -0
  83. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/theme-patch.d.ts +7 -0
  84. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/theme-patch.d.ts.map +1 -0
  85. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/theme-patch.js +16 -0
  86. package/dist/internal/typedoc-plugins/accessor-docs-normalizer/theme-patch.js.map +1 -0
  87. package/dist/internal/typedoc-plugins/all-member-pages-router/child-pages.d.ts +16 -0
  88. package/dist/internal/typedoc-plugins/all-member-pages-router/child-pages.d.ts.map +1 -0
  89. package/dist/internal/typedoc-plugins/all-member-pages-router/child-pages.js +33 -0
  90. package/dist/internal/typedoc-plugins/all-member-pages-router/child-pages.js.map +1 -0
  91. package/dist/internal/typedoc-plugins/all-member-pages-router/constants.d.ts +9 -0
  92. package/dist/internal/typedoc-plugins/all-member-pages-router/constants.d.ts.map +1 -0
  93. package/dist/internal/typedoc-plugins/all-member-pages-router/constants.js +44 -0
  94. package/dist/internal/typedoc-plugins/all-member-pages-router/constants.js.map +1 -0
  95. package/dist/internal/typedoc-plugins/all-member-pages-router/index.d.ts +2 -0
  96. package/dist/internal/typedoc-plugins/all-member-pages-router/index.d.ts.map +1 -0
  97. package/dist/internal/typedoc-plugins/all-member-pages-router/index.js +2 -0
  98. package/dist/internal/typedoc-plugins/all-member-pages-router/index.js.map +1 -0
  99. package/dist/internal/typedoc-plugins/all-member-pages-router/member-paths.d.ts +11 -0
  100. package/dist/internal/typedoc-plugins/all-member-pages-router/member-paths.d.ts.map +1 -0
  101. package/dist/internal/typedoc-plugins/all-member-pages-router/member-paths.js +12 -0
  102. package/dist/internal/typedoc-plugins/all-member-pages-router/member-paths.js.map +1 -0
  103. package/dist/internal/typedoc-plugins/all-member-pages-router/member-reflections.d.ts +8 -0
  104. package/dist/internal/typedoc-plugins/all-member-pages-router/member-reflections.d.ts.map +1 -0
  105. package/dist/internal/typedoc-plugins/all-member-pages-router/member-reflections.js +78 -0
  106. package/dist/internal/typedoc-plugins/all-member-pages-router/member-reflections.js.map +1 -0
  107. package/dist/internal/typedoc-plugins/all-member-pages-router/namespace-paths.d.ts +8 -0
  108. package/dist/internal/typedoc-plugins/all-member-pages-router/namespace-paths.d.ts.map +1 -0
  109. package/dist/internal/typedoc-plugins/all-member-pages-router/namespace-paths.js +22 -0
  110. package/dist/internal/typedoc-plugins/all-member-pages-router/namespace-paths.js.map +1 -0
  111. package/dist/internal/typedoc-plugins/all-member-pages-router/router.d.ts +22 -0
  112. package/dist/internal/typedoc-plugins/all-member-pages-router/router.d.ts.map +1 -0
  113. package/dist/internal/typedoc-plugins/all-member-pages-router/router.js +44 -0
  114. package/dist/internal/typedoc-plugins/all-member-pages-router/router.js.map +1 -0
  115. package/dist/internal/typedoc-plugins/api-frontmatter/constants.d.ts +11 -0
  116. package/dist/internal/typedoc-plugins/api-frontmatter/constants.d.ts.map +1 -0
  117. package/dist/internal/typedoc-plugins/api-frontmatter/constants.js +38 -0
  118. package/dist/internal/typedoc-plugins/api-frontmatter/constants.js.map +1 -0
  119. package/dist/internal/typedoc-plugins/api-frontmatter/descriptions.d.ts +18 -0
  120. package/dist/internal/typedoc-plugins/api-frontmatter/descriptions.d.ts.map +1 -0
  121. package/dist/internal/typedoc-plugins/api-frontmatter/descriptions.js +43 -0
  122. package/dist/internal/typedoc-plugins/api-frontmatter/descriptions.js.map +1 -0
  123. package/dist/internal/typedoc-plugins/api-frontmatter/frontmatter.d.ts +5 -0
  124. package/dist/internal/typedoc-plugins/api-frontmatter/frontmatter.d.ts.map +1 -0
  125. package/dist/internal/typedoc-plugins/api-frontmatter/frontmatter.js +29 -0
  126. package/dist/internal/typedoc-plugins/api-frontmatter/frontmatter.js.map +1 -0
  127. package/dist/internal/typedoc-plugins/api-frontmatter/index.d.ts +6 -0
  128. package/dist/internal/typedoc-plugins/api-frontmatter/index.d.ts.map +1 -0
  129. package/dist/internal/typedoc-plugins/api-frontmatter/index.js +19 -0
  130. package/dist/internal/typedoc-plugins/api-frontmatter/index.js.map +1 -0
  131. package/dist/internal/typedoc-plugins/api-frontmatter/library-context.d.ts +9 -0
  132. package/dist/internal/typedoc-plugins/api-frontmatter/library-context.d.ts.map +1 -0
  133. package/dist/internal/typedoc-plugins/api-frontmatter/library-context.js +11 -0
  134. package/dist/internal/typedoc-plugins/api-frontmatter/library-context.js.map +1 -0
  135. package/dist/internal/typedoc-plugins/api-frontmatter/reflection-metadata.d.ts +15 -0
  136. package/dist/internal/typedoc-plugins/api-frontmatter/reflection-metadata.d.ts.map +1 -0
  137. package/dist/internal/typedoc-plugins/api-frontmatter/reflection-metadata.js +46 -0
  138. package/dist/internal/typedoc-plugins/api-frontmatter/reflection-metadata.js.map +1 -0
  139. package/dist/internal/typedoc-plugins/include-code-examples/code-fences.d.ts +7 -0
  140. package/dist/internal/typedoc-plugins/include-code-examples/code-fences.d.ts.map +1 -0
  141. package/dist/internal/typedoc-plugins/include-code-examples/code-fences.js +23 -0
  142. package/dist/internal/typedoc-plugins/include-code-examples/code-fences.js.map +1 -0
  143. package/dist/internal/typedoc-plugins/include-code-examples/example-metadata.d.ts +7 -0
  144. package/dist/internal/typedoc-plugins/include-code-examples/example-metadata.d.ts.map +1 -0
  145. package/dist/internal/typedoc-plugins/include-code-examples/example-metadata.js +18 -0
  146. package/dist/internal/typedoc-plugins/include-code-examples/example-metadata.js.map +1 -0
  147. package/dist/internal/typedoc-plugins/include-code-examples/index.d.ts +4 -0
  148. package/dist/internal/typedoc-plugins/include-code-examples/index.d.ts.map +1 -0
  149. package/dist/internal/typedoc-plugins/include-code-examples/index.js +12 -0
  150. package/dist/internal/typedoc-plugins/include-code-examples/index.js.map +1 -0
  151. package/dist/internal/typedoc-plugins/include-code-examples/transform-markdown.d.ts +2 -0
  152. package/dist/internal/typedoc-plugins/include-code-examples/transform-markdown.d.ts.map +1 -0
  153. package/dist/internal/typedoc-plugins/include-code-examples/transform-markdown.js +17 -0
  154. package/dist/internal/typedoc-plugins/include-code-examples/transform-markdown.js.map +1 -0
  155. package/dist/internal/typedoc-plugins/strip-api-self-links/index.d.ts +8 -0
  156. package/dist/internal/typedoc-plugins/strip-api-self-links/index.d.ts.map +1 -0
  157. package/dist/internal/typedoc-plugins/strip-api-self-links/index.js +62 -0
  158. package/dist/internal/typedoc-plugins/strip-api-self-links/index.js.map +1 -0
  159. package/dist/internal/typedoc-runner.d.ts +31 -0
  160. package/dist/internal/typedoc-runner.d.ts.map +1 -0
  161. package/dist/internal/typedoc-runner.js +179 -0
  162. package/dist/internal/typedoc-runner.js.map +1 -0
  163. package/dist/internal/update-api-links.d.ts +7 -0
  164. package/dist/internal/update-api-links.d.ts.map +1 -0
  165. package/dist/internal/update-api-links.js +65 -0
  166. package/dist/internal/update-api-links.js.map +1 -0
  167. package/package.json +57 -59
  168. package/index.d.ts +0 -64
  169. package/src/cli/textmode-docs.mjs +0 -219
  170. package/src/example-quality.mjs +0 -227
  171. package/src/index.js +0 -27
  172. package/src/internal/config.js +0 -387
  173. package/src/internal/lib/api-doc-checks.mjs +0 -147
  174. package/src/internal/lib/api-doc-routes.mjs +0 -93
  175. package/src/internal/lib/example-checks.mjs +0 -315
  176. package/src/internal/lib/jsdoc-comments.mjs +0 -78
  177. package/src/internal/lib/label-schema.mjs +0 -13
  178. package/src/internal/lib/reflection-policy.mjs +0 -113
  179. package/src/internal/lib/reporting.mjs +0 -23
  180. package/src/internal/lib/sketch-title.mjs +0 -8
  181. package/src/internal/operations.js +0 -282
  182. package/src/internal/reconcile-dates.js +0 -72
  183. package/src/internal/reflection-kinds.js +0 -21
  184. package/src/internal/typedoc-plugins/accessor-docs-normalizer/README.md +0 -45
  185. package/src/internal/typedoc-plugins/accessor-docs-normalizer/accessor-comments.js +0 -53
  186. package/src/internal/typedoc-plugins/accessor-docs-normalizer/index.js +0 -32
  187. package/src/internal/typedoc-plugins/accessor-docs-normalizer/render-accessor.js +0 -144
  188. package/src/internal/typedoc-plugins/accessor-docs-normalizer/theme-patch.js +0 -28
  189. package/src/internal/typedoc-plugins/all-member-pages-router/README.md +0 -57
  190. package/src/internal/typedoc-plugins/all-member-pages-router/child-pages.js +0 -65
  191. package/src/internal/typedoc-plugins/all-member-pages-router/constants.js +0 -58
  192. package/src/internal/typedoc-plugins/all-member-pages-router/index.js +0 -18
  193. package/src/internal/typedoc-plugins/all-member-pages-router/member-paths.js +0 -48
  194. package/src/internal/typedoc-plugins/all-member-pages-router/member-reflections.js +0 -164
  195. package/src/internal/typedoc-plugins/all-member-pages-router/namespace-paths.js +0 -44
  196. package/src/internal/typedoc-plugins/all-member-pages-router/router.js +0 -58
  197. package/src/internal/typedoc-plugins/api-frontmatter/README.md +0 -66
  198. package/src/internal/typedoc-plugins/api-frontmatter/constants.js +0 -52
  199. package/src/internal/typedoc-plugins/api-frontmatter/descriptions.js +0 -87
  200. package/src/internal/typedoc-plugins/api-frontmatter/frontmatter.js +0 -57
  201. package/src/internal/typedoc-plugins/api-frontmatter/index.js +0 -39
  202. package/src/internal/typedoc-plugins/api-frontmatter/library-context.js +0 -38
  203. package/src/internal/typedoc-plugins/api-frontmatter/reflection-metadata.js +0 -95
  204. package/src/internal/typedoc-plugins/include-code-examples/README.md +0 -40
  205. package/src/internal/typedoc-plugins/include-code-examples/code-fences.js +0 -55
  206. package/src/internal/typedoc-plugins/include-code-examples/example-metadata.js +0 -41
  207. package/src/internal/typedoc-plugins/include-code-examples/index.js +0 -23
  208. package/src/internal/typedoc-plugins/include-code-examples/transform-markdown.js +0 -33
  209. package/src/internal/typedoc-plugins/strip-api-self-links/index.js +0 -117
  210. package/src/internal/typedoc-runner.js +0 -200
package/LICENSE CHANGED
@@ -1,121 +1,21 @@
1
- Creative Commons Legal Code
2
-
3
- CC0 1.0 Universal
4
-
5
- CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6
- LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
7
- ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8
- INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9
- REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
10
- PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
11
- THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
12
- HEREUNDER.
13
-
14
- Statement of Purpose
15
-
16
- The laws of most jurisdictions throughout the world automatically confer
17
- exclusive Copyright and Related Rights (defined below) upon the creator
18
- and subsequent owner(s) (each and all, an "owner") of an original work of
19
- authorship and/or a database (each, a "Work").
20
-
21
- Certain owners wish to permanently relinquish those rights to a Work for
22
- the purpose of contributing to a commons of creative, cultural and
23
- scientific works ("Commons") that the public can reliably and without fear
24
- of later claims of infringement build upon, modify, incorporate in other
25
- works, reuse and redistribute as freely as possible in any form whatsoever
26
- and for any purposes, including without limitation commercial purposes.
27
- These owners may contribute to the Commons to promote the ideal of a free
28
- culture and the further production of creative, cultural and scientific
29
- works, or to gain reputation or greater distribution for their Work in
30
- part through the use and efforts of others.
31
-
32
- For these and/or other purposes and motivations, and without any
33
- expectation of additional consideration or compensation, the person
34
- associating CC0 with a Work (the "Affirmer"), to the extent that he or she
35
- is an owner of Copyright and Related Rights in the Work, voluntarily
36
- elects to apply CC0 to the Work and publicly distribute the Work under its
37
- terms, with knowledge of his or her Copyright and Related Rights in the
38
- Work and the meaning and intended legal effect of CC0 on those rights.
39
-
40
- 1. Copyright and Related Rights. A Work made available under CC0 may be
41
- protected by copyright and related or neighboring rights ("Copyright and
42
- Related Rights"). Copyright and Related Rights include, but are not
43
- limited to, the following:
44
-
45
- i. the right to reproduce, adapt, distribute, perform, display,
46
- communicate, and translate a Work;
47
- ii. moral rights retained by the original author(s) and/or performer(s);
48
- iii. publicity and privacy rights pertaining to a person's image or
49
- likeness depicted in a Work;
50
- iv. rights protecting against unfair competition in regards to a Work,
51
- subject to the limitations in paragraph 4(a), below;
52
- v. rights protecting the extraction, dissemination, use and reuse of data
53
- in a Work;
54
- vi. database rights (such as those arising under Directive 96/9/EC of the
55
- European Parliament and of the Council of 11 March 1996 on the legal
56
- protection of databases, and under any national implementation
57
- thereof, including any amended or successor version of such
58
- directive); and
59
- vii. other similar, equivalent or corresponding rights throughout the
60
- world based on applicable law or treaty, and any national
61
- implementations thereof.
62
-
63
- 2. Waiver. To the greatest extent permitted by, but not in contravention
64
- of, applicable law, Affirmer hereby overtly, fully, permanently,
65
- irrevocably and unconditionally waives, abandons, and surrenders all of
66
- Affirmer's Copyright and Related Rights and associated claims and causes
67
- of action, whether now known or unknown (including existing as well as
68
- future claims and causes of action), in the Work (i) in all territories
69
- worldwide, (ii) for the maximum duration provided by applicable law or
70
- treaty (including future time extensions), (iii) in any current or future
71
- medium and for any number of copies, and (iv) for any purpose whatsoever,
72
- including without limitation commercial, advertising or promotional
73
- purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
74
- member of the public at large and to the detriment of Affirmer's heirs and
75
- successors, fully intending that such Waiver shall not be subject to
76
- revocation, rescission, cancellation, termination, or any other legal or
77
- equitable action to disrupt the quiet enjoyment of the Work by the public
78
- as contemplated by Affirmer's express Statement of Purpose.
79
-
80
- 3. Public License Fallback. Should any part of the Waiver for any reason
81
- be judged legally invalid or ineffective under applicable law, then the
82
- Waiver shall be preserved to the maximum extent permitted taking into
83
- account Affirmer's express Statement of Purpose. In addition, to the
84
- extent the Waiver is so judged Affirmer hereby grants to each affected
85
- person a royalty-free, non transferable, non sublicensable, non exclusive,
86
- irrevocable and unconditional license to exercise Affirmer's Copyright and
87
- Related Rights in the Work (i) in all territories worldwide, (ii) for the
88
- maximum duration provided by applicable law or treaty (including future
89
- time extensions), (iii) in any current or future medium and for any number
90
- of copies, and (iv) for any purpose whatsoever, including without
91
- limitation commercial, advertising or promotional purposes (the
92
- "License"). The License shall be deemed effective as of the date CC0 was
93
- applied by Affirmer to the Work. Should any part of the License for any
94
- reason be judged legally invalid or ineffective under applicable law, such
95
- partial invalidity or ineffectiveness shall not invalidate the remainder
96
- of the License, and in such case Affirmer hereby affirms that he or she
97
- will not (i) exercise any of his or her remaining Copyright and Related
98
- Rights in the Work or (ii) assert any associated claims and causes of
99
- action with respect to the Work, in either case contrary to Affirmer's
100
- express Statement of Purpose.
101
-
102
- 4. Limitations and Disclaimers.
103
-
104
- a. No trademark or patent rights held by Affirmer are waived, abandoned,
105
- surrendered, licensed or otherwise affected by this document.
106
- b. Affirmer offers the Work as-is and makes no representations or
107
- warranties of any kind concerning the Work, express, implied,
108
- statutory or otherwise, including without limitation warranties of
109
- title, merchantability, fitness for a particular purpose, non
110
- infringement, or the absence of latent or other defects, accuracy, or
111
- the present or absence of errors, whether or not discoverable, all to
112
- the greatest extent permissible under applicable law.
113
- c. Affirmer disclaims responsibility for clearing rights of other persons
114
- that may apply to the Work or any use thereof, including without
115
- limitation any person's Copyright and Related Rights in the Work.
116
- Further, Affirmer disclaims responsibility for obtaining any necessary
117
- consents, permissions or other rights required for any use of the
118
- Work.
119
- d. Affirmer understands and acknowledges that Creative Commons is not a
120
- party to this document and has no duty or obligation with respect to
121
- this CC0 or use of the Work.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 humanbydefinition
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- <img alt="@textmode/docs — doc textmode with typedoc" src=".github/assets/readme-og.png" />
5
+ <img alt="@textmode/docs — doc textmode with typedoc" src="../../.github/assets/readme-og-docs.png" />
6
6
 
7
- | [![JavaScript](https://img.shields.io/badge/JavaScript-F7DF1E?logo=javascript&logoColor=black)](https://developer.mozilla.org/en-US/docs/Web/JavaScript) [![TypeDoc](https://img.shields.io/badge/TypeDoc-3D9970)](https://typedoc.org/) | [![docs](https://img.shields.io/badge/docs-vitepress-646cff?logo=vitepress&logoColor=white)](https://code.textmode.art/) [![Discord](https://img.shields.io/discord/1357070706181017691?color=5865F2&label=Discord&logo=discord&logoColor=white)](https://discord.gg/sjrw8QXNks) | [![ko-fi](https://shields.io/badge/ko--fi-donate-ff5f5f?logo=ko-fi)](https://ko-fi.com/V7V8JG2FY) [![GitHub-sponsors](https://img.shields.io/badge/sponsor-30363D?logo=GitHub-Sponsors&logoColor=#EA4AAA)](https://github.com/sponsors/humanbydefinition) |
7
+ | [![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/) [![TypeDoc](https://img.shields.io/badge/TypeDoc-3D9970)](https://typedoc.org/) | [![docs](https://img.shields.io/badge/docs-vitepress-646cff?logo=vitepress&logoColor=white)](https://code.textmode.art/) [![Discord](https://img.shields.io/discord/1357070706181017691?color=5865F2&label=Discord&logo=discord&logoColor=white)](https://discord.gg/sjrw8QXNks) | [![ko-fi](https://shields.io/badge/ko--fi-donate-ff5f5f?logo=ko-fi)](https://ko-fi.com/V7V8JG2FY) [![GitHub-sponsors](https://img.shields.io/badge/sponsor-30363D?logo=GitHub-Sponsors&logoColor=#EA4AAA)](https://github.com/sponsors/humanbydefinition) |
8
8
  | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
9
9
 
10
10
  </div>
@@ -17,10 +17,10 @@ Use it to generate, validate, and maintain API documentation for every library w
17
17
 
18
18
  - **One-command documentation** - Generate, check, watch, and maintain API links through `textmode-docs`.
19
19
  - **Shared TypeDoc stack** - TypeDoc plus plugins with registered defaults and project-owned policy via `textmode.docs.config.mjs`.
20
- - **Public API validation** - Requires docstrings and examples on every public API reflection.
20
+ - **Public API validation** - Checks docstrings, examples, and hosted links for the configured kinds of API items.
21
21
  - **Example policy checks** - Gallery, manifest, and sketch checks with hardcoded source bases rejected.
22
22
  - **API-link maintenance** - Idempotent JSDoc link insertion across configured source roots.
23
- - **Strict by default** - Warnings become errors; exit codes distinguish success, validation failure, and invocation failure.
23
+ - **Strict checks** - The `check` command treats TypeDoc warnings as errors.
24
24
 
25
25
  ## Installation
26
26
 
@@ -95,9 +95,9 @@ reference is generated and should not be edited in place via the docs site.
95
95
 
96
96
  `@textmode/docs` works with the following textmode-tooling packages:
97
97
 
98
- | Package | Relationship |
99
- | --------------------------------------------- | ------------------------------------- |
100
- | [`@textmode/tsconfig`](../tsconfig/README.md) | TypeDoc reads the consumer `tsconfig` |
98
+ | Package | Relationship |
99
+ | --- | --- |
100
+ | [`@textmode/tsconfig`](https://github.com/textmode-art/tooling/tree/main/packages/tsconfig) | TypeDoc reads the consumer `tsconfig` |
101
101
 
102
102
  ## Configuration
103
103
 
@@ -136,6 +136,7 @@ override it with `typedoc.sort` when its API needs a different presentation.
136
136
  textmode-docs check
137
137
  textmode-docs build [--out <directory>]
138
138
  textmode-docs watch [--out <directory>]
139
+ textmode-docs dates reconcile --baseline <directory> --target <directory> [--date YYYY-MM-DD]
139
140
  textmode-docs links add
140
141
  textmode-docs api-check [--include-accessors]
141
142
  ```
@@ -145,47 +146,37 @@ textmode-docs api-check [--include-accessors]
145
146
  enabled example policies, then removes the temporary output.
146
147
  - `build` cleans and renders the configured output directory.
147
148
  - `watch` performs an initial render and rebuilds through TypeDoc's watcher.
149
+ - `dates reconcile` preserves `lastModified` when a page is unchanged (ignoring the date field itself) and assigns the current UTC date (or `--date YYYY-MM-DD`) to changed, new, and undated pages. Keep the baseline outside the target directory.
148
150
  - `links add` derives current routes in temporary storage and idempotently
149
151
  inserts or updates JSDoc API links inside `sourceRoots`.
150
152
  - `api-check` runs only public API documentation policy.
151
153
  `--include-accessors` adds accessors to policies that normally omit them.
152
154
 
153
- Every command accepts `--cwd`, `--config`, `--show-config`, `--help`, and
154
- `--version`. `build` and `watch` also accept `--out`. Unknown commands, flags,
155
- missing values, and extra positional arguments are rejected.
155
+ Every command accepts `--cwd` and `--help`. Use `textmode-docs --version` to print the wrapper version. Project commands accept `--config` and `--show-config`. Use `--out` with `build` or `watch`. Unknown commands, flags, missing values, and extra positional arguments are rejected.
156
156
 
157
157
  Normal results are written to stdout and diagnostics to stderr. Exit status `0`
158
158
  means success, `1` means documentation or content validation failed, and `2`
159
159
  means invocation, configuration, dependency, input, or internal-tool failure.
160
160
 
161
+ ## Programmatic API
162
+
163
+ - `defineDocs(config)` returns a marked shallow copy of the input. The CLI validates the policy when it loads `textmode.docs.config.mjs`.
164
+ - `analyzeExampleSource(content, { title, fileName })` returns the line count, definite issues, review items, recognized defaults, and a conventional label declaration for runtime observation.
165
+ - `displayedRowLength(value, markup = true)` counts Unicode code points after removing recognized `fg`, `bg`, `inv`, `rot`, `fx`, and `fy` formatting tags.
166
+ - `exampleLabelSchema` exposes the shared row limit, divider length, panel color, and palette used by the example tooling.
167
+ - `validateExamplesManifest(manifest, options)` validates `examples/manifest.json` against sketch files and TypeDoc `@includeCode` references.
168
+ - `reconcileDates({ baseline, target, date })` preserves unchanged YAML `lastModified` dates across generated API Markdown pages.
169
+
161
170
  ## License
162
171
 
163
- The `@textmode/docs` package is licensed under the [CC0 1.0 Universal](./LICENSE).
172
+ The `@textmode/docs` package is licensed under the [MIT License](https://github.com/textmode-art/tooling/blob/main/LICENSE).
164
173
 
165
174
  ## Acknowledgements
166
175
 
167
176
  - **[TypeDoc](https://typedoc.org/)**
168
- - The documentation generator this package orchestrates.
169
- - License: [Apache-2.0](https://github.com/TypeStrong/typedoc/blob/master/LICENSE).
177
+ - The documentation generator this package orchestrates.
178
+ - License: [Apache-2.0](https://github.com/TypeStrong/typedoc/blob/master/LICENSE).
170
179
 
171
180
  - **[`typedoc-plugin-markdown`](https://typedoc-plugin-markdown.org/)**
172
- - Markdown output and the frontmatter and VitePress theme plugins used for API pages.
173
- - License: [MIT License](https://github.com/typedoc2md/typedoc-plugin-markdown/blob/main/LICENSE).
174
-
175
- ### Preserve published page dates
176
-
177
- After generating documentation and applying all publishing transformations, reconcile the final Markdown against the previous published pages:
178
-
179
- ```sh
180
- textmode-docs dates reconcile --baseline ./previous-api --target ./new-api
181
- ```
182
-
183
- The command preserves `lastModified` when a page is unchanged, ignoring the date field itself. It assigns the current UTC date to changed pages, new pages, and unchanged pages without a previous date. Deleted pages are ignored. `--date YYYY-MM-DD` can supply a date for reproducible builds. Keep the baseline outside the target directory: TypeDoc cleans its output during generation.
184
-
185
- ### Example quality checks
186
-
187
- `analyzeExampleSource(content, { title, fileName })` returns the line count, definite issues, review items, recognized defaults, and a conventional label declaration for runtime observation. The documentation check and workbench use the same analyzer. A clean result does not establish rendering, label appearance, interaction, or educational quality; inspect those in the target host.
188
-
189
- `displayedRowLength(value, markup = true)` counts Unicode code points after removing recognized `fg`, `bg`, `inv`, `rot`, `fx`, and `fy` formatting tags. Pass `false` to count markup literally. It is a text-length helper; it does not account for glyph width, line breaks, or tab expansion.
190
-
191
- `exampleLabelSchema` exposes the shared row limit, divider length, panel color, and palette used by the example tooling.
181
+ - Markdown output and the frontmatter and VitePress theme plugins used for API pages.
182
+ - License: [MIT License](https://github.com/typedoc2md/typedoc-plugin-markdown/blob/main/LICENSE).
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=textmode-docs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textmode-docs.d.ts","sourceRoot":"","sources":["../../src/cli/textmode-docs.ts"],"names":[],"mappings":""}
@@ -0,0 +1,227 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ import process from 'node:process';
5
+ import { parseArgs } from 'node:util';
6
+ import { formatResolvedConfig, resolveDocsConfig } from '../internal/config.js';
7
+ import { addApiLinks, checkApiDocumentation, checkDocumentation } from '../internal/documentation-commands.js';
8
+ import { reconcileDates } from '../internal/reconcile-dates.js';
9
+ import { buildDocs, watchDocs } from '../internal/typedoc-runner.js';
10
+ const PACKAGE_JSON = JSON.parse(fs.readFileSync(new URL('../../package.json', import.meta.url), 'utf8'));
11
+ const SINGLE_WORD_COMMANDS = new Set(['check', 'build', 'watch', 'api-check']);
12
+ function printGeneralHelp() {
13
+ console.log(`@textmode/docs ${PACKAGE_JSON.version}`);
14
+ console.log('');
15
+ console.log('Usage: textmode-docs <command> [options]');
16
+ console.log('');
17
+ console.log('Commands:');
18
+ console.log(' check Validate generated docs, public API docs, and examples');
19
+ console.log(' build [--out <directory>] Generate documentation');
20
+ console.log(' watch [--out <directory>] Generate documentation and watch for changes');
21
+ console.log(' dates reconcile --baseline <directory> --target <directory> [--date YYYY-MM-DD]');
22
+ console.log(' Preserve unchanged page modification dates');
23
+ console.log(' links add Insert or update public API links in source JSDoc');
24
+ console.log(' api-check [--include-accessors]');
25
+ console.log(' Run the focused public API documentation check');
26
+ console.log('');
27
+ console.log('Common options:');
28
+ console.log(' --cwd <directory> Project root containing package.json');
29
+ console.log(' --config <file> Config path relative to the project root');
30
+ console.log(' --show-config Print resolved configuration and exit');
31
+ console.log(' --help, -h Show help');
32
+ console.log(' --version, -v Show version');
33
+ }
34
+ function printCommandHelp(command) {
35
+ const usage = {
36
+ check: 'textmode-docs check [--cwd <directory>] [--config <file>] [--show-config]',
37
+ build: 'textmode-docs build [--out <directory>] [--cwd <directory>] [--config <file>] [--show-config]',
38
+ watch: 'textmode-docs watch [--out <directory>] [--cwd <directory>] [--config <file>] [--show-config]',
39
+ 'api-check': 'textmode-docs api-check [--include-accessors] [--cwd <directory>] [--config <file>] [--show-config]',
40
+ 'links add': 'textmode-docs links add [--cwd <directory>] [--config <file>] [--show-config]',
41
+ 'dates reconcile': 'textmode-docs dates reconcile --baseline <directory> --target <directory> [--date YYYY-MM-DD] [--cwd <directory>]',
42
+ };
43
+ console.log(`Usage: ${usage[command]}`);
44
+ }
45
+ function parseCli(argv) {
46
+ const parsed = parseArgs({
47
+ args: argv,
48
+ allowPositionals: true,
49
+ strict: true,
50
+ options: {
51
+ cwd: { type: 'string' },
52
+ config: { type: 'string' },
53
+ out: { type: 'string' },
54
+ baseline: { type: 'string' },
55
+ target: { type: 'string' },
56
+ date: { type: 'string' },
57
+ 'show-config': { type: 'boolean' },
58
+ 'include-accessors': { type: 'boolean' },
59
+ help: { type: 'boolean', short: 'h' },
60
+ version: { type: 'boolean', short: 'v' },
61
+ },
62
+ });
63
+ if (parsed.values.version) {
64
+ if (parsed.positionals.length > 0) {
65
+ throw new Error('--version does not accept a command.');
66
+ }
67
+ return { action: 'version' };
68
+ }
69
+ if (parsed.positionals.length === 0) {
70
+ if (parsed.values.help) {
71
+ return { action: 'help' };
72
+ }
73
+ throw new Error('Missing command. Run textmode-docs --help for usage.');
74
+ }
75
+ let command;
76
+ let expectedPositionals = 1;
77
+ const first = parsed.positionals[0];
78
+ if (first === 'links') {
79
+ if (parsed.positionals[1] !== 'add') {
80
+ throw new Error('The links command requires the "add" subcommand.');
81
+ }
82
+ command = 'links add';
83
+ expectedPositionals = 2;
84
+ }
85
+ else if (first === 'dates') {
86
+ if (parsed.positionals[1] !== 'reconcile') {
87
+ throw new Error('The dates command requires the "reconcile" subcommand.');
88
+ }
89
+ command = 'dates reconcile';
90
+ expectedPositionals = 2;
91
+ }
92
+ else if (SINGLE_WORD_COMMANDS.has(first)) {
93
+ command = first;
94
+ }
95
+ else {
96
+ throw new Error(`Unknown command "${first}".`);
97
+ }
98
+ if (parsed.positionals.length !== expectedPositionals) {
99
+ throw new Error(`Unexpected positional argument "${parsed.positionals[expectedPositionals]}".`);
100
+ }
101
+ if (parsed.values.help) {
102
+ return { action: 'command-help', command };
103
+ }
104
+ if (command === 'dates reconcile') {
105
+ if (!parsed.values.baseline || !parsed.values.target) {
106
+ throw new Error('Usage: textmode-docs dates reconcile --baseline <directory> --target <directory> [--date YYYY-MM-DD]');
107
+ }
108
+ if (parsed.values.config !== undefined ||
109
+ parsed.values.out !== undefined ||
110
+ parsed.values['show-config'] ||
111
+ parsed.values['include-accessors']) {
112
+ throw new Error('dates reconcile supports only --baseline, --target, --date, and --cwd.');
113
+ }
114
+ return { action: 'run', command, values: parsed.values };
115
+ }
116
+ if (parsed.values.baseline !== undefined ||
117
+ parsed.values.target !== undefined ||
118
+ parsed.values.date !== undefined) {
119
+ throw new Error('--baseline, --target, and --date are supported only by dates reconcile.');
120
+ }
121
+ if (parsed.values.out !== undefined && command !== 'build' && command !== 'watch') {
122
+ throw new Error('--out is supported only by build and watch.');
123
+ }
124
+ if (parsed.values['include-accessors'] && command !== 'api-check') {
125
+ throw new Error('--include-accessors is supported only by api-check.');
126
+ }
127
+ return {
128
+ action: 'run',
129
+ command,
130
+ values: parsed.values,
131
+ };
132
+ }
133
+ function commandDetails(command) {
134
+ return {
135
+ name: command,
136
+ emit: command === 'api-check' || command === 'links add' || command === 'check' ? 'temporary' : 'docs',
137
+ strict: command === 'check',
138
+ watch: command === 'watch',
139
+ origins: {
140
+ emit: `command:${command}`,
141
+ strict: `command:${command}`,
142
+ watch: `command:${command}`,
143
+ },
144
+ };
145
+ }
146
+ async function run(argv) {
147
+ let cli;
148
+ try {
149
+ cli = parseCli(argv);
150
+ }
151
+ catch (error) {
152
+ console.error(error instanceof Error ? error.message : String(error));
153
+ process.exitCode = 2;
154
+ return;
155
+ }
156
+ if (cli.action === 'help') {
157
+ printGeneralHelp();
158
+ return;
159
+ }
160
+ if (cli.action === 'version') {
161
+ console.log(PACKAGE_JSON.version);
162
+ return;
163
+ }
164
+ if (cli.action === 'command-help') {
165
+ printCommandHelp(cli.command);
166
+ return;
167
+ }
168
+ if (cli.command === 'dates reconcile') {
169
+ try {
170
+ const baseDir = cli.values.cwd ? path.resolve(cli.values.cwd) : process.cwd();
171
+ const count = await reconcileDates({
172
+ baseline: path.resolve(baseDir, cli.values.baseline),
173
+ target: path.resolve(baseDir, cli.values.target),
174
+ date: cli.values.date,
175
+ });
176
+ console.log(`Reconciled dates for ${count} pages.`);
177
+ }
178
+ catch (error) {
179
+ console.error(error instanceof Error ? error.message : String(error));
180
+ process.exitCode = 1;
181
+ }
182
+ return;
183
+ }
184
+ try {
185
+ const config = await resolveDocsConfig({
186
+ cwd: cli.values.cwd,
187
+ configPath: cli.values.config,
188
+ out: cli.values.out,
189
+ });
190
+ if (cli.values['show-config']) {
191
+ console.log(JSON.stringify({
192
+ ...formatResolvedConfig(config),
193
+ command: commandDetails(cli.command),
194
+ }, null, 2));
195
+ return;
196
+ }
197
+ let result;
198
+ switch (cli.command) {
199
+ case 'check':
200
+ result = await checkDocumentation(config);
201
+ break;
202
+ case 'build':
203
+ result = await buildDocs(config);
204
+ break;
205
+ case 'watch':
206
+ result = await watchDocs(config);
207
+ break;
208
+ case 'api-check':
209
+ result = await checkApiDocumentation(config, {
210
+ includeAccessors: cli.values['include-accessors'],
211
+ });
212
+ break;
213
+ case 'links add':
214
+ result = await addApiLinks(config);
215
+ break;
216
+ }
217
+ if (!result?.ok) {
218
+ process.exitCode = 1;
219
+ }
220
+ }
221
+ catch (error) {
222
+ console.error(error instanceof Error ? (error.stack ?? error.message) : String(error));
223
+ process.exitCode = 2;
224
+ }
225
+ }
226
+ await run(process.argv.slice(2));
227
+ //# sourceMappingURL=textmode-docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textmode-docs.js","sourceRoot":"","sources":["../../src/cli/textmode-docs.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC/G,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;A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AAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACvF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACtB,CAAC;AACF,CAAC;AAED,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Static quality checks returned by {@link analyzeExampleSource}.
3
+ */
4
+ export interface ExampleQualityResult {
5
+ /** Total number of lines in the sketch source. */
6
+ lineCount: number;
7
+ /** Definite policy or syntax violations found statically. */
8
+ issues: string[];
9
+ /** Manual visual or runtime review reminders. */
10
+ review: string[];
11
+ /** Recognized label palette or divider defaults detected in the sketch. */
12
+ recognizedDefaults: string[];
13
+ }
14
+ /**
15
+ * Location of a conventional top-level `const label... = <instance>.layers.add(...)` declaration.
16
+ */
17
+ export interface LabelDeclarationInfo {
18
+ /** Character end offset of the declaration statement. */
19
+ end: number;
20
+ /** Variable identifier of the label layer. */
21
+ layer: string;
22
+ /** Variable identifier of the `textmode` instance. */
23
+ instance: string;
24
+ }
25
+ /**
26
+ * Complete static analysis output returned by {@link analyzeExampleSource}.
27
+ */
28
+ export interface ExampleSourceAnalysis extends ExampleQualityResult {
29
+ /** Conventional top-level label layer declaration, or `null` if none was found. */
30
+ labelDeclaration: LabelDeclarationInfo | null;
31
+ }
32
+ /**
33
+ * Options accepted by {@link analyzeExampleSource}.
34
+ */
35
+ export interface AnalyzeExampleSourceOptions {
36
+ /** Expected manifest title verified against the sketch `@title` tag. */
37
+ title?: string;
38
+ /** Virtual or real filename used for TypeScript parser diagnostics. Defaults to `'sketch.js'`. */
39
+ fileName?: string;
40
+ }
41
+ /**
42
+ * Count Unicode code points in a displayed label row after stripping supported formatting tags.
43
+ *
44
+ * @param value - Row text to measure.
45
+ * @param markup - When `true` (default), strips recognized `[fg=...]`, `[bg=...]`, `[inv]`, `[rot]`, `[fx]`, and `[fy]` markup tags.
46
+ * @returns Displayed character count.
47
+ */
48
+ export declare function displayedRowLength(value: string, markup?: boolean): number;
49
+ /**
50
+ * Analyze a `textmode.js` example sketch for static syntax, header, viewport, and label policy compliance.
51
+ *
52
+ * A definite policy violation appears in `issues`. Checks that require runtime or visual evidence appear in `review`.
53
+ *
54
+ * @param content - JavaScript sketch source text.
55
+ * @param options - Optional expected manifest title and filename.
56
+ * @returns Line count, definite issues, review reminders, recognized defaults, and optional label declaration info.
57
+ */
58
+ export declare function analyzeExampleSource(content: string, options?: AnalyzeExampleSourceOptions): ExampleSourceAnalysis;
59
+ //# sourceMappingURL=example-quality.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"example-quality.d.ts","sourceRoot":"","sources":["../src/example-quality.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,iDAAiD;IACjD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,2EAA2E;IAC3E,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,yDAAyD;IACzD,GAAG,EAAE,MAAM,CAAC;IACZ,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IAClE,mFAAmF;IACnF,gBAAgB,EAAE,oBAAoB,GAAG,IAAI,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC3C,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kGAAkG;IAClG,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AASD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,UAAO,GAAG,MAAM,CAGvE;AAqPD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,2BAAgC,GACvC,qBAAqB,CAiBvB"}