@djangocfg/ui-tools 2.1.286 → 2.1.289

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.
Files changed (34) hide show
  1. package/dist/{DocsLayout-ERETJLLV.mjs → DocsLayout-TKJQ5W5E.mjs} +848 -266
  2. package/dist/DocsLayout-TKJQ5W5E.mjs.map +1 -0
  3. package/dist/{DocsLayout-BCVU6TTX.cjs → DocsLayout-YDR7DSMM.cjs} +843 -261
  4. package/dist/DocsLayout-YDR7DSMM.cjs.map +1 -0
  5. package/dist/index.cjs +2 -2
  6. package/dist/index.d.cts +16 -0
  7. package/dist/index.d.ts +16 -0
  8. package/dist/index.mjs +2 -2
  9. package/package.json +9 -6
  10. package/src/tools/OpenapiViewer/.claude/.sidecar/activity.jsonl +2 -0
  11. package/src/tools/OpenapiViewer/.claude/.sidecar/history/2026-04-22.md +35 -0
  12. package/src/tools/OpenapiViewer/.claude/.sidecar/review.md +35 -0
  13. package/src/tools/OpenapiViewer/.claude/.sidecar/scan.log +3 -0
  14. package/src/tools/OpenapiViewer/.claude/.sidecar/tasks/T-001.md +18 -0
  15. package/src/tools/OpenapiViewer/.claude/.sidecar/tasks/T-002.md +18 -0
  16. package/src/tools/OpenapiViewer/.claude/.sidecar/tasks/T-003.md +18 -0
  17. package/src/tools/OpenapiViewer/.claude/.sidecar/tasks/T-004.md +18 -0
  18. package/src/tools/OpenapiViewer/.claude/.sidecar/tasks/T-005.md +18 -0
  19. package/src/tools/OpenapiViewer/.claude/.sidecar/usage.json +2 -2
  20. package/src/tools/OpenapiViewer/OpenapiViewer.story.tsx +27 -0
  21. package/src/tools/OpenapiViewer/components/DocsLayout/DocsView.tsx +326 -54
  22. package/src/tools/OpenapiViewer/components/DocsLayout/EndpointDoc.tsx +7 -2
  23. package/src/tools/OpenapiViewer/components/DocsLayout/SchemaCopyMenu.tsx +32 -9
  24. package/src/tools/OpenapiViewer/components/DocsLayout/Sidebar.tsx +348 -120
  25. package/src/tools/OpenapiViewer/components/DocsLayout/anchor.ts +19 -2
  26. package/src/tools/OpenapiViewer/components/DocsLayout/grouping.ts +38 -21
  27. package/src/tools/OpenapiViewer/components/DocsLayout/index.tsx +168 -50
  28. package/src/tools/OpenapiViewer/hooks/index.ts +3 -1
  29. package/src/tools/OpenapiViewer/hooks/useDocsUrlSync.ts +119 -0
  30. package/src/tools/OpenapiViewer/hooks/useOpenApiSchema.ts +127 -7
  31. package/src/tools/OpenapiViewer/types.ts +36 -1
  32. package/src/tools/OpenapiViewer/utils/scrollParent.ts +68 -0
  33. package/dist/DocsLayout-BCVU6TTX.cjs.map +0 -1
  34. package/dist/DocsLayout-ERETJLLV.mjs.map +0 -1
package/dist/index.cjs CHANGED
@@ -262,7 +262,7 @@ function OpenapiLoadingFallback() {
262
262
  }
263
263
  chunkWGEGR3DF_cjs.__name(OpenapiLoadingFallback, "OpenapiLoadingFallback");
