@pseudolux-ui/media-library 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/package.json +22 -4
- package/src/components/AssetGrid.lsp +1777 -0
- package/src/components/AssetInspector.lsp +1622 -0
- package/src/components/BinDialog.lsp +208 -0
- package/src/components/CropEditor.lsp +616 -0
- package/src/components/ResponsiveImage.lsp +297 -0
- package/src/config.ts +137 -0
- package/src/index.ts +33 -0
- package/src/ladder.ts +82 -0
- package/src/port.ts +217 -0
- package/src/styles/px.css +177 -0
- package/README.md +0 -3
package/src/port.ts
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the library's components need from whatever is behind them.
|
|
3
|
+
*
|
|
4
|
+
* Not `PseudoluxClient`, though that satisfies it as written. The same grid
|
|
5
|
+
* runs in the standalone browser, which talks to Pseudolux directly, and
|
|
6
|
+
* inside a CMS, which talks to *its own server* - because that is the side
|
|
7
|
+
* holding a credential, enforcing permissions, and deciding which slice of the
|
|
8
|
+
* library this deployment may see.
|
|
9
|
+
*
|
|
10
|
+
* Those two speak different vocabularies on purpose: a CMS says `key` where a
|
|
11
|
+
* delivery platform says `pid`, and teaching the CMS the platform's words to
|
|
12
|
+
* share a grid would be the wrong trade. A port is the seam that lets both
|
|
13
|
+
* mount the same components without either learning the other's language.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
export interface CropRect {
|
|
17
|
+
x: number
|
|
18
|
+
y: number
|
|
19
|
+
width: number
|
|
20
|
+
height: number
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** A shape the library cuts pictures to. */
|
|
24
|
+
export interface Preset {
|
|
25
|
+
name: string
|
|
26
|
+
label: string
|
|
27
|
+
ratio: number
|
|
28
|
+
ratioLabel: string
|
|
29
|
+
minWidth?: number
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Where a picture is used, three ways, kept apart. */
|
|
33
|
+
export interface LibraryUsage {
|
|
34
|
+
/** Pages that reported using it. */
|
|
35
|
+
placements: Array<{
|
|
36
|
+
site: string
|
|
37
|
+
page: string
|
|
38
|
+
title: string
|
|
39
|
+
url?: string
|
|
40
|
+
status: "draft" | "published"
|
|
41
|
+
uses: Array<{ field?: string; block?: string; crop?: string; view?: string }>
|
|
42
|
+
reportedAt: string
|
|
43
|
+
}>
|
|
44
|
+
/** Origins it has been requested from, from the access logs. */
|
|
45
|
+
seen: Array<{ origin: string; days: Record<string, number>; firstSeenAt: string; lastSeenAt: string }>
|
|
46
|
+
/** URLs taken by hand. */
|
|
47
|
+
copies: Array<{ at: string; actor?: string; crop?: string }>
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface LibraryQuery {
|
|
51
|
+
text?: string
|
|
52
|
+
format?: string
|
|
53
|
+
limit?: number
|
|
54
|
+
cursor?: string
|
|
55
|
+
/** The bin instead of the library. */
|
|
56
|
+
deleted?: boolean
|
|
57
|
+
/** One group: only what is on this shelf. */
|
|
58
|
+
group?: string
|
|
59
|
+
/** One label: only what is about this. */
|
|
60
|
+
label?: string
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** One colour a picture is mostly made of. */
|
|
64
|
+
export interface Swatch {
|
|
65
|
+
/** `#rrggbb`, lowercase. */
|
|
66
|
+
hex: string
|
|
67
|
+
/** Share of the picture, 0-1. */
|
|
68
|
+
weight: number
|
|
69
|
+
/** A basic colour term - "teal", "brown" - where the store works one out. */
|
|
70
|
+
name?: string
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** One asset, as a grid needs it. */
|
|
74
|
+
export interface LibraryItem {
|
|
75
|
+
id: string
|
|
76
|
+
filename?: string
|
|
77
|
+
width?: number
|
|
78
|
+
height?: number
|
|
79
|
+
format?: string
|
|
80
|
+
altText?: string
|
|
81
|
+
credit?: string
|
|
82
|
+
/**
|
|
83
|
+
* The colours the picture is made of, heaviest first.
|
|
84
|
+
*
|
|
85
|
+
* A flat list rather than the roles the platform also publishes. The port is
|
|
86
|
+
* what a *grid and a panel* need, and both of those show colours rather than
|
|
87
|
+
* choosing between them - a template picking a background is the one that
|
|
88
|
+
* wants roles, and it is not on this side of the seam.
|
|
89
|
+
*/
|
|
90
|
+
palette?: Swatch[]
|
|
91
|
+
createdAt?: string
|
|
92
|
+
/** What it is about, and how each word got there. Not groups. */
|
|
93
|
+
labels?: Array<{
|
|
94
|
+
term: string
|
|
95
|
+
status?: "generated" | "pending" | "verified" | "rejected"
|
|
96
|
+
source?: { kind: "person" | "model" | "import"; [key: string]: unknown }
|
|
97
|
+
score?: number
|
|
98
|
+
audience?: "public" | "internal"
|
|
99
|
+
}>
|
|
100
|
+
/** Where the subject is, as whole percentages from the top left. */
|
|
101
|
+
focal?: { x: number; y: number }
|
|
102
|
+
/** Rectangles somebody chose, by preset name or a custom name. */
|
|
103
|
+
crops?: Record<string, CropRect & { savedAt?: string }>
|
|
104
|
+
/** The groups it is on. */
|
|
105
|
+
tags?: string[]
|
|
106
|
+
/** What it means in each of its groups, where that differs from the
|
|
107
|
+
* defaults above. */
|
|
108
|
+
views?: Record<string, { altText?: string; credit?: string }>
|
|
109
|
+
/** Set while the asset is in the bin. */
|
|
110
|
+
deletedAt?: string
|
|
111
|
+
deletedReason?: string
|
|
112
|
+
/** Who put it in the bin, where the host knows. */
|
|
113
|
+
deletedBy?: string
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* What the thing behind the port can do.
|
|
118
|
+
*
|
|
119
|
+
* Travels with every page, because the moment a UI has a list is the moment it
|
|
120
|
+
* needs to know which controls are worth drawing. A search box over something
|
|
121
|
+
* that cannot search matches nothing, and an empty grid reads as an empty
|
|
122
|
+
* library rather than as an unsupported query.
|
|
123
|
+
*/
|
|
124
|
+
export interface LibraryCapabilities {
|
|
125
|
+
text: boolean
|
|
126
|
+
describe: boolean
|
|
127
|
+
/** Whether this side may put assets in the bin, look in it, and restore. */
|
|
128
|
+
remove: boolean
|
|
129
|
+
formats: string[]
|
|
130
|
+
/** The groups this view may browse by. Empty means no group browsing: the
|
|
131
|
+
* host has no list to offer, not that the library has no groups. */
|
|
132
|
+
groups: string[]
|
|
133
|
+
/** The one group this side may describe a view for. Absent with `describe`
|
|
134
|
+
* true means any (a direct build signing as itself). */
|
|
135
|
+
writeGroup?: string
|
|
136
|
+
/** The groups this side may upload to, its own first. Asked which when
|
|
137
|
+
* there is more than one. Absent means `writeGroup` alone. */
|
|
138
|
+
writeGroups?: string[]
|
|
139
|
+
/** The shapes pictures are cut to, so an editor can offer them. */
|
|
140
|
+
presets: Preset[]
|
|
141
|
+
/** Whether this side may add pictures. */
|
|
142
|
+
upload?: boolean
|
|
143
|
+
/** The MIME types an upload may be, where the host says. Absent means any
|
|
144
|
+
* `image/*`, and the server has the last word either way. */
|
|
145
|
+
uploadTypes?: string[]
|
|
146
|
+
/** The largest upload in bytes, where the host says. */
|
|
147
|
+
uploadLimit?: number
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** What came of an upload: a new asset; a picture the library already has,
|
|
151
|
+
* exactly or near enough, with a token to go ahead anyway; or a store that
|
|
152
|
+
* is still working on it. */
|
|
153
|
+
export type UploadOutcome =
|
|
154
|
+
| { id: string }
|
|
155
|
+
| { pending: true }
|
|
156
|
+
| { duplicateOf: string[]; similar: Array<{ id: string; distance: number }>; token: string }
|
|
157
|
+
|
|
158
|
+
export interface LibraryPage {
|
|
159
|
+
items: LibraryItem[]
|
|
160
|
+
nextCursor?: string
|
|
161
|
+
capabilities: LibraryCapabilities
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export interface LibraryPort {
|
|
165
|
+
list(query?: LibraryQuery): Promise<LibraryPage>
|
|
166
|
+
/** Everything known about one asset. May be the same data the list carries. */
|
|
167
|
+
detail(id: string): Promise<LibraryItem>
|
|
168
|
+
/** An address for the picture at a size. */
|
|
169
|
+
imageUrl(
|
|
170
|
+
id: string,
|
|
171
|
+
options?: {
|
|
172
|
+
width?: number
|
|
173
|
+
height?: number
|
|
174
|
+
format?: string
|
|
175
|
+
focal?: { x: number; y: number }
|
|
176
|
+
crop?: CropRect
|
|
177
|
+
}
|
|
178
|
+
): string
|
|
179
|
+
/** Set the defaults, or with `view`, what the picture means in that group. */
|
|
180
|
+
describe(
|
|
181
|
+
id: string,
|
|
182
|
+
patch: {
|
|
183
|
+
altText?: string | null
|
|
184
|
+
credit?: string | null
|
|
185
|
+
focal?: { x: number; y: number } | null
|
|
186
|
+
/** The person's words, replaced as a whole; a model's are left alone. */
|
|
187
|
+
labels?: Array<string | { term: string; audience?: "public" | "internal" }> | null
|
|
188
|
+
},
|
|
189
|
+
options?: { view?: string }
|
|
190
|
+
): Promise<unknown>
|
|
191
|
+
/** Drop a group's override, so it reads the defaults again. */
|
|
192
|
+
removeView(id: string, view: string): Promise<unknown>
|
|
193
|
+
/** Keep a rectangle under a name. A preset's name is held to its shape. */
|
|
194
|
+
setCrop(id: string, name: string, rect: CropRect): Promise<unknown>
|
|
195
|
+
removeCrop(id: string, name: string): Promise<unknown>
|
|
196
|
+
/** Where it is used. Absent where the host cannot say. */
|
|
197
|
+
usage?(id: string): Promise<LibraryUsage>
|
|
198
|
+
/** Add a picture. Absent where this side cannot. `onProgress` is 0-1 of the
|
|
199
|
+
* bytes sent; the ingest that follows has no progress to report. */
|
|
200
|
+
upload?(file: File, options?: { onProgress?: (fraction: number) => void; group?: string }): Promise<UploadOutcome>
|
|
201
|
+
/** Go ahead with an upload the library thought it already had. */
|
|
202
|
+
confirmUpload?(token: string): Promise<{ id: string } | { pending: true }>
|
|
203
|
+
/** A URL was taken from the library by hand, for `crop` if named. */
|
|
204
|
+
copied?(id: string, crop?: string): Promise<unknown>
|
|
205
|
+
/** Into the bin, with a reason. Reversible by `restore`. */
|
|
206
|
+
remove(id: string, reason: string): Promise<unknown>
|
|
207
|
+
restore(id: string): Promise<unknown>
|
|
208
|
+
/** Ask the store to work out what it derives from the picture - the
|
|
209
|
+
* colours, for one. `wanted` says what it derives at all. */
|
|
210
|
+
enrich(id: string): Promise<EnrichResult>
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export interface EnrichResult {
|
|
214
|
+
status: "scheduled" | "complete"
|
|
215
|
+
wanted: string[]
|
|
216
|
+
outstanding?: string[]
|
|
217
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/* Pseudolux media library: tokens and parts.
|
|
2
|
+
Every visual value is a --px-* token with a neutral default, on `.px`.
|
|
3
|
+
A host themes the library only by re-pointing the tokens on an element
|
|
4
|
+
that contains it, with a more specific selector than `.px` (Tela uses
|
|
5
|
+
`html .px`); it never overrides these classes. Dark when the system asks,
|
|
6
|
+
unless the host says `data-theme="light"`, or when `data-theme="dark"`.
|
|
7
|
+
The theme selectors sit in `:where()` so every default weighs the same as
|
|
8
|
+
`.px`, and a host's mapping wins in dark as well as light. */
|
|
9
|
+
|
|
10
|
+
.px {
|
|
11
|
+
--px-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
12
|
+
--px-fs-xs: 12px; --px-fs-s: 13px; --px-fs-m: 15px; --px-fs-l: 17px; --px-fs-h: 22px;
|
|
13
|
+
--px-sp: 4px;
|
|
14
|
+
--px-r-s: 6px; --px-r-m: 8px; --px-r-l: 12px;
|
|
15
|
+
--px-target: 44px;
|
|
16
|
+
--px-tile: 184px;
|
|
17
|
+
|
|
18
|
+
--px-bg: #f4f4f4;
|
|
19
|
+
--px-surface: #ffffff;
|
|
20
|
+
--px-surface-2: #eeeeee;
|
|
21
|
+
--px-hover: #e9e9e9;
|
|
22
|
+
--px-border: #d9d9d9;
|
|
23
|
+
--px-border-strong: #8c8c8c;
|
|
24
|
+
--px-text: #1a1a1a;
|
|
25
|
+
--px-text-2: #4d4d4d;
|
|
26
|
+
--px-text-3: #636363;
|
|
27
|
+
--px-accent: #2f4fc9;
|
|
28
|
+
--px-accent-soft: #e6ebfa;
|
|
29
|
+
--px-accent-text: #213fae;
|
|
30
|
+
--px-on-accent: #ffffff;
|
|
31
|
+
--px-focus: #2f4fc9;
|
|
32
|
+
--px-ok: #1d7343; --px-ok-soft: #e3f2e8;
|
|
33
|
+
--px-warn: #8a5300; --px-warn-soft: #fcefd2;
|
|
34
|
+
--px-danger: #b3261e; --px-danger-soft: #fce9e7;
|
|
35
|
+
--px-scrim: rgba(15, 15, 15, .55);
|
|
36
|
+
--px-shadow: 0 10px 30px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .08);
|
|
37
|
+
|
|
38
|
+
font-family: var(--px-font);
|
|
39
|
+
font-size: var(--px-fs-m);
|
|
40
|
+
line-height: 1.45;
|
|
41
|
+
color: var(--px-text);
|
|
42
|
+
-webkit-font-smoothing: antialiased;
|
|
43
|
+
}
|
|
44
|
+
@media (prefers-color-scheme: dark) {
|
|
45
|
+
.px:where(:not([data-theme="light"])) {
|
|
46
|
+
--px-bg: #141414; --px-surface: #1c1c1c; --px-surface-2: #242424; --px-hover: #2b2b2b;
|
|
47
|
+
--px-border: #353535; --px-border-strong: #707070;
|
|
48
|
+
--px-text: #ededed; --px-text-2: #b9b9b9; --px-text-3: #a0a0a0;
|
|
49
|
+
--px-accent: #88a2ff; --px-accent-soft: #1f2a4e; --px-accent-text: #aabdff; --px-on-accent: #0c1433; --px-focus: #a3b9ff;
|
|
50
|
+
--px-ok: #6fd09a; --px-ok-soft: #15301f; --px-warn: #f2bd57; --px-warn-soft: #33270e; --px-danger: #ff8f86; --px-danger-soft: #3b1917;
|
|
51
|
+
--px-scrim: rgba(0, 0, 0, .65);
|
|
52
|
+
--px-shadow: 0 10px 30px rgba(0, 0, 0, .5);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
.px:where([data-theme="dark"]) {
|
|
56
|
+
--px-bg: #141414; --px-surface: #1c1c1c; --px-surface-2: #242424; --px-hover: #2b2b2b;
|
|
57
|
+
--px-border: #353535; --px-border-strong: #707070;
|
|
58
|
+
--px-text: #ededed; --px-text-2: #b9b9b9; --px-text-3: #a0a0a0;
|
|
59
|
+
--px-accent: #88a2ff; --px-accent-soft: #1f2a4e; --px-accent-text: #aabdff; --px-on-accent: #0c1433; --px-focus: #a3b9ff;
|
|
60
|
+
--px-ok: #6fd09a; --px-ok-soft: #15301f; --px-warn: #f2bd57; --px-warn-soft: #33270e; --px-danger: #ff8f86; --px-danger-soft: #3b1917;
|
|
61
|
+
--px-scrim: rgba(0, 0, 0, .65);
|
|
62
|
+
--px-shadow: 0 10px 30px rgba(0, 0, 0, .5);
|
|
63
|
+
}
|
|
64
|
+
.px *, .px *::before, .px *::after { box-sizing: border-box; }
|
|
65
|
+
.px h1, .px h2, .px h3, .px h4, .px p { margin: 0; }
|
|
66
|
+
.px h2 { font-size: var(--px-fs-h); font-weight: 600; }
|
|
67
|
+
.px h3 { font-size: var(--px-fs-l); font-weight: 600; }
|
|
68
|
+
.px h4 { font-size: var(--px-fs-s); font-weight: 600; }
|
|
69
|
+
.px a { color: var(--px-accent-text); }
|
|
70
|
+
.px :focus-visible, .px .is-focus { outline: 3px solid var(--px-focus); outline-offset: 2px; }
|
|
71
|
+
.px-muted { color: var(--px-text-2); }
|
|
72
|
+
.px-subtle { color: var(--px-text-3); font-size: var(--px-fs-s); }
|
|
73
|
+
.px-eyebrow, .px .px-eyebrow { font-size: var(--px-fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--px-text-3); }
|
|
74
|
+
.px-mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }
|
|
75
|
+
|
|
76
|
+
/* Buttons */
|
|
77
|
+
.px-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--px-target); padding: 0 16px; border-radius: var(--px-r-m); border: 1px solid transparent; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; }
|
|
78
|
+
.px-btn-primary { background: var(--px-accent); color: var(--px-on-accent); }
|
|
79
|
+
.px-btn-secondary { background: var(--px-surface); color: var(--px-text); border-color: var(--px-border-strong); }
|
|
80
|
+
.px-btn-ghost { background: transparent; color: var(--px-text-2); }
|
|
81
|
+
.px-btn-ghost:hover { background: var(--px-hover); color: var(--px-text); }
|
|
82
|
+
.px-btn-danger { background: var(--px-danger); color: var(--px-surface); }
|
|
83
|
+
.px-btn-danger-quiet { background: transparent; color: var(--px-danger); border-color: var(--px-border); }
|
|
84
|
+
.px-btn-sm { min-height: 36px; padding: 0 12px; font-size: var(--px-fs-s); }
|
|
85
|
+
.px-btn-icon { width: var(--px-target); padding: 0; }
|
|
86
|
+
.px-btn-sm.px-btn-icon { width: 36px; }
|
|
87
|
+
.px-btn[disabled] { opacity: .45; cursor: not-allowed; }
|
|
88
|
+
.px-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
|
89
|
+
|
|
90
|
+
/* Fields */
|
|
91
|
+
.px-field { display: flex; flex-direction: column; gap: 6px; }
|
|
92
|
+
.px-label { font-weight: 600; font-size: var(--px-fs-s); display: flex; align-items: baseline; gap: 8px; }
|
|
93
|
+
.px-hint { font-size: var(--px-fs-xs); color: var(--px-text-3); }
|
|
94
|
+
.px-input, .px-select, .px-textarea { width: 100%; min-height: var(--px-target); padding: 9px 12px; font: inherit; font-size: 14px; color: var(--px-text); background: var(--px-surface); border: 1px solid var(--px-border-strong); border-radius: var(--px-r-m); }
|
|
95
|
+
.px-textarea { min-height: 76px; resize: vertical; }
|
|
96
|
+
.px-input[readonly], .px-textarea[readonly] { background: var(--px-surface-2); border-color: var(--px-border); color: var(--px-text-2); }
|
|
97
|
+
.px-search { display: flex; align-items: center; gap: 8px; min-height: var(--px-target); padding: 0 12px; border: 1px solid var(--px-border-strong); border-radius: var(--px-r-m); background: var(--px-surface); color: var(--px-text-3); }
|
|
98
|
+
.px-search input { border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--px-text); flex: 1; min-width: 0; outline: none; }
|
|
99
|
+
|
|
100
|
+
/* Badges and chips */
|
|
101
|
+
.px-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
|
|
102
|
+
.px-badge-warn { background: var(--px-warn-soft); color: var(--px-warn); }
|
|
103
|
+
.px-badge-ok { background: var(--px-ok-soft); color: var(--px-ok); }
|
|
104
|
+
.px-badge-danger { background: var(--px-danger-soft); color: var(--px-danger); }
|
|
105
|
+
.px-badge-neutral { background: var(--px-surface); color: var(--px-text-2); border-color: var(--px-border); }
|
|
106
|
+
.px-badge-accent { background: var(--px-accent-soft); color: var(--px-accent-text); }
|
|
107
|
+
.px-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 4px 0 10px; border-radius: 999px; background: var(--px-surface-2); border: 1px solid var(--px-border); font-size: var(--px-fs-s); font-weight: 500; }
|
|
108
|
+
.px-chip.is-internal { background: var(--px-surface); border-style: dashed; }
|
|
109
|
+
.px-chip.is-suggested { background: var(--px-accent-soft); border: 1px dashed var(--px-accent); color: var(--px-accent-text); }
|
|
110
|
+
.px-chip button { width: 28px; height: 28px; border: 0; background: transparent; border-radius: 50%; color: inherit; display: grid; place-items: center; cursor: pointer; }
|
|
111
|
+
|
|
112
|
+
/* Pictures (placeholders stand in for real images) */
|
|
113
|
+
.px-pic { background: linear-gradient(135deg, #b8bcc4, #8f96a3); position: relative; overflow: hidden; }
|
|
114
|
+
|
|
115
|
+
/* Grid and tiles */
|
|
116
|
+
.px-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--px-tile), 1fr)); gap: 12px; }
|
|
117
|
+
.px-tile { position: relative; display: flex; flex-direction: column; padding: 0; border: 1px solid var(--px-border); border-radius: var(--px-r-l); background: var(--px-surface); overflow: hidden; text-align: left; font: inherit; color: inherit; cursor: pointer; }
|
|
118
|
+
.px-tile .px-pic { aspect-ratio: 4 / 3; }
|
|
119
|
+
.px-tile-name { display: block; padding: 7px 10px 8px; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
120
|
+
.px-tile-flags { position: absolute; left: 8px; bottom: 38px; display: flex; gap: 4px; flex-wrap: wrap; }
|
|
121
|
+
.px-tile-check { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--px-accent); color: var(--px-on-accent); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--px-surface); }
|
|
122
|
+
.px-tile.is-selected { border: 3px solid var(--px-accent); }
|
|
123
|
+
.px-tile.is-binned .px-pic { opacity: .45; filter: grayscale(1); }
|
|
124
|
+
.px-tile.is-processing .px-pic { background: var(--px-surface-2); display: grid; place-items: center; color: var(--px-text-3); font-size: 12px; }
|
|
125
|
+
|
|
126
|
+
/* Dense list view */
|
|
127
|
+
.px-list-row { display: grid; grid-template-columns: 64px minmax(0, 1.3fr) minmax(0, 2fr) 140px 120px; gap: 14px; align-items: center; padding: 8px 12px; min-height: 60px; border-bottom: 1px solid var(--px-border); }
|
|
128
|
+
.px-list-head { min-height: 40px; font-size: var(--px-fs-xs); font-weight: 600; color: var(--px-text-3); text-transform: uppercase; letter-spacing: .05em; background: var(--px-surface-2); }
|
|
129
|
+
|
|
130
|
+
/* Layout parts */
|
|
131
|
+
.px-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
|
|
132
|
+
.px-seg { display: inline-flex; padding: 3px; border: 1px solid var(--px-border); border-radius: var(--px-r-m); background: var(--px-surface-2); }
|
|
133
|
+
.px-seg button { min-height: 36px; padding: 0 12px; border: 0; border-radius: calc(var(--px-r-m) - 2px); background: transparent; font: inherit; font-size: var(--px-fs-s); color: var(--px-text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
|
|
134
|
+
.px-seg button[aria-pressed="true"], .px-seg button[aria-checked="true"] { background: var(--px-surface); color: var(--px-text); box-shadow: 0 1px 2px rgba(0,0,0,.12); font-weight: 600; }
|
|
135
|
+
|
|
136
|
+
.px-inspector { background: var(--px-surface); border-left: 1px solid var(--px-border); display: flex; flex-direction: column; min-width: 0; }
|
|
137
|
+
.px-insp-head { padding: 14px 16px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--px-border); }
|
|
138
|
+
.px-sec { padding: 16px; border-bottom: 1px solid var(--px-border); display: flex; flex-direction: column; gap: 10px; }
|
|
139
|
+
.px-sec:last-child { border-bottom: 0; }
|
|
140
|
+
.px-sec-title { display: flex; align-items: center; gap: 8px; }
|
|
141
|
+
.px-sec-title h4 { flex: 1; }
|
|
142
|
+
|
|
143
|
+
.px-shared { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--px-r-m); background: var(--px-surface-2); font-size: var(--px-fs-xs); color: var(--px-text-2); }
|
|
144
|
+
.px-shared.is-local { background: var(--px-warn-soft); color: var(--px-warn); }
|
|
145
|
+
|
|
146
|
+
.px-focal { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.55); display: grid; place-items: center; }
|
|
147
|
+
.px-focal::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.55); }
|
|
148
|
+
|
|
149
|
+
.px-crops { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
|
|
150
|
+
.px-crop { flex: none; display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
|
|
151
|
+
.px-crop .px-pic { border-radius: var(--px-r-s); border: 1px solid var(--px-border); }
|
|
152
|
+
.px-crop.is-current .px-pic { outline: 3px solid var(--px-accent); outline-offset: 1px; }
|
|
153
|
+
.px-crop-name { font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
|
|
154
|
+
|
|
155
|
+
.px-swatches { display: flex; gap: 6px; }
|
|
156
|
+
.px-swatches span { width: 32px; height: 32px; border-radius: var(--px-r-s); border: 1px solid var(--px-border); }
|
|
157
|
+
|
|
158
|
+
.px-skel { background: linear-gradient(90deg, var(--px-surface-2), var(--px-hover), var(--px-surface-2)); border-radius: var(--px-r-s); }
|
|
159
|
+
.px-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 32px; }
|
|
160
|
+
|
|
161
|
+
.px-dialog { background: var(--px-surface); border: 1px solid var(--px-border); border-radius: var(--px-r-l); box-shadow: var(--px-shadow); display: flex; flex-direction: column; overflow: hidden; }
|
|
162
|
+
.px-dialog-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--px-border); }
|
|
163
|
+
.px-dialog-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--px-border); background: var(--px-surface-2); }
|
|
164
|
+
.px-callout { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--px-r-m); border: 1px solid var(--px-border); background: var(--px-surface-2); font-size: var(--px-fs-s); }
|
|
165
|
+
.px-callout-warn { background: var(--px-warn-soft); border-color: var(--px-warn); }
|
|
166
|
+
.px-callout-danger { background: var(--px-danger-soft); border-color: var(--px-danger); }
|
|
167
|
+
.px-callout-accent { background: var(--px-accent-soft); border-color: var(--px-accent); }
|
|
168
|
+
|
|
169
|
+
.px-queue-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--px-border); min-height: 56px; font-size: 14px; }
|
|
170
|
+
.px-bar { height: 6px; border-radius: 3px; background: var(--px-surface-2); overflow: hidden; }
|
|
171
|
+
.px-bar > span { display: block; height: 100%; background: var(--px-accent); }
|
|
172
|
+
|
|
173
|
+
.px-cropper { position: relative; overflow: hidden; border-radius: var(--px-r-m); }
|
|
174
|
+
.px-cropbox { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); }
|
|
175
|
+
.px-cropbox .h { position: absolute; width: 14px; height: 14px; background: #fff; border: 1px solid rgba(0,0,0,.5); border-radius: 2px; }
|
|
176
|
+
.px-cropbox .g { position: absolute; background: rgba(255,255,255,.45); }
|
|
177
|
+
.px-kbd { display: inline-flex; align-items: center; height: 22px; padding: 0 6px; border: 1px solid var(--px-border-strong); border-bottom-width: 2px; border-radius: 5px; font-size: 11px; color: var(--px-text-2); background: var(--px-surface); }
|
package/README.md
DELETED