@ankhorage/paradox 0.0.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 (47) hide show
  1. package/.changeset/README.md +5 -0
  2. package/.changeset/config.json +11 -0
  3. package/.github/workflows/docs.yml +45 -0
  4. package/.prettierignore +1 -0
  5. package/.prettierrc.js +5 -0
  6. package/CHANGELOG.md +13 -0
  7. package/LICENSE +21 -0
  8. package/README.md +49 -0
  9. package/bun.lock +663 -0
  10. package/eslint.config.mjs +12 -0
  11. package/package.json +36 -0
  12. package/paradox/components.md +1 -0
  13. package/paradox/exports.json +57 -0
  14. package/paradox/exports.md +67 -0
  15. package/paradox/paradox.json +62 -0
  16. package/paradox.config.ts +18 -0
  17. package/src/analyze/analyze.ts +46 -0
  18. package/src/analyze/components.ts +27 -0
  19. package/src/analyze/exports.ts +68 -0
  20. package/src/analyze/project.ts +11 -0
  21. package/src/analyze/types.ts +36 -0
  22. package/src/analyze/utils/getComponentPropsType.ts +26 -0
  23. package/src/analyze/utils/getParadoxComment.ts +24 -0
  24. package/src/analyze/utils/getPropsFromType.ts +24 -0
  25. package/src/analyze/utils/isReactComponent.ts +35 -0
  26. package/src/analyze/utils/parseParadoxComment.ts +23 -0
  27. package/src/analyze/utils/resolveExportSymbol.ts +8 -0
  28. package/src/cli.ts +30 -0
  29. package/src/config/defineParadoxConfig.ts +8 -0
  30. package/src/config/types.ts +20 -0
  31. package/src/index.ts +9 -0
  32. package/src/model/buildModel.ts +25 -0
  33. package/src/model/types.ts +19 -0
  34. package/src/render/render.ts +82 -0
  35. package/src/render/types.ts +10 -0
  36. package/src/write/write.ts +25 -0
  37. package/tests/__snapshots__/basic.components.md +10 -0
  38. package/tests/__snapshots__/basic.exports.md +13 -0
  39. package/tests/__snapshots__/basic.readme.md +13 -0
  40. package/tests/analyze.test.ts +60 -0
  41. package/tests/fixtures/basic/package.json +5 -0
  42. package/tests/fixtures/basic/src/index.ts +2 -0
  43. package/tests/fixtures/basic/src/internal.ts +6 -0
  44. package/tests/fixtures/basic/src/ui.ts +29 -0
  45. package/tests/fixtures/basic/tsconfig.json +11 -0
  46. package/tsconfig.eslint.json +16 -0
  47. package/tsconfig.json +14 -0
@@ -0,0 +1,5 @@
1
+ # Changesets
2
+
3
+ This directory stores release notes consumed by Changesets.
4
+
5
+ Run `bun run changeset` to create a new changeset before publishing a package change.
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@changesets/config@3.1.3/schema.json",
3
+ "changelog": "@changesets/cli/changelog",
4
+ "commit": false,
5
+ "fixed": [],
6
+ "linked": [],
7
+ "access": "public",
8
+ "baseBranch": "main",
9
+ "updateInternalDependencies": "patch",
10
+ "ignore": []
11
+ }
@@ -0,0 +1,45 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ jobs:
10
+ validate:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout repository
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Setup Bun
18
+ uses: oven-sh/setup-bun@v2
19
+ with:
20
+ bun-version: '1.3.11'
21
+
22
+ - name: Install dependencies
23
+ run: bun install --frozen-lockfile
24
+
25
+ - name: Run lint
26
+ run: bun run lint
27
+
28
+ - name: Check formatting
29
+ run: bun run format:check
30
+
31
+ - name: Run typecheck
32
+ run: bun run typecheck
33
+
34
+ - name: Run tests
35
+ run: bun run test
36
+
37
+ - name: Check changesets
38
+ if: github.event_name == 'pull_request'
39
+ run: bun run changeset:status
40
+
41
+ - name: Generate docs
42
+ run: bun run docs
43
+
44
+ - name: Check generated docs
45
+ run: git diff --exit-code
@@ -0,0 +1 @@
1
+ tests/__snapshots__/*.md
package/.prettierrc.js ADDED
@@ -0,0 +1,5 @@
1
+ import { createRequire } from 'node:module';
2
+
3
+ const require = createRequire(import.meta.url);
4
+
5
+ export default require('@ankhorage/devtools/prettier');
package/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ ## 0.0.0
4
+
5
+ ### Initial Changes
6
+
7
+ - Bootstrap Paradox with a TypeScript documentation pipeline: analyze, model, render, and write.
8
+ - Add generated README and package export artifacts under `paradox/`.
9
+ - Add repository config, CI validation, linting, formatting, typechecking, and bun tests.
10
+
11
+ All notable changes to this project will be documented in this file.
12
+
13
+ The format is based on Changesets and the package changelog generated during release.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ankhorage
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 ADDED
@@ -0,0 +1,49 @@
1
+ # @ankhorage/paradox
2
+
3
+ Deterministic documentation generator for TypeScript packages.
4
+
5
+ ## Package Exports
6
+
7
+ ### analyze
8
+
9
+ Runs the source analysis pipeline for a configured package.
10
+
11
+ ### AnalysisComponent
12
+
13
+ Describes one React component and its extracted props.
14
+
15
+ ### AnalysisExport
16
+
17
+ Describes one exported declaration discovered in a package.
18
+
19
+ ### AnalysisResult
20
+
21
+ Complete analysis output used to build the documentation model.
22
+
23
+ ### defineParadoxConfig
24
+
25
+ Defines a Paradox configuration object without changing its shape.
26
+
27
+ ### ParadoxConfig
28
+
29
+ Configuration for running Paradox against a TypeScript package.
30
+
31
+ ### buildModel
32
+
33
+ Converts analysis output into a serializable documentation model.
34
+
35
+ ### DocumentationModel
36
+
37
+ Serializable model consumed by renderers and writers.
38
+
39
+ ### render
40
+
41
+ Renders the documentation model into README and artifact files.
42
+
43
+ ### RenderResult
44
+
45
+ Rendered documentation files ready to be written to disk.
46
+
47
+ ### write
48
+
49
+ Writes generated documentation artifacts to the configured output paths.