@bridgebrew/rail 0.0.2 → 0.0.3
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/browser/browser.tsx +15 -4
- package/package.json +2 -2
package/browser/browser.tsx
CHANGED
|
@@ -456,12 +456,23 @@ function JoinDialog({
|
|
|
456
456
|
);
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
-
/**
|
|
460
|
-
const
|
|
461
|
-
|
|
459
|
+
/** The letters NFKD leaves whole (no base letter and mark to split them into), spelled in plain Latin (plugins#217). */
|
|
460
|
+
const LETTERS: Record<string, string> = { ß: 'ss', æ: 'ae', œ: 'oe', ø: 'o', ł: 'l', đ: 'd', ð: 'd', þ: 'th', ı: 'i' };
|
|
461
|
+
/** `text` lowercase in plain Latin letters where it has them: those letters spelled out, then accents dropped
|
|
462
|
+
* (`Straße Łódź` → `strasse lodz`). */
|
|
463
|
+
const foldLetters = (text: string) =>
|
|
464
|
+
text
|
|
465
|
+
// ʼn first: NFKD splits it into an apostrophe and `n`, which would split the word.
|
|
466
|
+
.replace(/ʼn/g, 'n')
|
|
467
|
+
// NFKD before the rest: it reveals letters (`Ǽ` → `Æ` + accent, `𝐒` → `S`) the table and the lowercase then see.
|
|
462
468
|
.normalize('NFKD')
|
|
463
|
-
.replace(/[\u0300-\u036f]/g, '')
|
|
464
469
|
.toLowerCase()
|
|
470
|
+
.replace(/[ßæœøłđðþı]/g, (letter) => LETTERS[letter] ?? letter)
|
|
471
|
+
.replace(/[\u0300-\u036f]/g, '');
|
|
472
|
+
|
|
473
|
+
/** A slug from a title: kebab-case, at most 40 characters (the kernel's rule). */
|
|
474
|
+
const slugOf = (title: string) =>
|
|
475
|
+
foldLetters(title)
|
|
465
476
|
.replace(/[^a-z0-9]+/g, '-')
|
|
466
477
|
.replace(/^-+|-+$/g, '')
|
|
467
478
|
.slice(0, 40)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bridgebrew/rail",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The column of workspace tiles, with the Bridge button and its status dot.",
|
|
6
6
|
"keywords": [
|
|
@@ -36,6 +36,6 @@
|
|
|
36
36
|
"typecheck": "bridge plugin check ."
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
|
-
"bridge": ">=0.0.1-nightly.
|
|
39
|
+
"bridge": ">=0.0.1-nightly.20261123.1"
|
|
40
40
|
}
|
|
41
41
|
}
|