mysticals 0.7.0 → 0.8.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.
Files changed (2) hide show
  1. package/dist/cli.js +48 -4
  2. 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.7.0";
8
+ var version = "0.8.0";
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
@@ -3798,6 +3824,23 @@ function linkify(text2) {
3798
3824
  return out;
3799
3825
  }
3800
3826
  var cleanNotes = (s = "") => s.replace(/^@color(hex)?:.*$\n?/gim, "").trim();
3827
+ 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;
3828
+ var isHtml = (s) => HTML_TAG.test(s);
3829
+ var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', apos: "'", nbsp: " " };
3830
+ var decode = (s) => s.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi, (m, e) => {
3831
+ if (e[0] !== "#") return ENTITIES[e.toLowerCase()] ?? m;
3832
+ const n = e[1] === "x" || e[1] === "X" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10);
3833
+ return n > 0 && n <= 1114111 ? String.fromCodePoint(n) : m;
3834
+ });
3835
+ function htmlToText(html) {
3836
+ return decode(
3837
+ html.replace(/<(script|style)\b[\s\S]*?<\/\1\s*>/gi, "").replace(/<a\b[^>]*?\bhref\s*=\s*["']?([^"'\s>]+)[^>]*>([\s\S]*?)<\/a\s*>/gi, (_, href, inner) => {
3838
+ const text2 = inner.replace(/<[^>]*>/g, "").trim();
3839
+ const url = decode(href);
3840
+ return !text2 || decode(text2) === url ? url : `${text2} (${url})`;
3841
+ }).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, "")
3842
+ ).replace(/[ \t]+\n/g, "\n").replace(/\n{3,}/g, "\n\n").trim();
3843
+ }
3801
3844
 
3802
3845
  // ../../packages/core/src/logic/meeting.ts
3803
3846
  function meetingUrl(location) {
@@ -3969,7 +4012,8 @@ var ATTENDEES_SHOWN = 5;
3969
4012
  function EventInfo({ event, account, calendar, now, showAll, onToggleAll }) {
3970
4013
  const links = eventLinks(event);
3971
4014
  const where = locationText(event.location);
3972
- const notes = cleanNotes(event.description);
4015
+ const raw = cleanNotes(event.description);
4016
+ const notes = isHtml(raw) ? htmlToText(raw) : raw;
3973
4017
  const owner = ownerLine(calendar?.name ?? "Calendar", account?.label ?? event.accountId, account?.email);
3974
4018
  const when2 = [duration(event), relative(event, now)].filter(Boolean).join(" \xB7 ");
3975
4019
  return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mysticals",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
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.7.0"
50
+ "@mysticals/core": "0.8.0"
51
51
  },
52
52
  "scripts": {
53
53
  "dev": "tsup --watch",