@ankhorage/surface 9.0.0 → 9.0.2
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 +12 -0
- package/package.json +17 -8
- package/src/constants/surfaceColor.public.test.ts +34 -0
- package/src/index.test.ts +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ankhorage/surface
|
|
2
2
|
|
|
3
|
+
## 9.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c046554: Update Ankhorage dependencies: `@ankhorage/contracts`.
|
|
8
|
+
|
|
9
|
+
## 9.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 43bfcf9: Expose the canonical Surface color and emphasis catalogs through the React-free `@ankhorage/surface/color` subpath.
|
|
14
|
+
|
|
3
15
|
## 9.0.0
|
|
4
16
|
|
|
5
17
|
### Major Changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/surface",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "9.0.
|
|
4
|
+
"version": "9.0.2",
|
|
5
5
|
"description": "Stable UI foundation for React Native and React Native Web.",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/surface#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -16,15 +16,16 @@
|
|
|
16
16
|
"url": "git+https://github.com/ankhorage/surface.git"
|
|
17
17
|
},
|
|
18
18
|
"keywords": [
|
|
19
|
-
"
|
|
20
|
-
"
|
|
19
|
+
"accessibility",
|
|
20
|
+
"ankhorage",
|
|
21
|
+
"components",
|
|
22
|
+
"design-system",
|
|
21
23
|
"expo",
|
|
22
|
-
"ui",
|
|
23
24
|
"foundation",
|
|
24
|
-
"
|
|
25
|
+
"react-native",
|
|
26
|
+
"react-native-web",
|
|
25
27
|
"theming",
|
|
26
|
-
"
|
|
27
|
-
"components"
|
|
28
|
+
"ui"
|
|
28
29
|
],
|
|
29
30
|
"peerDependencies": {
|
|
30
31
|
"@react-native-vector-icons/fontawesome": "^13.1.3",
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
},
|
|
44
45
|
"dependencies": {
|
|
45
46
|
"@ankhorage/color-theory": "^0.3.0",
|
|
46
|
-
"@ankhorage/contracts": "^
|
|
47
|
+
"@ankhorage/contracts": "^22.0.1",
|
|
47
48
|
"@ankhorage/utility": "^1.2.0",
|
|
48
49
|
"@gorhom/bottom-sheet": "^5.2.13"
|
|
49
50
|
},
|
|
@@ -69,6 +70,14 @@
|
|
|
69
70
|
"import": "./dist/features/bottom-sheet/public.js",
|
|
70
71
|
"default": "./dist/features/bottom-sheet/public.js"
|
|
71
72
|
},
|
|
73
|
+
"./color": {
|
|
74
|
+
"bun": "./src/constants/surfaceColor.ts",
|
|
75
|
+
"react-native": "./src/constants/surfaceColor.ts",
|
|
76
|
+
"browser": "./src/constants/surfaceColor.ts",
|
|
77
|
+
"types": "./dist/constants/surfaceColor.d.ts",
|
|
78
|
+
"import": "./dist/constants/surfaceColor.js",
|
|
79
|
+
"default": "./dist/constants/surfaceColor.js"
|
|
80
|
+
},
|
|
72
81
|
"./theme": {
|
|
73
82
|
"bun": "./src/features/theme/public.ts",
|
|
74
83
|
"react-native": "./src/features/theme/public.ts",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { describe, expect, test } from 'bun:test';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
SURFACE_COLORS,
|
|
5
|
+
SURFACE_EMPHASES,
|
|
6
|
+
SURFACE_PALETTE_COLORS,
|
|
7
|
+
SURFACE_STATUS_COLORS,
|
|
8
|
+
} from './surfaceColor';
|
|
9
|
+
|
|
10
|
+
describe('public color subpath', () => {
|
|
11
|
+
test('imports canonical catalogs through the package subpath in plain Bun', async () => {
|
|
12
|
+
const script = [
|
|
13
|
+
"import { SURFACE_COLORS, SURFACE_EMPHASES } from '@ankhorage/surface/color';",
|
|
14
|
+
'process.stdout.write(`${SURFACE_COLORS.length}:${SURFACE_EMPHASES.length}`);',
|
|
15
|
+
].join('\n');
|
|
16
|
+
const subprocess = Bun.spawn({
|
|
17
|
+
cmd: [process.execPath, '-e', script],
|
|
18
|
+
stdout: 'pipe',
|
|
19
|
+
stderr: 'pipe',
|
|
20
|
+
});
|
|
21
|
+
const [stdout, stderr, exitCode] = await Promise.all([
|
|
22
|
+
new Response(subprocess.stdout).text(),
|
|
23
|
+
new Response(subprocess.stderr).text(),
|
|
24
|
+
subprocess.exited,
|
|
25
|
+
]);
|
|
26
|
+
|
|
27
|
+
expect(exitCode, stderr).toBe(0);
|
|
28
|
+
expect(stdout).toBe(`${SURFACE_COLORS.length}:${SURFACE_EMPHASES.length}`);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
test('keeps the package subpath aligned with the canonical catalogs', () => {
|
|
32
|
+
expect(SURFACE_COLORS).toEqual([...SURFACE_PALETTE_COLORS, ...SURFACE_STATUS_COLORS, 'danger']);
|
|
33
|
+
});
|
|
34
|
+
});
|
package/src/index.test.ts
CHANGED
|
@@ -129,6 +129,14 @@ describe('public package metadata contract', () => {
|
|
|
129
129
|
import: './dist/features/bottom-sheet/public.js',
|
|
130
130
|
types: './dist/features/bottom-sheet/public.d.ts',
|
|
131
131
|
},
|
|
132
|
+
'./color': {
|
|
133
|
+
bun: './src/constants/surfaceColor.ts',
|
|
134
|
+
'react-native': './src/constants/surfaceColor.ts',
|
|
135
|
+
browser: './src/constants/surfaceColor.ts',
|
|
136
|
+
default: './dist/constants/surfaceColor.js',
|
|
137
|
+
import: './dist/constants/surfaceColor.js',
|
|
138
|
+
types: './dist/constants/surfaceColor.d.ts',
|
|
139
|
+
},
|
|
132
140
|
'./theme': {
|
|
133
141
|
bun: './src/features/theme/public.ts',
|
|
134
142
|
'react-native': './src/features/theme/public.ts',
|