@djangocfg/nextjs 2.1.541 → 2.1.542

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/nextjs",
3
- "version": "2.1.541",
3
+ "version": "2.1.542",
4
4
  "description": "Next.js server utilities: sitemap, health, OG images, contact forms, navigation, config",
5
5
  "keywords": [
6
6
  "nextjs",
@@ -149,9 +149,9 @@
149
149
  "ai-docs": "tsx src/ai/cli.ts"
150
150
  },
151
151
  "peerDependencies": {
152
- "@djangocfg/devtools": "^2.1.541",
153
- "@djangocfg/i18n": "^2.1.541",
154
- "@djangocfg/ui-core": "^2.1.541",
152
+ "@djangocfg/devtools": "^2.1.542",
153
+ "@djangocfg/i18n": "^2.1.542",
154
+ "@djangocfg/ui-core": "^2.1.542",
155
155
  "next": "^16.2.2"
156
156
  },
157
157
  "peerDependenciesMeta": {
@@ -170,11 +170,11 @@
170
170
  "semver": "^7.8.5"
171
171
  },
172
172
  "devDependencies": {
173
- "@djangocfg/devtools": "^2.1.541",
174
- "@djangocfg/i18n": "^2.1.541",
175
- "@djangocfg/layouts": "^2.1.541",
176
- "@djangocfg/typescript-config": "^2.1.541",
177
- "@djangocfg/ui-core": "^2.1.541",
173
+ "@djangocfg/devtools": "^2.1.542",
174
+ "@djangocfg/i18n": "^2.1.542",
175
+ "@djangocfg/layouts": "^2.1.542",
176
+ "@djangocfg/typescript-config": "^2.1.542",
177
+ "@djangocfg/ui-core": "^2.1.542",
178
178
  "@types/node": "^25.9.5",
179
179
  "@types/react": "19.2.15",
180
180
  "@types/react-dom": "19.2.3",
@@ -24,23 +24,40 @@ export const DJANGOCFG_PACKAGES = [
24
24
  '@djangocfg/layouts',
25
25
  '@djangocfg/nextjs',
26
26
  '@djangocfg/api',
27
- '@djangocfg/centrifugo',
28
27
  '@djangocfg/eslint-config',
29
28
  '@djangocfg/typescript-config',
30
29
  ] as const;
31
30
 
32
31
  // Default packages to transpile
33
- // Required for proper RSC (React Server Components) handling
32
+ // Required for proper RSC (React Server Components) handling.
33
+ //
34
+ // Every widget is here because widgets ship SOURCE — `main` points at
35
+ // `./src/index.ts`, there is no build step, and an untranspiled `.ts` in
36
+ // node_modules is a syntax error at the app's first import, not a warning.
34
37
  export const DEFAULT_TRANSPILE_PACKAGES = [
35
38
  '@djangocfg/i18n',
36
39
  '@djangocfg/ui-core',
37
40
  '@djangocfg/layouts',
38
- '@djangocfg/ui-tools',
39
41
  '@djangocfg/api',
40
42
  '@djangocfg/analytics',
41
- '@djangocfg/centrifugo',
42
43
  '@djangocfg/devtools',
43
44
  '@djangocfg/payments',
45
+ '@djangocfg/widget-agent',
46
+ '@djangocfg/widget-avatar',
47
+ '@djangocfg/widget-charts',
48
+ '@djangocfg/widget-chat',
49
+ '@djangocfg/widget-code',
50
+ '@djangocfg/widget-data',
51
+ '@djangocfg/widget-diagram',
52
+ '@djangocfg/widget-editor',
53
+ '@djangocfg/widget-forms',
54
+ '@djangocfg/widget-kit',
55
+ '@djangocfg/widget-map',
56
+ '@djangocfg/widget-media',
57
+ '@djangocfg/widget-ogimage',
58
+ '@djangocfg/widget-overlay',
59
+ '@djangocfg/widget-player',
60
+ '@djangocfg/widget-visual',
44
61
  ] as const;
45
62
 
46
63
  // Default packages to optimize imports
@@ -293,7 +293,7 @@ export function createBaseNextConfig(
293
293
  const cspDisabled = options.csp === false;
294
294
  const cspExtra = typeof options.csp === 'object' ? options.csp : undefined;
295
295
 
296
- // In dev the backend (Django, Centrifugo) is plain http/ws on localhost,
296
+ // In dev the backend (Django) is plain http/ws on localhost,
297
297
  // so connect/img must allow http:/ws:. Production stays strict (https/wss
298
298
  // only) to forbid downgrade/cleartext exfiltration.
299
299
  //
@@ -343,7 +343,7 @@ export function createBaseNextConfig(
343
343
  "style-src 'self' 'unsafe-inline'",
344
344
  imgSrc,
345
345
  `font-src 'self' data:${extraFont}`,
346
- // API/websocket calls go cross-origin to Django/Centrifugo.
346
+ // API calls go cross-origin to Django.
347
347
  connectSrc,
348
348
  // Declared vendors (Stripe Elements/Checkout, video embeds…) and any
349
349
  // app-declared trusted origins mount iframes; add their hosts here.
package/src/config/csp.ts CHANGED
@@ -136,11 +136,14 @@ export type CspVendor = keyof typeof CSP_VENDOR_PRESETS;
136
136
  * (Observed 2026-07-23: cmdop `apps/web` blocked on
137
137
  * `googletagmanager.com/gtag/js?id=G-YJ0F48S83F`.)
138
138
  *
139
- * - `youtube` / `vimeo` — `VideoPlayer` (`@djangocfg/ui-tools`) mounts these
140
- * iframes AT RUNTIME from a URL inside a chat message (see
141
- * `chat/messages/blocks/renderers/VideoBlock.tsx`). The app author enables a
142
- * chat; whether any user ever pastes a YouTube link is not knowable at build
143
- * time, so no `next.config.ts` can declare it honestly.
139
+ * - `youtube` / `vimeo` — these existed for `VideoPlayer`
140
+ * (`@djangocfg/ui-tools`), which mounted the iframes AT RUNTIME from a URL
141
+ * inside a chat message. That player was retired with `ui-tools`;
142
+ * `@djangocfg/widget-player` embeds no third-party frames, so **nothing in
143
+ * this repo needs these presets today**. They are kept because the shape of
144
+ * the problem outlives the component: an app author enables a chat, and
145
+ * whether a user ever pastes a YouTube link is not knowable at build time,
146
+ * so no `next.config.ts` can declare it honestly.
144
147
  *
145
148
  * Note what these have in common: the script/frame is turned on by the RUNTIME
146
149
  * (the edge, a package, or an end user), never by the app author editing the