reactive-md 0.6.0 → 0.6.1

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 (105) hide show
  1. package/CHANGELOG-ch.md +203 -194
  2. package/CHANGELOG.md +203 -194
  3. package/CONTRIBUTING-ch.md +67 -67
  4. package/CONTRIBUTING.md +69 -69
  5. package/README-ch.md +157 -157
  6. package/README-en.md +184 -184
  7. package/README.md +184 -184
  8. package/SECURITY-ch.md +81 -81
  9. package/SECURITY.md +81 -81
  10. package/THIRD_PARTY_NOTICES.md +313 -209
  11. package/bin/reactive-md.mjs +39 -39
  12. package/cli/args.mjs +181 -181
  13. package/cli/assets.mjs +390 -390
  14. package/cli/build.mjs +268 -268
  15. package/cli/document.mjs +130 -130
  16. package/cli/errors.mjs +61 -61
  17. package/cli/fs-utils.mjs +133 -133
  18. package/cli/glob.mjs +203 -203
  19. package/cli/help.mjs +138 -138
  20. package/cli/lint.mjs +177 -177
  21. package/cli/main.mjs +55 -55
  22. package/cli/migrate.mjs +368 -368
  23. package/cli/package.mjs +210 -210
  24. package/dist-library/{authoring-DSC0VsNK.js → authoring-BEVyth5X.js} +1 -1
  25. package/dist-library/compiler-Cm3ppMxG.js +46044 -0
  26. package/dist-library/{react-Dk94rcOp.js → react-Bh7_oxZp.js} +20110 -20113
  27. package/dist-library/reactive-md-authoring.js +2 -2
  28. package/dist-library/reactive-md-print.css +284 -284
  29. package/dist-library/reactive-md-react-unstyled.js +1 -1
  30. package/dist-library/reactive-md-react.js +1 -1
  31. package/dist-library/reactive-md.css +1 -1
  32. package/dist-library/reactive-md.js +3 -3
  33. package/dist-library/{runtime-D8KbnCd0.js → runtime-DlFYQ4s_.js} +1 -1
  34. package/dist-library/types/local/math-display.d.ts +22 -23
  35. package/dist-library/types/local/math-view.d.ts +6 -7
  36. package/dist-standalone/reactive-md-standalone.css +1 -1
  37. package/dist-standalone/reactive-md-standalone.js +318 -62
  38. package/docs/compatibility/compatibility-ch.md +121 -119
  39. package/docs/compatibility/compatibility-en.md +121 -119
  40. package/docs/compatibility/source-versioning-ch.md +159 -159
  41. package/docs/compatibility/source-versioning-en.md +159 -159
  42. package/docs/development/component-development-ch.md +210 -210
  43. package/docs/development/component-development-en.md +210 -210
  44. package/docs/development/component-protocol-ch.md +747 -747
  45. package/docs/development/component-protocol-en.md +747 -747
  46. package/docs/development/performance-ch.md +76 -76
  47. package/docs/development/performance-en.md +76 -76
  48. package/docs/development/releasing-ch.md +108 -108
  49. package/docs/development/releasing-en.md +108 -108
  50. package/docs/integration/author-tools-ch.md +62 -62
  51. package/docs/integration/author-tools-en.md +62 -62
  52. package/docs/integration/shareable-export-ch.md +209 -209
  53. package/docs/integration/shareable-export-en.md +211 -211
  54. package/docs/reference/computations-formatting-ch.md +87 -87
  55. package/docs/reference/computations-formatting-en.md +87 -87
  56. package/docs/reference/constraints-collections-ch.md +84 -84
  57. package/docs/reference/constraints-collections-en.md +84 -84
  58. package/docs/reference/diagnostics-counting-ch.md +104 -104
  59. package/docs/reference/diagnostics-counting-en.md +104 -104
  60. package/docs/reference/local-components-v2-ch.md +138 -138
  61. package/docs/reference/local-components-v2-en.md +104 -104
  62. package/docs/reference/local-interaction-syntax-ch.md +515 -511
  63. package/docs/reference/local-interaction-syntax-en.md +511 -507
  64. package/docs/reference/theme-protocol-ch.md +107 -107
  65. package/docs/reference/theme-protocol-en.md +107 -107
  66. package/docs/releases/release-0.4.0-ch.md +89 -89
  67. package/docs/releases/release-0.4.0-en.md +89 -89
  68. package/docs/releases/release-0.4.1-ch.md +23 -23
  69. package/docs/releases/release-0.4.1-en.md +23 -23
  70. package/docs/releases/release-0.6.1-ch.md +27 -0
  71. package/docs/releases/release-0.6.1-en.md +27 -0
  72. package/examples/conformance/README.md +53 -53
  73. package/examples/conformance/component-protocol-1.json +482 -482
  74. package/examples/conformance/component-protocol-1.schema.json +76 -76
  75. package/examples/conformance/local-draft-1.json +50 -50
  76. package/examples/conformance/local-draft-2.json +212 -212
  77. package/examples/integration/README.md +47 -47
  78. package/examples/integration/core/index.mjs +32 -32
  79. package/examples/integration/worker/index.html +19 -19
  80. package/examples/integration/worker/main.js +61 -61
  81. package/examples/integration/worker/package.json +13 -13
  82. package/examples/integration/worker/worker.js +3 -3
  83. package/examples/local/README.md +74 -74
  84. package/examples/local/charts.reactive.md +73 -73
  85. package/examples/local/recipes/invoice-zh.reactive.md +36 -36
  86. package/examples/local/recipes/invoice.reactive.md +36 -36
  87. package/examples/local/recipes/workshop-zh.reactive.md +33 -33
  88. package/examples/local/recipes/workshop.reactive.md +33 -33
  89. package/examples/local/showcase/README.md +25 -25
  90. package/examples/local/showcase/explore.reactive.md +102 -102
  91. package/examples/local/showcase/flow.reactive.md +86 -86
  92. package/examples/local/showcase/forms.reactive.md +126 -126
  93. package/examples/local/showcase/functions.reactive.md +119 -119
  94. package/examples/local/showcase/layout.reactive.md +100 -100
  95. package/examples/local/showcase/statistics.reactive.md +108 -108
  96. package/examples/local/showcase/tasks.reactive.md +89 -89
  97. package/examples/local/showcase/zh/explore.reactive.md +102 -102
  98. package/examples/local/showcase/zh/flow.reactive.md +86 -86
  99. package/examples/local/showcase/zh/forms.reactive.md +126 -126
  100. package/examples/local/showcase/zh/functions.reactive.md +119 -119
  101. package/examples/local/showcase/zh/layout.reactive.md +100 -100
  102. package/examples/local/showcase/zh/statistics.reactive.md +108 -108
  103. package/examples/local/showcase/zh/tasks.reactive.md +89 -89
  104. package/package.json +152 -152
  105. package/dist-library/compiler-CRD88BMt.js +0 -24964
