@krapwoo/ds-viewer 0.13.0 → 0.13.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/README.md +7 -0
- package/native/catalog/FamilyPage.tsx +5 -2
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -167,6 +167,13 @@ npm run viewer:dev # opens viewer-host/, the DS Viewer internals catalog (
|
|
|
167
167
|
|
|
168
168
|
`check:catalog`, `check:doctor` and `check:types` cover both catalogs.
|
|
169
169
|
|
|
170
|
+
Three checks cover three different things, and none substitutes for another: `npm test` covers
|
|
171
|
+
pure logic and source assertions; `npm run test:render` renders catalog components into jsdom
|
|
172
|
+
through react-native-web and covers component structure (which element wraps what); `npm run
|
|
173
|
+
check:catalog` is the only one that sees geometry, because jsdom has no layout engine —
|
|
174
|
+
`getBoundingClientRect()` returns zeros there. A layout or alignment claim must be verified in a
|
|
175
|
+
browser, with `check:catalog`, never in a renderer test.
|
|
176
|
+
|
|
170
177
|
## Contributing
|
|
171
178
|
|
|
172
179
|
Found a bug or an improvement while using ds-viewer in your app? Open an issue or a pull request:
|
|
@@ -793,7 +793,10 @@ function AnatomyMemberRow({ memberId, description, byId, outline }: { memberId:
|
|
|
793
793
|
return (
|
|
794
794
|
<View style={styles.legendRow}>
|
|
795
795
|
{pin && (
|
|
796
|
-
|
|
796
|
+
// `testID` exists only so a renderer test can assert the slot's presence without
|
|
797
|
+
// depending on class names — react-native-web renders it to the DOM as `data-testid`;
|
|
798
|
+
// native ignores it.
|
|
799
|
+
<View style={styles.legendPinSlot} testID="legend-pin-slot">
|
|
797
800
|
<Pin number={pin.number} dashed={pin.dashed} />
|
|
798
801
|
</View>
|
|
799
802
|
)}
|
|
@@ -817,7 +820,7 @@ function AnatomyOtherRow({ name, description, resolvesAddress }: { name: string;
|
|
|
817
820
|
const resolved = resolvesAddress(name);
|
|
818
821
|
return (
|
|
819
822
|
<View style={styles.legendRow}>
|
|
820
|
-
<View style={styles.legendPinSlot} {...ARIA_HIDDEN}>
|
|
823
|
+
<View style={styles.legendPinSlot} {...ARIA_HIDDEN} testID="legend-pin-slot">
|
|
821
824
|
<View style={styles.extPin}>
|
|
822
825
|
<Text style={styles.extPinText}>↗</Text>
|
|
823
826
|
</View>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krapwoo/ds-viewer",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A browsable, always-current catalog for an Expo / React Native design system.",
|
|
@@ -55,14 +55,18 @@
|
|
|
55
55
|
"typescript": "^6.0.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
+
"@types/jsdom": "^21.1.7",
|
|
58
59
|
"@types/node": "^22.0.0",
|
|
59
60
|
"@types/react": "^19.0.0",
|
|
61
|
+
"esbuild": "^0.25.12",
|
|
62
|
+
"jsdom": "^26.1.0",
|
|
60
63
|
"puppeteer": "^25.12.0"
|
|
61
64
|
},
|
|
62
65
|
"scripts": {
|
|
63
66
|
"build": "tsc -p tsconfig.json",
|
|
64
67
|
"prepack": "npm run build",
|
|
65
68
|
"test": "node --experimental-strip-types --test 'cli/**/*.test.ts' 'config/**/*.test.ts' 'native/catalog/__tests__/*.test.ts'",
|
|
69
|
+
"test:render": "node --import ./test/register.mjs --test 'test/__tests__/*.test.ts' 'native/catalog/__tests__/*.test.tsx'",
|
|
66
70
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
67
71
|
"kit:dev": "npm run build && cd kit-host && node node_modules/@krapwoo/ds-viewer/dist/cli/main.js dev",
|
|
68
72
|
"viewer:dev": "npm run build && cd viewer-host && node node_modules/@krapwoo/ds-viewer/dist/cli/main.js dev",
|