@akanjs/cli 0.0.146 → 0.0.147
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 +7 -26
- package/cjs/index.js +175 -18
- package/cjs/src/guidelines/cssRule/cssRule.instruction.md +1 -1
- package/cjs/src/guidelines/docPageRule/docPageRule.instruction.md +59 -52
- package/cjs/src/guidelines/modelConstant/modelConstant.instruction.md +335 -752
- package/cjs/src/guidelines/modelTemplate/modelTemplate.instruction.md +418 -391
- package/cjs/src/guidelines/modelUnit/modelUnit.instruction.md +0 -292
- package/cjs/src/guidelines/scalarModule/scalarModule.instruction.md +84 -0
- package/cjs/src/templates/app/main.js +1 -2
- package/esm/index.js +183 -26
- package/esm/src/guidelines/cssRule/cssRule.instruction.md +1 -1
- package/esm/src/guidelines/docPageRule/docPageRule.instruction.md +59 -52
- package/esm/src/guidelines/modelConstant/modelConstant.instruction.md +335 -752
- package/esm/src/guidelines/modelTemplate/modelTemplate.instruction.md +418 -391
- package/esm/src/guidelines/modelUnit/modelUnit.instruction.md +0 -292
- package/esm/src/guidelines/scalarModule/scalarModule.instruction.md +84 -0
- package/esm/src/templates/app/main.js +1 -2
- package/package.json +1 -1
- package/src/guideline/guideline.command.d.ts +3 -1
- package/src/guideline/guideline.prompt.d.ts +15 -1
- package/src/guideline/guideline.runner.d.ts +17 -3
- package/src/guideline/guideline.script.d.ts +8 -2
- package/src/guidelines/cssRule/cssRule.instruction.md +1 -1
- package/src/guidelines/docPageRule/docPageRule.instruction.md +59 -52
- package/src/guidelines/modelConstant/modelConstant.instruction.md +335 -752
- package/src/guidelines/modelTemplate/modelTemplate.instruction.md +418 -391
- package/src/guidelines/modelUnit/modelUnit.instruction.md +0 -292
- package/src/guidelines/scalarModule/scalarModule.instruction.md +84 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
## Purpose of Documentation Pages in Akan.js
|
|
4
4
|
|
|
5
5
|
Documentation pages serve as the comprehensive knowledge base for Akan.js framework developers. They:
|
|
6
|
+
|
|
6
7
|
- Provide clear explanations of framework concepts, architecture, and components
|
|
7
8
|
- Offer technical reference for APIs, modules, and system functionalities
|
|
8
9
|
- Present implementation examples with real-world code snippets
|
|
@@ -16,11 +17,13 @@ Documentation pages serve as the comprehensive knowledge base for Akan.js framew
|
|
|
16
17
|
### 1. File Location and Structure
|
|
17
18
|
|
|
18
19
|
Documentation pages should be created in the following location:
|
|
20
|
+
|
|
19
21
|
```
|
|
20
22
|
apps/angelo/app/[lang]/akanjs/(docs)/docs/[category]/[pageName]/page.tsx
|
|
21
23
|
```
|
|
22
24
|
|
|
23
25
|
Where:
|
|
26
|
+
|
|
24
27
|
- `[lang]`: Language code (e.g., `en`, `ko`)
|
|
25
28
|
- `[category]`: Main documentation category (e.g., `systemArch`, `module`, `api`)
|
|
26
29
|
- `[pageName]`: Specific page name (e.g., `frontend`, `signal`, `authentication`)
|
|
@@ -34,43 +37,43 @@ Each documentation page follows this basic structure:
|
|
|
34
37
|
|
|
35
38
|
```tsx
|
|
36
39
|
import { usePage } from "@angelo/client";
|
|
37
|
-
import { Docs } from "
|
|
40
|
+
import { Docs } from "@angelo/ui";
|
|
38
41
|
|
|
39
42
|
export default function Page() {
|
|
40
43
|
const { l } = usePage(); // For internationalization
|
|
41
|
-
|
|
44
|
+
|
|
42
45
|
return (
|
|
43
46
|
<>
|
|
44
47
|
<Docs.Title>
|
|
45
48
|
{l.trans({
|
|
46
49
|
en: "Main Page Title",
|
|
47
|
-
ko: "메인 페이지 제목"
|
|
50
|
+
ko: "메인 페이지 제목",
|
|
48
51
|
})}
|
|
49
52
|
</Docs.Title>
|
|
50
|
-
|
|
53
|
+
|
|
51
54
|
<Docs.Description>
|
|
52
55
|
{l.trans({
|
|
53
56
|
en: "Introduction paragraph that explains the concept...",
|
|
54
|
-
ko: "개념을 설명하는 소개 문단..."
|
|
57
|
+
ko: "개념을 설명하는 소개 문단...",
|
|
55
58
|
})}
|
|
56
59
|
</Docs.Description>
|
|
57
|
-
|
|
60
|
+
|
|
58
61
|
<div className="divider"></div>
|
|
59
|
-
|
|
62
|
+
|
|
60
63
|
<Docs.SubTitle>
|
|
61
64
|
{l.trans({
|
|
62
65
|
en: "Section Title",
|
|
63
|
-
ko: "섹션 제목"
|
|
66
|
+
ko: "섹션 제목",
|
|
64
67
|
})}
|
|
65
68
|
</Docs.SubTitle>
|
|
66
|
-
|
|
69
|
+
|
|
67
70
|
<Docs.Description>
|
|
68
71
|
{l.trans({
|
|
69
72
|
en: "Detailed explanation of this section...",
|
|
70
|
-
ko: "이 섹션에 대한 자세한 설명..."
|
|
73
|
+
ko: "이 섹션에 대한 자세한 설명...",
|
|
71
74
|
})}
|
|
72
75
|
</Docs.Description>
|
|
73
|
-
|
|
76
|
+
|
|
74
77
|
<Docs.CodeSnippet
|
|
75
78
|
language="typescript"
|
|
76
79
|
code={`
|
|
@@ -78,7 +81,7 @@ export default function Page() {
|
|
|
78
81
|
const example = "Hello Akan.js";
|
|
79
82
|
`}
|
|
80
83
|
/>
|
|
81
|
-
|
|
84
|
+
|
|
82
85
|
{/* Additional sections and components */}
|
|
83
86
|
</>
|
|
84
87
|
);
|
|
@@ -109,10 +112,10 @@ const { l } = usePage();
|
|
|
109
112
|
<Docs.Title>
|
|
110
113
|
{l.trans({
|
|
111
114
|
en: "English Title",
|
|
112
|
-
ko: "한국어 제목"
|
|
115
|
+
ko: "한국어 제목",
|
|
113
116
|
// Add other languages as needed
|
|
114
117
|
})}
|
|
115
|
-
</Docs.Title
|
|
118
|
+
</Docs.Title>;
|
|
116
119
|
```
|
|
117
120
|
|
|
118
121
|
## Utility Components
|
|
@@ -120,8 +123,8 @@ const { l } = usePage();
|
|
|
120
123
|
The `Docs` namespace provides specialized components for creating consistent documentation pages. Always import and use them with the `Docs` prefix:
|
|
121
124
|
|
|
122
125
|
```tsx
|
|
123
|
-
import { Docs } from "
|
|
124
|
-
// Correct usage: <Docs.Title>, NOT import { Title } from "
|
|
126
|
+
import { Docs } from "@angelo/ui";
|
|
127
|
+
// Correct usage: <Docs.Title>, NOT import { Title } from "@angelo/ui";
|
|
125
128
|
```
|
|
126
129
|
|
|
127
130
|
### 1. Title Components
|
|
@@ -135,17 +138,16 @@ import { Docs } from "@/ui/Docs";
|
|
|
135
138
|
### 2. Content Components
|
|
136
139
|
|
|
137
140
|
**Description Block:**
|
|
141
|
+
|
|
138
142
|
```tsx
|
|
139
143
|
<Docs.Description>
|
|
140
|
-
Detailed explanatory text that supports:
|
|
141
|
-
|
|
142
|
-
- Multi-paragraph content
|
|
143
|
-
- HTML elements
|
|
144
|
-
- Internationalization via l.trans()
|
|
144
|
+
Detailed explanatory text that supports: - Markdown-style formatting - Multi-paragraph content - HTML elements -
|
|
145
|
+
Internationalization via l.trans()
|
|
145
146
|
</Docs.Description>
|
|
146
147
|
```
|
|
147
148
|
|
|
148
149
|
**Code Snippet:**
|
|
150
|
+
|
|
149
151
|
```tsx
|
|
150
152
|
<Docs.CodeSnippet
|
|
151
153
|
language="typescript" // Supported: typescript, bash, and others
|
|
@@ -162,15 +164,16 @@ import { Docs } from "@/ui/Docs";
|
|
|
162
164
|
### 3. Table Components
|
|
163
165
|
|
|
164
166
|
**Option Table:** For displaying configuration options, parameters, or properties
|
|
167
|
+
|
|
165
168
|
```tsx
|
|
166
169
|
<Docs.OptionTable
|
|
167
170
|
items={[
|
|
168
171
|
{
|
|
169
|
-
key: "optionName",
|
|
170
|
-
type: "string",
|
|
172
|
+
key: "optionName", // Option identifier
|
|
173
|
+
type: "string", // Data type
|
|
171
174
|
default: "defaultVal", // Default value
|
|
172
|
-
desc: "Description",
|
|
173
|
-
example: "example()"
|
|
175
|
+
desc: "Description", // Explanation (can use l.trans())
|
|
176
|
+
example: "example()", // Usage example
|
|
174
177
|
},
|
|
175
178
|
// Additional items...
|
|
176
179
|
]}
|
|
@@ -178,14 +181,15 @@ import { Docs } from "@/ui/Docs";
|
|
|
178
181
|
```
|
|
179
182
|
|
|
180
183
|
**Introduction Table:** For listing and describing related items
|
|
184
|
+
|
|
181
185
|
```tsx
|
|
182
186
|
<Docs.IntroTable
|
|
183
|
-
type="conceptName"
|
|
187
|
+
type="conceptName" // Table category identifier
|
|
184
188
|
items={[
|
|
185
189
|
{
|
|
186
|
-
name: "itemName",
|
|
190
|
+
name: "itemName", // Item name
|
|
187
191
|
desc: "Description", // Explanation (can use l.trans())
|
|
188
|
-
example: "example()" // Usage example
|
|
192
|
+
example: "example()", // Usage example
|
|
189
193
|
},
|
|
190
194
|
// Additional items...
|
|
191
195
|
]}
|
|
@@ -195,11 +199,13 @@ import { Docs } from "@/ui/Docs";
|
|
|
195
199
|
### 4. Code Display Components
|
|
196
200
|
|
|
197
201
|
**Inline Code:**
|
|
202
|
+
|
|
198
203
|
```tsx
|
|
199
204
|
<Docs.Code language="typescript">inlineCodeExample</Docs.Code>
|
|
200
205
|
```
|
|
201
206
|
|
|
202
207
|
**Custom Code Block:**
|
|
208
|
+
|
|
203
209
|
```tsx
|
|
204
210
|
<Docs.CodeView>
|
|
205
211
|
<Docs.Code prefix="1">// First line with line number</Docs.Code>
|
|
@@ -212,6 +218,7 @@ import { Docs } from "@/ui/Docs";
|
|
|
212
218
|
The document layout is automatically applied through the parent layout.tsx file, so you don't need to use `<Docs.Layout>` in your page component.
|
|
213
219
|
|
|
214
220
|
**Header and Footer:**
|
|
221
|
+
|
|
215
222
|
```tsx
|
|
216
223
|
<Docs.Header>Header content</Docs.Header>
|
|
217
224
|
<Docs.Footer>Footer content</Docs.Footer>
|
|
@@ -264,11 +271,11 @@ The document layout is automatically applied through the parent layout.tsx file,
|
|
|
264
271
|
|
|
265
272
|
```tsx
|
|
266
273
|
import { usePage } from "@angelo/client";
|
|
267
|
-
import { Docs, type IntroItem, type OptionItem } from "
|
|
274
|
+
import { Docs, type IntroItem, type OptionItem } from "@angelo/ui";
|
|
268
275
|
|
|
269
276
|
export default function SignalDocsPage() {
|
|
270
277
|
const { l } = usePage();
|
|
271
|
-
|
|
278
|
+
|
|
272
279
|
// Define configuration options
|
|
273
280
|
const signalOptions: OptionItem[] = [
|
|
274
281
|
{
|
|
@@ -277,22 +284,22 @@ export default function SignalDocsPage() {
|
|
|
277
284
|
default: "undefined",
|
|
278
285
|
desc: l.trans({
|
|
279
286
|
en: "Initial value of the signal",
|
|
280
|
-
ko: "시그널의 초기값"
|
|
287
|
+
ko: "시그널의 초기값",
|
|
281
288
|
}),
|
|
282
|
-
example: "signal(0)"
|
|
289
|
+
example: "signal(0)",
|
|
283
290
|
},
|
|
284
291
|
// Additional options...
|
|
285
292
|
];
|
|
286
|
-
|
|
293
|
+
|
|
287
294
|
// Define feature list
|
|
288
295
|
const signalFeatures: IntroItem[] = [
|
|
289
296
|
{
|
|
290
297
|
name: "createSignal",
|
|
291
298
|
desc: l.trans({
|
|
292
299
|
en: "Creates a new reactive signal",
|
|
293
|
-
ko: "새로운 반응형 시그널을 생성"
|
|
300
|
+
ko: "새로운 반응형 시그널을 생성",
|
|
294
301
|
}),
|
|
295
|
-
example: "const [value, setValue] = createSignal(0)"
|
|
302
|
+
example: "const [value, setValue] = createSignal(0)",
|
|
296
303
|
},
|
|
297
304
|
// Additional features...
|
|
298
305
|
];
|
|
@@ -302,33 +309,33 @@ export default function SignalDocsPage() {
|
|
|
302
309
|
<Docs.Title>
|
|
303
310
|
{l.trans({
|
|
304
311
|
en: "Signal Module",
|
|
305
|
-
ko: "시그널 모듈"
|
|
312
|
+
ko: "시그널 모듈",
|
|
306
313
|
})}
|
|
307
314
|
</Docs.Title>
|
|
308
|
-
|
|
315
|
+
|
|
309
316
|
<Docs.Description>
|
|
310
317
|
{l.trans({
|
|
311
318
|
en: "The Signal module provides reactive state management capabilities for Akan.js applications. Signals allow components to efficiently respond to state changes without unnecessary re-renders.",
|
|
312
|
-
ko: "시그널 모듈은 Akan.js 애플리케이션을 위한 반응형 상태 관리 기능을 제공합니다. 시그널을 통해 컴포넌트는 불필요한 재렌더링 없이 상태 변화에 효율적으로 반응할 수 있습니다."
|
|
319
|
+
ko: "시그널 모듈은 Akan.js 애플리케이션을 위한 반응형 상태 관리 기능을 제공합니다. 시그널을 통해 컴포넌트는 불필요한 재렌더링 없이 상태 변화에 효율적으로 반응할 수 있습니다.",
|
|
313
320
|
})}
|
|
314
321
|
</Docs.Description>
|
|
315
|
-
|
|
322
|
+
|
|
316
323
|
<div className="divider"></div>
|
|
317
|
-
|
|
324
|
+
|
|
318
325
|
<Docs.SubTitle>
|
|
319
326
|
{l.trans({
|
|
320
327
|
en: "Basic Usage",
|
|
321
|
-
ko: "기본 사용법"
|
|
328
|
+
ko: "기본 사용법",
|
|
322
329
|
})}
|
|
323
330
|
</Docs.SubTitle>
|
|
324
|
-
|
|
331
|
+
|
|
325
332
|
<Docs.Description>
|
|
326
333
|
{l.trans({
|
|
327
334
|
en: "Creating and using signals is straightforward:",
|
|
328
|
-
ko: "시그널 생성 및 사용은 간단합니다:"
|
|
335
|
+
ko: "시그널 생성 및 사용은 간단합니다:",
|
|
329
336
|
})}
|
|
330
337
|
</Docs.Description>
|
|
331
|
-
|
|
338
|
+
|
|
332
339
|
<Docs.CodeSnippet
|
|
333
340
|
language="typescript"
|
|
334
341
|
code={`
|
|
@@ -347,23 +354,23 @@ function Counter() {
|
|
|
347
354
|
return <div>{count()}</div>;
|
|
348
355
|
}`}
|
|
349
356
|
/>
|
|
350
|
-
|
|
357
|
+
|
|
351
358
|
<Docs.SubTitle>
|
|
352
359
|
{l.trans({
|
|
353
360
|
en: "Configuration Options",
|
|
354
|
-
ko: "설정 옵션"
|
|
361
|
+
ko: "설정 옵션",
|
|
355
362
|
})}
|
|
356
363
|
</Docs.SubTitle>
|
|
357
|
-
|
|
364
|
+
|
|
358
365
|
<Docs.OptionTable items={signalOptions} />
|
|
359
|
-
|
|
366
|
+
|
|
360
367
|
<Docs.SubTitle>
|
|
361
368
|
{l.trans({
|
|
362
369
|
en: "API Reference",
|
|
363
|
-
ko: "API 참조"
|
|
370
|
+
ko: "API 참조",
|
|
364
371
|
})}
|
|
365
372
|
</Docs.SubTitle>
|
|
366
|
-
|
|
373
|
+
|
|
367
374
|
<Docs.IntroTable type="function" items={signalFeatures} />
|
|
368
375
|
</>
|
|
369
376
|
);
|
|
@@ -373,10 +380,10 @@ function Counter() {
|
|
|
373
380
|
## Troubleshooting
|
|
374
381
|
|
|
375
382
|
1. **Layout Issues**: Do not manually add `<Docs.Layout>` as it's automatically applied at the layout level
|
|
376
|
-
2. **Component Import**: Always use the namespace import `import { Docs } from "
|
|
383
|
+
2. **Component Import**: Always use the namespace import `import { Docs } from "@angelo/ui"` and reference components as `<Docs.ComponentName>`
|
|
377
384
|
3. **Translation Issues**: Ensure all user-facing text uses `l.trans()` with complete translations for all supported languages
|
|
378
385
|
4. **Code Highlighting**: Verify the correct language is specified for `<Docs.CodeSnippet>` and `<Docs.Code>` components
|
|
379
386
|
5. **Style Consistency**: If your documentation looks different from others, compare with existing pages to identify styling discrepancies
|
|
380
387
|
6. **Navigation Anchors**: For long pages, include anchor links by adding hidden divs with IDs
|
|
381
388
|
|
|
382
|
-
For additional assistance, refer to existing documentation pages or contact the framework documentation team.
|
|
389
|
+
For additional assistance, refer to existing documentation pages or contact the framework documentation team.
|