@@ -1,6 +1,6 @@
1
1
  # Third-party notices
2
2
 
3
- Reactive MD bundles its Markdown, HTML parsing, syntax-highlighting, diagram-layout and chemical-formula parsing dependencies. The standalone HTML runtime also bundles React, React DOM and scheduler. This file preserves license texts for those installed dependency trees, including supporting type packages. The library React entry uses host-provided React and React DOM peers.
3
+ Reactive MD bundles its Markdown, HTML parsing, syntax-highlighting, diagram-layout and KaTeX math typesetting dependencies, including KaTeX fonts and the mhchem extension. The standalone HTML runtime also bundles React, React DOM and scheduler. This file preserves license texts for those installed dependency trees, including supporting type packages. The library React entry uses host-provided React and React DOM peers.
4
4
 
5
5
  Regenerate after dependency updates with `node scripts/generate-notices.mjs`.
6
6
 
@@ -231,6 +231,35 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
231
231
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
232
232
  ```
233
233
 
234
+ ## commander@15.0.0
235
+
236
+ Declared license: MIT
237
+
238
+ ```text
239
+ (The MIT License)
240
+
241
+ Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
242
+
243
+ Permission is hereby granted, free of charge, to any person obtaining
244
+ a copy of this software and associated documentation files (the
245
+ 'Software'), to deal in the Software without restriction, including
246
+ without limitation the rights to use, copy, modify, merge, publish,
247
+ distribute, sublicense, and/or sell copies of the Software, and to
248
+ permit persons to whom the Software is furnished to do so, subject to
249
+ the following conditions:
250
+
251
+ The above copyright notice and this permission notice shall be
252
+ included in all copies or substantial portions of the Software.
253
+
254
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
255
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
256
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
257
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
258
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
259
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
260
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
261
+ ```
262
+
234
263
  ## debug@4.4.3
235
264
 
236
265
  Declared license: MIT
@@ -730,6 +759,34 @@ The above copyright notice and this permission notice shall be included in all c
730
759
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
731
760
  ```
