@liberation-data/desk 0.47.0 → 0.48.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/dist/css/dock.css CHANGED
@@ -189,9 +189,20 @@
189
189
  height: 46%;
190
190
  }
191
191
 
192
- .desk-dock-icon > svg {
192
+ /* A glyph fills its share of the tile, drawn or a picture: an image (a hosted app's dock entry is a PNG
193
+ * or data: URI) would otherwise draw at its own size and spill out of the dock. As .desk-icon-glyph. */
194
+ .desk-dock-icon > svg,
195
+ .desk-dock-icon > img {
193
196
  width: 100%;
194
197
  height: 100%;
198
+ object-fit: contain;
199
+ }
200
+
201
+ /* Carried while pinning or reordering: the tile's glyph at a fixed size, as .desk-icon-drag, since the
202
+ * drag picture has no size of its own for the glyph's share to be taken of. */
203
+ .desk-drag-preview > .desk-dock-icon {
204
+ width: 40px;
205
+ height: 40px;
195
206
  }
196
207
 
197
208
  .desk-dock-item[data-stack] .desk-dock-icon {
@@ -210,15 +221,19 @@
210
221
  .desk-dock-preview > span {
211
222
  display: grid;
212
223
  place-items: center;
224
+ min-width: 0;
225
+ min-height: 0;
213
226
  padding: 3px;
214
227
  border-radius: 4px;
215
228
  background: color-mix(in srgb, var(--desk-ink) 10%, transparent);
216
229
  color: var(--desk-muted);
217
230
  }
218
231
 
219
- .desk-dock-preview svg {
232
+ .desk-dock-preview svg,
233
+ .desk-dock-preview img {
220
234
  width: 100%;
221
235
  height: 100%;
236
+ object-fit: contain;
222
237
  }
223
238
 
224
239
  /* A dot for "a window is open", brighter when it has focus: a 4px dot 2px off its tile. */
package/dist/desk.css CHANGED
@@ -1181,9 +1181,20 @@ button.desk-widget:hover {
1181
1181
  height: 46%;
1182
1182
  }
1183
1183
 
1184
- .desk-dock-icon > svg {
1184
+ /* A glyph fills its share of the tile, drawn or a picture: an image (a hosted app's dock entry is a PNG
1185
+ * or data: URI) would otherwise draw at its own size and spill out of the dock. As .desk-icon-glyph. */
1186
+ .desk-dock-icon > svg,
1187
+ .desk-dock-icon > img {
1185
1188
  width: 100%;
1186
1189
  height: 100%;
1190
+ object-fit: contain;
1191
+ }
1192
+
1193
+ /* Carried while pinning or reordering: the tile's glyph at a fixed size, as .desk-icon-drag, since the
1194
+ * drag picture has no size of its own for the glyph's share to be taken of. */
1195
+ .desk-drag-preview > .desk-dock-icon {
1196
+ width: 40px;
1197
+ height: 40px;
1187
1198
  }
1188
1199
 
1189
1200
  .desk-dock-item[data-stack] .desk-dock-icon {
@@ -1202,15 +1213,19 @@ button.desk-widget:hover {
1202
1213
  .desk-dock-preview > span {
1203
1214
  display: grid;
1204
1215
  place-items: center;
1216
+ min-width: 0;
1217
+ min-height: 0;
1205
1218
  padding: 3px;
1206
1219
  border-radius: 4px;
1207
1220
  background: color-mix(in srgb, var(--desk-ink) 10%, transparent);
1208
1221
  color: var(--desk-muted);
1209
1222
  }
1210
1223
 
1211
- .desk-dock-preview svg {
1224
+ .desk-dock-preview svg,
1225
+ .desk-dock-preview img {
1212
1226
  width: 100%;
1213
1227
  height: 100%;
1228
+ object-fit: contain;
1214
1229
  }
1215
1230
 
1216
1231
  /* A dot for "a window is open", brighter when it has focus: a 4px dot 2px off its tile. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liberation-data/desk",
3
- "version": "0.47.0",
3
+ "version": "0.48.0",
4
4
  "description": "A desktop environment for React apps: windows, a dock, menus and commands, controls, tours and setup assistants.",
5
5
  "keywords": [
6
6
  "react",
package/src/css/dock.css CHANGED
@@ -188,9 +188,20 @@
188
188
  height: 46%;
189
189
  }
190
190
 
191
- .desk-dock-icon > svg {
191
+ /* A glyph fills its share of the tile, drawn or a picture: an image (a hosted app's dock entry is a PNG
192
+ * or data: URI) would otherwise draw at its own size and spill out of the dock. As .desk-icon-glyph. */
193
+ .desk-dock-icon > svg,
194
+ .desk-dock-icon > img {
192
195
  width: 100%;
193
196
  height: 100%;
197
+ object-fit: contain;
198
+ }
199
+
200
+ /* Carried while pinning or reordering: the tile's glyph at a fixed size, as .desk-icon-drag, since the
201
+ * drag picture has no size of its own for the glyph's share to be taken of. */
202
+ .desk-drag-preview > .desk-dock-icon {
203
+ width: 40px;
204
+ height: 40px;
194
205
  }
195
206
 
196
207
  .desk-dock-item[data-stack] .desk-dock-icon {
@@ -209,15 +220,19 @@
209
220
  .desk-dock-preview > span {
210
221
  display: grid;
211
222
  place-items: center;
223
+ min-width: 0;
224
+ min-height: 0;
212
225
  padding: 3px;
213
226
  border-radius: 4px;
214
227
  background: color-mix(in srgb, var(--desk-ink) 10%, transparent);
215
228
  color: var(--desk-muted);
216
229
  }
217
230
 
218
- .desk-dock-preview svg {
231
+ .desk-dock-preview svg,
232
+ .desk-dock-preview img {
219
233
  width: 100%;
220
234
  height: 100%;
235
+ object-fit: contain;
221
236
  }
222
237
 
223
238
  /* A dot for "a window is open", brighter when it has focus: a 4px dot 2px off its tile. */