@djangocfg/ext-knowbase 1.0.2 → 1.0.4

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.
@@ -0,0 +1,154 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/config.ts
20
+ var config_exports = {};
21
+ __export(config_exports, {
22
+ extensionConfig: () => extensionConfig
23
+ });
24
+ module.exports = __toCommonJS(config_exports);
25
+ var import_ext_base = require("@djangocfg/ext-base");
26
+
27
+ // package.json
28
+ var package_default = {
29
+ name: "@djangocfg/ext-knowbase",
30
+ version: "1.0.4",
31
+ description: "Knowledge base and chat extension for DjangoCFG",
32
+ keywords: [
33
+ "django",
34
+ "djangocfg",
35
+ "extension",
36
+ "knowledge-base",
37
+ "chat",
38
+ "documentation",
39
+ "help",
40
+ "typescript",
41
+ "react"
42
+ ],
43
+ author: {
44
+ name: "DjangoCFG",
45
+ url: "https://djangocfg.com"
46
+ },
47
+ homepage: "https://hub.djangocfg.com/extensions/djangocfg-ext-knowbase",
48
+ repository: {
49
+ type: "git",
50
+ url: "https://github.com/markolofsen/django-cfg.git",
51
+ directory: "extensions/knowbase"
52
+ },
53
+ bugs: {
54
+ url: "https://github.com/markolofsen/django-cfg/issues"
55
+ },
56
+ license: "MIT",
57
+ type: "module",
58
+ main: "./dist/index.cjs",
59
+ module: "./dist/index.js",
60
+ types: "./dist/index.d.ts",
61
+ exports: {
62
+ ".": {
63
+ types: "./dist/index.d.ts",
64
+ import: "./dist/index.js",
65
+ require: "./dist/index.cjs"
66
+ },
67
+ "./hooks": {
68
+ types: "./dist/hooks.d.ts",
69
+ import: "./dist/hooks.js",
70
+ require: "./dist/hooks.cjs"
71
+ },
72
+ "./config": {
73
+ types: "./dist/config.d.ts",
74
+ import: "./dist/config.js",
75
+ require: "./dist/config.cjs"
76
+ }
77
+ },
78
+ files: [
79
+ "dist",
80
+ "src",
81
+ "preview.png"
82
+ ],
83
+ scripts: {
84
+ build: "tsup",
85
+ dev: "tsup --watch",
86
+ check: "tsc --noEmit"
87
+ },
88
+ peerDependencies: {
89
+ "@djangocfg/api": "workspace:*",
90
+ "@djangocfg/ext-base": "workspace:*",
91
+ "@djangocfg/ui-nextjs": "workspace:*",
92
+ consola: "^3.4.2",
93
+ "lucide-react": "^0.545.0",
94
+ next: "^15.5.7",
95
+ "p-retry": "^7.0.0",
96
+ react: "^18 || ^19",
97
+ "react-dom": "^18 || ^19",
98
+ "react-markdown": "^9.0.0 || ^10.0.0",
99
+ swr: "^2.3.7",
100
+ zod: "^4.1.13"
101
+ },
102
+ devDependencies: {
103
+ "@djangocfg/api": "workspace:*",
104
+ "@djangocfg/ext-base": "workspace:*",
105
+ "@djangocfg/typescript-config": "workspace:*",
106
+ "@types/node": "^24.7.2",
107
+ "@types/react": "^19.0.0",
108
+ consola: "^3.4.2",
109
+ "p-retry": "^7.0.0",
110
+ swr: "^2.3.7",
111
+ tsup: "^8.5.0",
112
+ typescript: "^5.9.3"
113
+ }
114
+ };
115
+
116
+ // src/config.ts
117
+ var extensionConfig = (0, import_ext_base.createExtensionConfig)(package_default, {
118
+ name: "knowbase",
119
+ displayName: "Knowledge Base",
120
+ category: "content",
121
+ features: [
122
+ "Article management",
123
+ "Category organization",
124
+ "Full-text search",
125
+ "Markdown support",
126
+ "Chat interface",
127
+ "Version control"
128
+ ],
129
+ minVersion: "2.0.0",
130
+ examples: [
131
+ {
132
+ title: "Knowledge Base Search",
133
+ description: "Add searchable documentation",
134
+ code: `import { KnowledgeBase, useArticles } from '@djangocfg/ext-knowbase';
135
+
136
+ export default function DocsPage() {
137
+ const { articles, search } = useArticles();
138
+
139
+ return (
140
+ <KnowledgeBase
141
+ articles={articles}
142
+ onSearch={(query) => search(query)}
143
+ showChat={true}
144
+ />
145
+ );
146
+ }`,
147
+ language: "tsx"
148
+ }
149
+ ]
150
+ });
151
+ // Annotate the CommonJS export names for ESM import in node:
152
+ 0 && (module.exports = {
153
+ extensionConfig
154
+ });
@@ -0,0 +1,8 @@
1
+ import * as _djangocfg_ext_base from '@djangocfg/ext-base';
2
+
3
+ /**
4
+ * Knowledge Base extension configuration
5
+ */
6
+ declare const extensionConfig: _djangocfg_ext_base.ExtensionMetadata;
7
+
8
+ export { extensionConfig };
@@ -0,0 +1,8 @@
1
+ import * as _djangocfg_ext_base from '@djangocfg/ext-base';
2
+
3
+ /**
4
+ * Knowledge Base extension configuration
5
+ */
6
+ declare const extensionConfig: _djangocfg_ext_base.ExtensionMetadata;
7
+
8
+ export { extensionConfig };
package/dist/config.js ADDED
@@ -0,0 +1,130 @@
1
+ // src/config.ts
2
+ import { createExtensionConfig } from "@djangocfg/ext-base";
3
+
4
+ // package.json
5
+ var package_default = {
6
+ name: "@djangocfg/ext-knowbase",
7
+ version: "1.0.4",
8
+ description: "Knowledge base and chat extension for DjangoCFG",
9
+ keywords: [
10
+ "django",
11
+ "djangocfg",
12
+ "extension",
13
+ "knowledge-base",
14
+ "chat",
15
+ "documentation",
16
+ "help",
17
+ "typescript",
18
+ "react"
19
+ ],
20
+ author: {
21
+ name: "DjangoCFG",
22
+ url: "https://djangocfg.com"
23
+ },
24
+ homepage: "https://hub.djangocfg.com/extensions/djangocfg-ext-knowbase",
25
+ repository: {
26
+ type: "git",
27
+ url: "https://github.com/markolofsen/django-cfg.git",
28
+ directory: "extensions/knowbase"
29
+ },
30
+ bugs: {
31
+ url: "https://github.com/markolofsen/django-cfg/issues"
32
+ },
33
+ license: "MIT",
34
+ type: "module",
35
+ main: "./dist/index.cjs",
36
+ module: "./dist/index.js",
37
+ types: "./dist/index.d.ts",
38
+ exports: {
39
+ ".": {
40
+ types: "./dist/index.d.ts",
41
+ import: "./dist/index.js",
42
+ require: "./dist/index.cjs"
43
+ },
44
+ "./hooks": {
45
+ types: "./dist/hooks.d.ts",
46
+ import: "./dist/hooks.js",
47
+ require: "./dist/hooks.cjs"
48
+ },
49
+ "./config": {
50
+ types: "./dist/config.d.ts",
51
+ import: "./dist/config.js",
52
+ require: "./dist/config.cjs"
53
+ }
54
+ },
55
+ files: [
56
+ "dist",
57
+ "src",
58
+ "preview.png"
59
+ ],
60
+ scripts: {
61
+ build: "tsup",
62
+ dev: "tsup --watch",
63
+ check: "tsc --noEmit"
64
+ },
65
+ peerDependencies: {
66
+ "@djangocfg/api": "workspace:*",
67
+ "@djangocfg/ext-base": "workspace:*",
68
+ "@djangocfg/ui-nextjs": "workspace:*",
69
+ consola: "^3.4.2",
70
+ "lucide-react": "^0.545.0",
71
+ next: "^15.5.7",
72
+ "p-retry": "^7.0.0",
73
+ react: "^18 || ^19",
74
+ "react-dom": "^18 || ^19",
75
+ "react-markdown": "^9.0.0 || ^10.0.0",
76
+ swr: "^2.3.7",
77
+ zod: "^4.1.13"
78
+ },
79
+ devDependencies: {
80
+ "@djangocfg/api": "workspace:*",
81
+ "@djangocfg/ext-base": "workspace:*",
82
+ "@djangocfg/typescript-config": "workspace:*",
83
+ "@types/node": "^24.7.2",
84
+ "@types/react": "^19.0.0",
85
+ consola: "^3.4.2",
86
+ "p-retry": "^7.0.0",
87
+ swr: "^2.3.7",
88
+ tsup: "^8.5.0",
89
+ typescript: "^5.9.3"
90
+ }
91
+ };
92
+
93
+ // src/config.ts
94
+ var extensionConfig = createExtensionConfig(package_default, {
95
+ name: "knowbase",
96
+ displayName: "Knowledge Base",
97
+ category: "content",
98
+ features: [
99
+ "Article management",
100
+ "Category organization",
101
+ "Full-text search",
102
+ "Markdown support",
103
+ "Chat interface",
104
+ "Version control"
105
+ ],
106
+ minVersion: "2.0.0",
107
+ examples: [
108
+ {
109
+ title: "Knowledge Base Search",
110
+ description: "Add searchable documentation",
111
+ code: `import { KnowledgeBase, useArticles } from '@djangocfg/ext-knowbase';
112
+
113
+ export default function DocsPage() {
114
+ const { articles, search } = useArticles();
115
+
116
+ return (
117
+ <KnowledgeBase
118
+ articles={articles}
119
+ onSearch={(query) => search(query)}
120
+ showChat={true}
121
+ />
122
+ );
123
+ }`,
124
+ language: "tsx"
125
+ }
126
+ ]
127
+ });
128
+ export {
129
+ extensionConfig
130
+ };