264
264
  var LazyDocsLayout = createLazyComponent(
265
- () => import('./DocsLayout-BCVU6TTX.cjs').then((mod) => ({ default: mod.DocsLayout })),
265
+ () => import('./DocsLayout-YDR7DSMM.cjs').then((mod) => ({ default: mod.DocsLayout })),
266
266
  {
267
267
  displayName: "LazyDocsLayout",
268
268
  fallback: /* @__PURE__ */ jsxRuntime.jsx(OpenapiLoadingFallback, {})
@@ -417,7 +417,7 @@ function LottiePlayer(props) {
417
417
  }
418
418
  chunkWGEGR3DF_cjs.__name(LottiePlayer, "LottiePlayer");
419
419
  var DocsLayout = React.lazy(
420
- () => import('./DocsLayout-BCVU6TTX.cjs').then((mod) => ({ default: mod.DocsLayout }))
420
+ () => import('./DocsLayout-YDR7DSMM.cjs').then((mod) => ({ default: mod.DocsLayout }))
421
421
  );
422
422
  var LoadingFallback7 = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(() => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children: "Loading API Playground..." }) }), "LoadingFallback");
423
423
  var Playground = /* @__PURE__ */ chunkWGEGR3DF_cjs.__name(({ config }) => {
package/dist/index.d.cts CHANGED
@@ -361,6 +361,22 @@ interface PlaygroundConfig {
361
361
  * a spinner instead of "no keys yet". */
362
362
  apiKeys?: ApiKey[];
363
363
  apiKeysLoading?: boolean;
364
+ /** How multiple schemas are presented in the sidebar.
365
+ * - ``'selector'`` (default): a Combobox switches between schemas, the
366
+ * docs column shows endpoints of the active schema only.
367
+ * - ``'sections'``: the Combobox is hidden and every schema becomes a
368
+ * top-level heading in the sidebar, with endpoints of all schemas
369
+ * rendered back-to-back in the docs column. Scrollspy picks the
370
+ * active schema based on what's visible. */
371
+ schemaGrouping?: 'selector' | 'sections';
372
+ /** Optional URL-hash sync. When enabled, the viewer reads/writes
373
+ * ``#<schemaId>/<anchor>`` on the browser location. Falsy value (the
374
+ * default) keeps the viewer hash-free. Set to an object with
375
+ * ``{ enabled: true }`` to opt in; future fields (e.g. a custom
376
+ * adapter) stay backwards compatible. */
377
+ urlSync?: boolean | {
378
+ enabled: boolean;
379
+ };
364
380
  }
365
381
 
366
382
  /**
package/dist/index.d.ts CHANGED
@@ -361,6 +361,22 @@ interface PlaygroundConfig {
361
361
  * a spinner instead of "no keys yet". */
362
362
  apiKeys?: ApiKey[];
363
363
  apiKeysLoading?: boolean;
364
+ /** How multiple schemas are presented in the sidebar.
365
+ * - ``'selector'`` (default): a Combobox switches between schemas, the
366
+ * docs column shows endpoints of the active schema only.
367
+ * - ``'sections'``: the Combobox is hidden and every schema becomes a
368
+ * top-level heading in the sidebar, with endpoints of all schemas
369
+ * rendered back-to-back in the docs column. Scrollspy picks the
370
+ * active schema based on what's visible. */
371
+ schemaGrouping?: 'selector' | 'sections';
372
+ /** Optional URL-hash sync. When enabled, the viewer reads/writes
373
+ * ``#<schemaId>/<anchor>`` on the browser location. Falsy value (the
374
+ * default) keeps the viewer hash-free. Set to an object with
375
+ * ``{ enabled: true }`` to opt in; future fields (e.g. a custom
376
+ * adapter) stay backwards compatible. */
377
+ urlSync?: boolean | {
378
+ enabled: boolean;
379
+ };
364
380
  }
365
381
 
366
382
  /**
package/dist/index.mjs CHANGED
@@ -237,7 +237,7 @@ function OpenapiLoadingFallback() {
237
237
  }
238
238
  __name(OpenapiLoadingFallback, "OpenapiLoadingFallback");
239
239
  var LazyDocsLayout = createLazyComponent(
240
- () => import('./DocsLayout-ERETJLLV.mjs').then((mod) => ({ default: mod.DocsLayout })),
240
+ () => import('./DocsLayout-TKJQ5W5E.mjs').then((mod) => ({ default: mod.DocsLayout })),
241
241
  {
242
242
  displayName: "LazyDocsLayout",
243
243
  fallback: /* @__PURE__ */ jsx(OpenapiLoadingFallback, {})
@@ -392,7 +392,7 @@ function LottiePlayer(props) {
392
392
  }
393
393
  __name(LottiePlayer, "LottiePlayer");
394
394
  var DocsLayout = lazy(
395
- () => import('./DocsLayout-ERETJLLV.mjs').then((mod) => ({ default: mod.DocsLayout }))
395
+ () => import('./DocsLayout-TKJQ5W5E.mjs').then((mod) => ({ default: mod.DocsLayout }))
396
396
  );
397
397
  var LoadingFallback7 = /* @__PURE__ */ __name(() => /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center min-h-[400px]", children: /* @__PURE__ */ jsx("div", { className: "text-muted-foreground", children: "Loading API Playground..." }) }), "LoadingFallback");
398
398
  var Playground = /* @__PURE__ */ __name(({ config }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/ui-tools",
3
- "version": "2.1.286",
3
+ "version": "2.1.289",
4
4
  "description": "Heavy React tools with lazy loading - for Electron, Vite, CRA, Next.js apps",
5
5
  "keywords": [
6
6
  "ui-tools",
@@ -90,9 +90,10 @@
90
90
  "check": "tsc --noEmit"
91
91
  },
92
92
  "peerDependencies": {
93
- "@djangocfg/i18n": "^2.1.286",
94
- "@djangocfg/ui-core": "^2.1.286",
93
+ "@djangocfg/i18n": "^2.1.289",
94
+ "@djangocfg/ui-core": "^2.1.289",
95
95
  "consola": "^3.4.2",
96
+ "lodash-es": "^4.18.1",
96
97
  "lucide-react": "^0.545.0",
97
98
  "react": "^19.1.0",
98
99
  "react-dom": "^19.1.0",
@@ -133,14 +134,16 @@
133
134
  "@maplibre/maplibre-gl-geocoder": "^1.7.0"
134
135
  },
135
136
  "devDependencies": {
136
- "@djangocfg/i18n": "^2.1.286",
137
+ "@djangocfg/i18n": "^2.1.289",
137
138
  "@djangocfg/playground": "workspace:*",
138
- "@djangocfg/typescript-config": "^2.1.286",
139
- "@djangocfg/ui-core": "^2.1.286",
139
+ "@djangocfg/typescript-config": "^2.1.289",
140
+ "@djangocfg/ui-core": "^2.1.289",
141
+ "@types/lodash-es": "^4.17.12",
140
142
  "@types/mapbox__mapbox-gl-draw": "^1.4.8",
141
143
  "@types/node": "^24.7.2",
142
144
  "@types/react": "^19.1.0",
143
145
  "@types/react-dom": "^19.1.0",
146
+ "lodash-es": "^4.18.1",
144
147
  "lucide-react": "^0.545.0",
145
148
  "react": "^19.1.0",
146
149
  "react-dom": "^19.1.0",
@@ -2,3 +2,5 @@
2
2
  {"ts":"2026-04-22T13:12:54.534624Z","action":"map","tokens":0,"model":"cache","details":{"directories":7,"entry_points":5}}
3
3
  {"ts":"2026-04-22T13:14:16.326555Z","action":"map","tokens":0,"model":"cache","details":{"directories":7,"entry_points":5}}
4
4
  {"ts":"2026-04-22T13:15:40.112071Z","action":"map","tokens":0,"model":"cache","details":{"directories":7,"entry_points":5}}
5
+ {"ts":"2026-04-22T16:47:13.863898Z","action":"update_check","tokens":0,"model":"deepseek/deepseek-v3.2","details":{}}
6
+ {"ts":"2026-04-22T16:47:48.099123Z","action":"review","tokens":1941,"model":"deepseek/deepseek-v3.2","details":{"items_found":5}}
@@ -0,0 +1,35 @@
1
+ # Sidecar Review -- 2026-04-22T16:47:48.098166+00:00
2
+
3
+ ## Staleness
4
+
5
+ - [?] The project map was generated on 2026-04-22, but it describes a React library architecture that contradicts the Django/Next.js work shown in commits from 2026-04-17 to 2026-04-22. The map's content is stale relative to the project's true evolution.
6
+ Files: .claude/project-map.md
7
+ Action: Regenerate the project map using a tool that accurately reflects the current codebase structure and technology stack.
8
+ (id: 4bd49eecdaa4)
9
+
10
+ ## Contradictions
11
+
12
+ - [!] The project map describes a React component library for an OpenAPI viewer, but recent git commits are for a Django/Next.js project (e.g., 'feat(drf-spectacular)', 'refactor(layouts): migrate from SmartNavLink to LinkComponentProvider'). The documentation's description does not match the project's actual activity.
13
+ Files: .claude/project-map.md
14
+ Action: Investigate the project's true nature. Update the project map description to reflect the actual tech stack (Django, Next.js, DRF Spectacular) or confirm the correct documentation is being analyzed.
15
+ (id: 63e451e12988)
16
+
17
+ - [?] The project map's 'Entry Points' list React component entry files (e.g., './index.tsx'), but commits suggest a Django/Next.js application with different entry points (e.g., Django's manage.py, Next.js's pages/).
18
+ Files: .claude/project-map.md
19
+ Action: Update the entry points list in the project map to reflect the actual application entry points (e.g., main Django ASGI/WSGI file, Next.js entry).
20
+ (id: ba6f809d9f15)
21
+
22
+ ## Missing Documentation
23
+
24
+ - [!] The project map lists source directories (components, context, hooks, utils) typical of a React library, but recent commits mention backend (Django) and frontend framework (Next.js) concepts not covered. Key areas like 'layouts/', 'navigation/', and Django app structure have no documentation in the provided map.
25
+ Files: .claude/project-map.md
26
+ Action: Expand the project map to document the actual codebase structure, including Django apps, Next.js pages/layouts, and how the frontend and backend integrate.
27
+ (id: 4654646dd66d)
28
+
29
+ - [!] No dependencies are listed in the analysis, but recent commits reference specific packages and tools (e.g., 'drf-spectacular', 'Nextra'). The project map provides no dependency information, which is a critical gap for understanding the project's environment.
30
+ Files: .claude/project-map.md
31
+ Action: Add a 'Dependencies' section to the project map or ensure dependency files (pyproject.toml, package.json) are included in the documentation analysis.
32
+ (id: c81e59d10f1a)
33
+
34
+ ---
35
+ Model: deepseek/deepseek-v3.2 | Tokens: 1941
@@ -0,0 +1,35 @@
1
+ # Sidecar Review -- 2026-04-22T16:47:48.098166+00:00
2
+
3
+ ## Staleness
4
+
5
+ - [?] The project map was generated on 2026-04-22, but it describes a React library architecture that contradicts the Django/Next.js work shown in commits from 2026-04-17 to 2026-04-22. The map's content is stale relative to the project's true evolution.
6
+ Files: .claude/project-map.md
7
+ Action: Regenerate the project map using a tool that accurately reflects the current codebase structure and technology stack.
8
+ (id: 4bd49eecdaa4)
9
+
10
+ ## Contradictions
11
+
12
+ - [!] The project map describes a React component library for an OpenAPI viewer, but recent git commits are for a Django/Next.js project (e.g., 'feat(drf-spectacular)', 'refactor(layouts): migrate from SmartNavLink to LinkComponentProvider'). The documentation's description does not match the project's actual activity.
13
+ Files: .claude/project-map.md
14
+ Action: Investigate the project's true nature. Update the project map description to reflect the actual tech stack (Django, Next.js, DRF Spectacular) or confirm the correct documentation is being analyzed.
15
+ (id: 63e451e12988)
16
+
17
+ - [?] The project map's 'Entry Points' list React component entry files (e.g., './index.tsx'), but commits suggest a Django/Next.js application with different entry points (e.g., Django's manage.py, Next.js's pages/).
18
+ Files: .claude/project-map.md
19
+ Action: Update the entry points list in the project map to reflect the actual application entry points (e.g., main Django ASGI/WSGI file, Next.js entry).
20
+ (id: ba6f809d9f15)
21
+
22
+ ## Missing Documentation
23
+
24
+ - [!] The project map lists source directories (components, context, hooks, utils) typical of a React library, but recent commits mention backend (Django) and frontend framework (Next.js) concepts not covered. Key areas like 'layouts/', 'navigation/', and Django app structure have no documentation in the provided map.
25
+ Files: .claude/project-map.md
26
+ Action: Expand the project map to document the actual codebase structure, including Django apps, Next.js pages/layouts, and how the frontend and backend integrate.
27
+ (id: 4654646dd66d)
28
+
29
+ - [!] No dependencies are listed in the analysis, but recent commits reference specific packages and tools (e.g., 'drf-spectacular', 'Nextra'). The project map provides no dependency information, which is a critical gap for understanding the project's environment.
30
+ Files: .claude/project-map.md
31
+ Action: Add a 'Dependencies' section to the project map or ensure dependency files (pyproject.toml, package.json) are included in the documentation analysis.
32
+ (id: c81e59d10f1a)
33
+
34
+ ---
35
+ Model: deepseek/deepseek-v3.2 | Tokens: 1941
@@ -0,0 +1,3 @@
1
+ Review generated: 5 items found
2
+ Tokens used: 1941 (deepseek/deepseek-v3.2)
3
+ Converted 5 items to tasks
@@ -0,0 +1,18 @@
1
+ ---
2
+ context_files:
3
+ - .claude/project-map.md
4
+ created_at: '2026-04-22T16:47:48.100263Z'
5
+ id: T-001
6
+ priority: high
7
+ source: sidecar_review
8
+ source_item_id: 63e451e12988
9
+ status: pending
10
+ title: '[contradiction] The project map describes a React component library for an
11
+ OpenAPI viewer, but r'
12
+ ---
13
+
14
+ The project map describes a React component library for an OpenAPI viewer, but recent git commits are for a Django/Next.js project (e.g., 'feat(drf-spectacular)', 'refactor(layouts): migrate from SmartNavLink to LinkComponentProvider'). The documentation's description does not match the project's actual activity.
15
+
16
+ **Files:** .claude/project-map.md
17
+
18
+ **Action:** Investigate the project's true nature. Update the project map description to reflect the actual tech stack (Django, Next.js, DRF Spectacular) or confirm the correct documentation is being analyzed.
@@ -0,0 +1,18 @@
1
+ ---
2
+ context_files:
3
+ - .claude/project-map.md
4
+ created_at: '2026-04-22T16:47:48.101004Z'
5
+ id: T-002
6
+ priority: high
7
+ source: sidecar_review
8
+ source_item_id: 4654646dd66d
9
+ status: pending
10
+ title: '[gap] The project map lists source directories (components, context, hooks,
11
+ utils) typ'
12
+ ---
13
+
14
+ The project map lists source directories (components, context, hooks, utils) typical of a React library, but recent commits mention backend (Django) and frontend framework (Next.js) concepts not covered. Key areas like 'layouts/', 'navigation/', and Django app structure have no documentation in the provided map.
15
+
16
+ **Files:** .claude/project-map.md
17
+
18
+ **Action:** Expand the project map to document the actual codebase structure, including Django apps, Next.js pages/layouts, and how the frontend and backend integrate.
@@ -0,0 +1,18 @@
1
+ ---
2
+ context_files:
3
+ - .claude/project-map.md
4
+ created_at: '2026-04-22T16:47:48.101333Z'
5
+ id: T-003
6
+ priority: high
7
+ source: sidecar_review
8
+ source_item_id: c81e59d10f1a
9
+ status: pending
10
+ title: '[gap] No dependencies are listed in the analysis, but recent commits reference
11
+ specifi'
12
+ ---
13
+
14
+ No dependencies are listed in the analysis, but recent commits reference specific packages and tools (e.g., 'drf-spectacular', 'Nextra'). The project map provides no dependency information, which is a critical gap for understanding the project's environment.
15
+
16
+ **Files:** .claude/project-map.md
17
+
18
+ **Action:** Add a 'Dependencies' section to the project map or ensure dependency files (pyproject.toml, package.json) are included in the documentation analysis.
@@ -0,0 +1,18 @@
1
+ ---
2
+ context_files:
3
+ - .claude/project-map.md
4
+ created_at: '2026-04-22T16:47:48.101697Z'
5
+ id: T-004
6
+ priority: medium
7
+ source: sidecar_review
8
+ source_item_id: ba6f809d9f15
9
+ status: pending
10
+ title: '[contradiction] The project map''s ''Entry Points'' list React component entry
11
+ files (e.g., ''./inde'
12
+ ---
13
+
14
+ The project map's 'Entry Points' list React component entry files (e.g., './index.tsx'), but commits suggest a Django/Next.js application with different entry points (e.g., Django's manage.py, Next.js's pages/).
15
+
16
+ **Files:** .claude/project-map.md
17
+
18
+ **Action:** Update the entry points list in the project map to reflect the actual application entry points (e.g., main Django ASGI/WSGI file, Next.js entry).
@@ -0,0 +1,18 @@
1
+ ---
2
+ context_files:
3
+ - .claude/project-map.md
4
+ created_at: '2026-04-22T16:47:48.102118Z'
5
+ id: T-005
6
+ priority: medium
7
+ source: sidecar_review
8
+ source_item_id: 4bd49eecdaa4
9
+ status: pending
10
+ title: '[staleness] The project map was generated on 2026-04-22, but it describes
11
+ a React library ar'
12
+ ---
13
+
14
+ The project map was generated on 2026-04-22, but it describes a React library architecture that contradicts the Django/Next.js work shown in commits from 2026-04-17 to 2026-04-22. The map's content is stale relative to the project's true evolution.
15
+
16
+ **Files:** .claude/project-map.md
17
+
18
+ **Action:** Regenerate the project map using a tool that accurately reflects the current codebase structure and technology stack.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "date": "2026-04-22",
3
- "tokens": 2297,
4
- "calls": 4
3
+ "tokens": 4238,
4
+ "calls": 5
5
5
  }
@@ -124,6 +124,33 @@ export const MultipleSchemas = () => {
124
124
  );
125
125
  };
126
126
 
127
+ /**
128
+ * Sections grouping — all schemas rendered as top-level headings in the
129
+ * sidebar, with every endpoint laid out on the same page. URL hash sync
130
+ * is enabled so scrolling updates ``#<schemaId>/<anchor>``.
131
+ */
132
+ export const SectionsGrouping = () => {
133
+ const [urlSync] = useSelect('urlSync', {
134
+ options: ['on', 'off'] as const,
135
+ defaultValue: 'on',
136
+ label: 'URL hash sync',
137
+ description: 'Writes #<schemaId>/<anchor> as you scroll',
138
+ });
139
+
140
+ const config: PlaygroundConfig = {
141
+ schemas: [...MULTI_SCHEMAS],
142
+ defaultSchemaId: 'petstore',
143
+ schemaGrouping: 'sections',
144
+ urlSync: urlSync === 'on',
145
+ };
146
+
147
+ return (
148
+ <div className="min-h-[600px]">
149
+ <Playground config={config} />
150
+ </div>
151
+ );
152
+ };
153
+
127
154
  /**
128
155
  * Many schemas (7+) — tests Combobox with a long list.
129
156
  * Simulates a real setup like cmdop with machines, terminal, skills, etc.