Skip to content

Commit c21e84b

Browse files
authored
Merge branch 'main' into tonkeeperwallet
2 parents 135b2f4 + b957829 commit c21e84b

File tree

592 files changed

+35883
-16131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

592 files changed

+35883
-16131
lines changed

.cspell.jsonc

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
// The .jsonc extension allows free use of comments and trailing commas.
2+
// The file is named with a dot in front to discourage frequent editing —
3+
// target dictionaries are located in the resources/dictionaries/ directory.
4+
{
5+
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
6+
"version": "0.2",
7+
"language": "en-US",
8+
"dictionaryDefinitions": [
9+
{
10+
"name": "main-list",
11+
"path": "resources/dictionaries/custom.txt",
12+
"addWords": true,
13+
},
14+
{
15+
"name": "deny-list",
16+
"path": "resources/dictionaries/ban.txt"
17+
},
18+
{
19+
"name": "tvm-instructions",
20+
"path": "resources/dictionaries/tvm-instructions.txt"
21+
}
22+
],
23+
"dictionaries": [
24+
"main-list",
25+
"deny-list",
26+
"tvm-instructions",
27+
],
28+
"useGitignore": true,
29+
"files": [
30+
"**/*.{md,mdx}",
31+
"**/*.{js,jsx}",
32+
],
33+
"minWordLength": 3,
34+
"overrides": [
35+
// Enable case sensitivity for Markdown and MDX files only
36+
{
37+
"filename": "**/*.{md,mdx}",
38+
"caseSensitive": true
39+
},
40+
// Do not check for banned words (denylist) in certain files
41+
{
42+
"filename": "contribute/style-guide*.mdx",
43+
"ignoreWords": [
44+
"tos",
45+
"DOI",
46+
"BOC",
47+
],
48+
"dictionaries": [
49+
"!deny-list"
50+
]
51+
},
52+
{
53+
"filename": "**/api/**/v*",
54+
"dictionaries": [
55+
"!deny-list"
56+
]
57+
},
58+
],
59+
"ignorePaths": [
60+
// Some whitepapers
61+
"foundations/whitepapers/tblkch.mdx",
62+
"foundations/whitepapers/ton.mdx",
63+
// Generated files
64+
"tvm/instructions.mdx",
65+
// Binaries
66+
"**/*.boc",
67+
// Code
68+
"**/*.fc",
69+
"**/*.fif",
70+
"**/*.fift",
71+
"**/*.func",
72+
"**/*.tact",
73+
"**/*.tasm",
74+
"**/*.tlb",
75+
"**/*.tolk",
76+
"**/*.py*",
77+
"**/*.{ts,tsx}",
78+
// Miscellaneous
79+
"**/*.git*",
80+
"**/*.svg",
81+
"**/*.txt",
82+
"CODEOWNERS",
83+
"snippets/tvm-instruction-table.jsx",
84+
],
85+
"ignoreRegExpList": [
86+
//
87+
// Predefined patterns from:
88+
// https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell-lib/src/lib/Settings/DefaultSettings.ts
89+
//
90+
"SpellCheckerDisable",
91+
"SpellCheckerIgnoreInDocSetting",
92+
"Urls",
93+
"Email",
94+
"RsaCert",
95+
"SshRsa",
96+
"Base64MultiLine",
97+
"Base64SingleLine",
98+
"CommitHash",
99+
"CommitHashLink",
100+
"CStyleHexValue",
101+
"CSSHexValue",
102+
"SHA",
103+
"HashStrings",
104+
"UnicodeRef",
105+
"UUID",
106+
"href",
107+
//
108+
// Custom patterns
109+
//
110+
"=\\s*\".*?\"", // ="..."
111+
"(?<!\\\\)\\$(?:\\\\.|[^$\\\\])*?\\$", // inline math
112+
"/(?<!\\\\)\\$\\$[\\s\\S]*?\\$\\$/g", // block math
113+
"(?<!\\\\)`.*?`", // inline code
114+
"/^([ \\t]*```).*([\\s\\S]*?)^\\1$/gmx", // block code
115+
"^import[ \\t].+$", // import ...
116+
"/^export[ \\t].+?(?=\\r?\\n\\r?\\n)/gms", // export ...
117+
"(?<!\\\\)\\{(?:[^{}]|\\{(?:[^{}]|\\{[^{}]*\\})*\\})*\\}", // jsx expressions in {}
118+
"/\\bton-?[a-z]+/gi", // ton-prefixed product names
119+
],
120+
}

