@djangocfg/ui-tools 2.1.385 → 2.1.389
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 +25 -11
- package/dist/ChatRoot-EFNXQXXN.cjs +15 -0
- package/dist/{ChatRoot-JVR3M3H2.mjs.map → ChatRoot-EFNXQXXN.cjs.map} +1 -1
- package/dist/ChatRoot-FITF5RVP.mjs +6 -0
- package/dist/{ChatRoot-LXIUBOXF.cjs.map → ChatRoot-FITF5RVP.mjs.map} +1 -1
- package/dist/{DocsLayout-2P3ONDWJ.mjs → DocsLayout-EKASBSP7.mjs} +3 -3
- package/dist/{DocsLayout-2P3ONDWJ.mjs.map → DocsLayout-EKASBSP7.mjs.map} +1 -1
- package/dist/{DocsLayout-2YZNS5VK.cjs → DocsLayout-OURFYWQE.cjs} +8 -8
- package/dist/{DocsLayout-2YZNS5VK.cjs.map → DocsLayout-OURFYWQE.cjs.map} +1 -1
- package/dist/MapContainer-AKIPABJK.mjs +4 -0
- package/dist/MapContainer-AKIPABJK.mjs.map +1 -0
- package/dist/MapContainer-STVDMC36.cjs +17 -0
- package/dist/MapContainer-STVDMC36.cjs.map +1 -0
- package/dist/{chunk-HIK6BPL7.mjs → chunk-2NG4SXEP.mjs} +6 -5
- package/dist/chunk-2NG4SXEP.mjs.map +1 -0
- package/dist/chunk-4LFB7I5K.cjs +1387 -0
- package/dist/chunk-4LFB7I5K.cjs.map +1 -0
- package/dist/{MapContainer-76YL2JXL.cjs → chunk-5D2OCOPQ.cjs} +3 -2
- package/dist/chunk-5D2OCOPQ.cjs.map +1 -0
- package/dist/chunk-6ZX2G25W.mjs +1361 -0
- package/dist/chunk-6ZX2G25W.mjs.map +1 -0
- package/dist/{MapContainer-7HXBI3OH.mjs → chunk-7CWGZPO3.mjs} +3 -3
- package/dist/chunk-7CWGZPO3.mjs.map +1 -0
- package/dist/{chunk-FIRK5CEH.cjs → chunk-7IYXZUJO.cjs} +8 -4
- package/dist/chunk-7IYXZUJO.cjs.map +1 -0
- package/dist/{chunk-PEKBT75W.mjs → chunk-DMX7W4XZ.mjs} +53 -1387
- package/dist/chunk-DMX7W4XZ.mjs.map +1 -0
- package/dist/chunk-NTVBIIUD.mjs +1439 -0
- package/dist/chunk-NTVBIIUD.mjs.map +1 -0
- package/dist/{chunk-HPK3EWBF.cjs → chunk-TBSHZO5R.cjs} +50 -1409
- package/dist/chunk-TBSHZO5R.cjs.map +1 -0
- package/dist/chunk-W75B7Y6C.cjs +1478 -0
- package/dist/chunk-W75B7Y6C.cjs.map +1 -0
- package/dist/index.cjs +1269 -1790
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +660 -623
- package/dist/index.d.ts +660 -623
- package/dist/index.mjs +856 -1427
- package/dist/index.mjs.map +1 -1
- package/dist/launcher-5Y42OBSN.mjs +6 -0
- package/dist/launcher-5Y42OBSN.mjs.map +1 -0
- package/dist/launcher-PMW2YB24.cjs +59 -0
- package/dist/launcher-PMW2YB24.cjs.map +1 -0
- package/package.json +23 -18
- package/src/components/index.ts +2 -2
- package/src/index.ts +20 -2
- package/src/tools/AudioPlayer/lazy.tsx +100 -0
- package/src/tools/Chat/README.md +85 -1
- package/src/tools/Chat/components/MessageBubble.tsx +1 -1
- package/src/tools/Chat/context/ChatProvider.tsx +42 -0
- package/src/tools/Chat/index.ts +1 -1
- package/src/tools/Chat/lazy.tsx +300 -1
- package/src/tools/CodeEditor/lazy.tsx +70 -0
- package/src/tools/Map/lazy.tsx +38 -1
- package/src/tools/MarkdownEditor/lazy.tsx +42 -0
- package/src/{components/markdown → tools}/MarkdownMessage/CodeBlock.tsx +1 -1
- package/src/{components/markdown → tools}/MarkdownMessage/CollapseToggle.tsx +1 -1
- package/src/{components/markdown → tools}/MarkdownMessage/MarkdownMessage.tsx +1 -1
- package/src/{components/markdown → tools}/MarkdownMessage/components.tsx +2 -2
- package/src/tools/OpenapiViewer/components/DocsLayout/ApiIntroSection.tsx +1 -1
- package/src/tools/OpenapiViewer/components/DocsLayout/EndpointDoc/Header/index.tsx +1 -1
- package/src/tools/SpeechRecognition/README.md +48 -0
- package/dist/ChatRoot-JVR3M3H2.mjs +0 -5
- package/dist/ChatRoot-LXIUBOXF.cjs +0 -14
- package/dist/MapContainer-76YL2JXL.cjs.map +0 -1
- package/dist/MapContainer-7HXBI3OH.mjs.map +0 -1
- package/dist/chunk-FIRK5CEH.cjs.map +0 -1
- package/dist/chunk-HIK6BPL7.mjs.map +0 -1
- package/dist/chunk-HPK3EWBF.cjs.map +0 -1
- package/dist/chunk-PEKBT75W.mjs.map +0 -1
- package/src/components/markdown/index.ts +0 -19
- /package/src/{components/markdown → hooks}/useCollapsibleContent.ts +0 -0
- /package/src/{components/markdown → tools}/MarkdownMessage/ActionRow.tsx +0 -0
- /package/src/{components/markdown → tools}/MarkdownMessage/ChatMessageRow.tsx +0 -0
- /package/src/{components/markdown → tools}/MarkdownMessage/README.md +0 -0
- /package/src/{components/markdown → tools}/MarkdownMessage/index.ts +0 -0
- /package/src/{components/markdown → tools}/MarkdownMessage/linkRules.ts +0 -0
- /package/src/{components/markdown → tools}/MarkdownMessage/plainText.ts +0 -0
- /package/src/{components/markdown → tools}/MarkdownMessage/sanitize.ts +0 -0
- /package/src/{components/markdown → tools}/MarkdownMessage/types.ts +0 -0
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ Sixteen tools, each one lazy-loaded so it doesn't ship until used. Bundle size i
|
|
|
33
33
|
| `Chat` | ~150KB | Streaming chat (SSE + tool calls + attachments). [README](src/tools/Chat/README.md) |
|
|
34
34
|
| `SpeechRecognition` | ~40KB | Mic capture + STT with pluggable engines (Web Speech / HTTP / WS). [README](src/tools/SpeechRecognition/README.md) |
|
|
35
35
|
| `VideoPlayer` | ~150KB | Vidstack-based pro player |
|
|
36
|
-
| `MarkdownMessage` | ~120KB | Read-only chat-tuned markdown. [README](src/components/markdown/MarkdownMessage/README.md) |
|
|
36
|
+
| `MarkdownMessage` | ~120KB | Read-only chat-tuned markdown. **SSR-safe** — use as a Client Component, the result is server-rendered. [README](src/components/markdown/MarkdownMessage/README.md) |
|
|
37
37
|
| `JsonTree` | ~100KB | JSON visualization (full/compact/inline modes) |
|
|
38
38
|
| `AudioPlayer` | ~80KB | WebView-safe waveform player |
|
|
39
39
|
| `Gallery` | ~50KB | Image/video gallery + lightbox |
|
|
@@ -57,19 +57,33 @@ For bundle splitting, import from the tool's subpath — only that tool ships:
|
|
|
57
57
|
```tsx
|
|
58
58
|
import { LazyJsonTree } from '@djangocfg/ui-tools/json-tree';
|
|
59
59
|
import { Gallery } from '@djangocfg/ui-tools/gallery';
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
60
|
+
import { LazyMapContainer, MapMarker } from '@djangocfg/ui-tools/map';
|
|
61
|
+
import { MarkdownMessage } from '@djangocfg/ui-tools/markdown-message';
|
|
62
|
+
import { LazyEditor, useMonaco } from '@djangocfg/ui-tools/code-editor';
|
|
63
|
+
import { LazyChat, createPydanticAIChatTransport } from '@djangocfg/ui-tools/chat';
|
|
64
|
+
import { LazyMarkdownEditor, mentionPresets } from '@djangocfg/ui-tools/markdown-editor';
|
|
65
|
+
import { LazyPlayer, PlayerProvider } from '@djangocfg/ui-tools/audio-player';
|
|
64
66
|
// …same pattern for every tool
|
|
65
67
|
```
|
|
66
68
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
Subpaths come in three flavors:
|
|
70
|
+
|
|
71
|
+
- **Lazy + light surface.** The heavy component is exported only as a `Lazy*` wrapper; types, hooks, transports, slot components, and pure helpers are exported synchronously. This is the standard pattern.
|
|
72
|
+
- **Lazy primitives co-exist with light primitives.** `./map` exports `LazyMapContainer` (heavy MapLibre GL) plus `MapMarker` / `MapPopup` etc. — the markers are thin `react-map-gl` wrappers that don't import the heavy lib at module scope.
|
|
73
|
+
- **Synchronous, SSR-safe.** `./markdown-message` is intentionally not lazy — the component is `'use client'` but produces plain HTML, so Next renders it on the server.
|
|
74
|
+
|
|
75
|
+
| Subpath | Ships | Notes |
|
|
76
|
+
|---------|-------|-------|
|
|
77
|
+
| `@djangocfg/ui-tools` | All tools (lazy) | App-level barrel. Treeshakes per-tool when used via subpaths. |
|
|
78
|
+
| `@djangocfg/ui-tools/chat` | `LazyChat`, `LazyChatLauncher`, transports (`createPydanticAIChatTransport`, `createHttpTransport`, …), hooks (`useChat`, `useChatAudio`, …), reducer/core/types/style tokens | Heavy `ChatRoot` + `ChatLauncher` only load via the `Lazy*` wrappers. Custom layouts that need raw `MessageBubble` / `Composer` should import from the root barrel. |
|
|
79
|
+
| `@djangocfg/ui-tools/code-editor` | `LazyEditor`, `LazyDiffEditor`, `useMonaco`, `useEditor`, `useLanguage`, `useEditorTheme`, `EditorProvider`, types | Monaco (~550 KB) loads only when an editor mounts. `useMonaco` does its own dynamic import. |
|
|
80
|
+
| `@djangocfg/ui-tools/audio-player` | `LazyPlayer`, `PlayerProvider`, selector hooks, slot components (`Cover`, `Title`, `PlayButton`, `Waveform`, …), peaks-cache helpers, store, types | Slot components are presentational — safe synchronous re-exports. They only do anything inside a `<LazyPlayer>` provider. |
|
|
81
|
+
| `@djangocfg/ui-tools/markdown-editor` | `LazyMarkdownEditor`, `mentionPresets`, types | TipTap + ProseMirror (~200 KB) only loads via the lazy wrapper. |
|
|
82
|
+
| `@djangocfg/ui-tools/map` | `LazyMapContainer`, `LazyMapView`, plus light primitives (`MapMarker`, `MapPopup`, `MapCluster`, `MapSource`, `MapLayer`, `MapControls`, `MapProvider`, types) | The heavy MapLibre GL chunk (~800 KB) only loads when `LazyMapContainer` actually mounts. Markers and popups are thin `react-map-gl` wrappers — exported synchronously. |
|
|
83
|
+
| `@djangocfg/ui-tools/markdown-message` | `MarkdownMessage`, `ChatMessageRow`, `ActionRow`, `extractTextFromChildren`, types | **SSR-safe.** The component itself is `'use client'`, but rendering produces plain HTML — Next.js will pre-render it on the server when imported from a Client Component. Use this when you want the markdown renderer without dragging in the full chat. |
|
|
84
|
+
| `@djangocfg/ui-tools/<tool-name>` | One tool | `mermaid`, `speech-recognition`, `json-tree`, `pretty-code`, `openapi-viewer`, `json-form`, `lottie-player`, `video-player`, `image-viewer`, `cron-scheduler`, `gallery`, `tour`, `tree`, `file-icon`, `upload` |
|
|
85
|
+
| `@djangocfg/ui-tools/styles` | Tailwind source CSS | |
|
|
86
|
+
| `@djangocfg/ui-tools/dist.css` | Pre-compiled CSS | |
|
|
73
87
|
|
|
74
88
|
---
|
|
75
89
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk4LFB7I5K_cjs = require('./chunk-4LFB7I5K.cjs');
|
|
4
|
+
require('./chunk-TBSHZO5R.cjs');
|
|
5
|
+
require('./chunk-7IYXZUJO.cjs');
|
|
6
|
+
require('./chunk-OLISEQHS.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "ChatRoot", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return chunk4LFB7I5K_cjs.ChatRoot; }
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=ChatRoot-EFNXQXXN.cjs.map
|
|
15
|
+
//# sourceMappingURL=ChatRoot-EFNXQXXN.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"ChatRoot-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ChatRoot-EFNXQXXN.cjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"ChatRoot-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ChatRoot-FITF5RVP.mjs"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { deduplicateEndpoints, dereferenceSchema, resolveBaseUrl, usePlaygroundContext, relativePath, toMarkdown, toCompactJson, toRawJson, formatBytes, CODE_SAMPLE_TARGETS, buildHarRequest, resolveAbsolute, renderSnippet, endpointToMarkdown, isValidJson, findApiKeyById, parseRequestHeaders, UrlBuilder, sampleSchemaJson, joinUrl } from './chunk-Y6UTOBF6.mjs';
|
|
2
|
-
import { MarkdownMessage, PrettyCode_default } from './chunk-
|
|
2
|
+
import { MarkdownMessage, PrettyCode_default } from './chunk-2NG4SXEP.mjs';
|
|
3
3
|
import { JsonTree_default } from './chunk-ECONRHIG.mjs';
|
|
4
4
|
import './chunk-KNEQRUBA.mjs';
|
|
5
5
|
import { __name } from './chunk-N2XQF2OL.mjs';
|
|
@@ -3444,5 +3444,5 @@ var DocsLayout = /* @__PURE__ */ __name(() => {
|
|
|
3444
3444
|
}, "DocsLayout");
|
|
3445
3445
|
|
|
3446
3446
|
export { DocsLayout };
|
|
3447
|
-
//# sourceMappingURL=DocsLayout-
|
|
3448
|
-
//# sourceMappingURL=DocsLayout-
|
|
3447
|
+
//# sourceMappingURL=DocsLayout-EKASBSP7.mjs.map
|
|
3448
|
+
//# sourceMappingURL=DocsLayout-EKASBSP7.mjs.map
|