@djangocfg/ui-tools 2.1.291 → 2.1.293
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 +3 -2
- package/dist/{DocsLayout-IKH7BLSU.cjs → DocsLayout-PLWQJBGU.cjs} +10 -4
- package/dist/DocsLayout-PLWQJBGU.cjs.map +1 -0
- package/dist/{DocsLayout-JPXFUKAR.mjs → DocsLayout-XB55R7YG.mjs} +11 -5
- package/dist/DocsLayout-XB55R7YG.mjs.map +1 -0
- package/dist/index.cjs +73 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -6
- package/dist/index.d.ts +66 -6
- package/dist/index.mjs +73 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -6
- package/src/tools/MarkdownEditor/MarkdownEditor.story.tsx +108 -2
- package/src/tools/MarkdownEditor/MarkdownEditor.tsx +46 -2
- package/src/tools/MarkdownEditor/README.md +82 -3
- package/src/tools/MarkdownEditor/createMentionSuggestion.ts +55 -16
- package/src/tools/MarkdownEditor/index.ts +7 -1
- package/src/tools/MarkdownEditor/mentionPresets.test.ts +107 -0
- package/src/tools/MarkdownEditor/mentionPresets.ts +49 -0
- package/src/tools/MarkdownEditor/types.ts +33 -2
- package/src/tools/OpenapiViewer/README.md +2 -1
- package/src/tools/OpenapiViewer/components/DocsLayout/Sidebar/EndpointRow.tsx +12 -1
- package/src/tools/OpenapiViewer/components/DocsLayout/Sidebar/SidebarBody.tsx +1 -1
- package/src/tools/OpenapiViewer/components/DocsLayout/index.tsx +5 -1
- package/src/tools/OpenapiViewer/types.ts +5 -5
- package/src/tools/index.ts +8 -2
- package/dist/DocsLayout-IKH7BLSU.cjs.map +0 -1
- package/dist/DocsLayout-JPXFUKAR.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ This package contains heavy components that are loaded lazily to keep your initi
|
|
|
38
38
|
| `PrettyCode` | ~500KB | Code syntax highlighting (read-only) |
|
|
39
39
|
| `OpenapiViewer` | ~400KB | OpenAPI schema viewer & playground |
|
|
40
40
|
| `JsonForm` | ~300KB | JSON Schema form generator |
|
|
41
|
-
| `MarkdownEditor` | ~200KB | WYSIWYG markdown editor with Tiptap |
|
|
41
|
+
| `MarkdownEditor` | ~200KB | WYSIWYG markdown editor with Tiptap, `@`-mentions (auto-flip popup), customizable markdown serialization via presets |
|
|
42
42
|
| `LottiePlayer` | ~200KB | Lottie animation player |
|
|
43
43
|
| `AudioPlayer` | ~200KB | Audio player with WaveSurfer.js |
|
|
44
44
|
| `VideoPlayer` | ~150KB | Professional video player with Vidstack |
|
|
@@ -71,7 +71,8 @@ import { FlowDiagram, SequenceDiagram, JourneyDiagram } from '@djangocfg/ui-tool
|
|
|
71
71
|
| `@djangocfg/ui-tools/gallery` | Gallery components & hooks |
|
|
72
72
|
| `@djangocfg/ui-tools/map` | Map components & utilities |
|
|
73
73
|
| `@djangocfg/ui-tools/mermaid` | Mermaid component & declarative builders |
|
|
74
|
-
| `@djangocfg/ui-tools/styles` | CSS
|
|
74
|
+
| `@djangocfg/ui-tools/styles` | Tailwind source CSS (for Tailwind apps) |
|
|
75
|
+
| `@djangocfg/ui-tools/dist.css` | Pre-compiled CSS (for plain Vite/webpack apps without Tailwind) |
|
|
75
76
|
|
|
76
77
|
## Gallery
|
|
77
78
|
|
|
@@ -893,10 +893,16 @@ var EndpointRow = React12__default.default.memo(/* @__PURE__ */ chunkWGEGR3DF_cj
|
|
|
893
893
|
onNavigate
|
|
894
894
|
}) {
|
|
895
895
|
const displayLabel = row.label.replace(/\.$/, "");
|
|
896
|
+
const buttonRef = React12.useRef(null);
|
|
897
|
+
React12.useEffect(() => {
|
|
898
|
+
if (!row.isActive || !buttonRef.current) return;
|
|
899
|
+
buttonRef.current.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
900
|
+
}, [row.isActive]);
|
|
896
901
|
return /* @__PURE__ */ jsxRuntime.jsxs(components.Tooltip, { delayDuration: 350, children: [
|
|
897
902
|
/* @__PURE__ */ jsxRuntime.jsx(components.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
898
903
|
"button",
|
|
899
904
|
{
|
|
905
|
+
ref: buttonRef,
|
|
900
906
|
onClick: () => onNavigate(row.anchor, row.schemaId),
|
|
901
907
|
"aria-current": row.isActive ? "location" : void 0,
|
|
902
908
|
className: lib.cn(
|
|
@@ -944,7 +950,7 @@ function SidebarBody({ body, onNavigate }) {
|
|
|
944
950
|
if (body.categories.length === 0) {
|
|
945
951
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-10 px-4 text-center text-xs text-muted-foreground", children: body.emptyText });
|
|
946
952
|
}
|
|
947
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "
|
|
953
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "pt-1.5 pb-[10vh]", children: body.categories.map((cat) => /* @__PURE__ */ jsxRuntime.jsx(CategoryBlock, { category: cat, onNavigate }, cat.key)) });
|
|
948
954
|
}
|
|
949
955
|
if (body.sections.length === 0) {
|
|
950
956
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-10 px-4 text-center text-xs text-muted-foreground", children: body.emptyText });
|
|
@@ -3254,7 +3260,7 @@ var DocsLayout = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => {
|
|
|
3254
3260
|
const isMobile = !isDesktop;
|
|
3255
3261
|
const grouping = config.schemaGrouping ?? "selector";
|
|
3256
3262
|
const preloadAll = grouping === "sections";
|
|
3257
|
-
const urlSyncEnabled = typeof config.urlSync === "boolean" ? config.urlSync : Boolean(config.urlSync
|
|
3263
|
+
const urlSyncEnabled = config.urlSync === void 0 ? true : typeof config.urlSync === "boolean" ? config.urlSync : Boolean(config.urlSync.enabled);
|
|
3258
3264
|
const {
|
|
3259
3265
|
endpoints,
|
|
3260
3266
|
schemaInfo,
|
|
@@ -3460,5 +3466,5 @@ var DocsLayout = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => {
|
|
|
3460
3466
|
}, "DocsLayout");
|
|
3461
3467
|
|
|
3462
3468
|
exports.DocsLayout = DocsLayout;
|
|
3463
|
-
//# sourceMappingURL=DocsLayout-
|
|
3464
|
-
//# sourceMappingURL=DocsLayout-
|
|
3469
|
+
//# sourceMappingURL=DocsLayout-PLWQJBGU.cjs.map
|
|
3470
|
+
//# sourceMappingURL=DocsLayout-PLWQJBGU.cjs.map
|