Poster wall: a sheet larger than letter prints at its own size, photos or not
PosterWall printed a generated sheet as its own sized document only when the sheet carried photos, so a large sheet without any (a 36x60 never has them; a 60x96 can come back without) was rasterised and shrunk onto a letter page. poster-raster.js largerThanLetter() reads the sheet's own @page size, and a print of such a sheet now goes to printSheetDocument too. Letter, the packet page and the 3in sheets keep their raster route; the photo route is unchanged. check:wall-large-print holds every poster-render format to it from the source (side-lane sheets print as documents, every other format keeps its route) and pins the wall's route; its self-test poisons a helper that never fires, one that fires on any @page, the wrong letter size, a missing route, a route that catches downloads, and a missing import.
This commit is contained in:
parent
6d89e6b8ce
commit
841123dd54
4 changed files with 126 additions and 4 deletions
97
internal/check-wall-large-print.mjs
Normal file
97
internal/check-wall-large-print.mjs
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
#!/usr/bin/env node
|
||||
/**
|
||||
* check-wall-large-print.mjs — a printed sheet LARGER THAN LETTER prints as its own document, photos or not.
|
||||
*
|
||||
* PosterWall prints a generated sheet. It used to print a sheet as its own sized document only when the sheet carried
|
||||
* photos (hasExternalImages), so a large sheet with none (a 36x60 never has photos; a 60x96 can come back without)
|
||||
* was rasterised and shrunk onto a letter page instead of printing at its own @page. poster-raster.js
|
||||
* largerThanLetter() reads the sheet's own @page size, and PosterWall routes a print of such a sheet to
|
||||
* printSheetDocument. Letter and smaller sheets keep the raster route they had.
|
||||
* A. every poster-render format (FORMATS, read from the source): largerThanLetter() is true for exactly the
|
||||
* side-lane formats (the large sheets) and false for every other one (letter, packet, 3x4, 3x3), so existing
|
||||
* prints keep their route and a new large format is held to the rule with no list to update;
|
||||
* B. edges: letter either way round, no @page and a non-inch page stay on the raster route; 11x17 does not;
|
||||
* C. PosterWall's generated-sheet branch sends a PRINT of a larger-than-letter sheet to printSheetDocument before
|
||||
* it rasterises, imports the helper, and keeps the photo route as it was.
|
||||
* `--self-test`: a helper that never fires, one that fires on any @page, one with the wrong letter size, a wall
|
||||
* without the route, a route that also catches downloads, and a wall that does not import the helper must each FAIL.
|
||||
*/
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { join, dirname } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..')
|
||||
const RASTER = join(ROOT, 'library/packet/poster-raster.js')
|
||||
const WALL = join(ROOT, 'library/components/poster/PosterWall.vue')
|
||||
const RENDER = join(ROOT, 'library/packet/poster-render.js')
|
||||
const asModule = (src) => import('data:text/javascript;base64,' + Buffer.from(src).toString('base64'))
|
||||
|
||||
// the CSS poster-render emits for a sheet's page, so the fixtures carry what a real sheet carries
|
||||
const EMITS = '@page{size:${FMT.page};margin:0}'
|
||||
const sheetWith = (page) => `<!DOCTYPE html><html><head><style>${EMITS.replace('${FMT.page}', page)}</style></head><body><svg></svg></body></html>`
|
||||
|
||||
function formats(renderSrc) {
|
||||
const out = []
|
||||
const rx = /^\s*('[\w]+'|[A-Za-z_]\w*)\s*:\s*\{([^\n]*?\bpage:\s*'([^']+)'[^\n]*)\}\s*,?\s*$/gm
|
||||
for (let m; (m = rx.exec(renderSrc));) out.push({ name: m[1].replace(/'/g, ''), page: m[3], large: /\bsideLanes:\s*true\b/.test(m[2]) })
|
||||
return out
|
||||
}
|
||||
|
||||
async function audit(rasterSrc, wallSrc, renderSrc) {
|
||||
const fails = []
|
||||
const { largerThanLetter } = await asModule(rasterSrc)
|
||||
if (typeof largerThanLetter !== 'function') return ['A: poster-raster.js exports no largerThanLetter()']
|
||||
// A
|
||||
if (!renderSrc.includes(EMITS)) fails.push(`A: poster-render.js no longer emits ${EMITS}; the fixtures would not be what a sheet carries`)
|
||||
const fm = formats(renderSrc)
|
||||
const large = fm.filter((f) => f.large), small = fm.filter((f) => !f.large)
|
||||
if (large.length < 3 || small.length < 4) fails.push(`A: read ${large.length} side-lane and ${small.length} other formats from poster-render.js (expected at least 3 and 4; a vacuous run)`)
|
||||
for (const f of fm) {
|
||||
const got = largerThanLetter(sheetWith(f.page))
|
||||
if (f.large && !got) fails.push(`A: the ${f.name} sheet (@page ${f.page}) is not larger than letter, so a print of it without photos is shrunk onto letter`)
|
||||
if (!f.large && got) fails.push(`A: the ${f.name} sheet (@page ${f.page}) now prints as a document; its print must keep the raster route it had`)
|
||||
}
|
||||
// B
|
||||
for (const [page, want] of [['8.5in 11in', false], ['11in 8.5in', false], ['11in 17in', true], ['210mm 297mm', false]]) {
|
||||
if (largerThanLetter(sheetWith(page)) !== want) fails.push(`B: @page ${page} should ${want ? '' : 'not '}count as larger than letter`)
|
||||
}
|
||||
if (largerThanLetter('<svg></svg>') !== false || largerThanLetter('') !== false) fails.push('B: a sheet with no @page counts as larger than letter')
|
||||
// C
|
||||
const branch = (wallSrc.match(/if \(props\.sheet\) \{[\s\S]*?rasterPoster\(html/) || [''])[0]
|
||||
if (!branch) fails.push('C: PosterWall has no generated-sheet branch that rasterises (props.sheet … rasterPoster(html))')
|
||||
else {
|
||||
if (!/if \(props\.posterAction === 'print' && largerThanLetter\(html\)\) \{ await printSheetDocument\(html\); return \}/.test(branch)) fails.push('C: PosterWall does not print a larger-than-letter sheet as its own document before rasterising it')
|
||||
if (!/const \{[^}]*\blargerThanLetter\b[^}]*\} = await import\('@map\/packet\/poster-raster\.js'\)/.test(branch)) fails.push('C: PosterWall does not import largerThanLetter from poster-raster.js')
|
||||
if (!branch.includes("if (props.posterAction === 'print' && hasExternalImages(html)) { await printSheetDocument(html); return }")) fails.push('C: the photo route (a sheet with photos prints as a document) changed')
|
||||
}
|
||||
return fails
|
||||
}
|
||||
|
||||
const rasterSrc = readFileSync(RASTER, 'utf8'), wallSrc = readFileSync(WALL, 'utf8'), renderSrc = readFileSync(RENDER, 'utf8')
|
||||
if (process.argv.includes('--self-test')) {
|
||||
const BODY = 'return short > 8.5 || long > 11;'
|
||||
const ROUTE = "if (props.posterAction === 'print' && largerThanLetter(html)) { await printSheetDocument(html); return }"
|
||||
const poisons = [
|
||||
['a helper that never fires (the gap is back)', rasterSrc.replace(BODY, 'return false;'), wallSrc, /^A: the (60x96|66x66|36x60) /],
|
||||
['a helper that fires on any @page', rasterSrc.replace(BODY, 'return true;'), wallSrc, /^A: the (letter|packet|3x4|3x3) /],
|
||||
['the wrong letter size', rasterSrc.replace(BODY, 'return short > 85 || long > 110;'), wallSrc, /^A: the (60x96|66x66|36x60) /],
|
||||
['a wall without the route', rasterSrc, wallSrc.replace(ROUTE, ''), /^C: PosterWall does not print/],
|
||||
['a route that also catches downloads', rasterSrc, wallSrc.replace(ROUTE, ROUTE.replace("props.posterAction === 'print' && ", '')), /^C: PosterWall does not print/],
|
||||
['a wall that does not import the helper', rasterSrc, wallSrc.replace('hasExternalImages, largerThanLetter }', 'hasExternalImages }'), /^C: PosterWall does not import/],
|
||||
]
|
||||
let missed = 0
|
||||
for (const [name, r, w, rx] of poisons) {
|
||||
if (r === rasterSrc && w === wallSrc) { console.log(`NOT MEASURED: the poison anchor for "${name}" moved`); process.exitCode = 75; continue }
|
||||
const f = await audit(r, w, renderSrc); const hit = f.find((x) => rx.test(x))
|
||||
console.log(hit ? `✓ caught: ${name} -> ${hit}` : `✗ MISSED: ${name}`)
|
||||
if (!hit) missed++
|
||||
}
|
||||
if (missed) process.exitCode = 1
|
||||
} else {
|
||||
const f = await audit(rasterSrc, wallSrc, renderSrc)
|
||||
if (f.length) { for (const x of f) console.log('✗ ' + x); console.log(`FAIL check:wall-large-print (${f.length})`); process.exitCode = 1 }
|
||||
else {
|
||||
const fm = formats(renderSrc)
|
||||
console.log(`PASS check:wall-large-print — a print of a sheet larger than letter goes to its own document, photos or not (${fm.filter((x) => x.large).map((x) => x.name).join(', ')}); ${fm.filter((x) => !x.large).map((x) => x.name).join(', ')} keep their raster route; the photo route is unchanged`)
|
||||
}
|
||||
}
|
||||
|
|
@ -578,11 +578,14 @@ async function exportPoster(item) {
|
|||
const format = props.posterAction === 'print' ? 'letter' : (item.sheet === '3x3' ? '3x3' : '3x4')
|
||||
const html = await Promise.resolve().then(() => props.sheet(item, format)).catch(() => '')
|
||||
if (html) {
|
||||
const { rasterPoster, looksRendered, hasExternalImages } = await import('@map/packet/poster-raster.js')
|
||||
const { rasterPoster, looksRendered, hasExternalImages, largerThanLetter } = await import('@map/packet/poster-raster.js')
|
||||
// ★ A SHEET WITH PHOTOS PRINTS AS ITS OWN DOCUMENT (the large side-lane sheets): a raster cannot carry a
|
||||
// photo from its own host (poster-raster.js says why), and the sheet's own @page is its true size
|
||||
// (60in 96in), where an image of it would be shrunk onto letter. A download still rasterises, without them.
|
||||
if (props.posterAction === 'print' && hasExternalImages(html)) { await printSheetDocument(html); return }
|
||||
// ★ SO DOES ANY SHEET LARGER THAN LETTER, photos or not (a 36x60 carries none; a 60x96 can come back without):
|
||||
// printed as an image it would be shrunk onto letter too. Letter and smaller sheets rasterise as before.
|
||||
if (props.posterAction === 'print' && largerThanLetter(html)) { await printSheetDocument(html); return }
|
||||
const blob = await rasterPoster(html, { scale: 2 })
|
||||
if (await looksRendered(blob)) { await deliverPoster(blob, item); return }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,25 @@ const EXTERNAL_IMAGE = /<image\b[^>]*?\bhref="(?!data:)[^"]*"[^>]*?\/>/g;
|
|||
export function hasExternalImages(posterHtml) { return /<image\b[^>]*?\bhref="(?!data:)/.test(posterHtml || ''); }
|
||||
export function stripExternalImages(svg) { return svg.replace(EXTERNAL_IMAGE, ''); }
|
||||
|
||||
/**
|
||||
* ★ A SHEET LARGER THAN LETTER PRINTS AS ITS OWN DOCUMENT TOO, photos or not. Its @page is its true size (the large
|
||||
* side-lane sheets: 60in 96in, 66in 66in, 36in 60in); a raster of it would be wrapped onto a letter page and shrunk to
|
||||
* fit. Read from the sheet's own @page{size:<w>in <h>in}, so a new large format needs no list here. Letter ('letter
|
||||
* portrait'), the packet page and the 3in sheets are not larger, so they rasterise exactly as before.
|
||||
* check:wall-large-print holds every poster-render format to this.
|
||||
*/
|
||||
const PAGE_INCHES = /@page\s*\{[^}]*?\bsize\s*:\s*([\d.]+)in\s+([\d.]+)in/;
|
||||
export function sheetPageInches(posterHtml) {
|
||||
const m = PAGE_INCHES.exec(posterHtml || '');
|
||||
return m ? [parseFloat(m[1]), parseFloat(m[2])] : null;
|
||||
}
|
||||
export function largerThanLetter(posterHtml) {
|
||||
const p = sheetPageInches(posterHtml);
|
||||
if (!p) return false;
|
||||
const [short, long] = p[0] <= p[1] ? p : [p[1], p[0]];
|
||||
return short > 8.5 || long > 11;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rasterise a poster to a Blob in the browser.
|
||||
* @param {string} posterHtml the poster document (posters/<id>.html)
|
||||
|
|
|
|||
|
|
@ -354,8 +354,8 @@
|
|||
"dev": "bun x vite",
|
||||
"fix:sri": "node internal/fix-sri.mjs",
|
||||
"gallery": "node internal/generate-gallery.mjs",
|
||||
"gates:post": "node internal/run-parallel.mjs --label=post -- check:capability-derived check:drop check:parse verify check:sri check:public-hygiene check:label-joins check:facet-cascade check:facet-one-field check:heartbeat check:kpi-unit check:composite-reg check:descriptions check:no-abs-paths check:no-codename check:dep-names check:composite-srcs check:embed-targets check:nested-token check:i18n-parity check:tabs-localized check:packets-all check:packet-strings-parity check:zone-census check:zoning-declared check:share-policy check:library-index check:csv-shape check:capability-citations check:catalog-identity check:no-orphan-gates check:quoted-scripts check:script-flags check:capability-exemplars check:packet-fixture check:packet-browser check:provider-switch check:locale-reachable check:url-resolver check:manifest-covers check:one-palette check:pin-dim-slider check:legend-source check:clustering-modes check:composite-embed-knobs check:composite-locale-leaks check:linked-vocabulary check:wp-embed check:dashboard-geocoder-provider check:leaf-engine-per-provider check:auto-engine check:engine-contract check:map-props-unit check:composites-mount check:composite-interop check:no-free-identifiers check:map-fly-reduced-motion check:mst-clustering check:list-prop-unit check:profiles-mount check:cdn-pins check:no-eval check:popup-escaping check:i18n-treeshake check:pinned-umd check:one-palette:self-test check:no-cross-plugin-imports check:no-cross-plugin-imports:self-test check:map-attribution check:studio-rail check:approx-pin-note check:embedder-keys check:provider-for check:legend-logical-insets check:legend-logical-insets:self-test check:optional-t-equivalence check:text-highlight check:religion-label-not-value check:i18n-stopped-scope check:no-silent-engine check:no-silent-engine:self-test check:regions-uses-library check:shadow-css-parses check:square-map-controls check:preset-config-merge check:instance-config-keys check:frozen-labels check:plural-forms check:region-fill-repaint check:region-paint-single-source check:poster-print-fallback check:posters-exportable check:country-names check:reduced-motion check:no-dead-library check:universal-props check:readme-size check:tree-relative check:leaf-hints check:snippet-engine check:snippet-engine:self-test check:embed-base check:link-coverage check:no-public-binds check:shared-reached check:tree-weight check:no-fleet-names:self-test check:pin-hint-floor:self-test check:poster-sizes:self-test check:shell-header:self-test check:preview-flag-dev-only:self-test check:poster-type-registry:self-test check:host-floor:self-test",
|
||||
"gates:pre": "node internal/run-parallel.mjs --label=pre -- check:template-literal check:mjs-parse check:sfc-parse check:tab-radius check:synced-css check:doc-scripts check:setup-order check:package-json-unique-keys check:no-repo-pb-hooks check:no-credentials-omit check:no-credentials-omit:self-test check:shadow-reduced-motion check:poster-action-print check:targets check:targets:self-test check:browser-gates-guarded check:pin-selection check:facet-shape check:hardcoded-english:self-test check:list-selection check:selector-fields check:upg-zone-joins check:gospel-set-charts check:gospel-set-fit check:describe-group check:one-scroll-container check:packet-charts check:pins-in-state check:composite-token-url check:language-tree-layout check:i18n-keys-exist check:i18n-never-translated check:packet-variants check:profile-table check:element-bootstrap check:embed-url-absolute check:frame-target check:language-tree-model check:map-menu-anchor check:selection-kinds check:tiered-points check:whiteboard-projection check:mercator-slice check:ring-vocabulary check:map-props-unit check:mobile-gating check:provide-shadowing check:legend-top-offset check:cdn-cache check:plural-forms check:select-zone-race check:script-registry check:map-control-overlap check:poster-attribution check:board-map-options check:gospel-whiteboard check:packet-map-missing-loud check:poster-layout-optin check:ported-globals-identical check:ring-bands check:packet-a1-structure check:india-states check:batch-selection-export check:zone-title-tier-a check:evangelical-share check:map-labels check:packet-offline check:help-reachable check:gated-not-in-tree check:window-globals-released check:legend-data-contract check:no-internal-role-nouns check:poster-fetch-guard check:people-group-records check:sentence-slots check:popup-href-escaped check:popup-pan-controls check:country-map-refetch check:pane-config-reforward check:viewport-meta check:viewport-meta:self-test check:label-key-coverage check:poster-browser-equiv check:poster-render-pinned check:country-sheet-one-path check:country-sheet-one-path:self-test check:side-lanes check:side-lanes:self-test check:poster-section check:poster-section:self-test check:posterverse-shelf check:host-locale-fetch check:print-frame-reclaim check:click-sheet check:coverage-consistent:chained check:coverage-consistent:poison check:dashboard-filter-a11y check:filter-multivalue check:hover-channel check:kit-options-reachable check:layout-key-namespaced check:legend-mirrors check:map-unmount-race check:no-conflict-markers check:series-isolation check:snapshot-guard check:stale-sweep-claim check:surfaces-read-the-tier check:translator-contacts check:wall-wysiwyg check:wall-print-watch check:wall-no-bg-photos check:wall-pan check:template-i18n check:list-pattern-doc check:shadow-style-labels-unique check:grid-image-loading check:retry-fetch check:panel-sheets check:poster-wall-host-seams check:poster-sections check:poster-sections:self-test check:poster-design-catalogue check:poster-design-catalogue:self-test check:wall-photo-weight check:no-fleet-names check:pin-hint-floor check:poster-sizes check:upg-count check:shell-header check:pg-name-gate check:preview-flag-dev-only check:poster-type-registry check:host-floor",
|
||||
"gates:post": "node internal/run-parallel.mjs --label=post -- check:capability-derived check:drop check:parse verify check:sri check:public-hygiene check:label-joins check:facet-cascade check:facet-one-field check:heartbeat check:kpi-unit check:composite-reg check:descriptions check:no-abs-paths check:no-codename check:dep-names check:composite-srcs check:embed-targets check:nested-token check:i18n-parity check:tabs-localized check:packets-all check:packet-strings-parity check:zone-census check:zoning-declared check:share-policy check:library-index check:csv-shape check:capability-citations check:catalog-identity check:no-orphan-gates check:quoted-scripts check:script-flags check:capability-exemplars check:packet-fixture check:packet-browser check:provider-switch check:locale-reachable check:url-resolver check:manifest-covers check:one-palette check:pin-dim-slider check:legend-source check:clustering-modes check:composite-embed-knobs check:composite-locale-leaks check:linked-vocabulary check:wp-embed check:dashboard-geocoder-provider check:leaf-engine-per-provider check:auto-engine check:engine-contract check:map-props-unit check:composites-mount check:composite-interop check:no-free-identifiers check:map-fly-reduced-motion check:mst-clustering check:list-prop-unit check:profiles-mount check:cdn-pins check:no-eval check:popup-escaping check:i18n-treeshake check:pinned-umd check:one-palette:self-test check:no-cross-plugin-imports check:no-cross-plugin-imports:self-test check:map-attribution check:studio-rail check:approx-pin-note check:embedder-keys check:provider-for check:legend-logical-insets check:legend-logical-insets:self-test check:optional-t-equivalence check:text-highlight check:religion-label-not-value check:i18n-stopped-scope check:no-silent-engine check:no-silent-engine:self-test check:regions-uses-library check:shadow-css-parses check:square-map-controls check:preset-config-merge check:instance-config-keys check:frozen-labels check:plural-forms check:region-fill-repaint check:region-paint-single-source check:poster-print-fallback check:posters-exportable check:country-names check:reduced-motion check:no-dead-library check:universal-props check:readme-size check:tree-relative check:leaf-hints check:snippet-engine check:snippet-engine:self-test check:embed-base check:link-coverage check:no-public-binds check:shared-reached check:tree-weight check:no-fleet-names:self-test check:pin-hint-floor:self-test check:poster-sizes:self-test check:shell-header:self-test check:preview-flag-dev-only:self-test check:poster-type-registry:self-test check:host-floor:self-test check:wall-large-print:self-test",
|
||||
"gates:pre": "node internal/run-parallel.mjs --label=pre -- check:template-literal check:mjs-parse check:sfc-parse check:tab-radius check:synced-css check:doc-scripts check:setup-order check:package-json-unique-keys check:no-repo-pb-hooks check:no-credentials-omit check:no-credentials-omit:self-test check:shadow-reduced-motion check:poster-action-print check:targets check:targets:self-test check:browser-gates-guarded check:pin-selection check:facet-shape check:hardcoded-english:self-test check:list-selection check:selector-fields check:upg-zone-joins check:gospel-set-charts check:gospel-set-fit check:describe-group check:one-scroll-container check:packet-charts check:pins-in-state check:composite-token-url check:language-tree-layout check:i18n-keys-exist check:i18n-never-translated check:packet-variants check:profile-table check:element-bootstrap check:embed-url-absolute check:frame-target check:language-tree-model check:map-menu-anchor check:selection-kinds check:tiered-points check:whiteboard-projection check:mercator-slice check:ring-vocabulary check:map-props-unit check:mobile-gating check:provide-shadowing check:legend-top-offset check:cdn-cache check:plural-forms check:select-zone-race check:script-registry check:map-control-overlap check:poster-attribution check:board-map-options check:gospel-whiteboard check:packet-map-missing-loud check:poster-layout-optin check:ported-globals-identical check:ring-bands check:packet-a1-structure check:india-states check:batch-selection-export check:zone-title-tier-a check:evangelical-share check:map-labels check:packet-offline check:help-reachable check:gated-not-in-tree check:window-globals-released check:legend-data-contract check:no-internal-role-nouns check:poster-fetch-guard check:people-group-records check:sentence-slots check:popup-href-escaped check:popup-pan-controls check:country-map-refetch check:pane-config-reforward check:viewport-meta check:viewport-meta:self-test check:label-key-coverage check:poster-browser-equiv check:poster-render-pinned check:country-sheet-one-path check:country-sheet-one-path:self-test check:side-lanes check:side-lanes:self-test check:poster-section check:poster-section:self-test check:posterverse-shelf check:host-locale-fetch check:print-frame-reclaim check:click-sheet check:coverage-consistent:chained check:coverage-consistent:poison check:dashboard-filter-a11y check:filter-multivalue check:hover-channel check:kit-options-reachable check:layout-key-namespaced check:legend-mirrors check:map-unmount-race check:no-conflict-markers check:series-isolation check:snapshot-guard check:stale-sweep-claim check:surfaces-read-the-tier check:translator-contacts check:wall-wysiwyg check:wall-print-watch check:wall-no-bg-photos check:wall-pan check:template-i18n check:list-pattern-doc check:shadow-style-labels-unique check:grid-image-loading check:retry-fetch check:panel-sheets check:poster-wall-host-seams check:poster-sections check:poster-sections:self-test check:poster-design-catalogue check:poster-design-catalogue:self-test check:wall-photo-weight check:no-fleet-names check:pin-hint-floor check:poster-sizes check:upg-count check:shell-header check:pg-name-gate check:preview-flag-dev-only check:poster-type-registry check:host-floor check:wall-large-print",
|
||||
"gen:iso3-to-alpha2": "node library/scripts/generate-iso3-to-alpha2.mjs",
|
||||
"internet:adm1": "node plugin-designs/cities-internet/scripts/build-adm1-internet.mjs",
|
||||
"library-index": "node internal/generate-library-index.mjs",
|
||||
|
|
@ -432,7 +432,9 @@
|
|||
"check:poster-type-registry": "node internal/check-poster-type-registry.mjs",
|
||||
"check:poster-type-registry:self-test": "node internal/check-poster-type-registry.mjs --self-test",
|
||||
"check:host-floor": "node internal/check-host-floor.mjs",
|
||||
"check:host-floor:self-test": "node internal/check-host-floor.mjs --self-test"
|
||||
"check:host-floor:self-test": "node internal/check-host-floor.mjs --self-test",
|
||||
"check:wall-large-print": "node internal/check-wall-large-print.mjs",
|
||||
"check:wall-large-print:self-test": "node internal/check-wall-large-print.mjs --self-test"
|
||||
},
|
||||
"//scripts": {
|
||||
"_": "What each script does. These notes used to sit inside the command strings as trailing \"# …\" comments, which made the shell discard any arguments passed after \"--\" (so a gate given --url silently measured its hardcoded default port — possibly another agent's server). Keep notes here, never in a command.",
|
||||
|
|
@ -711,6 +713,7 @@
|
|||
"check:side-lane-photo-pixels": "BROWSER gate (browser seat; elsewhere 75 NOT MEASURED): the 60x96 side-lane sheet rasterised by poster-raster.js, measured in pixels at every photo slot. A data: photo draws; every photo on its own host stays flat, never the broken-image glyph an external <image> rasterises as.",
|
||||
"check:side-lane-photo-pixels:self-test": "the same raster WITHOUT stripExternalImages must leave the external photo slots NOT flat (the glyph), else the gate proves nothing.",
|
||||
"check:host-floor": "the profile floor (min-height 100svh) is decided against the HOST without disturbing live content (library/elements/hostFloor.js, used by ProfileLoader): measured ONCE at mount; after that host resizes never write the loader's min-height nor move a scrolled child's scrollTop (the regression: a per-resize probe reset the embedded UPG-100 app from Map to its first view); a sized host is filled; a host sized after mount flips once; a max-height cap never loops; a collapsed host gets the floor back; an inline host is left alone. Stub DOM, headless. Run the `check:host-floor:self-test` script for the NEGATIVE test (the old per-resize probe and a missing latch).",
|
||||
"check:wall-large-print": "a printed sheet LARGER THAN LETTER prints as its own sized document, photos or not (library/packet/poster-raster.js largerThanLetter, read from the sheet's own @page; PosterWall routes a print of such a sheet to printSheetDocument). Every poster-render format is held to it from the source: the side-lane sheets (60x96, 66x66, 36x60) print as documents, letter / packet / 3x4 / 3x3 keep their raster route, and the photo route is unchanged. Self-test poisons: a helper that never fires, one that fires on any @page, the wrong letter size, a wall without the route, a route that catches downloads, a missing import.",
|
||||
"check:poster-type-registry": "the poster type registry is ONE per page: every bundle inlines its own copy of posterTypes.js and <dxm-poster-section> is defined by whichever bundle loads first, so with two independent copies loaded side by side a type registered through one is found through the other; the built-in country is listed once; a name registered twice keeps the first; every registration is announced on window (dxm-poster-type-registered) and PosterSectionView re-resolves on it. Run the `check:poster-type-registry:self-test` script for the NEGATIVE test (a per-bundle registry fails)."
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue