@ankhorage/surface 9.0.0 → 9.0.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.
package/CHANGELOG.md
CHANGED
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.1",
|
|
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": {
|
|
@@ -69,6 +69,14 @@
|
|
|
69
69
|
"import": "./dist/features/bottom-sheet/public.js",
|
|
70
70
|
"default": "./dist/features/bottom-sheet/public.js"
|
|
71
71
|
},
|
|
72
|
+
"./color": {
|
|
73
|
+
"bun": "./src/constants/surfaceColor.ts",
|
|
74
|
+
"react-native": "./src/constants/surfaceColor.ts",
|
|
75
|
+
"browser": "./src/constants/surfaceColor.ts",
|
|
76
|
+
"types": "./dist/constants/surfaceColor.d.ts",
|
|
77
|
+
"import": "./dist/constants/surfaceColor.js",
|
|
78
|
+
"default": "./dist/constants/surfaceColor.js"
|
|
79
|
+
},
|
|
72
80
|
"./theme": {
|
|
73
81
|
"bun": "./src/features/theme/public.ts",
|
|
74
82
|
"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',
|