@cmssy/remix 11.6.0 → 11.7.0

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/dist/index.d.cts CHANGED
@@ -8,16 +8,9 @@ interface CmssyRouteData {
8
8
  locale: string;
9
9
  defaultLocale: string;
10
10
  enabledLocales: string[];
11
- /** True for a VERIFIED editor request. The route renders the edit bridge. */
12
11
  isEdit: boolean;
13
12
  editorOrigin: string | string[];
14
13
  diagnostics?: string;
15
- /**
16
- * Edit mode only, and only when `blocks` was passed: what the canvas needs,
17
- * **keyed by position**. The header and the footer hold different blocks and
18
- * resolve to different data - handing the footer the header's is the quiet
19
- * version of this bug.
20
- */
21
14
  editorData?: Record<string, CmssyLayoutEditorData>;
22
15
  }
23
16
  interface CmssyLayoutEditorData {
@@ -25,31 +18,13 @@ interface CmssyLayoutEditorData {
25
18
  resolvedContent: Record<string, Record<string, unknown>>;
26
19
  }
27
20
  interface CreateCmssyLoaderOptions {
28
- /**
29
- * The block registry. Required to resolve the editor's layout data; omit it
30
- * and the layouts still render, but the editor cannot fill them.
31
- */
32
21
  blocks?: BlockDefinition[];
33
- /** Which positions the editor renders. Defaults to the header and footer. */
34
22
  positions?: string[];
35
23
  appContext?: Record<string, unknown>;
36
24
  }
37
- /**
38
- * The page loader.
39
- *
40
- * Note what is NOT here: the `/cmssy-edit` route the Next adapter needs. That
41
- * route exists because a Next page can be STATIC, and a static page never sees
42
- * the query string that would put it in edit mode. React Router renders on every
43
- * request, so the editor can be served from the page itself - verified the same
44
- * way, on the same protocol, with less machinery.
45
- */
46
25
  declare function createCmssyLoader(config: CmssyConfig, options?: CreateCmssyLoaderOptions): ({ request, }: {
47
26
  request: Request;
48
27
  }) => Promise<CmssyRouteData>;
49
- /**
50
- * The response headers a cmssy page needs: without them the admin cannot frame
51
- * the site, and the editor shows an empty box with no error anywhere.
52
- */
53
28
  declare function createCmssyHeaders(config: CmssyConfig): () => Record<string, string>;
54
29
 
55
30
  declare function useCmssyLocale(): string | undefined;
package/dist/index.d.ts CHANGED
@@ -8,16 +8,9 @@ interface CmssyRouteData {
8
8
  locale: string;
9
9
  defaultLocale: string;
10
10
  enabledLocales: string[];
11
- /** True for a VERIFIED editor request. The route renders the edit bridge. */
12
11
  isEdit: boolean;
13
12
  editorOrigin: string | string[];
14
13
  diagnostics?: string;
15
- /**
16
- * Edit mode only, and only when `blocks` was passed: what the canvas needs,
17
- * **keyed by position**. The header and the footer hold different blocks and
18
- * resolve to different data - handing the footer the header's is the quiet
19
- * version of this bug.
20
- */
21
14
  editorData?: Record<string, CmssyLayoutEditorData>;
22
15
  }
23
16
  interface CmssyLayoutEditorData {
@@ -25,31 +18,13 @@ interface CmssyLayoutEditorData {
25
18
  resolvedContent: Record<string, Record<string, unknown>>;
26
19
  }
27
20
  interface CreateCmssyLoaderOptions {
28
- /**
29
- * The block registry. Required to resolve the editor's layout data; omit it
30
- * and the layouts still render, but the editor cannot fill them.
31
- */
32
21
  blocks?: BlockDefinition[];
33
- /** Which positions the editor renders. Defaults to the header and footer. */
34
22
  positions?: string[];
35
23
  appContext?: Record<string, unknown>;
36
24
  }
37
- /**
38
- * The page loader.
39
- *
40
- * Note what is NOT here: the `/cmssy-edit` route the Next adapter needs. That
41
- * route exists because a Next page can be STATIC, and a static page never sees
42
- * the query string that would put it in edit mode. React Router renders on every
43
- * request, so the editor can be served from the page itself - verified the same
44
- * way, on the same protocol, with less machinery.
45
- */
46
25
  declare function createCmssyLoader(config: CmssyConfig, options?: CreateCmssyLoaderOptions): ({ request, }: {
47
26
  request: Request;
48
27
  }) => Promise<CmssyRouteData>;
49
- /**
50
- * The response headers a cmssy page needs: without them the admin cannot frame
51
- * the site, and the editor shows an empty box with no error anywhere.
52
- */
53
28
  declare function createCmssyHeaders(config: CmssyConfig): () => Record<string, string>;
54
29
 
55
30
  declare function useCmssyLocale(): string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/remix",
3
- "version": "11.6.0",
3
+ "version": "11.7.0",
4
4
  "description": "React Router 7 bindings for cmssy headless sites: page loader, framing CSP, sitemap and robots.",
5
5
  "keywords": [
6
6
  "cmssy",
@@ -22,14 +22,24 @@
22
22
  "sideEffects": false,
23
23
  "exports": {
24
24
  ".": {
25
- "types": "./dist/index.d.ts",
26
- "import": "./dist/index.js",
27
- "require": "./dist/index.cjs"
25
+ "import": {
26
+ "types": "./dist/index.d.ts",
27
+ "default": "./dist/index.js"
28
+ },
29
+ "require": {
30
+ "types": "./dist/index.d.cts",
31
+ "default": "./dist/index.cjs"
32
+ }
28
33
  },
29
34
  "./testing": {
30
- "types": "./dist/testing.d.ts",
31
- "import": "./dist/testing.js",
32
- "require": "./dist/testing.cjs"
35
+ "import": {
36
+ "types": "./dist/testing.d.ts",
37
+ "default": "./dist/testing.js"
38
+ },
39
+ "require": {
40
+ "types": "./dist/testing.d.cts",
41
+ "default": "./dist/testing.cjs"
42
+ }
33
43
  }
34
44
  },
35
45
  "main": "./dist/index.cjs",
@@ -48,10 +58,10 @@
48
58
  "tsup": "^8.3.0",
49
59
  "typescript": "^5.6.0",
50
60
  "vitest": "^2.1.0",
51
- "@cmssy/react": "11.6.0"
61
+ "@cmssy/react": "11.7.0"
52
62
  },
53
63
  "dependencies": {
54
- "@cmssy/core": "11.6.0"
64
+ "@cmssy/core": "11.7.0"
55
65
  },
56
66
  "scripts": {
57
67
  "build": "tsup",