@justai/cuts 0.105.0 → 0.107.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/package.json +1 -1
- package/src/BackToZone.astro +25 -9
- package/src/Catalogue.astro +19 -2
package/package.json
CHANGED
package/src/BackToZone.astro
CHANGED
|
@@ -48,17 +48,30 @@ interface Props {
|
|
|
48
48
|
}
|
|
49
49
|
const { apex = "app.zone" } = Astro.props;
|
|
50
50
|
const href = `https://${apex}`;
|
|
51
|
-
---
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
// queries: the home mark is missing arms · three of four arms gone · a4 arm · azmark broken ·
|
|
53
|
+
// the toolbar mark measures 12px · BackToZone ternary
|
|
54
|
+
//
|
|
55
|
+
// ── THE TWO MARKS ARE HTML, NOT JSX BRANCHES, AND THAT IS A SCAR ────────────────────────────
|
|
56
|
+
//
|
|
57
|
+
// This was `{apex === "pin.games" ? (<svg…/>) : (<svg…/>)}` for four versions, and it silently
|
|
58
|
+
// dropped THREE OF THE FOUR PATHS in app.zone's mark. The surviving one came out with its classes
|
|
59
|
+
// reordered — `a4 arm` where the source says `arm a1` — which is the tell: the compiler was not
|
|
60
|
+
// carrying the multi-child branch through intact.
|
|
61
|
+
//
|
|
62
|
+
// Nothing errored. The build was green, the mark still drew SOMETHING, and the only instrument that
|
|
63
|
+
// caught it was the shell's "every icon puts 20px of ink on screen" spec, which measured 12.1px on
|
|
64
|
+
// the canary. Every app.zone persona that upgraded past 0.103.0 was serving a quarter of its home
|
|
65
|
+
// mark.
|
|
66
|
+
//
|
|
67
|
+
// Strings and `set:html` are what the kernel already uses for `toolbarMark`, so this is the file
|
|
68
|
+
// agreeing with the rest of the family rather than a workaround.
|
|
69
|
+
const PG_MARK = `<svg class="pgmark" viewBox="287 266 482 491" aria-hidden="true">
|
|
56
70
|
<rect class="arm a1" x="130" y="469" width="400" height="86" rx="43" transform="rotate(90 330 512)"/>
|
|
57
71
|
<rect class="arm a2" x="317.3" y="363" width="455.5" height="86" rx="43" transform="rotate(26.25 545 406)"/>
|
|
58
72
|
<rect class="arm a3" x="317.3" y="575" width="455.5" height="86" rx="43" transform="rotate(-26.25 545 618)"/>
|
|
59
|
-
</svg
|
|
60
|
-
|
|
61
|
-
<svg class="azmark" viewBox="-8.5 0 928 928" aria-hidden="true">
|
|
73
|
+
</svg>`;
|
|
74
|
+
const AZ_MARK = `<svg class="azmark" viewBox="-8.5 0 928 928" aria-hidden="true">
|
|
62
75
|
<path class="arm a4" d="M360.365 928.009C372.599 928.009 382.517 918.092 382.517 905.857V830.254C382.517 818.02 372.599 808.102 360.365 808.102L203.398 808.102C157.082 808.102 119.537 770.556 119.537 724.241L119.537 574.369C119.537 557.765 106.077 544.305 89.4732 544.305H22.152C9.91778 544.305 0 554.223 0 566.457L0 752.376C0 849.376 78.6338 928.009 175.634 928.009L360.365 928.009Z"/>
|
|
63
76
|
<rect class="ctr" x="348.103" y="367.09" width="203.323" height="203.323" rx="16.614"/>
|
|
64
77
|
<defs>
|
|
@@ -67,8 +80,11 @@ const href = `https://${apex}`;
|
|
|
67
80
|
<linearGradient id="azHome3" x1="425.634" y1="1029.67" x2="904.671" y2="550.635" gradientUnits="userSpaceOnUse"><stop stop-color="#F8C24A"/><stop offset="1" stop-color="#EFA229"/></linearGradient>
|
|
68
81
|
<linearGradient id="azHome4" x1="450.555" y1="993.674" x2="6.32921" y2="550.635" gradientUnits="userSpaceOnUse"><stop stop-color="#5285DC"/><stop offset="1" stop-color="#2E62C6"/></linearGradient>
|
|
69
82
|
</defs>
|
|
70
|
-
</svg
|
|
71
|
-
|
|
83
|
+
</svg>`;
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
<a class="home" href={href} data-home aria-label={apex} title={apex}>
|
|
87
|
+
<Fragment set:html={apex === "pin.games" ? PG_MARK : AZ_MARK} />
|
|
72
88
|
</a>
|
|
73
89
|
|
|
74
90
|
<style>
|
package/src/Catalogue.astro
CHANGED
|
@@ -210,6 +210,17 @@ const isNew = (added: string): boolean => { const t0 = Date.parse(added || "");
|
|
|
210
210
|
<section class="grid" id="grid" data-kind={kind} data-apex={apexHost} data-new-label={strings.new} data-cat-map={JSON.stringify(catLabels)} data-order={JSON.stringify(order)} data-taglines={JSON.stringify(taglines)}>
|
|
211
211
|
{seed.map((app) => <CatalogueCard app={app} name={appName(app)} desc={appDesc(app)} isNew={isNew(app.added)} newLabel={strings.new} />)}
|
|
212
212
|
</section>
|
|
213
|
+
{/* queries: runtime cards are unstyled · the card has no CSS · an apex with no seed · scope cid ·
|
|
214
|
+
data-astro-cid · pin.games cards render as blue links
|
|
215
|
+
THE SCOPE, CARRIED IN AN INERT CARD. Cards appended at runtime are built as plain strings, so
|
|
216
|
+
they sit outside CatalogueCard's scoped CSS and have to be stamped with its `data-astro-cid-*`
|
|
217
|
+
by hand. That attribute was read off a SEEDED card — which works on any apex that ships a seed,
|
|
218
|
+
and fails completely on one that does not: pin.games opened with its only game rendered as bare
|
|
219
|
+
blue underlined links, because there was no card to read the scope from.
|
|
220
|
+
A <template> is the right home for it. Its content is parsed but never rendered, never matched
|
|
221
|
+
by a document query and never painted, while Astro still stamps the cid on it at build. So the
|
|
222
|
+
scope is available from the first paint whether or not this apex has ever seeded a card. */}
|
|
223
|
+
<template id="cardscope"><CatalogueCard app={{ id: "scope", url: "https://example.invalid", category: "", added: "" } as any} name="" desc="" isNew={false} newLabel="" /></template>
|
|
213
224
|
{/* Both sentences ride data-attributes because the loader below is a BUNDLED script and
|
|
214
225
|
cannot see props — the same seam Posts uses. */}
|
|
215
226
|
<p class="empty" id="empty" hidden
|
|
@@ -421,8 +432,14 @@ const isNew = (added: string): boolean => { const t0 = Date.parse(added || "");
|
|
|
421
432
|
try { return new URL(a.href).host; } catch { return ""; }
|
|
422
433
|
}),
|
|
423
434
|
);
|
|
424
|
-
//
|
|
425
|
-
|
|
435
|
+
// The appended cards must inherit CatalogueCard's scoped styles → copy the cid off a real card, and
|
|
436
|
+
// fall back to the inert one in #cardscope when this apex ships no seed. Without that fallback an
|
|
437
|
+
// empty-seed storefront renders every runtime card as unstyled markup — measured on pin.games' first
|
|
438
|
+
// night, where the shelf's only game arrived as blue underlined links.
|
|
439
|
+
const scopeTpl = document.getElementById("cardscope") as HTMLTemplateElement | null;
|
|
440
|
+
const sample = grid.querySelector<HTMLElement>("a.card")
|
|
441
|
+
?? scopeTpl?.content.querySelector<HTMLElement>("a.card")
|
|
442
|
+
?? null;
|
|
426
443
|
const scopeAttr = sample ? sample.getAttributeNames().find((n) => n.startsWith("data-astro-cid-")) || null : null;
|
|
427
444
|
|
|
428
445
|
const esc = (s: unknown): string =>
|