strom-research 1.22.0-beta.1 → 1.22.0-beta.2

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/CHANGELOG.cs.md CHANGED
@@ -7,11 +7,13 @@ Změny každé verze ve zkratce. Úplné poznámky a instalační řádky jsou n
7
7
 
8
8
  ## 1.22.0
9
9
 
10
- *Připravuje se: bety do 1.22.0-beta.1. Oddíl bude úplný s vydáním.*
10
+ *Připravuje se: bety do 1.22.0-beta.2. Oddíl bude úplný s vydáním.*
11
11
 
12
12
  - **Jméno jednou v tom, co čeká.** Úkol k materiálu poslanému z aplikace Strom jmenoval ve widgetu a na stránce
13
13
  telefonu každého člověka dvakrát (podruhé v hranatých závorkách) a jeho text bez jmen nechal prázdné závorky; menu,
14
14
  `strom plan`, aplikace Strom i soubor GEDCOM ukazovaly jméno s jeho ID zopakované. Každé teď jméno řekne jednou.
15
+ - **Widget otevře správný výzkum.** Při několika stromech stejného jména v aplikaci Strom mohl widget na ploše Macu
16
+ otevřít jiný z nich; teď otevře strom svého výzkumu.
15
17
 
16
18
  ## 1.21.0
17
19
 
package/CHANGELOG.de.md CHANGED
@@ -7,12 +7,14 @@ Die Änderungen jeder Version in Kürze. Die vollständigen Hinweise und die Ins
7
7
 
8
8
  ## 1.22.0
9
9
 
10
- *In Vorbereitung: die Betas bis 1.22.0-beta.1. Der Abschnitt ist mit dem Release vollständig.*
10
+ *In Vorbereitung: die Betas bis 1.22.0-beta.2. Der Abschnitt ist mit dem Release vollständig.*
11
11
 
12
12
  - **Jeder Name einmal in dem, was wartet.** Eine Aufgabe zu Material, das aus der Strom-App gesendet wurde, nannte im
13
13
  Widget und auf der Seite des Telefons jede Person zweimal (das zweite Mal in eckigen Klammern), und ihr Text ohne
14
14
  Namen ließ leere Klammern stehen; Menü, `strom plan`, die Strom-App und die GEDCOM-Datei zeigten den Namen mit
15
15
  seiner ID wiederholt. Jedes nennt den Namen jetzt einmal.
16
+ - **Das Widget öffnet die richtige Forschung.** Bei mehreren Stammbäumen gleichen Namens in der Strom-App konnte das
17
+ Widget auf dem Mac-Schreibtisch einen der anderen öffnen; jetzt öffnet es den Stammbaum seiner eigenen Forschung.
16
18
 
17
19
  ## 1.21.0
18
20
 
package/CHANGELOG.md CHANGED
@@ -7,11 +7,13 @@ The changes of each version in short. The full notes and the install lines are o
7
7
 
8
8
  ## 1.22.0
9
9
 
10
- *In preparation: the betas up to 1.22.0-beta.1. The section is complete with the release.*
10
+ *In preparation: the betas up to 1.22.0-beta.2. The section is complete with the release.*
11
11
 
12
12
  - **Each name once in what waits.** A task for material sent from the Strom app named each person twice in the
13
13
  widget and on the phone's page (the second time in brackets), and its text without names kept empty brackets; the
14
14
  menu, `strom plan`, the Strom app and the GEDCOM file showed the name with its ID repeated. Each says the name once.
15
+ - **The widget opens the right research.** With several trees of one name in the Strom app, the widget on the Mac's
16
+ desktop could open one of the others; it now opens the tree of its own research.
15
17
 
16
18
  ## 1.21.0
17
19
 
package/dist/core/tree.js CHANGED
@@ -29,7 +29,7 @@ export const TREE_FILE = "strom.json";
29
29
  export const SEAL_FOREIGN = "seal.foreign";
30
30
  // between releases the candidate being made (a bridge run from the sources says what it is: the Strom app goes by it);
31
31
  // at a release the release's own (package.json)
32
- export const VERSION = "1.22.0-beta.1";
32
+ export const VERSION = "1.22.0-beta.2";
33
33
  const GITIGNORE = `# Strom Research — local state and large files are not versioned
34
34
  .strom/
35
35
  /media/
@@ -66,12 +66,21 @@ export function appSlug(name) {
66
66
  .replace(/[^a-z0-9]+/gu, "-")
67
67
  .replace(/^-+|-+$/gu, "");
68
68
  }
69
- /** The tree in the Strom app strom uses (the setting strom.app.url, the channel's copy): ?tree=<slug of its name>. */
70
- function treeUrl(env, name) {
69
+ /** A tree's ID as the app keeps it (research.id, from the GEDCOM's _STROM_TREE): a UUID. */
70
+ const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/u;
71
+ /**
72
+ * The tree in the Strom app strom uses (the setting strom.app.url, the channel's copy): ?tree=<slug of its name> for
73
+ * an app that knows only names, and &research=<the tree's ID, lowercase> — the one research of that name, when several
74
+ * trees in the app have it. An ID that is no UUID: the name alone.
75
+ */
76
+ export function treeUrl(env, name, id) {
71
77
  const url = new URL(appUrlSetting(new Settings(env, {})).url);
72
78
  const slug = appSlug(name);
73
79
  if (slug)
74
80
  url.searchParams.set("tree", slug);
81
+ const research = id.trim().toLowerCase();
82
+ if (UUID.test(research))
83
+ url.searchParams.set("research", research);
75
84
  return url.href;
76
85
  }
77
86
  // ── names out of a text ─────────────────────────────────────────────────────────────────────────────────────────────
@@ -264,7 +273,7 @@ export function widgetTree(root, env, opts) {
264
273
  if (actsAsArchive(tree))
265
274
  return undefined;
266
275
  const lang = tree.lang;
267
- const openUrl = treeUrl(env, tree.config.name);
276
+ const openUrl = treeUrl(env, tree.config.name, tree.config.id);
268
277
  const o = treeOverview(root, env);
269
278
  const stems = nameStems(tree, o.latest ?? "");
270
279
  const lines = o.now.map((l) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strom-research",
3
- "version": "1.22.0-beta.1",
3
+ "version": "1.22.0-beta.2",
4
4
  "description": "Genealogical research toolkit for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {