@mgamadeus/ddd-design-studio 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -1
- package/dist/canvas/index.js +179 -712
- package/dist/canvas/index.js.map +1 -1
- package/dist/chunk-NCMXGWLC.js +860 -0
- package/dist/chunk-NCMXGWLC.js.map +1 -0
- package/dist/index.d.ts +36 -2
- package/dist/index.js +367 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-YYKTDLFF.js +0 -275
- package/dist/chunk-YYKTDLFF.js.map +0 -1
package/README.md
CHANGED
|
@@ -116,7 +116,7 @@ Pass one stable object (a module constant) to `DesignStudioProvider`. Entries na
|
|
|
116
116
|
| `router.useSearchParamsWriter` | `() => (updates) => void` | replaces search parameters of the current page: no history entry, no scroll jump, other parameters kept, same-tick writes merged; `null` removes one |
|
|
117
117
|
| `router.useUrlState` | `(keys, { stateId, debounceMs, uncounted }) => { values, debounced, setValue }` | the canvas state (`q`, `section`, `status`, `theme`, `mode`, `vp`) in the URL, restored from what the application remembered under `stateId` when the URL has none of the keys |
|
|
118
118
|
| `router.useNavigate` (optional) | `() => (href) => void` | client navigation to an in-app path (query allowed, with a history entry); the overview uses it to open a board code; without it the overview shows a link to click |
|
|
119
|
-
| `paths` | `overview()`, `project(projectKey)`, `canvas(projectKey, canvasKey)` | in-app paths of the studio's pages |
|
|
119
|
+
| `paths` | `overview()`, `project(projectKey)`, `canvas(projectKey, canvasKey)`, optional `site(projectKey, canvasKey, route)` | in-app paths of the studio's pages |
|
|
120
120
|
| `components` | `DesignStudioComponents` | UI slots: `Button`, `Badge`, `Card`, `CardHeader`, `CardTitle`, `CardContent`, `Skeleton`, `Checkbox`, `Label`, `Textarea`, `Dialog`, `DialogContent`, `DialogTitle`, `DialogDescription`, `Popover`, `PopoverTrigger`, `PopoverContent`, `Tooltip`, `TooltipTrigger`, `TooltipContent`, `DropdownMenu`, `DropdownMenuTrigger`, `DropdownMenuContent`, `DropdownMenuItem`, `DropdownMenuSeparator`, `Combobox`, `SearchField`, `QuickFilterPills`, `StatusBadge`, `PageHeader`, `StatusCallout`, `CardGrid`, `PageSections` — each typed with only the props the studio passes ([`src/provider/types.ts`](src/provider/types.ts), interface `DesignStudioComponents`) |
|
|
121
121
|
| `notify` | `success(message)`, `error(message)`, `info(message, { id, action })` | toasts |
|
|
122
122
|
| `formatDateTime` | `(value) => string` | a backend date-time for the viewer |
|
|
@@ -152,6 +152,10 @@ Inside the package, components read it with `useDesignStudio()` or the narrower
|
|
|
152
152
|
| `thumbnailsLastError(error)` | `Last error: <error>` |
|
|
153
153
|
| `themeWithoutDarkMode` | `This theme has no dark mode` |
|
|
154
154
|
| `thumbnailMissing` | `No thumbnail yet` |
|
|
155
|
+
| `thumbnailLoading` | `Loading…` |
|
|
156
|
+
| `sitePageMissing(path)` | `No page for <path>` |
|
|
157
|
+
| `siteExternalLink(href)` | `External link, not followed: <href>` |
|
|
158
|
+
| `openAsWebsite` | `Open as website` |
|
|
155
159
|
| `referenceNotePlaceholder` | `What should change? (optional, goes into the reference)` |
|
|
156
160
|
| `boardCodeNotFound(code)` | `No board has the code <code>` |
|
|
157
161
|
| `boardLinkCopied(code)` | `Link to <code> copied` |
|
|
@@ -176,6 +180,7 @@ The package has no router. The application creates one page per screen and tells
|
|
|
176
180
|
| overview of the projects | `DesignStudioOverviewScreen` | `overview()` |
|
|
177
181
|
| one project and its canvases | `DesignStudioProjectScreen` (`projectKey`) | `project(projectKey)` |
|
|
178
182
|
| one canvas | `DesignStudioCanvasScreen` (`projectKey`, `canvasKey`) from `/canvas` | `canvas(projectKey, canvasKey)` |
|
|
183
|
+
| a canvas as a website (optional) | `DesignStudioSiteScreen` (`projectKey`, `canvasKey`, `route`: the rest of the path, e.g. `/pricing`) | `site(projectKey, canvasKey, route)`; without it the canvas offers no "Open as website" |
|
|
179
184
|
| reviews (optional; an empty state in this version) | `DesignStudioReviewsScreen` | none: linked by the application's own navigation |
|
|
180
185
|
|
|
181
186
|
The canvas page keeps its state in search parameters: `board` (the focus view), `q`, `section`, `status`, `theme`,
|
|
@@ -300,6 +305,7 @@ The package has no router. The application creates one page per screen and tells
|
|
|
300
305
|
| overview of the projects | `DesignStudioOverviewScreen` | `overview()` |
|
|
301
306
|
| one project and its canvases | `DesignStudioProjectScreen` (`projectKey`) | `project(projectKey)` |
|
|
302
307
|
| one canvas | `DesignStudioCanvasScreen` (`projectKey`, `canvasKey`) from `/canvas` | `canvas(projectKey, canvasKey)` |
|
|
308
|
+
| a canvas as a website (optional) | `DesignStudioSiteScreen` (`projectKey`, `canvasKey`, `route`: the rest of the path, e.g. `/pricing`) | `site(projectKey, canvasKey, route)`; without it the canvas offers no "Open as website" |
|
|
303
309
|
| reviews (optional; an empty state in this version) | `DesignStudioReviewsScreen` | none: linked by the application's own navigation |
|
|
304
310
|
|
|
305
311
|
The canvas page keeps its state in search parameters: `board` (the focus view), `q`, `section`, `status`, `theme`,
|
|
@@ -358,6 +364,9 @@ const ENVIRONMENT: DesignStudioEnvironment = {
|
|
|
358
364
|
overview: () => '/design',
|
|
359
365
|
project: projectKey => `/design/${projectKey}`,
|
|
360
366
|
canvas: (projectKey, canvasKey) => `/design/${projectKey}/canvases/${canvasKey}`,
|
|
367
|
+
// optional: the site view; the page `/design/[projectKey]/canvases/[canvasKey]/site/[[...route]]` passes
|
|
368
|
+
// `'/' + (route ?? []).join('/')` to DesignStudioSiteScreen
|
|
369
|
+
site: (projectKey, canvasKey, route) => `/design/${projectKey}/canvases/${canvasKey}/site${route === '/' ? '' : route}`,
|
|
361
370
|
},
|
|
362
371
|
components: { Button, Badge, Card /* … every slot of DesignStudioComponents */ },
|
|
363
372
|
notify: { success: toast.success, error: toast.error, info: toast.info },
|