mirror of
https://github.com/bitbaum/bip-kit.git
synced 2026-12-04 05:17:05 +01:00
#27 cleared the code out from under the copy button. This fixes the other half of the same rule: the button was never visible on a phone at all. `.bp-copy` rested at `opacity: 0` and was revealed only by `.bp-codeblock-body:hover`. A touch device never enters a hover state, so on phones and tablets the control stayed at opacity 0 permanently — in the DOM, in the accessibility tree, and tappable, with nothing on screen to say it was there. Measured at 390x844 with hasTouch against live pages on two consumers (kivvi, aoz-housing): computed opacity 0 on every code block, and no gesture that can change it. So the base rule now rests at `opacity: 1`, and the fade-until-hover moves inside `@media (hover: hover) and (pointer: fine)` — it is an enhancement for pointers that can hover, not the definition of the control. Hover-capable desktops are unchanged: same fade-in, same resting invisibility. Because --bp-copy-clearance from #27 is unconditional, a permanently visible button still covers no code. Proven against live content by injecting the candidate stylesheet into pages that still ship 0.2.3/0.2.4, so only the stylesheet varies: kivvi preisgestaltung-secondhand 1440 hover : opacity 0 -> 0 overlap 0 -> 0 (unchanged) 390 touch : opacity 0 -> 1 overlap 939px² -> 0 (fixed) aoz chore-fairness-is-a-balance 1440 hover : opacity 0 -> 0 (unchanged) 390 touch : opacity 0 -> 1 (fixed) Guarded in test/styles.test.js next to the clearance guards, because this class of bug is invisible to every render test — the HTML is byte-identical whether the button can be seen or not. Mutation-proved: parking the resting opacity back at 0, hoisting the hide out of the hover query, and deleting the query outright each turn the suite red. The two guards #27 added were re-proved in the same run (shrinking the clearance token, removing the print reclaim) to confirm this change does not soften them; the unmutated tree is green before and after. Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
99 lines
2.3 KiB
JSON
99 lines
2.3 KiB
JSON
{
|
|
"name": "bip-kit",
|
|
"version": "0.2.6",
|
|
"description": "Building in Public, as a content contract: parse markdown into typed blocks and render them with a reference React renderer (bip-kit/react) \u2014 blog, roadmap, changelog on your product site, bring your own design tokens.",
|
|
"license": "MIT",
|
|
"author": "Mao Nakamoto",
|
|
"homepage": "https://github.com/bitbaum/bip-kit#readme",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/bitbaum/bip-kit.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/bitbaum/bip-kit/issues"
|
|
},
|
|
"keywords": [
|
|
"build-in-public",
|
|
"blog",
|
|
"roadmap",
|
|
"changelog",
|
|
"markdown",
|
|
"headless",
|
|
"content",
|
|
"nextjs",
|
|
"react",
|
|
"rsc",
|
|
"renderer"
|
|
],
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"packageManager": "pnpm@11.25.0",
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public",
|
|
"provenance": true
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"styles.css"
|
|
],
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./react": {
|
|
"types": "./dist/react/index.d.ts",
|
|
"default": "./dist/react/index.js"
|
|
},
|
|
"./react/mermaid": {
|
|
"types": "./dist/react/mermaid.d.ts",
|
|
"default": "./dist/react/mermaid.js"
|
|
},
|
|
"./styles.css": "./styles.css"
|
|
},
|
|
"scripts": {
|
|
"build": "tsc -p tsconfig.json",
|
|
"lint": "eslint .",
|
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
"test": "node --test test/*.test.js",
|
|
"verify": "pnpm run format:check && pnpm run lint && pnpm run typecheck && pnpm run build && pnpm test",
|
|
"prepare": "pnpm run build",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check ."
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@types/node": "^26.4.0",
|
|
"@types/react": "^19.2.18",
|
|
"eslint": "^10.9.1",
|
|
"globals": "^17.11.0",
|
|
"katex": "^0.18.5",
|
|
"prettier": "^3.9.6",
|
|
"react": "^19.2.8",
|
|
"react-dom": "^19.2.8",
|
|
"shiki": "^4.4.3",
|
|
"typescript": "^6.0.3",
|
|
"typescript-eslint": "^8.68.0"
|
|
},
|
|
"peerDependencies": {
|
|
"react": ">=18",
|
|
"shiki": ">=1",
|
|
"mermaid": ">=10",
|
|
"katex": ">=0.16"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"shiki": {
|
|
"optional": true
|
|
},
|
|
"mermaid": {
|
|
"optional": true
|
|
},
|
|
"katex": {
|
|
"optional": true
|
|
}
|
|
}
|
|
}
|