@mgamadeus/ddd-design-studio 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +358 -2
- package/dist/canvas/index.d.ts +18 -0
- package/dist/canvas/index.js +3063 -0
- package/dist/canvas/index.js.map +1 -0
- package/dist/chunk-RFW6QPM3.js +143 -0
- package/dist/chunk-RFW6QPM3.js.map +1 -0
- package/dist/index.d.ts +803 -0
- package/dist/index.js +386 -0
- package/dist/index.js.map +1 -0
- package/package.json +86 -4
package/dist/index.js
ADDED
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
DEFAULT_DESIGN_STUDIO_TEXTS,
|
|
4
|
+
DESIGN_REFERENCE_PREFIX,
|
|
5
|
+
DesignStudioProvider,
|
|
6
|
+
buildBoardDeepLink,
|
|
7
|
+
buildDesignReference,
|
|
8
|
+
buildThemeReference,
|
|
9
|
+
cx,
|
|
10
|
+
resolveDesignStudioTexts,
|
|
11
|
+
splitThemeReference,
|
|
12
|
+
useDesignStudio,
|
|
13
|
+
useDesignStudioApi,
|
|
14
|
+
useDesignStudioComponents,
|
|
15
|
+
useDesignStudioNotify,
|
|
16
|
+
useDesignStudioPaths,
|
|
17
|
+
useDesignStudioRouter,
|
|
18
|
+
useDesignStudioTexts
|
|
19
|
+
} from "./chunk-RFW6QPM3.js";
|
|
20
|
+
|
|
21
|
+
// src/api/createDesignStudioApi.ts
|
|
22
|
+
var DESIGN_STUDIO_TAG = "DesignStudio";
|
|
23
|
+
var PROVIDED = [{ type: DESIGN_STUDIO_TAG, id: "LIST" }];
|
|
24
|
+
var INVALIDATED = [{ type: DESIGN_STUDIO_TAG, id: "LIST" }, { type: DESIGN_STUDIO_TAG }];
|
|
25
|
+
var createDesignStudioApi = ({
|
|
26
|
+
baseApi,
|
|
27
|
+
apiPrefix
|
|
28
|
+
}) => {
|
|
29
|
+
const canvasUrl = (arg) => `${apiPrefix}/canvases/${arg.projectKey}/${arg.canvasKey}`;
|
|
30
|
+
const commentUrl = (arg) => `${apiPrefix}/comments/${arg.designStudioCommentId}`;
|
|
31
|
+
const widenedBaseApi = baseApi;
|
|
32
|
+
const api = widenedBaseApi.enhanceEndpoints({ addTagTypes: [DESIGN_STUDIO_TAG] }).injectEndpoints({
|
|
33
|
+
endpoints: (build) => ({
|
|
34
|
+
designStudioOverview: build.query({
|
|
35
|
+
query: () => ({ url: `${apiPrefix}/overview` }),
|
|
36
|
+
providesTags: PROVIDED
|
|
37
|
+
}),
|
|
38
|
+
designStudioThemes: build.query({
|
|
39
|
+
query: (arg) => ({
|
|
40
|
+
url: `${apiPrefix}/themes`,
|
|
41
|
+
params: { search: arg.search, noCache: arg.noCache, outputFormat: arg.outputFormat }
|
|
42
|
+
}),
|
|
43
|
+
providesTags: PROVIDED
|
|
44
|
+
}),
|
|
45
|
+
designStudioCanvas: build.query({
|
|
46
|
+
query: (arg) => ({
|
|
47
|
+
url: canvasUrl(arg),
|
|
48
|
+
params: { theme: arg.theme, noCache: arg.noCache, outputFormat: arg.outputFormat }
|
|
49
|
+
}),
|
|
50
|
+
providesTags: PROVIDED
|
|
51
|
+
}),
|
|
52
|
+
designStudioCanvasRevision: build.query({
|
|
53
|
+
query: (arg) => ({
|
|
54
|
+
url: `${canvasUrl(arg)}/revision`,
|
|
55
|
+
params: { theme: arg.theme, noCache: arg.noCache, outputFormat: arg.outputFormat }
|
|
56
|
+
}),
|
|
57
|
+
providesTags: PROVIDED
|
|
58
|
+
}),
|
|
59
|
+
designStudioCanvasComments: build.query({
|
|
60
|
+
query: (arg) => ({
|
|
61
|
+
url: `${canvasUrl(arg)}/comments`,
|
|
62
|
+
params: {
|
|
63
|
+
theme: arg.theme,
|
|
64
|
+
noCache: arg.noCache,
|
|
65
|
+
outputFormat: arg.outputFormat,
|
|
66
|
+
onlyOpenThreads: arg.onlyOpenThreads,
|
|
67
|
+
sinceId: arg.sinceId
|
|
68
|
+
}
|
|
69
|
+
}),
|
|
70
|
+
providesTags: PROVIDED
|
|
71
|
+
}),
|
|
72
|
+
designStudioExpiringComments: build.query({
|
|
73
|
+
query: () => ({ url: `${apiPrefix}/comments/expiring` }),
|
|
74
|
+
providesTags: PROVIDED
|
|
75
|
+
}),
|
|
76
|
+
designStudioRequestThumbnailRendering: build.mutation({
|
|
77
|
+
query: (arg) => ({
|
|
78
|
+
url: `${canvasUrl(arg)}/thumbnailRenderRequests`,
|
|
79
|
+
method: "POST",
|
|
80
|
+
body: arg.body,
|
|
81
|
+
params: { theme: arg.theme, noCache: arg.noCache, outputFormat: arg.outputFormat }
|
|
82
|
+
}),
|
|
83
|
+
invalidatesTags: INVALIDATED
|
|
84
|
+
}),
|
|
85
|
+
designStudioSetBoardStatus: build.mutation({
|
|
86
|
+
query: (arg) => ({
|
|
87
|
+
url: `${canvasUrl(arg)}/boards/${arg.boardKey}/status`,
|
|
88
|
+
method: "PATCH",
|
|
89
|
+
body: arg.body,
|
|
90
|
+
params: { noCache: arg.noCache, outputFormat: arg.outputFormat }
|
|
91
|
+
}),
|
|
92
|
+
invalidatesTags: INVALIDATED
|
|
93
|
+
}),
|
|
94
|
+
designStudioCreateComment: build.mutation({
|
|
95
|
+
query: (arg) => ({
|
|
96
|
+
url: `${canvasUrl(arg)}/boards/${arg.boardKey}/comments`,
|
|
97
|
+
method: "POST",
|
|
98
|
+
body: arg.body,
|
|
99
|
+
params: { noCache: arg.noCache, outputFormat: arg.outputFormat }
|
|
100
|
+
}),
|
|
101
|
+
invalidatesTags: INVALIDATED
|
|
102
|
+
}),
|
|
103
|
+
designStudioReplyToComment: build.mutation({
|
|
104
|
+
query: (arg) => ({
|
|
105
|
+
url: `${commentUrl(arg)}/replies`,
|
|
106
|
+
method: "POST",
|
|
107
|
+
body: arg.body,
|
|
108
|
+
params: { noCache: arg.noCache, outputFormat: arg.outputFormat }
|
|
109
|
+
}),
|
|
110
|
+
invalidatesTags: INVALIDATED
|
|
111
|
+
}),
|
|
112
|
+
designStudioPatchComment: build.mutation({
|
|
113
|
+
query: (arg) => ({
|
|
114
|
+
url: commentUrl(arg),
|
|
115
|
+
method: "PATCH",
|
|
116
|
+
body: arg.body,
|
|
117
|
+
params: { noCache: arg.noCache, outputFormat: arg.outputFormat }
|
|
118
|
+
}),
|
|
119
|
+
invalidatesTags: INVALIDATED
|
|
120
|
+
}),
|
|
121
|
+
designStudioDeleteComment: build.mutation({
|
|
122
|
+
query: (arg) => ({
|
|
123
|
+
url: commentUrl(arg),
|
|
124
|
+
method: "DELETE",
|
|
125
|
+
params: { noCache: arg.noCache, outputFormat: arg.outputFormat }
|
|
126
|
+
}),
|
|
127
|
+
invalidatesTags: INVALIDATED
|
|
128
|
+
}),
|
|
129
|
+
designStudioResolveComment: build.mutation({
|
|
130
|
+
query: (arg) => ({
|
|
131
|
+
url: `${commentUrl(arg)}/resolve`,
|
|
132
|
+
method: "POST",
|
|
133
|
+
body: arg.body,
|
|
134
|
+
params: { noCache: arg.noCache, outputFormat: arg.outputFormat }
|
|
135
|
+
}),
|
|
136
|
+
invalidatesTags: INVALIDATED
|
|
137
|
+
}),
|
|
138
|
+
designStudioReopenComment: build.mutation({
|
|
139
|
+
query: (arg) => ({
|
|
140
|
+
url: `${commentUrl(arg)}/reopen`,
|
|
141
|
+
method: "POST",
|
|
142
|
+
params: { noCache: arg.noCache, outputFormat: arg.outputFormat }
|
|
143
|
+
}),
|
|
144
|
+
invalidatesTags: INVALIDATED
|
|
145
|
+
}),
|
|
146
|
+
designStudioKeepComment: build.mutation({
|
|
147
|
+
query: (arg) => ({
|
|
148
|
+
url: `${commentUrl(arg)}/keep`,
|
|
149
|
+
method: "POST",
|
|
150
|
+
params: { noCache: arg.noCache, outputFormat: arg.outputFormat }
|
|
151
|
+
}),
|
|
152
|
+
invalidatesTags: INVALIDATED
|
|
153
|
+
})
|
|
154
|
+
}),
|
|
155
|
+
overrideExisting: false
|
|
156
|
+
});
|
|
157
|
+
return {
|
|
158
|
+
useOverviewQuery: api.useDesignStudioOverviewQuery,
|
|
159
|
+
useThemesQuery: api.useDesignStudioThemesQuery,
|
|
160
|
+
useCanvasQuery: api.useDesignStudioCanvasQuery,
|
|
161
|
+
useCanvasRevisionQuery: api.useDesignStudioCanvasRevisionQuery,
|
|
162
|
+
useCanvasCommentsQuery: api.useDesignStudioCanvasCommentsQuery,
|
|
163
|
+
useExpiringCommentsQuery: api.useDesignStudioExpiringCommentsQuery,
|
|
164
|
+
useRequestThumbnailRenderingMutation: api.useDesignStudioRequestThumbnailRenderingMutation,
|
|
165
|
+
useSetBoardStatusMutation: api.useDesignStudioSetBoardStatusMutation,
|
|
166
|
+
useCreateCommentMutation: api.useDesignStudioCreateCommentMutation,
|
|
167
|
+
useReplyToCommentMutation: api.useDesignStudioReplyToCommentMutation,
|
|
168
|
+
usePatchCommentMutation: api.useDesignStudioPatchCommentMutation,
|
|
169
|
+
useDeleteCommentMutation: api.useDesignStudioDeleteCommentMutation,
|
|
170
|
+
useResolveCommentMutation: api.useDesignStudioResolveCommentMutation,
|
|
171
|
+
useReopenCommentMutation: api.useDesignStudioReopenCommentMutation,
|
|
172
|
+
useKeepCommentMutation: api.useDesignStudioKeepCommentMutation
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
// src/screens/DesignStudioOverviewScreen.tsx
|
|
177
|
+
import { normalizeDddError } from "@mgamadeus/ddd-web/api";
|
|
178
|
+
import { Hourglass, LayoutGrid, Palette } from "lucide-react";
|
|
179
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
180
|
+
var DesignStudioOverviewScreen = ({
|
|
181
|
+
title = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
182
|
+
"Design ",
|
|
183
|
+
/* @__PURE__ */ jsx("em", { children: "Studio" })
|
|
184
|
+
] }),
|
|
185
|
+
description = "Design projects and their canvases \u2014 review, comment, decide."
|
|
186
|
+
}) => {
|
|
187
|
+
const { api, components, paths, router } = useDesignStudio();
|
|
188
|
+
const { Badge, Card, CardContent, CardHeader, CardTitle, CardGrid, PageHeader, PageSections, Skeleton, StatusCallout } = components;
|
|
189
|
+
const { Link } = router;
|
|
190
|
+
const { data, isLoading, error } = api.useOverviewQuery();
|
|
191
|
+
const overview = data?.designStudioOverview;
|
|
192
|
+
const projects = overview?.projects?.elements ?? [];
|
|
193
|
+
const expiringThreadCount = overview?.expiringThreadCount ?? 0;
|
|
194
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
195
|
+
/* @__PURE__ */ jsx(
|
|
196
|
+
PageHeader,
|
|
197
|
+
{
|
|
198
|
+
title,
|
|
199
|
+
description,
|
|
200
|
+
leading: /* @__PURE__ */ jsx(Palette, { className: "size-7 text-brand-emphasis", "aria-hidden": true })
|
|
201
|
+
}
|
|
202
|
+
),
|
|
203
|
+
error && /* @__PURE__ */ jsx(
|
|
204
|
+
StatusCallout,
|
|
205
|
+
{
|
|
206
|
+
tone: "destructive",
|
|
207
|
+
title: "The overview could not be loaded",
|
|
208
|
+
description: normalizeDddError(error, "Request failed").message,
|
|
209
|
+
className: "mb-6"
|
|
210
|
+
}
|
|
211
|
+
),
|
|
212
|
+
/* @__PURE__ */ jsxs(PageSections, { children: [
|
|
213
|
+
isLoading && /* @__PURE__ */ jsx(Skeleton, { className: "h-40 w-full rounded-2xl" }),
|
|
214
|
+
!isLoading && !error && projects.length === 0 && /* @__PURE__ */ jsx(
|
|
215
|
+
StatusCallout,
|
|
216
|
+
{
|
|
217
|
+
title: "No design projects configured",
|
|
218
|
+
description: "Projects and canvases are configured in the backend; their boards are read from the canvas folders in the checkout."
|
|
219
|
+
}
|
|
220
|
+
),
|
|
221
|
+
projects.length > 0 && /* @__PURE__ */ jsx(CardGrid, { children: projects.map((project) => {
|
|
222
|
+
const projectKey = project.projectKey ?? "";
|
|
223
|
+
const canvases = project.canvases?.elements ?? [];
|
|
224
|
+
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
225
|
+
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { className: "flex items-center justify-between gap-2 text-title-card", children: [
|
|
226
|
+
/* @__PURE__ */ jsx(Link, { href: paths.project(projectKey), className: "hover:underline", children: project.label ?? projectKey }),
|
|
227
|
+
/* @__PURE__ */ jsxs(Badge, { variant: "outline", children: [
|
|
228
|
+
canvases.length,
|
|
229
|
+
" ",
|
|
230
|
+
canvases.length === 1 ? "canvas" : "canvases"
|
|
231
|
+
] })
|
|
232
|
+
] }) }),
|
|
233
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "space-y-2", children: [
|
|
234
|
+
canvases.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "No canvas configured for this project yet." }),
|
|
235
|
+
canvases.map((canvas) => /* @__PURE__ */ jsxs(
|
|
236
|
+
Link,
|
|
237
|
+
{
|
|
238
|
+
href: paths.canvas(projectKey, canvas.canvasKey ?? ""),
|
|
239
|
+
className: "flex items-center justify-between gap-3 rounded-xl bg-tint px-3 py-2 text-sm transition-colors hover:bg-tint-strong",
|
|
240
|
+
children: [
|
|
241
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-2 font-medium", children: [
|
|
242
|
+
/* @__PURE__ */ jsx(LayoutGrid, { className: "size-4 shrink-0 text-brand-emphasis", "aria-hidden": true }),
|
|
243
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: canvas.label ?? canvas.canvasKey })
|
|
244
|
+
] }),
|
|
245
|
+
/* @__PURE__ */ jsxs("span", { className: "shrink-0 text-muted-foreground", children: [
|
|
246
|
+
canvas.boardCount ?? 0,
|
|
247
|
+
" boards \xB7 ",
|
|
248
|
+
canvas.openThreadCount ?? 0,
|
|
249
|
+
" open \xB7",
|
|
250
|
+
" ",
|
|
251
|
+
canvas.decisionCount ?? 0,
|
|
252
|
+
" decisions"
|
|
253
|
+
] })
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
canvas.canvasKey
|
|
257
|
+
))
|
|
258
|
+
] })
|
|
259
|
+
] }, projectKey);
|
|
260
|
+
}) }),
|
|
261
|
+
overview && /* @__PURE__ */ jsxs("p", { className: "flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground", children: [
|
|
262
|
+
/* @__PURE__ */ jsx("span", { children: "Boards are read from the canvas folders in the checkout; open threads and decisions are counted per canvas." }),
|
|
263
|
+
expiringThreadCount > 0 && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 font-medium text-foreground", children: [
|
|
264
|
+
/* @__PURE__ */ jsx(Hourglass, { className: "size-3.5", "aria-hidden": true }),
|
|
265
|
+
expiringThreadCount,
|
|
266
|
+
" ",
|
|
267
|
+
expiringThreadCount === 1 ? "thread expires" : "threads expire",
|
|
268
|
+
" soon (threads idle for ",
|
|
269
|
+
overview.threadIdleDays ?? 0,
|
|
270
|
+
" days are deleted) \u2014 open the board and choose \u201CKeep\u201D."
|
|
271
|
+
] })
|
|
272
|
+
] })
|
|
273
|
+
] })
|
|
274
|
+
] });
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
// src/screens/DesignStudioProjectScreen.tsx
|
|
278
|
+
import { normalizeDddError as normalizeDddError2 } from "@mgamadeus/ddd-web/api";
|
|
279
|
+
import { Flag, LayoutGrid as LayoutGrid2, MessageSquare } from "lucide-react";
|
|
280
|
+
import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
281
|
+
var DesignStudioProjectScreen = ({ projectKey }) => {
|
|
282
|
+
const { api, components, paths, router } = useDesignStudio();
|
|
283
|
+
const { Card, CardContent, PageHeader, Skeleton, StatusCallout } = components;
|
|
284
|
+
const { Link } = router;
|
|
285
|
+
const { data, isLoading, error } = api.useOverviewQuery();
|
|
286
|
+
const project = data?.designStudioOverview.projects?.elements?.find((item) => item.projectKey === projectKey);
|
|
287
|
+
const canvases = project?.canvases?.elements ?? [];
|
|
288
|
+
const isLoaded = !isLoading && !error;
|
|
289
|
+
return /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
290
|
+
/* @__PURE__ */ jsx2(
|
|
291
|
+
PageHeader,
|
|
292
|
+
{
|
|
293
|
+
title: project?.label ?? projectKey,
|
|
294
|
+
description: project ? "The canvases of this design project." : void 0
|
|
295
|
+
}
|
|
296
|
+
),
|
|
297
|
+
error && /* @__PURE__ */ jsx2(
|
|
298
|
+
StatusCallout,
|
|
299
|
+
{
|
|
300
|
+
tone: "destructive",
|
|
301
|
+
title: "The canvases could not be loaded",
|
|
302
|
+
description: normalizeDddError2(error, "Request failed").message
|
|
303
|
+
}
|
|
304
|
+
),
|
|
305
|
+
isLoading && /* @__PURE__ */ jsx2(Skeleton, { className: "h-32 w-full rounded-2xl" }),
|
|
306
|
+
isLoaded && !project && /* @__PURE__ */ jsx2(
|
|
307
|
+
StatusCallout,
|
|
308
|
+
{
|
|
309
|
+
title: "No design project with this key is configured",
|
|
310
|
+
description: /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
311
|
+
"The design studio knows no project ",
|
|
312
|
+
/* @__PURE__ */ jsx2("code", { className: "font-mono text-xs", children: projectKey }),
|
|
313
|
+
". Projects and their canvases are configured in the backend and read from the checkout folder."
|
|
314
|
+
] })
|
|
315
|
+
}
|
|
316
|
+
),
|
|
317
|
+
isLoaded && project && canvases.length === 0 && /* @__PURE__ */ jsx2(
|
|
318
|
+
StatusCallout,
|
|
319
|
+
{
|
|
320
|
+
title: "No canvases yet",
|
|
321
|
+
description: "Canvases are configured per project and their boards are read from the canvas folder in the checkout; a configured canvas appears here."
|
|
322
|
+
}
|
|
323
|
+
),
|
|
324
|
+
canvases.length > 0 && /* @__PURE__ */ jsx2("div", { className: "grid gap-4 [grid-template-columns:repeat(auto-fill,minmax(320px,1fr))]", children: canvases.map((canvas) => /* @__PURE__ */ jsx2(Link, { href: paths.canvas(projectKey, canvas.canvasKey ?? ""), className: "group", children: /* @__PURE__ */ jsx2(Card, { className: "h-full gap-0 py-0 transition-shadow group-hover:shadow-md", children: /* @__PURE__ */ jsxs2(CardContent, { className: "flex h-full flex-col gap-2 p-4", children: [
|
|
325
|
+
/* @__PURE__ */ jsxs2("span", { className: "flex items-center gap-2 font-semibold", children: [
|
|
326
|
+
/* @__PURE__ */ jsx2(LayoutGrid2, { className: "size-4 shrink-0 text-brand-emphasis", "aria-hidden": true }),
|
|
327
|
+
/* @__PURE__ */ jsx2("span", { className: "truncate", children: canvas.label ?? canvas.canvasKey })
|
|
328
|
+
] }),
|
|
329
|
+
/* @__PURE__ */ jsxs2("p", { className: "text-sm text-muted-foreground", children: [
|
|
330
|
+
canvas.boardCount ?? 0,
|
|
331
|
+
" boards",
|
|
332
|
+
/* @__PURE__ */ jsxs2("span", { className: "inline-flex items-center gap-1 pl-3", children: [
|
|
333
|
+
/* @__PURE__ */ jsx2(MessageSquare, { className: "size-3.5", "aria-hidden": true }),
|
|
334
|
+
" ",
|
|
335
|
+
canvas.openThreadCount ?? 0,
|
|
336
|
+
" open"
|
|
337
|
+
] }),
|
|
338
|
+
/* @__PURE__ */ jsxs2("span", { className: "inline-flex items-center gap-1 pl-3", children: [
|
|
339
|
+
/* @__PURE__ */ jsx2(Flag, { className: "size-3.5", "aria-hidden": true }),
|
|
340
|
+
" ",
|
|
341
|
+
canvas.decisionCount ?? 0,
|
|
342
|
+
" decisions"
|
|
343
|
+
] })
|
|
344
|
+
] }),
|
|
345
|
+
/* @__PURE__ */ jsx2("p", { className: "mt-auto text-xs text-muted-foreground", children: canvas.canvasKey })
|
|
346
|
+
] }) }) }, canvas.canvasKey)) })
|
|
347
|
+
] });
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
// src/screens/DesignStudioReviewsScreen.tsx
|
|
351
|
+
import { ClipboardCheck } from "lucide-react";
|
|
352
|
+
import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
353
|
+
var DesignStudioReviewsScreen = ({
|
|
354
|
+
description = "Reviews with scores, linked to the boards.",
|
|
355
|
+
emptyDescription = "Review documents (scores, findings linked to boards, verified / adopted / rejected) come with a later step of the design studio."
|
|
356
|
+
}) => {
|
|
357
|
+
const { PageHeader, StatusCallout } = useDesignStudioComponents();
|
|
358
|
+
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
359
|
+
/* @__PURE__ */ jsx3(PageHeader, { title: "Reviews", description }),
|
|
360
|
+
/* @__PURE__ */ jsx3(StatusCallout, { icon: ClipboardCheck, title: "No reviews imported yet", description: emptyDescription })
|
|
361
|
+
] });
|
|
362
|
+
};
|
|
363
|
+
export {
|
|
364
|
+
DEFAULT_DESIGN_STUDIO_TEXTS,
|
|
365
|
+
DESIGN_REFERENCE_PREFIX,
|
|
366
|
+
DESIGN_STUDIO_TAG,
|
|
367
|
+
DesignStudioOverviewScreen,
|
|
368
|
+
DesignStudioProjectScreen,
|
|
369
|
+
DesignStudioProvider,
|
|
370
|
+
DesignStudioReviewsScreen,
|
|
371
|
+
buildBoardDeepLink,
|
|
372
|
+
buildDesignReference,
|
|
373
|
+
buildThemeReference,
|
|
374
|
+
createDesignStudioApi,
|
|
375
|
+
cx,
|
|
376
|
+
resolveDesignStudioTexts,
|
|
377
|
+
splitThemeReference,
|
|
378
|
+
useDesignStudio,
|
|
379
|
+
useDesignStudioApi,
|
|
380
|
+
useDesignStudioComponents,
|
|
381
|
+
useDesignStudioNotify,
|
|
382
|
+
useDesignStudioPaths,
|
|
383
|
+
useDesignStudioRouter,
|
|
384
|
+
useDesignStudioTexts
|
|
385
|
+
};
|
|
386
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/api/createDesignStudioApi.ts","../src/screens/DesignStudioOverviewScreen.tsx","../src/screens/DesignStudioProjectScreen.tsx","../src/screens/DesignStudioReviewsScreen.tsx"],"sourcesContent":["import type {\n Api,\n BaseQueryFn,\n coreModuleName,\n FetchArgs,\n FetchBaseQueryError,\n FetchBaseQueryMeta,\n} from '@reduxjs/toolkit/query';\nimport type { reactHooksModuleName, TypedUseMutation, TypedUseQuery } from '@reduxjs/toolkit/query/react';\n\nimport type {\n DesignStudioBoardStatusPatchArg,\n DesignStudioBoardStatusResponse,\n DesignStudioCanvasArg,\n DesignStudioCanvasCommentsArg,\n DesignStudioCanvasResponse,\n DesignStudioCanvasRevisionResponse,\n DesignStudioCommentArg,\n DesignStudioCommentCreateArg,\n DesignStudioCommentPatchArg,\n DesignStudioCommentReplyArg,\n DesignStudioCommentResolveArg,\n DesignStudioCommentResponse,\n DesignStudioCommentsResponse,\n DesignStudioDeleteResponse,\n DesignStudioOverviewResponse,\n DesignStudioThemesArg,\n DesignStudioThemesResponse,\n DesignStudioThumbnailRenderRequestArg,\n} from './types';\n\n/** The one cache tag of the studio: every query provides it, every mutation invalidates it. */\nexport const DESIGN_STUDIO_TAG = 'DesignStudio';\n\n/** The base query the studio's endpoints run on: a fetch-style one (`createDddBaseQuery` of `@mgamadeus/ddd-web/api`). */\nexport type DesignStudioBaseQuery = BaseQueryFn<\n string | FetchArgs,\n unknown,\n FetchBaseQueryError,\n object,\n FetchBaseQueryMeta\n>;\n\n/** The application's RTK Query api (`createApi` from `@reduxjs/toolkit/query/react`) the endpoints are injected into. */\nexport type DesignStudioBaseApi<ReducerPath extends string = string, TagTypes extends string = string> = Api<\n DesignStudioBaseQuery,\n // biome-ignore lint/complexity/noBannedTypes: RTK Query's own type of \"no endpoints yet\" (`createApi({ endpoints: () => ({}) })`)\n {},\n ReducerPath,\n TagTypes,\n typeof coreModuleName | typeof reactHooksModuleName\n>;\n\nexport interface CreateDesignStudioApiOptions<ReducerPath extends string, TagTypes extends string> {\n /** The application's api; its base query carries the origin, the session and the refresh. */\n baseApi: DesignStudioBaseApi<ReducerPath, TagTypes>;\n /** Path prefix of the studio's routes, without a trailing slash (e.g. `/api/admin/designStudio`). */\n apiPrefix: string;\n}\n\ntype DesignStudioQueryHook<ResultType, QueryArg> = TypedUseQuery<ResultType, QueryArg, DesignStudioBaseQuery>;\ntype DesignStudioMutationHook<ResultType, QueryArg> = TypedUseMutation<ResultType, QueryArg, DesignStudioBaseQuery>;\n\n/** The hooks `createDesignStudioApi` returns (`environment.api`). */\nexport interface DesignStudioApi {\n useOverviewQuery: DesignStudioQueryHook<DesignStudioOverviewResponse, void>;\n useThemesQuery: DesignStudioQueryHook<DesignStudioThemesResponse, DesignStudioThemesArg>;\n useCanvasQuery: DesignStudioQueryHook<DesignStudioCanvasResponse, DesignStudioCanvasArg>;\n useCanvasRevisionQuery: DesignStudioQueryHook<DesignStudioCanvasRevisionResponse, DesignStudioCanvasArg>;\n useCanvasCommentsQuery: DesignStudioQueryHook<DesignStudioCommentsResponse, DesignStudioCanvasCommentsArg>;\n useExpiringCommentsQuery: DesignStudioQueryHook<DesignStudioCommentsResponse, void>;\n useRequestThumbnailRenderingMutation: DesignStudioMutationHook<\n DesignStudioCanvasResponse,\n DesignStudioThumbnailRenderRequestArg\n >;\n useSetBoardStatusMutation: DesignStudioMutationHook<DesignStudioBoardStatusResponse, DesignStudioBoardStatusPatchArg>;\n useCreateCommentMutation: DesignStudioMutationHook<DesignStudioCommentResponse, DesignStudioCommentCreateArg>;\n useReplyToCommentMutation: DesignStudioMutationHook<DesignStudioCommentResponse, DesignStudioCommentReplyArg>;\n usePatchCommentMutation: DesignStudioMutationHook<DesignStudioCommentResponse, DesignStudioCommentPatchArg>;\n useDeleteCommentMutation: DesignStudioMutationHook<DesignStudioDeleteResponse, DesignStudioCommentArg>;\n useResolveCommentMutation: DesignStudioMutationHook<DesignStudioCommentResponse, DesignStudioCommentResolveArg>;\n useReopenCommentMutation: DesignStudioMutationHook<DesignStudioCommentResponse, DesignStudioCommentArg>;\n useKeepCommentMutation: DesignStudioMutationHook<DesignStudioCommentResponse, DesignStudioCommentArg>;\n}\n\nconst PROVIDED = [{ type: DESIGN_STUDIO_TAG, id: 'LIST' }] as const;\nconst INVALIDATED = [{ type: DESIGN_STUDIO_TAG, id: 'LIST' }, { type: DESIGN_STUDIO_TAG }] as const;\n\n/**\n * Injects the studio's 15 operations into the application's RTK Query api and returns their hooks. Call it once (module\n * scope) and hand the result to `DesignStudioProvider` as `environment.api`.\n *\n * Cache: one tag (`DesignStudio`). Every query provides it and every mutation invalidates it, so a write refetches\n * whatever the studio has on screen (the canvas, its comments, the overview).\n */\nexport const createDesignStudioApi = <ReducerPath extends string, TagTypes extends string>({\n baseApi,\n apiPrefix,\n}: CreateDesignStudioApiOptions<ReducerPath, TagTypes>): DesignStudioApi => {\n const canvasUrl = (arg: { projectKey: string; canvasKey: string }) =>\n `${apiPrefix}/canvases/${arg.projectKey}/${arg.canvasKey}`;\n const commentUrl = (arg: DesignStudioCommentArg) => `${apiPrefix}/comments/${arg.designStudioCommentId}`;\n\n // Widened to plain strings: the returned hooks do not depend on the application's reducer path and tag names. An api\n // is invariant in both, hence the cast; it also keeps the hook types nameable in the package's declaration files.\n const widenedBaseApi = baseApi as unknown as DesignStudioBaseApi;\n const api = widenedBaseApi.enhanceEndpoints({ addTagTypes: [DESIGN_STUDIO_TAG] }).injectEndpoints({\n endpoints: build => ({\n designStudioOverview: build.query<DesignStudioOverviewResponse, void>({\n query: () => ({ url: `${apiPrefix}/overview` }),\n providesTags: PROVIDED,\n }),\n designStudioThemes: build.query<DesignStudioThemesResponse, DesignStudioThemesArg>({\n query: arg => ({\n url: `${apiPrefix}/themes`,\n params: { search: arg.search, noCache: arg.noCache, outputFormat: arg.outputFormat },\n }),\n providesTags: PROVIDED,\n }),\n designStudioCanvas: build.query<DesignStudioCanvasResponse, DesignStudioCanvasArg>({\n query: arg => ({\n url: canvasUrl(arg),\n params: { theme: arg.theme, noCache: arg.noCache, outputFormat: arg.outputFormat },\n }),\n providesTags: PROVIDED,\n }),\n designStudioCanvasRevision: build.query<DesignStudioCanvasRevisionResponse, DesignStudioCanvasArg>({\n query: arg => ({\n url: `${canvasUrl(arg)}/revision`,\n params: { theme: arg.theme, noCache: arg.noCache, outputFormat: arg.outputFormat },\n }),\n providesTags: PROVIDED,\n }),\n designStudioCanvasComments: build.query<DesignStudioCommentsResponse, DesignStudioCanvasCommentsArg>({\n query: arg => ({\n url: `${canvasUrl(arg)}/comments`,\n params: {\n theme: arg.theme,\n noCache: arg.noCache,\n outputFormat: arg.outputFormat,\n onlyOpenThreads: arg.onlyOpenThreads,\n sinceId: arg.sinceId,\n },\n }),\n providesTags: PROVIDED,\n }),\n designStudioExpiringComments: build.query<DesignStudioCommentsResponse, void>({\n query: () => ({ url: `${apiPrefix}/comments/expiring` }),\n providesTags: PROVIDED,\n }),\n designStudioRequestThumbnailRendering: build.mutation<\n DesignStudioCanvasResponse,\n DesignStudioThumbnailRenderRequestArg\n >({\n query: arg => ({\n url: `${canvasUrl(arg)}/thumbnailRenderRequests`,\n method: 'POST',\n body: arg.body,\n params: { theme: arg.theme, noCache: arg.noCache, outputFormat: arg.outputFormat },\n }),\n invalidatesTags: INVALIDATED,\n }),\n designStudioSetBoardStatus: build.mutation<DesignStudioBoardStatusResponse, DesignStudioBoardStatusPatchArg>({\n query: arg => ({\n url: `${canvasUrl(arg)}/boards/${arg.boardKey}/status`,\n method: 'PATCH',\n body: arg.body,\n params: { noCache: arg.noCache, outputFormat: arg.outputFormat },\n }),\n invalidatesTags: INVALIDATED,\n }),\n designStudioCreateComment: build.mutation<DesignStudioCommentResponse, DesignStudioCommentCreateArg>({\n query: arg => ({\n url: `${canvasUrl(arg)}/boards/${arg.boardKey}/comments`,\n method: 'POST',\n body: arg.body,\n params: { noCache: arg.noCache, outputFormat: arg.outputFormat },\n }),\n invalidatesTags: INVALIDATED,\n }),\n designStudioReplyToComment: build.mutation<DesignStudioCommentResponse, DesignStudioCommentReplyArg>({\n query: arg => ({\n url: `${commentUrl(arg)}/replies`,\n method: 'POST',\n body: arg.body,\n params: { noCache: arg.noCache, outputFormat: arg.outputFormat },\n }),\n invalidatesTags: INVALIDATED,\n }),\n designStudioPatchComment: build.mutation<DesignStudioCommentResponse, DesignStudioCommentPatchArg>({\n query: arg => ({\n url: commentUrl(arg),\n method: 'PATCH',\n body: arg.body,\n params: { noCache: arg.noCache, outputFormat: arg.outputFormat },\n }),\n invalidatesTags: INVALIDATED,\n }),\n designStudioDeleteComment: build.mutation<DesignStudioDeleteResponse, DesignStudioCommentArg>({\n query: arg => ({\n url: commentUrl(arg),\n method: 'DELETE',\n params: { noCache: arg.noCache, outputFormat: arg.outputFormat },\n }),\n invalidatesTags: INVALIDATED,\n }),\n designStudioResolveComment: build.mutation<DesignStudioCommentResponse, DesignStudioCommentResolveArg>({\n query: arg => ({\n url: `${commentUrl(arg)}/resolve`,\n method: 'POST',\n body: arg.body,\n params: { noCache: arg.noCache, outputFormat: arg.outputFormat },\n }),\n invalidatesTags: INVALIDATED,\n }),\n designStudioReopenComment: build.mutation<DesignStudioCommentResponse, DesignStudioCommentArg>({\n query: arg => ({\n url: `${commentUrl(arg)}/reopen`,\n method: 'POST',\n params: { noCache: arg.noCache, outputFormat: arg.outputFormat },\n }),\n invalidatesTags: INVALIDATED,\n }),\n designStudioKeepComment: build.mutation<DesignStudioCommentResponse, DesignStudioCommentArg>({\n query: arg => ({\n url: `${commentUrl(arg)}/keep`,\n method: 'POST',\n params: { noCache: arg.noCache, outputFormat: arg.outputFormat },\n }),\n invalidatesTags: INVALIDATED,\n }),\n }),\n overrideExisting: false,\n });\n\n return {\n useOverviewQuery: api.useDesignStudioOverviewQuery,\n useThemesQuery: api.useDesignStudioThemesQuery,\n useCanvasQuery: api.useDesignStudioCanvasQuery,\n useCanvasRevisionQuery: api.useDesignStudioCanvasRevisionQuery,\n useCanvasCommentsQuery: api.useDesignStudioCanvasCommentsQuery,\n useExpiringCommentsQuery: api.useDesignStudioExpiringCommentsQuery,\n useRequestThumbnailRenderingMutation: api.useDesignStudioRequestThumbnailRenderingMutation,\n useSetBoardStatusMutation: api.useDesignStudioSetBoardStatusMutation,\n useCreateCommentMutation: api.useDesignStudioCreateCommentMutation,\n useReplyToCommentMutation: api.useDesignStudioReplyToCommentMutation,\n usePatchCommentMutation: api.useDesignStudioPatchCommentMutation,\n useDeleteCommentMutation: api.useDesignStudioDeleteCommentMutation,\n useResolveCommentMutation: api.useDesignStudioResolveCommentMutation,\n useReopenCommentMutation: api.useDesignStudioReopenCommentMutation,\n useKeepCommentMutation: api.useDesignStudioKeepCommentMutation,\n };\n};\n","'use client';\n\nimport { normalizeDddError } from '@mgamadeus/ddd-web/api';\nimport { Hourglass, LayoutGrid, Palette } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { useDesignStudio } from '../provider/DesignStudioProvider';\n\nexport interface DesignStudioOverviewScreenProps {\n /** Page title (a two-tone title wraps its accent part in `<em>`). */\n title?: ReactNode;\n /** One line under the title. */\n description?: ReactNode;\n}\n\n/** Overview: every design project with its canvases (boards, open threads, decisions per canvas). */\nexport const DesignStudioOverviewScreen = ({\n title = (\n <>\n Design <em>Studio</em>\n </>\n ),\n description = 'Design projects and their canvases — review, comment, decide.',\n}: DesignStudioOverviewScreenProps) => {\n const { api, components, paths, router } = useDesignStudio();\n const { Badge, Card, CardContent, CardHeader, CardTitle, CardGrid, PageHeader, PageSections, Skeleton, StatusCallout } =\n components;\n const { Link } = router;\n const { data, isLoading, error } = api.useOverviewQuery();\n const overview = data?.designStudioOverview;\n const projects = overview?.projects?.elements ?? [];\n const expiringThreadCount = overview?.expiringThreadCount ?? 0;\n\n return (\n <>\n <PageHeader\n title={title}\n description={description}\n leading={<Palette className=\"size-7 text-brand-emphasis\" aria-hidden />}\n />\n {error && (\n <StatusCallout\n tone=\"destructive\"\n title=\"The overview could not be loaded\"\n description={normalizeDddError(error, 'Request failed').message}\n className=\"mb-6\"\n />\n )}\n <PageSections>\n {isLoading && <Skeleton className=\"h-40 w-full rounded-2xl\" />}\n {!isLoading && !error && projects.length === 0 && (\n <StatusCallout\n title=\"No design projects configured\"\n description=\"Projects and canvases are configured in the backend; their boards are read from the canvas folders in the checkout.\"\n />\n )}\n {projects.length > 0 && (\n <CardGrid>\n {projects.map(project => {\n const projectKey = project.projectKey ?? '';\n const canvases = project.canvases?.elements ?? [];\n return (\n <Card key={projectKey}>\n <CardHeader>\n <CardTitle className=\"flex items-center justify-between gap-2 text-title-card\">\n <Link href={paths.project(projectKey)} className=\"hover:underline\">\n {project.label ?? projectKey}\n </Link>\n <Badge variant=\"outline\">\n {canvases.length} {canvases.length === 1 ? 'canvas' : 'canvases'}\n </Badge>\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-2\">\n {canvases.length === 0 && (\n <p className=\"text-sm text-muted-foreground\">No canvas configured for this project yet.</p>\n )}\n {canvases.map(canvas => (\n <Link\n key={canvas.canvasKey}\n href={paths.canvas(projectKey, canvas.canvasKey ?? '')}\n className=\"flex items-center justify-between gap-3 rounded-xl bg-tint px-3 py-2 text-sm transition-colors hover:bg-tint-strong\"\n >\n <span className=\"flex min-w-0 items-center gap-2 font-medium\">\n <LayoutGrid className=\"size-4 shrink-0 text-brand-emphasis\" aria-hidden />\n <span className=\"truncate\">{canvas.label ?? canvas.canvasKey}</span>\n </span>\n <span className=\"shrink-0 text-muted-foreground\">\n {canvas.boardCount ?? 0} boards · {canvas.openThreadCount ?? 0} open ·{' '}\n {canvas.decisionCount ?? 0} decisions\n </span>\n </Link>\n ))}\n </CardContent>\n </Card>\n );\n })}\n </CardGrid>\n )}\n {overview && (\n <p className=\"flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground\">\n <span>Boards are read from the canvas folders in the checkout; open threads and decisions are counted per canvas.</span>\n {expiringThreadCount > 0 && (\n <span className=\"inline-flex items-center gap-1 font-medium text-foreground\">\n <Hourglass className=\"size-3.5\" aria-hidden />\n {expiringThreadCount} {expiringThreadCount === 1 ? 'thread expires' : 'threads expire'} soon (threads idle\n for {overview.threadIdleDays ?? 0} days are deleted) — open the board and choose “Keep”.\n </span>\n )}\n </p>\n )}\n </PageSections>\n </>\n );\n};\n","'use client';\n\nimport { normalizeDddError } from '@mgamadeus/ddd-web/api';\nimport { Flag, LayoutGrid, MessageSquare } from 'lucide-react';\n\nimport { useDesignStudio } from '../provider/DesignStudioProvider';\n\nexport interface DesignStudioProjectScreenProps {\n projectKey: string;\n}\n\n/** One design project: its canvases as cards (projects and canvases come from the studio's overview). */\nexport const DesignStudioProjectScreen = ({ projectKey }: DesignStudioProjectScreenProps) => {\n const { api, components, paths, router } = useDesignStudio();\n const { Card, CardContent, PageHeader, Skeleton, StatusCallout } = components;\n const { Link } = router;\n const { data, isLoading, error } = api.useOverviewQuery();\n const project = data?.designStudioOverview.projects?.elements?.find(item => item.projectKey === projectKey);\n const canvases = project?.canvases?.elements ?? [];\n const isLoaded = !isLoading && !error;\n\n return (\n <>\n <PageHeader\n title={project?.label ?? projectKey}\n description={project ? 'The canvases of this design project.' : undefined}\n />\n {error && (\n <StatusCallout\n tone=\"destructive\"\n title=\"The canvases could not be loaded\"\n description={normalizeDddError(error, 'Request failed').message}\n />\n )}\n {isLoading && <Skeleton className=\"h-32 w-full rounded-2xl\" />}\n {isLoaded && !project && (\n <StatusCallout\n title=\"No design project with this key is configured\"\n description={\n <>\n The design studio knows no project <code className=\"font-mono text-xs\">{projectKey}</code>. Projects and\n their canvases are configured in the backend and read from the checkout folder.\n </>\n }\n />\n )}\n {isLoaded && project && canvases.length === 0 && (\n <StatusCallout\n title=\"No canvases yet\"\n description=\"Canvases are configured per project and their boards are read from the canvas folder in the checkout; a configured canvas appears here.\"\n />\n )}\n {canvases.length > 0 && (\n <div className=\"grid gap-4 [grid-template-columns:repeat(auto-fill,minmax(320px,1fr))]\">\n {canvases.map(canvas => (\n <Link key={canvas.canvasKey} href={paths.canvas(projectKey, canvas.canvasKey ?? '')} className=\"group\">\n <Card className=\"h-full gap-0 py-0 transition-shadow group-hover:shadow-md\">\n <CardContent className=\"flex h-full flex-col gap-2 p-4\">\n <span className=\"flex items-center gap-2 font-semibold\">\n <LayoutGrid className=\"size-4 shrink-0 text-brand-emphasis\" aria-hidden />\n <span className=\"truncate\">{canvas.label ?? canvas.canvasKey}</span>\n </span>\n <p className=\"text-sm text-muted-foreground\">\n {canvas.boardCount ?? 0} boards\n <span className=\"inline-flex items-center gap-1 pl-3\">\n <MessageSquare className=\"size-3.5\" aria-hidden /> {canvas.openThreadCount ?? 0} open\n </span>\n <span className=\"inline-flex items-center gap-1 pl-3\">\n <Flag className=\"size-3.5\" aria-hidden /> {canvas.decisionCount ?? 0} decisions\n </span>\n </p>\n <p className=\"mt-auto text-xs text-muted-foreground\">{canvas.canvasKey}</p>\n </CardContent>\n </Card>\n </Link>\n ))}\n </div>\n )}\n </>\n );\n};\n","'use client';\n\nimport { ClipboardCheck } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { useDesignStudioComponents } from '../provider/DesignStudioProvider';\n\nexport interface DesignStudioReviewsScreenProps {\n /** One line under the title. */\n description?: ReactNode;\n /** Text of the empty state. */\n emptyDescription?: ReactNode;\n}\n\n/** Reviews linked to boards (empty for now: review documents come with a later step of the studio). */\nexport const DesignStudioReviewsScreen = ({\n description = 'Reviews with scores, linked to the boards.',\n emptyDescription = 'Review documents (scores, findings linked to boards, verified / adopted / rejected) come with a later step of the design studio.',\n}: DesignStudioReviewsScreenProps) => {\n const { PageHeader, StatusCallout } = useDesignStudioComponents();\n return (\n <>\n <PageHeader title=\"Reviews\" description={description} />\n <StatusCallout icon={ClipboardCheck} title=\"No reviews imported yet\" description={emptyDescription} />\n </>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgCO,IAAM,oBAAoB;AAqDjC,IAAM,WAAW,CAAC,EAAE,MAAM,mBAAmB,IAAI,OAAO,CAAC;AACzD,IAAM,cAAc,CAAC,EAAE,MAAM,mBAAmB,IAAI,OAAO,GAAG,EAAE,MAAM,kBAAkB,CAAC;AASlF,IAAM,wBAAwB,CAAsD;AAAA,EACzF;AAAA,EACA;AACF,MAA4E;AAC1E,QAAM,YAAY,CAAC,QACjB,GAAG,SAAS,aAAa,IAAI,UAAU,IAAI,IAAI,S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AAA,OACzE,GACF,KAlBS,OAAO,SAmBlB,CACD,GACH;AAAA,KAEJ;AAEJ;;;AC9EA,SAAS,sBAAsB;AAmB3B,qBAAAI,WACE,OAAAC,MADF,QAAAC,aAAA;AANG,IAAM,4BAA4B,CAAC;AAAA,EACxC,cAAc;AAAA,EACd,mBAAmB;AACrB,MAAsC;AACpC,QAAM,EAAE,YAAY,cAAc,IAAI,0BAA0B;AAChE,SACE,gBAAAA,MAAAF,WAAA,EACE;AAAA,oBAAAC,KAAC,cAAW,OAAM,WAAU,aAA0B;AAAA,IACtD,gBAAAA,KAAC,iBAAc,MAAM,gBAAgB,OAAM,2BAA0B,aAAa,kBAAkB;AAAA,KACtG;AAEJ;","names":["normalizeDddError","LayoutGrid","Fragment","jsx","jsxs","normalizeDddError","LayoutGrid","Fragment","jsx","jsxs"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,88 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mgamadeus/ddd-design-studio",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "React frontend of the design review studio for backends built with mgamadeus/ddd (Composer package mgamadeus/ddd-design-studio): project overview, a canvas of HTML design boards with live sandboxed previews and thumbnails, comment threads with pins, review statuses and plain-text design references for agents.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ddd",
|
|
7
|
+
"mgamadeus",
|
|
8
|
+
"design-review",
|
|
9
|
+
"design-studio",
|
|
10
|
+
"canvas",
|
|
11
|
+
"react",
|
|
12
|
+
"rtk-query",
|
|
13
|
+
"xyflow",
|
|
14
|
+
"tailwindcss"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://github.com/ddd-framework/ddd-design-studio/tree/main/web#readme",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/ddd-framework/ddd-design-studio/issues"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/ddd-framework/ddd-design-studio.git",
|
|
23
|
+
"directory": "web"
|
|
24
|
+
},
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"author": "Marius-Eugen Gerdan <marius@gerdan.net>",
|
|
27
|
+
"type": "module",
|
|
28
|
+
"sideEffects": [
|
|
29
|
+
"**/*.css",
|
|
30
|
+
"./dist/canvas/index.js"
|
|
31
|
+
],
|
|
32
|
+
"exports": {
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"import": "./dist/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./canvas": {
|
|
38
|
+
"types": "./dist/canvas/index.d.ts",
|
|
39
|
+
"import": "./dist/canvas/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./package.json": "./package.json"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist",
|
|
45
|
+
"README.md",
|
|
46
|
+
"LICENSE"
|
|
47
|
+
],
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "node scripts/clean.mjs && tsup && node scripts/check-package.mjs .",
|
|
50
|
+
"typecheck": "tsc -p .",
|
|
51
|
+
"test": "node --experimental-strip-types --no-warnings --test \"src/**/*.test.ts\"",
|
|
52
|
+
"prepack": "pnpm build"
|
|
53
|
+
},
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=20"
|
|
56
|
+
},
|
|
57
|
+
"packageManager": "pnpm@12.16.1",
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"access": "public"
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"clsx": "^2.1.1",
|
|
63
|
+
"tailwind-merge": "^3.7.0"
|
|
64
|
+
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"@mgamadeus/ddd-web": "^0.3.0",
|
|
67
|
+
"@reduxjs/toolkit": "^2.13.0",
|
|
68
|
+
"@xyflow/react": "^12.12.1",
|
|
69
|
+
"lucide-react": "^1.66.0",
|
|
70
|
+
"react": "^19.3.1",
|
|
71
|
+
"react-dom": "^19.3.1",
|
|
72
|
+
"react-redux": "^9.3.1"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@mgamadeus/ddd-web": "^0.3.0",
|
|
76
|
+
"@reduxjs/toolkit": "^2.13.0",
|
|
77
|
+
"@types/node": "^24.0.0",
|
|
78
|
+
"@types/react": "^19.3.0",
|
|
79
|
+
"@types/react-dom": "^19.3.0",
|
|
80
|
+
"@xyflow/react": "^12.12.1",
|
|
81
|
+
"lucide-react": "^1.66.0",
|
|
82
|
+
"react": "^19.3.1",
|
|
83
|
+
"react-dom": "^19.3.1",
|
|
84
|
+
"react-redux": "^9.3.1",
|
|
85
|
+
"tsup": "^9.0.0",
|
|
86
|
+
"typescript": "^6.0.3"
|
|
87
|
+
}
|
|
88
|
+
}
|