@monkey-mini-app/dsh-mini-app 0.1.0 → 0.1.4
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 +59 -0
- package/assets/apps-list.png +0 -0
- package/assets/complex-demo-app.png +0 -0
- package/assets/demo-app.png +0 -0
- package/assets/home.png +0 -0
- package/assets/sidebar-mode.png +0 -0
- package/lib/client.js +2024 -783
- package/lib/index.d.ts +5 -2
- package/lib/index.js +29 -16
- package/package.json +12 -10
- package/skills/monkey-mini-app/SKILL.md +182 -106
- package/skills/monkey-mini-app/references/catalog.md +236 -99
- package/skills/monkey-mini-app/references/contracts/accordion.md +30 -0
- package/skills/monkey-mini-app/references/contracts/activity-feed.md +12 -2
- package/skills/monkey-mini-app/references/contracts/alert-dialog.md +38 -0
- package/skills/monkey-mini-app/references/contracts/alert.md +38 -0
- package/skills/monkey-mini-app/references/contracts/app-shell.md +2 -2
- package/skills/monkey-mini-app/references/contracts/aspect-ratio.md +25 -0
- package/skills/monkey-mini-app/references/contracts/attachment-gallery.md +12 -2
- package/skills/monkey-mini-app/references/contracts/attachment.md +35 -0
- package/skills/monkey-mini-app/references/contracts/autocomplete.md +12 -2
- package/skills/monkey-mini-app/references/contracts/avatar.md +24 -0
- package/skills/monkey-mini-app/references/contracts/badge.md +26 -0
- package/skills/monkey-mini-app/references/contracts/breadcrumb.md +33 -0
- package/skills/monkey-mini-app/references/contracts/bubble.md +30 -0
- package/skills/monkey-mini-app/references/contracts/button-group.md +36 -0
- package/skills/monkey-mini-app/references/contracts/button.md +26 -0
- package/skills/monkey-mini-app/references/contracts/calendar.md +20 -0
- package/skills/monkey-mini-app/references/contracts/card.md +41 -0
- package/skills/monkey-mini-app/references/contracts/cascader.md +12 -2
- package/skills/monkey-mini-app/references/contracts/chart.md +32 -0
- package/skills/monkey-mini-app/references/contracts/checkbox.md +19 -0
- package/skills/monkey-mini-app/references/contracts/code-block.md +20 -2
- package/skills/monkey-mini-app/references/contracts/code-editor.md +30 -4
- package/skills/monkey-mini-app/references/contracts/collapsible.md +21 -0
- package/skills/monkey-mini-app/references/contracts/color-picker.md +12 -2
- package/skills/monkey-mini-app/references/contracts/combobox.md +34 -0
- package/skills/monkey-mini-app/references/contracts/command.md +41 -0
- package/skills/monkey-mini-app/references/contracts/comment-thread.md +12 -2
- package/skills/monkey-mini-app/references/contracts/commit-graph.md +50 -0
- package/skills/monkey-mini-app/references/contracts/confirm-dialog.md +20 -2
- package/skills/monkey-mini-app/references/contracts/context-menu.md +41 -0
- package/skills/monkey-mini-app/references/contracts/copyable.md +12 -2
- package/skills/monkey-mini-app/references/contracts/currency-input.md +12 -2
- package/skills/monkey-mini-app/references/contracts/dashboard-shell.md +41 -0
- package/skills/monkey-mini-app/references/contracts/data-grid.md +13 -6
- package/skills/monkey-mini-app/references/contracts/date-picker.md +20 -2
- package/skills/monkey-mini-app/references/contracts/date-range-picker.md +10 -2
- package/skills/monkey-mini-app/references/contracts/date-time-picker.md +20 -2
- package/skills/monkey-mini-app/references/contracts/date-time-range-picker.md +20 -2
- package/skills/monkey-mini-app/references/contracts/description-list.md +12 -2
- package/skills/monkey-mini-app/references/contracts/detail-panel.md +10 -2
- package/skills/monkey-mini-app/references/contracts/dialog.md +44 -0
- package/skills/monkey-mini-app/references/contracts/diff-viewer.md +21 -2
- package/skills/monkey-mini-app/references/contracts/donut-chart.md +14 -2
- package/skills/monkey-mini-app/references/contracts/drawer.md +29 -0
- package/skills/monkey-mini-app/references/contracts/dropdown-menu.md +49 -0
- package/skills/monkey-mini-app/references/contracts/duration-input.md +20 -2
- package/skills/monkey-mini-app/references/contracts/empty.md +40 -0
- package/skills/monkey-mini-app/references/contracts/env-badge.md +12 -2
- package/skills/monkey-mini-app/references/contracts/env-table.md +46 -0
- package/skills/monkey-mini-app/references/contracts/event-calendar.md +28 -20
- package/skills/monkey-mini-app/references/contracts/field.md +34 -0
- package/skills/monkey-mini-app/references/contracts/file-dropzone.md +20 -2
- package/skills/monkey-mini-app/references/contracts/file-tree.md +12 -2
- package/skills/monkey-mini-app/references/contracts/filter-bar.md +2 -2
- package/skills/monkey-mini-app/references/contracts/form-sheet.md +51 -0
- package/skills/monkey-mini-app/references/contracts/gantt.md +20 -2
- package/skills/monkey-mini-app/references/contracts/gauge.md +14 -2
- package/skills/monkey-mini-app/references/contracts/hover-card.md +21 -0
- package/skills/monkey-mini-app/references/contracts/input-group.md +24 -0
- package/skills/monkey-mini-app/references/contracts/input.md +33 -0
- package/skills/monkey-mini-app/references/contracts/item.md +36 -0
- package/skills/monkey-mini-app/references/contracts/jira-wiki.md +3 -4
- package/skills/monkey-mini-app/references/contracts/jql-input.md +15 -8
- package/skills/monkey-mini-app/references/contracts/json-viewer.md +20 -2
- package/skills/monkey-mini-app/references/contracts/kanban-issue-panel.md +12 -2
- package/skills/monkey-mini-app/references/contracts/kanban.md +10 -2
- package/skills/monkey-mini-app/references/contracts/kbd.md +20 -0
- package/skills/monkey-mini-app/references/contracts/label.md +33 -0
- package/skills/monkey-mini-app/references/contracts/list-detail.md +46 -0
- package/skills/monkey-mini-app/references/contracts/log-viewer.md +45 -4
- package/skills/monkey-mini-app/references/contracts/markdown-editor.md +20 -2
- package/skills/monkey-mini-app/references/contracts/markdown.md +12 -2
- package/skills/monkey-mini-app/references/contracts/marker.md +30 -0
- package/skills/monkey-mini-app/references/contracts/menubar.md +34 -0
- package/skills/monkey-mini-app/references/contracts/message-scroller.md +24 -0
- package/skills/monkey-mini-app/references/contracts/message.md +24 -0
- package/skills/monkey-mini-app/references/contracts/mini-calendar.md +20 -2
- package/skills/monkey-mini-app/references/contracts/native-select.md +21 -0
- package/skills/monkey-mini-app/references/contracts/navigation-menu.md +27 -0
- package/skills/monkey-mini-app/references/contracts/notification-center.md +12 -2
- package/skills/monkey-mini-app/references/contracts/number-field.md +20 -2
- package/skills/monkey-mini-app/references/contracts/page-header.md +2 -2
- package/skills/monkey-mini-app/references/contracts/pagination.md +33 -0
- package/skills/monkey-mini-app/references/contracts/password-field.md +12 -2
- package/skills/monkey-mini-app/references/contracts/phone-input.md +12 -2
- package/skills/monkey-mini-app/references/contracts/popover.md +32 -0
- package/skills/monkey-mini-app/references/contracts/progress-ring.md +14 -2
- package/skills/monkey-mini-app/references/contracts/progress.md +39 -0
- package/skills/monkey-mini-app/references/contracts/questionnaire.md +33 -0
- package/skills/monkey-mini-app/references/contracts/radar-chart.md +14 -2
- package/skills/monkey-mini-app/references/contracts/radio-group.md +20 -0
- package/skills/monkey-mini-app/references/contracts/rating.md +12 -2
- package/skills/monkey-mini-app/references/contracts/relative-date-picker.md +20 -2
- package/skills/monkey-mini-app/references/contracts/request-inspector.md +12 -2
- package/skills/monkey-mini-app/references/contracts/resizable.md +29 -0
- package/skills/monkey-mini-app/references/contracts/reveal.md +31 -0
- package/skills/monkey-mini-app/references/contracts/rich-text-editor.md +14 -2
- package/skills/monkey-mini-app/references/contracts/run-timeline.md +20 -2
- package/skills/monkey-mini-app/references/contracts/scroll-area.md +20 -0
- package/skills/monkey-mini-app/references/contracts/scrollspy.md +20 -2
- package/skills/monkey-mini-app/references/contracts/search-input.md +12 -2
- package/skills/monkey-mini-app/references/contracts/select.md +36 -0
- package/skills/monkey-mini-app/references/contracts/separator.md +27 -0
- package/skills/monkey-mini-app/references/contracts/settings-split.md +53 -0
- package/skills/monkey-mini-app/references/contracts/severity-chip.md +12 -2
- package/skills/monkey-mini-app/references/contracts/sheet.md +34 -0
- package/skills/monkey-mini-app/references/contracts/sidebar.md +42 -0
- package/skills/monkey-mini-app/references/contracts/skeleton.md +33 -0
- package/skills/monkey-mini-app/references/contracts/slider-range.md +12 -2
- package/skills/monkey-mini-app/references/contracts/slider.md +25 -0
- package/skills/monkey-mini-app/references/contracts/sortable-list.md +20 -2
- package/skills/monkey-mini-app/references/contracts/sparkline.md +13 -2
- package/skills/monkey-mini-app/references/contracts/spinner.md +31 -0
- package/skills/monkey-mini-app/references/contracts/stacked-bar-chart.md +17 -2
- package/skills/monkey-mini-app/references/contracts/stat-card.md +2 -2
- package/skills/monkey-mini-app/references/contracts/status-badge.md +2 -2
- package/skills/monkey-mini-app/references/contracts/stepper-item.md +39 -0
- package/skills/monkey-mini-app/references/contracts/stepper.md +38 -11
- package/skills/monkey-mini-app/references/contracts/switch.md +25 -0
- package/skills/monkey-mini-app/references/contracts/table-page.md +41 -0
- package/skills/monkey-mini-app/references/contracts/table.md +42 -0
- package/skills/monkey-mini-app/references/contracts/tabs.md +31 -0
- package/skills/monkey-mini-app/references/contracts/tag-input.md +12 -2
- package/skills/monkey-mini-app/references/contracts/terminal.md +13 -2
- package/skills/monkey-mini-app/references/contracts/test-step-list.md +12 -2
- package/skills/monkey-mini-app/references/contracts/textarea.md +25 -0
- package/skills/monkey-mini-app/references/contracts/time-picker.md +18 -2
- package/skills/monkey-mini-app/references/contracts/time-range-picker.md +20 -2
- package/skills/monkey-mini-app/references/contracts/time-wheel.md +6 -2
- package/skills/monkey-mini-app/references/contracts/timeline.md +20 -2
- package/skills/monkey-mini-app/references/contracts/timezone-select.md +20 -2
- package/skills/monkey-mini-app/references/contracts/toast.md +39 -0
- package/skills/monkey-mini-app/references/contracts/toggle-group.md +28 -0
- package/skills/monkey-mini-app/references/contracts/toggle.md +26 -0
- package/skills/monkey-mini-app/references/contracts/tooltip.md +30 -0
- package/skills/monkey-mini-app/references/contracts/transfer.md +12 -2
- package/skills/monkey-mini-app/references/contracts/tree-view.md +20 -2
- package/skills/monkey-mini-app/references/contracts/trend-card.md +12 -2
- package/skills/monkey-mini-app/references/contracts/user-picker.md +12 -2
- package/skills/monkey-mini-app/references/contracts/wizard-shell.md +56 -0
- package/skills/monkey-mini-app/references/ctx.md +123 -53
- package/skills/monkey-mini-app/references/eval.md +115 -0
- package/skills/monkey-mini-app/references/examples/alert/alert-01.tsx +17 -0
- package/skills/monkey-mini-app/references/examples/aspect-ratio/aspect-ratio-01.tsx +16 -0
- package/skills/monkey-mini-app/references/examples/attachment/attachment-01.tsx +19 -0
- package/skills/monkey-mini-app/references/examples/breadcrumb/breadcrumb-01.tsx +31 -0
- package/skills/monkey-mini-app/references/examples/bubble/bubble-01.tsx +16 -0
- package/skills/monkey-mini-app/references/examples/button-group/button-group-01.tsx +23 -0
- package/skills/monkey-mini-app/references/examples/card/card-01.tsx +19 -0
- package/skills/monkey-mini-app/references/examples/charts-blocks.md +15 -0
- package/skills/monkey-mini-app/references/examples/code-block/code-block-01.tsx +14 -0
- package/skills/monkey-mini-app/references/examples/code-editor/code-editor-01.tsx +15 -0
- package/skills/monkey-mini-app/references/examples/command/command-01.tsx +30 -0
- package/skills/monkey-mini-app/references/examples/confirm-dialog/confirm-dialog-01.tsx +33 -0
- package/skills/monkey-mini-app/references/examples/context-menu/context-menu-01.tsx +29 -0
- package/skills/monkey-mini-app/references/examples/dashboard-shell/dashboard-shell-01.tsx +78 -0
- package/skills/monkey-mini-app/references/examples/data-grid/data-grid-01.tsx +34 -0
- package/skills/monkey-mini-app/references/examples/data-grid/data-grid-02.tsx +88 -0
- package/skills/monkey-mini-app/references/examples/date-picker/date-picker-01.tsx +14 -0
- package/skills/monkey-mini-app/references/examples/date-range-picker/date-range-picker-01.tsx +14 -0
- package/skills/monkey-mini-app/references/examples/date-time-picker/date-time-picker-01.tsx +16 -0
- package/skills/monkey-mini-app/references/examples/date-time-range-picker/date-time-range-picker-01.tsx +15 -0
- package/skills/monkey-mini-app/references/examples/detail-panel/detail-panel-01.tsx +21 -0
- package/skills/monkey-mini-app/references/examples/dialog/dialog-01.tsx +30 -0
- package/skills/monkey-mini-app/references/examples/diff-viewer/diff-viewer-01.tsx +10 -0
- package/skills/monkey-mini-app/references/examples/dropdown-menu/dropdown-menu-01.tsx +31 -0
- package/skills/monkey-mini-app/references/examples/duration-input/duration-input-01.tsx +20 -0
- package/skills/monkey-mini-app/references/examples/editors.md +11 -0
- package/skills/monkey-mini-app/references/examples/empty/empty-01.tsx +19 -0
- package/skills/monkey-mini-app/references/examples/event-calendar/event-calendar-01.tsx +53 -0
- package/skills/monkey-mini-app/references/examples/file-dropzone/file-dropzone-01.tsx +14 -0
- package/skills/monkey-mini-app/references/examples/form-sheet/form-sheet-01.tsx +85 -0
- package/skills/monkey-mini-app/references/examples/forms.md +16 -0
- package/skills/monkey-mini-app/references/examples/gantt/gantt-01.tsx +29 -0
- package/skills/monkey-mini-app/references/examples/input/input-01.tsx +10 -0
- package/skills/monkey-mini-app/references/examples/item/item-01.tsx +19 -0
- package/skills/monkey-mini-app/references/examples/jql-input/jql-input-01.tsx +33 -0
- package/skills/monkey-mini-app/references/examples/json-viewer/json-viewer-01.tsx +10 -0
- package/skills/monkey-mini-app/references/examples/kanban/kanban-01.tsx +60 -0
- package/skills/monkey-mini-app/references/examples/label/label-01.tsx +10 -0
- package/skills/monkey-mini-app/references/examples/list-detail/list-detail-01.tsx +117 -0
- package/skills/monkey-mini-app/references/examples/log-viewer/log-viewer-01.tsx +20 -0
- package/skills/monkey-mini-app/references/examples/markdown-editor/markdown-editor-01.tsx +18 -0
- package/skills/monkey-mini-app/references/examples/marker/marker-01.tsx +16 -0
- package/skills/monkey-mini-app/references/examples/mini-calendar/mini-calendar-01.tsx +14 -0
- package/skills/monkey-mini-app/references/examples/misc-charts-blocks/misc-charts-blocks-01.tsx +20 -0
- package/skills/monkey-mini-app/references/examples/misc-charts-blocks/misc-charts-blocks-02.tsx +32 -0
- package/skills/monkey-mini-app/references/examples/misc-charts-blocks/misc-charts-blocks-03.tsx +47 -0
- package/skills/monkey-mini-app/references/examples/misc-charts-blocks/misc-charts-blocks-04.tsx +20 -0
- package/skills/monkey-mini-app/references/examples/misc-charts-blocks/misc-charts-blocks-05.tsx +24 -0
- package/skills/monkey-mini-app/references/examples/misc-charts-blocks/misc-charts-blocks-06.tsx +89 -0
- package/skills/monkey-mini-app/references/examples/misc-editors/misc-editors-01.tsx +114 -0
- package/skills/monkey-mini-app/references/examples/misc-editors/misc-editors-02.tsx +33 -0
- package/skills/monkey-mini-app/references/examples/misc-forms/misc-forms-01.tsx +22 -0
- package/skills/monkey-mini-app/references/examples/misc-forms/misc-forms-02.tsx +37 -0
- package/skills/monkey-mini-app/references/examples/misc-forms/misc-forms-03.tsx +42 -0
- package/skills/monkey-mini-app/references/examples/misc-forms/misc-forms-04.tsx +25 -0
- package/skills/monkey-mini-app/references/examples/misc-forms/misc-forms-05.tsx +27 -0
- package/skills/monkey-mini-app/references/examples/misc-forms/misc-forms-06.tsx +33 -0
- package/skills/monkey-mini-app/references/examples/misc-forms/misc-forms-07.tsx +44 -0
- package/skills/monkey-mini-app/references/examples/misc-overlays/misc-overlays-01.tsx +43 -0
- package/skills/monkey-mini-app/references/examples/misc-overlays/misc-overlays-02.tsx +38 -0
- package/skills/monkey-mini-app/references/examples/misc-primitives/misc-primitives-01.tsx +21 -0
- package/skills/monkey-mini-app/references/examples/misc-primitives/misc-primitives-02.tsx +52 -0
- package/skills/monkey-mini-app/references/examples/misc-primitives/misc-primitives-03.tsx +44 -0
- package/skills/monkey-mini-app/references/examples/number-field/number-field-01.tsx +22 -0
- package/skills/monkey-mini-app/references/examples/overlays.md +11 -0
- package/skills/monkey-mini-app/references/examples/pagination/pagination-01.tsx +51 -0
- package/skills/monkey-mini-app/references/examples/primitives.md +12 -0
- package/skills/monkey-mini-app/references/examples/progress/progress-01.tsx +10 -0
- package/skills/monkey-mini-app/references/examples/relative-date-picker/relative-date-picker-01.tsx +19 -0
- package/skills/monkey-mini-app/references/examples/rich-text-editor/rich-text-editor-01.tsx +15 -0
- package/skills/monkey-mini-app/references/examples/run-timeline/run-timeline-01.tsx +17 -0
- package/skills/monkey-mini-app/references/examples/scrollspy/scrollspy-01.tsx +29 -0
- package/skills/monkey-mini-app/references/examples/separator/separator-01.tsx +10 -0
- package/skills/monkey-mini-app/references/examples/settings-split/settings-split-01.tsx +84 -0
- package/skills/monkey-mini-app/references/examples/shared/jira-wiki-sample.ts +38 -0
- package/skills/monkey-mini-app/references/examples/skeleton/skeleton-01.tsx +10 -0
- package/skills/monkey-mini-app/references/examples/slider/slider-01.tsx +22 -0
- package/skills/monkey-mini-app/references/examples/sortable-list/sortable-list-01.tsx +18 -0
- package/skills/monkey-mini-app/references/examples/spinner/spinner-01.tsx +10 -0
- package/skills/monkey-mini-app/references/examples/stepper/stepper-01.tsx +41 -0
- package/skills/monkey-mini-app/references/examples/table/table-01.tsx +25 -0
- package/skills/monkey-mini-app/references/examples/table-page/table-page-01.tsx +103 -0
- package/skills/monkey-mini-app/references/examples/time-picker/time-picker-01.tsx +19 -0
- package/skills/monkey-mini-app/references/examples/time-range-picker/time-range-picker-01.tsx +14 -0
- package/skills/monkey-mini-app/references/examples/timeline/timeline-01.tsx +18 -0
- package/skills/monkey-mini-app/references/examples/timezone-select/timezone-select-01.tsx +15 -0
- package/skills/monkey-mini-app/references/examples/toggle/toggle-01.tsx +20 -0
- package/skills/monkey-mini-app/references/examples/toggle-group/toggle-group-01.tsx +22 -0
- package/skills/monkey-mini-app/references/examples/tree-view/tree-view-01.tsx +25 -0
- package/skills/monkey-mini-app/references/examples/wizard-shell/wizard-shell-01.tsx +58 -0
- package/skills/monkey-mini-app/references/history.md +23 -7
- package/skills/monkey-mini-app/references/icons.md +99 -69
- package/skills/monkey-mini-app/references/llm-json.md +39 -26
- package/skills/monkey-mini-app/references/loader.md +47 -20
- package/skills/monkey-mini-app/references/looks/aurora-bento.md +88 -0
- package/skills/monkey-mini-app/references/looks/desk-split.md +89 -0
- package/skills/monkey-mini-app/references/looks/editorial.md +78 -0
- package/skills/monkey-mini-app/references/looks/glass-island.md +90 -0
- package/skills/monkey-mini-app/references/looks/index.md +18 -0
- package/skills/monkey-mini-app/references/looks/signage.md +74 -0
- package/skills/monkey-mini-app/references/looks/tape.md +22 -0
- package/skills/monkey-mini-app/references/looks/terminal.md +88 -0
- package/skills/monkey-mini-app/references/looks/void.md +22 -0
- package/skills/monkey-mini-app/references/styling.md +189 -0
- package/skills/monkey-mini-app/references/test.md +12 -12
- package/skills/monkey-mini-app/references/theme.md +197 -0
- package/skills/monkey-mini-app/references/tools.md +12 -12
- package/skills/monkey-mini-app/references/troubleshoot.md +165 -12
- package/skills/monkey-mini-app/templates/README.md +33 -21
- package/skills/monkey-mini-app/templates/{jira → board}/main.api.ts +11 -11
- package/skills/monkey-mini-app/templates/board/manifest.json +8 -0
- package/skills/monkey-mini-app/templates/board/theme.css +46 -0
- package/skills/monkey-mini-app/templates/board/ui.tsx +546 -0
- package/skills/monkey-mini-app/templates/chores/main.api.ts +35 -0
- package/skills/monkey-mini-app/templates/chores/manifest.json +8 -0
- package/skills/monkey-mini-app/templates/chores/theme.css +46 -0
- package/skills/monkey-mini-app/templates/chores/ui.tsx +117 -0
- package/skills/monkey-mini-app/templates/minimal/main.api.ts +5 -5
- package/skills/monkey-mini-app/templates/minimal/manifest.json +1 -2
- package/skills/monkey-mini-app/templates/minimal/ui.tsx +17 -8
- package/skills/monkey-mini-app/templates/radar/api/scan.ts +79 -0
- package/skills/monkey-mini-app/templates/radar/main.api.ts +29 -0
- package/skills/monkey-mini-app/templates/radar/manifest.json +8 -0
- package/skills/monkey-mini-app/templates/radar/shared/events.ts +25 -0
- package/skills/monkey-mini-app/templates/{insights/lib → radar/shared}/sample.ts +1 -1
- package/skills/monkey-mini-app/templates/radar/theme.css +47 -0
- package/skills/monkey-mini-app/templates/radar/ui/brief.tsx +31 -0
- package/skills/monkey-mini-app/templates/radar/ui.tsx +131 -0
- package/skills/monkey-mini-app/templates/runner/main.api.ts +91 -0
- package/skills/monkey-mini-app/templates/runner/manifest.json +8 -0
- package/skills/monkey-mini-app/templates/runner/shared/events.ts +14 -0
- package/skills/monkey-mini-app/templates/runner/theme.css +46 -0
- package/skills/monkey-mini-app/templates/runner/ui.tsx +213 -0
- package/skills/monkey-mini-app/templates/sheets/main.api.ts +276 -0
- package/skills/monkey-mini-app/templates/sheets/manifest.json +8 -0
- package/skills/monkey-mini-app/templates/sheets/theme.css +46 -0
- package/skills/monkey-mini-app/templates/sheets/ui.tsx +419 -0
- package/skills/monkey-mini-app/templates/{todo → today}/main.api.ts +8 -8
- package/skills/monkey-mini-app/templates/today/manifest.json +8 -0
- package/skills/monkey-mini-app/templates/today/theme.css +45 -0
- package/skills/monkey-mini-app/templates/today/ui/item-row.tsx +25 -0
- package/skills/monkey-mini-app/templates/today/ui.tsx +406 -0
- package/skills/monkey-mini-app/templates/{monitor → watch}/main.api.ts +8 -8
- package/skills/monkey-mini-app/templates/watch/manifest.json +8 -0
- package/skills/monkey-mini-app/templates/watch/ui.tsx +187 -0
- package/skills/monkey-mini-app/tsconfig.json +31 -0
- package/skills/monkey-mini-app/types/cdn.d.ts +1 -0
- package/tsup.config.ts +1 -0
- package/skills/monkey-mini-app/templates/agentrun/main.api.ts +0 -78
- package/skills/monkey-mini-app/templates/agentrun/manifest.json +0 -9
- package/skills/monkey-mini-app/templates/agentrun/ui.tsx +0 -125
- package/skills/monkey-mini-app/templates/insights/main.api.ts +0 -101
- package/skills/monkey-mini-app/templates/insights/manifest.json +0 -9
- package/skills/monkey-mini-app/templates/insights/ui.tsx +0 -138
- package/skills/monkey-mini-app/templates/jira/manifest.json +0 -9
- package/skills/monkey-mini-app/templates/jira/ui.tsx +0 -318
- package/skills/monkey-mini-app/templates/monitor/manifest.json +0 -9
- package/skills/monkey-mini-app/templates/monitor/ui.tsx +0 -176
- package/skills/monkey-mini-app/templates/review/main.api.ts +0 -68
- package/skills/monkey-mini-app/templates/review/manifest.json +0 -9
- package/skills/monkey-mini-app/templates/review/ui.tsx +0 -159
- package/skills/monkey-mini-app/templates/todo/manifest.json +0 -8
- package/skills/monkey-mini-app/templates/todo/ui.tsx +0 -177
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf Item
|
|
3
|
+
* @title Item
|
|
4
|
+
* @scenario A uniform row (title + description + trailing actions) inside menus, lists and cards, with an outline variant for grouping.
|
|
5
|
+
*/
|
|
6
|
+
import { Item, ItemContent, ItemDescription, ItemTitle } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function Item01Example() {
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<Item variant="outline">
|
|
12
|
+
<ItemContent>
|
|
13
|
+
<ItemTitle>Notification</ItemTitle>
|
|
14
|
+
<ItemDescription>Build finished</ItemDescription>
|
|
15
|
+
</ItemContent>
|
|
16
|
+
</Item>
|
|
17
|
+
</>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf JqlInput
|
|
3
|
+
* @title JqlInput
|
|
4
|
+
* @scenario Query-language field with syntax feedback (JQL/SQL-ish filters) — the CodeMirror-powered sibling of SearchInput.
|
|
5
|
+
* @hint CodeMirror JQL · type to complete fields
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
|
|
9
|
+
import { JqlInput } from "@monkey-mini-app/ui";
|
|
10
|
+
|
|
11
|
+
const FIELDS = [
|
|
12
|
+
{ name: "project", type: "project" },
|
|
13
|
+
{ name: "status", type: "status" },
|
|
14
|
+
{ name: "assignee", type: "user" },
|
|
15
|
+
{ name: "reporter", type: "user" },
|
|
16
|
+
{ name: "priority", type: "priority" },
|
|
17
|
+
{ name: "issuetype", type: "issuetype" },
|
|
18
|
+
{ name: "resolution", type: "resolution" },
|
|
19
|
+
{ name: "labels", type: "array" },
|
|
20
|
+
{ name: "updated", type: "date" },
|
|
21
|
+
{ name: "created", type: "date" },
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
export default function JqlInput01Example() {
|
|
25
|
+
const [jql, setJql] = React.useState('project = TMS AND status = "In Progress" ORDER BY updated DESC');
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<>
|
|
29
|
+
<JqlInput value={jql} onChange={setJql} fields={FIELDS} />
|
|
30
|
+
<p className="text-muted-foreground mt-2 font-mono text-xs">{jql}</p>
|
|
31
|
+
</>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf JsonViewer
|
|
3
|
+
* @title JsonViewer
|
|
4
|
+
* @scenario Collapsible tree over an API response payload; use for debugging output instead of <pre>{JSON.stringify(...)}.
|
|
5
|
+
*/
|
|
6
|
+
import { JsonViewer } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function JsonViewer01Example() {
|
|
9
|
+
return <JsonViewer value={{ ok: true, count: 2, nested: { a: 1 } }} />;
|
|
10
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf Kanban
|
|
3
|
+
* @title Kanban
|
|
4
|
+
* @scenario Card board with drag between columns, plus the issue detail sheet — the workflow/pipeline view; use Table/DataGrid when you need sorting and totals.
|
|
5
|
+
* @hint Drag between columns · click a card for Jira details
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
|
|
9
|
+
import { Kanban, type KanbanCard, KanbanIssuePanel } from "@monkey-mini-app/ui";
|
|
10
|
+
|
|
11
|
+
export default function Kanban01Example() {
|
|
12
|
+
const [cards, setCards] = React.useState<KanbanCard[]>([
|
|
13
|
+
{
|
|
14
|
+
id: "c1",
|
|
15
|
+
key: "TMS-1201",
|
|
16
|
+
title: "Fix grid sort reset",
|
|
17
|
+
columnId: "todo",
|
|
18
|
+
type: "Story",
|
|
19
|
+
status: "running",
|
|
20
|
+
priority: "P1",
|
|
21
|
+
assignee: "Ada",
|
|
22
|
+
reporter: "Lin",
|
|
23
|
+
tags: ["grid"],
|
|
24
|
+
description: "Third click should clear sorting.",
|
|
25
|
+
comments: [{ id: "1", author: "Lin", body: "Please add UT.", time: "1h" }],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "c2",
|
|
29
|
+
key: "TMS-1208",
|
|
30
|
+
title: "Write board tests",
|
|
31
|
+
columnId: "doing",
|
|
32
|
+
type: "Task",
|
|
33
|
+
status: "pass",
|
|
34
|
+
priority: "P2",
|
|
35
|
+
assignee: "Kai",
|
|
36
|
+
},
|
|
37
|
+
]);
|
|
38
|
+
const [issue, setIssue] = React.useState<KanbanCard | null>(null);
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<>
|
|
42
|
+
<Kanban
|
|
43
|
+
columns={[
|
|
44
|
+
{ id: "todo", title: "Todo" },
|
|
45
|
+
{ id: "doing", title: "Doing", limit: 3 },
|
|
46
|
+
{ id: "done", title: "Done" },
|
|
47
|
+
]}
|
|
48
|
+
cards={cards}
|
|
49
|
+
onCardsChange={setCards}
|
|
50
|
+
onCardClick={setIssue}
|
|
51
|
+
/>
|
|
52
|
+
<KanbanIssuePanel
|
|
53
|
+
card={issue}
|
|
54
|
+
open={issue != null}
|
|
55
|
+
onOpenChange={(open) => !open && setIssue(null)}
|
|
56
|
+
columnTitle={cards.find((c) => c.id === issue?.id)?.columnId}
|
|
57
|
+
/>
|
|
58
|
+
</>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf Label
|
|
3
|
+
* @title Label
|
|
4
|
+
* @scenario Accessible field label wired by htmlFor; the piece that makes a bare Input keyboard/AT-usable.
|
|
5
|
+
*/
|
|
6
|
+
import { Label } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function Label01Example() {
|
|
9
|
+
return <Label htmlFor="demo-name">Name</Label>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf ListDetail
|
|
3
|
+
* @title ListDetail
|
|
4
|
+
* @scenario Records browser at a fixed height: a long ticket list on the left, the selected ticket on the right, each pane scrolling on its own.
|
|
5
|
+
* @hint Scroll either pane — the toolbar and the other pane stay put
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
|
|
9
|
+
import { Badge, Button, Input, ListDetail } from "@monkey-mini-app/ui";
|
|
10
|
+
|
|
11
|
+
type Ticket = {
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
status: "Open" | "InProgress" | "Blocked";
|
|
15
|
+
owner: string;
|
|
16
|
+
updated: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const TICKETS: Ticket[] = Array.from({ length: 40 }, (_, i) => ({
|
|
20
|
+
id: `OPS-${1040 - i}`,
|
|
21
|
+
title: [
|
|
22
|
+
"Nightly export drops the last sheet",
|
|
23
|
+
"Queue depth alarm fires on restart",
|
|
24
|
+
"Retry button re-sends twice",
|
|
25
|
+
"Timezone shifts in the weekly digest",
|
|
26
|
+
"Attachment preview stalls on large PDFs",
|
|
27
|
+
][i % 5],
|
|
28
|
+
status: (["Open", "InProgress", "Blocked"] as const)[i % 3],
|
|
29
|
+
owner: ["amy", "bo", "cy", "dee"][i % 4],
|
|
30
|
+
updated: `${(i % 9) + 1}h ago`,
|
|
31
|
+
}));
|
|
32
|
+
|
|
33
|
+
export default function ListDetail01Example() {
|
|
34
|
+
const [query, setQuery] = React.useState("");
|
|
35
|
+
const [selected, setSelected] = React.useState<string | null>(null);
|
|
36
|
+
const [mobileView, setMobileView] = React.useState<"list" | "detail">("list");
|
|
37
|
+
|
|
38
|
+
const rows = TICKETS.filter((t) => (t.title + t.id).toLowerCase().includes(query.toLowerCase()));
|
|
39
|
+
const current = rows.find((t) => t.id === selected) ?? null;
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<div className="h-[420px]">
|
|
43
|
+
<ListDetail
|
|
44
|
+
toolbar={
|
|
45
|
+
<div className="flex items-center gap-2 border-b px-3 py-2">
|
|
46
|
+
<Input
|
|
47
|
+
value={query}
|
|
48
|
+
onChange={(e) => setQuery(e.target.value)}
|
|
49
|
+
placeholder="Search tickets"
|
|
50
|
+
className="h-8 max-w-60"
|
|
51
|
+
/>
|
|
52
|
+
<Badge variant="outline">
|
|
53
|
+
{rows.length} of {TICKETS.length}
|
|
54
|
+
</Badge>
|
|
55
|
+
</div>
|
|
56
|
+
}
|
|
57
|
+
list={
|
|
58
|
+
<ul className="divide-border divide-y">
|
|
59
|
+
{rows.map((t) => (
|
|
60
|
+
<li key={t.id}>
|
|
61
|
+
<button
|
|
62
|
+
type="button"
|
|
63
|
+
onClick={() => {
|
|
64
|
+
setSelected(t.id);
|
|
65
|
+
setMobileView("detail");
|
|
66
|
+
}}
|
|
67
|
+
className={`hover:bg-muted/60 flex w-full flex-col items-start gap-1 px-3 py-2 text-left ${
|
|
68
|
+
t.id === selected ? "bg-muted" : ""
|
|
69
|
+
}`}
|
|
70
|
+
>
|
|
71
|
+
<span className="text-muted-foreground font-mono text-xs">{t.id}</span>
|
|
72
|
+
<span className="text-sm">{t.title}</span>
|
|
73
|
+
</button>
|
|
74
|
+
</li>
|
|
75
|
+
))}
|
|
76
|
+
</ul>
|
|
77
|
+
}
|
|
78
|
+
detail={
|
|
79
|
+
current ? (
|
|
80
|
+
<div className="flex flex-col gap-3 p-4">
|
|
81
|
+
<div className="flex items-center gap-2">
|
|
82
|
+
<span className="font-mono text-xs">{current.id}</span>
|
|
83
|
+
<Badge>{current.status}</Badge>
|
|
84
|
+
</div>
|
|
85
|
+
<h3 className="font-heading font-medium">{current.title}</h3>
|
|
86
|
+
<dl className="text-muted-foreground grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-sm">
|
|
87
|
+
<dt>Owner</dt>
|
|
88
|
+
<dd>{current.owner}</dd>
|
|
89
|
+
<dt>Updated</dt>
|
|
90
|
+
<dd>{current.updated}</dd>
|
|
91
|
+
</dl>
|
|
92
|
+
<ul className="text-muted-foreground flex flex-col gap-1 text-sm">
|
|
93
|
+
{Array.from({ length: 30 }, (_, i) => (
|
|
94
|
+
<li key={i}>
|
|
95
|
+
Activity {i + 1}: {current.owner} touched {current.id}
|
|
96
|
+
</li>
|
|
97
|
+
))}
|
|
98
|
+
</ul>
|
|
99
|
+
<div>
|
|
100
|
+
<Button size="sm" variant="outline" onClick={() => setSelected(null)}>
|
|
101
|
+
Clear selection
|
|
102
|
+
</Button>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
) : undefined
|
|
106
|
+
}
|
|
107
|
+
empty={
|
|
108
|
+
<div className="text-muted-foreground p-6 text-sm">
|
|
109
|
+
Select a ticket on the left. Both panes scroll independently — this one included.
|
|
110
|
+
</div>
|
|
111
|
+
}
|
|
112
|
+
mobileView={mobileView}
|
|
113
|
+
onMobileBack={() => setMobileView("list")}
|
|
114
|
+
/>
|
|
115
|
+
</div>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf LogViewer
|
|
3
|
+
* @title LogViewer
|
|
4
|
+
* @scenario Thousands of streamed log lines: virtualised rows with level colouring and auto-follow; never render logs with a plain map.
|
|
5
|
+
*/
|
|
6
|
+
import { LogViewer } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function LogViewer01Example() {
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<LogViewer
|
|
12
|
+
entries={Array.from({ length: 40 }, (_, i) => ({
|
|
13
|
+
level: (["info", "warn", "error", "debug", "verbose"] as const)[i % 5],
|
|
14
|
+
message: `line ${i}`,
|
|
15
|
+
timestamp: new Date(2026, 0, 1, 12, 0, i % 60).toISOString(),
|
|
16
|
+
}))}
|
|
17
|
+
/>
|
|
18
|
+
</>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf MarkdownEditor
|
|
3
|
+
* @title MarkdownEditor
|
|
4
|
+
* @scenario Write markdown with a live preview pane and a mode toggle (edit / split / preview) for docs and descriptions.
|
|
5
|
+
* @hint Left CodeMirror, right live GFM preview
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
|
|
9
|
+
import { MarkdownEditor } from "@monkey-mini-app/ui";
|
|
10
|
+
|
|
11
|
+
export default function MarkdownEditor01Example() {
|
|
12
|
+
const [md, setMd] = React.useState(
|
|
13
|
+
"# Title\n\n**bold**, a [link](https://example.com), and a task:\n\n- [x] Review grid\n- [ ] Ship demo\n",
|
|
14
|
+
);
|
|
15
|
+
const [mdMode, setMdMode] = React.useState<"edit" | "split" | "preview">("split");
|
|
16
|
+
|
|
17
|
+
return <MarkdownEditor value={md} onChange={setMd} mode={mdMode} onModeChange={setMdMode} />;
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf Marker
|
|
3
|
+
* @title Marker
|
|
4
|
+
* @scenario Small inline marker (icon + text) used to annotate a list row or timeline step with its state/file type.
|
|
5
|
+
*/
|
|
6
|
+
import { Marker, MarkerContent } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function Marker01Example() {
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<Marker>
|
|
12
|
+
<MarkerContent>Explored 4 files</MarkerContent>
|
|
13
|
+
</Marker>
|
|
14
|
+
</>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf MiniCalendar
|
|
3
|
+
* @title MiniCalendar
|
|
4
|
+
* @scenario An always-visible inline calendar (no popover) — side rail of a scheduler, or date filtered next to a list.
|
|
5
|
+
*/
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
|
|
8
|
+
import { MiniCalendar } from "@monkey-mini-app/ui";
|
|
9
|
+
|
|
10
|
+
export default function MiniCalendar01Example() {
|
|
11
|
+
const [mini, setMini] = React.useState<Date | undefined>(new Date());
|
|
12
|
+
|
|
13
|
+
return <MiniCalendar value={mini} onChange={setMini} />;
|
|
14
|
+
}
|
package/skills/monkey-mini-app/references/examples/misc-charts-blocks/misc-charts-blocks-01.tsx
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @group charts-blocks
|
|
3
|
+
* @title PageHeader / FilterBar
|
|
4
|
+
* @scenario Page chrome working together: PageHeader (title + description + primary action) with a FilterBar row beneath — the standard screen top for list/monitor pages.
|
|
5
|
+
*/
|
|
6
|
+
import { Button, FilterBar, Input, PageHeader } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function MiscChartsBlocks01Example() {
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<PageHeader title="QA Runs" description="Latest CI" actions={<Button size="sm">New</Button>} />
|
|
12
|
+
<FilterBar>
|
|
13
|
+
<Input placeholder="Filter…" className="max-w-xs" />
|
|
14
|
+
<Button variant="outline" size="sm">
|
|
15
|
+
Apply
|
|
16
|
+
</Button>
|
|
17
|
+
</FilterBar>
|
|
18
|
+
</>
|
|
19
|
+
);
|
|
20
|
+
}
|
package/skills/monkey-mini-app/references/examples/misc-charts-blocks/misc-charts-blocks-02.tsx
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @group charts-blocks
|
|
3
|
+
* @title StatCard / TrendCard / Sparkline / Gauge / ProgressRing
|
|
4
|
+
* @scenario KPI strip: StatCard for numbers with delta, TrendCard adding a sparkline, plus Sparkline/Gauge/ProgressRing for compact meters in one row.
|
|
5
|
+
*/
|
|
6
|
+
import { Gauge, ProgressRing, Sparkline, StatCard, TrendCard } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
const trend = [
|
|
9
|
+
{ label: "Mon", value: 12 },
|
|
10
|
+
{ label: "Tue", value: 18 },
|
|
11
|
+
{ label: "Wed", value: 9 },
|
|
12
|
+
{ label: "Thu", value: 22 },
|
|
13
|
+
{ label: "Fri", value: 16 },
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
export default function MiscChartsBlocks02Example() {
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
<div className="grid gap-3 md:grid-cols-3">
|
|
20
|
+
<StatCard title="Runs" value="128" delta="+12%" trend="up" />
|
|
21
|
+
<TrendCard title="Throughput" value="22" delta="+4" trend="up" data={trend} />
|
|
22
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
23
|
+
<div className="w-32">
|
|
24
|
+
<Sparkline data={trend} />
|
|
25
|
+
</div>
|
|
26
|
+
<Gauge value={72} label="Pass rate" size={64} />
|
|
27
|
+
<ProgressRing value={72} />
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</>
|
|
31
|
+
);
|
|
32
|
+
}
|
package/skills/monkey-mini-app/references/examples/misc-charts-blocks/misc-charts-blocks-03.tsx
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @group charts-blocks
|
|
3
|
+
* @title Donut / StackedBar / Radar
|
|
4
|
+
* @scenario Recharts-backed set: DonutChart for share-of-total, StackedBarChart for composition over time, RadarChart for multi-axis scorecards — all fed plain arrays.
|
|
5
|
+
*/
|
|
6
|
+
import { DonutChart, RadarChart, StackedBarChart } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function MiscChartsBlocks03Example() {
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<div className="grid items-center gap-4 md:grid-cols-3">
|
|
12
|
+
<DonutChart
|
|
13
|
+
size={190}
|
|
14
|
+
center="128"
|
|
15
|
+
config={{
|
|
16
|
+
pass: { label: "Pass", color: "var(--chart-1)" },
|
|
17
|
+
fail: { label: "Fail", color: "var(--chart-2)" },
|
|
18
|
+
}}
|
|
19
|
+
data={[
|
|
20
|
+
{ name: "pass", value: 90, fill: "var(--color-pass)" },
|
|
21
|
+
{ name: "fail", value: 38, fill: "var(--color-fail)" },
|
|
22
|
+
]}
|
|
23
|
+
/>
|
|
24
|
+
<StackedBarChart
|
|
25
|
+
keys={["pass", "fail"]}
|
|
26
|
+
config={{
|
|
27
|
+
pass: { label: "Pass", color: "var(--chart-1)" },
|
|
28
|
+
fail: { label: "Fail", color: "var(--chart-2)" },
|
|
29
|
+
}}
|
|
30
|
+
data={[
|
|
31
|
+
{ label: "Mon", pass: 12, fail: 2 },
|
|
32
|
+
{ label: "Tue", pass: 18, fail: 1 },
|
|
33
|
+
]}
|
|
34
|
+
/>
|
|
35
|
+
<RadarChart
|
|
36
|
+
size={190}
|
|
37
|
+
config={{ value: { label: "Score", color: "var(--chart-1)" } }}
|
|
38
|
+
data={[
|
|
39
|
+
{ label: "A", value: 80 },
|
|
40
|
+
{ label: "B", value: 60 },
|
|
41
|
+
{ label: "C", value: 90 },
|
|
42
|
+
]}
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
</>
|
|
46
|
+
);
|
|
47
|
+
}
|
package/skills/monkey-mini-app/references/examples/misc-charts-blocks/misc-charts-blocks-04.tsx
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @group charts-blocks
|
|
3
|
+
* @title StatusBadge / SeverityChip / EnvBadge
|
|
4
|
+
* @scenario Status vocabulary in one view: StatusBadge (pass/fail/flaky, lowercase statuses), SeverityChip (P0–P3) and EnvBadge (dev/stg/prd) so triage rows read consistently.
|
|
5
|
+
*/
|
|
6
|
+
import { EnvBadge, SeverityChip, StatusBadge } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function MiscChartsBlocks04Example() {
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<div className="flex flex-wrap gap-2">
|
|
12
|
+
<StatusBadge status="pass" />
|
|
13
|
+
<StatusBadge status="fail" />
|
|
14
|
+
<StatusBadge status="flaky" />
|
|
15
|
+
<SeverityChip severity="P0" />
|
|
16
|
+
<EnvBadge env="stg" />
|
|
17
|
+
</div>
|
|
18
|
+
</>
|
|
19
|
+
);
|
|
20
|
+
}
|
package/skills/monkey-mini-app/references/examples/misc-charts-blocks/misc-charts-blocks-05.tsx
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @group charts-blocks
|
|
3
|
+
* @title ActivityFeed / NotificationCenter / CommentThread / TestStepList
|
|
4
|
+
* @scenario Feed-style blocks: ActivityFeed, NotificationCenter and CommentThread share an items-in / rows-out shape; TestStepList shows pass/fail steps per case.
|
|
5
|
+
*/
|
|
6
|
+
import { ActivityFeed, CommentThread, NotificationCenter, TestStepList } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function MiscChartsBlocks05Example() {
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<div className="grid gap-4 md:grid-cols-2">
|
|
12
|
+
<ActivityFeed items={[{ id: "1", title: "Deployed", time: "10:00" }]} />
|
|
13
|
+
<NotificationCenter items={[{ id: "1", title: "Build failed", body: "login-spec" }]} />
|
|
14
|
+
<CommentThread comments={[{ id: "1", author: "Ada", body: "Looks good", time: "now" }]} />
|
|
15
|
+
<TestStepList
|
|
16
|
+
steps={[
|
|
17
|
+
{ id: "1", title: "Login", status: "pass" },
|
|
18
|
+
{ id: "2", title: "Checkout", status: "fail" },
|
|
19
|
+
]}
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
</>
|
|
23
|
+
);
|
|
24
|
+
}
|
package/skills/monkey-mini-app/references/examples/misc-charts-blocks/misc-charts-blocks-06.tsx
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @group charts-blocks
|
|
3
|
+
* @title DescriptionList / RequestInspector / Terminal / FileTree / AttachmentGallery
|
|
4
|
+
* @scenario Inspect/debug kit on one screen: DescriptionList for metadata, RequestInspector for a method/url/response, Terminal for command output, FileTree and AttachmentGallery for artifacts.
|
|
5
|
+
*/
|
|
6
|
+
import {
|
|
7
|
+
AttachmentGallery,
|
|
8
|
+
DescriptionList,
|
|
9
|
+
FileTree,
|
|
10
|
+
RequestInspector,
|
|
11
|
+
Terminal,
|
|
12
|
+
} from "@monkey-mini-app/ui";
|
|
13
|
+
|
|
14
|
+
const REQUEST = JSON.stringify(
|
|
15
|
+
{
|
|
16
|
+
buildId: 4812,
|
|
17
|
+
reason: "flaky: VehicleDamageSpec.TimeoutWhenQueueFull",
|
|
18
|
+
keepArtifacts: true,
|
|
19
|
+
notify: ["pwang12"],
|
|
20
|
+
},
|
|
21
|
+
null,
|
|
22
|
+
2,
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const RESPONSE = JSON.stringify(
|
|
26
|
+
{
|
|
27
|
+
ok: true,
|
|
28
|
+
data: {
|
|
29
|
+
buildId: 4813,
|
|
30
|
+
status: "queued",
|
|
31
|
+
runner: "macstadium-07",
|
|
32
|
+
estimatedSeconds: 420,
|
|
33
|
+
},
|
|
34
|
+
traceId: "6f2c1a48d0b74e1f",
|
|
35
|
+
},
|
|
36
|
+
null,
|
|
37
|
+
2,
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
export default function MiscChartsBlocks06Example() {
|
|
41
|
+
return (
|
|
42
|
+
<div className="flex flex-col gap-3">
|
|
43
|
+
<DescriptionList
|
|
44
|
+
items={[
|
|
45
|
+
{ label: "Pipeline", value: "gls-2.0 / api-cn-stg" },
|
|
46
|
+
{ label: "Build", value: "#4812 · failed after 7m 12s" },
|
|
47
|
+
{ label: "Commit", value: "a3f9c21 fix(veh): 排班道闸超时改 30s" },
|
|
48
|
+
{ label: "Triggered by", value: "pwang12 (manual retry #1)" },
|
|
49
|
+
]}
|
|
50
|
+
/>
|
|
51
|
+
<RequestInspector
|
|
52
|
+
method="POST"
|
|
53
|
+
url="/api/v2/pipelines/gls-2.0/builds/4812/retry"
|
|
54
|
+
request={REQUEST}
|
|
55
|
+
response={RESPONSE}
|
|
56
|
+
/>
|
|
57
|
+
<Terminal
|
|
58
|
+
lines={[
|
|
59
|
+
"$ pnpm vitest run tests/vehicle-damage.spec.ts",
|
|
60
|
+
"",
|
|
61
|
+
" RUN v4.1.10 packages/api",
|
|
62
|
+
" ✓ tests/vehicle-damage.spec.ts > list damages by lane",
|
|
63
|
+
" × tests/vehicle-damage.spec.ts > timeout when queue is full",
|
|
64
|
+
" → expected 200 to be 202 // retried 3 times in 30s",
|
|
65
|
+
"",
|
|
66
|
+
" Test Files 1 failed | 41 passed (42)",
|
|
67
|
+
" Tests 1 failed | 588 passed (589)",
|
|
68
|
+
" Duration 31.44s (transform 4.2s, setup 0ms, collect 18.9s)",
|
|
69
|
+
]}
|
|
70
|
+
/>
|
|
71
|
+
<FileTree
|
|
72
|
+
nodes={[
|
|
73
|
+
{
|
|
74
|
+
id: "artifacts",
|
|
75
|
+
label: "artifacts/",
|
|
76
|
+
children: [
|
|
77
|
+
{ id: "logs", label: "logs/", children: [{ id: "api", label: "api-cn-stg.log" }] },
|
|
78
|
+
{ id: "cov", label: "coverage/" },
|
|
79
|
+
{ id: "xml", label: "junit.xml" },
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
]}
|
|
83
|
+
/>
|
|
84
|
+
<AttachmentGallery
|
|
85
|
+
files={[{ name: "failure-screen.png" }, { name: "api-cn-stg.log" }, { name: "junit.xml" }]}
|
|
86
|
+
/>
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @group editors
|
|
3
|
+
* @title DiffViewer
|
|
4
|
+
* @scenario DiffViewer driven by app state — switch files and unified/split mode from a toolbar, the shape of a PR review screen.
|
|
5
|
+
* @hint PR-style hunks, line numbers, unified/split
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
|
|
9
|
+
import { Button, DiffViewer } from "@monkey-mini-app/ui";
|
|
10
|
+
|
|
11
|
+
const DIFFS = {
|
|
12
|
+
"src/products/data-grid.tsx": {
|
|
13
|
+
original: `export function DataGrid({ columns, data }) {
|
|
14
|
+
const [sorting, setSorting] = React.useState([])
|
|
15
|
+
const table = useReactTable({
|
|
16
|
+
data,
|
|
17
|
+
columns,
|
|
18
|
+
getCoreRowModel: getCoreRowModel(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div>
|
|
23
|
+
<Table>
|
|
24
|
+
<TableHeader>{/* headers */}</TableHeader>
|
|
25
|
+
<TableBody>{/* rows */}</TableBody>
|
|
26
|
+
</Table>
|
|
27
|
+
</div>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
`,
|
|
31
|
+
modified: `export function DataGrid({ columns, data, features }) {
|
|
32
|
+
const [sorting, setSorting] = React.useState([])
|
|
33
|
+
const [columnFilters, setColumnFilters] = React.useState([])
|
|
34
|
+
const [globalFilter, setGlobalFilter] = React.useState("")
|
|
35
|
+
const table = useReactTable({
|
|
36
|
+
data,
|
|
37
|
+
columns,
|
|
38
|
+
state: { sorting, columnFilters, globalFilter },
|
|
39
|
+
onSortingChange: setSorting,
|
|
40
|
+
getCoreRowModel: getCoreRowModel(),
|
|
41
|
+
getSortedRowModel: getSortedRowModel(),
|
|
42
|
+
getFilteredRowModel: getFilteredRowModel(),
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div data-testid="data-grid">
|
|
47
|
+
<Toolbar table={table} />
|
|
48
|
+
<Table>
|
|
49
|
+
<TableHeader>{/* sortable headers */}</TableHeader>
|
|
50
|
+
<TableBody>{/* virtualized rows */}</TableBody>
|
|
51
|
+
</Table>
|
|
52
|
+
<Pagination table={table} />
|
|
53
|
+
</div>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
`,
|
|
57
|
+
},
|
|
58
|
+
"src/products/kanban.tsx": {
|
|
59
|
+
original: `export type KanbanCard = {
|
|
60
|
+
id: string
|
|
61
|
+
title: string
|
|
62
|
+
columnId: string
|
|
63
|
+
}
|
|
64
|
+
`,
|
|
65
|
+
modified: `export type KanbanCard = {
|
|
66
|
+
id: string
|
|
67
|
+
title: string
|
|
68
|
+
columnId: string
|
|
69
|
+
key?: string
|
|
70
|
+
assignee?: string
|
|
71
|
+
tags?: string[]
|
|
72
|
+
priority?: string
|
|
73
|
+
comments?: KanbanComment[]
|
|
74
|
+
}
|
|
75
|
+
`,
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
function DiffPlayground() {
|
|
80
|
+
const files = Object.keys(DIFFS) as (keyof typeof DIFFS)[];
|
|
81
|
+
const [file, setFile] = React.useState<(typeof files)[number]>(files[0]);
|
|
82
|
+
const [mode, setMode] = React.useState<"unified" | "split">("unified");
|
|
83
|
+
const current = DIFFS[file];
|
|
84
|
+
return (
|
|
85
|
+
<div className="space-y-2">
|
|
86
|
+
<div className="flex flex-wrap gap-1">
|
|
87
|
+
{files.map((name) => (
|
|
88
|
+
<Button
|
|
89
|
+
key={name}
|
|
90
|
+
size="sm"
|
|
91
|
+
variant={file === name ? "default" : "outline"}
|
|
92
|
+
onClick={() => setFile(name)}
|
|
93
|
+
>
|
|
94
|
+
{name.split("/").at(-1)}
|
|
95
|
+
</Button>
|
|
96
|
+
))}
|
|
97
|
+
<Button
|
|
98
|
+
size="sm"
|
|
99
|
+
variant="outline"
|
|
100
|
+
className="ml-auto"
|
|
101
|
+
data-testid="diff-mode-toggle"
|
|
102
|
+
onClick={() => setMode((m) => (m === "unified" ? "split" : "unified"))}
|
|
103
|
+
>
|
|
104
|
+
{mode}
|
|
105
|
+
</Button>
|
|
106
|
+
</div>
|
|
107
|
+
<DiffViewer fileName={file} original={current.original} modified={current.modified} mode={mode} />
|
|
108
|
+
</div>
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export default function MiscEditors01Example() {
|
|
113
|
+
return <DiffPlayground />;
|
|
114
|
+
}
|