@nkardaz/typography-rules 1.0.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/LICENSE +21 -0
- package/README.md +911 -0
- package/dist/api/blacklist.d.ts +72 -0
- package/dist/api/htmlNodes.d.ts +30 -0
- package/dist/api/index.d.ts +6 -0
- package/dist/api/newRule.d.ts +51 -0
- package/dist/api/registerRule.d.ts +27 -0
- package/dist/api/rulesInit.d.ts +49 -0
- package/dist/functions/chemNotation.d.ts +10 -0
- package/dist/functions/clearSpaces.d.ts +16 -0
- package/dist/functions/index.cjs +514 -0
- package/dist/functions/index.d.ts +8 -0
- package/dist/functions/index.mjs +491 -0
- package/dist/functions/rubyText.d.ts +11 -0
- package/dist/functions/runt.d.ts +3 -0
- package/dist/functions/smartNumberGrouping.d.ts +25 -0
- package/dist/functions/smartQuotes.d.ts +29 -0
- package/dist/functions/wrapWithTag.d.ts +42 -0
- package/dist/glyphs/index.cjs +737 -0
- package/dist/glyphs/index.d.ts +53 -0
- package/dist/glyphs/index.mjs +714 -0
- package/dist/glyphs/proto.d.ts +11 -0
- package/dist/glyphs/registry.d.ts +728 -0
- package/dist/glyphs/types.d.ts +151 -0
- package/dist/helpers/index.cjs +268 -0
- package/dist/helpers/index.d.ts +133 -0
- package/dist/helpers/index.mjs +245 -0
- package/dist/helpers/types.d.ts +71 -0
- package/dist/index.cjs +985 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.mjs +977 -0
- package/dist/style/index.d.ts +2 -0
- package/dist/style/main.css +16 -0
- package/dist/types.d.ts +223 -0
- package/dist/typography/aliases.d.ts +129 -0
- package/dist/typography/expressions/common.d.ts +29 -0
- package/dist/typography/expressions/en.d.ts +25 -0
- package/dist/typography/expressions/ru.d.ts +29 -0
- package/dist/typography/markup/common.d.ts +17 -0
- package/dist/typography/markup/en.d.ts +3 -0
- package/dist/typography/markup/index.d.ts +4 -0
- package/dist/typography/markup/ru.d.ts +3 -0
- package/dist/typography/sets/ang.d.ts +3 -0
- package/dist/typography/sets/common.d.ts +17 -0
- package/dist/typography/sets/en.d.ts +14 -0
- package/dist/typography/sets/index.d.ts +5 -0
- package/dist/typography/sets/ru.d.ts +16 -0
- package/dist/typography/store.d.ts +63 -0
- package/package.json +92 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { GlyphData, GlyphSet, GlyphSetInterface, ProtoSet } from './types';
|
|
2
|
+
export type * from './types';
|
|
3
|
+
export * from './registry';
|
|
4
|
+
/**
|
|
5
|
+
* Creates a glyph set with prototype utilities attached.
|
|
6
|
+
*
|
|
7
|
+
* This function wraps a plain glyph dictionary and attaches shared
|
|
8
|
+
* prototype methods (e.g. `join`) without modifying the original data.
|
|
9
|
+
*
|
|
10
|
+
* Used as the base building block for all character registries.
|
|
11
|
+
*
|
|
12
|
+
* @template T - Glyph dictionary shape
|
|
13
|
+
* @param data - Raw glyph key-value map
|
|
14
|
+
* @returns A glyph set with prototype methods enabled
|
|
15
|
+
*/
|
|
16
|
+
export declare function createCharacters<T extends GlyphData>(data: T): GlyphSet<T>;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a prototype set for grouped glyph access.
|
|
19
|
+
*
|
|
20
|
+
* Provides a `get` method that merges:
|
|
21
|
+
* - shared `common` glyphs
|
|
22
|
+
* - locale-specific glyph overrides
|
|
23
|
+
*
|
|
24
|
+
* This enables hierarchical glyph resolution:
|
|
25
|
+
* common → locale → final glyph set
|
|
26
|
+
*
|
|
27
|
+
* @template T - Structure containing optional `common` and locale groups
|
|
28
|
+
* @returns Prototype object with grouped access logic
|
|
29
|
+
*/
|
|
30
|
+
export declare function createProtoSet<T extends {
|
|
31
|
+
common?: Record<string, GlyphSetInterface>;
|
|
32
|
+
}>(): ProtoSet<T>;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a full character registry with grouped access support.
|
|
35
|
+
*
|
|
36
|
+
* Combines:
|
|
37
|
+
* - raw character data groups (e.g. common, en, ru, fr)
|
|
38
|
+
* - prototype-based access layer
|
|
39
|
+
* - hierarchical resolution via ProtoSet
|
|
40
|
+
*
|
|
41
|
+
* This is the main entry point for building locale-aware
|
|
42
|
+
* glyph/typography registries.
|
|
43
|
+
*
|
|
44
|
+
* @template T - Character set structure with optional `common` group
|
|
45
|
+
* and locale-specific groups
|
|
46
|
+
*
|
|
47
|
+
* @param data - Structured glyph registry
|
|
48
|
+
* @returns Character set with grouped access methods
|
|
49
|
+
*/
|
|
50
|
+
export declare function createCharacterSet<T extends {
|
|
51
|
+
common?: Record<string, GlyphSetInterface>;
|
|
52
|
+
} & Record<string, Record<string, GlyphSetInterface>>>(data: T): T & ProtoSet<T>;
|
|
53
|
+
//# sourceMappingURL=index.d.ts.map
|