@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,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf Scrollspy
|
|
3
|
+
* @title Scrollspy
|
|
4
|
+
* @scenario Section nav that highlights whichever section is currently in view — long settings/docs pages; wire it to element ids.
|
|
5
|
+
*/
|
|
6
|
+
import { Scrollspy } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function Scrollspy01Example() {
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<div className="grid grid-cols-[8rem_1fr] gap-4">
|
|
12
|
+
<Scrollspy
|
|
13
|
+
sections={[
|
|
14
|
+
{ id: "alpha", label: "Alpha" },
|
|
15
|
+
{ id: "beta", label: "Beta" },
|
|
16
|
+
]}
|
|
17
|
+
/>
|
|
18
|
+
<div className="h-32 overflow-auto text-sm">
|
|
19
|
+
<div id="alpha" className="h-24">
|
|
20
|
+
Alpha section
|
|
21
|
+
</div>
|
|
22
|
+
<div id="beta" className="h-24">
|
|
23
|
+
Beta section
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf Separator
|
|
3
|
+
* @title Separator
|
|
4
|
+
* @scenario Horizontal or vertical rule that inherits theme spacing, for splitting toolbar groups and metadata rows.
|
|
5
|
+
*/
|
|
6
|
+
import { Separator } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function Separator01Example() {
|
|
9
|
+
return <Separator />;
|
|
10
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf SettingsSplit
|
|
3
|
+
* @title SettingsSplit
|
|
4
|
+
* @scenario A settings page in a fixed-height panel: the jump list tracks the section you are reading, each side scrolls on its own, and the unsaved bar stays pinned to the content pane.
|
|
5
|
+
* @hint Scroll the sections — the nav highlight follows; edit a field and the save bar appears without the layout moving
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
|
|
9
|
+
import { Button, Input, NativeSelect, SettingsSplit } from "@monkey-mini-app/ui";
|
|
10
|
+
|
|
11
|
+
const GROUPS = [
|
|
12
|
+
{
|
|
13
|
+
id: "general",
|
|
14
|
+
label: "General",
|
|
15
|
+
description: "Name, timezone, first day of week",
|
|
16
|
+
rows: ["Display name", "Timezone"],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: "notify",
|
|
20
|
+
label: "Notifications",
|
|
21
|
+
description: "Where events land",
|
|
22
|
+
rows: ["Email", "Webhook URL"],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "data",
|
|
26
|
+
label: "Data",
|
|
27
|
+
description: "Retention and exports",
|
|
28
|
+
rows: ["Retention days", "Export format"],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: "danger",
|
|
32
|
+
label: "Danger zone",
|
|
33
|
+
description: "Irreversible, on purpose",
|
|
34
|
+
rows: ["Workspace slug"],
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
export default function SettingsSplit01Example() {
|
|
39
|
+
const [dirty, setDirty] = React.useState(false);
|
|
40
|
+
const edit = () => setDirty(true);
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<div className="h-[460px]">
|
|
44
|
+
<SettingsSplit
|
|
45
|
+
nav={<p className="text-sm font-medium">Workspace settings</p>}
|
|
46
|
+
sections={GROUPS.map((g) => ({
|
|
47
|
+
id: g.id,
|
|
48
|
+
label: g.label,
|
|
49
|
+
description: g.description,
|
|
50
|
+
content: (
|
|
51
|
+
<div className="flex flex-col gap-3">
|
|
52
|
+
{g.rows.map((r) => (
|
|
53
|
+
<label key={r} className="flex flex-col items-start gap-1 text-sm">
|
|
54
|
+
<span className="text-muted-foreground text-xs">{r}</span>
|
|
55
|
+
{r === "Export format" ? (
|
|
56
|
+
<NativeSelect onChange={edit}>
|
|
57
|
+
<option value="csv">CSV</option>
|
|
58
|
+
<option value="json">JSON</option>
|
|
59
|
+
</NativeSelect>
|
|
60
|
+
) : (
|
|
61
|
+
<Input defaultValue={r.toLowerCase().replace(/ /g, "-")} onChange={edit} />
|
|
62
|
+
)}
|
|
63
|
+
</label>
|
|
64
|
+
))}
|
|
65
|
+
</div>
|
|
66
|
+
),
|
|
67
|
+
}))}
|
|
68
|
+
footer={
|
|
69
|
+
dirty ? (
|
|
70
|
+
<div className="flex items-center gap-3">
|
|
71
|
+
<span className="text-muted-foreground text-sm">Unsaved changes</span>
|
|
72
|
+
<Button size="sm" onClick={() => setDirty(false)}>
|
|
73
|
+
Save
|
|
74
|
+
</Button>
|
|
75
|
+
<Button size="sm" variant="ghost" onClick={() => setDirty(false)}>
|
|
76
|
+
Discard
|
|
77
|
+
</Button>
|
|
78
|
+
</div>
|
|
79
|
+
) : undefined
|
|
80
|
+
}
|
|
81
|
+
/>
|
|
82
|
+
</div>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const JIRA_WIKI_SAMPLE = [
|
|
2
|
+
"h2. Expected Behavior",
|
|
3
|
+
"",
|
|
4
|
+
"Users manage bonded parts in LX with full lifecycle support and standard bonded part attributes (part number, effective dates, active flag, audit fields as applicable).",
|
|
5
|
+
"",
|
|
6
|
+
"MOCK UI: [^bonded-parts-prototype.html]",
|
|
7
|
+
"",
|
|
8
|
+
"h2. Acceptance Criteria",
|
|
9
|
+
"",
|
|
10
|
+
"URL: [https://wd-stg.teslamotors.com/warpgt/gt/warpglobaltrade]",
|
|
11
|
+
"* UI supports: create, update, delete, and review bonded parts records.",
|
|
12
|
+
"* UI supports: download bonded parts list to Excel.",
|
|
13
|
+
"* UI supports: bulk upload to add, update, and delete records (per defined template and validation rules).",
|
|
14
|
+
"* Search/filter by: Part Number, Active Flag, Effective From, Effective To.",
|
|
15
|
+
"* Role/permission model aligns with existing LX Warp Trade maintenance patterns (confirm with PM if new roles are needed).",
|
|
16
|
+
"",
|
|
17
|
+
"h2. Validation",
|
|
18
|
+
"",
|
|
19
|
+
"* Create/update/review: bonded parts records can be managed end-to-end in the LX UI.",
|
|
20
|
+
"* Excel download matches grid/filter selection; bulk upload succeeds for add/update/delete scenarios and surfaces validation errors clearly.",
|
|
21
|
+
"* Search filters return expected subsets for Part Number, Active Flag, Effective From, Effective To.",
|
|
22
|
+
"",
|
|
23
|
+
"h3. Open Questions",
|
|
24
|
+
"",
|
|
25
|
+
"-pending UI mockup and review the implementation detail-",
|
|
26
|
+
"",
|
|
27
|
+
"how to manage the user permissions?",
|
|
28
|
+
"",
|
|
29
|
+
"From Coco:",
|
|
30
|
+
"",
|
|
31
|
+
"_Just talked to Hailin, it's better to have a separate role and permission for this UI because very limited people in China Trade team will have edit permission. This also prevents from trade team members from other regions accidentally modify the record in this UI._",
|
|
32
|
+
"",
|
|
33
|
+
"|Role|Role Owner Approval?|Permission|",
|
|
34
|
+
"|WarpTradeBonedPartEdit|YES|Creation Delete Modification|",
|
|
35
|
+
"|WarpTradeBonedPartView|YES|Read Only|",
|
|
36
|
+
"",
|
|
37
|
+
"You can put me, Hailin, and Elaine Xie (谢靜芳) as the role owner for approval.",
|
|
38
|
+
].join("\n");
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf Skeleton
|
|
3
|
+
* @title Skeleton
|
|
4
|
+
* @scenario Loading placeholder shaped like the content that will replace it (cards/rows), avoiding layout jump on first paint.
|
|
5
|
+
*/
|
|
6
|
+
import { Skeleton } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function Skeleton01Example() {
|
|
9
|
+
return <Skeleton className="h-6 w-48" />;
|
|
10
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf Slider
|
|
3
|
+
* @title Slider / SliderRange
|
|
4
|
+
* @scenario One-handle range for 'pick a value' (thresholds, limits); SliderRange beside it for min–max filter pairs.
|
|
5
|
+
*/
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
|
|
8
|
+
import { Slider, SliderRange } from "@monkey-mini-app/ui";
|
|
9
|
+
|
|
10
|
+
export default function Slider01Example() {
|
|
11
|
+
const [range, setRange] = React.useState([20, 80]);
|
|
12
|
+
const [slider, setSlider] = React.useState([40]);
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<div className="flex max-w-sm flex-col gap-4">
|
|
17
|
+
<Slider value={slider} onValueChange={(v) => setSlider(Array.from(v as number[]))} />
|
|
18
|
+
<SliderRange value={range} onChange={setRange} />
|
|
19
|
+
</div>
|
|
20
|
+
</>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf SortableList
|
|
3
|
+
* @title SortableList
|
|
4
|
+
* @scenario Reorder by drag with the new order pushed back to state — priorities, playbooks, column order.
|
|
5
|
+
*/
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
|
|
8
|
+
import { type SortableItem, SortableList } from "@monkey-mini-app/ui";
|
|
9
|
+
|
|
10
|
+
export default function SortableList01Example() {
|
|
11
|
+
const [items, setItems] = React.useState<SortableItem[]>([
|
|
12
|
+
{ id: "1", label: "Alpha" },
|
|
13
|
+
{ id: "2", label: "Bravo" },
|
|
14
|
+
{ id: "3", label: "Charlie" },
|
|
15
|
+
]);
|
|
16
|
+
|
|
17
|
+
return <SortableList items={items} onChange={setItems} />;
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf Spinner
|
|
3
|
+
* @title Spinner
|
|
4
|
+
* @scenario Unknown-duration busy indicator inline in a button or row; prefer Progress when you can report percent.
|
|
5
|
+
*/
|
|
6
|
+
import { Spinner } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function Spinner01Example() {
|
|
9
|
+
return <Spinner />;
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf Stepper
|
|
3
|
+
* @title Stepper
|
|
4
|
+
* @scenario Multi-step flow (draft → review → ship) with completed/active/pending states, vertical and horizontal.
|
|
5
|
+
* @hint Vertical and horizontal
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
|
|
9
|
+
import { Stepper, StepperItem } from "@monkey-mini-app/ui";
|
|
10
|
+
|
|
11
|
+
export default function Stepper01Example() {
|
|
12
|
+
const [step, setStep] = React.useState(1);
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<div className="flex flex-col gap-6">
|
|
17
|
+
<Stepper>
|
|
18
|
+
<StepperItem
|
|
19
|
+
title="Draft"
|
|
20
|
+
description="Write the change"
|
|
21
|
+
status={step > 0 ? "completed" : "active"}
|
|
22
|
+
/>
|
|
23
|
+
<StepperItem
|
|
24
|
+
title="Review"
|
|
25
|
+
description="QA sign-off"
|
|
26
|
+
status={step > 1 ? "completed" : step === 1 ? "active" : "default"}
|
|
27
|
+
/>
|
|
28
|
+
<StepperItem title="Done" description="Shipped" status={step >= 2 ? "active" : "default"} />
|
|
29
|
+
</Stepper>
|
|
30
|
+
<Stepper orientation="horizontal">
|
|
31
|
+
<StepperItem title="Draft" status={step > 0 ? "completed" : "active"} />
|
|
32
|
+
<StepperItem title="Review" status={step > 1 ? "completed" : step === 1 ? "active" : "default"} />
|
|
33
|
+
<StepperItem title="Done" status={step >= 2 ? "active" : "default"} />
|
|
34
|
+
</Stepper>
|
|
35
|
+
</div>
|
|
36
|
+
<button type="button" className="mt-2 text-sm underline" onClick={() => setStep((s) => (s + 1) % 3)}>
|
|
37
|
+
Next step
|
|
38
|
+
</button>
|
|
39
|
+
</>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf Table
|
|
3
|
+
* @title Table
|
|
4
|
+
* @scenario Static, semantic table you lay out by hand — small fixed datasets; switch to DataGrid the moment you need sort/filter/pagination.
|
|
5
|
+
*/
|
|
6
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function Table01Example() {
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<Table>
|
|
12
|
+
<TableHeader>
|
|
13
|
+
<TableRow>
|
|
14
|
+
<TableHead>Col</TableHead>
|
|
15
|
+
</TableRow>
|
|
16
|
+
</TableHeader>
|
|
17
|
+
<TableBody>
|
|
18
|
+
<TableRow>
|
|
19
|
+
<TableCell>Row</TableCell>
|
|
20
|
+
</TableRow>
|
|
21
|
+
</TableBody>
|
|
22
|
+
</Table>
|
|
23
|
+
</>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf TablePage
|
|
3
|
+
* @title TablePage
|
|
4
|
+
* @scenario A wide table as the whole product: the filter bar stays pinned, only the grid scrolls, and ticking rows floats a bulk bar over the bottom without moving a single row.
|
|
5
|
+
* @hint Scroll the table — the toolbar stays put; select rows — the bar floats over the grid, it never pushes rows down
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
|
|
9
|
+
import { Checkbox, type ColumnDef, DataGrid, Input, TablePage } from "@monkey-mini-app/ui";
|
|
10
|
+
|
|
11
|
+
type Part = { sku: string; name: string; bin: string; qty: number };
|
|
12
|
+
|
|
13
|
+
const PARTS: Part[] = Array.from({ length: 60 }, (_, i) => ({
|
|
14
|
+
sku: `SKU-${2400 - i}`,
|
|
15
|
+
name: [
|
|
16
|
+
"Bracket, left-hand",
|
|
17
|
+
"Seal kit, 40 mm",
|
|
18
|
+
"Harness, 2 m shielded",
|
|
19
|
+
"Bearing, sealed 6204",
|
|
20
|
+
"Label cartridge, black",
|
|
21
|
+
][i % 5],
|
|
22
|
+
bin: `${String.fromCharCode(65 + (i % 6))}-${(i % 24) + 1}`,
|
|
23
|
+
qty: ((i * 37) % 480) + 4,
|
|
24
|
+
}));
|
|
25
|
+
|
|
26
|
+
export default function TablePage01Example() {
|
|
27
|
+
const [query, setQuery] = React.useState("");
|
|
28
|
+
const [picked, setPicked] = React.useState<Record<string, boolean>>({});
|
|
29
|
+
|
|
30
|
+
const rows = PARTS.filter(
|
|
31
|
+
(p) => !query || p.name.toLowerCase().includes(query.toLowerCase()) || p.sku.includes(query),
|
|
32
|
+
);
|
|
33
|
+
const count = Object.values(picked).filter(Boolean).length;
|
|
34
|
+
const allPicked = rows.length > 0 && rows.every((p) => picked[p.sku]);
|
|
35
|
+
|
|
36
|
+
const columns: ColumnDef<Part>[] = React.useMemo(
|
|
37
|
+
() => [
|
|
38
|
+
{
|
|
39
|
+
id: "pick",
|
|
40
|
+
header: () => (
|
|
41
|
+
<Checkbox
|
|
42
|
+
checked={allPicked}
|
|
43
|
+
onCheckedChange={(v) =>
|
|
44
|
+
setPicked(v === true ? Object.fromEntries(rows.map((p) => [p.sku, true])) : {})
|
|
45
|
+
}
|
|
46
|
+
aria-label="Select all"
|
|
47
|
+
/>
|
|
48
|
+
),
|
|
49
|
+
cell: ({ row }) => (
|
|
50
|
+
<Checkbox
|
|
51
|
+
checked={Boolean(picked[row.original.sku])}
|
|
52
|
+
onCheckedChange={(v) => setPicked((s) => ({ ...s, [row.original.sku]: v === true }))}
|
|
53
|
+
aria-label={`Pick ${row.original.sku}`}
|
|
54
|
+
/>
|
|
55
|
+
),
|
|
56
|
+
},
|
|
57
|
+
{ accessorKey: "sku", header: "SKU", meta: { sort: true } },
|
|
58
|
+
{ accessorKey: "name", header: "Part" },
|
|
59
|
+
{ accessorKey: "bin", header: "Bin", meta: { sort: true } },
|
|
60
|
+
{ accessorKey: "qty", header: "Qty", meta: { sort: true } },
|
|
61
|
+
],
|
|
62
|
+
[allPicked, picked, rows],
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<div className="h-[440px]">
|
|
67
|
+
<TablePage
|
|
68
|
+
toolbar={
|
|
69
|
+
<div className="flex items-center gap-2 border-b px-3 py-2">
|
|
70
|
+
<Input
|
|
71
|
+
value={query}
|
|
72
|
+
onChange={(e) => setQuery(e.target.value)}
|
|
73
|
+
placeholder="Filter by part or SKU…"
|
|
74
|
+
className="h-8 max-w-xs"
|
|
75
|
+
/>
|
|
76
|
+
<span className="text-muted-foreground text-xs tabular-nums">{rows.length} rows</span>
|
|
77
|
+
</div>
|
|
78
|
+
}
|
|
79
|
+
grid={<DataGrid columns={columns} data={rows} pageSize={12} features={{ pagination: true }} />}
|
|
80
|
+
bulk={
|
|
81
|
+
count > 0 ? (
|
|
82
|
+
<div className="bg-card border-border flex items-center gap-3 rounded-full border px-4 py-2 text-sm shadow-lg">
|
|
83
|
+
<span className="tabular-nums font-medium">{count} selected</span>
|
|
84
|
+
<button
|
|
85
|
+
type="button"
|
|
86
|
+
className="text-muted-foreground hover:text-foreground text-xs underline-offset-4 hover:underline"
|
|
87
|
+
>
|
|
88
|
+
Export
|
|
89
|
+
</button>
|
|
90
|
+
<button
|
|
91
|
+
type="button"
|
|
92
|
+
className="text-muted-foreground hover:text-foreground text-xs underline-offset-4 hover:underline"
|
|
93
|
+
onClick={() => setPicked({})}
|
|
94
|
+
>
|
|
95
|
+
Clear
|
|
96
|
+
</button>
|
|
97
|
+
</div>
|
|
98
|
+
) : undefined
|
|
99
|
+
}
|
|
100
|
+
/>
|
|
101
|
+
</div>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf TimePicker
|
|
3
|
+
* @title TimePicker
|
|
4
|
+
* @scenario Time-of-day only (no date) for windows like a daily cron or shift start.
|
|
5
|
+
*/
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
|
|
8
|
+
import { TimePicker } from "@monkey-mini-app/ui";
|
|
9
|
+
|
|
10
|
+
export default function TimePicker01Example() {
|
|
11
|
+
const [time, setTime] = React.useState("09:30");
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<>
|
|
15
|
+
<TimePicker value={time} onChange={setTime} />
|
|
16
|
+
<p className="text-muted-foreground mt-2 text-xs">{time || "empty"}</p>
|
|
17
|
+
</>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf TimeRangePicker
|
|
3
|
+
* @title TimeRangePicker
|
|
4
|
+
* @scenario Start/end time-of-day pair, e.g. a maintenance window inside one day.
|
|
5
|
+
*/
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
|
|
8
|
+
import { TimeRangePicker } from "@monkey-mini-app/ui";
|
|
9
|
+
|
|
10
|
+
export default function TimeRangePicker01Example() {
|
|
11
|
+
const [timeRange, setTimeRange] = React.useState({ start: "09:00", end: "18:00" });
|
|
12
|
+
|
|
13
|
+
return <TimeRangePicker value={timeRange} onChange={setTimeRange} />;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf Timeline
|
|
3
|
+
* @title Timeline
|
|
4
|
+
* @scenario Chronological feed of events with actor + timestamp — deploy history, audit trail (compare RunTimeline for one job's steps).
|
|
5
|
+
*/
|
|
6
|
+
import { Timeline } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function Timeline01Example() {
|
|
9
|
+
return (
|
|
10
|
+
<Timeline
|
|
11
|
+
items={[
|
|
12
|
+
{ id: "1", title: "Opened", time: "10:00" },
|
|
13
|
+
{ id: "2", title: "Running", time: "10:02" },
|
|
14
|
+
{ id: "3", title: "Passed", time: "10:04" },
|
|
15
|
+
]}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf TimezoneSelect
|
|
3
|
+
* @title TimezoneSelect
|
|
4
|
+
* @scenario IANA timezone chosen from common zones first, searchable — pair with DateTimePicker when schedules cross regions.
|
|
5
|
+
* @hint Common zones first; type to search the rest
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
|
|
9
|
+
import { TimezoneSelect } from "@monkey-mini-app/ui";
|
|
10
|
+
|
|
11
|
+
export default function TimezoneSelect01Example() {
|
|
12
|
+
const [zone, setZone] = React.useState("Asia/Shanghai");
|
|
13
|
+
|
|
14
|
+
return <TimezoneSelect value={zone} onChange={setZone} />;
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf Toggle
|
|
3
|
+
* @title Toggle
|
|
4
|
+
* @scenario Single pressed/unpressed icon button (bold, mute) — one binary view option, not a form value; use Switch for settings on/off.
|
|
5
|
+
*/
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
|
|
8
|
+
import { Toggle } from "@monkey-mini-app/ui";
|
|
9
|
+
|
|
10
|
+
export default function Toggle01Example() {
|
|
11
|
+
const [pressed, setPressed] = React.useState(false);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<>
|
|
15
|
+
<Toggle pressed={pressed} onPressedChange={setPressed}>
|
|
16
|
+
Bold
|
|
17
|
+
</Toggle>
|
|
18
|
+
</>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf ToggleGroup
|
|
3
|
+
* @title ToggleGroup
|
|
4
|
+
* @scenario Mutually exclusive set of Toggle buttons for a view choice (alignment, density) held as one value.
|
|
5
|
+
*/
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
|
|
8
|
+
import { ToggleGroup, ToggleGroupItem } from "@monkey-mini-app/ui";
|
|
9
|
+
|
|
10
|
+
export default function ToggleGroup01Example() {
|
|
11
|
+
const [align, setAlign] = React.useState("left");
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<>
|
|
15
|
+
<ToggleGroup value={[align]} onValueChange={(v) => v[0] && setAlign(v[0])}>
|
|
16
|
+
<ToggleGroupItem value="left">Left</ToggleGroupItem>
|
|
17
|
+
<ToggleGroupItem value="center">Center</ToggleGroupItem>
|
|
18
|
+
<ToggleGroupItem value="right">Right</ToggleGroupItem>
|
|
19
|
+
</ToggleGroup>
|
|
20
|
+
</>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf TreeView
|
|
3
|
+
* @title TreeView
|
|
4
|
+
* @scenario Nested hierarchy with expand/collapse and selection — file tree, org chart, category taxonomy.
|
|
5
|
+
*/
|
|
6
|
+
import { TreeView } from "@monkey-mini-app/ui";
|
|
7
|
+
|
|
8
|
+
export default function TreeView01Example() {
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<TreeView
|
|
12
|
+
nodes={[
|
|
13
|
+
{
|
|
14
|
+
id: "src",
|
|
15
|
+
label: "src",
|
|
16
|
+
children: [
|
|
17
|
+
{ id: "app", label: "App.tsx" },
|
|
18
|
+
{ id: "ui", label: "ui.ts" },
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
]}
|
|
22
|
+
/>
|
|
23
|
+
</>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @exampleOf WizardShell
|
|
3
|
+
* @title WizardShell
|
|
4
|
+
* @scenario Three-step import in a fixed-height panel: the step rail tracks progress, the body scrolls, and Back/Next stay exactly where they were across every step change.
|
|
5
|
+
* @hint Step 2 starts invalid — Next is disabled until the mapping is filled in
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
|
|
9
|
+
import { Button, Input, WizardShell } from "@monkey-mini-app/ui";
|
|
10
|
+
|
|
11
|
+
export default function WizardShell01Example() {
|
|
12
|
+
const [step, setStep] = React.useState(0);
|
|
13
|
+
const [file, setFile] = React.useState("");
|
|
14
|
+
const [mapped, setMapped] = React.useState("");
|
|
15
|
+
|
|
16
|
+
const steps = [
|
|
17
|
+
{ id: "pick", label: "Choose file", valid: file.trim().length > 0 },
|
|
18
|
+
{ id: "map", label: "Map columns", valid: mapped.trim().length > 0 },
|
|
19
|
+
{ id: "run", label: "Import", valid: true },
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const body =
|
|
23
|
+
step === 0 ? (
|
|
24
|
+
<div className="flex flex-col gap-3">
|
|
25
|
+
<p className="text-muted-foreground text-sm">A workbook already on this machine.</p>
|
|
26
|
+
<Input placeholder="ledger-2026-09.xlsx" value={file} onChange={(e) => setFile(e.target.value)} />
|
|
27
|
+
</div>
|
|
28
|
+
) : step === 1 ? (
|
|
29
|
+
<div className="flex flex-col gap-3">
|
|
30
|
+
<p className="text-muted-foreground text-sm">
|
|
31
|
+
Which column is the account id? Required before the import can run.
|
|
32
|
+
</p>
|
|
33
|
+
<Input placeholder="account_id" value={mapped} onChange={(e) => setMapped(e.target.value)} />
|
|
34
|
+
</div>
|
|
35
|
+
) : (
|
|
36
|
+
<div className="flex flex-col gap-3">
|
|
37
|
+
<p className="text-sm">
|
|
38
|
+
Import <b>{file}</b>, mapping account from <b>{mapped}</b>.
|
|
39
|
+
</p>
|
|
40
|
+
<Button variant="outline" size="sm" className="w-fit">
|
|
41
|
+
Advanced options
|
|
42
|
+
</Button>
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<div className="h-[420px]">
|
|
48
|
+
<WizardShell
|
|
49
|
+
steps={steps}
|
|
50
|
+
index={step}
|
|
51
|
+
body={body}
|
|
52
|
+
onBack={() => setStep((s) => Math.max(0, s - 1))}
|
|
53
|
+
onNext={() => setStep((s) => Math.min(steps.length - 1, s + 1))}
|
|
54
|
+
onSubmit={() => setStep(0)}
|
|
55
|
+
/>
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
@@ -1,10 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Versioning (one lightweight history per app)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The host keeps a per-app commit tree via isomorphic-git (`runtime/apps/<appId>/.git`).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- list commits 是树 ≈ git log
|
|
7
|
-
- revert ≈ 从某 commit **分叉**,旁支还在
|
|
8
|
-
- 单分支,不要做 merge
|
|
5
|
+
## When a commit happens
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
`mini_app_edit` / `mini_app_write` / `mini_app_delete` **auto-commit** by default; a successful `mini_app_reload` with a dirty worktree commits too. So the normal flow needs no manual commit.
|
|
8
|
+
|
|
9
|
+
Explicit control:
|
|
10
|
+
|
|
11
|
+
| Tool | Purpose |
|
|
12
|
+
|---|---|
|
|
13
|
+
| `mini_app_history_commit({ appId, message })` | Close out a batch you made with `commit: false`; `message` is required |
|
|
14
|
+
| `mini_app_history_list({ appId })` | List the commit tree (nodes + parentIds) — like `git log` |
|
|
15
|
+
| `mini_app_history_revert({ appId, commitId })` | **Forward** commit undoing an older one (`git revert` semantics); history stays |
|
|
16
|
+
| `mini_app_history_reset({ appId, commitId })` | Point main back at a commit and keep a backup ref — like `git reset`; **does not delete objects** |
|
|
17
|
+
|
|
18
|
+
Commit once after each round of work on an app (especially after a large AI-driven change) so a bad edit is recoverable.
|
|
19
|
+
|
|
20
|
+
## Differences from git (don't apply git instincts)
|
|
21
|
+
|
|
22
|
+
- **Single branch**: main only. Do not expect merge / rebase / cherry-pick.
|
|
23
|
+
- **Full snapshots**: `mini_app_history_commit` keeps the whole tree; do not treat "delete snapshots" as `git gc`.
|
|
24
|
+
- After `reset`, the old commits still exist (visible as a backup tip) — nothing was erased.
|
|
25
|
+
- `revert` creates a **new** commit, so the tree grows a side branch; that is not "history removed".
|
|
26
|
+
- Snapshots exclude `storage/`, `.git/`, `node_modules/` (they were never source files).
|