@flemo/devtools 0.5.0 → 0.7.0
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 +16 -2
- package/dist/__tests__/swipeProbe.test.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +367 -310
- package/dist/noop.d.ts +4 -0
- package/dist/noop.mjs +2 -2
- package/dist/react.d.ts +31 -0
- package/dist/react.mjs +1635 -0
- package/dist/reactNoop.d.ts +4 -0
- package/dist/reactNoop.mjs +6 -0
- package/dist/swipeProbe.d.ts +52 -0
- package/package.json +28 -10
package/README.md
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
# @flemo/devtools
|
|
2
2
|
|
|
3
|
-
Zero-dependency flight recorder, on-device readout and visual panel for [flemo](https://flemo.dev) transitions. It observes existing `data-flemo-*` surfaces, leftover `flemo:*` keys, CSS animation events, pointer events, `MutationObserver`, `PerformanceObserver("longtask")`, and rAF. It imports neither `@flemo/core` nor `@flemo/react` and does not alter measured motion.
|
|
3
|
+
Zero-dependency flight recorder, on-device readout and visual panel, with a one-element React binding for [flemo](https://flemo.dev) transitions. It observes existing `data-flemo-*` surfaces, leftover `flemo:*` keys, CSS animation events, pointer events, `MutationObserver`, `PerformanceObserver("longtask")`, and rAF. It imports neither `@flemo/core` nor `@flemo/react` and does not alter measured motion.
|
|
4
4
|
|
|
5
5
|
Everything in it is one probe module per question — pacing, motion, images, shared elements, one-frame events, landing residue — behind a small orchestrator. Adding a measurement means adding a probe.
|
|
6
6
|
|
|
7
|
-
## Quickstart
|
|
7
|
+
## Quickstart (React)
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { FlemoDevtools } from "@flemo/devtools/react";
|
|
11
|
+
|
|
12
|
+
<FlemoDevtools />;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
That is the whole wiring. Leave it in the tree and ship it: under the `production` export condition the same specifier resolves to a component that renders null and imports nothing, so the recorder, the panel and the readout never enter a production graph. There is no flag to remember and nothing to strip before a release.
|
|
16
|
+
|
|
17
|
+
Props are `recorder`, `hud` (`true`), `panel` (`true`), `hudPosition` (`"top"`), `panelPosition` (`"bottom-left"`), `initialOpen` (`false`) and `buckets` (`["A", "B"]`). `react` is an optional peer dependency, needed only for this entry.
|
|
18
|
+
|
|
19
|
+
Do not reach for `@flemo/devtools/force` to make the component appear in a production build. The specifier survives whatever guard is wrapped around it, so it puts the real panel back into a public chunk; that is a measured mistake, made twice on this project's own site.
|
|
20
|
+
|
|
21
|
+
## Quickstart (any framework)
|
|
8
22
|
|
|
9
23
|
```ts
|
|
10
24
|
import { attachFlightRecorder } from "@flemo/devtools";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export type { DevtoolsPanelHandle, DevtoolsPanelOptions } from './panel';
|
|
|
10
10
|
export { attachDevtoolsHud } from './hud';
|
|
11
11
|
export type { DevtoolsHudHandle, DevtoolsHudOptions } from './hud';
|
|
12
12
|
export { captureEnvironment, detectEngine, developmentHints, isEmulationSuspected, sampleRafCadence } from './environment';
|
|
13
|
+
export { attachSwipeProbe, SWIPE_PROBE_MS } from './swipeProbe';
|
|
14
|
+
export type { SwipeProbeHandle, SwipeProbeOptions, SwipeReleaseAudit, SwipeSample } from './swipeProbe';
|
|
13
15
|
export { derivePreconditions } from './preconditions';
|
|
14
16
|
export type { PreconditionInput } from './preconditions';
|
|
15
17
|
export { deriveVerdict } from './verdict';
|