732
761
 
762
+ ## katex@0.19.1
763
+
764
+ Declared license: MIT
765
+
766
+ ```text
767
+ The MIT License (MIT)
768
+
769
+ Copyright (c) 2013-2020 Khan Academy and other contributors
770
+
771
+ Permission is hereby granted, free of charge, to any person obtaining a copy
772
+ of this software and associated documentation files (the "Software"), to deal
773
+ in the Software without restriction, including without limitation the rights
774
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
775
+ copies of the Software, and to permit persons to whom the Software is
776
+ furnished to do so, subject to the following conditions:
777
+
778
+ The above copyright notice and this permission notice shall be included in all
779
+ copies or substantial portions of the Software.
780
+
781
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
782
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
783
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
784
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
785
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
786
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
787
+ SOFTWARE.
788
+ ```
789
+
733
790
  ## longest-streak@3.1.0
734
791
 
735
792
  Declared license: MIT
@@ -1137,214 +1194,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
1137
1194
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1138
1195
  ```
1139
1196
 
1140
- ## mhchemparser@4.2.1
1141
-
1142
- Declared license: Apache-2.0
1143
-
1144
- ```text
1145
- Apache License
1146
- Version 2.0, January 2004
1147
- http://www.apache.org/licenses/
1148
-
1149
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1150
-
1151
- 1. Definitions.
1152
-
1153
- "License" shall mean the terms and conditions for use, reproduction,
1154
- and distribution as defined by Sections 1 through 9 of this document.
1155
-
1156
- "Licensor" shall mean the copyright owner or entity authorized by
1157
- the copyright owner that is granting the License.
1158
-
1159
- "Legal Entity" shall mean the union of the acting entity and all
1160
- other entities that control, are controlled by, or are under common
1161
- control with that entity. For the purposes of this definition,
1162
- "control" means (i) the power, direct or indirect, to cause the
1163
- direction or management of such entity, whether by contract or
1164
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
1165
- outstanding shares, or (iii) beneficial ownership of such entity.
1166
-
1167
- "You" (or "Your") shall mean an individual or Legal Entity
1168
- exercising permissions granted by this License.
1169
-
1170
- "Source" form shall mean the preferred form for making modifications,
1171
- including but not limited to software source code, documentation
1172
- source, and configuration files.
1173
-
1174
- "Object" form shall mean any form resulting from mechanical
1175
- transformation or translation of a Source form, including but
1176
- not limited to compiled object code, generated documentation,
1177
- and conversions to other media types.
1178
-
1179
- "Work" shall mean the work of authorship, whether in Source or
1180
- Object form, made available under the License, as indicated by a
1181
- copyright notice that is included in or attached to the work
1182
- (an example is provided in the Appendix below).
1183
-
1184
- "Derivative Works" shall mean any work, whether in Source or Object
1185
- form, that is based on (or derived from) the Work and for which the
1186
- editorial revisions, annotations, elaborations, or other modifications
1187
- represent, as a whole, an original work of authorship. For the purposes
1188
- of this License, Derivative Works shall not include works that remain
1189
- separable from, or merely link (or bind by name) to the interfaces of,
1190
- the Work and Derivative Works thereof.
1191
-
1192
- "Contribution" shall mean any work of authorship, including
1193
- the original version of the Work and any modifications or additions
1194
- to that Work or Derivative Works thereof, that is intentionally
1195
- submitted to Licensor for inclusion in the Work by the copyright owner
1196
- or by an individual or Legal Entity authorized to submit on behalf of
1197
- the copyright owner. For the purposes of this definition, "submitted"
1198
- means any form of electronic, verbal, or written communication sent
1199
- to the Licensor or its representatives, including but not limited to
1200
- communication on electronic mailing lists, source code control systems,
1201
- and issue tracking systems that are managed by, or on behalf of, the
1202
- Licensor for the purpose of discussing and improving the Work, but
1203
- excluding communication that is conspicuously marked or otherwise
1204
- designated in writing by the copyright owner as "Not a Contribution."
1205
-
1206
- "Contributor" shall mean Licensor and any individual or Legal Entity
1207
- on behalf of whom a Contribution has been received by Licensor and
1208
- subsequently incorporated within the Work.
1209
-
1210
- 2. Grant of Copyright License. Subject to the terms and conditions of
1211
- this License, each Contributor hereby grants to You a perpetual,
1212
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
1213
- copyright license to reproduce, prepare Derivative Works of,
1214
- publicly display, publicly perform, sublicense, and distribute the
1215
- Work and such Derivative Works in Source or Object form.
1216
-
1217
- 3. Grant of Patent License. Subject to the terms and conditions of
1218
- this License, each Contributor hereby grants to You a perpetual,
1219
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
1220
- (except as stated in this section) patent license to make, have made,
1221
- use, offer to sell, sell, import, and otherwise transfer the Work,
1222
- where such license applies only to those patent claims licensable
1223
- by such Contributor that are necessarily infringed by their
1224
- Contribution(s) alone or by combination of their Contribution(s)
1225
- with the Work to which such Contribution(s) was submitted. If You
1226
- institute patent litigation against any entity (including a
1227
- cross-claim or counterclaim in a lawsuit) alleging that the Work
1228
- or a Contribution incorporated within the Work constitutes direct
1229
- or contributory patent infringement, then any patent licenses
1230
- granted to You under this License for that Work shall terminate
1231
- as of the date such litigation is filed.
1232
-
1233
- 4. Redistribution. You may reproduce and distribute copies of the
1234
- Work or Derivative Works thereof in any medium, with or without
1235
- modifications, and in Source or Object form, provided that You
1236
- meet the following conditions:
1237
-
1238
- (a) You must give any other recipients of the Work or
1239
- Derivative Works a copy of this License; and
1240
-
1241
- (b) You must cause any modified files to carry prominent notices
1242
- stating that You changed the files; and
1243
-
1244
- (c) You must retain, in the Source form of any Derivative Works
1245
- that You distribute, all copyright, patent, trademark, and
1246
- attribution notices from the Source form of the Work,
1247
- excluding those notices that do not pertain to any part of
1248
- the Derivative Works; and
1249
-
1250
- (d) If the Work includes a "NOTICE" text file as part of its
1251
- distribution, then any Derivative Works that You distribute must
1252
- include a readable copy of the attribution notices contained
1253
- within such NOTICE file, excluding those notices that do not
1254
- pertain to any part of the Derivative Works, in at least one
1255
- of the following places: within a NOTICE text file distributed
1256
- as part of the Derivative Works; within the Source form or
1257
- documentation, if provided along with the Derivative Works; or,
1258
- within a display generated by the Derivative Works, if and
1259
- wherever such third-party notices normally appear. The contents
1260
- of the NOTICE file are for informational purposes only and
1261
- do not modify the License. You may add Your own attribution
1262
- notices within Derivative Works that You distribute, alongside
1263
- or as an addendum to the NOTICE text from the Work, provided
1264
- that such additional attribution notices cannot be construed
1265
- as modifying the License.
1266
-
1267
- You may add Your own copyright statement to Your modifications and
1268
- may provide additional or different license terms and conditions
1269
- for use, reproduction, or distribution of Your modifications, or
1270
- for any such Derivative Works as a whole, provided Your use,
1271
- reproduction, and distribution of the Work otherwise complies with
1272
- the conditions stated in this License.
1273
-
1274
- 5. Submission of Contributions. Unless You explicitly state otherwise,
1275
- any Contribution intentionally submitted for inclusion in the Work
1276
- by You to the Licensor shall be under the terms and conditions of
1277
- this License, without any additional terms or conditions.
1278
- Notwithstanding the above, nothing herein shall supersede or modify
1279
- the terms of any separate license agreement you may have executed
1280
- with Licensor regarding such Contributions.
1281
-
1282
- 6. Trademarks. This License does not grant permission to use the trade
1283
- names, trademarks, service marks, or product names of the Licensor,
1284
- except as required for reasonable and customary use in describing the
1285
- origin of the Work and reproducing the content of the NOTICE file.
1286
-
1287
- 7. Disclaimer of Warranty. Unless required by applicable law or
1288
- agreed to in writing, Licensor provides the Work (and each
1289
- Contributor provides its Contributions) on an "AS IS" BASIS,
1290
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
1291
- implied, including, without limitation, any warranties or conditions
1292
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
1293
- PARTICULAR PURPOSE. You are solely responsible for determining the
1294
- appropriateness of using or redistributing the Work and assume any
1295
- risks associated with Your exercise of permissions under this License.
1296
-
1297
- 8. Limitation of Liability. In no event and under no legal theory,
1298
- whether in tort (including negligence), contract, or otherwise,
1299
- unless required by applicable law (such as deliberate and grossly
1300
- negligent acts) or agreed to in writing, shall any Contributor be
1301
- liable to You for damages, including any direct, indirect, special,
1302
- incidental, or consequential damages of any character arising as a
1303
- result of this License or out of the use or inability to use the
1304
- Work (including but not limited to damages for loss of goodwill,
1305
- work stoppage, computer failure or malfunction, or any and all
1306
- other commercial damages or losses), even if such Contributor
1307
- has been advised of the possibility of such damages.
1308
-
1309
- 9. Accepting Warranty or Additional Liability. While redistributing
1310
- the Work or Derivative Works thereof, You may choose to offer,
1311
- and charge a fee for, acceptance of support, warranty, indemnity,
1312
- or other liability obligations and/or rights consistent with this
1313
- License. However, in accepting such obligations, You may act only
1314
- on Your own behalf and on Your sole responsibility, not on behalf
1315
- of any other Contributor, and only if You agree to indemnify,
1316
- defend, and hold each Contributor harmless for any liability
1317
- incurred by, or claims asserted against, such Contributor by reason
1318
- of your accepting any such warranty or additional liability.
1319
-
1320
- END OF TERMS AND CONDITIONS
1321
-
1322
- APPENDIX: How to apply the Apache License to your work.
1323
-
1324
- To apply the Apache License to your work, attach the following
1325
- boilerplate notice, with the fields enclosed by brackets "{}"
1326
- replaced with your own identifying information. (Don't include
1327
- the brackets!) The text should be enclosed in the appropriate
1328
- comment syntax for the file format. We also recommend that a
1329
- file or class name and description of purpose be included on the
1330
- same "printed page" as the copyright notice for easier
1331
- identification within third-party archives.
1332
-
1333
- Copyright {yyyy} {name of copyright owner}
1334
-
1335
- Licensed under the Apache License, Version 2.0 (the "License");
1336
- you may not use this file except in compliance with the License.
1337
- You may obtain a copy of the License at
1338
-
1339
- http://www.apache.org/licenses/LICENSE-2.0
1340
-
1341
- Unless required by applicable law or agreed to in writing, software
1342
- distributed under the License is distributed on an "AS IS" BASIS,
1343
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1344
- See the License for the specific language governing permissions and
1345
- limitations under the License.
1346
- ```
1347
-
1348
1197
  ## micromark-core-commonmark@2.0.4
1349
1198
 
1350
1199
  Declared license: MIT
@@ -2666,3 +2515,258 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
2666
2515
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
2667
2516
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2668
2517
  ```
