@djangocfg/ui-tools 2.1.158 → 2.1.159
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 +19 -5
- package/package.json +11 -6
package/README.md
CHANGED
|
@@ -49,8 +49,21 @@ import { Gallery, GalleryLightbox } from '@djangocfg/ui-tools/gallery';
|
|
|
49
49
|
|
|
50
50
|
// Only loads Map (~800KB)
|
|
51
51
|
import { MapContainer, MapMarker } from '@djangocfg/ui-tools/map';
|
|
52
|
+
|
|
53
|
+
// Mermaid builders (no heavy Mermaid dependency until render)
|
|
54
|
+
import { FlowDiagram, SequenceDiagram, JourneyDiagram } from '@djangocfg/ui-tools/mermaid';
|
|
52
55
|
```
|
|
53
56
|
|
|
57
|
+
## Exports
|
|
58
|
+
|
|
59
|
+
| Path | Content |
|
|
60
|
+
|------|---------|
|
|
61
|
+
| `@djangocfg/ui-tools` | All tools with lazy loading |
|
|
62
|
+
| `@djangocfg/ui-tools/gallery` | Gallery components & hooks |
|
|
63
|
+
| `@djangocfg/ui-tools/map` | Map components & utilities |
|
|
64
|
+
| `@djangocfg/ui-tools/mermaid` | Mermaid component & declarative builders |
|
|
65
|
+
| `@djangocfg/ui-tools/styles` | CSS styles |
|
|
66
|
+
|
|
54
67
|
## Gallery
|
|
55
68
|
|
|
56
69
|
Full-featured image/video gallery with carousel, grid view, and fullscreen lightbox.
|
|
@@ -241,9 +254,9 @@ Render Mermaid diagrams with fullscreen zoom support and type-safe declarative b
|
|
|
241
254
|
### Basic Usage
|
|
242
255
|
|
|
243
256
|
```tsx
|
|
244
|
-
import
|
|
257
|
+
import { LazyMermaid } from '@djangocfg/ui-tools';
|
|
245
258
|
|
|
246
|
-
<
|
|
259
|
+
<LazyMermaid chart={`
|
|
247
260
|
graph TD
|
|
248
261
|
A[Start] --> B{Decision}
|
|
249
262
|
B -->|Yes| C[Action]
|
|
@@ -265,13 +278,14 @@ import Mermaid from '@djangocfg/ui-tools/tools/Mermaid';
|
|
|
265
278
|
Type-safe builders for creating Mermaid diagrams programmatically:
|
|
266
279
|
|
|
267
280
|
```tsx
|
|
268
|
-
import
|
|
281
|
+
import { LazyMermaid } from '@djangocfg/ui-tools';
|
|
282
|
+
import {
|
|
269
283
|
FlowDiagram,
|
|
270
284
|
SequenceDiagram,
|
|
271
285
|
JourneyDiagram,
|
|
272
286
|
useStylePresets,
|
|
273
287
|
useBoxColors,
|
|
274
|
-
} from '@djangocfg/ui-tools/
|
|
288
|
+
} from '@djangocfg/ui-tools/mermaid';
|
|
275
289
|
|
|
276
290
|
function MyDiagram() {
|
|
277
291
|
const presets = useStylePresets();
|
|
@@ -295,7 +309,7 @@ function MyDiagram() {
|
|
|
295
309
|
flow.style.define('success', presets.success);
|
|
296
310
|
flow.style.apply('success', 'success', 'finish');
|
|
297
311
|
|
|
298
|
-
return <
|
|
312
|
+
return <LazyMermaid chart={flow.toString()} />;
|
|
299
313
|
}
|
|
300
314
|
```
|
|
301
315
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/ui-tools",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.159",
|
|
4
4
|
"description": "Heavy React tools with lazy loading - for Electron, Vite, CRA, Next.js apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui-tools",
|
|
@@ -47,6 +47,11 @@
|
|
|
47
47
|
"import": "./src/tools/Map/index.ts",
|
|
48
48
|
"require": "./src/tools/Map/index.ts"
|
|
49
49
|
},
|
|
50
|
+
"./mermaid": {
|
|
51
|
+
"types": "./src/tools/Mermaid/index.tsx",
|
|
52
|
+
"import": "./src/tools/Mermaid/index.tsx",
|
|
53
|
+
"require": "./src/tools/Mermaid/index.tsx"
|
|
54
|
+
},
|
|
50
55
|
"./styles": "./src/styles/index.css"
|
|
51
56
|
},
|
|
52
57
|
"files": [
|
|
@@ -63,8 +68,8 @@
|
|
|
63
68
|
"check": "tsc --noEmit"
|
|
64
69
|
},
|
|
65
70
|
"peerDependencies": {
|
|
66
|
-
"@djangocfg/i18n": "^2.1.
|
|
67
|
-
"@djangocfg/ui-core": "^2.1.
|
|
71
|
+
"@djangocfg/i18n": "^2.1.159",
|
|
72
|
+
"@djangocfg/ui-core": "^2.1.159",
|
|
68
73
|
"lucide-react": "^0.545.0",
|
|
69
74
|
"react": "^19.0.0",
|
|
70
75
|
"react-dom": "^19.0.0",
|
|
@@ -96,10 +101,10 @@
|
|
|
96
101
|
"@maplibre/maplibre-gl-geocoder": "^1.7.0"
|
|
97
102
|
},
|
|
98
103
|
"devDependencies": {
|
|
99
|
-
"@djangocfg/i18n": "^2.1.
|
|
104
|
+
"@djangocfg/i18n": "^2.1.159",
|
|
100
105
|
"@djangocfg/playground": "workspace:*",
|
|
101
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
102
|
-
"@djangocfg/ui-core": "^2.1.
|
|
106
|
+
"@djangocfg/typescript-config": "^2.1.159",
|
|
107
|
+
"@djangocfg/ui-core": "^2.1.159",
|
|
103
108
|
"@types/mapbox__mapbox-gl-draw": "^1.4.8",
|
|
104
109
|
"@types/node": "^24.7.2",
|
|
105
110
|
"@types/react": "^19.1.0",
|