nextjs-cms 0.9.21 → 0.9.23

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 (190) hide show
  1. package/README.md +65 -13
  2. package/dist/api/actions/files.d.ts +30 -0
  3. package/dist/api/actions/files.d.ts.map +1 -0
  4. package/dist/api/actions/files.js +234 -0
  5. package/dist/api/actions/index.d.ts +4 -0
  6. package/dist/api/actions/index.d.ts.map +1 -0
  7. package/dist/api/actions/index.js +3 -0
  8. package/dist/api/actions/pages.d.ts +297 -0
  9. package/dist/api/actions/pages.d.ts.map +1 -0
  10. package/dist/api/actions/pages.js +1215 -0
  11. package/dist/api/actions/privileges.d.ts +25 -0
  12. package/dist/api/actions/privileges.d.ts.map +1 -0
  13. package/dist/api/actions/privileges.js +98 -0
  14. package/dist/api/client/index.d.ts +4 -0
  15. package/dist/api/client/index.d.ts.map +1 -0
  16. package/dist/api/client/index.js +3 -0
  17. package/dist/api/client.d.ts +30 -0
  18. package/dist/api/client.d.ts.map +1 -0
  19. package/dist/api/client.js +82 -0
  20. package/dist/api/index.d.ts +1 -938
  21. package/dist/api/index.d.ts.map +1 -1
  22. package/dist/api/index.js +0 -13
  23. package/dist/api/lib/serverActions.d.ts +3 -3
  24. package/dist/api/plugin/index.d.ts +7 -0
  25. package/dist/api/plugin/index.d.ts.map +1 -0
  26. package/dist/api/plugin/index.js +5 -0
  27. package/dist/api/root.d.ts +18 -1844
  28. package/dist/api/root.d.ts.map +1 -1
  29. package/dist/api/root.js +18 -83
  30. package/dist/api/routers/navigation.d.ts +3 -3
  31. package/dist/api/server/index.d.ts +8 -0
  32. package/dist/api/server/index.d.ts.map +1 -0
  33. package/dist/api/server/index.js +3 -0
  34. package/dist/api/server.d.ts +2748 -0
  35. package/dist/api/server.d.ts.map +1 -0
  36. package/dist/api/server.js +100 -0
  37. package/dist/api/trpc/client.d.ts +19 -3
  38. package/dist/api/trpc/client.d.ts.map +1 -1
  39. package/dist/api/trpc/client.js +55 -1
  40. package/dist/api/trpc/query-client.d.ts +3 -1
  41. package/dist/api/trpc/query-client.d.ts.map +1 -1
  42. package/dist/api/trpc/query-client.js +25 -20
  43. package/dist/api/trpc/root.d.ts +906 -0
  44. package/dist/api/trpc/root.d.ts.map +1 -0
  45. package/dist/api/trpc/root.js +47 -0
  46. package/dist/api/trpc/routers/accountSettings.d.ts +66 -0
  47. package/dist/api/trpc/routers/accountSettings.d.ts.map +1 -0
  48. package/dist/api/trpc/routers/accountSettings.js +200 -0
  49. package/dist/api/trpc/routers/admins.d.ts +112 -0
  50. package/dist/api/trpc/routers/admins.d.ts.map +1 -0
  51. package/dist/api/trpc/routers/admins.js +331 -0
  52. package/dist/api/trpc/routers/auth.d.ts +54 -0
  53. package/dist/api/trpc/routers/auth.d.ts.map +1 -0
  54. package/dist/api/trpc/routers/auth.js +50 -0
  55. package/dist/api/trpc/routers/categorySection.d.ts +105 -0
  56. package/dist/api/trpc/routers/categorySection.d.ts.map +1 -0
  57. package/dist/api/trpc/routers/categorySection.js +49 -0
  58. package/dist/api/trpc/routers/config.d.ts +48 -0
  59. package/dist/api/trpc/routers/config.d.ts.map +1 -0
  60. package/dist/api/trpc/routers/config.js +18 -0
  61. package/dist/api/trpc/routers/cpanel.d.ts +82 -0
  62. package/dist/api/trpc/routers/cpanel.d.ts.map +1 -0
  63. package/dist/api/trpc/routers/cpanel.js +216 -0
  64. package/dist/api/trpc/routers/fields.d.ts +35 -0
  65. package/dist/api/trpc/routers/fields.d.ts.map +1 -0
  66. package/dist/api/trpc/routers/fields.js +81 -0
  67. package/dist/api/trpc/routers/files.d.ts +34 -0
  68. package/dist/api/trpc/routers/files.d.ts.map +1 -0
  69. package/dist/api/trpc/routers/files.js +14 -0
  70. package/dist/api/trpc/routers/gallery.d.ts +35 -0
  71. package/dist/api/trpc/routers/gallery.d.ts.map +1 -0
  72. package/dist/api/trpc/routers/gallery.js +92 -0
  73. package/dist/api/trpc/routers/hasItemsSection.d.ts +194 -0
  74. package/dist/api/trpc/routers/hasItemsSection.d.ts.map +1 -0
  75. package/dist/api/trpc/routers/hasItemsSection.js +86 -0
  76. package/dist/api/trpc/routers/logs.d.ts +59 -0
  77. package/dist/api/trpc/routers/logs.d.ts.map +1 -0
  78. package/dist/api/trpc/routers/logs.js +79 -0
  79. package/dist/api/trpc/routers/navigation.d.ts +65 -0
  80. package/dist/api/trpc/routers/navigation.d.ts.map +1 -0
  81. package/dist/api/trpc/routers/navigation.js +11 -0
  82. package/dist/api/trpc/routers/simpleSection.d.ts +93 -0
  83. package/dist/api/trpc/routers/simpleSection.d.ts.map +1 -0
  84. package/dist/api/trpc/routers/simpleSection.js +54 -0
  85. package/dist/api/trpc/server.d.ts +2789 -5
  86. package/dist/api/trpc/server.d.ts.map +1 -1
  87. package/dist/api/trpc/server.js +91 -52
  88. package/dist/api/trpc/trpc.d.ts +111 -0
  89. package/dist/api/trpc/trpc.d.ts.map +1 -0
  90. package/dist/api/trpc/trpc.js +99 -0
  91. package/dist/api/trpc/utils/async-caller-proxy.d.ts +2 -0
  92. package/dist/api/trpc/utils/async-caller-proxy.d.ts.map +1 -0
  93. package/dist/api/trpc/utils/async-caller-proxy.js +38 -0
  94. package/dist/api/trpc/utils/refresh-token-link.d.ts +6 -0
  95. package/dist/api/trpc/utils/refresh-token-link.d.ts.map +1 -0
  96. package/dist/api/trpc/utils/refresh-token-link.js +81 -0
  97. package/dist/api/trpc/utils/router-types.d.ts +7 -0
  98. package/dist/api/trpc/utils/router-types.d.ts.map +1 -0
  99. package/dist/api/trpc/utils/router-types.js +0 -0
  100. package/dist/api/use-axios-private.d.ts +6 -0
  101. package/dist/api/use-axios-private.d.ts.map +1 -0
  102. package/dist/api/use-axios-private.js +57 -0
  103. package/dist/api/utils/async-caller-proxy.d.ts +2 -0
  104. package/dist/api/utils/async-caller-proxy.d.ts.map +1 -0
  105. package/dist/api/utils/async-caller-proxy.js +36 -0
  106. package/dist/api/utils/lazy-caller-proxy.d.ts +2 -0
  107. package/dist/api/utils/lazy-caller-proxy.d.ts.map +1 -0
  108. package/dist/api/utils/lazy-caller-proxy.js +36 -0
  109. package/dist/api/utils/router-types.d.ts +7 -0
  110. package/dist/api/utils/router-types.d.ts.map +1 -0
  111. package/dist/api/utils/router-types.js +0 -0
  112. package/dist/auth/hooks/index.d.ts +1 -2
  113. package/dist/auth/hooks/index.d.ts.map +1 -1
  114. package/dist/auth/hooks/index.js +1 -2
  115. package/dist/auth/react.d.ts +1 -2
  116. package/dist/auth/react.d.ts.map +1 -1
  117. package/dist/auth/react.js +1 -2
  118. package/dist/auth/trpc.d.ts +1 -1
  119. package/dist/auth/trpc.d.ts.map +1 -1
  120. package/dist/auth/trpc.js +0 -1
  121. package/dist/cli/lib/fix-master-admin.d.ts.map +1 -1
  122. package/dist/cli/lib/fix-master-admin.js +12 -25
  123. package/dist/cli/lib/update-sections.d.ts.map +1 -1
  124. package/dist/cli/lib/update-sections.js +90 -46
  125. package/dist/core/config/config-loader.d.ts +23 -7
  126. package/dist/core/config/config-loader.d.ts.map +1 -1
  127. package/dist/core/config/config-loader.js +26 -9
  128. package/dist/core/db/table-checker/MysqlTable.d.ts.map +1 -1
  129. package/dist/core/db/table-checker/MysqlTable.js +3 -1
  130. package/dist/core/fields/date-range.d.ts +4 -4
  131. package/dist/core/fields/select.d.ts +1 -1
  132. package/dist/core/sections/category.d.ts +8 -8
  133. package/dist/core/sections/hasItems.d.ts +8 -8
  134. package/dist/core/sections/section.d.ts +5 -5
  135. package/dist/core/sections/simple.d.ts +4 -4
  136. package/dist/core/types/index.d.ts +17 -0
  137. package/dist/core/types/index.d.ts.map +1 -1
  138. package/dist/index.d.ts +0 -1
  139. package/dist/index.d.ts.map +1 -1
  140. package/dist/index.js +0 -1
  141. package/dist/plugins/client.d.ts +19 -0
  142. package/dist/plugins/client.d.ts.map +1 -0
  143. package/dist/plugins/client.js +24 -0
  144. package/dist/plugins/define.d.ts +4 -0
  145. package/dist/plugins/define.d.ts.map +1 -0
  146. package/dist/plugins/define.js +3 -0
  147. package/dist/plugins/derive.d.ts +32 -0
  148. package/dist/plugins/derive.d.ts.map +1 -0
  149. package/dist/plugins/derive.js +77 -0
  150. package/dist/plugins/loader.d.ts +51 -7
  151. package/dist/plugins/loader.d.ts.map +1 -1
  152. package/dist/plugins/loader.js +111 -51
  153. package/dist/plugins/manifest.d.ts +28 -0
  154. package/dist/plugins/manifest.d.ts.map +1 -0
  155. package/dist/plugins/manifest.js +83 -0
  156. package/dist/plugins/prefetch.d.ts +16 -0
  157. package/dist/plugins/prefetch.d.ts.map +1 -0
  158. package/dist/plugins/prefetch.js +40 -0
  159. package/dist/plugins/registry.d.ts +22 -0
  160. package/dist/plugins/registry.d.ts.map +1 -0
  161. package/dist/plugins/registry.js +25 -0
  162. package/dist/plugins/server.d.ts +2 -0
  163. package/dist/plugins/server.d.ts.map +1 -1
  164. package/dist/plugins/server.js +2 -0
  165. package/dist/plugins/types.d.ts +9 -0
  166. package/dist/plugins/types.d.ts.map +1 -0
  167. package/dist/plugins/types.js +0 -0
  168. package/dist/translations/base/en.d.ts +5 -0
  169. package/dist/translations/base/en.d.ts.map +1 -1
  170. package/dist/translations/base/en.js +5 -0
  171. package/dist/translations/client.d.ts +64 -4
  172. package/dist/translations/client.d.ts.map +1 -1
  173. package/dist/translations/server.d.ts +64 -4
  174. package/dist/translations/server.d.ts.map +1 -1
  175. package/dist/utils/console-log.d.ts +18 -0
  176. package/dist/utils/console-log.d.ts.map +1 -0
  177. package/dist/utils/console-log.js +28 -0
  178. package/dist/utils/index.d.ts +1 -0
  179. package/dist/utils/index.d.ts.map +1 -1
  180. package/dist/utils/index.js +1 -0
  181. package/dist/utils/log.d.ts +18 -0
  182. package/dist/utils/log.d.ts.map +1 -0
  183. package/dist/utils/log.js +28 -0
  184. package/dist/validators/index.d.ts +1 -0
  185. package/dist/validators/index.d.ts.map +1 -1
  186. package/dist/validators/index.js +1 -0
  187. package/dist/validators/tags.d.ts +4 -0
  188. package/dist/validators/tags.d.ts.map +1 -0
  189. package/dist/validators/tags.js +8 -0
  190. package/package.json +36 -18
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/plugins/manifest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAA;AAC3E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAEpD,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,kBAAkB,CAAA;IACzB,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,kBAAkB,CAAA;IACzB,MAAM,CAAC,EAAE,mBAAmB,EAAE,CAAA;CACjC;AAED,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IAClE,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,kBAAkB,EAAE,MAAM,CAAA;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACjC,MAAM,EAAE,iBAAiB,CAAA;IACzB,QAAQ,EAAE,cAAc,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;CACrB;AAoDD,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC,CA+B1E;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAUpF"}
@@ -0,0 +1,83 @@
1
+ import { createRequire } from 'module';
2
+ import path from 'path';
3
+ import fs from 'fs';
4
+ import { getCMSConfig } from '../core/config/index.js';
5
+ const appRequire = createRequire(path.join(process.cwd(), 'package.json'));
6
+ const pkgRequire = createRequire(import.meta.url);
7
+ const resolvePluginPackageJson = (pluginPackage) => {
8
+ const target = `${pluginPackage}/package.json`;
9
+ try {
10
+ return appRequire.resolve(target);
11
+ }
12
+ catch {
13
+ try {
14
+ return pkgRequire.resolve(target, { paths: [process.cwd()] });
15
+ }
16
+ catch {
17
+ return null;
18
+ }
19
+ }
20
+ };
21
+ const readManifestFromPackage = (pluginPackage) => {
22
+ const pkgJsonPath = resolvePluginPackageJson(pluginPackage);
23
+ if (!pkgJsonPath) {
24
+ console.warn(`[plugins] Could not resolve "${pluginPackage}/package.json".`);
25
+ return null;
26
+ }
27
+ let pkg;
28
+ try {
29
+ pkg = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8'));
30
+ }
31
+ catch (error) {
32
+ console.warn(`[plugins] Failed to read "${pkgJsonPath}":`, error);
33
+ return null;
34
+ }
35
+ const manifest = pkg.pluginManifest;
36
+ if (!manifest) {
37
+ console.warn(`[plugins] Package "${pluginPackage}" is missing the "pluginManifest" field in package.json. ` +
38
+ `Plugins must declare metadata statically so the CLI can read it without evaluating plugin code.`);
39
+ return null;
40
+ }
41
+ if (!manifest.name || !manifest.registryName || !manifest.title) {
42
+ console.warn(`[plugins] Package "${pluginPackage}" has an invalid "pluginManifest" — required fields: name, registryName, title.`);
43
+ return null;
44
+ }
45
+ return manifest;
46
+ };
47
+ export async function getPluginManifests() {
48
+ const config = await getCMSConfig();
49
+ const registrations = config.plugins ?? [];
50
+ const seenPackages = new Set();
51
+ const seenNames = new Set();
52
+ const loaded = [];
53
+ for (const registration of registrations) {
54
+ if (!registration.package)
55
+ continue;
56
+ if (seenPackages.has(registration.package))
57
+ continue;
58
+ const manifest = readManifestFromPackage(registration.package);
59
+ if (!manifest)
60
+ continue;
61
+ if (seenNames.has(manifest.name)) {
62
+ console.warn(`[plugins] Duplicate plugin name "${manifest.name}" — skipping "${registration.package}".`);
63
+ continue;
64
+ }
65
+ seenPackages.add(registration.package);
66
+ seenNames.add(manifest.name);
67
+ loaded.push({
68
+ config: registration,
69
+ manifest,
70
+ moduleName: registration.package,
71
+ });
72
+ }
73
+ return loaded;
74
+ }
75
+ export async function getPluginRouteManifests() {
76
+ const loaded = await getPluginManifests();
77
+ return loaded.flatMap((entry) => (entry.manifest.routes ?? []).map((route) => ({
78
+ ...route,
79
+ pluginId: entry.config.package,
80
+ pluginName: entry.manifest.name,
81
+ pluginRegistryName: entry.manifest.registryName,
82
+ })));
83
+ }
@@ -0,0 +1,16 @@
1
+ import type { LoadedPluginRoute } from './loader.js';
2
+ /**
3
+ * Walks a dot-path into a tRPC RSC `api` proxy and invokes `.prefetch()` at the leaf.
4
+ *
5
+ * Example: `runApiPrefetch(api, 'cpanelEmails.getEmails')` runs
6
+ * `await api.cpanelEmails.getEmails.prefetch()`.
7
+ *
8
+ * Throws if any segment is missing or the leaf has no `prefetch` helper, so a typo
9
+ * in `PluginRoute.prefetch` fails loudly during development.
10
+ */
11
+ export declare function runApiPrefetch(api: unknown, dotPath: string): Promise<void>;
12
+ /** Normalizes a route's `prefetch` field (string | string[] | undefined) into an array. */
13
+ export declare function getRoutePrefetchPaths(route: Pick<LoadedPluginRoute, 'prefetch'>): string[];
14
+ /** Runs all declared prefetches for a route in parallel. */
15
+ export declare function runRoutePrefetches(api: unknown, route: Pick<LoadedPluginRoute, 'prefetch'>): Promise<void>;
16
+ //# sourceMappingURL=prefetch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prefetch.d.ts","sourceRoot":"","sources":["../../src/plugins/prefetch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAEpD;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBjF;AAED,2FAA2F;AAC3F,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG,MAAM,EAAE,CAG1F;AAED,4DAA4D;AAC5D,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAIhH"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Walks a dot-path into a tRPC RSC `api` proxy and invokes `.prefetch()` at the leaf.
3
+ *
4
+ * Example: `runApiPrefetch(api, 'cpanelEmails.getEmails')` runs
5
+ * `await api.cpanelEmails.getEmails.prefetch()`.
6
+ *
7
+ * Throws if any segment is missing or the leaf has no `prefetch` helper, so a typo
8
+ * in `PluginRoute.prefetch` fails loudly during development.
9
+ */
10
+ export async function runApiPrefetch(api, dotPath) {
11
+ const segments = dotPath.split('.').filter(Boolean);
12
+ if (segments.length === 0) {
13
+ throw new Error('[plugins] Empty prefetch path.');
14
+ }
15
+ let node = api;
16
+ for (const key of segments) {
17
+ if (node == null || (typeof node !== 'object' && typeof node !== 'function')) {
18
+ throw new Error(`[plugins] Cannot resolve prefetch path "${dotPath}" — segment "${key}" is unreachable.`);
19
+ }
20
+ node = node[key];
21
+ }
22
+ const prefetch = node?.prefetch;
23
+ if (typeof prefetch !== 'function') {
24
+ throw new Error(`[plugins] Prefetch path "${dotPath}" does not resolve to a procedure with a prefetch helper.`);
25
+ }
26
+ await prefetch();
27
+ }
28
+ /** Normalizes a route's `prefetch` field (string | string[] | undefined) into an array. */
29
+ export function getRoutePrefetchPaths(route) {
30
+ if (!route.prefetch)
31
+ return [];
32
+ return Array.isArray(route.prefetch) ? route.prefetch : [route.prefetch];
33
+ }
34
+ /** Runs all declared prefetches for a route in parallel. */
35
+ export async function runRoutePrefetches(api, route) {
36
+ const paths = getRoutePrefetchPaths(route);
37
+ if (paths.length === 0)
38
+ return;
39
+ await Promise.all(paths.map((path) => runApiPrefetch(api, path)));
40
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Static import map for all official @nextjscms plugins.
3
+ *
4
+ * Why this file exists: the plugin loader needs to import plugin packages by
5
+ * name at runtime. Bare `await import(variable)` calls are rejected by
6
+ * Turbopack/webpack as "too dynamic" because the bundler cannot statically
7
+ * see which packages may be loaded. Listing each package as a literal
8
+ * `() => import('@nextjscms/plugin-x')` thunk lets the bundler analyze the
9
+ * import sites, and the host's module loader applies the correct export
10
+ * conditions at runtime — most importantly "react-server" during RSC
11
+ * requests, so plugin transitive deps marked `import 'server-only'` resolve
12
+ * to a no-op instead of throwing.
13
+ *
14
+ * Each thunk is wrapped in its own arrow so the import is deferred until the
15
+ * plugin is actually configured in cms.config.ts. Plugins not installed in
16
+ * the host app will fail at thunk invocation, which the loader treats as a
17
+ * normal "plugin not available" outcome.
18
+ *
19
+ * When a new official plugin is published, add an entry here.
20
+ */
21
+ export declare const officialPluginRegistry: Record<string, () => Promise<unknown>>;
22
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/plugins/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAIzE,CAAA"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Static import map for all official @nextjscms plugins.
3
+ *
4
+ * Why this file exists: the plugin loader needs to import plugin packages by
5
+ * name at runtime. Bare `await import(variable)` calls are rejected by
6
+ * Turbopack/webpack as "too dynamic" because the bundler cannot statically
7
+ * see which packages may be loaded. Listing each package as a literal
8
+ * `() => import('@nextjscms/plugin-x')` thunk lets the bundler analyze the
9
+ * import sites, and the host's module loader applies the correct export
10
+ * conditions at runtime — most importantly "react-server" during RSC
11
+ * requests, so plugin transitive deps marked `import 'server-only'` resolve
12
+ * to a no-op instead of throwing.
13
+ *
14
+ * Each thunk is wrapped in its own arrow so the import is deferred until the
15
+ * plugin is actually configured in cms.config.ts. Plugins not installed in
16
+ * the host app will fail at thunk invocation, which the loader treats as a
17
+ * normal "plugin not available" outcome.
18
+ *
19
+ * When a new official plugin is published, add an entry here.
20
+ */
21
+ export const officialPluginRegistry = {
22
+ '@nextjscms/plugin-cpanel-dashboard': () => import('@nextjscms/plugin-cpanel-dashboard'),
23
+ '@nextjscms/plugin-cpanel-emails': () => import('@nextjscms/plugin-cpanel-emails'),
24
+ '@nextjscms/plugin-google-analytics': () => import('@nextjscms/plugin-google-analytics'),
25
+ };
@@ -1,2 +1,4 @@
1
1
  export * from './loader.js';
2
+ export { derivePluginName, derivePluginRouterKey, extractPluginName, PLUGIN_PACKAGE_PREFIX } from './derive.js';
3
+ export { runApiPrefetch, runRoutePrefetches, getRoutePrefetchPaths } from './prefetch.js';
2
4
  //# sourceMappingURL=server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/plugins/server.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/plugins/server.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAC/G,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA"}
@@ -1 +1,3 @@
1
1
  export * from './loader.js';
2
+ export { derivePluginName, derivePluginRouterKey, extractPluginName, PLUGIN_PACKAGE_PREFIX } from './derive.js';
3
+ export { runApiPrefetch, runRoutePrefetches, getRoutePrefetchPaths } from './prefetch.js';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Props passed to a plugin's server component by the host app.
3
+ *
4
+ * Currently empty — the host owns prefetching (declared via `PluginRoute.prefetch`)
5
+ * and wraps the plugin's tree in `<HydrateClient>`. Plugins receive no tRPC `api`
6
+ * proxy, which keeps the proxy off the RSC→Client serialization path.
7
+ */
8
+ export type PluginServerComponentProps = Record<string, never>;
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA"}
File without changes
@@ -286,11 +286,15 @@ declare const _default: {
286
286
  readonly deletePhotoText: "Are you sure you want to delete this photo? The photo will be permanently deleted after confirmation.";
287
287
  readonly deleteVideo: "Delete Video";
288
288
  readonly deleteVideoText: "Are you sure you want to delete this video? The video will be permanently deleted after confirmation.";
289
+ readonly deleteDocument: "Delete Document";
290
+ readonly deleteDocumentText: "Are you sure you want to delete this document? The document will be permanently deleted after confirmation.";
289
291
  readonly yes: "Yes";
290
292
  readonly no: "No";
291
293
  readonly videoDeletedSuccessfully: "Video deleted successfully";
292
294
  readonly photoDeletedSuccessfully: "Photo deleted successfully";
293
295
  readonly photoMarkedForDeletion: "Photo will be deleted when you save.";
296
+ readonly videoMarkedForDeletion: "Video will be deleted when you save.";
297
+ readonly documentMarkedForDeletion: "Document will be deleted when you save.";
294
298
  readonly undo: "Undo";
295
299
  readonly selectFile: "Select File";
296
300
  readonly mandatory: "Mandatory";
@@ -365,6 +369,7 @@ declare const _default: {
365
369
  readonly addedAgo: "Added {time} ago";
366
370
  readonly hoursAgo: "hours ago";
367
371
  readonly main: "Main";
372
+ readonly plugins: "Plugins";
368
373
  readonly categorySections: "Category Sections";
369
374
  readonly sectionsWithItems: "Sections with Items";
370
375
  readonly simpleSections: "Simple Sections";
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/translations/base/en.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBA+fU"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/translations/base/en.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAqgBU"}
@@ -286,11 +286,15 @@ export default {
286
286
  deletePhotoText: 'Are you sure you want to delete this photo? The photo will be permanently deleted after confirmation.',
287
287
  deleteVideo: 'Delete Video',
288
288
  deleteVideoText: 'Are you sure you want to delete this video? The video will be permanently deleted after confirmation.',
289
+ deleteDocument: 'Delete Document',
290
+ deleteDocumentText: 'Are you sure you want to delete this document? The document will be permanently deleted after confirmation.',
289
291
  yes: 'Yes',
290
292
  no: 'No',
291
293
  videoDeletedSuccessfully: 'Video deleted successfully',
292
294
  photoDeletedSuccessfully: 'Photo deleted successfully',
293
295
  photoMarkedForDeletion: 'Photo will be deleted when you save.',
296
+ videoMarkedForDeletion: 'Video will be deleted when you save.',
297
+ documentMarkedForDeletion: 'Document will be deleted when you save.',
294
298
  undo: 'Undo',
295
299
  selectFile: 'Select File',
296
300
  mandatory: 'Mandatory',
@@ -365,6 +369,7 @@ export default {
365
369
  addedAgo: 'Added {time} ago',
366
370
  hoursAgo: 'hours ago',
367
371
  main: 'Main',
372
+ plugins: 'Plugins',
368
373
  categorySections: 'Category Sections',
369
374
  sectionsWithItems: 'Sections with Items',
370
375
  simpleSections: 'Simple Sections',