@ankhorage/color-theory 0.0.4 → 0.0.5
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.
- package/CHANGELOG.md +7 -0
- package/README.md +75 -16
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,27 +1,86 @@
|
|
|
1
|
+
<!-- markdownlint-disable MD013 MD033 -->
|
|
2
|
+
<!-- This file is generated by Paradox. Do not edit manually. -->
|
|
3
|
+
|
|
1
4
|
# @ankhorage/color-theory
|
|
2
5
|
|
|
6
|
+
        
|
|
7
|
+
|
|
3
8
|
Standalone color theory, harmony, swatch, contrast, and theme color generation utilities.
|
|
4
9
|
|
|
5
|
-
##
|
|
10
|
+
## Generated documentation
|
|
6
11
|
|
|
7
|
-
|
|
12
|
+
- [Interactive documentation app](././paradox/index.html)
|
|
13
|
+
- [Public API reference](././paradox/exports.md)
|
|
14
|
+
- [Component registry](././paradox/components.md)
|
|
15
|
+
- [Architecture overview](././paradox/diagrams/architecture-overview.mmd)
|
|
16
|
+
- [Module relationships](././paradox/diagrams/module-relationships.mmd)
|
|
17
|
+
- [Export graph](././paradox/diagrams/export-graph.mmd)
|
|
18
|
+
- [assertHexColor sequence](././paradox/diagrams/sequences/assert-hex-color.mmd)
|
|
19
|
+
- [getReadableForeground sequence](././paradox/diagrams/sequences/get-readable-foreground.mmd)
|
|
20
|
+
- [getThemeModePrimaryHex sequence](././paradox/diagrams/sequences/get-theme-mode-primary-hex.mmd)
|
|
21
|
+
- [parseHexColorOrThrow sequence](././paradox/diagrams/sequences/parse-hex-color-or-throw.mmd)
|
|
8
22
|
|
|
9
|
-
|
|
10
|
-
import { createDefaultSemanticStatusSwatches } from '@ankhorage/color-theory';
|
|
23
|
+
## Architecture preview
|
|
11
24
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
25
|
+
<details>
|
|
26
|
+
<summary>Architecture overview</summary>
|
|
27
|
+
|
|
28
|
+
```mermaid
|
|
29
|
+
graph TD
|
|
30
|
+
package__ankhorage_color_theory["@ankhorage/color-theory"]
|
|
31
|
+
entrypoint_src_index_ts["src/index.ts"]
|
|
32
|
+
package__ankhorage_color_theory --> entrypoint_src_index_ts
|
|
33
|
+
module_src_contrast_ts["src/contrast.ts"]
|
|
34
|
+
package__ankhorage_color_theory -.-> module_src_contrast_ts
|
|
35
|
+
module_src_contrast_ts --> module_src_hex_ts
|
|
36
|
+
module_src_contrast_ts --> module_src_internal_culori_ts
|
|
37
|
+
module_src_culori_fn_ts["src/culori-fn.ts"]
|
|
38
|
+
package__ankhorage_color_theory -.-> module_src_culori_fn_ts
|
|
39
|
+
module_src_culori_ts["src/culori.ts"]
|
|
40
|
+
package__ankhorage_color_theory -.-> module_src_culori_ts
|
|
41
|
+
module_src_harmony_ts["src/harmony.ts"]
|
|
42
|
+
package__ankhorage_color_theory -.-> module_src_harmony_ts
|
|
43
|
+
module_src_harmony_ts --> module_src_hex_ts
|
|
44
|
+
module_src_harmony_ts --> module_src_internal_culori_ts
|
|
45
|
+
module_src_hex_ts["src/hex.ts"]
|
|
46
|
+
package__ankhorage_color_theory -.-> module_src_hex_ts
|
|
47
|
+
module_src_index_ts["src/index.ts"]
|
|
48
|
+
module_src_internal_culori_ts["src/internal-culori.ts"]
|
|
49
|
+
package__ankhorage_color_theory -.-> module_src_internal_culori_ts
|
|
50
|
+
module_src_internal_culori_ts --> module_src_hex_ts
|
|
51
|
+
module_src_neutral_ts["src/neutral.ts"]
|
|
52
|
+
package__ankhorage_color_theory -.-> module_src_neutral_ts
|
|
53
|
+
module_src_neutral_ts --> module_src_harmony_ts
|
|
54
|
+
module_src_neutral_ts --> module_src_hex_ts
|
|
55
|
+
module_src_neutral_ts --> module_src_internal_culori_ts
|
|
56
|
+
module_src_neutral_ts --> module_src_swatches_ts
|
|
57
|
+
module_src_semantic_status_ts["src/semantic-status.ts"]
|
|
58
|
+
package__ankhorage_color_theory -.-> module_src_semantic_status_ts
|
|
59
|
+
module_src_semantic_status_ts --> module_src_hex_ts
|
|
60
|
+
module_src_semantic_status_ts --> module_src_swatches_ts
|
|
61
|
+
module_src_semantics_ts["src/semantics.ts"]
|
|
62
|
+
package__ankhorage_color_theory -.-> module_src_semantics_ts
|
|
63
|
+
module_src_semantics_ts --> module_src_harmony_ts
|
|
64
|
+
module_src_semantics_ts --> module_src_swatches_ts
|
|
65
|
+
module_src_swatches_ts["src/swatches.ts"]
|
|
66
|
+
package__ankhorage_color_theory -.-> module_src_swatches_ts
|
|
67
|
+
module_src_swatches_ts --> module_src_hex_ts
|
|
68
|
+
module_src_swatches_ts --> module_src_internal_culori_ts
|
|
69
|
+
module_src_theme_colors_ts["src/theme-colors.ts"]
|
|
70
|
+
package__ankhorage_color_theory -.-> module_src_theme_colors_ts
|
|
71
|
+
module_src_theme_colors_ts --> module_src_harmony_ts
|
|
72
|
+
module_src_theme_colors_ts --> module_src_hex_ts
|
|
73
|
+
module_src_theme_colors_ts --> module_src_neutral_ts
|
|
74
|
+
module_src_theme_colors_ts --> module_src_swatches_ts
|
|
15
75
|
```
|
|
16
76
|
|
|
17
|
-
|
|
77
|
+
</details>
|
|
18
78
|
|
|
19
|
-
|
|
20
|
-
import { createSemanticStatusSwatches } from '@ankhorage/color-theory';
|
|
79
|
+
## Path resolution
|
|
21
80
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
81
|
+
- Config discovery: searches upward from `process.cwd()` for `paradox.config.ts/js/mjs/cjs` (required; no fallback).
|
|
82
|
+
- Package root: defaults to the directory containing `paradox.config.*`; `package.root` (when relative) resolves relative to that directory.
|
|
83
|
+
- Output directory: defaults to `paradox/`; `output.dir` (when relative) resolves relative to the resolved package root and must stay inside it.
|
|
84
|
+
- Modes:
|
|
85
|
+
- `safe`: writes generated artifacts only under the output directory
|
|
86
|
+
- `write`: additionally updates `<packageRoot>/README.md`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/color-theory",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.5",
|
|
5
5
|
"description": "Standalone color theory, harmony, swatch, contrast, and theme color generation utilities.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/color-theory#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -61,24 +61,24 @@
|
|
|
61
61
|
"build": "rm -rf dist tsconfig.tsbuildinfo && bun x tsc -p tsconfig.json",
|
|
62
62
|
"changeset": "changeset",
|
|
63
63
|
"changeset:status": "changeset status --since=origin/main",
|
|
64
|
-
"knip": "knip",
|
|
65
|
-
"lint": "eslint . --max-warnings=0",
|
|
66
|
-
"lint:fix": "eslint . --fix --max-warnings=0",
|
|
67
|
-
"format": "prettier --write .",
|
|
68
|
-
"
|
|
64
|
+
"knip": "ankhorage-knip",
|
|
65
|
+
"lint": "ankhorage-eslint . --max-warnings=0",
|
|
66
|
+
"lint:fix": "ankhorage-eslint . --fix --max-warnings=0",
|
|
67
|
+
"format": "ankhorage-prettier --write .",
|
|
68
|
+
"format:check": "ankhorage-prettier --check .",
|
|
69
|
+
"docs": "paradox",
|
|
69
70
|
"prepack": "bun run build",
|
|
70
71
|
"test": "bun test src",
|
|
71
72
|
"typecheck": "bun x tsc --noEmit -p tsconfig.json",
|
|
72
73
|
"version-packages": "changeset version"
|
|
73
74
|
},
|
|
74
75
|
"devDependencies": {
|
|
75
|
-
"@ankhorage/devtools": "^1.0.
|
|
76
|
-
"@ankhorage/paradox": "^0.
|
|
76
|
+
"@ankhorage/devtools": "^1.0.5",
|
|
77
|
+
"@ankhorage/paradox": "^0.1.5",
|
|
77
78
|
"@changesets/cli": "^2.31.0",
|
|
78
79
|
"@types/bun": "^1.3.13",
|
|
79
80
|
"@types/culori": "^4.0.1",
|
|
80
81
|
"@types/node": "^25.6.0",
|
|
81
|
-
"knip": "^5.88.1",
|
|
82
82
|
"typescript": "^5.9.3"
|
|
83
83
|
},
|
|
84
84
|
"packageManager": "bun@1.3.13"
|