@monkey-mini-app/ui 0.1.1 → 0.1.5
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 +12 -6
- package/dist/globals.css +1 -1
- package/dist/index.js +12 -2
- package/dist/manifest.json +6 -6
- package/dist/runtime.js +9 -0
- package/dist/sdk.js +158 -0
- package/dist/src/blocks/activity-feed.tsx +7 -0
- package/dist/src/blocks/app-shell.tsx +1 -0
- package/dist/src/blocks/attachment-gallery.tsx +7 -0
- package/dist/src/blocks/bar-chart.tsx +11 -0
- package/dist/src/blocks/comment-thread.tsx +7 -0
- package/dist/src/blocks/dashboard-shell.tsx +109 -0
- package/dist/src/blocks/description-list.tsx +7 -0
- package/dist/src/blocks/detail-panel.tsx +1 -0
- package/dist/src/blocks/donut-chart.tsx +7 -0
- package/dist/src/blocks/env-badge.tsx +7 -0
- package/dist/src/blocks/env-table.tsx +316 -0
- package/dist/src/blocks/file-tree.tsx +7 -0
- package/dist/src/blocks/filter-bar.tsx +1 -0
- package/dist/src/blocks/form-sheet.tsx +160 -0
- package/dist/src/blocks/gauge.tsx +7 -0
- package/dist/src/blocks/list-detail.tsx +121 -0
- package/dist/src/blocks/notification-center.tsx +7 -0
- package/dist/src/blocks/page-header.tsx +1 -0
- package/dist/src/blocks/progress-ring.tsx +7 -0
- package/dist/src/blocks/radar-chart.tsx +7 -0
- package/dist/src/blocks/request-inspector.tsx +7 -0
- package/dist/src/blocks/reveal.tsx +56 -0
- package/dist/src/blocks/run-timeline.tsx +7 -0
- package/dist/src/blocks/scrollspy.tsx +7 -0
- package/dist/src/blocks/settings-split.tsx +154 -0
- package/dist/src/blocks/severity-chip.tsx +7 -0
- package/dist/src/blocks/sparkline.tsx +7 -0
- package/dist/src/blocks/stat-card.tsx +1 -0
- package/dist/src/blocks/status-badge.tsx +1 -0
- package/dist/src/blocks/table-page.tsx +83 -0
- package/dist/src/blocks/terminal.tsx +21 -3
- package/dist/src/blocks/test-step-list.tsx +7 -0
- package/dist/src/blocks/trend-card.tsx +7 -0
- package/dist/src/blocks/wizard-shell.tsx +132 -0
- package/dist/src/cdn-modules.d.ts +5 -0
- package/dist/src/components/accordion.tsx +7 -0
- package/dist/src/components/alert-dialog.tsx +7 -0
- package/dist/src/components/alert.tsx +7 -0
- package/dist/src/components/aspect-ratio.tsx +4 -0
- package/dist/src/components/attachment.tsx +4 -0
- package/dist/src/components/avatar.tsx +4 -0
- package/dist/src/components/badge.tsx +7 -0
- package/dist/src/components/breadcrumb.tsx +4 -0
- package/dist/src/components/bubble.tsx +4 -0
- package/dist/src/components/button-group.tsx +6 -0
- package/dist/src/components/button.tsx +7 -0
- package/dist/src/components/calendar.tsx +4 -0
- package/dist/src/components/card.tsx +8 -1
- package/dist/src/components/chart.tsx +7 -0
- package/dist/src/components/checkbox.tsx +5 -0
- package/dist/src/components/collapsible.tsx +4 -0
- package/dist/src/components/combobox.tsx +4 -0
- package/dist/src/components/command.tsx +6 -0
- package/dist/src/components/context-menu.tsx +4 -0
- package/dist/src/components/dialog.tsx +21 -0
- package/dist/src/components/drawer.tsx +4 -0
- package/dist/src/components/dropdown-menu.tsx +7 -0
- package/dist/src/components/empty.tsx +7 -0
- package/dist/src/components/field.tsx +6 -0
- package/dist/src/components/hover-card.tsx +4 -0
- package/dist/src/components/input-group.tsx +4 -0
- package/dist/src/components/input.tsx +7 -0
- package/dist/src/components/item.tsx +4 -0
- package/dist/src/components/kbd.tsx +4 -0
- package/dist/src/components/label.tsx +7 -0
- package/dist/src/components/marker.tsx +4 -0
- package/dist/src/components/menubar.tsx +4 -0
- package/dist/src/components/message-scroller.tsx +4 -0
- package/dist/src/components/message.tsx +4 -0
- package/dist/src/components/native-select.tsx +4 -0
- package/dist/src/components/navigation-menu.tsx +4 -0
- package/dist/src/components/pagination.tsx +4 -0
- package/dist/src/components/popover.tsx +7 -0
- package/dist/src/components/progress.tsx +7 -0
- package/dist/src/components/questionnaire.tsx +4 -0
- package/dist/src/components/radio-group.tsx +4 -0
- package/dist/src/components/resizable.tsx +7 -0
- package/dist/src/components/scroll-area.tsx +4 -0
- package/dist/src/components/select.tsx +7 -0
- package/dist/src/components/separator.tsx +5 -0
- package/dist/src/components/sheet.tsx +22 -0
- package/dist/src/components/sidebar.tsx +4 -0
- package/dist/src/components/skeleton.tsx +7 -0
- package/dist/src/components/slider.tsx +4 -0
- package/dist/src/components/spinner.tsx +6 -0
- package/dist/src/components/switch.tsx +7 -0
- package/dist/src/components/table.tsx +7 -0
- package/dist/src/components/tabs.tsx +7 -0
- package/dist/src/components/textarea.tsx +7 -0
- package/dist/src/components/toast.tsx +7 -0
- package/dist/src/components/toggle-group.tsx +4 -0
- package/dist/src/components/toggle.tsx +4 -0
- package/dist/src/components/tooltip.tsx +7 -0
- package/dist/src/composites/autocomplete.tsx +7 -0
- package/dist/src/composites/cascader.tsx +7 -0
- package/dist/src/composites/color-picker.tsx +7 -0
- package/dist/src/composites/confirm-dialog.tsx +7 -0
- package/dist/src/composites/copyable.tsx +9 -1
- package/dist/src/composites/currency-input.tsx +7 -0
- package/dist/src/composites/date-picker.tsx +7 -0
- package/dist/src/composites/date-range-picker.tsx +4 -0
- package/dist/src/composites/date-time-picker.tsx +7 -0
- package/dist/src/composites/date-time-range-picker.tsx +7 -0
- package/dist/src/composites/duration-input.tsx +7 -0
- package/dist/src/composites/mini-calendar.tsx +7 -0
- package/dist/src/composites/number-field.tsx +7 -0
- package/dist/src/composites/password-field.tsx +7 -0
- package/dist/src/composites/phone-input.tsx +7 -0
- package/dist/src/composites/rating.tsx +7 -0
- package/dist/src/composites/relative-date-picker.tsx +7 -0
- package/dist/src/composites/search-input.tsx +7 -0
- package/dist/src/composites/slider-range.tsx +7 -0
- package/dist/src/composites/tag-input.tsx +7 -0
- package/dist/src/composites/time-picker.tsx +11 -1
- package/dist/src/composites/time-range-picker.tsx +7 -0
- package/dist/src/composites/timezone-select.tsx +7 -0
- package/dist/src/composites/transfer.tsx +7 -0
- package/dist/src/composites/user-picker.tsx +7 -0
- package/dist/src/hooks/use-html-dark.ts +37 -0
- package/dist/src/hooks/use-mobile.ts +3 -0
- package/dist/src/i18n/en.ts +109 -2
- package/dist/src/i18n/zh.ts +99 -2
- package/dist/src/index.ts +147 -134
- package/dist/src/lib/clipboard.ts +10 -0
- package/dist/src/lib/illustrations.tsx +2 -2
- package/dist/src/products/code-block.tsx +35 -18
- package/dist/src/products/code-editor.tsx +156 -24
- package/dist/src/products/commit-graph.tsx +644 -0
- package/dist/src/products/data-grid.tsx +2 -1
- package/dist/src/products/diff-viewer.tsx +104 -8
- package/dist/src/products/event-calendar.tsx +28 -823
- package/dist/src/products/file-dropzone.tsx +7 -0
- package/dist/src/products/full-calendar/animations.ts +38 -0
- package/dist/src/products/full-calendar/calendar-body.tsx +77 -0
- package/dist/src/products/full-calendar/constants.ts +10 -0
- package/dist/src/products/full-calendar/contexts/calendar-context.tsx +255 -0
- package/dist/src/products/full-calendar/contexts/dnd-context.tsx +157 -0
- package/dist/src/products/full-calendar/dialogs/add-edit-event-dialog.tsx +187 -0
- package/dist/src/products/full-calendar/dialogs/delete-event-dialog.tsx +39 -0
- package/dist/src/products/full-calendar/dialogs/event-details-dialog.tsx +100 -0
- package/dist/src/products/full-calendar/dialogs/events-list-dialog.tsx +87 -0
- package/dist/src/products/full-calendar/dnd/draggable-event.tsx +45 -0
- package/dist/src/products/full-calendar/dnd/droppable-area.tsx +45 -0
- package/dist/src/products/full-calendar/dnd/resizable-event.tsx +179 -0
- package/dist/src/products/full-calendar/header/calendar-header.tsx +65 -0
- package/dist/src/products/full-calendar/header/date-navigator.tsx +110 -0
- package/dist/src/products/full-calendar/header/filter.tsx +58 -0
- package/dist/src/products/full-calendar/header/today-button.tsx +45 -0
- package/dist/src/products/full-calendar/header/user-select.tsx +64 -0
- package/dist/src/products/full-calendar/header/view-tabs.tsx +36 -0
- package/dist/src/products/full-calendar/helpers.ts +453 -0
- package/dist/src/products/full-calendar/hooks/use-time-range-create.ts +152 -0
- package/dist/src/products/full-calendar/hooks.ts +70 -0
- package/dist/src/products/full-calendar/interfaces.ts +23 -0
- package/dist/src/products/full-calendar/settings/settings.tsx +80 -0
- package/dist/src/products/full-calendar/shims/avatar-group.tsx +16 -0
- package/dist/src/products/full-calendar/shims/day-picker.tsx +1 -0
- package/dist/src/products/full-calendar/shims/motion.tsx +97 -0
- package/dist/src/products/full-calendar/shims/next-themes.ts +6 -0
- package/dist/src/products/full-calendar/shims/re-resizable.tsx +25 -0
- package/dist/src/products/full-calendar/shims/sonner.ts +4 -0
- package/dist/src/products/full-calendar/types.ts +8 -0
- package/dist/src/products/full-calendar/views/agenda-view/agenda-events.tsx +140 -0
- package/dist/src/products/full-calendar/views/month-view/calendar-month-view.tsx +69 -0
- package/dist/src/products/full-calendar/views/month-view/day-cell.tsx +201 -0
- package/dist/src/products/full-calendar/views/month-view/event-bullet.tsx +40 -0
- package/dist/src/products/full-calendar/views/month-view/month-event-badge.tsx +143 -0
- package/dist/src/products/full-calendar/views/week-and-day-view/calendar-day-view.tsx +295 -0
- package/dist/src/products/full-calendar/views/week-and-day-view/calendar-time-line.tsx +35 -0
- package/dist/src/products/full-calendar/views/week-and-day-view/calendar-week-view.tsx +253 -0
- package/dist/src/products/full-calendar/views/week-and-day-view/day-view-multi-day-events-row.tsx +73 -0
- package/dist/src/products/full-calendar/views/week-and-day-view/event-block.tsx +114 -0
- package/dist/src/products/full-calendar/views/week-and-day-view/render-grouped-events.tsx +49 -0
- package/dist/src/products/full-calendar/views/week-and-day-view/week-view-multi-day-events-row.tsx +143 -0
- package/dist/src/products/full-calendar/views/year-view/calendar-year-view.tsx +161 -0
- package/dist/src/products/gantt.tsx +7 -0
- package/dist/src/products/jira-wiki.tsx +1 -0
- package/dist/src/products/jql-input.tsx +340 -37
- package/dist/src/products/json-viewer.tsx +7 -0
- package/dist/src/products/kanban-issue-panel.tsx +7 -0
- package/dist/src/products/kanban.tsx +1 -0
- package/dist/src/products/log-viewer.tsx +390 -18
- package/dist/src/products/markdown-editor.tsx +21 -6
- package/dist/src/products/markdown.tsx +7 -0
- package/dist/src/products/rich-text-editor.tsx +65 -59
- package/dist/src/products/sortable-list.tsx +7 -0
- package/dist/src/products/stepper.tsx +219 -70
- package/dist/src/products/timeline.tsx +7 -0
- package/dist/src/products/tree-view.tsx +7 -0
- package/dist/src/sdk/app-error-boundary.tsx +240 -0
- package/dist/src/sdk/app-id.ts +7 -0
- package/dist/src/sdk/use-app.ts +126 -0
- package/dist/src/styles/globals.css +1 -0
- package/dist/vendors/lodash.js +20 -0
- package/dist/vendors/motion.js +12 -0
- package/package.json +20 -19
- package/dist/src/products/jql-language.ts +0 -70
package/dist/src/index.ts
CHANGED
|
@@ -1,134 +1,147 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./components/
|
|
8
|
-
export * from "./components/
|
|
9
|
-
export * from "./components/
|
|
10
|
-
export * from "./components/
|
|
11
|
-
export * from "./components/
|
|
12
|
-
export * from "./components/
|
|
13
|
-
export * from "./components/
|
|
14
|
-
export * from "./components/
|
|
15
|
-
export * from "./components/
|
|
16
|
-
export * from "./components/
|
|
17
|
-
export * from "./components/
|
|
18
|
-
export * from "./components/
|
|
19
|
-
export * from "./components/
|
|
20
|
-
export * from "./components/
|
|
21
|
-
export * from "./components/
|
|
22
|
-
export * from "./components/
|
|
23
|
-
export * from "./components/
|
|
24
|
-
export * from "./components/
|
|
25
|
-
export * from "./components/
|
|
26
|
-
export * from "./components/
|
|
27
|
-
export * from "./components/
|
|
28
|
-
export * from "./components/
|
|
29
|
-
export * from "./components/
|
|
30
|
-
export * from "./components/
|
|
31
|
-
export * from "./components/
|
|
32
|
-
export * from "./components/
|
|
33
|
-
export * from "./components/
|
|
34
|
-
export * from "./components/
|
|
35
|
-
export * from "./components/
|
|
36
|
-
export * from "./components/
|
|
37
|
-
export * from "./components/
|
|
38
|
-
export * from "./components/
|
|
39
|
-
export * from "./components/
|
|
40
|
-
export * from "./components/
|
|
41
|
-
export * from "./components/
|
|
42
|
-
export * from "./components/
|
|
43
|
-
export * from "./components/
|
|
44
|
-
export * from "./components/
|
|
45
|
-
export * from "./components/
|
|
46
|
-
export * from "./components/
|
|
47
|
-
export * from "./components/
|
|
48
|
-
export * from "./components/
|
|
49
|
-
export * from "./components/
|
|
50
|
-
export * from "./components/
|
|
51
|
-
export * from "./components/
|
|
52
|
-
export * from "./components/
|
|
53
|
-
export * from "./components/
|
|
54
|
-
export * from "./components/
|
|
55
|
-
export * from "./components/
|
|
56
|
-
export * from "./components/
|
|
57
|
-
export * from "./components/
|
|
58
|
-
export * from "./components/
|
|
59
|
-
export * from "./components/
|
|
60
|
-
export * from "./components/
|
|
61
|
-
export * from "./components/
|
|
62
|
-
export * from "./
|
|
63
|
-
export * from "./
|
|
64
|
-
export * from "./
|
|
65
|
-
export * from "./composites/
|
|
66
|
-
export * from "./composites/
|
|
67
|
-
export * from "./composites/
|
|
68
|
-
export * from "./composites/
|
|
69
|
-
export * from "./composites/
|
|
70
|
-
export * from "./composites/
|
|
71
|
-
export * from "./composites/date-
|
|
72
|
-
export * from "./composites/
|
|
73
|
-
export * from "./composites/
|
|
74
|
-
export * from "./composites/
|
|
75
|
-
export * from "./composites/
|
|
76
|
-
export * from "./composites/
|
|
77
|
-
export * from "./composites/
|
|
78
|
-
export * from "./composites/
|
|
79
|
-
export * from "./composites/
|
|
80
|
-
export * from "./composites/
|
|
81
|
-
export * from "./composites/
|
|
82
|
-
export * from "./composites/
|
|
83
|
-
export * from "./composites/
|
|
84
|
-
export * from "./composites/
|
|
85
|
-
export * from "./composites/
|
|
86
|
-
export * from "./composites/
|
|
87
|
-
export * from "./
|
|
88
|
-
export * from "./
|
|
89
|
-
export * from "./
|
|
90
|
-
export * from "./products/
|
|
91
|
-
export * from "./products/
|
|
92
|
-
export * from "./products/
|
|
93
|
-
export * from "./products/
|
|
94
|
-
export * from "./products/
|
|
95
|
-
export * from "./products/
|
|
96
|
-
export * from "./products/
|
|
97
|
-
export * from "./products/
|
|
98
|
-
export * from "./products/
|
|
99
|
-
export * from "./products/
|
|
100
|
-
export * from "./products/
|
|
101
|
-
export * from "./products/
|
|
102
|
-
export * from "./products/
|
|
103
|
-
export * from "./products/
|
|
104
|
-
export * from "./products/
|
|
105
|
-
export * from "./products/
|
|
106
|
-
export * from "./products/
|
|
107
|
-
export * from "./products/
|
|
108
|
-
export * from "./products/
|
|
109
|
-
export * from "./
|
|
110
|
-
export * from "./
|
|
111
|
-
export * from "./
|
|
112
|
-
export * from "./
|
|
113
|
-
export * from "./blocks/
|
|
114
|
-
export * from "./blocks/
|
|
115
|
-
export * from "./blocks/
|
|
116
|
-
export * from "./blocks/
|
|
117
|
-
export * from "./blocks/
|
|
118
|
-
export * from "./blocks/
|
|
119
|
-
export * from "./blocks/
|
|
120
|
-
export * from "./blocks/
|
|
121
|
-
export * from "./blocks/
|
|
122
|
-
export * from "./blocks/
|
|
123
|
-
export * from "./blocks/
|
|
124
|
-
export * from "./blocks/
|
|
125
|
-
export * from "./blocks/
|
|
126
|
-
export * from "./blocks/
|
|
127
|
-
export * from "./blocks/
|
|
128
|
-
export * from "./blocks/
|
|
129
|
-
export * from "./blocks/
|
|
130
|
-
export * from "./blocks/
|
|
131
|
-
export * from "./blocks/
|
|
132
|
-
export * from "./blocks/
|
|
133
|
-
export * from "./blocks/
|
|
134
|
-
export * from "./blocks/
|
|
1
|
+
/// <reference path="./cdn-modules.d.ts" />
|
|
2
|
+
export { AppRuntime, useApp } from "./sdk/use-app";
|
|
3
|
+
export { AppErrorBoundary, reportAppError } from "./sdk/app-error-boundary";
|
|
4
|
+
export * from "./lib/utils";
|
|
5
|
+
export * from "./lib/icons";
|
|
6
|
+
export * from "./i18n/context";
|
|
7
|
+
export * from "./components/accordion";
|
|
8
|
+
export * from "./components/alert-dialog";
|
|
9
|
+
export * from "./components/alert";
|
|
10
|
+
export * from "./components/aspect-ratio";
|
|
11
|
+
export * from "./components/attachment";
|
|
12
|
+
export * from "./components/avatar";
|
|
13
|
+
export * from "./components/badge";
|
|
14
|
+
export * from "./components/breadcrumb";
|
|
15
|
+
export * from "./components/bubble";
|
|
16
|
+
export * from "./components/button-group";
|
|
17
|
+
export * from "./components/button";
|
|
18
|
+
export * from "./components/calendar";
|
|
19
|
+
export * from "./components/card";
|
|
20
|
+
export * from "./components/chart";
|
|
21
|
+
export * from "./components/checkbox";
|
|
22
|
+
export * from "./components/collapsible";
|
|
23
|
+
export * from "./components/combobox";
|
|
24
|
+
export * from "./components/command";
|
|
25
|
+
export * from "./components/context-menu";
|
|
26
|
+
export * from "./components/dialog";
|
|
27
|
+
export * from "./components/drawer";
|
|
28
|
+
export * from "./components/dropdown-menu";
|
|
29
|
+
export * from "./components/empty";
|
|
30
|
+
export * from "./components/field";
|
|
31
|
+
export * from "./components/hover-card";
|
|
32
|
+
export * from "./components/input-group";
|
|
33
|
+
export * from "./components/input";
|
|
34
|
+
export * from "./components/item";
|
|
35
|
+
export * from "./components/kbd";
|
|
36
|
+
export * from "./components/label";
|
|
37
|
+
export * from "./components/marker";
|
|
38
|
+
export * from "./components/menubar";
|
|
39
|
+
export * from "./components/message-scroller";
|
|
40
|
+
export * from "./components/message";
|
|
41
|
+
export * from "./components/native-select";
|
|
42
|
+
export * from "./components/navigation-menu";
|
|
43
|
+
export * from "./components/pagination";
|
|
44
|
+
export * from "./components/popover";
|
|
45
|
+
export * from "./components/progress";
|
|
46
|
+
export * from "./components/questionnaire";
|
|
47
|
+
export * from "./components/radio-group";
|
|
48
|
+
export * from "./components/resizable";
|
|
49
|
+
export * from "./components/scroll-area";
|
|
50
|
+
export * from "./components/select";
|
|
51
|
+
export * from "./components/separator";
|
|
52
|
+
export * from "./components/sheet";
|
|
53
|
+
export * from "./components/sidebar";
|
|
54
|
+
export * from "./components/skeleton";
|
|
55
|
+
export * from "./components/slider";
|
|
56
|
+
export * from "./components/spinner";
|
|
57
|
+
export * from "./components/switch";
|
|
58
|
+
export * from "./components/table";
|
|
59
|
+
export * from "./components/tabs";
|
|
60
|
+
export * from "./components/textarea";
|
|
61
|
+
export * from "./components/toast";
|
|
62
|
+
export * from "./components/toggle-group";
|
|
63
|
+
export * from "./components/toggle";
|
|
64
|
+
export * from "./components/tooltip";
|
|
65
|
+
export * from "./composites/autocomplete";
|
|
66
|
+
export * from "./composites/cascader";
|
|
67
|
+
export * from "./composites/color-picker";
|
|
68
|
+
export * from "./composites/confirm-dialog";
|
|
69
|
+
export * from "./composites/copyable";
|
|
70
|
+
export * from "./composites/currency-input";
|
|
71
|
+
export * from "./composites/date-picker";
|
|
72
|
+
export * from "./composites/date-range-picker";
|
|
73
|
+
export * from "./composites/date-time-picker";
|
|
74
|
+
export * from "./composites/date-time-range-picker";
|
|
75
|
+
export * from "./composites/duration-input";
|
|
76
|
+
export * from "./composites/mini-calendar";
|
|
77
|
+
export * from "./composites/number-field";
|
|
78
|
+
export * from "./composites/password-field";
|
|
79
|
+
export * from "./composites/phone-input";
|
|
80
|
+
export * from "./composites/rating";
|
|
81
|
+
export * from "./composites/relative-date-picker";
|
|
82
|
+
export * from "./composites/search-input";
|
|
83
|
+
export * from "./composites/slider-range";
|
|
84
|
+
export * from "./composites/tag-input";
|
|
85
|
+
export * from "./composites/time-picker";
|
|
86
|
+
export * from "./composites/time-range-picker";
|
|
87
|
+
export * from "./composites/timezone-select";
|
|
88
|
+
export * from "./composites/transfer";
|
|
89
|
+
export * from "./composites/user-picker";
|
|
90
|
+
export * from "./products/cells";
|
|
91
|
+
export * from "./products/code-block";
|
|
92
|
+
export * from "./products/code-editor";
|
|
93
|
+
export * from "./products/commit-graph";
|
|
94
|
+
export * from "./products/data-grid";
|
|
95
|
+
export * from "./products/diff-viewer";
|
|
96
|
+
export * from "./products/markdown";
|
|
97
|
+
export * from "./products/markdown-editor";
|
|
98
|
+
export * from "./products/rich-text-editor";
|
|
99
|
+
export * from "./products/event-calendar";
|
|
100
|
+
export * from "./products/export-csv";
|
|
101
|
+
export * from "./products/file-dropzone";
|
|
102
|
+
export * from "./products/gantt";
|
|
103
|
+
export * from "./products/json-viewer";
|
|
104
|
+
export * from "./products/jira-wiki";
|
|
105
|
+
export * from "./products/jql-input";
|
|
106
|
+
export * from "./products/kanban";
|
|
107
|
+
export * from "./products/kanban-issue-panel";
|
|
108
|
+
export * from "./products/log-viewer";
|
|
109
|
+
export * from "./products/sortable-list";
|
|
110
|
+
export * from "./products/stepper";
|
|
111
|
+
export * from "./products/timeline";
|
|
112
|
+
export * from "./products/tree-view";
|
|
113
|
+
export * from "./blocks/activity-feed";
|
|
114
|
+
export * from "./blocks/app-shell";
|
|
115
|
+
export * from "./blocks/attachment-gallery";
|
|
116
|
+
export * from "./blocks/bar-chart";
|
|
117
|
+
export * from "./blocks/comment-thread";
|
|
118
|
+
export * from "./blocks/description-list";
|
|
119
|
+
export * from "./blocks/dashboard-shell";
|
|
120
|
+
export * from "./blocks/detail-panel";
|
|
121
|
+
export * from "./blocks/donut-chart";
|
|
122
|
+
export * from "./blocks/env-badge";
|
|
123
|
+
export * from "./blocks/env-table";
|
|
124
|
+
export * from "./blocks/form-sheet";
|
|
125
|
+
export * from "./blocks/file-tree";
|
|
126
|
+
export * from "./blocks/filter-bar";
|
|
127
|
+
export * from "./blocks/gauge";
|
|
128
|
+
export * from "./blocks/list-detail";
|
|
129
|
+
export * from "./blocks/notification-center";
|
|
130
|
+
export * from "./blocks/page-header";
|
|
131
|
+
export * from "./blocks/progress-ring";
|
|
132
|
+
export * from "./blocks/radar-chart";
|
|
133
|
+
export * from "./blocks/request-inspector";
|
|
134
|
+
export * from "./blocks/reveal";
|
|
135
|
+
export * from "./blocks/run-timeline";
|
|
136
|
+
export * from "./blocks/scrollspy";
|
|
137
|
+
export * from "./blocks/settings-split";
|
|
138
|
+
export * from "./blocks/severity-chip";
|
|
139
|
+
export * from "./blocks/sparkline";
|
|
140
|
+
export * from "./blocks/stat-card";
|
|
141
|
+
export * from "./blocks/status-badge";
|
|
142
|
+
export * from "./blocks/table-page";
|
|
143
|
+
export * from "./blocks/terminal";
|
|
144
|
+
export * from "./blocks/test-step-list";
|
|
145
|
+
export * from "./blocks/trend-card";
|
|
146
|
+
export * from "./blocks/wizard-shell";
|
|
147
|
+
export * from "./lib/illustrations";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Best-effort clipboard write. Never throws (iframe Permissions-Policy may block). */
|
|
2
|
+
export async function writeClipboard(text: string): Promise<boolean> {
|
|
3
|
+
try {
|
|
4
|
+
if (!navigator.clipboard?.writeText) return false
|
|
5
|
+
await navigator.clipboard.writeText(text)
|
|
6
|
+
return true
|
|
7
|
+
} catch {
|
|
8
|
+
return false
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -95,8 +95,8 @@ export function IlluAccessDenied(props: SVGProps<SVGSVGElement>) {
|
|
|
95
95
|
<path d="M325.37344,531.58948s-8.455,4.227-9.512,23.251,3.171,68.7,3.171,68.7-4.227,22.194,0,42.274-4.227,93,1.057,93,32.762,3.171,33.819,0,2.114-50.729,2.114-50.729,8.455-24.308,0-39.1c0,0,29.52086,51.54832,48.615,90.889,4.17891,8.61,35.933-1.057,30.649-10.569s-17.966-52.843-17.966-52.843-9.512-31.706-26.421-45.445l8.455-67.639s17.967-45.445,7.4-51.786S325.37344,531.58948,325.37344,531.58948Z" data-name="Path 975" fill="var(--foreground)" id="b88343d2-9c47-4183-8a8a-427a73d8d9be-1441" transform="translate(-228.79147 -93.71349)"/>
|
|
96
96
|
<circle cx="128.28696" cy="238.129" data-name="Ellipse 182" fill="var(--primary)" id="fdc24b21-a9e1-47f2-b2e4-7458730b7c21" r="27.478"/>
|
|
97
97
|
<path d="M387.72745,361.43447l-34.16,20.08s-13.08,7.366-17.966,20.08c-5.208,13.55-2.181,32.628,0,36.99,4.227,8.455-1.773,29.592-1.773,29.592l-5.284,48.615s-19.023,17.966-4.227,20.08,41.217-1.057,57.07,0,33.819,3.171,28.535-7.4-11.625-17.967-5.284-39.1c4.962-16.54,4.747-78.383,4.419-104.5a21.025,21.025,0,0,0-10.211-17.767Z" data-name="Path 976" fill="var(--muted)" id="ac268c91-41f4-49c7-bce6-773e5eb69fa2-1442" transform="translate(-228.79147 -93.71349)"/>
|
|
98
|
-
<path d="M372.40744,394.72649l3.17,64.468-30.726,62.223-5.211-1.983,31.706-58.127Z" data-name="Path 980" id="aebed2c8-94ca-417e-8b11-27e17cbf3024-1443" opacity="0.1" style="isolation:isolate" transform="translate(-228.79147 -93.71349)"/>
|
|
99
|
-
<path d="M407.27945,472.93247v-7.4l-35.929,59.186Z" data-name="Path 982" id="e13ea0c4-bc86-4025-9528-1665a42d3372-1444" opacity="0.1" style="isolation:isolate" transform="translate(-228.79147 -93.71349)"/>
|
|
98
|
+
<path d="M372.40744,394.72649l3.17,64.468-30.726,62.223-5.211-1.983,31.706-58.127Z" data-name="Path 980" id="aebed2c8-94ca-417e-8b11-27e17cbf3024-1443" opacity="0.1" style={{ "isolation": "isolate" }} transform="translate(-228.79147 -93.71349)"/>
|
|
99
|
+
<path d="M407.27945,472.93247v-7.4l-35.929,59.186Z" data-name="Path 982" id="e13ea0c4-bc86-4025-9528-1665a42d3372-1444" opacity="0.1" style={{ "isolation": "isolate" }} transform="translate(-228.79147 -93.71349)"/>
|
|
100
100
|
<path d="M337.57645,306.38749l-4.539-1.816s9.5-10.457,22.713-9.548l-3.717-4.092s9.085-3.637,17.345,5.91c4.342,5.019,9.365,10.919,12.5,17.564h4.865l-2.03,4.471,7.106,4.471-7.294-.8a24.73921,24.73921,0,0,1-.69,11.579l.2,3.534s-8.459-13.089-8.459-14.905v4.547s-4.543-4.092-4.543-6.82l-2.478,3.183-1.239-5-15.28,5,2.476-4.094-9.5,1.364,3.717-5s-10.737,5.91-11.15,10.912-5.781,11.366-5.781,11.366l-2.478-4.547S325.60443,313.20747,337.57645,306.38749Z" data-name="Path 983" fill="var(--foreground)" id="eb3190ba-6b3f-4b2b-91d1-1543e580b413-1445" transform="translate(-228.79147 -93.71349)"/>
|
|
101
101
|
<path d="M355.35408,552.83885a10.05581,10.05581,0,0,0,2.73778-15.17434l18.42263-30.62-18.55382.76775-14.64995,28.95959a10.11028,10.11028,0,0,0,12.04336,16.067Z" fill="var(--primary)" transform="translate(-228.79147 -93.71349)"/>
|
|
102
102
|
<path d="M397.24046,375.17548l7.926-1.585s23.779,17.438,16.381,52.314-40.16,87.719-40.16,87.719-7.4,9.512-9.512,11.625-6.341,0-4.227,3.171-3.171,5.284-3.171,5.284-23.251,0-21.137-8.455,38.047-68.7,38.047-68.7l-5.284-56.013S371.87446,373.0615,397.24046,375.17548Z" data-name="Path 981" fill="var(--muted)" id="a62f6567-f472-4931-86f9-ff652851a370-1446" transform="translate(-228.79147 -93.71349)"/>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
import * as React from "react"
|
|
4
|
-
import { codeToHtml } from "shiki"
|
|
5
4
|
|
|
5
|
+
import { useHtmlDark } from "@monkey-mini-app/ui/hooks/use-html-dark"
|
|
6
6
|
import { cn } from "@monkey-mini-app/ui/lib/utils"
|
|
7
7
|
|
|
8
8
|
const aliases: Record<string, string> = {
|
|
@@ -16,6 +16,13 @@ const aliases: Record<string, string> = {
|
|
|
16
16
|
txt: "text",
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Static read-only code with highlighting (shiki via CDN).
|
|
21
|
+
* @when Showing a snippet/command. Editable → `CodeEditor`.
|
|
22
|
+
* @example
|
|
23
|
+
* <CodeBlock code="pnpm test" language="bash" />
|
|
24
|
+
* @family Discovery & inspect
|
|
25
|
+
*/
|
|
19
26
|
export function CodeBlock({
|
|
20
27
|
code,
|
|
21
28
|
language = "ts",
|
|
@@ -27,27 +34,37 @@ export function CodeBlock({
|
|
|
27
34
|
}) {
|
|
28
35
|
const [html, setHtml] = React.useState<string | null>(null)
|
|
29
36
|
const lang = aliases[language.toLowerCase()] ?? language.toLowerCase()
|
|
30
|
-
const dark =
|
|
31
|
-
typeof document !== "undefined" &&
|
|
32
|
-
document.documentElement.classList.contains("dark")
|
|
37
|
+
const dark = useHtmlDark()
|
|
33
38
|
|
|
34
39
|
React.useEffect(() => {
|
|
35
40
|
let cancelled = false
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
// Dynamic import so shiki (all langs/themes) is code-split into a lazy chunk
|
|
42
|
+
// and only fetched when a CodeBlock is actually rendered.
|
|
43
|
+
;(async () => {
|
|
44
|
+
try {
|
|
45
|
+
const shiki = (await import("https://esm.sh/shiki@4.4.3")) as {
|
|
46
|
+
codeToHtml?: (code: string, opts: object) => Promise<string>
|
|
47
|
+
default?: { codeToHtml?: (code: string, opts: object) => Promise<string> }
|
|
48
|
+
}
|
|
49
|
+
const codeToHtml = shiki.codeToHtml ?? shiki.default?.codeToHtml
|
|
50
|
+
if (!codeToHtml) throw new Error("shiki.codeToHtml missing")
|
|
51
|
+
let out: string
|
|
52
|
+
try {
|
|
53
|
+
out = await codeToHtml(code, {
|
|
54
|
+
lang,
|
|
55
|
+
theme: dark ? "github-dark" : "github-light",
|
|
56
|
+
})
|
|
57
|
+
} catch {
|
|
58
|
+
out = await codeToHtml(code, {
|
|
59
|
+
lang: "text",
|
|
60
|
+
theme: dark ? "github-dark" : "github-light",
|
|
61
|
+
})
|
|
62
|
+
}
|
|
41
63
|
if (!cancelled) setHtml(out)
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
theme: dark ? "github-dark" : "github-light",
|
|
47
|
-
}).then((out) => {
|
|
48
|
-
if (!cancelled) setHtml(out)
|
|
49
|
-
})
|
|
50
|
-
)
|
|
64
|
+
} catch (err) {
|
|
65
|
+
console.warn("[CodeBlock] shiki CDN failed", err)
|
|
66
|
+
}
|
|
67
|
+
})()
|
|
51
68
|
return () => {
|
|
52
69
|
cancelled = true
|
|
53
70
|
}
|
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { javascript } from "@codemirror/lang-javascript"
|
|
5
|
-
import { json } from "@codemirror/lang-json"
|
|
6
|
-
import { markdown } from "@codemirror/lang-markdown"
|
|
7
|
-
import { oneDark } from "@codemirror/theme-one-dark"
|
|
8
|
-
import CodeMirror from "@uiw/react-codemirror"
|
|
3
|
+
import { useEffect, useRef, useState } from "react"
|
|
9
4
|
|
|
5
|
+
import { useHtmlDark } from "@monkey-mini-app/ui/hooks/use-html-dark"
|
|
10
6
|
import { cn } from "@monkey-mini-app/ui/lib/utils"
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
type LangS = "js" | "ts" | "json" | "html" | "md"
|
|
9
|
+
|
|
10
|
+
type EditorViewT = {
|
|
11
|
+
destroy(): void
|
|
12
|
+
dispatch(t: object): void
|
|
13
|
+
state: { doc: { toString(): string; length: number } }
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function bare<T extends object>(m: T & { default?: T }): T {
|
|
17
|
+
return (m.default ?? m) as T
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Vanilla CodeMirror 6 loaded on demand from `esm.sh` (not npm, not a React wrapper).
|
|
22
|
+
* Do not import `@codemirror/*` or `@uiw/react-codemirror` — the latter pulls a second React.
|
|
23
|
+
* Highlighting needs `@codemirror/language` + a theme; lang packages only provide the parser.
|
|
24
|
+
* If the CDN fails the host stays empty (no editor), rather than requiring a peer install.
|
|
25
|
+
* @when Editing config/scripts in-app. Do not `import @codemirror/*` or add it to package.json.
|
|
26
|
+
* @example
|
|
27
|
+
* <CodeEditor value={src} language="ts" onChange={(v) => set(v)} />
|
|
28
|
+
* @family Discovery & inspect
|
|
29
|
+
*/
|
|
20
30
|
export function CodeEditor({
|
|
21
31
|
value,
|
|
22
32
|
onChange,
|
|
@@ -26,23 +36,145 @@ export function CodeEditor({
|
|
|
26
36
|
}: {
|
|
27
37
|
value: string
|
|
28
38
|
onChange?: (value: string) => void
|
|
29
|
-
language?:
|
|
39
|
+
language?: LangS
|
|
30
40
|
height?: string
|
|
31
41
|
className?: string
|
|
32
42
|
}) {
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
43
|
+
const hostRef = useRef<HTMLDivElement>(null)
|
|
44
|
+
const viewRef = useRef<EditorViewT | null>(null)
|
|
45
|
+
const onChangeRef = useRef(onChange)
|
|
46
|
+
onChangeRef.current = onChange
|
|
47
|
+
const valueRef = useRef(value)
|
|
48
|
+
valueRef.current = value
|
|
49
|
+
const [cm, setCm] = useState(false)
|
|
50
|
+
const dark = useHtmlDark()
|
|
51
|
+
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
if (!hostRef.current) return
|
|
54
|
+
let cancelled = false
|
|
55
|
+
;(async () => {
|
|
56
|
+
try {
|
|
57
|
+
const [viewMod, cmdMod, langMod, jsLang, jsonLang, htmlLang, mdLang, themeMod] = await Promise.all([
|
|
58
|
+
import("https://esm.sh/@codemirror/view@6"),
|
|
59
|
+
import("https://esm.sh/@codemirror/commands@6"),
|
|
60
|
+
import("https://esm.sh/@codemirror/language@6"),
|
|
61
|
+
import("https://esm.sh/@codemirror/lang-javascript@6"),
|
|
62
|
+
import("https://esm.sh/@codemirror/lang-json@6"),
|
|
63
|
+
import("https://esm.sh/@codemirror/lang-html@6"),
|
|
64
|
+
import("https://esm.sh/@codemirror/lang-markdown@6"),
|
|
65
|
+
import("https://esm.sh/@codemirror/theme-one-dark@6"),
|
|
66
|
+
])
|
|
67
|
+
if (cancelled || !hostRef.current) return
|
|
68
|
+
const viewNs = bare(
|
|
69
|
+
viewMod as { EditorView: unknown; lineNumbers: () => unknown; keymap: { of: (k: unknown) => unknown } },
|
|
70
|
+
)
|
|
71
|
+
const cmdNs = bare(
|
|
72
|
+
cmdMod as { defaultKeymap: unknown[]; history: () => unknown; historyKeymap: unknown[] },
|
|
73
|
+
)
|
|
74
|
+
const langNs = bare(
|
|
75
|
+
langMod as {
|
|
76
|
+
syntaxHighlighting: (s: unknown) => unknown
|
|
77
|
+
defaultHighlightStyle: unknown
|
|
78
|
+
},
|
|
79
|
+
)
|
|
80
|
+
const EditorView = viewNs.EditorView as {
|
|
81
|
+
new (o: object): EditorViewT
|
|
82
|
+
updateListener: { of: (fn: (u: { docChanged: boolean }) => void) => unknown }
|
|
83
|
+
theme: (spec: Record<string, Record<string, string>>) => unknown
|
|
84
|
+
darkTheme: { of: (v: boolean) => unknown }
|
|
85
|
+
}
|
|
86
|
+
const pick = (m: unknown, name: string): ((o?: object) => unknown) => {
|
|
87
|
+
const n = bare(m as object & { default?: object }) as Record<string, unknown>
|
|
88
|
+
const fn = n[name] ?? (n.default as Record<string, unknown> | undefined)?.[name]
|
|
89
|
+
if (typeof fn !== "function") throw new Error(`lang ${name} missing`)
|
|
90
|
+
return fn as (o?: object) => unknown
|
|
91
|
+
}
|
|
92
|
+
const langs: Record<string, unknown> = {
|
|
93
|
+
js: pick(jsLang, "javascript")(),
|
|
94
|
+
ts: pick(jsLang, "javascript")({ typescript: true }),
|
|
95
|
+
json: pick(jsonLang, "json")(),
|
|
96
|
+
html: pick(htmlLang, "html")(),
|
|
97
|
+
md: pick(mdLang, "markdown")(),
|
|
98
|
+
}
|
|
99
|
+
const themeNs = bare(themeMod as { oneDark?: unknown; oneDarkHighlightStyle?: unknown })
|
|
100
|
+
const chrome = EditorView.theme({
|
|
101
|
+
"&": {
|
|
102
|
+
backgroundColor: "transparent",
|
|
103
|
+
color: "var(--foreground)",
|
|
104
|
+
height: "100%",
|
|
105
|
+
},
|
|
106
|
+
".cm-scroller": { overflow: "auto" },
|
|
107
|
+
".cm-content": { caretColor: "var(--foreground)" },
|
|
108
|
+
".cm-cursor, .cm-dropCursor": { borderLeftColor: "var(--foreground)" },
|
|
109
|
+
".cm-gutters": {
|
|
110
|
+
backgroundColor: "var(--muted)",
|
|
111
|
+
color: "var(--muted-foreground)",
|
|
112
|
+
border: "none",
|
|
113
|
+
},
|
|
114
|
+
".cm-activeLine": { backgroundColor: "color-mix(in oklch, var(--muted) 55%, transparent)" },
|
|
115
|
+
".cm-activeLineGutter": { backgroundColor: "var(--muted)" },
|
|
116
|
+
})
|
|
117
|
+
const highlight = dark
|
|
118
|
+
? (themeNs.oneDark ?? langNs.syntaxHighlighting(themeNs.oneDarkHighlightStyle ?? langNs.defaultHighlightStyle))
|
|
119
|
+
: langNs.syntaxHighlighting(langNs.defaultHighlightStyle)
|
|
120
|
+
const view = new EditorView({
|
|
121
|
+
parent: hostRef.current,
|
|
122
|
+
doc: valueRef.current,
|
|
123
|
+
extensions: [
|
|
124
|
+
viewNs.lineNumbers(),
|
|
125
|
+
cmdNs.history(),
|
|
126
|
+
langs[language] ?? langs.ts,
|
|
127
|
+
EditorView.darkTheme.of(dark),
|
|
128
|
+
highlight,
|
|
129
|
+
chrome,
|
|
130
|
+
viewNs.keymap.of([...(cmdNs.defaultKeymap ?? []), ...(cmdNs.historyKeymap ?? [])]),
|
|
131
|
+
EditorView.updateListener.of((u) => {
|
|
132
|
+
if (u.docChanged) onChangeRef.current?.(view.state.doc.toString())
|
|
133
|
+
}),
|
|
134
|
+
],
|
|
135
|
+
})
|
|
136
|
+
viewRef.current = view
|
|
137
|
+
setCm(true)
|
|
138
|
+
} catch (err) {
|
|
139
|
+
console.warn("[CodeEditor] CodeMirror CDN failed", err)
|
|
140
|
+
}
|
|
141
|
+
})()
|
|
142
|
+
return () => {
|
|
143
|
+
cancelled = true
|
|
144
|
+
viewRef.current?.destroy()
|
|
145
|
+
viewRef.current = null
|
|
146
|
+
}
|
|
147
|
+
}, [language, dark])
|
|
148
|
+
|
|
149
|
+
useEffect(() => {
|
|
150
|
+
const view = viewRef.current
|
|
151
|
+
if (!view) return
|
|
152
|
+
const cur = view.state.doc.toString()
|
|
153
|
+
if (value === cur) return
|
|
154
|
+
view.dispatch({ changes: { from: 0, to: view.state.doc.length, insert: value } })
|
|
155
|
+
}, [value])
|
|
36
156
|
|
|
37
157
|
return (
|
|
38
|
-
<div
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
158
|
+
<div className={cn("overflow-hidden rounded-xl border border-border", className)}>
|
|
159
|
+
{!cm && (
|
|
160
|
+
<textarea
|
|
161
|
+
data-testid="code-editor"
|
|
162
|
+
value={value}
|
|
163
|
+
onChange={(e) => onChange?.(e.target.value)}
|
|
164
|
+
spellCheck={false}
|
|
165
|
+
className="w-full resize-y overflow-auto bg-transparent px-3 py-2 font-mono text-xs leading-6 outline-none"
|
|
166
|
+
style={{ height }}
|
|
167
|
+
/>
|
|
168
|
+
)}
|
|
169
|
+
<div
|
|
170
|
+
ref={hostRef}
|
|
171
|
+
data-testid={cm ? "code-editor" : undefined}
|
|
172
|
+
className={cn(
|
|
173
|
+
"text-xs leading-6 [&_.cm-editor]:h-full [&_.cm-editor]:outline-none [&_.cm-scroller]:h-full",
|
|
174
|
+
!cm && "hidden",
|
|
175
|
+
)}
|
|
176
|
+
// Fixed height (not only minHeight) so CM's h-full resolves after async mount.
|
|
177
|
+
style={{ height: cm ? height : undefined, minHeight: cm ? height : 0 }}
|
|
46
178
|
/>
|
|
47
179
|
</div>
|
|
48
180
|
)
|