@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.
Files changed (49) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +911 -0
  3. package/dist/api/blacklist.d.ts +72 -0
  4. package/dist/api/htmlNodes.d.ts +30 -0
  5. package/dist/api/index.d.ts +6 -0
  6. package/dist/api/newRule.d.ts +51 -0
  7. package/dist/api/registerRule.d.ts +27 -0
  8. package/dist/api/rulesInit.d.ts +49 -0
  9. package/dist/functions/chemNotation.d.ts +10 -0
  10. package/dist/functions/clearSpaces.d.ts +16 -0
  11. package/dist/functions/index.cjs +514 -0
  12. package/dist/functions/index.d.ts +8 -0
  13. package/dist/functions/index.mjs +491 -0
  14. package/dist/functions/rubyText.d.ts +11 -0
  15. package/dist/functions/runt.d.ts +3 -0
  16. package/dist/functions/smartNumberGrouping.d.ts +25 -0
  17. package/dist/functions/smartQuotes.d.ts +29 -0
  18. package/dist/functions/wrapWithTag.d.ts +42 -0
  19. package/dist/glyphs/index.cjs +737 -0
  20. package/dist/glyphs/index.d.ts +53 -0
  21. package/dist/glyphs/index.mjs +714 -0
  22. package/dist/glyphs/proto.d.ts +11 -0
  23. package/dist/glyphs/registry.d.ts +728 -0
  24. package/dist/glyphs/types.d.ts +151 -0
  25. package/dist/helpers/index.cjs +268 -0
  26. package/dist/helpers/index.d.ts +133 -0
  27. package/dist/helpers/index.mjs +245 -0
  28. package/dist/helpers/types.d.ts +71 -0
  29. package/dist/index.cjs +985 -0
  30. package/dist/index.d.ts +5 -0
  31. package/dist/index.mjs +977 -0
  32. package/dist/style/index.d.ts +2 -0
  33. package/dist/style/main.css +16 -0
  34. package/dist/types.d.ts +223 -0
  35. package/dist/typography/aliases.d.ts +129 -0
  36. package/dist/typography/expressions/common.d.ts +29 -0
  37. package/dist/typography/expressions/en.d.ts +25 -0
  38. package/dist/typography/expressions/ru.d.ts +29 -0
  39. package/dist/typography/markup/common.d.ts +17 -0
  40. package/dist/typography/markup/en.d.ts +3 -0
  41. package/dist/typography/markup/index.d.ts +4 -0
  42. package/dist/typography/markup/ru.d.ts +3 -0
  43. package/dist/typography/sets/ang.d.ts +3 -0
  44. package/dist/typography/sets/common.d.ts +17 -0
  45. package/dist/typography/sets/en.d.ts +14 -0
  46. package/dist/typography/sets/index.d.ts +5 -0
  47. package/dist/typography/sets/ru.d.ts +16 -0
  48. package/dist/typography/store.d.ts +63 -0
  49. package/package.json +92 -0
package/package.json ADDED
@@ -0,0 +1,92 @@
1
+ {
2
+ "name": "@nkardaz/typography-rules",
3
+ "version": "1.0.0",
4
+ "description": "Rules package to be used in typography plugins. Glyphs library and helpers included.",
5
+ "license": "MIT",
6
+ "author": "Yalla Nkardaz",
7
+ "keywords": [
8
+ "typography",
9
+ "typographic",
10
+ "text-formatting",
11
+ "typesetting",
12
+ "russian",
13
+ "english",
14
+ "text"
15
+ ],
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/DemerNkardaz/typography-rules.git"
19
+ },
20
+ "homepage": "https://github.com/DemerNkardaz/typography-rules#readme",
21
+ "bugs": {
22
+ "url": "https://github.com/DemerNkardaz/typography-rules/issues"
23
+ },
24
+ "type": "module",
25
+ "main": "./dist/index.cjs",
26
+ "module": "./dist/index.mjs",
27
+ "types": "./dist/index.d.ts",
28
+ "exports": {
29
+ ".": {
30
+ "types": "./dist/index.d.ts",
31
+ "import": "./dist/index.mjs",
32
+ "require": "./dist/index.cjs"
33
+ },
34
+ "./glyphs": {
35
+ "types": "./dist/glyphs/index.d.ts",
36
+ "import": "./dist/glyphs/index.mjs",
37
+ "require": "./dist/glyphs/index.cjs"
38
+ },
39
+ "./helpers": {
40
+ "types": "./dist/helpers/index.d.ts",
41
+ "import": "./dist/helpers/index.mjs",
42
+ "require": "./dist/helpers/index.cjs"
43
+ },
44
+ "./functions": {
45
+ "types": "./dist/functions/index.d.ts",
46
+ "import": "./dist/functions/index.mjs",
47
+ "require": "./dist/functions/index.cjs"
48
+ },
49
+ "./style": {
50
+ "types": "./dist/style/index.d.ts",
51
+ "style": "./dist/style/main.css",
52
+ "import": "./dist/style/main.css",
53
+ "require": "./dist/style/main.css"
54
+ }
55
+ },
56
+ "bundleSizeLimit": 153600,
57
+ "sideEffects": true,
58
+ "engines": {
59
+ "node": ">=24.0.0"
60
+ },
61
+ "scripts": {
62
+ "generate": "node tools/generate-sets-index.mjs",
63
+ "build:js": "node esbuild.config.mjs",
64
+ "build:types": "tsc --project tsconfig.build.json --emitDeclarationOnly",
65
+ "build": "npm run generate && npm run build:js && npm run build:types",
66
+ "dev": "esbuild --watch",
67
+ "lint": "eslint src --ext .ts,.tsx",
68
+ "lint:fix": "eslint src --ext .ts,.tsx --fix",
69
+ "format": "prettier --write \"src/**/*.{ts,tsx,json,md}\"",
70
+ "type-check": "tsc --noEmit",
71
+ "test": "vitest --run",
72
+ "test:coverage": "vitest --run --coverage",
73
+ "test:ui": "vitest --ui",
74
+ "prepublishOnly": "npm run generate && npm run build && npm run lint && npm run type-check",
75
+ "knip": "knip"
76
+ },
77
+ "devDependencies": {
78
+ "@eslint/js": "^10.0.1",
79
+ "@types/mdast": "^4.0.4",
80
+ "@types/node": "^25.9.2",
81
+ "@vitest/coverage-v8": "^4.1.8",
82
+ "esbuild": "^0.28.0",
83
+ "eslint": "^10.4.1",
84
+ "eslint-config-prettier": "^10.1.8",
85
+ "knip": "^6.15.0",
86
+ "mdast-util-mdx-jsx": "^3.2.0",
87
+ "prettier": "^3.0.0",
88
+ "typescript": "^6.0.3",
89
+ "typescript-eslint": "^8.60.1",
90
+ "vitest": "^4.1.8"
91
+ }
92
+ }