2518
+
2519
+ ## KaTeX mhchem extension: upstream attribution
2520
+
2521
+ The bundled mhchem extension includes code adapted from MathJax mhchem, licensed under Apache-2.0. Its upstream notice and license follow.
2522
+
2523
+ ```text
2524
+ /* eslint-disable */
2525
+ /* -*- Mode: JavaScript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
2526
+ /* vim: set ts=2 et sw=2 tw=80: */
2527
+
2528
+ /*************************************************************
2529
+ *
2530
+ * KaTeX mhchem.js
2531
+ *
2532
+ * This file implements a KaTeX version of mhchem version 3.3.0.
2533
+ * It is adapted from MathJax/extensions/TeX/mhchem.js
2534
+ * It differs from the MathJax version as follows:
2535
+ * 1. The interface is changed so that it can be called from KaTeX, not MathJax.
2536
+ * 2. \rlap and \llap are replaced with \mathrlap and \mathllap.
2537
+ * 3. Four lines of code are edited in order to use \raisebox instead of \raise.
2538
+ * 4. The reaction arrow code is simplified. All reaction arrows are rendered
2539
+ * using KaTeX extensible arrows instead of building non-extensible arrows.
2540
+ * 5. \tripledash vertical alignment is slightly adjusted.
2541
+ *
2542
+ * This code, as other KaTeX code, is released under the MIT license.
2543
+ *
2544
+ * /*************************************************************
2545
+ *
2546
+ * MathJax/extensions/TeX/mhchem.js
2547
+ *
2548
+ * Implements the \ce command for handling chemical formulas
2549
+ * from the mhchem LaTeX package.
2550
+ *
2551
+ * ---------------------------------------------------------------------
2552
+ *
2553
+ * Copyright (c) 2011-2015 The MathJax Consortium
2554
+ * Copyright (c) 2015-2018 Martin Hensel
2555
+ *
2556
+ * Licensed under the Apache License, Version 2.0 (the "License");
2557
+ * you may not use this file except in compliance with the License.
2558
+ * You may obtain a copy of the License at
2559
+ *
2560
+ * http://www.apache.org/licenses/LICENSE-2.0
2561
+ *
2562
+ * Unless required by applicable law or agreed to in writing, software
2563
+ * distributed under the License is distributed on an "AS IS" BASIS,
2564
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2565
+ * See the License for the specific language governing permissions and
2566
+ * limitations under the License.
2567
+ */
2568
+ ```
2569
+
2570
+ ```text
2571
+ Apache License
2572
+ Version 2.0, January 2004
2573
+ http://www.apache.org/licenses/
2574
+
2575
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
2576
+
2577
+ 1. Definitions.
2578
+
2579
+ "License" shall mean the terms and conditions for use, reproduction,
2580
+ and distribution as defined by Sections 1 through 9 of this document.
2581
+
2582
+ "Licensor" shall mean the copyright owner or entity authorized by
2583
+ the copyright owner that is granting the License.
2584
+
2585
+ "Legal Entity" shall mean the union of the acting entity and all
2586
+ other entities that control, are controlled by, or are under common
2587
+ control with that entity. For the purposes of this definition,
2588
+ "control" means (i) the power, direct or indirect, to cause the
2589
+ direction or management of such entity, whether by contract or
2590
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
2591
+ outstanding shares, or (iii) beneficial ownership of such entity.
2592
+
2593
+ "You" (or "Your") shall mean an individual or Legal Entity
2594
+ exercising permissions granted by this License.
2595
+
2596
+ "Source" form shall mean the preferred form for making modifications,
2597
+ including but not limited to software source code, documentation
2598
+ source, and configuration files.
2599
+
2600
+ "Object" form shall mean any form resulting from mechanical
2601
+ transformation or translation of a Source form, including but
2602
+ not limited to compiled object code, generated documentation,
2603
+ and conversions to other media types.
2604
+
2605
+ "Work" shall mean the work of authorship, whether in Source or
2606
+ Object form, made available under the License, as indicated by a
2607
+ copyright notice that is included in or attached to the work
2608
+ (an example is provided in the Appendix below).
2609
+
2610
+ "Derivative Works" shall mean any work, whether in Source or Object
2611
+ form, that is based on (or derived from) the Work and for which the
2612
+ editorial revisions, annotations, elaborations, or other modifications
2613
+ represent, as a whole, an original work of authorship. For the purposes
2614
+ of this License, Derivative Works shall not include works that remain
2615
+ separable from, or merely link (or bind by name) to the interfaces of,
2616
+ the Work and Derivative Works thereof.
2617
+
2618
+ "Contribution" shall mean any work of authorship, including
2619
+ the original version of the Work and any modifications or additions
2620
+ to that Work or Derivative Works thereof, that is intentionally
2621
+ submitted to Licensor for inclusion in the Work by the copyright owner
2622
+ or by an individual or Legal Entity authorized to submit on behalf of
2623
+ the copyright owner. For the purposes of this definition, "submitted"
2624
+ means any form of electronic, verbal, or written communication sent
2625
+ to the Licensor or its representatives, including but not limited to
2626
+ communication on electronic mailing lists, source code control systems,
2627
+ and issue tracking systems that are managed by, or on behalf of, the
2628
+ Licensor for the purpose of discussing and improving the Work, but
2629
+ excluding communication that is conspicuously marked or otherwise
2630
+ designated in writing by the copyright owner as "Not a Contribution."
2631
+
2632
+ "Contributor" shall mean Licensor and any individual or Legal Entity
2633
+ on behalf of whom a Contribution has been received by Licensor and
2634
+ subsequently incorporated within the Work.
2635
+
2636
+ 2. Grant of Copyright License. Subject to the terms and conditions of
2637
+ this License, each Contributor hereby grants to You a perpetual,
2638
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
2639
+ copyright license to reproduce, prepare Derivative Works of,
2640
+ publicly display, publicly perform, sublicense, and distribute the
2641
+ Work and such Derivative Works in Source or Object form.
2642
+
2643
+ 3. Grant of Patent License. Subject to the terms and conditions of
2644
+ this License, each Contributor hereby grants to You a perpetual,
2645
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
2646
+ (except as stated in this section) patent license to make, have made,
2647
+ use, offer to sell, sell, import, and otherwise transfer the Work,
2648
+ where such license applies only to those patent claims licensable
2649
+ by such Contributor that are necessarily infringed by their
2650
+ Contribution(s) alone or by combination of their Contribution(s)
2651
+ with the Work to which such Contribution(s) was submitted. If You
2652
+ institute patent litigation against any entity (including a
2653
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
2654
+ or a Contribution incorporated within the Work constitutes direct
2655
+ or contributory patent infringement, then any patent licenses
2656
+ granted to You under this License for that Work shall terminate
2657
+ as of the date such litigation is filed.
2658
+
2659
+ 4. Redistribution. You may reproduce and distribute copies of the
2660
+ Work or Derivative Works thereof in any medium, with or without
2661
+ modifications, and in Source or Object form, provided that You
2662
+ meet the following conditions:
2663
+
2664
+ (a) You must give any other recipients of the Work or
2665
+ Derivative Works a copy of this License; and
2666
+
2667
+ (b) You must cause any modified files to carry prominent notices
2668
+ stating that You changed the files; and
2669
+
2670
+ (c) You must retain, in the Source form of any Derivative Works
2671
+ that You distribute, all copyright, patent, trademark, and
2672
+ attribution notices from the Source form of the Work,
2673
+ excluding those notices that do not pertain to any part of
2674
+ the Derivative Works; and
2675
+
2676
+ (d) If the Work includes a "NOTICE" text file as part of its
2677
+ distribution, then any Derivative Works that You distribute must
2678
+ include a readable copy of the attribution notices contained
2679
+ within such NOTICE file, excluding those notices that do not
2680
+ pertain to any part of the Derivative Works, in at least one
2681
+ of the following places: within a NOTICE text file distributed
2682
+ as part of the Derivative Works; within the Source form or
2683
+ documentation, if provided along with the Derivative Works; or,
2684
+ within a display generated by the Derivative Works, if and
2685
+ wherever such third-party notices normally appear. The contents
2686
+ of the NOTICE file are for informational purposes only and
2687
+ do not modify the License. You may add Your own attribution
2688
+ notices within Derivative Works that You distribute, alongside
2689
+ or as an addendum to the NOTICE text from the Work, provided
2690
+ that such additional attribution notices cannot be construed
2691
+ as modifying the License.
2692
+
2693
+ You may add Your own copyright statement to Your modifications and
2694
+ may provide additional or different license terms and conditions
2695
+ for use, reproduction, or distribution of Your modifications, or
2696
+ for any such Derivative Works as a whole, provided Your use,
2697
+ reproduction, and distribution of the Work otherwise complies with
2698
+ the conditions stated in this License.
2699
+
2700
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
2701
+ any Contribution intentionally submitted for inclusion in the Work
2702
+ by You to the Licensor shall be under the terms and conditions of
2703
+ this License, without any additional terms or conditions.
2704
+ Notwithstanding the above, nothing herein shall supersede or modify
2705
+ the terms of any separate license agreement you may have executed
2706
+ with Licensor regarding such Contributions.
2707
+
2708
+ 6. Trademarks. This License does not grant permission to use the trade
2709
+ names, trademarks, service marks, or product names of the Licensor,
2710
+ except as required for reasonable and customary use in describing the
2711
+ origin of the Work and reproducing the content of the NOTICE file.
2712
+
2713
+ 7. Disclaimer of Warranty. Unless required by applicable law or
2714
+ agreed to in writing, Licensor provides the Work (and each
2715
+ Contributor provides its Contributions) on an "AS IS" BASIS,
2716
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
2717
+ implied, including, without limitation, any warranties or conditions
2718
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
2719
+ PARTICULAR PURPOSE. You are solely responsible for determining the
2720
+ appropriateness of using or redistributing the Work and assume any
2721
+ risks associated with Your exercise of permissions under this License.
2722
+
2723
+ 8. Limitation of Liability. In no event and under no legal theory,
2724
+ whether in tort (including negligence), contract, or otherwise,
2725
+ unless required by applicable law (such as deliberate and grossly
2726
+ negligent acts) or agreed to in writing, shall any Contributor be
2727
+ liable to You for damages, including any direct, indirect, special,
2728
+ incidental, or consequential damages of any character arising as a
2729
+ result of this License or out of the use or inability to use the
2730
+ Work (including but not limited to damages for loss of goodwill,
2731
+ work stoppage, computer failure or malfunction, or any and all
2732
+ other commercial damages or losses), even if such Contributor
2733
+ has been advised of the possibility of such damages.
2734
+
2735
+ 9. Accepting Warranty or Additional Liability. While redistributing
2736
+ the Work or Derivative Works thereof, You may choose to offer,
2737
+ and charge a fee for, acceptance of support, warranty, indemnity,
2738
+ or other liability obligations and/or rights consistent with this
2739
+ License. However, in accepting such obligations, You may act only
2740
+ on Your own behalf and on Your sole responsibility, not on behalf
2741
+ of any other Contributor, and only if You agree to indemnify,
2742
+ defend, and hold each Contributor harmless for any liability
2743
+ incurred by, or claims asserted against, such Contributor by reason
2744
+ of your accepting any such warranty or additional liability.
2745
+
2746
+ END OF TERMS AND CONDITIONS
2747
+
2748
+ APPENDIX: How to apply the Apache License to your work.
2749
+
2750
+ To apply the Apache License to your work, attach the following
2751
+ boilerplate notice, with the fields enclosed by brackets "{}"
2752
+ replaced with your own identifying information. (Don't include
2753
+ the brackets!) The text should be enclosed in the appropriate
2754
+ comment syntax for the file format. We also recommend that a
2755
+ file or class name and description of purpose be included on the
2756
+ same "printed page" as the copyright notice for easier
2757
+ identification within third-party archives.
2758
+
2759
+ Copyright {yyyy} {name of copyright owner}
2760
+
2761
+ Licensed under the Apache License, Version 2.0 (the "License");
2762
+ you may not use this file except in compliance with the License.
2763
+ You may obtain a copy of the License at
2764
+
2765
+ http://www.apache.org/licenses/LICENSE-2.0
2766
+
2767
+ Unless required by applicable law or agreed to in writing, software
2768
+ distributed under the License is distributed on an "AS IS" BASIS,
2769
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2770
+ See the License for the specific language governing permissions and
2771
+ limitations under the License.
2772
+ ```
@@ -1,40 +1,40 @@
1
1
  #!/usr/bin/env node