.github/scripts/build_review_instructions.py

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,28 @@ def main() -> None:
2828
2. Only after style compliance, check for obvious, provable, blocking errors not covered by the guide (e.g., an incorrect calculation or an unsafe, non‑runnable step) and report them with proof. If not certain from repo content alone, omit.
2929
3030
Review protocol:
31-
- Inspect only .md/.mdx files touched by this PR. Ignore all other file types.
31+
- Inspect only content files touched by this PR: `.md`, `.mdx`, and `docs.json`.
32+
- It is acceptable to report findings that originate in `docs.json` (e.g., broken or duplicate paths/slugs, invalid sidebar grouping, typos in titles). When the problem is in `docs.json`, cite its exact lines.
3233
- Examine only the lines changed in this diff (use surrounding context as needed). Do not flag issues that exist solely in unchanged content.
3334
- Report every issue you see in this diff; do not postpone or soften problems.
3435
- Location links must be repo-relative paths such as pending/discover/web3-basics/glossary.mdx?plain=1#L10-L12 (no https:// prefix).
3536
- When a style rule applies, cite it using contribute/style-guide-extended.mdx?plain=1#L<start>-L<end>. Only add the citation after running a verification command such as `rg "<term>" contribute/style-guide-extended.mdx` or `sed -n '<start>,<end>p'` and inspecting the output to confirm the line range.
3637
- If no style rule applies (e.g., factual error, typo), explain the issue clearly without a style link.
3738
- Keep findings direct, professional, and concise. Suggestions must describe the required fix.
39+
- Code identifiers: if the issue is lack of code font, preserve the token’s original case and wrap it in backticks. Only change case when the style guide explicitly mandates a canonical case for that exact identifier and you cite the relevant line range.
40+
41+
HARD SCOPE WALL — CONTENT ONLY (MANDATORY):
42+
- You MUST NEVER read, open, cite, or rely on any non‑content files. This includes but is not limited to CI configs (`.github/**`), workflows (`*.yml`), code (`*.ts`, `*.tsx`, `*.js`, `*.py`, `*.go`, etc.), configuration/manifests (`package.json`, `pnpm-lock.yaml`, `*.toml`, `*.yaml`), tests, scripts, or build tool files.
43+
- Allowed inputs are limited to the changed `.md`/`.mdx` files, `docs.json`, and `contribute/style-guide-extended.mdx` (for rule citations).
44+
- Do not search outside these allowed files. Do not run commands that read or display non‑content files. Treat them as inaccessible.
45+
46+
Context for `docs.json`:
47+
- Purpose: defines the site navigation tree, groupings, and slug mapping used by the docs site (metadata that directly affects the rendered docs experience).
48+
- Legit uses during review:
49+
• Findings may target `docs.json` when the issue is there (e.g., broken/duplicate slug, incorrect path, wrong ordering/grouping).
50+
• You may also use `docs.json` to verify that changed frontmatter `slug`/title or links in `.md`/`.mdx` remain valid.
51+
• Cite `docs.json` lines when it is the source of the problem; otherwise cite the offending `.md`/`.mdx` lines.
52+
• If an issue relates to both `docs.json` and `.md`/`.mdx`, report it only on `docs.json`.
3853
- Do not speculate about Mintlify runtime behavior or external systems; rely solely on repository content.
3954
4055
Severity policy:
@@ -50,7 +65,18 @@ def main() -> None:
5065
"""
5166
)
5267

53-
print(style_block + body)
68+
link_rules = textwrap.dedent(
69+
"""
70+
71+
LINK FORMATTING — REQUIRED (overrides earlier bullets):
72+
- Style‑guide citations: use a compact Markdown link with a short label, e.g. [Style rule — <short title>](contribute/style-guide-extended.mdx?plain=1#L<start>-L<end>). Verify the exact line range first (e.g., `rg "<term>" contribute/style-guide-extended.mdx` or `sed -n '<start>,<end>p'`).
73+
- General code/location references: output a plain repo‑relative link on its own line, with no Markdown/backticks/prefix text so GitHub renders a rich preview. Example line:
74+
pending/discover/web3-basics/glossary.mdx?plain=1#L10-L12
75+
- Do not use https:// prefixes for repo‑relative links.
76+
"""
77+
)
78+
79+
print(style_block + body + link_rules)
5480

5581

5682
if __name__ == "__main__":

0 commit comments

Comments
 (0)