dock-rush 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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +166 -0
  3. package/package.json +104 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 da-b1rmuda
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,166 @@
1
+ # Dock Rush
2
+
3
+ A modern, feature-rich documentation system for React applications with versioning, multi-language support, and markdown-based content.
4
+
5
+ ## Features
6
+
7
+ - 📚 **Markdown-based** - Write documentation in Markdown
8
+ - 🌍 **Multi-language** - Support for multiple languages
9
+ - 🔄 **Versioning** - Organize documentation by versions
10
+ - 🔍 **Full-text search** - Search through titles and content
11
+ - 🎨 **Modern UI** - Beautiful, responsive interface built with Radix UI and Tailwind CSS
12
+ - ⚡ **Fast** - Optimized for performance with lazy loading
13
+ - 🔗 **URL routing** - Shareable links to specific pages
14
+ - 🎯 **Flexible structure** - Support for pages, groups, dropdowns, and buttons
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm install dock-rush
20
+ # or
21
+ pnpm add dock-rush
22
+ # or
23
+ yarn add dock-rush
24
+ ```
25
+
26
+ ## Quick Start
27
+
28
+ ### 1. Install the Vite plugin
29
+
30
+ ```typescript
31
+ // vite.config.ts
32
+ import { defineConfig } from 'vite'
33
+ import react from '@vitejs/plugin-react'
34
+ import { dockRushScannerPlugin } from 'dock-rush/plugin'
35
+
36
+ export default defineConfig({
37
+ plugins: [
38
+ react(),
39
+ dockRushScannerPlugin({
40
+ route: '/api/dock-rush-scan', // optional, default: '/api/dock-rush-scan'
41
+ root: process.cwd(), // optional
42
+ }),
43
+ ],
44
+ })
45
+ ```
46
+
47
+ ### 2. Use the Documentation component
48
+
49
+ ```tsx
50
+ import { Documentation } from 'dock-rush'
51
+ import 'dock-rush/style.css'
52
+
53
+ function App() {
54
+ return (
55
+ <Documentation
56
+ title='My Documentation'
57
+ folderPath='docs'
58
+ useToggleTheme={true}
59
+ useToggleLanguage={true}
60
+ useSearch={true}
61
+ versionSelect={true}
62
+ />
63
+ )
64
+ }
65
+ ```
66
+
67
+ ### 3. Create your documentation structure
68
+
69
+ ```
70
+ docs/
71
+ ├── 2.0.2/
72
+ │ ├── en/
73
+ │ │ ├── intro.md
74
+ │ │ └── getting-started/
75
+ │ │ └── installation.md
76
+ │ └── ru/
77
+ │ └── intro.md
78
+ └── 1.0.1/
79
+ └── api.md
80
+ ```
81
+
82
+ ## Documentation Structure
83
+
84
+ ### Versions
85
+
86
+ Versions are detected automatically from folder names matching semantic versioning (e.g., `2.0.2`, `1.0.1`).
87
+
88
+ ### Languages
89
+
90
+ Optional language folders (e.g., `en`, `ru`) can be used to organize content by language.
91
+
92
+ ### Entity Types
93
+
94
+ - **Pages** - Regular markdown files (`.md`)
95
+ - **Groups** - Folders with `(group-*)` prefix containing related pages
96
+ - **Dropdowns** - Folders that can be expanded/collapsed
97
+ - **Buttons** - Files with `.button.md` suffix for navigation buttons
98
+
99
+ ### Frontmatter
100
+
101
+ Each markdown file can include frontmatter:
102
+
103
+ ```yaml
104
+ ---
105
+ title: Page Title
106
+ order: 1
107
+ icon: file-text
108
+ hidden: false
109
+ searchable: true
110
+ tags:
111
+ - getting-started
112
+ - tutorial
113
+ ---
114
+ ```
115
+
116
+ ## API Reference
117
+
118
+ ### Documentation Component Props
119
+
120
+ | Prop | Type | Default | Description |
121
+ | ------------------- | ----------- | ----------------- | ---------------------------- |
122
+ | `title` | `string` | `'Documentation'` | Title of the documentation |
123
+ | `logo` | `ReactNode` | `<Boxes />` | Logo component |
124
+ | `folderPath` | `string` | `'docs'` | Path to documentation folder |
125
+ | `useToggleTheme` | `boolean` | `false` | Enable theme toggle |
126
+ | `useToggleLanguage` | `boolean` | `false` | Enable language toggle |
127
+ | `useSearch` | `boolean` | `false` | Enable search functionality |
128
+ | `versionSelect` | `boolean` | `false` | Enable version selector |
129
+ | `logTreeFiles` | `object` | `{}` | Console logging options |
130
+
131
+ ### Vite Plugin Options
132
+
133
+ | Option | Type | Default | Description |
134
+ | ------- | -------- | ----------------------- | ---------------------------------- |
135
+ | `route` | `string` | `'/api/dock-rush-scan'` | API route for scanning |
136
+ | `root` | `string` | `process.cwd()` | Root directory for resolving paths |
137
+
138
+ ## Examples
139
+
140
+ ### Basic Usage
141
+
142
+ ```tsx
143
+ import { Documentation } from 'dock-rush'
144
+ import 'dock-rush/style.css'
145
+ ;<Documentation folderPath='docs' />
146
+ ```
147
+
148
+ ### With All Features
149
+
150
+ ```tsx
151
+ <Documentation
152
+ title='My Docs'
153
+ folderPath='public/docs'
154
+ useToggleTheme={true}
155
+ useToggleLanguage={true}
156
+ useSearch={true}
157
+ versionSelect={true}
158
+ logo={<MyLogo />}
159
+ />
160
+ ```
161
+
162
+ ## License
163
+
164
+ MIT © da-b1rmuda
165
+
166
+ **Created with ❤️ for Web2Bizz**
package/package.json ADDED
@@ -0,0 +1,104 @@
1
+ {
2
+ "name": "dock-rush",
3
+ "version": "1.0.0",
4
+ "description": "A modern documentation system for React applications with versioning, multi-language support, and markdown-based content",
5
+ "keywords": [
6
+ "documentation",
7
+ "react",
8
+ "markdown",
9
+ "docs",
10
+ "vite",
11
+ "plugin",
12
+ "versioning",
13
+ "i18n"
14
+ ],
15
+ "main": "./dist/client.cjs",
16
+ "module": "./dist/client.mjs",
17
+ "types": "./dist/client.d.ts",
18
+ "exports": {
19
+ ".": {
20
+ "types": "./dist/client.d.ts",
21
+ "import": "./dist/client.mjs",
22
+ "require": "./dist/client.cjs",
23
+ "default": "./dist/client.mjs"
24
+ },
25
+ "./client": {
26
+ "types": "./dist/client.d.ts",
27
+ "import": "./dist/client.mjs",
28
+ "require": "./dist/client.cjs",
29
+ "default": "./dist/client.mjs"
30
+ },
31
+ "./server": {
32
+ "types": "./dist/plugin.d.ts",
33
+ "import": "./dist/plugin.mjs",
34
+ "require": "./dist/plugin.cjs",
35
+ "default": "./dist/plugin.mjs"
36
+ },
37
+ "./plugin": {
38
+ "types": "./dist/plugin.d.ts",
39
+ "import": "./dist/plugin.mjs",
40
+ "require": "./dist/plugin.cjs",
41
+ "default": "./dist/plugin.mjs"
42
+ },
43
+ "./style.css": "./dist/style.css"
44
+ },
45
+ "author": {
46
+ "name": "da-b1rmuda",
47
+ "url": "https://github.com/da-b1rmuda"
48
+ },
49
+ "license": "MIT",
50
+ "homepage": "https://github.com/da-b1rmuda/dock-rush#readme",
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "https://github.com/da-b1rmuda/dock-rush.git"
54
+ },
55
+ "bugs": {
56
+ "url": "https://github.com/da-b1rmuda/dock-rush/issues"
57
+ },
58
+ "files": [
59
+ "dist",
60
+ "README.md",
61
+ "LICENSE"
62
+ ],
63
+ "scripts": {
64
+ "build": "pnpm run build:ts && pnpm run build:css",
65
+ "build:ts": "pnpm exec tsup --no-watch",
66
+ "build:css": "pnpm exec tailwindcss -i ./src/styles/index.css -o ./dist/style.css --minify"
67
+ },
68
+ "peerDependencies": {
69
+ "react": "*",
70
+ "react-dom": "*"
71
+ },
72
+ "devDependencies": {
73
+ "@radix-ui/react-slot": "^1.2.4",
74
+ "@tailwindcss/cli": "^4.1.17",
75
+ "@tailwindcss/vite": "^4.1.17",
76
+ "@types/node": "^24.10.1",
77
+ "@types/react": "^19.2.4",
78
+ "class-variance-authority": "^0.7.1",
79
+ "clsx": "^2.1.1",
80
+ "react": "^19.2.0",
81
+ "react-dom": "^19.2.0",
82
+ "tailwind-merge": "^3.4.0",
83
+ "tailwindcss": "^4.1.17",
84
+ "tsup": "^8.5.1",
85
+ "tw-animate-css": "^1.4.0",
86
+ "typescript": "^5.9.3"
87
+ },
88
+ "dependencies": {
89
+ "@radix-ui/react-dialog": "^1.1.15",
90
+ "@radix-ui/react-scroll-area": "^1.2.10",
91
+ "@radix-ui/react-select": "^2.2.6",
92
+ "@radix-ui/react-separator": "^1.1.8",
93
+ "@radix-ui/react-tooltip": "^1.2.8",
94
+ "@types/react-syntax-highlighter": "^15.5.13",
95
+ "fast-glob": "^3.3.3",
96
+ "gray-matter": "^4.0.3",
97
+ "lucide-react": "^0.561.0",
98
+ "react-markdown": "^10.1.0",
99
+ "react-syntax-highlighter": "^16.1.0",
100
+ "rehype-raw": "^7.0.0",
101
+ "rehype-sanitize": "^6.0.0",
102
+ "remark-gfm": "^4.0.1"
103
+ }
104
+ }