@tendrilapp/cli 0.1.7 → 0.1.8
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/dist/tendril.js +26 -4
- package/package.json +1 -1
package/dist/tendril.js
CHANGED
|
@@ -1839,6 +1839,7 @@ var init_browser = __esm({
|
|
|
1839
1839
|
|
|
1840
1840
|
// packages/verify/src/runtime.ts
|
|
1841
1841
|
import { existsSync as existsSync4, mkdtempSync, symlinkSync } from "node:fs";
|
|
1842
|
+
import { createRequire } from "node:module";
|
|
1842
1843
|
import os from "node:os";
|
|
1843
1844
|
import path4 from "node:path";
|
|
1844
1845
|
import { fileURLToPath } from "node:url";
|
|
@@ -1870,6 +1871,21 @@ function newScratchDir(prefix) {
|
|
|
1870
1871
|
}
|
|
1871
1872
|
return dir;
|
|
1872
1873
|
}
|
|
1874
|
+
function reactPinPlugin() {
|
|
1875
|
+
const req = createRequire(path4.join(runtimePackageRoot(), "package.json"));
|
|
1876
|
+
return {
|
|
1877
|
+
name: "tendril-react-pin",
|
|
1878
|
+
setup(b) {
|
|
1879
|
+
b.onResolve({ filter: /^react(-dom)?(\/.*)?$/ }, (args) => {
|
|
1880
|
+
try {
|
|
1881
|
+
return { path: req.resolve(args.path) };
|
|
1882
|
+
} catch {
|
|
1883
|
+
return null;
|
|
1884
|
+
}
|
|
1885
|
+
});
|
|
1886
|
+
}
|
|
1887
|
+
};
|
|
1888
|
+
}
|
|
1873
1889
|
var init_runtime = __esm({
|
|
1874
1890
|
"packages/verify/src/runtime.ts"() {
|
|
1875
1891
|
"use strict";
|
|
@@ -3578,6 +3594,7 @@ if (root && C) createRoot(root).render(createElement(C, cfg.props));
|
|
|
3578
3594
|
const bundle = await build3({
|
|
3579
3595
|
stdin: { contents: mountSrc, resolveDir: runtimePackageRoot(), loader: "tsx" },
|
|
3580
3596
|
nodePaths: [runtimeNodeModules()],
|
|
3597
|
+
plugins: [reactPinPlugin()],
|
|
3581
3598
|
bundle: true,
|
|
3582
3599
|
write: false,
|
|
3583
3600
|
format: "iife",
|
|
@@ -4170,6 +4187,7 @@ if (root && C) createRoot(root).render(createElement(C, cfg.props));
|
|
|
4170
4187
|
const bundle = await build4({
|
|
4171
4188
|
stdin: { contents: mountSrc, resolveDir: runtimePackageRoot(), loader: "tsx" },
|
|
4172
4189
|
nodePaths: [runtimeNodeModules()],
|
|
4190
|
+
plugins: [reactPinPlugin()],
|
|
4173
4191
|
bundle: true,
|
|
4174
4192
|
write: false,
|
|
4175
4193
|
format: "iife",
|
|
@@ -4351,7 +4369,7 @@ var init_prelude = __esm({
|
|
|
4351
4369
|
- Component root: -webkit-font-smoothing: antialiased and -moz-osx-font-smoothing: grayscale (recorded rasterization); font-synthesis: none (a missing font weight must fall back visibly, never fake-bold); color-scheme MATCHING YOUR RECORDING (light for a light capture, dark for a dark one) and direction: ltr \u2014 pin them, so the render cannot follow the viewer OS preference and drift from the capture it is graded against; isolation: isolate (own stacking context; overlay z-indexes never fight the host).
|
|
4352
4370
|
- Interactive controls (buttons, options): touch-action: manipulation and user-select: none. Text inputs stay selectable (never user-select: none on them).
|
|
4353
4371
|
- Scrollable popovers/menus: overscroll-behavior: contain.
|
|
4354
|
-
- Focus indicators bind to :focus-visible, never bare :focus. If the recording contains a focus pose, style the indicator from that recorded truth. If NO focus pose is recorded, do NOT invent ring colors/widths/offsets \u2014 an invented ring is unrecorded pixels; keep the browser's default
|
|
4372
|
+
- Focus indicators bind to :focus-visible, never bare :focus. If the recording contains a focus pose, style the indicator from that recorded truth. If NO focus pose is recorded, do NOT invent ring colors/widths/offsets \u2014 an invented ring is unrecorded pixels; keep the browser's default indicator for keyboard focus and state the gap in your report. Text inputs match :focus-visible even on mouse click BY SPEC; the ONE permitted refinement is suppressing the indicator on a POSITIVELY OBSERVED pointer press, fail-safe toward showing it (programmatic focus, restored focus, and assistive tech all count as keyboard and keep the ring \u2014 WCAG 2.4.7 binds keyboard operation). Never suppress more broadly than an observed press, and never restyle what you kept.
|
|
4355
4373
|
- Every animation wrapped in @media (prefers-reduced-motion: no-preference) or disabled under reduce.`;
|
|
4356
4374
|
}
|
|
4357
4375
|
});
|
|
@@ -4466,7 +4484,7 @@ var init_parity = __esm({
|
|
|
4466
4484
|
});
|
|
4467
4485
|
|
|
4468
4486
|
// packages/verify/src/composition.ts
|
|
4469
|
-
import { createRequire } from "node:module";
|
|
4487
|
+
import { createRequire as createRequire2 } from "node:module";
|
|
4470
4488
|
import { existsSync as existsSync12, readFileSync as readFileSync10 } from "node:fs";
|
|
4471
4489
|
import path17 from "node:path";
|
|
4472
4490
|
import { build as build6 } from "esbuild";
|
|
@@ -4478,7 +4496,7 @@ function getFontFaces4() {
|
|
|
4478
4496
|
async function compileInstrumentedMount(task, bundleDir) {
|
|
4479
4497
|
const entryTsx = path17.join(bundleDir, task.entry);
|
|
4480
4498
|
if (!existsSync12(entryTsx)) return { error: `${task.entry} missing` };
|
|
4481
|
-
const requireFromVerify =
|
|
4499
|
+
const requireFromVerify = createRequire2(path17.join(VERIFY_PKG_DIR, "package.json"));
|
|
4482
4500
|
let realJsxPath;
|
|
4483
4501
|
try {
|
|
4484
4502
|
realJsxPath = requireFromVerify.resolve("react/jsx-runtime");
|
|
@@ -4519,7 +4537,10 @@ if (root && Main) createRoot(root).render(createElement(Main, cfg.props));
|
|
|
4519
4537
|
b.onResolve({ filter: new RegExp(`^${REAL_JSX_SPEC}$`) }, () => ({ path: realJsxPath }));
|
|
4520
4538
|
b.onLoad({ filter: /.*/, namespace: "tendril-shim" }, () => ({ contents: JSX_SHIM, resolveDir: runtimePackageRoot(), loader: "js" }));
|
|
4521
4539
|
}
|
|
4522
|
-
}
|
|
4540
|
+
},
|
|
4541
|
+
// AFTER the stamp shim: the shim must own react/jsx-runtime
|
|
4542
|
+
// interception; the pin covers every remaining react import.
|
|
4543
|
+
reactPinPlugin()
|
|
4523
4544
|
]
|
|
4524
4545
|
});
|
|
4525
4546
|
return bundle.outputFiles[0]?.text ?? "";
|
|
@@ -4775,6 +4796,7 @@ for (const id of ["first", "second"]) {
|
|
|
4775
4796
|
const bundle = await build7({
|
|
4776
4797
|
stdin: { contents: src, resolveDir: runtimePackageRoot(), loader: "tsx" },
|
|
4777
4798
|
nodePaths: [runtimeNodeModules()],
|
|
4799
|
+
plugins: [reactPinPlugin()],
|
|
4778
4800
|
bundle: true,
|
|
4779
4801
|
write: false,
|
|
4780
4802
|
format: "iife",
|