namespace-guard 0.18.0 → 0.19.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.
package/README.md CHANGED
@@ -155,7 +155,7 @@ Two research tracks feed the library:
155
155
 
156
156
  **Visual measurement.** 1,397 confusable pairs rendered across 230 system fonts, scored by structural similarity (SSIM). 494 of these are novel cross-script pairs between non-Latin scripts (Hangul/Han, Cyrillic/Greek, Cyrillic/Arabic, and more) with zero coverage in any existing standard. Full dataset published as [confusable-vision](https://github.com/paultendo/confusable-vision) (CC-BY-4.0).
157
157
 
158
- **Normalisation composability.** 31 characters where Unicode's confusables.txt and NFKC normalisation disagree. Two production maps (`CONFUSABLE_MAP` for NFKC-first, `CONFUSABLE_MAP_FULL` for raw-input pipelines), a benchmark corpus, and composability vectors wired into CLI drift baselines. Findings accepted into [Unicode public review (PRI #540)](https://www.unicode.org/review/pri540/).
158
+ **Normalisation composability.** 31 characters where Unicode's confusables.txt and NFKC normalisation disagree. Two production maps (`CONFUSABLE_MAP` for NFKC-first, `CONFUSABLE_MAP_FULL` for raw-input pipelines), a benchmark corpus, and composability vectors wired into CLI drift baselines. Submitted to [Unicode public review (PRI #540)](https://www.unicode.org/review/pri540/) and published in [accumulated feedback](https://www.unicode.org/review/pri540/feedback.html).
159
159
 
160
160
  - Technical reference: [docs/reference.md#how-the-anti-spoofing-pipeline-works](docs/reference.md#how-the-anti-spoofing-pipeline-works)
161
161
  - Launch write-up: https://paultendo.github.io/posts/namespace-guard-launch/
@@ -0,0 +1,22 @@
1
+ import { ConfusableWeights } from './index.mjs';
2
+
3
+ /**
4
+ * Per-font confusable weight maps for 74 macOS system fonts.
5
+ *
6
+ * Each font's map contains only the high-risk pairs (SSIM >= 0.7) that
7
+ * are visually confusable when the target character renders in that specific font.
8
+ * This gives 10-28x less data than the universal CONFUSABLE_WEIGHTS map.
9
+ *
10
+ * Usage:
11
+ * import { FONT_SPECIFIC_WEIGHTS } from "namespace-guard/font-specific-weights";
12
+ * const weights = FONT_SPECIFIC_WEIGHTS["Arial"];
13
+ *
14
+ * Platform: darwin arm64 25.2.0 (macos-m1-system-230fonts)
15
+ *
16
+ * @licence CC-BY-4.0 (data); MIT (code)
17
+ * @attribution Paul Wood FRSA, confusable-vision
18
+ * @see https://github.com/paultendo/confusable-vision
19
+ */
20
+ declare const FONT_SPECIFIC_WEIGHTS: Record<string, ConfusableWeights>;
21
+
22
+ export { FONT_SPECIFIC_WEIGHTS };
@@ -0,0 +1,22 @@
1
+ import { ConfusableWeights } from './index.js';
2
+
3
+ /**
4
+ * Per-font confusable weight maps for 74 macOS system fonts.
5
+ *
6
+ * Each font's map contains only the high-risk pairs (SSIM >= 0.7) that
7
+ * are visually confusable when the target character renders in that specific font.
8
+ * This gives 10-28x less data than the universal CONFUSABLE_WEIGHTS map.
9
+ *
10
+ * Usage:
11
+ * import { FONT_SPECIFIC_WEIGHTS } from "namespace-guard/font-specific-weights";
12
+ * const weights = FONT_SPECIFIC_WEIGHTS["Arial"];
13
+ *
14
+ * Platform: darwin arm64 25.2.0 (macos-m1-system-230fonts)
15
+ *
16
+ * @licence CC-BY-4.0 (data); MIT (code)
17
+ * @attribution Paul Wood FRSA, confusable-vision
18
+ * @see https://github.com/paultendo/confusable-vision
19
+ */
20
+ declare const FONT_SPECIFIC_WEIGHTS: Record<string, ConfusableWeights>;
21
+
22
+ export { FONT_SPECIFIC_WEIGHTS };