@djangocfg/ext-newsletter 1.0.0 → 1.0.2

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 CHANGED
@@ -1,3 +1,11 @@
1
+ <div align="center">
2
+
3
+ ![DjangoCFG Extension Preview](https://unpkg.com/@djangocfg/ext-newsletter@latest/preview.png)
4
+
5
+ **[📦 View in Marketplace](https://hub.djangocfg.com/extensions/djangocfg-ext-newsletter)** • **[📖 Documentation](https://djangocfg.com)** • **[⭐ GitHub](https://github.com/markolofsen/django-cfg)**
6
+
7
+ </div>
8
+
1
9
  # @djangocfg/ext-newsletter
2
10
 
3
11
  Newsletter subscription and campaign management extension for DjangoCFG.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/ext-newsletter",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Newsletter and subscription management extension for DjangoCFG",
5
5
  "keywords": [
6
6
  "django",
@@ -17,7 +17,7 @@
17
17
  "name": "DjangoCFG",
18
18
  "url": "https://djangocfg.com"
19
19
  },
20
- "homepage": "https://djangocfg.com",
20
+ "homepage": "https://hub.djangocfg.com/extensions/djangocfg-ext-newsletter",
21
21
  "repository": {
22
22
  "type": "git",
23
23
  "url": "https://github.com/markolofsen/django-cfg.git",
@@ -29,23 +29,29 @@
29
29
  "license": "MIT",
30
30
  "type": "module",
31
31
  "main": "./dist/index.cjs",
32
- "module": "./dist/index.mjs",
32
+ "module": "./dist/index.js",
33
33
  "types": "./dist/index.d.ts",
34
34
  "exports": {
35
35
  ".": {
36
36
  "types": "./dist/index.d.ts",
37
- "import": "./dist/index.mjs",
37
+ "import": "./dist/index.js",
38
38
  "require": "./dist/index.cjs"
39
39
  },
40
40
  "./hooks": {
41
41
  "types": "./dist/hooks.d.ts",
42
- "import": "./dist/hooks.mjs",
42
+ "import": "./dist/hooks.js",
43
43
  "require": "./dist/hooks.cjs"
44
+ },
45
+ "./config": {
46
+ "types": "./dist/config.d.ts",
47
+ "import": "./dist/config.js",
48
+ "require": "./dist/config.cjs"
44
49
  }
45
50
  },
46
51
  "files": [
47
52
  "dist",
48
- "src"
53
+ "src",
54
+ "preview.png"
49
55
  ],
50
56
  "scripts": {
51
57
  "build": "tsup",
@@ -53,9 +59,9 @@
53
59
  "check": "tsc --noEmit"
54
60
  },
55
61
  "peerDependencies": {
56
- "@djangocfg/api": "^2.1.14",
57
- "@djangocfg/ext-base": "^1.0.0",
58
- "@djangocfg/ui-nextjs": "^2.1.14",
62
+ "@djangocfg/api": "^2.1.15",
63
+ "@djangocfg/ext-base": "^1.0.3",
64
+ "@djangocfg/ui-nextjs": "^2.1.15",
59
65
  "consola": "^3.4.2",
60
66
  "lucide-react": "^0.545.0",
61
67
  "next": "^15.5.7",
@@ -66,9 +72,9 @@
66
72
  "zod": "^4.1.13"
67
73
  },
68
74
  "devDependencies": {
69
- "@djangocfg/api": "^2.1.14",
70
- "@djangocfg/ext-base": "^1.0.0",
71
- "@djangocfg/typescript-config": "^2.1.14",
75
+ "@djangocfg/api": "^2.1.15",
76
+ "@djangocfg/ext-base": "^1.0.3",
77
+ "@djangocfg/typescript-config": "^2.1.15",
72
78
  "@types/node": "^24.7.2",
73
79
  "@types/react": "^19.0.0",
74
80
  "consola": "^3.4.2",
package/preview.png ADDED
Binary file
package/src/config.ts CHANGED
@@ -2,19 +2,43 @@
2
2
  * Newsletter extension configuration
3
3
  */
4
4
 
5
- import type { ExtensionMetadata } from '@djangocfg/ext-base';
5
+ import { createExtensionConfig } from '@djangocfg/ext-base';
6
+ import packageJson from '../package.json';
6
7
 
7
- export const extensionConfig: ExtensionMetadata = {
8
+ export const extensionConfig = createExtensionConfig(packageJson, {
8
9
  name: 'newsletter',
9
- version: '1.0.0',
10
- author: 'DjangoCFG',
11
- displayName: 'Newsletter',
12
- description: 'Newsletter subscription and campaign management',
13
- icon: '📧',
14
- license: 'MIT',
15
- githubUrl: 'https://github.com/markolofsen/django-cfg',
16
- homepage: 'https://djangocfg.com',
17
- keywords: ['newsletter', 'email', 'subscription', 'campaign', 'marketing'],
18
- dependencies: [],
10
+ displayName: 'Newsletter & Campaigns',
11
+ category: 'content',
12
+ features: [
13
+ 'Subscription management',
14
+ 'Email template system',
15
+ 'Campaign tracking',
16
+ 'Subscriber segmentation',
17
+ 'Analytics dashboard',
18
+ 'Automated campaigns',
19
+ ],
19
20
  minVersion: '2.0.0',
20
- } as const;
21
+ examples: [
22
+ {
23
+ title: 'Newsletter Subscription Form',
24
+ description: 'Add a newsletter signup form',
25
+ code: `import { NewsletterForm } from '@djangocfg/ext-newsletter';
26
+
27
+ export default function Footer() {
28
+ return (
29
+ <NewsletterForm
30
+ onSubscribe={(email) => {
31
+ console.log('New subscriber:', email);
32
+ }}
33
+ texts={{
34
+ placeholder: 'Enter your email',
35
+ button: 'Subscribe',
36
+ success: 'Thanks for subscribing!',
37
+ }}
38
+ />
39
+ );
40
+ }`,
41
+ language: 'tsx',
42
+ },
43
+ ],
44
+ });
package/src/index.ts CHANGED
@@ -12,3 +12,5 @@ export { apiNewsletter } from './api';
12
12
 
13
13
  // Export component types (server-safe)
14
14
  export type { HeroProps, HeroAction } from './components/Hero/types';
15
+ // Export config
16
+ export { extensionConfig } from './config';