2
- /*
3
- * reactive-md command-line interface.
4
- *
5
- * Exit codes:
6
- * 0 success
7
- * 2 usage or argument error
8
- * 3 document compile, render, React or build-artifact error
9
- * 4 input or output file I/O error
10
- * 5 asset or security policy error
11
- *
12
- * Build artifacts and the package metadata are located relative to this file's
13
- * installed package root (bin/..), never the current working directory.
14
- */
15
- import path from 'node:path';
16
- import { fileURLToPath } from 'node:url';
17
- import { CliError, EXIT } from '../cli/errors.mjs';
18
- import { runCli } from '../cli/main.mjs';
19
-
20
- const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
21
- const context = {
22
- packageRoot,
23
- stdout: process.stdout,
24
- stderr: process.stderr,
25
- };
26
-
27
- try {
28
- process.exitCode = await runCli(process.argv.slice(2), context);
29
- } catch (error) {
30
- if (error instanceof CliError) {
31
- if (!error.reported) {
32
- context.stderr.write(`reactive-md: ${error.message}\n`);
33
- }
34
- process.exitCode = error.exitCode;
35
- } else {
36
- const message = error instanceof Error ? error.message : String(error);
37
- context.stderr.write(`reactive-md: unexpected error: ${message}\n`);
38
- process.exitCode = EXIT.DOCUMENT;
39
- }
40
- }
2
+ /*
3
+ * reactive-md command-line interface.
4
+ *
5
+ * Exit codes:
6
+ * 0 success
7
+ * 2 usage or argument error
8
+ * 3 document compile, render, React or build-artifact error
9
+ * 4 input or output file I/O error
10
+ * 5 asset or security policy error
11
+ *
12
+ * Build artifacts and the package metadata are located relative to this file's
13
+ * installed package root (bin/..), never the current working directory.
14
+ */
15
+ import path from 'node:path';
16
+ import { fileURLToPath } from 'node:url';
17
+ import { CliError, EXIT } from '../cli/errors.mjs';
18
+ import { runCli } from '../cli/main.mjs';
19
+
20
+ const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
21
+ const context = {
22
+ packageRoot,
23
+ stdout: process.stdout,
24
+ stderr: process.stderr,
25
+ };
26
+
27
+ try {
28
+ process.exitCode = await runCli(process.argv.slice(2), context);
29
+ } catch (error) {
30
+ if (error instanceof CliError) {
31
+ if (!error.reported) {
32
+ context.stderr.write(`reactive-md: ${error.message}\n`);
33
+ }
34
+ process.exitCode = error.exitCode;
35
+ } else {
36
+ const message = error instanceof Error ? error.message : String(error);
37
+ context.stderr.write(`reactive-md: unexpected error: ${message}\n`);
38
+ process.exitCode = EXIT.DOCUMENT;
39
+ }
40
+ }