paper-snapshot-cli 0.1.1 → 0.1.2
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/bin.mjs +10 -3
- package/package.json +1 -1
package/dist/bin.mjs
CHANGED
|
@@ -37121,11 +37121,14 @@ const fixColspans = (page) => step$1("colspans", () => page.evaluate(() => {
|
|
|
37121
37121
|
const tableWidth = table.getBoundingClientRect().width;
|
|
37122
37122
|
const rowWidths = rows.map((row) => row.getBoundingClientRect().width);
|
|
37123
37123
|
const cellWidths = rows.map((row) => [...row.cells].map((cell) => cell.getBoundingClientRect().width));
|
|
37124
|
+
const inlines = rows.flatMap((row) => [...row.cells]).flatMap((cell) => [...cell.children]).filter((child) => child instanceof HTMLElement && getComputedStyle(child).display.startsWith("inline"));
|
|
37125
|
+
const inlineWidths = inlines.map((child) => child.getBoundingClientRect().width);
|
|
37124
37126
|
const touched = [
|
|
37125
37127
|
table,
|
|
37126
37128
|
...sections,
|
|
37127
37129
|
...rows,
|
|
37128
|
-
...rows.flatMap((row) => [...row.cells])
|
|
37130
|
+
...rows.flatMap((row) => [...row.cells]),
|
|
37131
|
+
...inlines
|
|
37129
37132
|
];
|
|
37130
37133
|
const before = touched.map((element) => element.getAttribute("style"));
|
|
37131
37134
|
log.push(() => touched.forEach((element, index) => {
|
|
@@ -37151,6 +37154,10 @@ const fixColspans = (page) => step$1("colspans", () => page.evaluate(() => {
|
|
|
37151
37154
|
cell.style.setProperty("width", `${cellWidths[rowIndex]?.[cellIndex] ?? 0}px`);
|
|
37152
37155
|
});
|
|
37153
37156
|
});
|
|
37157
|
+
inlines.forEach((child, index) => {
|
|
37158
|
+
if (getComputedStyle(child).display === "inline") child.style.setProperty("display", "inline-block");
|
|
37159
|
+
child.style.setProperty("width", `${inlineWidths[index] ?? 0}px`);
|
|
37160
|
+
});
|
|
37154
37161
|
}
|
|
37155
37162
|
return tables.size;
|
|
37156
37163
|
})).pipe(flatMap$1(decodeAt$1("colspans", Finite$3)));
|
|
@@ -54760,7 +54767,7 @@ const NodeInfo = fromJsonString(Struct({
|
|
|
54760
54767
|
const layer = succeed$3(Service, Service.of({ connect: fn("Paper.connect")(function* (settings) {
|
|
54761
54768
|
const client = new Client({
|
|
54762
54769
|
name: "paper-snapshot",
|
|
54763
|
-
version: "0.1.
|
|
54770
|
+
version: "0.1.2"
|
|
54764
54771
|
});
|
|
54765
54772
|
yield* acquireRelease(tryPromise({
|
|
54766
54773
|
try: () => client.connect(new StdioClientTransport({
|
|
@@ -55415,7 +55422,7 @@ const command = make$3("paper-snapshot", flags, run).pipe(withDescription("Snaps
|
|
|
55415
55422
|
//#region src/bin.ts
|
|
55416
55423
|
const LoggerLive = mergeAll(layer$4([consolePretty()]), succeed$3(LogToStderr, true));
|
|
55417
55424
|
const MainLive = mergeAll(layer$2, layer$1.pipe(provide$2(layer$3)), layer).pipe(provideMerge(layer$5), provideMerge(LoggerLive));
|
|
55418
|
-
run$1(command, { version: "0.1.
|
|
55425
|
+
run$1(command, { version: "0.1.2" }).pipe(tapError((error) => isCliError(error) ? void_ : error$1(`paper-snapshot: ${error.message}`)), tapDefect((defect) => error$1(`paper-snapshot: unexpected error: ${defect instanceof Error ? defect.stack ?? defect.message : String(defect)}`)), provide(MainLive), runMain({
|
|
55419
55426
|
disableErrorReporting: true,
|
|
55420
55427
|
teardown: (exit, onExit) => defaultTeardown(exit, (code) => {
|
|
55421
55428
|
onExit(code);
|
package/package.json
CHANGED