mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 09:54:14 +00:00
736599a89b
* fix(photos): serve local photos root-relative so a dotted install path works
res.sendFile(absolutePath) resolves against the rewritten req.url under the Nest
ExpressAdapter and answers a spurious 404 even though the file is there — the
same trap files-download.controller.ts:60 and plugin-frame.controller.ts:74
already work around with an explicit { root } + basename. The photo resolver
never got that treatment, so every thumbnail and original 404s on any install
whose uploads path contains a dot segment (~/.local/share/trek and friends).
The public journey asset route had it too, which took shared journeys with it.
The guards above each call already confine the path to the uploads tree, so the
root form is no weaker than what it replaces.
* feat(shared): add the book document contract for TREK Studio
Millimetres throughout, not pixels: a pixel means nothing to a print shop and
changes meaning with the device pixel ratio. CSS maps 1in onto 96px, 25.4mm and
72pt with a fixed ratio, so the editor can render the document at a scale and the
print renderer at 1:1 and land on the same page.
Paint order is the array order rather than a zIndex field that can disagree with
itself, text elements may stay bound to the journal entry they came from, and a
spread can park content a layout has no room for instead of dropping it.
* feat(journey): open TREK Studio over the journey
Studio is a child route of /journey/:id and portals itself above it, so the
journey stays mounted and shows through the panel's 16px margin — it reads as
something opened on top of the journey rather than a place you navigated to. The
URL exists for reload, the back button and shared links; the user never sees it.
Every rule in studio.css is scoped under .trek-dash on purpose: dashboard.css:95
resets button font, colour, background and padding at a specificity a bare .st-x
loses to, so an unscoped rule silently does not apply to a button.
Escape clears the selection and only leaves on a second press. In a dialog
Escape means go away; in an editor that reflex would cost you the page.
* feat(journey): build, edit and arrange the book in Studio
The auto mode turns a journey into a book once and then gets out of the way: what
it produces is an ordinary document, every element as editable as one placed by
hand. Templates work the same way — applying one pours the spread's existing
photos and text into the new arrangement and parks whatever will not fit, so
trying a text-only layout does not cost you the pictures.
Moving and resizing are hand-rolled on pointer events. The drag-and-drop
libraries in this space move items between lists and have no notion of a free
frame, a handle or a magnetic edge; HTML5 drag hands you a ghost image you cannot
control and no position until the drop. It is used for exactly the one shape it
suits — dragging a photo out of the content panel onto a frame.
Selection chrome carries two rings, dark inside light. A single line vanishes
against a photograph of its own value, and over a picture that is bright on one
side and dark on the other no measurement of the background can be right.
The sheet renders in DOM rather than on a canvas so the same component tree can
be what the print renderer runs — one renderer, nothing to drift against. Edit
affordances live in a layer above it and can never reach the page.
* i18n(journey): studio strings across all 23 locales
The empty-frame prompt breaks per language rather than copying the English line
break onto everything — forced onto Japanese or Arabic it strands a fragment on
the second line.
* refactor(journey): keep SpreadView to components only
FONT_STACKS and photoSrc move to their own module: a file that exports both
components and constants breaks Fast Refresh, and this is a file you edit
constantly while designing a page. Types come from the journey store instead of
any, and the count beside the content tabs is a badge rather than competing with
the label for the same weight.
* feat(journey): more shapes, decoration and a content search in Studio
Six shapes now instead of three — rounded rectangle, triangle and an outline-only
box join the rest, plus a quotation mark and an outlined circle under decoration.
A triangle is a clip path rather than the old CSS border trick: that hack cannot
take a fill gradient or a stroke and its size does not follow the frame the way
everything else does. A stroke sits inside the frame, or the drawn shape would be
wider than the box the editor snapped and the print would not match it.
The content panel gets a search over photos and entries. A photo matches on its
own caption and on the entry it hangs from — most photos carry no words at all,
so matching captions alone would look broken on exactly the journeys that need
it. Plain filtering over what is already in memory; a journey holds tens or
hundreds of items, not thousands.
Dates in the panel and in the book now follow the app's language through the
house formatDate rather than the browser's locale, and the entry's date and place
are two badges instead of one dot-joined string the eye has to parse.
* @
feat(journey): a shape library, picture frames and photo grids for Studio
Studio had six shapes, two frames and no grids. This is the library that
makes it usable for a book rather than for a diagram.
Shapes are SVG paths now, not clip-paths. That was forced rather than
chosen: a clipped div cannot take a stroke — the clip cuts the border in
half lengthwise — and a heart is not a box with a radius. Rectangles and
ellipses keep their old div rendering, since a box genuinely is better as
a box and every document written so far contains those two.
Two decisions in shapes.ts are worth stating.
The path *points* are scaled, not the coordinate system. Fitting a path
with preserveAspectRatio="none" scales the stroke with it, so a 0.5mm
outline on a frame twice as wide as it is tall comes out 0.7mm on the
sides and 0.35mm top and bottom. Printed next to a straight rule at
300dpi, you see it. Hence the deliberately boring path subset: absolute
M/L/C/Q/Z, numbers alternating x and y, no arcs.
And every shape fills its 0..100 box exactly, enforced by normalise() at
module load rather than asked for in a comment. The editor draws its
selection outline, its resize handles and every snap target from the
element frame, so a shape occupying 86% of its own frame cannot be
aligned against anything you can see. It costs a regularity nobody can
spot — a hexagon in a square frame still reads as a hexagon.
Frames are the same list: a picture frame is a shape with a photograph
inside it, and keeping two would mean a heart that exists as one but not
the other. Photos gain a mask and a decoration, kept independent, plus
the Polaroid, film and tape treatments that are not expressible as either.
Grids take their gutter out of the cells rather than adding it between
them, so a grid asked to fill the safe area fills it instead of
overhanging by one gutter.
@
* @
feat(journey): derive what a journey adds up to
GET /api/journeys/:id/stats — distance, days, steps, photos, places, the
furthest point, the countries in visit order, and the route itself. Read
only and derived: nothing here is stored, it is what the trips added to
the journey come to.
The route comes from the journey entries where they carry coordinates,
and falls back to the places on the linked trips where they do not —
which is the common case for a journey assembled from trips nobody has
written up yet. The two are never mixed: an entry written about a place
that is also on the trip would be two stops at one location, and the
distance would count that leg twice.
Countries read place_regions first, which Atlas already fills, and fall
through to getCountryFromCoords for the rest. That import is a plain
function from a module built without DI or Nest edges, so it costs the
journey domain no coupling to Atlas.
Distance is great-circle metres, not driving distance: there is no
routing engine here, consecutive stops are not necessarily joined by a
road, and a book that prints a road distance it never measured is worse
than one that says "as the crow flies". Metres because kilometres and
miles are a display choice.
A hotel across three nights is one place with three day assignments, so
the place query aggregates back down to one row at its earliest day —
otherwise the route would visit the hotel three times.
Two test fixes came out of writing this. journey.controller.test.ts still
asserted an absolute path from res.sendFile, which the photo fix in this
branch had already changed to the basename-plus-root pair; and
linkTripToJourney in the factories wrote to linked_at, a column that does
not exist — it had no callers, so it had never once run.
@
* @
feat(journey): travel elements — the route, the figures, the countries
A photo book of a trip is not an album: the trip carries facts, and those
facts make pages photographs cannot. Four new elements — a vector route
map, a figures panel, a country page and a set of small marks — plus the
mood, weather and pros/cons an entry already records.
Every one of them carries its own values, resolved when the element is
placed and written into the document. The print renderer is headless
Chromium loading a page; one that needs an authenticated fetch to know
what it says will print blank the day a token expires. It also makes a
book a record of a trip as it was, rather than something that quietly
rewrites last year distance when a stop is added. travelRefresh compares
what is stored against the journey and offers an update, so bringing an
element up to date is a choice.
The map is vector, from the coordinates, over silhouettes simplified
offline from the admin-0 boundaries the server already bundles for Atlas
— no licence question, nothing to fetch at render time, sharp at any
print size. It paints no background: a map is geography sitting on the
paper, not a window cut through it, so it can be laid over a photograph.
Flags are drawn rather than typed. A regional-indicator pair is the
obvious answer and works everywhere except Chrome on Windows, which has
no flag glyphs and renders the two letters instead — "DE" in a printed
book is not a flag. Thirty-three flags are exact constructions; anything
with an emblem or unequal bands is deliberately absent and falls back to
the country outline, because a wrong flag is worse than no flag.
Panel tiles render the real element small, through the page own
renderer. These differ from each other by what they say rather than by
their shape: four map styles are four maps, and no icon can tell you
which is which.
@
* @
feat(journey): manage spreads from the pages rail
Add, insert between two spreads, duplicate, reorder and delete. None of
it existed — a book was whatever the auto layout produced.
The cover and the back cover are fixed points: a book has exactly one of
each, they are single pages, and no sequence of clicks should be able to
produce a book with two covers or none. Every operation asks one
predicate whether a spread is inner, rather than each caller testing role
for itself, and a spread inserted after the back cover lands before it.
Duplicating re-ids every element it copies. Two elements sharing an id
would make selection ambiguous and every lookup that follows it wrong,
delete included.
Also: a locked element can be selected again. Locking used to switch its
hit target off entirely, which was a dead end — it could not be picked,
so the inspector never showed it, so the unlock button was unreachable
and the only way back was undo. Locked now means what it says: it cannot
be moved, and its resize handles are hidden so the editor does not offer
a drag it will refuse.
@
* @
feat(journey): let the auto layout use the travel elements
The book now opens on a summary spread — the route drawn on the left, the
figures on the right — and, for a journey that crossed a border, a country
page after it. Both are omitted rather than left empty when there is
nothing to draw: a spread holding a blank frame over the words "0 KM" is
worse than a shorter book, and every page in a printed one costs money.
Only the figures the journey actually has make it onto the page. A zero
is not a fact worth a tile, it is a hole in a composition.
Each entry gains a short accent rule above its heading — one drawn
element, and the cheapest thing here that makes a spread read as designed
rather than as text placed on a page. An entry with no photographs, which
is the one spread with a blank left page, sets its date as a numeral
there: a gap in the book becomes a pause in it.
The back cover closed with `${places} Orte` — German, hardcoded, in a
book that follows the app language everywhere else. It is a figures
element now, so it takes its labels from the same translations as the
rest of Studio.
The layout waits for the figures rather than racing them. Laying out
first would give a journey a summary spread or not depending on which
promise resolved first, and Studio already shows its loading state until
the document exists, so the wait costs nothing.
@
* @
feat(journey): the Studio wordmark replaces the book-name field
The field asked for a second name for something already named after the
journey — a box whose only real use was being left alone. The bar says
what this is instead: the lockup, inline so it takes the theme ink
through currentColor rather than needing a light-on-dark copy, and a beta
mark beside it.
Along with the strings for everything in this branch, across all 23
locales, and the two keys the name field used, removed rather than left
as orphans nobody can tell from live ones.
journey.studio.frames was "Picture frames" — too long for a tab sharing a
row with two others, and untranslated in 21 of the 23 locales, which
showed the English through. It is one word now, in every language.
@
* @
feat(journey): a free trim size, page numbers, and auto layout as a button
Three from the list the PR left open.
**Custom trim.** The five presets are what vendors actually bind, which
covers almost everyone — "almost" being the problem. A local printer with
a 24x18 press, or a book meant for a particular shelf, could not be made
here at all. Two fields under the format list, and typing in them *is*
picking custom: a book that is 210 by 240 is not square-21 with a typo,
so the preset follows rather than needing to be chosen first. Switching
to custom keeps the page it is on — it adjusts the format you have.
**Page numbers.** Set on the document and drawn by the renderer, which is
the only place that knows what number a page is. Stamping them with
pdf-lib afterwards would print numbers the editor never showed, and a book
you cannot proofread on screen is not much of an editor. They are also the
one thing on a page that is not an element: an element holding "14" would
still say 14 after its spread was moved. `startAt` exists because the
first inner spread is rarely page 1 once bound, and outer/inner is a real
distinction on a spread — getting it backwards puts both numbers in the
fold.
The controls live in the inspector empty state, which was one line of
hint text. With nothing selected, that panel is where the book own
settings belong.
**Auto layout as a button.** It ran once, on open, which made it the one
thing in Studio you could not ask for; a page that came out wrong had to
be rebuilt by hand. Now it does one spread or the whole book, both as
ordinary commits — the first thing anyone does with a button like this is
press it to see, and the second is want their page back. A single spread
keeps its id so the rail does not scroll, and refuses on anything not
built from an entry rather than replacing it with a blank.
@
* @
feat(journey): cover layouts, and five more for the spreads
The cover had none. The panel said covers are designed by hand, which was
true and unhelpful — it is the page people care most about and the one
they had no starting point for.
A cover is a different problem from a spread and gets its own set rather
than a filter over the existing one: it is a single page, the type is the
subject rather than a caption to a photograph, and a spread layout applied
to it lands half its frames past the edge. Five of them, from full bleed
to type-only, and the panel serves the right set for whichever spread is
open. The cards scale as one page there, and drop the fold line, since
there is no fold.
Five more spread layouts as well — a picture with a narrow column of
story, nine up, a mosaic around one large frame, two pictures with the
words between them, and four staggered so a row of squares stops reading
as a contact sheet.
Applying a layout also stopped mangling a single text. The old rule took
the longest text as the story and looked for a heading among the rest,
which reads a three-text spread correctly and gets a one-text cover
exactly wrong: the 30pt title *is* the longest text, so it was the story,
so a cover layout with a heading slot and no body slot had nowhere to put
it and parked the title. Size decides the heading now; length only sorts
what is left.
@
* @
feat(journey): seven self-hosted book faces, and a picker that shows them
The serif slot was Georgia. Georgia is a system font — on most desktops,
on no Linux container — so the print renderer would have substituted
something else and a book proofread in one typeface would have printed in
another. The existing Journey PDF export has exactly this bug today,
asking for Inter while only Poppins is bundled.
Every family is self-hosted through @fontsource now, all OFL, all loaded
with Studio own chunk so a face cannot arrive after the text has been
laid out and reflow the line endings someone was setting. Two sans, three
serifs from bookish to high-contrast, two display faces for a cover.
Every stack ends in a generic rather than in another named font nobody
shipped.
The three original ids are kept by name, so documents written so far
still parse — they point at bundled faces rather than at whatever the
machine happened to have.
The picker sets each family in itself. A row of chips reading
"Poppins / Lora / Bebas" in the interface font tells you their names and
nothing about the only thing anyone is choosing between.
Weights a family does not ship are disabled rather than offered: asking
for bold on a single-weight display face gets a synthesised one, which
prints as a smeared regular. Picking such a family moves the weight to
the nearest it really has.
@
* @
feat(journey): real map imagery, from the providers TREK already has
The map element drew country outlines and nothing else. That is still the
default and still the right one — nothing fetched, nothing licensed,
sharp at any print size. But an outline of Iceland cannot show which road
you took, and some books want that.
So two more sources, both reading the tile template and Mapbox token an
admin already configured for the planner and Atlas. A second place to
paste a token is a second place for it to be wrong, and a source with
nothing behind it is not offered at all — showing "Mapbox" to someone
without a token produces a grey rectangle and no explanation anywhere.
Both costs are stated rather than hidden: tiles are fetched when the page
renders, and they are raster, cut for one zoom, so printing much larger
than they were fetched goes soft.
Attribution is neither optional nor a setting. The licence requires
credit and a book is a published work — nobody can add a footnote after
it is bound. The credit is matched on the host, so an instance running its
own OSM mirror still credits OpenStreetMap, and an unrecognised source
gets none rather than an invented one. It is written into the document
when the element is placed, so the renderer cannot lose it.
The route is projected onto the tile grid when there is one. The vector
map fits itself to country outlines, and a line placed by that fit sits
next to the road rather than on it — the sort of error that only shows up
once it is printed. Outlines are dropped under imagery, where they would
be a second coastline over the one in the picture.
@
* @
fix(journey): make the Studio type-check again
The map element used tileView and projectOntoTiles without importing them,
useMapSources declared a stricter frame type than any real frame satisfies,
and the mood icon read a colour through an `in` check that types as unknown.
The page fixtures in the studio tests predate page numbers, so they build a
BookPageSetup that the contract no longer accepts — now parsed from the
schema, which cannot drift from it.
@
* @
feat(journey): the book is saved
Studio laid a book out on every open and kept it in the tab. Close the tab
and the afternoon went with it, and the auto layout was not a starting point
but the only point.
The document now lives in journey_books, one row per journey, and autosaves:
quiet for a moment after the last change, or at the latest fifteen seconds
in, so a drag across a spread is one request rather than four hundred. A
stored book wins over a fresh layout on open, and closing the editor writes
whatever is still queued.
Everyone on a journey can edit its book, so the write carries the version it
was made against and the update matches on it in a single statement. A save
that has been overtaken is refused with the current record in the body,
which turns "your work vanished" into a choice between two versions. The
server broadcasts journey:book:saved to the other editors — the version, not
the document — and a client with nothing outstanding takes the new one. A
client with unsaved edits deliberately takes nothing and conflicts on its
next save instead.
@
* @
feat(journey): export the book
The one thing Studio could not do. The button was there and disabled.
A book now goes out as sheets: every inner spread cut down the middle into
leaves in reading order, bleed carried out past the trim on all four sides,
crop marks outside that saying where to cut. The cut is a window rather than
a re-layout, so a photograph crossing the gutter still meets itself once both
halves are printed. Spreads stay whole in the other mode, which is what you
send someone to read.
The browser makes the PDF, from the editor components at 1:1. Considered and
rejected: headless Chromium on the server, and a PDF library drawing the
pages a second time. TREK is self-hosted, and neither Chromium in the image
nor a second renderer to proofread against is worth carrying when the browser
already produces exactly what the editor shows — it is also how the other
exports here work. What the browser will not write is PDF metadata and the
TrimBox entries; the marks carry that instead, as they have since long before
the format existed.
Two things had to give. `SpreadView` clipped at the trim, which is right on
screen and leaves a white hairline down every edge of a bound book, so print
mode lets the page run out and the sheet does the clipping. And the print
document is its own document: it carries the app stylesheets across so the
seven bundled faces are the ones that print, and waits for images and fonts
before it offers to save.
@
* @
fix(journey): make the Studio popovers cover what they cover
The auto-layout menu sat on the glass tokens, which carry 42-58% opacity when
the user has transparency on. That reads as depth over the workbench, where
the rails and the bar use it, and as a mess over the inspector, where this
menu opens: two layers of text through each other, neither readable.
The export dialog was worse — it named --panel and --card, which are not
tokens here, so its background resolved to nothing at all and the whole thing
was see-through.
Both are opaque now. The other glass surfaces are left alone: they float over
the workbench, and that is what the material is for.
The print preview also fits the pane. A spread sheet is over 400 mm across,
so at 1:1 the book ran off the side and had to be read by scrolling sideways.
Screen only — the print stays at full size.
@
* fix(journey): a cover keeps its own size, and a trim size can be typed
Three things the export and the page setup got wrong.
Spread mode made every sheet as wide as the widest so that one @page rule
would cover them all. That put a cover — one page — in the middle of a
spread-sized sheet with white either side, which is not a cover. Each sheet
is now sized to what is on it, and the print CSS carries a named page rule
for the single-page ones.
The trim fields clamped on every keystroke, so typing 500 meant the field saw
5, clamped it to the minimum and wrote that back under the cursor: the number
could not be typed at all, only nudged with the arrows. The field now keeps
what is being typed and tells the document about values it can use. The
arrows are unchanged, and leaving the field still clamps — someone who typed
5 and clicked away meant the smallest book.
And the autosave could loop. The save effect depended on the whole store
object, which is new on every render, so after a conflict — where the local
document is by definition not the saved one — it was a save attempt per
render: a 409, a re-render, another attempt. It depends on the callbacks now,
and a conflict holds the autosave until somebody answers it.
* feat(journey): page numbers pick their own colour
A book has dark pages and light ones, often on the same spread, so one folio
colour is wrong on half of them: the warm grey that reads on paper vanishes
into a full-bleed night photograph, and white vanishes the moment the page is
white. The way out used to be setting it per spread, which the document has
no place for.
The renderer asks what is under the number instead. It knows every element
and where it sits, so it walks them from the top down and takes the first one
that covers the spot: a shape's fill is arithmetic, a photograph gets white
with a hairline of shadow — unknowable without decoding it, and dark more
often than not once printed — and bare page takes the page colour.
A heuristic, deliberately: the alternative is sampling pixels from an image
that may not have loaded, in a renderer that also has to run for print.
Anyone it gets wrong can still pick a colour, and picking one turns it off.
* feat(journey): see who else is in the book, and where they are
Two people editing the same document without seeing each other is how you get
two people editing the same spread. So: a badge in the bar saying who has the
book open, and an arrow with a name on it for each of them.
The coordinates are millimetres on the spread, not pixels on a screen — the
two of you are at different zoom levels on different monitors, and a pixel
means nothing to the other one. They carry a spread index too, so a pointer
on page 40 is not drawn on page 2.
Ephemeral throughout. Nothing is written down, the room is the authorisation
for the pointer path, and a socket that dies takes its arrow with it rather
than leaving it on everyone else's page. Presence is keyed by socket because
two tabs are two pointers; the badge folds them back into one person, because
two tabs are not two people.
The rate limit needed room. Pointers move about ten times a second, three
times what the per-socket limit allows, and that limit is what stops a client
flooding the process — so it is now two: an outer ceiling every frame counts
against before parsing, and the original tight limit on everything a pointer
is not. Malformed JSON still counts against the tight one, which is what the
guard was for.
Throttled to ten frames a second going out and interpolated coming in: sixty
would be five times the traffic for something the eye cannot use, and drawing
ten as they land reads as a stutter rather than a hand.
* fix(journey): keep the zoom bar on screen at every zoom level
Zoomed far enough in, the bar slid off the bottom of the window — and it is
the only way back out, so the editor was stuck at 300%.
The workbench sat in a grid track sized `auto`, which grows to whatever is in
it; `overflow: auto` on the child does not stop that, because a grid item's
minimum size is its content unless told otherwise. So at 300% the box grew to
2400px inside a 660px window and took its absolutely positioned bottom edge
with it. The track is bound now, and the workbench scrolls instead of growing.
The bar also has a z-index, for the same reason it has to stay in view: it
must never be the thing something else covers.
* feat(journey): Studio replaces the old book export
The journey PDF and Studio were two ways to print the same book that disagreed
about what it looks like — and only one of them can be edited. The old export
goes: the two buttons on the desktop already sat next to the Studio one, and
the renderer they called is deleted rather than left as a second answer.
Nothing takes its place on the phone. The book is a Studio document now and
Studio is a desktop editor; a phone-sized PDF of something laid out for print
was the old export's answer to a question nobody was asking.
* feat(journey): lay the book out the way a travel book is laid out
The auto layout built every spread the same way: a picture on the left, words
on the right, and nothing else. It came out looking like a template because it
was one — and on a journey with little in it, like a stack of blank paper.
Five layouts now, chosen by what an entry has and alternating as the book goes
on. A place page for a stop nobody wrote about, with the country pale behind
the name and the coordinates under it. A story page with a small map of the
stop and the picture bleeding off three edges. A panorama across the fold. A
gallery with the hero on one page and a ruled strip on the other. And every
fourth picture spread goes full bleed with the words set over it, because a
book of loud pages has no loud pages.
The marks are what actually make these pages: a flag beside the country, a
date numeral, a chip saying which day this is, a rule along the foot with a
dot showing how far in you are. Each is trivial and together they are the
difference between a page that was designed and one that was filled in. All of
them are elements the panels can make, so what comes out can be taken apart.
The summary spread gained a heading and the furthest point drawn as two dots
and a line — that figure means nothing until it is a distance between two
names. The countries page went dark, because the printed one is: pale outlines
on near-black is the single most recognisable page in these books.
Two things the old layout got wrong are fixed on the way. Entries with nothing
on them share one page instead of taking a spread each, in the order they
happened rather than gathered at the end. And an entry whose photographs have
not arrived gets the frames they will go in, empty, rather than blank paper —
the layout is finished and the pictures are the only thing missing, which is
the right way round.
* feat(journey): build the spreads out of areas, and set the elements in ink
Two things, both about what a page is made of.
The layouts were photographs with captions. A printed travel book is built out
of areas: a page laid solid in ink with pale type on it, a band down the outer
edge, a picture that overruns the panel it sits against, a box ruled around a
block of text. Two more layouts do that now — one with a whole page in ink and
a second photograph crossing the fold onto it, one with an edge band and the
words in a ruled box, pictures at two sizes and one overlapping the hero. Six
layouts on a rotation, so the book stops reading as a template.
None of it needed a new feature. The document paints in array order, so a panel
pushed first is a panel everything else lands on; that is all layering is, and
it needed using rather than adding.
And the travel elements are ink by default rather than the app's orange. A book
is printed and a printed page is ink on paper; a colour that arrives without
being chosen turns every element into the same accent whether the book wants
one or not. Picking one is a click. The dark map is the exception — the route
goes pale there, because ink on a near-black country is a line nobody can see,
and only the default is overridden: a colour somebody chose stays theirs.
* fix(journey): three things the editor got wrong
An empty photo frame rendered on its own, ignoring frameStyle entirely — so a
Polaroid placeholder was a plain dashed rectangle until a photograph landed in
it and the chin appeared from nowhere. The two branches are folded together
now: the surround is drawn once and only what goes inside it differs, so a
frame shows what it will look like before it is filled.
Adding a page to a book with no inner pages yet put it in front of the cover,
where it could not be moved back from either — a move only ever swaps with
another inner spread, and the cover is not one. An empty book reports its last
inner spread as -1, and -1 + 1 is 0. The insert is bounded at both ends now.
And snapping only knew the outer safe lines. A spread draws that dashed rule
inset from each of its four vertical edges, so dragging inwards caught the fold
and nothing else — the line you could see just before it was not a target. All
four are, along with the centre of each page and the quarters within it: on a
spread the halfway mark is the fold, so a picture centred on its own page had
nothing to find.
* feat(journey): take the auto layout's spreads from templates drawn by hand
The layouts written as code are what a function can reason its way to: a
picture here, words there, margins that add up. What they are not is designed —
a panel bled off one edge, a shape running off a corner, a strip of pictures at
two sizes with the coordinates set beneath them. Those decisions come from
looking at a page, and the editor is where looking at a page happens.
So a spread built in Studio can now be the layout. `extract-templates.cjs`
reads a journey's book and writes its spreads out as data, with every
measurement divided by the page it was drawn on — a template built on a 210mm
square lays out on an A4 landscape book without being redrawn. `applyTemplate`
does the other half: it fills what the entry can answer for and copies
everything else as drawn.
That division is the whole contract. Text carrying a binding takes the title or
the story; empty frames take the photographs in order; the day, coordinate,
date and country marks take what the stop knows. Panels, rules and decorative
shapes are the design and are left exactly as they were put.
A template is one *for an entry* when it uses one — which has to come out of
the drawing rather than a label somebody remembers to set. A summary spread of
figures and country outlines reads perfectly well on its own, and dropping a
day's photographs into it would be nonsense.
Two templates ship with this, drawn by the person who will use them. The
built-in layouts stay as the fallback for entries no template suits.
* feat(journey): turn elements freely, and pass a spread on as a file
Rotation by the corner, the way it works everywhere else: a handle sits
diagonally outside each of the four corners of the selection, and dragging one
turns the element by the change in angle rather than to the angle under the
pointer, so it can be picked up anywhere without jumping. Held to 15 degree
steps unless shift is down. Four handles rather than one because a single
handle off the top right sits under the inspector for anything in the right
page's upper half.
And a spread can now leave the book it was made in. The zoom bar downloads the
one on screen as a file; Import, beside Add spread in the pages rail, brings one
back. Measurements travel as fractions of the page, so a spread drawn on a 210mm
square lays out correctly in an A4 landscape book, the same way the auto
layout's templates do.
What deliberately does not travel:
- Photographs. The file carries the design, and the frames arrive empty.
- The map source. A static map freezes the URL it was rendered from, and on a
Mapbox instance that URL has the access token in it, so a file meant to be
posted in a forum would carry a credential. Coming the other way, a tile
template from a stranger is a URL every reader's browser would fetch tile by
tile: an IP address handed to whoever wrote the file.
An imported file is treated as what it is, somebody else's JSON. It is read in
the tab that chose it and never uploaded, parsed and never evaluated, and every
element goes through the document contract, which drops unknown fields and
range-checks the rest. Colours in particular are #rrggbb or nothing. The size of
the file and the number of elements are both capped, because the damage a
hostile file can do here is not code execution, it is handing the editor more
than the server will accept and leaving a document that will not save.
Also fixes the rotation handle being drawn but not grabbable: the chrome layer
and the selection box both pass pointers through, and a handle has to opt back
in with pointer-events.
* docs(wiki): add two Studio screenshots for the addon page
The editor with a stats spread open, and the frames panel. Both are what the
Journey addon page will want once Studio ships, and both are wanted now to show
the feature off while it is still in review.
* test(realtime): cover the book room's refusals and its dead sockets
The realtime coverage ratchet caught what the book room work left behind: the
three handlers each have an early return for a message that is missing its
journey id or comes from a socket with no user, and none of them was exercised.
Every one of those is a silent failure by construction. A handler that did
something with a missing journey id would not throw, it would put a socket
somewhere it does not belong, and nobody would notice until two strangers were
looking at the same page.
The other half is sockets that are in a room but cannot be used: a connection
that dropped before its close handler ran, or one put in a room without ever
being registered. The peer list has to walk past both rather than showing a
ghost, and the broadcast has to skip them rather than throwing on a path that
runs ten times a second per editor.
Both files are back to full branch coverage, so the domain's pins hold as they
are rather than being lowered to fit.
* feat(journey): make the route map a map of the journey
Four things were wrong with it, and they compounded.
**It showed the wrong place.** The view was fitted to the country outlines as
well as the stops, so a trip that stayed inside Berlin was drawn as the whole of
Germany with two dots in the middle of it. It fits what the journey did now, and
the outlines run off the edge of the frame the way a coastline does on any real
map. Fitting to the country is still there as a deliberate choice, for the page
every travel book has, and how much air to leave around either is a setting
rather than a constant.
**It drew a line nobody travelled.** Stops joined in order is a claim about the
journey that is almost always false: it crosses mountains, water and borders the
trip went around. TREK already stores routed geometry per place, from the
planner and from imported GPX, so the map now follows the road where the trip
knows it and falls back to joining the stops where it does not. Segments stay
separate, so a trip with a flight in the middle does not grow a road across the
sea. The geometry is thinned when it is frozen into the element: a printed line
gains nothing from a point every fifteen metres, and a book carrying every GPS
fix of a three-week trip is a document nobody can save.
**The tiled and static sources drew nothing at all.** The tile grid was
computed, the route was projected onto it, and then no picture was ever
rendered — the map came out as a frame with a line across it. Three separate
faults behind that: the imagery layer did not exist, `{s}` was left unsubstituted
so every tile URL named a host that does not resolve, and the grid was cut from
the tiles the route happened to sit on rather than from what the frame shows, so
it stopped short of the edge. The frame decides the grid now, and it covers by
construction. Tiles overlap by a tenth of a millimetre, which closes the hairline
of white paper that rounding left between them.
Mapbox needed one more thing: `mapbox/standard` is a 3D GL style and the Static
Images API refuses it outright, so an instance configured for the planner's map
was configured with a style this cannot use. It falls back to the classic
equivalent, and a URL frozen into a document before that existed is repaired on
the way out rather than left broken for good.
**A map was always a rectangle.** It can be cut to the outline of the countries
now, so the picture *is* the country: no frame, no box, the page showing through
around the coastline. That is the version worth laying next to a photograph, and
the one thing a rectangle can never be. The tile grid and the vector fit are
projected from one extent so the picture and the shape it is cut to line up —
two fits meant the country was full of the wrong towns.
Also here: the credit line comes off the map itself. It is still resolved and
still stored, for the colophon, which is where a book has always credited its
sources.
* feat(journey): split the country list, and trim the map cards
The country list and the country grid were compositions somebody else made:
they decided the order, the spacing and the type size, and the only way to
change any of it was to not use them. They are gone, and what is left is the
same entry — the name over its silhouette, set the same way — as an element
placed one country at a time. Three down a page is the list, with the spacing
yours; one at 80mm is a chapter opener, which the list could never be. The name
is editable, so numbering them "1. Germany", "2. Netherlands" is typing rather
than a feature. The compact mark, outline beside the name at the size of a line
of type, stays for the places that want a mark rather than a heading.
The map section offers the four vector styles and nothing else. Tiles, Mapbox
and the cut-out are one click away in the inspector, where the rest of the map's
settings already live, and four cards that are the same map four times were
crowding out everything under them.
A map is fitted to the country by default now, which is the picture a travel
book usually wants. Fitting to the stops is still there and still matters the
moment the trip is smaller than the country it happened in.
Also: no navigation fallback from the dev service worker. In production it is
right — offline, a deep link has to be answered by the cached shell. In
development it answers a reload with the index.html it cached earlier, whose
script tags point at module URLs from before the last restart, so the browser
re-runs the previous version of the app while the editor shows the new one.
Every explanation for that is wrong until someone thinks of the service worker.
* fix(journey): drop what the trimmed map section left behind
Three bindings that only fed the cards removed in the commit before: the map
sources hook, the country codes the cut-out card needed, and the frame the
preview sized itself from. Lint had them as warnings rather than errors, so
they would have ridden along quietly.
1744 lines
54 KiB
CSS
1744 lines
54 KiB
CSS
/* ============================================================================
|
|
TREK Studio — the book designer's shell.
|
|
|
|
No palette of its own: the root carries `.trek-dash` as well, so every colour,
|
|
radius and shadow below resolves against the dashboard tokens and follows the
|
|
user's theme and accent without a second set to keep in sync. Collections does
|
|
the same (styles/collections.css).
|
|
|
|
Every rule is scoped under `.trek-dash` on purpose, not out of habit:
|
|
dashboard.css:95 resets `button` to `font/color/background/border/padding:
|
|
inherit|none|0` at specificity (0,1,1), which quietly beats a bare `.st-x`.
|
|
A Studio rule that is not scoped simply does not apply to a button.
|
|
|
|
What IS specific here is the material split. The workbench sits under a
|
|
scattered, colourful page and needs to stay calm, so it is nearly opaque with
|
|
a small blur; the rails float above it and get the full card glass. The sheet
|
|
itself is deliberately flat white — paper does not glow.
|
|
============================================================================ */
|
|
|
|
.trek-dash.st-root {
|
|
position: fixed;
|
|
/* Above the journey's Leaflet controls (z-index 400) but below the app's
|
|
dialogs and toasts (99999), so a confirm opened from Studio still lands on
|
|
top of it. */
|
|
z-index: 9999;
|
|
inset: 16px;
|
|
display: grid;
|
|
grid-template-rows: 56px minmax(0, 1fr);
|
|
border-radius: var(--r-xl);
|
|
overflow: hidden;
|
|
border: 1px solid var(--glass-border);
|
|
box-shadow: var(--sh-lg), var(--glass-highlight);
|
|
/* Nearly opaque on purpose: a full 22px blur across the whole viewport is the
|
|
most expensive thing you can leave standing, and the journey underneath is
|
|
busy enough to hurt legibility. Same reasoning as the floating map controls
|
|
in collections.css. */
|
|
background: color-mix(in oklch, var(--bg) 94%, transparent);
|
|
backdrop-filter: blur(8px) saturate(1.2);
|
|
-webkit-backdrop-filter: blur(8px) saturate(1.2);
|
|
color: var(--ink);
|
|
/* The root carries .trek-dash for its tokens, and that class also declares
|
|
`min-height: 100%` for a full-page dashboard. Inherited here it forces the
|
|
panel to the full window height, pushing its bottom edge — and the zoom
|
|
pill with it — past the screen. */
|
|
min-height: 0;
|
|
}
|
|
|
|
.st-scrim {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 9998;
|
|
background: oklch(0.2 0.01 65 / .38);
|
|
backdrop-filter: blur(3px);
|
|
-webkit-backdrop-filter: blur(3px);
|
|
}
|
|
.dark .st-scrim { background: oklch(0 0 0 / .55); }
|
|
|
|
/* ----------------- entry / exit ----------------- */
|
|
/* Grows out of the button that opened it. --st-ox/--st-oy are written by the
|
|
opener from the button's rect, relative to the panel's 16px inset, so the
|
|
origin is the button and not the centre. */
|
|
.trek-dash.st-root {
|
|
transform-origin: var(--st-ox, 50%) var(--st-oy, 50%);
|
|
}
|
|
.st-enter { animation: st-in 280ms cubic-bezier(0.23, 1, 0.32, 1) both; }
|
|
.st-exit { animation: st-out 180ms cubic-bezier(0.4, 0, 1, 1) both; }
|
|
.st-scrim-enter { animation: st-fade-in 180ms ease-out both; }
|
|
.st-scrim-exit { animation: st-fade-out 160ms ease-in both; }
|
|
|
|
@keyframes st-in {
|
|
from { opacity: 0; transform: scale(0.86); }
|
|
to { opacity: 1; transform: scale(1); }
|
|
}
|
|
@keyframes st-out {
|
|
from { opacity: 1; transform: scale(1); }
|
|
to { opacity: 0; transform: scale(0.94); }
|
|
}
|
|
@keyframes st-fade-in { from { opacity: 0; } to { opacity: 1; } }
|
|
@keyframes st-fade-out { from { opacity: 1; } to { opacity: 0; } }
|
|
|
|
/* The app-wide damping in index.css only covers the trek-* classes, so ours has
|
|
to opt in here or Studio would be the one surface that ignores the setting. */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.st-enter, .st-exit, .st-scrim-enter, .st-scrim-exit {
|
|
animation-duration: 120ms;
|
|
}
|
|
.st-enter { animation-name: st-fade-in; }
|
|
.st-exit { animation-name: st-fade-out; }
|
|
}
|
|
|
|
/* ----------------- top bar ----------------- */
|
|
.trek-dash .st-bar {
|
|
/* Its own stacking context, above the rails: the panels below carry z-index 1,
|
|
and without this the format menu would open behind them. */
|
|
position: relative;
|
|
z-index: 5;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 14px;
|
|
padding: 0 18px 0 10px;
|
|
min-width: 0;
|
|
background: var(--glass-bg);
|
|
border-bottom: 1px solid var(--glass-border);
|
|
backdrop-filter: var(--glass-blur);
|
|
-webkit-backdrop-filter: var(--glass-blur);
|
|
}
|
|
|
|
.trek-dash .st-back {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
height: 36px;
|
|
padding: 0 12px 0 8px;
|
|
border-radius: 999px;
|
|
color: var(--ink-2);
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
letter-spacing: -0.01em;
|
|
max-width: 240px;
|
|
transition: background .18s, color .18s;
|
|
}
|
|
.trek-dash .st-back:hover { background: var(--accent-soft); color: var(--ink); }
|
|
.trek-dash .st-back .st-back-label {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* The journey's own cover, so you never lose track of whose book this is. */
|
|
.trek-dash .st-cover {
|
|
width: 26px;
|
|
height: 26px;
|
|
border-radius: 7px;
|
|
object-fit: cover;
|
|
flex: none;
|
|
border: 1px solid var(--line-2);
|
|
background: var(--surface-2);
|
|
}
|
|
|
|
.trek-dash .st-bar-group {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 7px;
|
|
flex: none;
|
|
margin-left: auto;
|
|
}
|
|
/* The undo/redo pair belongs together; everything else in the group breathes. */
|
|
.trek-dash .st-bar-group .st-tool.is-icon + .st-tool.is-icon { margin-left: -5px; }
|
|
|
|
.trek-dash .st-tool {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 5px;
|
|
height: 30px;
|
|
padding: 0 11px;
|
|
border-radius: 9px;
|
|
color: var(--ink-2);
|
|
font-size: 12.5px;
|
|
font-weight: 500;
|
|
letter-spacing: -0.005em;
|
|
white-space: nowrap;
|
|
flex: none;
|
|
transition: background .18s, color .18s, opacity .18s;
|
|
}
|
|
.trek-dash .st-tool.is-icon { width: 30px; padding: 0; }
|
|
|
|
/* The browser's own ring is a hard black box on a glass bar. Keep it for
|
|
keyboard users, drop it for the pointer. */
|
|
.trek-dash .st-tool:focus { outline: none; }
|
|
.trek-dash .st-tool:focus-visible {
|
|
outline: none;
|
|
box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 3px var(--accent);
|
|
}
|
|
.trek-dash .st-tool-label { line-height: 1; }
|
|
|
|
/* Below 1360 the labels go and the tools become icons — the bar is not allowed
|
|
to grow into the book's space. */
|
|
@media (max-width: 1359px) {
|
|
.trek-dash .st-tool-label { display: none; }
|
|
.trek-dash .st-tool { padding: 0 8px; }
|
|
}
|
|
.trek-dash .st-tool:hover:not(:disabled) { background: color-mix(in oklch, var(--ink) 7%, transparent); color: var(--ink); }
|
|
.trek-dash .st-tool:disabled { opacity: .35; }
|
|
/* ----------------- format picker ----------------- */
|
|
.trek-dash .st-picker { position: relative; flex: none; }
|
|
|
|
.trek-dash .st-menu {
|
|
position: absolute;
|
|
top: calc(100% + 8px);
|
|
right: 0;
|
|
z-index: 3;
|
|
min-width: 240px;
|
|
padding: 8px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
border-radius: var(--r-sm);
|
|
/* Opaque, unlike the rails and the bar.
|
|
|
|
Those float over the workbench, where glass reads as depth. This one opens
|
|
over the inspector — over words — and at the 42-58% the glass tokens carry
|
|
when the user has transparency on, the text behind it shows straight
|
|
through and neither layer can be read. A popover covers what it covers. */
|
|
background: var(--surface);
|
|
border: 1px solid var(--line-2);
|
|
box-shadow: var(--sh-lg);
|
|
-webkit-backdrop-filter: blur(30px) saturate(1.8);
|
|
animation: st-menu-in 140ms cubic-bezier(0.23, 1, 0.32, 1) both;
|
|
}
|
|
@keyframes st-menu-in {
|
|
from { opacity: 0; transform: translateY(-6px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
@media (prefers-reduced-motion: reduce) { .st-menu { animation-duration: 80ms; } }
|
|
|
|
.trek-dash .st-menu-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 14px;
|
|
padding: 9px 16px;
|
|
border-radius: 10px;
|
|
text-align: left;
|
|
color: var(--ink-2);
|
|
transition: background .16s, color .16s;
|
|
}
|
|
.trek-dash .st-menu-item:hover { background: color-mix(in oklch, var(--ink) 7%, transparent); color: var(--ink); }
|
|
.trek-dash .st-menu-item.is-active { color: var(--ink); }
|
|
/* One tile for every format, with the sheet centred inside it. Sizing the
|
|
shapes directly made a portrait and a landscape sheet different heights, so
|
|
nothing lined up down the list. */
|
|
.trek-dash .st-menu-tile {
|
|
width: 26px;
|
|
height: 26px;
|
|
flex: none;
|
|
display: grid;
|
|
place-items: center;
|
|
}
|
|
.trek-dash .st-menu-shape {
|
|
border-radius: 2px;
|
|
background: var(--surface);
|
|
border: 1px solid var(--line-2);
|
|
box-shadow: var(--sh-xs);
|
|
}
|
|
.trek-dash .st-menu-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
|
|
.trek-dash .st-menu-name { font-size: 13px; font-weight: 500; }
|
|
.trek-dash .st-menu-dim { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
|
|
|
|
.trek-dash .st-tool.is-primary {
|
|
/* --accent-on is the accent used AS text on a surface; the colour that reads
|
|
on top of the accent is --accent-text (index.css:562, :753). Using the
|
|
former here paints the label in its own background. */
|
|
background: var(--accent);
|
|
color: var(--accent-text, #fff);
|
|
padding: 0 14px;
|
|
font-weight: 600;
|
|
}
|
|
/* Disabled it is still the loudest thing in the bar, which is wrong for a
|
|
control that cannot do anything yet — so it steps back to an outline until
|
|
there is something to export. */
|
|
.trek-dash .st-tool.is-primary:disabled {
|
|
background: transparent;
|
|
color: var(--ink-2);
|
|
box-shadow: inset 0 0 0 1px var(--line-2);
|
|
opacity: .5;
|
|
}
|
|
.trek-dash .st-tool.is-primary:hover:not(:disabled) { filter: brightness(1.08); }
|
|
|
|
.trek-dash .st-sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 2px; flex: none; }
|
|
|
|
/* ----------------- body: rail | workbench | inspector ----------------- */
|
|
.trek-dash .st-body {
|
|
display: grid;
|
|
grid-template-columns: 64px 236px minmax(0, 1fr) 300px;
|
|
min-height: 0;
|
|
}
|
|
|
|
/* Under 1280 the inspector floats over the workbench instead of narrowing it —
|
|
below roughly 700px of canvas a spread stops being legible at any zoom. */
|
|
@media (max-width: 1279px) {
|
|
.trek-dash .st-body { grid-template-columns: 64px 236px minmax(0, 1fr); }
|
|
.trek-dash .st-inspector {
|
|
position: absolute;
|
|
top: 56px;
|
|
right: 0;
|
|
bottom: 0;
|
|
width: 300px;
|
|
box-shadow: var(--sh-lg);
|
|
}
|
|
}
|
|
@media (max-width: 1079px) {
|
|
.trek-dash .st-body { grid-template-columns: 64px minmax(0, 1fr); }
|
|
.trek-dash .st-side {
|
|
position: absolute;
|
|
top: 56px;
|
|
left: 64px;
|
|
bottom: 0;
|
|
width: 236px;
|
|
box-shadow: var(--sh-lg);
|
|
}
|
|
}
|
|
|
|
.trek-dash .st-panel {
|
|
background: var(--glass-bg);
|
|
backdrop-filter: var(--glass-blur);
|
|
-webkit-backdrop-filter: var(--glass-blur);
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 0;
|
|
z-index: 1;
|
|
}
|
|
.trek-dash .st-pages { border-right: 1px solid var(--glass-border); }
|
|
.trek-dash .st-inspector { border-left: 1px solid var(--glass-border); }
|
|
|
|
.trek-dash .st-panel-head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
padding: 14px 14px 10px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.14em;
|
|
color: var(--ink-3);
|
|
flex: none;
|
|
}
|
|
.trek-dash .st-panel-scroll { overflow-y: auto; overflow-x: hidden; padding: 0 12px 14px; min-height: 0; }
|
|
|
|
/* ----------------- page thumbnails ----------------- */
|
|
.trek-dash .st-thumbs { display: flex; flex-direction: column; gap: 10px; }
|
|
.trek-dash .st-thumb {
|
|
display: block;
|
|
width: 100%;
|
|
border-radius: var(--r-xs);
|
|
border: 2px solid transparent;
|
|
padding: 3px;
|
|
transition: border-color .18s, background .18s;
|
|
text-align: left;
|
|
}
|
|
.trek-dash .st-thumb:focus { outline: none; }
|
|
.trek-dash .st-thumb:focus-visible { border-color: var(--accent); }
|
|
.trek-dash .st-thumb:hover { background: color-mix(in oklch, var(--ink) 5%, transparent); }
|
|
.trek-dash .st-thumb.is-active { border-color: var(--accent); }
|
|
.trek-dash .st-thumb-sheet {
|
|
/* The sheet is paper: flat, opaque, no glass. `position: relative` is
|
|
load-bearing: the preview inside is absolutely positioned, and without an
|
|
anchor here it would lay itself out against whatever is positioned further
|
|
up the tree and spill out of the rail. */
|
|
position: relative;
|
|
background: #ffffff;
|
|
border-radius: 4px;
|
|
box-shadow: var(--sh-sm);
|
|
overflow: hidden;
|
|
}
|
|
.trek-dash .st-thumb-label {
|
|
display: block;
|
|
margin-top: 6px;
|
|
font-size: 11px;
|
|
color: var(--ink-3);
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
/* ----------------- workbench ----------------- */
|
|
.trek-dash .st-work-wrap {
|
|
position: relative;
|
|
min-width: 0;
|
|
/*
|
|
* The row is bound, not auto.
|
|
*
|
|
* A grid track sized `auto` grows to whatever is in it, and `overflow: auto`
|
|
* on the child does not stop that — so at 300% the workbench grew to 2400px
|
|
* inside a 660px window, and the zoom bar, absolutely positioned at the
|
|
* bottom of this box, went with it. Off the bottom of the screen, taking the
|
|
* only way back out with it.
|
|
*/
|
|
min-height: 0;
|
|
display: grid;
|
|
grid-template-rows: minmax(0, 1fr);
|
|
/* A faint tint so the white sheet reads as an object lying on something. */
|
|
background:
|
|
radial-gradient(120% 90% at 50% 0%, color-mix(in oklch, var(--accent) 5%, transparent) 0%, transparent 60%),
|
|
var(--bg-2);
|
|
}
|
|
|
|
.trek-dash .st-work {
|
|
overflow: auto;
|
|
/* Both axes: a grid item defaults to min-content in either direction, and
|
|
without these it grows instead of scrolling. See the note above. */
|
|
min-width: 0;
|
|
min-height: 0;
|
|
padding: 40px;
|
|
display: grid;
|
|
place-items: center;
|
|
}
|
|
|
|
/*
|
|
* A scaled element keeps its unscaled layout box, so centring and scrolling
|
|
* would follow the full-size sheet and not what you actually see. The stage
|
|
* carries the scaled measurements and the sheet is drawn from its top-left
|
|
* corner inside it — layout and optics then agree at every zoom level.
|
|
*/
|
|
.trek-dash .st-stage {
|
|
position: relative;
|
|
flex: none;
|
|
/* Dragging a frame must not sweep a text selection across the page behind it.
|
|
Text on the sheet is content to be laid out, not prose to be highlighted;
|
|
in-place editing will opt back in on the element being edited. */
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
touch-action: none;
|
|
}
|
|
|
|
.trek-dash .st-sheet {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
transform-origin: top left;
|
|
background: #ffffff;
|
|
box-shadow: 0 1px 2px oklch(0 0 0 / .1), 0 30px 70px -30px oklch(0 0 0 / .45);
|
|
}
|
|
/* The trim edge, drawn as an inset outline so it never shifts the geometry. */
|
|
.trek-dash .st-sheet::after {
|
|
content: '';
|
|
position: absolute;
|
|
inset: 0;
|
|
pointer-events: none;
|
|
box-shadow: inset 0 0 0 1px oklch(0 0 0 / .07);
|
|
}
|
|
|
|
.trek-dash .st-empty {
|
|
position: absolute;
|
|
inset: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 10px;
|
|
color: var(--ink-3);
|
|
text-align: center;
|
|
padding: 0 32px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* ----------------- section rail + side panel ----------------- */
|
|
.trek-dash .st-rail {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
padding: 8px 6px;
|
|
background: var(--glass-bg);
|
|
border-right: 1px solid var(--glass-border);
|
|
backdrop-filter: var(--glass-blur);
|
|
-webkit-backdrop-filter: var(--glass-blur);
|
|
z-index: 1;
|
|
}
|
|
.trek-dash .st-rail-btn {
|
|
width: 52px;
|
|
height: 52px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 3px;
|
|
border-radius: 11px;
|
|
color: var(--ink-3);
|
|
transition: background .16s, color .16s;
|
|
}
|
|
.trek-dash .st-rail-btn span {
|
|
font-size: 9px;
|
|
font-weight: 600;
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.trek-dash .st-rail-btn:hover { background: color-mix(in oklch, var(--ink) 6%, transparent); color: var(--ink-2); }
|
|
.trek-dash .st-rail-btn.is-on { background: var(--accent-soft); color: var(--accent-ink); }
|
|
|
|
.trek-dash .st-side { border-right: 1px solid var(--glass-border); }
|
|
|
|
.trek-dash .st-tabs {
|
|
display: flex;
|
|
gap: 3px;
|
|
padding: 0 12px 10px;
|
|
flex: none;
|
|
}
|
|
.trek-dash .st-tabs button {
|
|
flex: 1;
|
|
/* A flex item will not shrink below its own content width unless told to, so
|
|
`flex: 1` alone does not give equal thirds — the tab with the longest word
|
|
stays wide and squeezes the others. This is what makes them actually equal. */
|
|
min-width: 0;
|
|
height: 28px;
|
|
border-radius: 8px;
|
|
font-size: 11.5px;
|
|
font-weight: 600;
|
|
color: var(--ink-3);
|
|
background: color-mix(in oklch, var(--ink) 4%, transparent);
|
|
transition: background .16s, color .16s;
|
|
/* A label that still will not fit is cut rather than wrapped: a wrapped tab
|
|
grows taller than the row and knocks the whole strip out of line. */
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
/* The count is a footnote to the label, not part of it — a badge keeps it from
|
|
competing with the word for the same weight. */
|
|
.trek-dash .st-tabs button em {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 16px;
|
|
height: 15px;
|
|
margin-left: 5px;
|
|
padding: 0 4px;
|
|
border-radius: 999px;
|
|
background: color-mix(in oklch, var(--ink) 10%, transparent);
|
|
color: var(--ink-3);
|
|
font-style: normal;
|
|
font-size: 9.5px;
|
|
font-weight: 600;
|
|
font-variant-numeric: tabular-nums;
|
|
line-height: 1;
|
|
vertical-align: middle;
|
|
}
|
|
.trek-dash .st-tabs button.is-on em {
|
|
background: color-mix(in oklch, var(--accent-text, #fff) 24%, transparent);
|
|
color: var(--accent-text, #fff);
|
|
}
|
|
.trek-dash .st-tabs button:hover { color: var(--ink-2); }
|
|
.trek-dash .st-tabs button.is-on { background: var(--accent); color: var(--accent-text, #fff); }
|
|
|
|
/* ----------------- search ----------------- */
|
|
.trek-dash .st-search {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 7px;
|
|
margin: 0 12px 9px;
|
|
padding: 0 9px;
|
|
height: 32px;
|
|
flex: none;
|
|
border-radius: 9px;
|
|
background: var(--surface);
|
|
border: 1px solid var(--line-2);
|
|
color: var(--ink-3);
|
|
transition: border-color .16s;
|
|
}
|
|
.trek-dash .st-search:focus-within { border-color: var(--accent); }
|
|
.trek-dash .st-search input {
|
|
flex: 1;
|
|
min-width: 0;
|
|
background: transparent;
|
|
border: 0;
|
|
color: var(--ink);
|
|
font-size: 12.5px;
|
|
}
|
|
.trek-dash .st-search input:focus { outline: none; }
|
|
.trek-dash .st-search button {
|
|
width: 18px;
|
|
height: 18px;
|
|
display: grid;
|
|
place-items: center;
|
|
border-radius: 999px;
|
|
color: var(--ink-3);
|
|
}
|
|
.trek-dash .st-search button:hover { background: color-mix(in oklch, var(--ink) 10%, transparent); color: var(--ink); }
|
|
|
|
/* ----------------- badges ----------------- */
|
|
.trek-dash .st-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
height: 17px;
|
|
padding: 0 7px;
|
|
border-radius: 999px;
|
|
background: color-mix(in oklch, var(--ink) 7%, transparent);
|
|
color: var(--ink-2);
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.005em;
|
|
white-space: nowrap;
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
/* The date keeps its full width; the place gives way. Both were shrinkable
|
|
flex items, so a long address ate into the date until it read "Tue, ." —
|
|
a truncated place is a truncated place, but a truncated date is wrong. */
|
|
.trek-dash .st-entry-meta > .st-badge { flex: none; }
|
|
.trek-dash .st-badge.is-quiet {
|
|
background: transparent;
|
|
color: var(--ink-3);
|
|
font-weight: 500;
|
|
padding-left: 2px;
|
|
flex: 0 1 auto;
|
|
min-width: 0;
|
|
}
|
|
|
|
/* ----------------- content browser ----------------- */
|
|
.trek-dash .st-photo-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 5px;
|
|
}
|
|
/* A message is not a photo: left in a column it wrapped one word per line. */
|
|
.trek-dash .st-photo-grid > .st-hint { grid-column: 1 / -1; }
|
|
.trek-dash .st-photo-cell {
|
|
aspect-ratio: 1;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
background: var(--surface-2);
|
|
border: 1px solid var(--line);
|
|
transition: transform .14s ease-out, box-shadow .14s;
|
|
}
|
|
.trek-dash .st-photo-cell:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
|
|
.trek-dash .st-photo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
|
|
|
.trek-dash .st-entries { display: flex; flex-direction: column; gap: 8px; }
|
|
.trek-dash .st-entry {
|
|
padding: 10px 11px 11px;
|
|
border-radius: var(--r-sm);
|
|
background: color-mix(in oklch, var(--surface) 70%, transparent);
|
|
border: 1px solid var(--line);
|
|
}
|
|
.trek-dash .st-entry-head { font-size: 12.5px; font-weight: 600; letter-spacing: -0.01em; }
|
|
.trek-dash .st-entry-meta { display: flex; align-items: center; gap: 5px; margin-top: 5px; min-width: 0; }
|
|
|
|
.trek-dash .st-stack { display: flex; flex-direction: column; gap: 5px; }
|
|
.trek-dash .st-tile {
|
|
display: flex;
|
|
align-items: center;
|
|
height: 44px;
|
|
padding: 0 13px;
|
|
border-radius: 10px;
|
|
text-align: left;
|
|
color: var(--ink);
|
|
background: color-mix(in oklch, var(--surface) 65%, transparent);
|
|
border: 1px solid var(--line);
|
|
transition: background .16s, border-color .16s, transform .14s;
|
|
}
|
|
.trek-dash .st-tile:hover { background: var(--surface); border-color: var(--line-2); transform: translateY(-1px); }
|
|
|
|
/*
|
|
* Three across, sharing the panel.
|
|
*
|
|
* These were fixed-width tiles in a wrapping flex row, which meant the row
|
|
* always ended short of the panel edge by whatever did not divide evenly — a
|
|
* ragged right margin under headings that are themselves full width. A grid of
|
|
* equal fractions ends flush, the same way the tab strip above it does, and the
|
|
* tiles get bigger for free, which a drawn shape needs more than an icon does.
|
|
*/
|
|
.trek-dash .st-shape-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 6px;
|
|
}
|
|
.trek-dash .st-shape-btn {
|
|
width: auto;
|
|
/* Square, so the tile follows the column width instead of pinning it. */
|
|
aspect-ratio: 1;
|
|
min-width: 0;
|
|
display: grid;
|
|
place-items: center;
|
|
border-radius: 11px;
|
|
color: var(--ink-2);
|
|
background: color-mix(in oklch, var(--surface) 65%, transparent);
|
|
border: 1px solid var(--line);
|
|
transition: background .16s, transform .14s, color .16s;
|
|
}
|
|
.trek-dash .st-shape-btn:hover { background: var(--surface); color: var(--ink); transform: translateY(-1px); }
|
|
|
|
/* ----------------- template cards ----------------- */
|
|
.trek-dash .st-tpl-slot {
|
|
position: absolute;
|
|
border-radius: 1.5px;
|
|
background: color-mix(in oklch, var(--ink) 16%, transparent);
|
|
}
|
|
.trek-dash .st-tpl-slot.is-heading { background: color-mix(in oklch, var(--ink) 45%, transparent); }
|
|
.trek-dash .st-tpl-slot.is-meta { background: color-mix(in oklch, var(--ink) 26%, transparent); }
|
|
.trek-dash .st-tpl-slot.is-body {
|
|
background: repeating-linear-gradient(
|
|
to bottom,
|
|
color-mix(in oklch, var(--ink) 22%, transparent) 0 1px,
|
|
transparent 1px 3px
|
|
);
|
|
}
|
|
.trek-dash .st-tpl-fold {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 1px;
|
|
background: color-mix(in oklch, var(--ink) 12%, transparent);
|
|
}
|
|
|
|
/* ----------------- selection chrome ----------------- */
|
|
/*
|
|
* Drawn in screen pixels above the page, never inside it: an outline that lived
|
|
* on the sheet would scale with the zoom (hairline at 30%, a fat band at 300%)
|
|
* and, worse, would be one mistake away from ending up in the print.
|
|
*/
|
|
.trek-dash .st-chrome {
|
|
position: absolute;
|
|
inset: 0;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.trek-dash .st-select {
|
|
position: absolute;
|
|
pointer-events: none;
|
|
/*
|
|
* Two rings, not one. A single accent line vanishes the moment it crosses a
|
|
* photograph of the same value — and over a picture that is dark on one side
|
|
* and bright on the other, no single colour works and no measurement of "the"
|
|
* background behind the frame can be right. A dark line with a light one
|
|
* immediately outside it always leaves one of the two readable, whatever it
|
|
* happens to be lying on. The soft halo outside them is decoration and may
|
|
* disappear against anything it likes.
|
|
*/
|
|
box-shadow:
|
|
0 0 0 1.5px var(--accent),
|
|
0 0 0 2.5px rgba(255, 255, 255, .92),
|
|
0 0 0 6px color-mix(in oklch, var(--accent) 13%, transparent);
|
|
border-radius: 1px;
|
|
}
|
|
|
|
/* Corners round, edges as short bars — you can tell what a handle will do
|
|
before you touch it, which eight identical squares never manage. */
|
|
.trek-dash .st-handle {
|
|
position: absolute;
|
|
background: #fff;
|
|
border: 1.5px solid var(--accent);
|
|
/* Same reasoning as the frame: a white ring outside the dark border keeps the
|
|
handle findable on a dark photograph. */
|
|
box-shadow: 0 0 0 1px rgba(255, 255, 255, .85), 0 1px 3px oklch(0 0 0 / .3);
|
|
pointer-events: auto;
|
|
transition: transform .12s ease-out, box-shadow .12s;
|
|
}
|
|
.trek-dash .st-handle:hover { transform: scale(1.25); box-shadow: 0 0 0 1px rgba(255,255,255,.85), 0 2px 7px oklch(0 0 0 / .34); }
|
|
.trek-dash .st-handle.is-corner {
|
|
width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%;
|
|
}
|
|
.trek-dash .st-handle.is-h {
|
|
width: 22px; height: 7px; margin: -3.5px 0 0 -11px; border-radius: 4px;
|
|
}
|
|
.trek-dash .st-handle.is-v {
|
|
width: 7px; height: 22px; margin: -11px 0 0 -3.5px; border-radius: 4px;
|
|
}
|
|
|
|
/* Drop target for a photo dragged in from the content panel. */
|
|
.trek-dash .st-drop {
|
|
position: absolute;
|
|
pointer-events: none;
|
|
border-radius: 2px;
|
|
box-shadow:
|
|
0 0 0 2px var(--accent),
|
|
0 0 0 3px rgba(255, 255, 255, .9),
|
|
inset 0 0 0 100vmax color-mix(in oklch, var(--accent) 16%, transparent);
|
|
}
|
|
|
|
/* In-place text editing: sits exactly on the element, in its own type. */
|
|
.trek-dash .st-inline-edit {
|
|
position: absolute;
|
|
z-index: 4;
|
|
margin: 0;
|
|
padding: 0;
|
|
border: 0;
|
|
resize: none;
|
|
overflow: hidden;
|
|
background: rgba(255, 255, 255, .92);
|
|
box-shadow: 0 0 0 1.5px var(--accent), 0 0 0 2.5px rgba(255, 255, 255, .9);
|
|
white-space: pre-wrap;
|
|
user-select: text;
|
|
-webkit-user-select: text;
|
|
}
|
|
.trek-dash .st-inline-edit:focus { outline: none; }
|
|
|
|
/* ----------------- floating quick bar ----------------- */
|
|
.trek-dash .st-quickbar {
|
|
position: absolute;
|
|
transform: translate(-50%, -100%);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1px;
|
|
padding: 4px;
|
|
border-radius: 11px;
|
|
background: var(--glass-bg);
|
|
border: 1px solid var(--glass-border);
|
|
box-shadow: var(--sh-md), var(--glass-highlight);
|
|
backdrop-filter: blur(24px) saturate(1.7);
|
|
-webkit-backdrop-filter: blur(24px) saturate(1.7);
|
|
pointer-events: auto;
|
|
animation: st-quick-in 130ms cubic-bezier(0.23, 1, 0.32, 1) both;
|
|
z-index: 3;
|
|
}
|
|
@keyframes st-quick-in {
|
|
from { opacity: 0; transform: translate(-50%, calc(-100% + 5px)); }
|
|
to { opacity: 1; transform: translate(-50%, -100%); }
|
|
}
|
|
@media (prefers-reduced-motion: reduce) { .trek-dash .st-quickbar { animation-duration: 70ms; } }
|
|
|
|
.trek-dash .st-quickbar button {
|
|
width: 27px;
|
|
height: 27px;
|
|
display: grid;
|
|
place-items: center;
|
|
border-radius: 8px;
|
|
color: var(--ink-2);
|
|
transition: background .14s, color .14s;
|
|
}
|
|
.trek-dash .st-quickbar button:hover { background: color-mix(in oklch, var(--ink) 9%, transparent); color: var(--ink); }
|
|
.trek-dash .st-quickbar button.is-danger:hover { background: color-mix(in oklch, #e11d48 16%, transparent); color: #e11d48; }
|
|
.trek-dash .st-quickbar-sep { width: 1px; height: 16px; background: var(--line-2); margin: 0 3px; }
|
|
|
|
.trek-dash .st-guide {
|
|
position: absolute;
|
|
background: #f43f5e; /* theme-lint-disable — an alignment guide must not be the accent, or it vanishes against a selection outline */
|
|
box-shadow: 0 0 0 1px rgba(255, 255, 255, .7);
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* ----------------- floating zoom pill ----------------- */
|
|
.trek-dash .st-zoom {
|
|
position: absolute;
|
|
left: 50%;
|
|
bottom: 18px;
|
|
/* Above the sheet and above the peer pointers: it is the way back out of a
|
|
zoom level, and it must never be the thing that is covered. */
|
|
z-index: 6;
|
|
pointer-events: auto;
|
|
transform: translateX(-50%);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
height: 44px;
|
|
padding: 0 6px;
|
|
border-radius: 999px;
|
|
background: var(--glass-bg);
|
|
border: 1px solid var(--glass-border);
|
|
box-shadow: var(--glass-shadow), var(--glass-highlight);
|
|
backdrop-filter: blur(30px) saturate(1.8);
|
|
-webkit-backdrop-filter: blur(30px) saturate(1.8);
|
|
z-index: 2;
|
|
}
|
|
.trek-dash .st-zoom button {
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 999px;
|
|
display: grid;
|
|
place-items: center;
|
|
color: var(--ink-2);
|
|
transition: background .18s, color .18s;
|
|
}
|
|
.trek-dash .st-zoom button:hover:not(:disabled) { background: color-mix(in oklch, var(--ink) 8%, transparent); color: var(--ink); }
|
|
.trek-dash .st-zoom button:disabled { opacity: .35; }
|
|
.trek-dash .st-zoom-value {
|
|
min-width: 54px;
|
|
text-align: center;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
color: var(--ink-2);
|
|
font-variant-numeric: tabular-nums;
|
|
letter-spacing: -0.01em;
|
|
}
|
|
|
|
/* ----------------- inspector controls ----------------- */
|
|
.trek-dash .st-section { padding: 12px 2px 14px; border-bottom: 1px solid var(--line); }
|
|
.trek-dash .st-section:last-of-type { border-bottom: 0; }
|
|
.trek-dash .st-section-label {
|
|
font-size: 10.5px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.13em;
|
|
color: var(--ink-3);
|
|
margin-bottom: 9px;
|
|
}
|
|
|
|
.trek-dash .st-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
|
.trek-dash .st-row { display: flex; flex-wrap: wrap; gap: 5px; }
|
|
|
|
.trek-dash .st-field { display: flex; align-items: center; gap: 7px; min-width: 0; }
|
|
.trek-dash .st-field > span {
|
|
font-size: 11px;
|
|
color: var(--ink-3);
|
|
flex: none;
|
|
min-width: 13px;
|
|
}
|
|
.trek-dash .st-field input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); }
|
|
|
|
.trek-dash .st-input {
|
|
width: 100%;
|
|
min-width: 0;
|
|
height: 28px;
|
|
padding: 0 8px;
|
|
border-radius: 8px;
|
|
background: var(--surface);
|
|
border: 1px solid var(--line-2);
|
|
color: var(--ink);
|
|
font-size: 12px;
|
|
font-variant-numeric: tabular-nums;
|
|
transition: border-color .16s;
|
|
}
|
|
.trek-dash .st-input:focus { outline: none; border-color: var(--accent); }
|
|
.trek-dash .st-textarea {
|
|
height: auto;
|
|
padding: 8px;
|
|
line-height: 1.5;
|
|
font-variant-numeric: normal;
|
|
resize: vertical;
|
|
}
|
|
|
|
.trek-dash .st-chip {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 5px;
|
|
height: 27px;
|
|
padding: 0 10px;
|
|
border-radius: 999px;
|
|
background: color-mix(in oklch, var(--ink) 5%, transparent);
|
|
color: var(--ink-2);
|
|
font-size: 11.5px;
|
|
font-weight: 500;
|
|
white-space: nowrap;
|
|
transition: background .16s, color .16s;
|
|
}
|
|
.trek-dash .st-chip:hover { background: color-mix(in oklch, var(--ink) 10%, transparent); color: var(--ink); }
|
|
.trek-dash .st-chip.is-on { background: var(--accent); color: var(--accent-text, #fff); }
|
|
.trek-dash .st-chip.is-icon { width: 27px; padding: 0; }
|
|
.trek-dash .st-chip.is-danger:hover { background: color-mix(in oklch, #e11d48 18%, transparent); color: #e11d48; }
|
|
.trek-dash .st-chip:focus { outline: none; }
|
|
.trek-dash .st-chip:focus-visible { box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 3px var(--accent); }
|
|
|
|
.trek-dash .st-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
.trek-dash .st-swatch {
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 7px;
|
|
border: 1px solid var(--line-2);
|
|
box-shadow: var(--sh-xs);
|
|
transition: transform .14s, box-shadow .14s;
|
|
}
|
|
.trek-dash .st-swatch:hover { transform: scale(1.08); }
|
|
.trek-dash .st-swatch.is-on { box-shadow: 0 0 0 2px var(--accent); }
|
|
.trek-dash .st-swatch-custom {
|
|
position: relative;
|
|
overflow: hidden;
|
|
background: conic-gradient(#e11d48, #f59e0b, #10b981, #3b82f6, #8b5cf6, #e11d48); /* theme-lint-disable — the colour wheel is the control */
|
|
cursor: pointer;
|
|
}
|
|
.trek-dash .st-swatch-custom input { position: absolute; inset: -6px; opacity: 0; cursor: pointer; }
|
|
|
|
/* ----------------- focal point pad ----------------- */
|
|
.trek-dash .st-focal-wrap { margin-top: 9px; }
|
|
.trek-dash .st-focal {
|
|
position: relative;
|
|
width: 100%;
|
|
aspect-ratio: 3 / 2;
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
border: 1px solid var(--line-2);
|
|
background: var(--surface-2);
|
|
cursor: crosshair;
|
|
touch-action: none;
|
|
}
|
|
.trek-dash .st-focal img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
display: block;
|
|
pointer-events: none;
|
|
user-select: none;
|
|
}
|
|
.trek-dash .st-focal-dot {
|
|
position: absolute;
|
|
width: 18px;
|
|
height: 18px;
|
|
margin: -9px 0 0 -9px;
|
|
border-radius: 50%;
|
|
border: 2px solid #fff;
|
|
box-shadow: 0 0 0 1px oklch(0 0 0 / .35), 0 2px 6px oklch(0 0 0 / .4);
|
|
pointer-events: none;
|
|
}
|
|
.trek-dash .st-focal-dot::after {
|
|
content: '';
|
|
position: absolute;
|
|
inset: 5px;
|
|
border-radius: 50%;
|
|
background: #fff;
|
|
}
|
|
|
|
/* ----------------- inspector placeholder ----------------- */
|
|
.trek-dash .st-hint {
|
|
font-size: 12.5px;
|
|
line-height: 1.6;
|
|
color: var(--ink-3);
|
|
padding: 6px 2px;
|
|
}
|
|
|
|
/* ----------------- phone ----------------- */
|
|
.trek-dash.st-phone {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 70;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 14px;
|
|
padding: 32px;
|
|
text-align: center;
|
|
background: var(--bg);
|
|
color: var(--ink);
|
|
}
|
|
|
|
/* ----------------- shape, frame and grid tiles ----------------- *
|
|
* Everything below is scoped under .trek-dash for the same reason the rest of
|
|
* this file is: dashboard.css resets button font, colour, background and
|
|
* padding at a specificity a bare .st-x loses to, so an unscoped rule silently
|
|
* does not apply to a <button>.
|
|
*/
|
|
|
|
/* A drawn shape needs room to be recognisable; a lucide glyph does not. The
|
|
tile keeps its size and the artwork inside it grows instead. */
|
|
.trek-dash .st-shape-btn.is-glyph { padding: 10px; color: var(--ink-2); }
|
|
.trek-dash .st-shape-btn.is-glyph svg { width: 100%; height: 100%; }
|
|
.trek-dash .st-shape-btn.is-glyph:hover { color: var(--ink); }
|
|
|
|
.trek-dash .st-shape-btn.is-frame,
|
|
.trek-dash .st-shape-btn.is-map { padding: 8px; }
|
|
|
|
/* The frame previews stand in for paper and film, so they carry their own
|
|
colours rather than the app's — see the theme-lint note in the component. */
|
|
.trek-dash .st-frame-glyph {
|
|
position: relative;
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: 3px;
|
|
}
|
|
.trek-dash .st-frame-glyph-photo {
|
|
position: absolute;
|
|
border-radius: 2px;
|
|
background: linear-gradient(to bottom, #cfe8f7 0%, #e8f2f8 52%, #8fbf59 53%, #5d8f33 100%);
|
|
}
|
|
/* Centred on the corner and mirrored, matching what SpreadView actually draws. */
|
|
.trek-dash .st-frame-glyph-tape {
|
|
position: absolute;
|
|
left: -8px;
|
|
top: -3px;
|
|
width: 16px;
|
|
height: 6px;
|
|
border-radius: 1px;
|
|
background: rgba(236, 228, 206, .85);
|
|
transform: rotate(-45deg);
|
|
}
|
|
.trek-dash .st-frame-glyph-tape.is-right {
|
|
left: auto;
|
|
right: -8px;
|
|
transform: rotate(45deg);
|
|
}
|
|
|
|
/* Grid cards are wider than shape tiles because the thing being shown is a
|
|
proportion — four cells in a 52px square are indistinguishable from six. */
|
|
.trek-dash .st-grid-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 7px;
|
|
}
|
|
.trek-dash .st-grid-btn {
|
|
aspect-ratio: 4 / 3;
|
|
padding: 5px;
|
|
border-radius: 9px;
|
|
background: color-mix(in oklch, var(--surface) 65%, transparent);
|
|
border: 1px solid var(--line);
|
|
transition: background .16s, transform .14s, border-color .16s;
|
|
}
|
|
.trek-dash .st-grid-btn:hover {
|
|
background: var(--surface);
|
|
border-color: var(--line-2);
|
|
transform: translateY(-1px);
|
|
}
|
|
.trek-dash .st-grid-preview {
|
|
position: relative;
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
/* The cell insets are drawn here rather than in the component so the preview's
|
|
gap follows the theme's line weight instead of a hardcoded pixel. */
|
|
.trek-dash .st-grid-preview > span {
|
|
position: absolute;
|
|
border: 1px solid transparent;
|
|
background-clip: padding-box;
|
|
background-color: color-mix(in oklch, var(--ink) 20%, transparent);
|
|
border-radius: 2px;
|
|
}
|
|
.trek-dash .st-grid-btn:hover .st-grid-preview > span {
|
|
background-color: color-mix(in oklch, var(--accent) 55%, transparent);
|
|
}
|
|
|
|
/* A stale figure is worth a word, not an alarm: the numbers on the page are
|
|
still correct, they are just no longer current. */
|
|
.trek-dash .st-stale {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 7px 9px;
|
|
margin-bottom: 8px;
|
|
border-radius: 8px;
|
|
font-size: 11px;
|
|
line-height: 1.45;
|
|
color: var(--ink-2);
|
|
background: color-mix(in oklch, var(--warn, #b45309) 12%, transparent);
|
|
}
|
|
|
|
/* A dense picker for swapping a placed shape or choosing a photo mask. Smaller
|
|
than the panel tiles on purpose: this is a list you scan for the one you
|
|
already have in mind, not a gallery you browse. */
|
|
.trek-dash .st-mini-shapes {
|
|
display: grid;
|
|
grid-template-columns: repeat(7, 1fr);
|
|
gap: 4px;
|
|
max-height: 168px;
|
|
overflow-y: auto;
|
|
}
|
|
.trek-dash .st-mini-shape {
|
|
aspect-ratio: 1;
|
|
padding: 4px;
|
|
border-radius: 7px;
|
|
color: var(--ink-3);
|
|
border: 1px solid transparent;
|
|
transition: background .14s, color .14s, border-color .14s;
|
|
}
|
|
.trek-dash .st-mini-shape:hover { background: var(--surface); color: var(--ink); }
|
|
.trek-dash .st-mini-shape.is-on {
|
|
color: var(--accent);
|
|
border-color: color-mix(in oklch, var(--accent) 45%, transparent);
|
|
background: color-mix(in oklch, var(--accent) 10%, transparent);
|
|
}
|
|
.trek-dash .st-mini-shape svg { width: 100%; height: 100%; display: block; }
|
|
/* "No mask" is the absence of a shape, drawn as the plain rectangle a photo is
|
|
without one — an empty tile would read as a missing icon. */
|
|
.trek-dash .st-mini-none {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: 2px;
|
|
border: 1.5px dashed currentColor;
|
|
opacity: .6;
|
|
}
|
|
|
|
/* ----------------- travel cards ----------------- *
|
|
* Two to a row, each showing the element it places rather than naming it. The
|
|
* preview sits on paper-white because that is what it will be printed on — a
|
|
* map or a set of figures previewed on the panel's own translucent surface
|
|
* would read as lighter than it comes out.
|
|
*/
|
|
.trek-dash .st-travel-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 7px;
|
|
/* Cards keep their own height rather than stretching to the tallest in the
|
|
row: the preview is the element's own shape, and padding it out to match a
|
|
neighbour would misrepresent it. */
|
|
align-items: start;
|
|
}
|
|
/* One to a row, for elements as wide as a spread. */
|
|
.trek-dash .st-travel-grid.is-wide { grid-template-columns: 1fr; }
|
|
.trek-dash .st-travel-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
gap: 5px;
|
|
padding: 4px;
|
|
border-radius: 10px;
|
|
border: 1px solid var(--line);
|
|
background: color-mix(in oklch, var(--surface) 60%, transparent);
|
|
transition: background .16s, border-color .16s, transform .14s;
|
|
min-width: 0;
|
|
}
|
|
.trek-dash .st-travel-card:hover {
|
|
background: var(--surface);
|
|
border-color: color-mix(in oklch, var(--accent) 40%, var(--line-2));
|
|
transform: translateY(-1px);
|
|
}
|
|
.trek-dash .st-travel-preview {
|
|
position: relative;
|
|
display: block;
|
|
width: 100%;
|
|
/* The tile is the frame: an element wider than its card is cropped rather
|
|
than allowed to run across the neighbouring one. */
|
|
overflow: hidden;
|
|
border-radius: 6px;
|
|
background: #ffffff; /* theme-lint-disable — the preview stands on paper, not on the panel */
|
|
box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--ink) 7%, transparent);
|
|
}
|
|
.trek-dash .st-travel-card-label {
|
|
display: block;
|
|
padding: 0 2px 1px;
|
|
font-size: 10.5px;
|
|
line-height: 1.3;
|
|
font-weight: 500;
|
|
color: var(--ink-3);
|
|
text-align: left;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
.trek-dash .st-travel-card:hover .st-travel-card-label { color: var(--ink-2); }
|
|
|
|
/* ----------------- page actions ----------------- *
|
|
* The controls live on the thumbnail, appearing on hover or when the spread is
|
|
* the one being edited. Always-on they would be five buttons per page down a
|
|
* 200px rail; behind a menu they would be a click away from something you do
|
|
* constantly while laying a book out.
|
|
*/
|
|
.trek-dash .st-thumb-row { position: relative; }
|
|
|
|
.trek-dash .st-thumb-actions {
|
|
position: absolute;
|
|
top: 7px;
|
|
right: 7px;
|
|
display: flex;
|
|
gap: 2px;
|
|
padding: 2px;
|
|
border-radius: 8px;
|
|
background: color-mix(in oklch, var(--bg) 86%, transparent);
|
|
backdrop-filter: blur(6px);
|
|
-webkit-backdrop-filter: blur(6px);
|
|
border: 1px solid var(--glass-border);
|
|
box-shadow: var(--sh-sm);
|
|
opacity: 0;
|
|
transform: translateY(-2px);
|
|
transition: opacity .14s, transform .14s;
|
|
pointer-events: none;
|
|
}
|
|
.trek-dash .st-thumb-row:hover .st-thumb-actions,
|
|
.trek-dash .st-thumb-row:focus-within .st-thumb-actions {
|
|
opacity: 1;
|
|
transform: none;
|
|
pointer-events: auto;
|
|
}
|
|
.trek-dash .st-thumb-actions button {
|
|
display: grid;
|
|
place-items: center;
|
|
width: 21px;
|
|
height: 21px;
|
|
border-radius: 6px;
|
|
color: var(--ink-2);
|
|
transition: background .14s, color .14s, opacity .14s;
|
|
}
|
|
.trek-dash .st-thumb-actions button:hover:not(:disabled) {
|
|
background: color-mix(in oklch, var(--ink) 9%, transparent);
|
|
color: var(--ink);
|
|
}
|
|
.trek-dash .st-thumb-actions button:disabled { opacity: .3; }
|
|
.trek-dash .st-thumb-actions button.is-danger:hover:not(:disabled) {
|
|
background: color-mix(in oklch, var(--danger, #b91c1c) 14%, transparent);
|
|
color: var(--danger, #b91c1c);
|
|
}
|
|
|
|
/* The insert point sits in the gap between two spreads and only shows itself
|
|
when you are over it, so the rail reads as a list of pages rather than as a
|
|
list of pages and buttons. */
|
|
.trek-dash .st-thumb-insert {
|
|
position: absolute;
|
|
left: 50%;
|
|
bottom: -8px;
|
|
transform: translateX(-50%);
|
|
display: grid;
|
|
place-items: center;
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 999px;
|
|
z-index: 2;
|
|
color: var(--accent-text, #fff);
|
|
background: var(--accent);
|
|
border: 2px solid var(--bg);
|
|
opacity: 0;
|
|
transition: opacity .14s;
|
|
}
|
|
.trek-dash .st-thumb-row:hover .st-thumb-insert,
|
|
.trek-dash .st-thumb-insert:focus-visible { opacity: 1; }
|
|
|
|
.trek-dash .st-add-page {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
width: 100%;
|
|
height: 34px;
|
|
margin-top: 10px;
|
|
border-radius: 10px;
|
|
border: 1px dashed var(--line-2);
|
|
color: var(--ink-3);
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
transition: background .16s, color .16s, border-color .16s;
|
|
}
|
|
.trek-dash .st-add-page:hover {
|
|
background: var(--surface);
|
|
border-color: color-mix(in oklch, var(--accent) 45%, var(--line-2));
|
|
color: var(--ink);
|
|
}
|
|
|
|
/* ----------------- brand ----------------- *
|
|
* The lockup takes the bar's ink through `currentColor`, so it is dark on a
|
|
* light theme and light on a dark one from one copy of the artwork.
|
|
*/
|
|
.trek-dash .st-brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 9px;
|
|
flex: 0 0 auto;
|
|
color: var(--ink);
|
|
min-width: 0;
|
|
}
|
|
.trek-dash .st-brand svg { flex: none; }
|
|
|
|
/* Small, quiet and set apart — a beta mark states a fact about the feature; it
|
|
is not a call to action and should not read as one. */
|
|
.trek-dash .st-beta {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
height: 16px;
|
|
padding: 0 6px;
|
|
border-radius: 999px;
|
|
font-size: 9.5px;
|
|
font-weight: 700;
|
|
letter-spacing: 0.09em;
|
|
text-transform: uppercase;
|
|
color: var(--accent);
|
|
background: color-mix(in oklch, var(--accent) 13%, transparent);
|
|
border: 1px solid color-mix(in oklch, var(--accent) 26%, transparent);
|
|
flex: none;
|
|
}
|
|
|
|
/* ----------------- custom trim ----------------- */
|
|
.trek-dash .st-menu-sep {
|
|
height: 1px;
|
|
margin: 6px 4px;
|
|
background: var(--line);
|
|
}
|
|
.trek-dash .st-menu-custom {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
gap: 6px;
|
|
padding: 2px 8px 4px;
|
|
}
|
|
.trek-dash .st-menu-custom label {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 3px;
|
|
min-width: 0;
|
|
flex: 1;
|
|
}
|
|
.trek-dash .st-menu-custom label span {
|
|
font-size: 9.5px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.12em;
|
|
text-transform: uppercase;
|
|
color: var(--ink-3);
|
|
}
|
|
.trek-dash .st-menu-custom input {
|
|
width: 100%;
|
|
min-width: 0;
|
|
height: 28px;
|
|
padding: 0 8px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--line-2);
|
|
background: var(--surface);
|
|
color: var(--ink);
|
|
font-size: 12.5px;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
.trek-dash .st-menu-custom input:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
.trek-dash .st-menu-times,
|
|
.trek-dash .st-menu-unit {
|
|
font-size: 11px;
|
|
color: var(--ink-3);
|
|
padding-bottom: 7px;
|
|
flex: none;
|
|
}
|
|
|
|
/* ----------------- font picker ----------------- *
|
|
* Each family set in itself. A row of chips reading "Poppins / Lora / Bebas" in
|
|
* the interface font tells you their names and nothing about how they look,
|
|
* which is the only thing anyone is choosing between.
|
|
*/
|
|
.trek-dash .st-fonts {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 4px;
|
|
}
|
|
.trek-dash .st-font {
|
|
height: 32px;
|
|
padding: 0 8px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--line);
|
|
background: color-mix(in oklch, var(--surface) 55%, transparent);
|
|
color: var(--ink-2);
|
|
font-size: 14px;
|
|
line-height: 1;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
min-width: 0;
|
|
transition: background .14s, border-color .14s, color .14s;
|
|
}
|
|
.trek-dash .st-font:hover { background: var(--surface); color: var(--ink); }
|
|
.trek-dash .st-font.is-on {
|
|
color: var(--ink);
|
|
border-color: color-mix(in oklch, var(--accent) 50%, transparent);
|
|
background: color-mix(in oklch, var(--accent) 10%, transparent);
|
|
}
|
|
.trek-dash .st-chip:disabled { opacity: .32; cursor: default; }
|
|
|
|
/* ----------------- save state ----------------- *
|
|
* Quiet by default. A status that announces every successful save is one people
|
|
* learn to stop reading, which is the wrong habit for the one time it says
|
|
* something else.
|
|
*/
|
|
.trek-dash .st-save {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
height: 26px;
|
|
padding: 0 10px;
|
|
border-radius: 999px;
|
|
font-size: 11.5px;
|
|
font-weight: 500;
|
|
color: var(--ink-3);
|
|
background: color-mix(in oklch, var(--ink) 5%, transparent);
|
|
flex: none;
|
|
white-space: nowrap;
|
|
}
|
|
.trek-dash .st-save.is-quiet { background: transparent; }
|
|
.trek-dash .st-save.is-error {
|
|
color: var(--danger, #b91c1c);
|
|
background: color-mix(in oklch, var(--danger, #b91c1c) 12%, transparent);
|
|
}
|
|
.trek-dash .st-save.is-conflict {
|
|
color: var(--ink);
|
|
background: color-mix(in oklch, var(--warn, #b45309) 16%, transparent);
|
|
border: 1px solid color-mix(in oklch, var(--warn, #b45309) 34%, transparent);
|
|
height: 28px;
|
|
}
|
|
.trek-dash .st-save.is-conflict button {
|
|
height: 20px;
|
|
padding: 0 8px;
|
|
border-radius: 999px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--ink);
|
|
background: color-mix(in oklch, var(--ink) 10%, transparent);
|
|
}
|
|
.trek-dash .st-save.is-conflict button:hover {
|
|
background: color-mix(in oklch, var(--ink) 18%, transparent);
|
|
}
|
|
|
|
.trek-dash .st-spin { animation: st-spin 900ms linear infinite; }
|
|
@keyframes st-spin { to { transform: rotate(360deg); } }
|
|
@media (prefers-reduced-motion: reduce) { .trek-dash .st-spin { animation: none; } }
|
|
|
|
/* ── Export dialog (#1973) ────────────────────────────────────────────────
|
|
Its own prefix rather than `.st-field` and friends: those already mean a
|
|
labelled row in the toolbar, and one class doing two jobs is how a toolbar
|
|
tweak silently reflows a dialog. */
|
|
.trek-dash .st-ex {
|
|
position: absolute;
|
|
inset: 0;
|
|
z-index: 40;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 16px;
|
|
background: color-mix(in oklch, var(--ink) 42%, transparent);
|
|
backdrop-filter: blur(2px);
|
|
}
|
|
.trek-dash .st-ex-card {
|
|
width: 100%;
|
|
max-width: 380px;
|
|
/* Opaque for the same reason as .st-menu — see there. */
|
|
background: var(--surface);
|
|
border: 1px solid var(--line-2);
|
|
border-radius: 14px;
|
|
box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
|
|
overflow: hidden;
|
|
}
|
|
.trek-dash .st-ex-head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 14px;
|
|
border-bottom: 1px solid var(--line);
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.04em;
|
|
text-transform: uppercase;
|
|
color: var(--ink-3);
|
|
}
|
|
.trek-dash .st-ex-x {
|
|
display: grid;
|
|
place-items: center;
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 7px;
|
|
color: var(--ink-3);
|
|
}
|
|
.trek-dash .st-ex-x:hover { background: color-mix(in oklch, var(--ink) 8%, transparent); color: var(--ink); }
|
|
.trek-dash .st-ex-body { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
|
|
.trek-dash .st-ex-field { display: flex; flex-direction: column; gap: 6px; }
|
|
.trek-dash .st-ex-label {
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
letter-spacing: 0.06em;
|
|
text-transform: uppercase;
|
|
color: var(--ink-3);
|
|
}
|
|
.trek-dash .st-ex-opt {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 10px;
|
|
width: 100%;
|
|
padding: 10px 11px;
|
|
text-align: left;
|
|
border: 1px solid var(--line);
|
|
border-radius: 10px;
|
|
background: var(--surface-2);
|
|
color: var(--ink-2);
|
|
}
|
|
.trek-dash .st-ex-opt:hover { border-color: color-mix(in oklch, var(--accent) 40%, var(--line)); }
|
|
.trek-dash .st-ex-opt.is-on {
|
|
border-color: var(--accent);
|
|
background: color-mix(in oklch, var(--accent) 9%, var(--surface-2));
|
|
color: var(--ink);
|
|
}
|
|
.trek-dash .st-ex-opt svg { margin-top: 1px; flex: 0 0 auto; }
|
|
.trek-dash .st-ex-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
|
|
.trek-dash .st-ex-name { font-size: 12.5px; font-weight: 600; color: var(--ink); }
|
|
.trek-dash .st-ex-hint { font-size: 11px; line-height: 1.35; color: var(--ink-2); }
|
|
.trek-dash .st-ex-note {
|
|
margin: 0;
|
|
font-size: 11px;
|
|
line-height: 1.45;
|
|
color: var(--ink-3);
|
|
}
|
|
.trek-dash .st-ex-foot {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 8px;
|
|
padding: 12px 14px;
|
|
border-top: 1px solid var(--line);
|
|
}
|
|
.trek-dash .st-ex-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
height: 32px;
|
|
padding: 0 13px;
|
|
border-radius: 9px;
|
|
border: 1px solid var(--line-2);
|
|
background: var(--surface-2);
|
|
font-size: 12.5px;
|
|
font-weight: 600;
|
|
color: var(--ink);
|
|
}
|
|
.trek-dash .st-ex-btn:hover { background: color-mix(in oklch, var(--ink) 6%, var(--surface-2)); }
|
|
.trek-dash .st-ex-btn.is-primary {
|
|
border-color: transparent;
|
|
background: var(--accent);
|
|
color: var(--accent-text, #fff);
|
|
}
|
|
.trek-dash .st-ex-btn.is-primary:hover { filter: brightness(1.06); }
|
|
.trek-dash .st-ex-btn[disabled] { opacity: 0.55; }
|
|
|
|
/* ── Presence and pointers (#1973) ────────────────────────────────────────
|
|
The arrow is positioned in the sheet's millimetres and scales itself back
|
|
out, so it stays one size at every zoom — see PeerCursors.tsx. */
|
|
.trek-dash .st-peer {
|
|
position: absolute;
|
|
z-index: 5;
|
|
pointer-events: none;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 4px;
|
|
will-change: left, top;
|
|
}
|
|
.trek-dash .st-peer svg { flex: none; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28)); }
|
|
.trek-dash .st-peer-name {
|
|
margin-top: 10px;
|
|
padding: 2px 7px;
|
|
border-radius: 999px;
|
|
font-size: 10.5px;
|
|
font-weight: 600;
|
|
line-height: 1.4;
|
|
white-space: nowrap;
|
|
/* White on every colour in the palette, which is why they were chosen. */
|
|
color: #ffffff; /* theme-lint-disable — reads on the peer colour, not on app chrome */
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
|
|
}
|
|
|
|
/* One badge rather than loose dots with a word after them: the faces and the
|
|
label are one statement — who is in here — and a pill says so by holding
|
|
them together. Same shape as the other pieces of chrome in the bar. */
|
|
.trek-dash .st-peers {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 7px;
|
|
height: 28px;
|
|
padding: 0 10px 0 7px;
|
|
margin-left: 4px;
|
|
border-radius: 999px;
|
|
border: 1px solid var(--line);
|
|
background: var(--surface-2);
|
|
}
|
|
.trek-dash .st-peer-faces { display: inline-flex; align-items: center; }
|
|
.trek-dash .st-peer-dot {
|
|
display: grid;
|
|
place-items: center;
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 999px;
|
|
overflow: hidden;
|
|
font-size: 9.5px;
|
|
font-weight: 700;
|
|
line-height: 1;
|
|
color: #ffffff; /* theme-lint-disable — reads on the peer colour, not on app chrome */
|
|
/* The ring is the badge's own fill, so the faces read as cut out of it. */
|
|
border: 1.5px solid var(--surface-2);
|
|
/* Overlapped, the way a stack of faces reads as a group rather than a list. */
|
|
margin-right: -7px;
|
|
}
|
|
.trek-dash .st-peer-dot:last-child { margin-right: 0; }
|
|
.trek-dash .st-peer-dot img { width: 100%; height: 100%; object-fit: cover; }
|
|
.trek-dash .st-peer-more {
|
|
font-size: 10.5px;
|
|
font-weight: 600;
|
|
color: var(--ink-3);
|
|
margin-left: 11px;
|
|
}
|
|
.trek-dash .st-peer-label {
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
color: var(--ink-2);
|
|
white-space: nowrap;
|
|
}
|
|
@media (max-width: 1280px) { .trek-dash .st-peer-label { display: none; } }
|
|
|
|
/* ── The rotation handle (#1973) ──────────────────────────────────────────
|
|
Held out past the corner rather than sitting on it: a handle on the corner
|
|
is one you cannot tell from the one that resizes, and this is the gesture
|
|
where grabbing the wrong one is most annoying to undo. */
|
|
.trek-dash .st-rotate {
|
|
position: absolute;
|
|
z-index: 8;
|
|
display: grid;
|
|
place-items: center;
|
|
width: 17px;
|
|
height: 17px;
|
|
border-radius: 999px;
|
|
border: 1px solid transparent;
|
|
color: var(--ink-3);
|
|
cursor: grab;
|
|
touch-action: none;
|
|
/*
|
|
* The chrome layer and the selection box both let pointers through, so a
|
|
* click lands on the page underneath rather than on the outline drawn over
|
|
* it. A handle has to opt back in — without this it is drawn, and looks
|
|
* exactly right, and cannot be grabbed.
|
|
*/
|
|
pointer-events: auto;
|
|
/*
|
|
* Barely there until it is reached for.
|
|
*
|
|
* Four rings around every selection drown out the thing being selected, and
|
|
* the handles are not what anyone is looking at — they are what the hand
|
|
* goes to. So: a faint mark that says "something is here", which becomes a
|
|
* proper button under the pointer. The hit area stays full size either way,
|
|
* so the quiet version is no harder to grab than the loud one was.
|
|
*/
|
|
opacity: .28;
|
|
transition: opacity .12s, background .12s, border-color .12s, color .12s;
|
|
}
|
|
.trek-dash .st-rotate:hover {
|
|
opacity: 1;
|
|
background: var(--surface);
|
|
border-color: var(--accent);
|
|
color: var(--accent);
|
|
box-shadow: var(--sh-sm);
|
|
}
|
|
.trek-dash .st-rotate:active {
|
|
cursor: grabbing;
|
|
opacity: 1;
|
|
background: var(--surface);
|
|
border-color: var(--accent);
|
|
color: var(--accent);
|
|
}
|
|
|
|
/*
|
|
* Pushed diagonally clear of the resize handle sharing the corner: the near
|
|
* edge sits about 6px out, which is far enough that neither is ever grabbed by
|
|
* accident and near enough to still read as belonging to that corner.
|
|
*/
|
|
.trek-dash .st-rotate.is-nw { transform: translate(-131%, -131%); }
|
|
.trek-dash .st-rotate.is-ne { transform: translate(31%, -131%); }
|
|
.trek-dash .st-rotate.is-se { transform: translate(31%, 31%); }
|
|
.trek-dash .st-rotate.is-sw { transform: translate(-131%, 31%); }
|
|
|
|
|
|
/*
|
|
* Add spread, split with Import.
|
|
*
|
|
* The empty page is the common case and keeps the wider half; the import sits
|
|
* beside it rather than under it, because they are two answers to one question
|
|
* and a stacked second button reads as a lesser, separate thing.
|
|
*/
|
|
.trek-dash .st-add-row {
|
|
display: grid;
|
|
grid-template-columns: 1fr auto;
|
|
gap: 6px;
|
|
margin-top: 10px;
|
|
}
|
|
.trek-dash .st-add-row .st-add-page { margin-top: 0; }
|
|
.trek-dash .st-add-page.is-import {
|
|
width: auto;
|
|
padding: 0 11px;
|
|
}
|
|
.trek-dash .st-add-error {
|
|
margin-top: 6px;
|
|
color: var(--danger, #dc2626);
|
|
font-size: 11px;
|
|
line-height: 1.35;
|
|
}
|
|
.trek-dash .st-zoom-sep {
|
|
width: 1px;
|
|
height: 16px;
|
|
margin: 0 2px;
|
|
background: var(--line-2);
|
|
}
|