mysticals 0.7.0 → 0.8.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/cli.js +55 -8
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createElement } from "react";
|
|
|
5
5
|
import { render } from "ink";
|
|
6
6
|
|
|
7
7
|
// package.json
|
|
8
|
-
var version = "0.
|
|
8
|
+
var version = "0.8.1";
|
|
9
9
|
|
|
10
10
|
// src/client.ts
|
|
11
11
|
import { spawn } from "child_process";
|
|
@@ -291,6 +291,9 @@ var en = {
|
|
|
291
291
|
"menu.selectAll": "Select All",
|
|
292
292
|
"menu.view": "View",
|
|
293
293
|
"menu.today": "Today",
|
|
294
|
+
"menu.toggleSidebar": "Toggle Sidebar",
|
|
295
|
+
"toolbar.hideSidebar": "Hide sidebar",
|
|
296
|
+
"toolbar.showSidebar": "Show sidebar",
|
|
294
297
|
"menu.reload": "Reload",
|
|
295
298
|
"menu.devTools": "Toggle Developer Tools",
|
|
296
299
|
"menu.fullScreen": "Toggle Full Screen",
|
|
@@ -534,7 +537,17 @@ var en = {
|
|
|
534
537
|
"agenda.people": { one: "{n} person", other: "{n} people" },
|
|
535
538
|
"agenda.join": "Join call",
|
|
536
539
|
"agenda.joinOpens": "Join opens {n} min before start",
|
|
537
|
-
"agenda.details": "Details"
|
|
540
|
+
"agenda.details": "Details",
|
|
541
|
+
"agenda.otherDay": "{date} \xB7 not today",
|
|
542
|
+
"agenda.backToday": "Back to today",
|
|
543
|
+
"agenda.nothingDay": "Nothing scheduled this day.",
|
|
544
|
+
"agenda.pickHint": "Pick an event to see it here.",
|
|
545
|
+
"agenda.showPeople": "Show people",
|
|
546
|
+
"agenda.break": "Break \xB7 {d}",
|
|
547
|
+
"agenda.showAhead": "Next {n} days",
|
|
548
|
+
"agenda.hideAhead": "Hide upcoming",
|
|
549
|
+
"agenda.nothingAhead": "Nothing in the next {n} days.",
|
|
550
|
+
"agenda.hidePeople": "Hide people"
|
|
538
551
|
};
|
|
539
552
|
|
|
540
553
|
// ../../packages/core/src/i18n/uk.ts
|
|
@@ -611,6 +624,9 @@ var uk = {
|
|
|
611
624
|
"menu.selectAll": "\u0412\u0438\u0434\u0456\u043B\u0438\u0442\u0438 \u0432\u0441\u0435",
|
|
612
625
|
"menu.view": "\u0412\u0438\u0433\u043B\u044F\u0434",
|
|
613
626
|
"menu.today": "\u0421\u044C\u043E\u0433\u043E\u0434\u043D\u0456",
|
|
627
|
+
"menu.toggleSidebar": "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438/\u0441\u0445\u043E\u0432\u0430\u0442\u0438 \u0431\u0456\u0447\u043D\u0443 \u043F\u0430\u043D\u0435\u043B\u044C",
|
|
628
|
+
"toolbar.hideSidebar": "\u0421\u0445\u043E\u0432\u0430\u0442\u0438 \u0431\u0456\u0447\u043D\u0443 \u043F\u0430\u043D\u0435\u043B\u044C",
|
|
629
|
+
"toolbar.showSidebar": "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u0431\u0456\u0447\u043D\u0443 \u043F\u0430\u043D\u0435\u043B\u044C",
|
|
614
630
|
"menu.reload": "\u041F\u0435\u0440\u0435\u0437\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0438\u0442\u0438",
|
|
615
631
|
"menu.devTools": "\u0406\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0438 \u0440\u043E\u0437\u0440\u043E\u0431\u043D\u0438\u043A\u0430",
|
|
616
632
|
"menu.fullScreen": "\u041F\u043E\u0432\u043D\u043E\u0435\u043A\u0440\u0430\u043D\u043D\u0438\u0439 \u0440\u0435\u0436\u0438\u043C",
|
|
@@ -854,7 +870,17 @@ var uk = {
|
|
|
854
870
|
"agenda.people": { one: "{n} \u043B\u044E\u0434\u0438\u043D\u0430", few: "{n} \u043B\u044E\u0434\u0438\u043D\u0438", many: "{n} \u043B\u044E\u0434\u0435\u0439", other: "{n} \u043B\u044E\u0434\u0438\u043D\u0438" },
|
|
855
871
|
"agenda.join": "\u041F\u0440\u0438\u0454\u0434\u043D\u0430\u0442\u0438\u0441\u044F \u0434\u043E \u0434\u0437\u0432\u0456\u043D\u043A\u0430",
|
|
856
872
|
"agenda.joinOpens": "\u041F\u0440\u0438\u0454\u0434\u043D\u0430\u0442\u0438\u0441\u044F \u043C\u043E\u0436\u043D\u0430 \u0437\u0430 {n} \u0445\u0432 \u0434\u043E \u043F\u043E\u0447\u0430\u0442\u043A\u0443",
|
|
857
|
-
"agenda.details": "\u0414\u043E\u043A\u043B\u0430\u0434\u043D\u0456\u0448\u0435"
|
|
873
|
+
"agenda.details": "\u0414\u043E\u043A\u043B\u0430\u0434\u043D\u0456\u0448\u0435",
|
|
874
|
+
"agenda.otherDay": "{date} \xB7 \u043D\u0435 \u0441\u044C\u043E\u0433\u043E\u0434\u043D\u0456",
|
|
875
|
+
"agenda.backToday": "\u041F\u043E\u0432\u0435\u0440\u043D\u0443\u0442\u0438\u0441\u044C \u043D\u0430 \u0441\u044C\u043E\u0433\u043E\u0434\u043D\u0456",
|
|
876
|
+
"agenda.nothingDay": "\u0426\u044C\u043E\u0433\u043E \u0434\u043D\u044F \u043D\u0456\u0447\u043E\u0433\u043E \u043D\u0435 \u0437\u0430\u043F\u043B\u0430\u043D\u043E\u0432\u0430\u043D\u043E.",
|
|
877
|
+
"agenda.pickHint": "\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044C \u043F\u043E\u0434\u0456\u044E, \u0449\u043E\u0431 \u043F\u043E\u0431\u0430\u0447\u0438\u0442\u0438 \u0457\u0457 \u0442\u0443\u0442.",
|
|
878
|
+
"agenda.showPeople": "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u0438 \u0443\u0447\u0430\u0441\u043D\u0438\u043A\u0456\u0432",
|
|
879
|
+
"agenda.break": "\u041F\u0435\u0440\u0435\u0440\u0432\u0430 \xB7 {d}",
|
|
880
|
+
"agenda.showAhead": "\u041D\u0430\u0441\u0442\u0443\u043F\u043D\u0456 {n} \u0434\u043D\u0456\u0432",
|
|
881
|
+
"agenda.hideAhead": "\u0421\u0445\u043E\u0432\u0430\u0442\u0438 \u043D\u0430\u0441\u0442\u0443\u043F\u043D\u0456",
|
|
882
|
+
"agenda.nothingAhead": "\u041D\u0430\u0439\u0431\u043B\u0438\u0436\u0447\u0456 {n} \u0434\u043D\u0456\u0432 \u043D\u0456\u0447\u043E\u0433\u043E \u043D\u0435\u043C\u0430\u0454.",
|
|
883
|
+
"agenda.hidePeople": "\u0421\u0445\u043E\u0432\u0430\u0442\u0438 \u0443\u0447\u0430\u0441\u043D\u0438\u043A\u0456\u0432"
|
|
858
884
|
};
|
|
859
885
|
|
|
860
886
|
// ../../packages/core/src/i18n.ts
|
|
@@ -3754,8 +3780,9 @@ import { addDays as addDays8, differenceInCalendarDays as differenceInCalendarDa
|
|
|
3754
3780
|
// ../../packages/core/src/logic/details.ts
|
|
3755
3781
|
import { addDays as addDays7, isSameDay as isSameDay3, parseISO as parseISO7 } from "date-fns";
|
|
3756
3782
|
var same = (a, b) => !!a && !!b && a.trim().toLowerCase() === b.trim().toLowerCase();
|
|
3783
|
+
var extraEmail = (label, email) => same(email, label) ? void 0 : email;
|
|
3757
3784
|
function ownerLine(calendar, label, email) {
|
|
3758
|
-
return { calendar: same(calendar, label) || same(calendar, email) ? void 0 : calendar, label, email:
|
|
3785
|
+
return { calendar: same(calendar, label) || same(calendar, email) ? void 0 : calendar, label, email: extraEmail(label, email) };
|
|
3759
3786
|
}
|
|
3760
3787
|
function canEdit(e, account, calendar) {
|
|
3761
3788
|
if (!account || !calendar || calendar.readOnly) return false;
|
|
@@ -3798,6 +3825,23 @@ function linkify(text2) {
|
|
|
3798
3825
|
return out;
|
|
3799
3826
|
}
|
|
3800
3827
|
var cleanNotes = (s = "") => s.replace(/^@color(hex)?:.*$\n?/gim, "").trim();
|
|
3828
|
+
var HTML_TAG = /<\/?(a|b|br|p|div|span|i|u|s|em|strong|del|ul|ol|li|h[1-6]|blockquote|pre|code|hr|table|thead|tbody|tr|td|th|font|img|sub|sup)\b[^>]*>/i;
|
|
3829
|
+
var isHtml = (s) => HTML_TAG.test(s);
|
|
3830
|
+
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', apos: "'", nbsp: " " };
|
|
3831
|
+
var decode = (s) => s.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi, (m, e) => {
|
|
3832
|
+
if (e[0] !== "#") return ENTITIES[e.toLowerCase()] ?? m;
|
|
3833
|
+
const n = e[1] === "x" || e[1] === "X" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10);
|
|
3834
|
+
return n > 0 && n <= 1114111 ? String.fromCodePoint(n) : m;
|
|
3835
|
+
});
|
|
3836
|
+
function htmlToText(html) {
|
|
3837
|
+
return decode(
|
|
3838
|
+
html.replace(/<(script|style)\b[\s\S]*?<\/\1\s*>/gi, "").replace(/<a\b[^>]*?\bhref\s*=\s*["']?([^"'\s>]+)[^>]*>([\s\S]*?)<\/a\s*>/gi, (_, href, inner) => {
|
|
3839
|
+
const text2 = inner.replace(/<[^>]*>/g, "").trim();
|
|
3840
|
+
const url = decode(href);
|
|
3841
|
+
return !text2 || decode(text2) === url ? url : `${text2} (${url})`;
|
|
3842
|
+
}).replace(/<br\s*\/?>/gi, "\n").replace(/<li\b[^>]*>/gi, "\n\u2022 ").replace(/<\/(p|div|h[1-6]|tr|blockquote|pre|ul|ol)\s*>/gi, "\n").replace(/<[^>]*>/g, "")
|
|
3843
|
+
).replace(/[ \t]+\n/g, "\n").replace(/\n{3,}/g, "\n\n").trim();
|
|
3844
|
+
}
|
|
3801
3845
|
|
|
3802
3846
|
// ../../packages/core/src/logic/meeting.ts
|
|
3803
3847
|
function meetingUrl(location) {
|
|
@@ -3969,7 +4013,8 @@ var ATTENDEES_SHOWN = 5;
|
|
|
3969
4013
|
function EventInfo({ event, account, calendar, now, showAll, onToggleAll }) {
|
|
3970
4014
|
const links = eventLinks(event);
|
|
3971
4015
|
const where = locationText(event.location);
|
|
3972
|
-
const
|
|
4016
|
+
const raw = cleanNotes(event.description);
|
|
4017
|
+
const notes = isHtml(raw) ? htmlToText(raw) : raw;
|
|
3973
4018
|
const owner = ownerLine(calendar?.name ?? "Calendar", account?.label ?? event.accountId, account?.email);
|
|
3974
4019
|
const when2 = [duration(event), relative(event, now)].filter(Boolean).join(" \xB7 ");
|
|
3975
4020
|
return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", children: [
|
|
@@ -4751,9 +4796,11 @@ function EventEditor({ event, initialStart, onClose }) {
|
|
|
4751
4796
|
const calendar = calendars.find((c) => c.accountId === form.accountId && c.id === form.calendarId);
|
|
4752
4797
|
const value = (f) => {
|
|
4753
4798
|
switch (f) {
|
|
4754
|
-
case "account":
|
|
4755
|
-
|
|
4756
|
-
|
|
4799
|
+
case "account": {
|
|
4800
|
+
const name = account && [account.label, extraEmail(account.label, account.email)].filter(Boolean).join(" \xB7 ");
|
|
4801
|
+
if (event) return { text: name || form.accountId };
|
|
4802
|
+
return name ? { text: name } : { text: "\u2039 choose account \u203A", dim: true };
|
|
4803
|
+
}
|
|
4757
4804
|
case "calendar":
|
|
4758
4805
|
if (event) return { text: calendar?.name ?? form.calendarId };
|
|
4759
4806
|
if (!form.accountId) return { text: "choose an account first", dim: true };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mysticals",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Isolated multi-account calendar for the terminal on macOS, Linux and Windows",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"calendar",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"tsup": "^8.5.1",
|
|
48
48
|
"typescript": "^5.9.3",
|
|
49
49
|
"vitest": "^3.2.7",
|
|
50
|
-
"@mysticals/core": "0.
|
|
50
|
+
"@mysticals/core": "0.8.1"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"dev": "tsup --watch",
|