@amogads/ui 1.0.1 → 1.1.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.
- package/README.md +86 -78
- package/dist/index.d.ts +1 -952
- package/dist/index.js +2527 -1406
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2443 -1296
- package/dist/index.mjs.map +1 -1
- package/dist/pages.d.ts +16 -0
- package/dist/pages.js +39982 -0
- package/dist/pages.js.map +1 -0
- package/dist/pages.mjs +40273 -0
- package/dist/pages.mjs.map +1 -0
- package/dist/sdk.d.ts +1 -0
- package/dist/sdk.js +520 -0
- package/dist/sdk.js.map +1 -0
- package/dist/sdk.mjs +476 -0
- package/dist/sdk.mjs.map +1 -0
- package/dist/server.d.ts +20 -0
- package/dist/server.js +2713 -0
- package/dist/server.js.map +1 -0
- package/dist/server.mjs +2662 -0
- package/dist/server.mjs.map +1 -0
- package/dist/services.d.ts +1 -0
- package/dist/services.js +2042 -0
- package/dist/services.js.map +1 -0
- package/dist/services.mjs +1983 -0
- package/dist/services.mjs.map +1 -0
- package/dist/stores.d.ts +1 -0
- package/dist/stores.js +559 -0
- package/dist/stores.js.map +1 -0
- package/dist/stores.mjs +531 -0
- package/dist/stores.mjs.map +1 -0
- package/dist/theme.css +1 -1
- package/dist/tokens.d.ts +1 -56
- package/dist/tokens.js +0 -1
- package/dist/tokens.js.map +1 -1
- package/package.json +27 -7
- package/dist/index.d.mts +0 -952
- package/dist/tokens.d.mts +0 -56
package/README.md
CHANGED
|
@@ -73,6 +73,7 @@ src/
|
|
|
73
73
|
| **Tokens** | `@amogads/ui/tokens`<br/>`@amogads/ui/theme.css` | `SEMANTIC_TOKENS`, `CHART_TOKENS`, `SIDEBAR_TOKENS`, CSS custom properties |
|
|
74
74
|
| **Primitives** | `@amogads/ui` | `Button`, `Input`, `Card`, `Table`, `Tabs`, `Dialog`, `Sheet`, `Drawer`, `Select`, `Checkbox`, `RadioGroup`, `Slider`, `Switch`, `Badge`, `Avatar`, `Breadcrumb`, `DropdownMenu`, `Popover`, `Tooltip`, `Command`, `ContextMenu`, `Pagination`, `Progress`, `ScrollArea`, `Skeleton`, `Sonner`, `Toaster`, `Spinner`, `Textarea`, `Toggle`, `Kbd`, `Label`, `Empty`, `Field`, `Form`, `InputGroup`, `InputOTP` |
|
|
75
75
|
| **Business Components** | `@amogads/ui` | `PageHeader`, `DataTable`, `StatusBadge`, `FilterBar`, `FormSection`, `MetricCard`, `ConfirmDialog`, `PasswordInput`, `SignOutDialog`, `ThemeSwitch`, `ThemeSelector`, `SelectDropdown`, `LongText`, `Search`, `Stats01`, `DatePicker`, `QrCodeDisplay` |
|
|
76
|
+
| **Chat Components** | `@amogads/ui` | `ChatBubble`, `ChatInput`, `ChatHeader`, `TypingIndicator`, `ChatEmptyState`, `AiChatBubble` |
|
|
76
77
|
| **Page Templates** | `@amogads/ui` | `ListTemplate`, `DetailTemplate`, `FormTemplate`, `WizardTemplate`, `DashboardTemplate`, `WorkspaceTemplate` |
|
|
77
78
|
|
|
78
79
|
---
|
|
@@ -147,110 +148,117 @@ Triggered via GitHub Actions Workflow Dispatch:
|
|
|
147
148
|
|
|
148
149
|
---
|
|
149
150
|
|
|
150
|
-
##
|
|
151
|
+
## 🔄 Synchronization & Consuming App Workflow (`amogads` ↔ `amoganextapp`)
|
|
151
152
|
|
|
152
|
-
|
|
153
|
+
`amogads` is the central design system source of truth published to NPM as **`@amogads/ui`**. When you make changes to components, tokens, or templates in `amogads`, follow this standard manual branching workflow to synchronize and adopt changes into your consumer application (e.g. `amoganextapp`).
|
|
153
154
|
|
|
154
155
|
```
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
156
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
157
|
+
│ Step 1: Update AmogaDS (Design System) │
|
|
158
|
+
│ - Edit components in amogads/src/design-system/... │
|
|
159
|
+
│ - Run tests / build: npm run build:package │
|
|
160
|
+
│ - Bump version & publish to NPM: npm publish │
|
|
161
|
+
└──────────────────────────────┬──────────────────────────────┘
|
|
162
|
+
│
|
|
163
|
+
▼
|
|
164
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
165
|
+
│ Step 2: Create Branch on Consumer App (amoganextapp) │
|
|
166
|
+
│ - git checkout -b chore/update-amogads-vX.Y.Z │
|
|
167
|
+
│ - npm install @amogads/ui@latest │
|
|
168
|
+
│ - Verify app UI & build: npm run build │
|
|
169
|
+
└──────────────────────────────┬──────────────────────────────┘
|
|
170
|
+
│
|
|
171
|
+
▼
|
|
172
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
173
|
+
│ Step 3: Merge Branch with Main │
|
|
174
|
+
│ - Commit & merge branch into amoganextapp/main │
|
|
175
|
+
│ - Push origin main │
|
|
176
|
+
└─────────────────────────────────────────────────────────────┘
|
|
170
177
|
```
|
|
171
178
|
|
|
172
179
|
---
|
|
173
180
|
|
|
174
|
-
###
|
|
181
|
+
### 📖 Step-by-Step Synchronization Example
|
|
175
182
|
|
|
176
|
-
|
|
183
|
+
#### Scenario: Adding a new prop or style tweak to `Button` in `amogads` and adopting it in `amoganextapp`.
|
|
184
|
+
|
|
185
|
+
#### Step 1: Make Changes and Publish in `amogads`
|
|
186
|
+
Navigate to the `amogads` directory:
|
|
177
187
|
```bash
|
|
178
|
-
|
|
188
|
+
cd amogads
|
|
189
|
+
|
|
190
|
+
# 1. Edit component (e.g. src/design-system/components/ui/button.tsx)
|
|
191
|
+
# 2. Build the package distribution
|
|
192
|
+
npm run build:package
|
|
193
|
+
|
|
194
|
+
# 3. Bump version (patch / minor / major)
|
|
195
|
+
npm version patch
|
|
196
|
+
|
|
197
|
+
# 4. Publish the updated package to NPM
|
|
198
|
+
npm publish --access public
|
|
199
|
+
```
|
|
200
|
+
*(Example: `@amogads/ui` version is now `1.0.3` on NPM).*
|
|
201
|
+
|
|
202
|
+
#### Step 2: Create a Branch in `amoganextapp` & Update Dependency
|
|
203
|
+
Navigate back to your main application root (`amoganextapp`):
|
|
204
|
+
```bash
|
|
205
|
+
cd .. # (in amoganextapp root)
|
|
206
|
+
|
|
207
|
+
# 1. Create a dedicated branch for the design system update
|
|
208
|
+
git checkout -b chore/update-amogads-v1.0.3
|
|
209
|
+
|
|
210
|
+
# 2. Install the newly published version from NPM
|
|
211
|
+
npm install @amogads/ui@latest
|
|
212
|
+
|
|
213
|
+
# 3. Test and verify locally
|
|
214
|
+
npm run dev
|
|
215
|
+
npm run build
|
|
179
216
|
```
|
|
180
217
|
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
└─────────┴──────────────────────────────────┴──────────────────────────┴───────────┴──────────┴─────────────────┴────────────┴─────────────────────────┴───────────┘
|
|
194
|
-
|
|
195
|
-
📊 Summary: 2 registered apps | 2 up-to-date | 0 pending upgrade.
|
|
218
|
+
#### Step 3: Commit and Merge into `main`
|
|
219
|
+
```bash
|
|
220
|
+
# 1. Stage and commit updated package.json & package-lock.json
|
|
221
|
+
git add package.json package-lock.json
|
|
222
|
+
git commit -m "chore(deps): update @amogads/ui to v1.0.3"
|
|
223
|
+
|
|
224
|
+
# 2. Switch to main and merge your branch
|
|
225
|
+
git checkout main
|
|
226
|
+
git merge chore/update-amogads-v1.0.3
|
|
227
|
+
|
|
228
|
+
# 3. Push to GitHub
|
|
229
|
+
git push origin main
|
|
196
230
|
```
|
|
197
231
|
|
|
198
232
|
---
|
|
199
233
|
|
|
200
|
-
|
|
234
|
+
## 🤖 Cross-Repository Registry & Automation Controls
|
|
201
235
|
|
|
202
|
-
|
|
236
|
+
AmogaDS maintains a consumer registry in [`consumers-registry.json`](consumers-registry.json) to track connected applications:
|
|
203
237
|
|
|
204
238
|
```json
|
|
205
239
|
{
|
|
206
|
-
"id": "
|
|
207
|
-
"name": "
|
|
208
|
-
"repository": "
|
|
240
|
+
"id": "amoganextapp",
|
|
241
|
+
"name": "Amoga Next App",
|
|
242
|
+
"repository": "MohammadAmannn/amoganextapp",
|
|
209
243
|
"defaultBranch": "main",
|
|
210
244
|
"packagePath": "package.json",
|
|
211
|
-
"currentVersion": "1.0.
|
|
212
|
-
"targetVersion": "1.0.
|
|
245
|
+
"currentVersion": "1.0.2",
|
|
246
|
+
"targetVersion": "1.0.2",
|
|
213
247
|
"updateStatus": "up-to-date",
|
|
214
|
-
"automationStatus": "
|
|
215
|
-
"team": "@
|
|
216
|
-
"lastCheckedAt": "2026-08-24T11:00:00Z",
|
|
217
|
-
"lastUpgradedAt": "2026-08-24T11:00:00Z",
|
|
218
|
-
"activePrUrl": null
|
|
248
|
+
"automationStatus": "disabled",
|
|
249
|
+
"team": "@MohammadAmannn"
|
|
219
250
|
}
|
|
220
251
|
```
|
|
221
252
|
|
|
222
|
-
|
|
223
|
-
* `
|
|
224
|
-
* `
|
|
225
|
-
* `automationStatus`: Set to `"enabled"` to receive PRs, or `"paused"` / `"disabled"` to hold updates.
|
|
226
|
-
* `team`: Team handle or maintainer notified for PR review.
|
|
227
|
-
|
|
228
|
-
---
|
|
229
|
-
|
|
230
|
-
### 3. Application Code Protection & Security
|
|
231
|
-
|
|
232
|
-
The automation engine ([scripts/upgrade-consumers.mjs](scripts/upgrade-consumers.mjs)) enforces strict boundaries:
|
|
233
|
-
* **Zero Personal Access Tokens (PATs)**: Uses GitHub App installation tokens scoped with minimum required permissions (`contents: write`, `pull_requests: write`).
|
|
234
|
-
* **Protected File Zones**: `app/`, `features/`, `components/custom/`, `src/lib/`, `src/services/`, and state stores are **never modified**.
|
|
235
|
-
* **Strict Whitelist**: Automation is only allowed to touch `package.json` and lockfiles (`package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`). Any unexpected file modification immediately aborts the pipeline.
|
|
236
|
-
|
|
237
|
-
---
|
|
253
|
+
### Automation Modes:
|
|
254
|
+
* `"automationStatus": "disabled"` *(Default)*: Automated GitHub Action PR bot is disabled. Developers manage their own branch creation, local verification, and merge into `main`.
|
|
255
|
+
* `"automationStatus": "enabled"`: GitHub Actions will automatically clone the consumer, create a branch, and submit a PR via GitHub REST API whenever a release occurs.
|
|
238
256
|
|
|
239
|
-
###
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
2. **Verify CI Status**: Ensure all automated checks (`Lint`, `Typecheck`, `Build`, `Tests`) pass on the PR branch.
|
|
245
|
-
3. **Local Visual Verification (Optional)**:
|
|
246
|
-
```bash
|
|
247
|
-
git fetch origin chore/upgrade-amoga-ui-vX.Y.Z
|
|
248
|
-
git checkout chore/upgrade-amoga-ui-vX.Y.Z
|
|
249
|
-
npm install
|
|
250
|
-
npm run dev
|
|
251
|
-
```
|
|
252
|
-
Check light/dark mode and key user flows (forms, tables, navigation).
|
|
253
|
-
4. **Manual Approval & Merge**: Approve and merge the PR. *(Auto-merging is intentionally disabled for safety).*
|
|
257
|
+
### Check Status Across Consumers:
|
|
258
|
+
Run from the `amogads/` directory:
|
|
259
|
+
```bash
|
|
260
|
+
npm run consumers:status
|
|
261
|
+
```
|
|
254
262
|
|
|
255
263
|
---
|
|
256
264
|
|