@nomideusz/svelte-calendar 0.20.0 → 0.20.1
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/views/planner/PlannerScroll.svelte +16 -13
- package/package.json +1 -1
- package/widget/widget.js +10 -10
|
@@ -61,7 +61,7 @@ const MAX_EVENTS_SHOWN = 5;
|
|
|
61
61
|
// mount re-centres once the events have landed.
|
|
62
62
|
const CHIP_H = 22;
|
|
63
63
|
const CHIP_GAP = 3;
|
|
64
|
-
const ROW_MIN =
|
|
64
|
+
const ROW_MIN = 120;
|
|
65
65
|
const ROW_MARGIN = 12;
|
|
66
66
|
/** Distance between two rows' tops; only a fallback now. */
|
|
67
67
|
function rowPitch() {
|
|
@@ -398,10 +398,13 @@ function dragPreviewSegmentForDay(dayMs) {
|
|
|
398
398
|
return seg;
|
|
399
399
|
}
|
|
400
400
|
// ─── Chip labels ────────────────────────────────
|
|
401
|
-
// A chip is one line and holds more than fits
|
|
402
|
-
//
|
|
403
|
-
//
|
|
404
|
-
//
|
|
401
|
+
// A chip is one line and holds more than fits: it gives up the room, and
|
|
402
|
+
// only the room. The time stays whatever happens — this is a schedule, and
|
|
403
|
+
// "18:00 Hatha dla p…" answers more than an untruncated title does. (The
|
|
404
|
+
// time was briefly droppable, to buy the title room to fit whole. It
|
|
405
|
+
// usually bought nothing: a title long enough to push the time out was
|
|
406
|
+
// long enough to be cut anyway, so the chip lost its time for no gain.)
|
|
407
|
+
// createChipFit measures, fitParts decides.
|
|
405
408
|
const CHIP_PAD_X = 12;
|
|
406
409
|
const CHIP_GAP_X = 5;
|
|
407
410
|
const fit = createChipFit({
|
|
@@ -414,24 +417,24 @@ const fit = createChipFit({
|
|
|
414
417
|
});
|
|
415
418
|
function chipParts(ev) {
|
|
416
419
|
return fit.parts([
|
|
417
|
-
{
|
|
418
|
-
key: "title",
|
|
419
|
-
text: ev.title,
|
|
420
|
-
font: fit.fonts.title,
|
|
421
|
-
priority: 0
|
|
422
|
-
},
|
|
423
420
|
{
|
|
424
421
|
key: "time",
|
|
425
422
|
text: fmtAmPm(ev.start),
|
|
426
423
|
font: fit.fonts.time,
|
|
427
|
-
priority:
|
|
424
|
+
priority: 0,
|
|
428
425
|
extra: CHIP_GAP_X
|
|
429
426
|
},
|
|
427
|
+
{
|
|
428
|
+
key: "title",
|
|
429
|
+
text: ev.title,
|
|
430
|
+
font: fit.fonts.title,
|
|
431
|
+
priority: 0
|
|
432
|
+
},
|
|
430
433
|
{
|
|
431
434
|
key: "room",
|
|
432
435
|
text: ev.location ?? "",
|
|
433
436
|
font: fit.fonts.room,
|
|
434
|
-
priority:
|
|
437
|
+
priority: 1,
|
|
435
438
|
extra: CHIP_GAP_X
|
|
436
439
|
}
|
|
437
440
|
], CHIP_PAD_X);
|
package/package.json
CHANGED
package/widget/widget.js
CHANGED
|
@@ -15528,7 +15528,7 @@ createHTML: (html) => {
|
|
|
15528
15528
|
const MAX_EVENTS_SHOWN = 5;
|
|
15529
15529
|
function rowPitch() {
|
|
15530
15530
|
const rows = el?.querySelectorAll("[data-week]");
|
|
15531
|
-
return rows && rows.length > 1 ? rows[1].offsetTop - rows[0].offsetTop :
|
|
15531
|
+
return rows && rows.length > 1 ? rows[1].offsetTop - rows[0].offsetTop : 132;
|
|
15532
15532
|
}
|
|
15533
15533
|
const _initMs = untrack(() => sod($$props.focusDate?.getTime() ?? Date.now()));
|
|
15534
15534
|
let internalFocusMs = /* @__PURE__ */ state(proxy(_initMs));
|
|
@@ -15813,24 +15813,24 @@ createHTML: (html) => {
|
|
|
15813
15813
|
});
|
|
15814
15814
|
function chipParts(ev) {
|
|
15815
15815
|
return fit.parts([
|
|
15816
|
-
{
|
|
15817
|
-
key: "title",
|
|
15818
|
-
text: ev.title,
|
|
15819
|
-
font: fit.fonts.title,
|
|
15820
|
-
priority: 0
|
|
15821
|
-
},
|
|
15822
15816
|
{
|
|
15823
15817
|
key: "time",
|
|
15824
15818
|
text: fmtAmPm(ev.start),
|
|
15825
15819
|
font: fit.fonts.time,
|
|
15826
|
-
priority:
|
|
15820
|
+
priority: 0,
|
|
15827
15821
|
extra: CHIP_GAP_X
|
|
15828
15822
|
},
|
|
15823
|
+
{
|
|
15824
|
+
key: "title",
|
|
15825
|
+
text: ev.title,
|
|
15826
|
+
font: fit.fonts.title,
|
|
15827
|
+
priority: 0
|
|
15828
|
+
},
|
|
15829
15829
|
{
|
|
15830
15830
|
key: "room",
|
|
15831
15831
|
text: ev.location ?? "",
|
|
15832
15832
|
font: fit.fonts.room,
|
|
15833
|
-
priority:
|
|
15833
|
+
priority: 1,
|
|
15834
15834
|
extra: CHIP_GAP_X
|
|
15835
15835
|
}
|
|
15836
15836
|
], CHIP_PAD_X);
|
|
@@ -16254,7 +16254,7 @@ createHTML: (html) => {
|
|
|
16254
16254
|
classes = set_class(div, 1, "wg svelte-l8xuza", null, classes, { "wg--auto": get(autoHeight) });
|
|
16255
16255
|
styles = set_style(div, style() || void 0, styles, {
|
|
16256
16256
|
height: get(autoHeight) ? void 0 : height() ? `${height()}px` : "100%",
|
|
16257
|
-
"--wg-row-min": "
|
|
16257
|
+
"--wg-row-min": "120px",
|
|
16258
16258
|
"--wg-chip-h": "22px",
|
|
16259
16259
|
"--wg-chip-gap": "3px",
|
|
16260
16260
|
"--wg-row-margin": "12px"
|