injast-core 1.0.81 → 1.0.82
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 +20 -0
- package/guidelines/Guidelines.md +32 -4
- package/guidelines/components/data-display.md +1 -1
- package/guidelines/components/date-inputs.md +2 -2
- package/guidelines/components/feedback.md +9 -3
- package/guidelines/components/forms.md +3 -1
- package/guidelines/components/layout.md +7 -5
- package/guidelines/foundations/spacing.md +3 -3
- package/guidelines/setup.md +14 -3
- package/package.json +2 -1
- package/skills/injast-app-builder/SKILL.md +49 -0
- package/skills/injast-app-builder/agents/openai.yaml +4 -0
package/README.md
CHANGED
|
@@ -142,6 +142,26 @@ guidelines/Guidelines.md
|
|
|
142
142
|
|
|
143
143
|
The guidelines route Make to setup instructions, foundations, component selection rules, and focused component usage notes. In a Vite/React Make file, use `SPAThemeProvider`, import `injast-core/fonts.css` once, and prefer Injast components over raw HTML controls.
|
|
144
144
|
|
|
145
|
+
For Figma-driven implementation, use the Figma MCP flow before coding. The local MCP endpoint is:
|
|
146
|
+
|
|
147
|
+
```text
|
|
148
|
+
http://127.0.0.1:3845/mcp
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Fetch structured design context and a screenshot for the exact node, then translate the design into Injast Core components, RTL layout, Persian copy, and the project guidelines.
|
|
152
|
+
|
|
153
|
+
Generated mobile app screens should follow the Gold reference app at `/Users/ali/Documents/Gold`: centered `max-width: 520px` shell, wired navigation and overlay behavior, Injast Core inputs, drawer-based pre-invoices, and no mobile OS/app status bar chrome.
|
|
154
|
+
|
|
155
|
+
## Codex Skill
|
|
156
|
+
|
|
157
|
+
The package ships a Codex skill for Injast app generation:
|
|
158
|
+
|
|
159
|
+
```text
|
|
160
|
+
skills/injast-app-builder
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
After installing the package, consumers can point Codex at `node_modules/injast-core/skills/injast-app-builder` or copy that folder into their Codex skills directory if their Codex setup does not auto-discover package-bundled skills.
|
|
164
|
+
|
|
145
165
|
## License
|
|
146
166
|
|
|
147
167
|
ISC
|
package/guidelines/Guidelines.md
CHANGED
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Product Character
|
|
4
4
|
|
|
5
|
-
Injast Core is an RTL-first React and Material UI design system for Persian product interfaces. Generated screens should feel like focused product UI: mobile-first, operational, compact, and easy to scan repeatedly.
|
|
5
|
+
Injast Core is an RTL-first React and Material UI design system for Persian product interfaces. Generated screens should feel like focused product UI: mobile-first, operational, compact, wired together, and easy to scan repeatedly.
|
|
6
6
|
|
|
7
7
|
- Build Persian and RTL experiences by default.
|
|
8
8
|
- Prefer task screens, forms, tables, status feedback, and flows over marketing pages.
|
|
9
|
-
-
|
|
9
|
+
- Treat `/Users/ali/Documents/Gold` as the canonical reference for mobile app shell structure, component composition, wired flows, and drawer behavior.
|
|
10
|
+
- Keep the main app canvas constrained to `max-width: 520px` with `margin-inline: auto` unless a data-heavy desktop layout clearly needs more width.
|
|
10
11
|
- Use brand color for primary actions and active states only. Do not use strong colors as large decorative backgrounds.
|
|
11
12
|
- Use measured density: compact controls, clear labels, and enough spacing around decisions and errors.
|
|
12
13
|
|
|
@@ -50,19 +51,46 @@ Type import rules live in `guidelines/types.md`.
|
|
|
50
51
|
- Use `coreFaIR` in SPA/Figma Make theme options for Persian Material UI localization.
|
|
51
52
|
- Use named imports from `injast-core` for common usage; use subpath imports only for focused entrypoints.
|
|
52
53
|
|
|
54
|
+
## Figma MCP Workflow
|
|
55
|
+
|
|
56
|
+
For Figma-driven implementation, use the Figma MCP server before writing app code. The local MCP endpoint is:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
http://127.0.0.1:3845/mcp
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Rules:
|
|
63
|
+
|
|
64
|
+
- Fetch design context for the exact frame or node first.
|
|
65
|
+
- Fetch a screenshot for the same frame or variant before implementation.
|
|
66
|
+
- Use metadata to narrow the request when the initial design context is too large.
|
|
67
|
+
- Translate Figma output into Injast Core, RTL, Persian, and Gold-style app conventions. Do not copy generic generated React or Tailwind structure as final code.
|
|
68
|
+
- If Figma includes mobile OS chrome or an app status bar, omit it from implementation.
|
|
69
|
+
|
|
53
70
|
## Hard UI Rules
|
|
54
71
|
|
|
55
72
|
- Use Injast Core components before raw HTML or direct Material UI primitives.
|
|
56
73
|
- Do not use raw `<button>`, `<input>`, `<select>`, checkbox, radio, dialog, table, or image elements when an Injast component exists.
|
|
74
|
+
- All visible inputs must come from Injast Core, such as `TextField`, `NumberInput`, `InputPhoneNumber`, `CardNumberInput`, `OtpInput`, `Select`, `MultiSelect`, `Autocomplete`, `Checkbox`, `Radio`, `Toggle`, `Slider`, or `CounterBoxInput`.
|
|
75
|
+
- Do not use direct Material UI input primitives in generated app code when an Injast input exists.
|
|
57
76
|
- Use RTL by default: provider `dir="rtl"`, Persian labels, right-aligned reading flow, and logical CSS properties such as `marginInline` or `px`.
|
|
58
|
-
- Keep the primary app surface centered with `maxWidth:
|
|
77
|
+
- Keep the primary app surface centered with `maxWidth: 520` or CSS `max-width: 520px; margin-inline: auto;`.
|
|
59
78
|
- Do not guess unsupported component props. Use Material UI props plus documented Injast-specific props.
|
|
60
79
|
- Use `iconsax-react` for all generated app icons. Do not use Lucide, Heroicons, Font Awesome, inline SVGs, emoji icons, or `@mui/icons-material` in generated screens.
|
|
61
80
|
- Keep icon sizes consistent: 20px for input adornments, 24px for standard actions, 28px for status icons.
|
|
62
81
|
- Use `defaultColors`, `appColors`, and theme palette values instead of hardcoded colors where possible.
|
|
63
82
|
- Keep all controls reachable on mobile. Do not rely on hover-only actions for required workflows.
|
|
64
83
|
- Do not create nested cards unless the inner card is a repeated item, modal content, or a genuinely separate framed tool.
|
|
84
|
+
- Do not implement mobile OS status bars or decorative app status bars, even when the design file includes them.
|
|
85
|
+
- Generated apps must be wired flows, not a set of disconnected static screens. Navigation actions, drawer/modal triggers, submit buttons, close buttons, and confirmation actions should update local state or route to the next screen.
|
|
86
|
+
|
|
87
|
+
## Overlay and Drawer Rules
|
|
88
|
+
|
|
89
|
+
- Pre-invoices (`پیشفاکتور`) are drawer or bottom-sheet overlays, not independent pages.
|
|
90
|
+
- Drawers should feel like drawers: fixed overlay, backdrop, centered `maxWidth: 520` sheet, visible close path, and entrance/exit motion from the drawer edge.
|
|
91
|
+
- When a drawer is open, dim, blur, or subtly scale the underlying page when it helps communicate layering.
|
|
92
|
+
- Keep modal content compact and centered inside the 520px app shell. Do not put full pages inside modals.
|
|
65
93
|
|
|
66
94
|
## Output Expectations
|
|
67
95
|
|
|
68
|
-
Generated screens should look like production Persian product UI. Favor concise copy, clear hierarchy, stable control sizes, predictable forms, visible validation, compact data displays, and direct recovery actions for empty or error states.
|
|
96
|
+
Generated screens should look like production Persian product UI. Favor concise copy, clear hierarchy, stable control sizes, predictable forms, visible validation, compact data displays, wired actions, and direct recovery actions for empty or error states.
|
|
@@ -39,7 +39,7 @@ Rules:
|
|
|
39
39
|
- Use built-in MRT options for sorting, filtering, selection, row actions, and pagination.
|
|
40
40
|
- Keep row actions concise and aligned.
|
|
41
41
|
- Use right alignment for Persian text, center alignment for small status columns, and left or LTR alignment for Latin IDs when necessary.
|
|
42
|
-
- Avoid placing wide `DataGrid` tables inside the
|
|
42
|
+
- Avoid placing wide `DataGrid` tables inside the 520px mobile shell unless horizontal scrolling is intentional.
|
|
43
43
|
|
|
44
44
|
## Typography
|
|
45
45
|
|
|
@@ -34,7 +34,7 @@ Rules:
|
|
|
34
34
|
- Use `minDate` and `maxDate` when the business flow has valid ranges.
|
|
35
35
|
- Use `textFieldSxProps` only for field-level `sx` overrides that cannot be expressed through layout wrappers.
|
|
36
36
|
- Ensure the app build supports CSS imports from npm packages. `MobileDatePicker` uses `react-multi-date-picker`, `react-date-object`, and the Persian calendar/locale internally.
|
|
37
|
-
- Keep date fields full width in the
|
|
37
|
+
- Keep date fields full width in the 520px mobile shell.
|
|
38
38
|
|
|
39
39
|
## WheelDatePicker
|
|
40
40
|
|
|
@@ -46,7 +46,7 @@ Behavior and sizing:
|
|
|
46
46
|
|---|---|
|
|
47
47
|
| Field height | 48px |
|
|
48
48
|
| Field radius | 8px |
|
|
49
|
-
| Drawer max width |
|
|
49
|
+
| Drawer max width | 520px |
|
|
50
50
|
| Drawer horizontal alignment | centered with `mx: "auto"` |
|
|
51
51
|
| Drawer body padding | `px: 3.5`, `py: 6` |
|
|
52
52
|
| Wheel item height | 44px |
|
|
@@ -38,7 +38,7 @@ Rules:
|
|
|
38
38
|
- Prefer `MessageProvider` and `useMessage` for app-level feedback.
|
|
39
39
|
- Match icon, text, border, and background to severity.
|
|
40
40
|
- Keep toast copy short and actionable.
|
|
41
|
-
- In
|
|
41
|
+
- In 520px app shells, keep toasts visually aligned to the centered app surface.
|
|
42
42
|
- Use `anchorOrigin` to change placement; default is top-left.
|
|
43
43
|
- Use `isWide` only for messages that need a wider minimum width.
|
|
44
44
|
- `handleClose` should close the toast and should be safe to call from click or timeout.
|
|
@@ -66,6 +66,7 @@ Modal sizing and style:
|
|
|
66
66
|
- Paper margin: 8px on small screens.
|
|
67
67
|
- Backdrop: dark translucent blur.
|
|
68
68
|
- Use explicit `width` for compact dialogs, usually 320px to 420px.
|
|
69
|
+
- Keep modal paper and content visually centered inside the 520px app shell.
|
|
69
70
|
- Use `gap: 4` inside modal content.
|
|
70
71
|
|
|
71
72
|
Rules:
|
|
@@ -79,16 +80,21 @@ Rules:
|
|
|
79
80
|
|
|
80
81
|
Use drawers for bottom-sheet-like mobile tasks such as date selection, filters, and short pickers.
|
|
81
82
|
|
|
83
|
+
Pre-invoices (`پیشفاکتور`) must be drawers or bottom sheets. Do not build pre-invoices as independent pages.
|
|
84
|
+
|
|
82
85
|
Rules:
|
|
83
86
|
|
|
84
87
|
- Control visibility with `isDrawerOpen`.
|
|
85
88
|
- Use `onClose` for backdrop, escape, and close-button behavior.
|
|
86
89
|
- Default `anchor` is bottom; use `anchor="right"` for RTL side navigation drawers.
|
|
87
|
-
- Align drawer content to the
|
|
88
|
-
- Use `maxWidth:
|
|
90
|
+
- Align drawer content to the 520px app shell when possible.
|
|
91
|
+
- Use `maxWidth: 520` and `mx: "auto"` for drawer roots or content wrappers.
|
|
89
92
|
- Use `px: 3.5`, `py: 6` for drawer body padding.
|
|
90
93
|
- Put the title and close icon in the header row.
|
|
91
94
|
- Use a full-width contained button for the main confirm action.
|
|
95
|
+
- Make drawer layering clear with a backdrop and fixed overlay behavior.
|
|
96
|
+
- Animate bottom drawers from `translateY(100%)` to `translateY(0)` and animate the backdrop opacity so the UI does not feel like a sudden page swap.
|
|
97
|
+
- When useful, dim, blur, or subtly scale the underlying page while the drawer is open.
|
|
92
98
|
|
|
93
99
|
## Loading and Progress
|
|
94
100
|
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
- Use controlled components for form values.
|
|
6
6
|
- Use `TextField` instead of raw `<input>`.
|
|
7
|
+
- Use Injast Core inputs for every generated field. Choose `TextField`, `NumberInput`, `InputPhoneNumber`, `CardNumberInput`, `OtpInput`, `Select`, `MultiSelect`, `Autocomplete`, `Checkbox`, `Radio`, `Toggle`, `Slider`, or `CounterBoxInput` before direct Material UI or raw HTML controls.
|
|
8
|
+
- Do not import direct Material UI input primitives in generated app code when an Injast input exists.
|
|
7
9
|
- Put labels on every input unless the surrounding context makes the value unmistakable.
|
|
8
10
|
- Use `error` and `helperText` for validation messages.
|
|
9
11
|
- Use 48px control height for default forms.
|
|
@@ -40,7 +42,7 @@ Sizing:
|
|
|
40
42
|
- Default height: 48px.
|
|
41
43
|
- Radius: 8px.
|
|
42
44
|
- Input adornment icon: 20px.
|
|
43
|
-
- Use `fullWidth` in mobile forms and
|
|
45
|
+
- Use `fullWidth` in mobile forms and 520px app shells.
|
|
44
46
|
- Use `dir="ltr"` only for Latin codes, OTP, card numbers, phone-like numeric values, or technical identifiers.
|
|
45
47
|
|
|
46
48
|
## Form Wrappers
|
|
@@ -9,7 +9,7 @@ import { Box } from "injast-core";
|
|
|
9
9
|
|
|
10
10
|
<Box
|
|
11
11
|
sx={{
|
|
12
|
-
maxWidth:
|
|
12
|
+
maxWidth: 520,
|
|
13
13
|
mx: "auto",
|
|
14
14
|
minHeight: "100dvh",
|
|
15
15
|
bgcolor: "neutral.50",
|
|
@@ -22,7 +22,7 @@ import { Box } from "injast-core";
|
|
|
22
22
|
Equivalent CSS:
|
|
23
23
|
|
|
24
24
|
```css
|
|
25
|
-
max-width:
|
|
25
|
+
max-width: 520px;
|
|
26
26
|
margin-inline: auto;
|
|
27
27
|
```
|
|
28
28
|
|
|
@@ -39,6 +39,8 @@ Use a wider layout only for desktop-first dashboards, large tables, chart-heavy
|
|
|
39
39
|
- Use `gap: 3` to `gap: 4` inside field groups and card content.
|
|
40
40
|
- Keep a hint of the next section visible on the first viewport when building long mobile flows.
|
|
41
41
|
- Do not create landing-page heroes for app/tool requests.
|
|
42
|
+
- Do not implement mobile OS status bars or decorative app status bars, even when present in Figma frames.
|
|
43
|
+
- Wire screens into flows. Back, home, receipt/history, submit, confirm, close, and selection actions should navigate or update local state instead of acting as static placeholders.
|
|
42
44
|
|
|
43
45
|
## Layout Primitives
|
|
44
46
|
|
|
@@ -62,7 +64,7 @@ Rules:
|
|
|
62
64
|
|
|
63
65
|
For mobile forms with a clear final action, use a bottom action band:
|
|
64
66
|
|
|
65
|
-
- Shell width remains
|
|
67
|
+
- Shell width remains 520px max and centered.
|
|
66
68
|
- Use `position: "sticky"` or `position: "fixed"` only when the action must stay visible.
|
|
67
69
|
- Use `px: 4`, `py: 3`, neutral/white background, and a subtle top border.
|
|
68
70
|
- Use a full-width `Button buttonSize="M"` for the primary action.
|
|
@@ -70,7 +72,7 @@ For mobile forms with a clear final action, use a bottom action band:
|
|
|
70
72
|
|
|
71
73
|
## Sticky App Regions
|
|
72
74
|
|
|
73
|
-
For chat, assistant, or app-like flows, use a sticky header and sticky bottom input/action area inside the
|
|
75
|
+
For chat, assistant, or app-like flows, use a sticky header and sticky bottom input/action area inside the 520px shell.
|
|
74
76
|
|
|
75
77
|
Header rules:
|
|
76
78
|
|
|
@@ -133,4 +135,4 @@ Rules:
|
|
|
133
135
|
|
|
134
136
|
- Keep the active step clear.
|
|
135
137
|
- Provide Back/Next actions with `Button`.
|
|
136
|
-
- Keep step content width readable; 400px to
|
|
138
|
+
- Keep step content width readable; 400px to 520px works well for form flows.
|
|
@@ -26,7 +26,7 @@ Use this for generated mobile-first app screens:
|
|
|
26
26
|
```tsx
|
|
27
27
|
<Box
|
|
28
28
|
sx={{
|
|
29
|
-
maxWidth:
|
|
29
|
+
maxWidth: 520,
|
|
30
30
|
mx: "auto",
|
|
31
31
|
minHeight: "100dvh",
|
|
32
32
|
bgcolor: "neutral.50",
|
|
@@ -39,14 +39,14 @@ Use this for generated mobile-first app screens:
|
|
|
39
39
|
Equivalent CSS:
|
|
40
40
|
|
|
41
41
|
```css
|
|
42
|
-
max-width:
|
|
42
|
+
max-width: 520px;
|
|
43
43
|
margin-inline: auto;
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
Rules:
|
|
47
47
|
|
|
48
48
|
- Center the shell with `mx: "auto"` or `margin-inline: auto`.
|
|
49
|
-
- Keep the shell full width below
|
|
49
|
+
- Keep the shell full width below 520px.
|
|
50
50
|
- Use `minHeight: "100dvh"` for app-like screens.
|
|
51
51
|
- Apply page padding inside the shell, not on `body`.
|
|
52
52
|
- Use wider layouts only for data-heavy desktop dashboards, large tables, or split-pane workflows.
|
package/guidelines/setup.md
CHANGED
|
@@ -16,6 +16,16 @@ injast
|
|
|
16
16
|
|
|
17
17
|
Then select the public unscoped package `injast-core`. If exact search for `injast-core` returns unrelated `core` packages first, use `injast` as the search term. Do not search for or install `@alimohammadiwork/injast-core` or `@make-kits/injast-core-make-kit` for this public package path.
|
|
18
18
|
|
|
19
|
+
## Figma MCP
|
|
20
|
+
|
|
21
|
+
For design-driven implementation, use the Figma MCP server and fetch both structured design context and a screenshot before writing code. The local MCP endpoint is:
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
http://127.0.0.1:3845/mcp
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Translate the MCP output into Injast Core patterns, RTL layout, Persian copy, and the Gold reference app structure. Do not keep generic generated React, Tailwind classes, raw controls, or decorative mobile OS status bars from the design payload.
|
|
28
|
+
|
|
19
29
|
## Required Imports
|
|
20
30
|
|
|
21
31
|
Import the font stylesheet once near the app root:
|
|
@@ -169,7 +179,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
|
|
169
179
|
<body
|
|
170
180
|
style={{
|
|
171
181
|
backgroundColor: defaultColors.neutral[100],
|
|
172
|
-
maxWidth: "
|
|
182
|
+
maxWidth: "520px",
|
|
173
183
|
marginInline: "auto",
|
|
174
184
|
}}
|
|
175
185
|
>
|
|
@@ -185,7 +195,7 @@ Inside generated pages, use the same centered constraint with Injast layout prim
|
|
|
185
195
|
```tsx
|
|
186
196
|
<Box
|
|
187
197
|
sx={{
|
|
188
|
-
maxWidth:
|
|
198
|
+
maxWidth: 520,
|
|
189
199
|
mx: "auto",
|
|
190
200
|
minHeight: "100dvh",
|
|
191
201
|
bgcolor: "neutral.50",
|
|
@@ -198,7 +208,7 @@ Inside generated pages, use the same centered constraint with Injast layout prim
|
|
|
198
208
|
Equivalent CSS is allowed for the outer shell:
|
|
199
209
|
|
|
200
210
|
```css
|
|
201
|
-
max-width:
|
|
211
|
+
max-width: 520px;
|
|
202
212
|
margin-inline: auto;
|
|
203
213
|
```
|
|
204
214
|
|
|
@@ -231,3 +241,4 @@ Read `guidelines/runtime.md` before using hooks, API helpers, date helpers, Pers
|
|
|
231
241
|
- Do not change package exports, public component APIs, or provider APIs in generated examples.
|
|
232
242
|
- Injast Core wraps Material UI (`@mui/material`), Emotion (`@emotion/react`, `@emotion/cache`, `@emotion/styled`), and RTL Stylis (`stylis`, `stylis-plugin-rtl`). Do not install or configure separate theme/cache providers unless the host app already owns that setup.
|
|
233
243
|
- Use package exports only: root, `components`, `providers`, `hooks`, `libs`, `utils`, `context`, `constants`, `types`, and `fonts.css`.
|
|
244
|
+
- Build generated examples as wired app flows. Connect navigation, drawer/modal open and close behavior, and submit/confirm actions with local state when no backend exists.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "injast-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.82",
|
|
4
4
|
"description": "Reusable Injast React and Material UI components, providers, hooks, utilities, and design tokens.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
11
|
"guidelines",
|
|
12
|
+
"skills",
|
|
12
13
|
"README.md",
|
|
13
14
|
"LICENSE"
|
|
14
15
|
],
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: injast-app-builder
|
|
3
|
+
description: Build or revise Persian RTL mobile product app flows with Injast Core and the Gold reference app. Use when Codex is asked to implement Injast Core screens, Figma-to-Injast designs, Gold-style buy/sell or drawer flows, Persian mobile app UI, or to enforce Injast guidelines around 520px shells, wired navigation, Injast inputs, and drawer-based pre-invoices.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Injast App Builder
|
|
7
|
+
|
|
8
|
+
## Required References
|
|
9
|
+
|
|
10
|
+
Read these before implementing or reviewing an Injast app flow:
|
|
11
|
+
|
|
12
|
+
- `guidelines/Guidelines.md` from the installed `injast-core` package.
|
|
13
|
+
- Focused guideline files linked from that document for setup, layout, forms, feedback, data display, date inputs, icons, runtime, and types.
|
|
14
|
+
- `/Users/ali/Documents/Gold` as the canonical reference app for composition, 520px shell, wired state, drawer pre-invoices, and Persian mobile product behavior when that reference is available locally.
|
|
15
|
+
|
|
16
|
+
## Implementation Workflow
|
|
17
|
+
|
|
18
|
+
1. Inspect the target app and the relevant Gold reference files before editing.
|
|
19
|
+
2. Keep runtime component APIs unchanged unless the user explicitly asks for package source changes.
|
|
20
|
+
3. Build Persian RTL flows with `SPAThemeProvider` for Vite/Figma Make apps or `ThemeProvider` for Next.js apps.
|
|
21
|
+
4. Center mobile app surfaces with `maxWidth: 520` or `max-width: 520px` plus `mx: "auto"` or `margin-inline: auto`.
|
|
22
|
+
5. Wire the product flow end to end: navigation actions, submit buttons, drawers, modals, close actions, and confirmations must update route or local state.
|
|
23
|
+
6. Verify the result against the Gold reference behavior and the focused guidelines.
|
|
24
|
+
|
|
25
|
+
## Figma MCP Workflow
|
|
26
|
+
|
|
27
|
+
For Figma-driven work, use the Figma MCP server at:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
http://127.0.0.1:3845/mcp
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Use this sequence:
|
|
34
|
+
|
|
35
|
+
1. Fetch design context for the exact node or frame.
|
|
36
|
+
2. Fetch a screenshot for the same target before implementation.
|
|
37
|
+
3. If the payload is too large, fetch metadata and then narrow to the needed node.
|
|
38
|
+
4. Translate the design into Injast Core conventions. Do not keep generic React, Tailwind, raw controls, or mobile OS chrome from MCP output as final code.
|
|
39
|
+
|
|
40
|
+
## Hard Rules
|
|
41
|
+
|
|
42
|
+
- Use Injast Core components before raw HTML or direct Material UI primitives.
|
|
43
|
+
- Use Injast inputs for every field: `TextField`, `NumberInput`, `InputPhoneNumber`, `CardNumberInput`, `OtpInput`, `Select`, `MultiSelect`, `Autocomplete`, `Checkbox`, `Radio`, `Toggle`, `Slider`, or `CounterBoxInput`.
|
|
44
|
+
- Use `iconsax-react` for generated app icons.
|
|
45
|
+
- Do not implement mobile OS status bars or decorative app status bars, even when present in Figma.
|
|
46
|
+
- Pre-invoices (`پیشفاکتور`) are drawer or bottom-sheet overlays, not independent pages.
|
|
47
|
+
- Drawers must feel like drawers: fixed overlay, backdrop, centered 520px sheet, visible close path, and entrance/exit motion from the drawer edge.
|
|
48
|
+
- When useful, dim, blur, or subtly scale the underlying page while an overlay is open.
|
|
49
|
+
- Keep generated apps as wired flows, not disconnected screen previews.
|